Resolved forward reference mulf_sqr1 to (byte[512]) mulf_sqr1
Resolved forward reference mulf_sqr2 to (byte[512]) mulf_sqr2
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 

CONTROL FLOW GRAPH SSA
@begin: scope:[]  from
  (byte*) PROCPORT_DDR#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) PROCPORT_RAM_ALL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 48
  (byte) PROCPORT_RAM_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 53
  (byte) PROCPORT_RAM_CHARROM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 49
  (byte) PROCPORT_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 54
  (byte) PROCPORT_BASIC_KERNEL_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 55
  (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) 53248
  (word) SPRITE_PTRS#0 ← (word/signed word/dword/signed dword) 1016
  (byte*) SPRITES_XPOS#0 ← ((byte*)) (word/dword/signed dword) 53248
  (byte*) SPRITES_YPOS#0 ← ((byte*)) (word/dword/signed dword) 53249
  (byte*) SPRITES_XMSB#0 ← ((byte*)) (word/dword/signed dword) 53264
  (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) 53266
  (byte*) SPRITES_ENABLE#0 ← ((byte*)) (word/dword/signed dword) 53269
  (byte*) SPRITES_EXPAND_Y#0 ← ((byte*)) (word/dword/signed dword) 53271
  (byte*) SPRITES_PRIORITY#0 ← ((byte*)) (word/dword/signed dword) 53275
  (byte*) SPRITES_MC#0 ← ((byte*)) (word/dword/signed dword) 53276
  (byte*) SPRITES_EXPAND_X#0 ← ((byte*)) (word/dword/signed dword) 53277
  (byte*) BORDERCOL#0 ← ((byte*)) (word/dword/signed dword) 53280
  (byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53281
  (byte*) BGCOL1#0 ← ((byte*)) (word/dword/signed dword) 53281
  (byte*) BGCOL2#0 ← ((byte*)) (word/dword/signed dword) 53282
  (byte*) BGCOL3#0 ← ((byte*)) (word/dword/signed dword) 53283
  (byte*) BGCOL4#0 ← ((byte*)) (word/dword/signed dword) 53284
  (byte*) SPRITES_MC1#0 ← ((byte*)) (word/dword/signed dword) 53285
  (byte*) SPRITES_MC2#0 ← ((byte*)) (word/dword/signed dword) 53286
  (byte*) SPRITES_COLS#0 ← ((byte*)) (word/dword/signed dword) 53287
  (byte*) VIC_CONTROL#0 ← ((byte*)) (word/dword/signed dword) 53265
  (byte*) D011#0 ← ((byte*)) (word/dword/signed dword) 53265
  (byte) VIC_RST8#0 ← (byte/word/signed word/dword/signed dword) 128
  (byte) VIC_ECM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64
  (byte) VIC_BMM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 32
  (byte) VIC_DEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) VIC_RSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) VIC_CONTROL2#0 ← ((byte*)) (word/dword/signed dword) 53270
  (byte*) D016#0 ← ((byte*)) (word/dword/signed dword) 53270
  (byte) VIC_MCM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16
  (byte) VIC_CSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) D018#0 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) VIC_MEMORY#0 ← ((byte*)) (word/dword/signed dword) 53272
  (byte*) LIGHTPEN_X#0 ← ((byte*)) (word/dword/signed dword) 53267
  (byte*) LIGHTPEN_Y#0 ← ((byte*)) (word/dword/signed dword) 53268
  (byte*) IRQ_STATUS#0 ← ((byte*)) (word/dword/signed dword) 53273
  (byte*) IRQ_ENABLE#0 ← ((byte*)) (word/dword/signed dword) 53274
  (byte) IRQ_RASTER#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) IRQ_COLLISION_BG#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) IRQ_COLLISION_SPRITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) IRQ_LIGHTPEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) 55296
  (byte*) CIA1_PORT_A#0 ← ((byte*)) (word/dword/signed dword) 56320
  (byte*) CIA1_PORT_B#0 ← ((byte*)) (word/dword/signed dword) 56321
  (byte*) CIA1_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) 56322
  (byte*) CIA1_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) 56323
  (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) 56333
  (byte) CIA_INTERRUPT_CLEAR#0 ← (byte/signed byte/word/signed word/dword/signed dword) 127
  (byte*) CIA2_PORT_A#0 ← ((byte*)) (word/dword/signed dword) 56576
  (byte*) CIA2_PORT_B#0 ← ((byte*)) (word/dword/signed dword) 56577
  (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) 56578
  (byte*) CIA2_PORT_B_DDR#0 ← ((byte*)) (word/dword/signed dword) 56579
  (byte*) CIA2_INTERRUPT#0 ← ((byte*)) (word/dword/signed dword) 56589
  (void()**) KERNEL_IRQ#0 ← ((void()**)) (word/signed word/dword/signed dword) 788
  (void()**) HARDWARE_IRQ#0 ← ((void()**)) (word/dword/signed dword) 65534
  (byte) BLACK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (byte) WHITE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) RED#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) CYAN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3
  (byte) PURPLE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5
  (byte) BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 6
  (byte) YELLOW#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7
  (byte) ORANGE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8
  (byte) BROWN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 9
  (byte) PINK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10
  (byte) DARK_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 11
  (byte) GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 12
  (byte) LIGHT_GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 13
  (byte) LIGHT_BLUE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 14
  (byte) LIGHT_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 15
  to:@4
@4: scope:[]  from @begin
  (byte*) print_screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
  (byte*) print_line_cursor#0 ← (byte*) print_screen#0
  (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
  to:@16
print_str: scope:[print_str]  from do_perspective do_perspective::@11 do_perspective::@2 do_perspective::@4 do_perspective::@6 do_perspective::@9
  (byte*) print_char_cursor#74 ← phi( do_perspective/(byte*) print_char_cursor#71 do_perspective::@11/(byte*) print_char_cursor#28 do_perspective::@2/(byte*) print_char_cursor#20 do_perspective::@4/(byte*) print_char_cursor#22 do_perspective::@6/(byte*) print_char_cursor#24 do_perspective::@9/(byte*) print_char_cursor#26 )
  (byte*) print_str::str#9 ← phi( do_perspective/(byte*) print_str::str#1 do_perspective::@11/(byte*) print_str::str#6 do_perspective::@2/(byte*) print_str::str#2 do_perspective::@4/(byte*) print_str::str#3 do_perspective::@6/(byte*) print_str::str#4 do_perspective::@9/(byte*) print_str::str#5 )
  to:print_str::@1
print_str::@1: scope:[print_str]  from print_str print_str::@2
  (byte*) print_char_cursor#64 ← phi( print_str/(byte*) print_char_cursor#74 print_str::@2/(byte*) print_char_cursor#1 )
  (byte*) print_str::str#7 ← phi( print_str/(byte*) print_str::str#9 print_str::@2/(byte*) print_str::str#0 )
  (bool~) print_str::$0 ← *((byte*) print_str::str#7) != (byte) '@'
  if((bool~) print_str::$0) goto print_str::@2
  to:print_str::@return
print_str::@2: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#33 ← phi( print_str::@1/(byte*) print_char_cursor#64 )
  (byte*) print_str::str#8 ← phi( print_str::@1/(byte*) print_str::str#7 )
  *((byte*) print_char_cursor#33) ← *((byte*) print_str::str#8)
  (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#33
  (byte*) print_str::str#0 ← ++ (byte*) print_str::str#8
  to:print_str::@1
print_str::@return: scope:[print_str]  from print_str::@1
  (byte*) print_char_cursor#34 ← phi( print_str::@1/(byte*) print_char_cursor#64 )
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#34
  return 
  to:@return
print_ln: scope:[print_ln]  from do_perspective::@12
  (byte*) print_char_cursor#65 ← phi( do_perspective::@12/(byte*) print_char_cursor#29 )
  (byte*) print_line_cursor#21 ← phi( do_perspective::@12/(byte*) print_line_cursor#23 )
  to:print_ln::@1
print_ln::@1: scope:[print_ln]  from print_ln print_ln::@1
  (byte*) print_char_cursor#35 ← phi( print_ln/(byte*) print_char_cursor#65 print_ln::@1/(byte*) print_char_cursor#35 )
  (byte*) print_line_cursor#11 ← phi( print_ln/(byte*) print_line_cursor#21 print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*~) print_ln::$0 ← (byte*) print_line_cursor#11 + (byte/signed byte/word/signed word/dword/signed dword) 40
  (byte*) print_line_cursor#1 ← (byte*~) print_ln::$0
  (bool~) print_ln::$1 ← (byte*) print_line_cursor#1 < (byte*) print_char_cursor#35
  if((bool~) print_ln::$1) goto print_ln::@1
  to:print_ln::@2
print_ln::@2: scope:[print_ln]  from print_ln::@1
  (byte*) print_line_cursor#12 ← phi( print_ln::@1/(byte*) print_line_cursor#1 )
  (byte*) print_char_cursor#3 ← (byte*) print_line_cursor#12
  to:print_ln::@return
print_ln::@return: scope:[print_ln]  from print_ln::@2
  (byte*) print_char_cursor#36 ← phi( print_ln::@2/(byte*) print_char_cursor#3 )
  (byte*) print_line_cursor#13 ← phi( print_ln::@2/(byte*) print_line_cursor#12 )
  (byte*) print_line_cursor#2 ← (byte*) print_line_cursor#13
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#36
  return 
  to:@return
print_sbyte: scope:[print_sbyte]  from do_perspective::@1 do_perspective::@3 do_perspective::@5
  (byte*) print_char_cursor#75 ← phi( do_perspective::@1/(byte*) print_char_cursor#19 do_perspective::@3/(byte*) print_char_cursor#21 do_perspective::@5/(byte*) print_char_cursor#23 )
  (signed byte) print_sbyte::b#4 ← phi( do_perspective::@1/(signed byte) print_sbyte::b#1 do_perspective::@3/(signed byte) print_sbyte::b#2 do_perspective::@5/(signed byte) print_sbyte::b#3 )
  (bool~) print_sbyte::$0 ← (signed byte) print_sbyte::b#4 < (byte/signed byte/word/signed word/dword/signed dword) 0
  if((bool~) print_sbyte::$0) goto print_sbyte::@1
  to:print_sbyte::@3
print_sbyte::@1: scope:[print_sbyte]  from print_sbyte
  (signed byte) print_sbyte::b#7 ← phi( print_sbyte/(signed byte) print_sbyte::b#4 )
  (byte*) print_char_cursor#66 ← phi( print_sbyte/(byte*) print_char_cursor#75 )
  (byte) print_char::ch#0 ← (byte) '-'
  call print_char 
  to:print_sbyte::@5
print_sbyte::@5: scope:[print_sbyte]  from print_sbyte::@1
  (signed byte) print_sbyte::b#5 ← phi( print_sbyte::@1/(signed byte) print_sbyte::b#7 )
  (byte*) print_char_cursor#37 ← phi( print_sbyte::@1/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#37
  (signed byte~) print_sbyte::$3 ← - (signed byte) print_sbyte::b#5
  (signed byte) print_sbyte::b#0 ← (signed byte~) print_sbyte::$3
  to:print_sbyte::@2
print_sbyte::@3: scope:[print_sbyte]  from print_sbyte
  (signed byte) print_sbyte::b#9 ← phi( print_sbyte/(signed byte) print_sbyte::b#4 )
  (byte*) print_char_cursor#67 ← phi( print_sbyte/(byte*) print_char_cursor#75 )
  (byte) print_char::ch#1 ← (byte) ' '
  call print_char 
  to:print_sbyte::@6
print_sbyte::@6: scope:[print_sbyte]  from print_sbyte::@3
  (signed byte) print_sbyte::b#8 ← phi( print_sbyte::@3/(signed byte) print_sbyte::b#9 )
  (byte*) print_char_cursor#38 ← phi( print_sbyte::@3/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#38
  to:print_sbyte::@2
print_sbyte::@2: scope:[print_sbyte]  from print_sbyte::@5 print_sbyte::@6
  (byte*) print_char_cursor#68 ← phi( print_sbyte::@5/(byte*) print_char_cursor#5 print_sbyte::@6/(byte*) print_char_cursor#6 )
  (signed byte) print_sbyte::b#6 ← phi( print_sbyte::@5/(signed byte) print_sbyte::b#0 print_sbyte::@6/(signed byte) print_sbyte::b#8 )
  (byte~) print_sbyte::$4 ← ((byte)) (signed byte) print_sbyte::b#6
  (byte) print_byte::b#0 ← (byte~) print_sbyte::$4
  call print_byte 
  to:print_sbyte::@7
print_sbyte::@7: scope:[print_sbyte]  from print_sbyte::@2
  (byte*) print_char_cursor#39 ← phi( print_sbyte::@2/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#7 ← (byte*) print_char_cursor#39
  to:print_sbyte::@return
print_sbyte::@return: scope:[print_sbyte]  from print_sbyte::@7
  (byte*) print_char_cursor#40 ← phi( print_sbyte::@7/(byte*) print_char_cursor#7 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#40
  return 
  to:@return
@16: scope:[]  from @4
  (byte*) print_screen#9 ← phi( @4/(byte*) print_screen#0 )
  (byte*) print_char_cursor#79 ← phi( @4/(byte*) print_char_cursor#0 )
  (byte*) print_line_cursor#30 ← phi( @4/(byte*) print_line_cursor#0 )
  (byte[]) print_hextab#0 ← (const string) $0
  to:@23
print_byte: scope:[print_byte]  from do_perspective::@10 do_perspective::@8 print_sbyte::@2
  (byte*) print_char_cursor#69 ← phi( do_perspective::@10/(byte*) print_char_cursor#27 do_perspective::@8/(byte*) print_char_cursor#72 print_sbyte::@2/(byte*) print_char_cursor#68 )
  (byte) print_byte::b#3 ← phi( do_perspective::@10/(byte) print_byte::b#2 do_perspective::@8/(byte) print_byte::b#1 print_sbyte::@2/(byte) print_byte::b#0 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4
  (byte) print_char::ch#2 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#4 ← phi( print_byte/(byte) print_byte::b#3 )
  (byte*) print_char_cursor#41 ← phi( print_byte/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#41
  (byte~) print_byte::$2 ← (byte) print_byte::b#4 & (byte/signed byte/word/signed word/dword/signed dword) 15
  (byte) print_char::ch#3 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#42 ← phi( print_byte::@1/(byte*) print_char_cursor#13 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#42
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#43 ← phi( print_byte::@2/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#43
  return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3
  (byte*) print_char_cursor#44 ← phi( print_byte/(byte*) print_char_cursor#69 print_byte::@1/(byte*) print_char_cursor#9 print_sbyte::@1/(byte*) print_char_cursor#66 print_sbyte::@3/(byte*) print_char_cursor#67 )
  (byte) print_char::ch#4 ← phi( print_byte/(byte) print_char::ch#2 print_byte::@1/(byte) print_char::ch#3 print_sbyte::@1/(byte) print_char::ch#0 print_sbyte::@3/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4
  (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#45 ← phi( print_char/(byte*) print_char_cursor#12 )
  (byte*) print_char_cursor#13 ← (byte*) print_char_cursor#45
  return 
  to:@return
print_cls: scope:[print_cls]  from main::@1
  (byte*) print_screen#1 ← phi( main::@1/(byte*) print_screen#4 )
  (byte*) print_cls::sc#0 ← (byte*) print_screen#1
  to:print_cls::@1
print_cls::@1: scope:[print_cls]  from print_cls print_cls::@1
  (byte*) print_screen#2 ← phi( print_cls/(byte*) print_screen#1 print_cls::@1/(byte*) print_screen#2 )
  (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) print_cls::sc#0 print_cls::@1/(byte*) print_cls::sc#1 )
  *((byte*) print_cls::sc#2) ← (byte) ' '
  (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
  (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (word/signed word/dword/signed dword) 1000
  (bool~) print_cls::$1 ← (byte*) print_cls::sc#1 != (byte*~) print_cls::$0
  if((bool~) print_cls::$1) goto print_cls::@1
  to:print_cls::@2
print_cls::@2: scope:[print_cls]  from print_cls::@1
  (byte*) print_screen#3 ← phi( print_cls::@1/(byte*) print_screen#2 )
  (byte*) print_line_cursor#3 ← (byte*) print_screen#3
  (byte*) print_char_cursor#14 ← (byte*) print_line_cursor#3
  to:print_cls::@return
print_cls::@return: scope:[print_cls]  from print_cls::@2
  (byte*) print_char_cursor#46 ← phi( print_cls::@2/(byte*) print_char_cursor#14 )
  (byte*) print_line_cursor#14 ← phi( print_cls::@2/(byte*) print_line_cursor#3 )
  (byte*) print_line_cursor#4 ← (byte*) print_line_cursor#14
  (byte*) print_char_cursor#15 ← (byte*) print_char_cursor#46
  return 
  to:@return
@23: scope:[]  from @16
  (byte*) print_screen#8 ← phi( @16/(byte*) print_screen#9 )
  (byte*) print_char_cursor#78 ← phi( @16/(byte*) print_char_cursor#79 )
  (byte*) print_line_cursor#29 ← phi( @16/(byte*) print_line_cursor#30 )
  (signed byte*) xr#0 ← ((signed byte*)) (byte/word/signed word/dword/signed dword) 240
  (signed byte*) yr#0 ← ((signed byte*)) (byte/word/signed word/dword/signed dword) 241
  (signed byte*) zr#0 ← ((signed byte*)) (byte/word/signed word/dword/signed dword) 242
  (word*) psp1#0 ← ((word*)) (byte/word/signed word/dword/signed dword) 243
  (word*) psp2#0 ← ((word*)) (byte/word/signed word/dword/signed dword) 245
  to:@26
main: scope:[main]  from @27
  (signed byte*) zr#12 ← phi( @27/(signed byte*) zr#13 )
  (signed byte*) yr#15 ← phi( @27/(signed byte*) yr#16 )
  (signed byte*) xr#13 ← phi( @27/(signed byte*) xr#14 )
  (byte*) print_char_cursor#76 ← phi( @27/(byte*) print_char_cursor#73 )
  (byte*) print_line_cursor#25 ← phi( @27/(byte*) print_line_cursor#24 )
  (byte*) print_screen#5 ← phi( @27/(byte*) print_screen#6 )
  (word*) psp2#2 ← phi( @27/(word*) psp2#3 )
  (word*) psp1#2 ← phi( @27/(word*) psp1#3 )
  asm { sei  }
  call mulf_init 
  to:main::@1
main::@1: scope:[main]  from main
  (signed byte*) zr#11 ← phi( main/(signed byte*) zr#12 )
  (signed byte*) yr#14 ← phi( main/(signed byte*) yr#15 )
  (signed byte*) xr#12 ← phi( main/(signed byte*) xr#13 )
  (byte*) print_char_cursor#70 ← phi( main/(byte*) print_char_cursor#76 )
  (byte*) print_line_cursor#22 ← phi( main/(byte*) print_line_cursor#25 )
  (byte*) print_screen#4 ← phi( main/(byte*) print_screen#5 )
  (word*) psp2#1 ← phi( main/(word*) psp2#2 )
  (word*) psp1#1 ← phi( main/(word*) psp1#2 )
  (word~) main::$1 ← ((word)) (byte[512]) mulf_sqr1#0
  *((word*) psp1#1) ← (word~) main::$1
  (word~) main::$2 ← ((word)) (byte[512]) mulf_sqr2#0
  *((word*) psp2#1) ← (word~) main::$2
  call print_cls 
  to:main::@2
main::@2: scope:[main]  from main::@1
  (signed byte*) zr#10 ← phi( main::@1/(signed byte*) zr#11 )
  (signed byte*) yr#13 ← phi( main::@1/(signed byte*) yr#14 )
  (signed byte*) xr#11 ← phi( main::@1/(signed byte*) xr#12 )
  (byte*) print_char_cursor#47 ← phi( main::@1/(byte*) print_char_cursor#15 )
  (byte*) print_line_cursor#15 ← phi( main::@1/(byte*) print_line_cursor#4 )
  (byte*) print_line_cursor#5 ← (byte*) print_line_cursor#15
  (byte*) print_char_cursor#16 ← (byte*) print_char_cursor#47
  (signed byte/signed word/signed dword~) main::$4 ← - (byte/signed byte/word/signed word/dword/signed dword) 71
  (signed byte) do_perspective::x#0 ← (byte/signed byte/word/signed word/dword/signed dword) 57
  (signed byte) do_perspective::y#0 ← (signed byte/signed word/signed dword~) main::$4
  (signed byte) do_perspective::z#0 ← (byte/signed byte/word/signed word/dword/signed dword) 54
  call do_perspective 
  to:main::@3
main::@3: scope:[main]  from main::@2
  (byte*) print_line_cursor#16 ← phi( main::@2/(byte*) print_line_cursor#9 )
  (byte*) print_char_cursor#48 ← phi( main::@2/(byte*) print_char_cursor#31 )
  (byte*) print_char_cursor#17 ← (byte*) print_char_cursor#48
  (byte*) print_line_cursor#6 ← (byte*) print_line_cursor#16
  to:main::@return
main::@return: scope:[main]  from main::@3
  (byte*) print_char_cursor#49 ← phi( main::@3/(byte*) print_char_cursor#17 )
  (byte*) print_line_cursor#17 ← phi( main::@3/(byte*) print_line_cursor#6 )
  (byte*) print_line_cursor#7 ← (byte*) print_line_cursor#17
  (byte*) print_char_cursor#18 ← (byte*) print_char_cursor#49
  return 
  to:@return
do_perspective: scope:[do_perspective]  from main::@2
  (byte*) print_line_cursor#40 ← phi( main::@2/(byte*) print_line_cursor#5 )
  (signed byte*) zr#9 ← phi( main::@2/(signed byte*) zr#10 )
  (signed byte*) yr#12 ← phi( main::@2/(signed byte*) yr#13 )
  (signed byte*) xr#10 ← phi( main::@2/(signed byte*) xr#11 )
  (signed byte) do_perspective::z#8 ← phi( main::@2/(signed byte) do_perspective::z#0 )
  (signed byte) do_perspective::y#7 ← phi( main::@2/(signed byte) do_perspective::y#0 )
  (signed byte) do_perspective::x#3 ← phi( main::@2/(signed byte) do_perspective::x#0 )
  (byte*) print_char_cursor#71 ← phi( main::@2/(byte*) print_char_cursor#16 )
  (byte*) print_str::str#1 ← (const string) do_perspective::str
  call print_str 
  to:do_perspective::@1
do_perspective::@1: scope:[do_perspective]  from do_perspective
  (byte*) print_line_cursor#39 ← phi( do_perspective/(byte*) print_line_cursor#40 )
  (signed byte*) zr#8 ← phi( do_perspective/(signed byte*) zr#9 )
  (signed byte*) yr#11 ← phi( do_perspective/(signed byte*) yr#12 )
  (signed byte*) xr#9 ← phi( do_perspective/(signed byte*) xr#10 )
  (signed byte) do_perspective::z#7 ← phi( do_perspective/(signed byte) do_perspective::z#8 )
  (signed byte) do_perspective::y#5 ← phi( do_perspective/(signed byte) do_perspective::y#7 )
  (signed byte) do_perspective::x#1 ← phi( do_perspective/(signed byte) do_perspective::x#3 )
  (byte*) print_char_cursor#50 ← phi( do_perspective/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#19 ← (byte*) print_char_cursor#50
  (signed byte) print_sbyte::b#1 ← (signed byte) do_perspective::x#1
  call print_sbyte 
  to:do_perspective::@2
do_perspective::@2: scope:[do_perspective]  from do_perspective::@1
  (byte*) print_line_cursor#38 ← phi( do_perspective::@1/(byte*) print_line_cursor#39 )
  (signed byte*) zr#7 ← phi( do_perspective::@1/(signed byte*) zr#8 )
  (signed byte*) yr#10 ← phi( do_perspective::@1/(signed byte*) yr#11 )
  (signed byte*) xr#8 ← phi( do_perspective::@1/(signed byte*) xr#9 )
  (signed byte) do_perspective::x#8 ← phi( do_perspective::@1/(signed byte) do_perspective::x#1 )
  (signed byte) do_perspective::z#6 ← phi( do_perspective::@1/(signed byte) do_perspective::z#7 )
  (signed byte) do_perspective::y#3 ← phi( do_perspective::@1/(signed byte) do_perspective::y#5 )
  (byte*) print_char_cursor#51 ← phi( do_perspective::@1/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#20 ← (byte*) print_char_cursor#51
  (byte*) print_str::str#2 ← (const string) do_perspective::str1
  call print_str 
  to:do_perspective::@3
do_perspective::@3: scope:[do_perspective]  from do_perspective::@2
  (byte*) print_line_cursor#37 ← phi( do_perspective::@2/(byte*) print_line_cursor#38 )
  (signed byte*) zr#6 ← phi( do_perspective::@2/(signed byte*) zr#7 )
  (signed byte*) yr#9 ← phi( do_perspective::@2/(signed byte*) yr#10 )
  (signed byte*) xr#7 ← phi( do_perspective::@2/(signed byte*) xr#8 )
  (signed byte) do_perspective::x#7 ← phi( do_perspective::@2/(signed byte) do_perspective::x#8 )
  (signed byte) do_perspective::z#5 ← phi( do_perspective::@2/(signed byte) do_perspective::z#6 )
  (signed byte) do_perspective::y#1 ← phi( do_perspective::@2/(signed byte) do_perspective::y#3 )
  (byte*) print_char_cursor#52 ← phi( do_perspective::@2/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#21 ← (byte*) print_char_cursor#52
  (signed byte) print_sbyte::b#2 ← (signed byte) do_perspective::y#1
  call print_sbyte 
  to:do_perspective::@4
do_perspective::@4: scope:[do_perspective]  from do_perspective::@3
  (byte*) print_line_cursor#36 ← phi( do_perspective::@3/(byte*) print_line_cursor#37 )
  (signed byte*) zr#5 ← phi( do_perspective::@3/(signed byte*) zr#6 )
  (signed byte*) yr#8 ← phi( do_perspective::@3/(signed byte*) yr#9 )
  (signed byte*) xr#6 ← phi( do_perspective::@3/(signed byte*) xr#7 )
  (signed byte) do_perspective::y#8 ← phi( do_perspective::@3/(signed byte) do_perspective::y#1 )
  (signed byte) do_perspective::x#6 ← phi( do_perspective::@3/(signed byte) do_perspective::x#7 )
  (signed byte) do_perspective::z#3 ← phi( do_perspective::@3/(signed byte) do_perspective::z#5 )
  (byte*) print_char_cursor#53 ← phi( do_perspective::@3/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#22 ← (byte*) print_char_cursor#53
  (byte*) print_str::str#3 ← (const string) do_perspective::str2
  call print_str 
  to:do_perspective::@5
do_perspective::@5: scope:[do_perspective]  from do_perspective::@4
  (byte*) print_line_cursor#35 ← phi( do_perspective::@4/(byte*) print_line_cursor#36 )
  (signed byte*) zr#4 ← phi( do_perspective::@4/(signed byte*) zr#5 )
  (signed byte*) yr#7 ← phi( do_perspective::@4/(signed byte*) yr#8 )
  (signed byte*) xr#5 ← phi( do_perspective::@4/(signed byte*) xr#6 )
  (signed byte) do_perspective::y#6 ← phi( do_perspective::@4/(signed byte) do_perspective::y#8 )
  (signed byte) do_perspective::x#5 ← phi( do_perspective::@4/(signed byte) do_perspective::x#6 )
  (signed byte) do_perspective::z#1 ← phi( do_perspective::@4/(signed byte) do_perspective::z#3 )
  (byte*) print_char_cursor#54 ← phi( do_perspective::@4/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#23 ← (byte*) print_char_cursor#54
  (signed byte) print_sbyte::b#3 ← (signed byte) do_perspective::z#1
  call print_sbyte 
  to:do_perspective::@6
do_perspective::@6: scope:[do_perspective]  from do_perspective::@5
  (byte*) print_line_cursor#34 ← phi( do_perspective::@5/(byte*) print_line_cursor#35 )
  (signed byte*) zr#3 ← phi( do_perspective::@5/(signed byte*) zr#4 )
  (signed byte*) yr#5 ← phi( do_perspective::@5/(signed byte*) yr#7 )
  (signed byte*) xr#4 ← phi( do_perspective::@5/(signed byte*) xr#5 )
  (signed byte) do_perspective::z#4 ← phi( do_perspective::@5/(signed byte) do_perspective::z#1 )
  (signed byte) do_perspective::y#4 ← phi( do_perspective::@5/(signed byte) do_perspective::y#6 )
  (signed byte) do_perspective::x#4 ← phi( do_perspective::@5/(signed byte) do_perspective::x#5 )
  (byte*) print_char_cursor#55 ← phi( do_perspective::@5/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#24 ← (byte*) print_char_cursor#55
  (byte*) print_str::str#4 ← (const string) do_perspective::str3
  call print_str 
  to:do_perspective::@7
do_perspective::@7: scope:[do_perspective]  from do_perspective::@6
  (byte*) print_line_cursor#33 ← phi( do_perspective::@6/(byte*) print_line_cursor#34 )
  (signed byte*) zr#2 ← phi( do_perspective::@6/(signed byte*) zr#3 )
  (signed byte*) yr#4 ← phi( do_perspective::@6/(signed byte*) yr#5 )
  (signed byte*) xr#3 ← phi( do_perspective::@6/(signed byte*) xr#4 )
  (signed byte) do_perspective::z#2 ← phi( do_perspective::@6/(signed byte) do_perspective::z#4 )
  (signed byte) do_perspective::y#2 ← phi( do_perspective::@6/(signed byte) do_perspective::y#4 )
  (signed byte) do_perspective::x#2 ← phi( do_perspective::@6/(signed byte) do_perspective::x#4 )
  (byte*) print_char_cursor#56 ← phi( do_perspective::@6/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#25 ← (byte*) print_char_cursor#56
  (signed byte) perspective::x#0 ← (signed byte) do_perspective::x#2
  (signed byte) perspective::y#0 ← (signed byte) do_perspective::y#2
  (signed byte) perspective::z#0 ← (signed byte) do_perspective::z#2
  call perspective 
  to:do_perspective::@8
do_perspective::@8: scope:[do_perspective]  from do_perspective::@7
  (byte*) print_line_cursor#32 ← phi( do_perspective::@7/(byte*) print_line_cursor#33 )
  (signed byte*) yr#6 ← phi( do_perspective::@7/(signed byte*) yr#4 )
  (byte*) print_char_cursor#72 ← phi( do_perspective::@7/(byte*) print_char_cursor#25 )
  (signed byte*) xr#1 ← phi( do_perspective::@7/(signed byte*) xr#3 )
  (byte~) do_perspective::$8 ← ((byte)) *((signed byte*) xr#1)
  (byte) print_byte::b#1 ← (byte~) do_perspective::$8
  call print_byte 
  to:do_perspective::@9
do_perspective::@9: scope:[do_perspective]  from do_perspective::@8
  (byte*) print_line_cursor#31 ← phi( do_perspective::@8/(byte*) print_line_cursor#32 )
  (signed byte*) yr#3 ← phi( do_perspective::@8/(signed byte*) yr#6 )
  (byte*) print_char_cursor#57 ← phi( do_perspective::@8/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#26 ← (byte*) print_char_cursor#57
  (byte*) print_str::str#5 ← (const string) do_perspective::str4
  call print_str 
  to:do_perspective::@10
do_perspective::@10: scope:[do_perspective]  from do_perspective::@9
  (byte*) print_line_cursor#28 ← phi( do_perspective::@9/(byte*) print_line_cursor#31 )
  (signed byte*) yr#1 ← phi( do_perspective::@9/(signed byte*) yr#3 )
  (byte*) print_char_cursor#58 ← phi( do_perspective::@9/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#27 ← (byte*) print_char_cursor#58
  (byte~) do_perspective::$11 ← ((byte)) *((signed byte*) yr#1)
  (byte) print_byte::b#2 ← (byte~) do_perspective::$11
  call print_byte 
  to:do_perspective::@11
do_perspective::@11: scope:[do_perspective]  from do_perspective::@10
  (byte*) print_line_cursor#26 ← phi( do_perspective::@10/(byte*) print_line_cursor#28 )
  (byte*) print_char_cursor#59 ← phi( do_perspective::@10/(byte*) print_char_cursor#11 )
  (byte*) print_char_cursor#28 ← (byte*) print_char_cursor#59
  (byte*) print_str::str#6 ← (const string) do_perspective::str5
  call print_str 
  to:do_perspective::@12
do_perspective::@12: scope:[do_perspective]  from do_perspective::@11
  (byte*) print_line_cursor#23 ← phi( do_perspective::@11/(byte*) print_line_cursor#26 )
  (byte*) print_char_cursor#60 ← phi( do_perspective::@11/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#29 ← (byte*) print_char_cursor#60
  call print_ln 
  to:do_perspective::@13
do_perspective::@13: scope:[do_perspective]  from do_perspective::@12
  (byte*) print_char_cursor#61 ← phi( do_perspective::@12/(byte*) print_char_cursor#4 )
  (byte*) print_line_cursor#18 ← phi( do_perspective::@12/(byte*) print_line_cursor#2 )
  (byte*) print_line_cursor#8 ← (byte*) print_line_cursor#18
  (byte*) print_char_cursor#30 ← (byte*) print_char_cursor#61
  to:do_perspective::@return
do_perspective::@return: scope:[do_perspective]  from do_perspective::@13
  (byte*) print_line_cursor#19 ← phi( do_perspective::@13/(byte*) print_line_cursor#8 )
  (byte*) print_char_cursor#62 ← phi( do_perspective::@13/(byte*) print_char_cursor#30 )
  (byte*) print_char_cursor#31 ← (byte*) print_char_cursor#62
  (byte*) print_line_cursor#9 ← (byte*) print_line_cursor#19
  return 
  to:@return
perspective: scope:[perspective]  from do_perspective::@7
  (signed byte*) zr#1 ← phi( do_perspective::@7/(signed byte*) zr#2 )
  (signed byte) perspective::z#1 ← phi( do_perspective::@7/(signed byte) perspective::z#0 )
  (signed byte*) yr#2 ← phi( do_perspective::@7/(signed byte*) yr#4 )
  (signed byte) perspective::y#1 ← phi( do_perspective::@7/(signed byte) perspective::y#0 )
  (signed byte*) xr#2 ← phi( do_perspective::@7/(signed byte*) xr#3 )
  (signed byte) perspective::x#1 ← phi( do_perspective::@7/(signed byte) perspective::x#0 )
  *((signed byte*) xr#2) ← (signed byte) perspective::x#1
  *((signed byte*) yr#2) ← (signed byte) perspective::y#1
  *((signed byte*) zr#1) ← (signed byte) perspective::z#1
  asm { ldazr staPP+1 PP: ldaPERSP_Z stapsp1 eor#$ff stapsp2 clc ldyyr lda(psp1),y sbc(psp2),y adc#$80 stayr clc ldyxr lda(psp1),y sbc(psp2),y adc#$80 staxr  }
  to:perspective::@return
perspective::@return: scope:[perspective]  from perspective
  return 
  to:@return
@26: scope:[]  from @23
  (signed byte*) zr#14 ← phi( @23/(signed byte*) zr#0 )
  (signed byte*) yr#17 ← phi( @23/(signed byte*) yr#0 )
  (signed byte*) xr#15 ← phi( @23/(signed byte*) xr#0 )
  (byte*) print_screen#7 ← phi( @23/(byte*) print_screen#8 )
  (word*) psp2#4 ← phi( @23/(word*) psp2#0 )
  (word*) psp1#4 ← phi( @23/(word*) psp1#0 )
  (byte*) print_char_cursor#77 ← phi( @23/(byte*) print_char_cursor#78 )
  (byte*) print_line_cursor#27 ← phi( @23/(byte*) print_line_cursor#29 )
  (byte[512]) mulf_sqr1#0 ← { fill( 512, 0) }
  (byte[512]) mulf_sqr2#0 ← { fill( 512, 0) }
  to:@27
mulf_init: scope:[mulf_init]  from main
  (signed word) mulf_init::sqr#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  (signed word) mulf_init::add#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1
  (byte) mulf_init::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
  to:mulf_init::@1
mulf_init::@1: scope:[mulf_init]  from mulf_init mulf_init::@1
  (signed word) mulf_init::add#2 ← phi( mulf_init/(signed word) mulf_init::add#0 mulf_init::@1/(signed word) mulf_init::add#1 )
  (byte) mulf_init::i#2 ← phi( mulf_init/(byte) mulf_init::i#0 mulf_init::@1/(byte) mulf_init::i#1 )
  (signed word) mulf_init::sqr#2 ← phi( mulf_init/(signed word) mulf_init::sqr#0 mulf_init::@1/(signed word) mulf_init::sqr#1 )
  (byte~) mulf_init::$0 ← > (signed word) mulf_init::sqr#2
  (byte) mulf_init::val#0 ← (byte~) mulf_init::$0
  *((byte[512]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$1 ← (byte[512]) mulf_sqr1#0 + (word/signed word/dword/signed dword) 256
  *((byte*~) mulf_init::$1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0
  (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2
  *((byte[512]) mulf_sqr1#0 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$3 ← (byte[512]) mulf_sqr1#0 + (word/signed word/dword/signed dword) 256
  (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2
  *((byte*~) mulf_init::$3 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0
  (byte/signed word/word/dword/signed dword~) mulf_init::$5 ← (byte) mulf_init::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte[512]) mulf_sqr2#0 + (byte/signed word/word/dword/signed dword~) mulf_init::$5) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$6 ← (byte[512]) mulf_sqr2#0 + (word/signed word/dword/signed dword) 256
  (byte/signed word/word/dword/signed dword~) mulf_init::$7 ← (byte) mulf_init::i#2 + (byte/signed byte/word/signed word/dword/signed dword) 1
  *((byte*~) mulf_init::$6 + (byte/signed word/word/dword/signed dword~) mulf_init::$7) ← (byte) mulf_init::val#0
  (byte/signed word/word/dword/signed dword~) mulf_init::$8 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2
  *((byte[512]) mulf_sqr2#0 + (byte/signed word/word/dword/signed dword~) mulf_init::$8) ← (byte) mulf_init::val#0
  (byte*~) mulf_init::$9 ← (byte[512]) mulf_sqr2#0 + (word/signed word/dword/signed dword) 256
  (byte/signed word/word/dword/signed dword~) mulf_init::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2
  *((byte*~) mulf_init::$9 + (byte/signed word/word/dword/signed dword~) mulf_init::$10) ← (byte) mulf_init::val#0
  (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2
  (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (byte/signed byte/word/signed word/dword/signed dword) 2
  (byte) mulf_init::i#1 ← (byte) mulf_init::i#2 + rangenext(0,128)
  (bool~) mulf_init::$11 ← (byte) mulf_init::i#1 != rangelast(0,128)
  if((bool~) mulf_init::$11) goto mulf_init::@1
  to:mulf_init::@return
mulf_init::@return: scope:[mulf_init]  from mulf_init::@1
  return 
  to:@return
@27: scope:[]  from @26
  (signed byte*) zr#13 ← phi( @26/(signed byte*) zr#14 )
  (signed byte*) yr#16 ← phi( @26/(signed byte*) yr#17 )
  (signed byte*) xr#14 ← phi( @26/(signed byte*) xr#15 )
  (byte*) print_screen#6 ← phi( @26/(byte*) print_screen#7 )
  (word*) psp2#3 ← phi( @26/(word*) psp2#4 )
  (word*) psp1#3 ← phi( @26/(word*) psp1#4 )
  (byte*) print_char_cursor#73 ← phi( @26/(byte*) print_char_cursor#77 )
  (byte*) print_line_cursor#24 ← phi( @26/(byte*) print_line_cursor#27 )
  (signed byte*) PERSP_Z#0 ← ((signed byte*)) (word/signed word/dword/signed dword) 9216
  kickasm(location (signed byte*) PERSP_Z#0) {{ {
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}
 }}
  call main 
  to:@28
@28: scope:[]  from @27
  (byte*) print_char_cursor#63 ← phi( @27/(byte*) print_char_cursor#18 )
  (byte*) print_line_cursor#20 ← phi( @27/(byte*) print_line_cursor#7 )
  (byte*) print_line_cursor#10 ← (byte*) print_line_cursor#20
  (byte*) print_char_cursor#32 ← (byte*) print_char_cursor#63
  to:@end
@end: scope:[]  from @28

SYMBOL TABLE SSA
(const string) $0 = (string) "0123456789abcdef"
(label) @16
(label) @23
(label) @26
(label) @27
(label) @28
(label) @4
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL#0
(byte*) BGCOL1
(byte*) BGCOL1#0
(byte*) BGCOL2
(byte*) BGCOL2#0
(byte*) BGCOL3
(byte*) BGCOL3#0
(byte*) BGCOL4
(byte*) BGCOL4#0
(byte) BLACK
(byte) BLACK#0
(byte) BLUE
(byte) BLUE#0
(byte*) BORDERCOL
(byte*) BORDERCOL#0
(byte) BROWN
(byte) BROWN#0
(byte*) CHARGEN
(byte*) CHARGEN#0
(byte*) CIA1_INTERRUPT
(byte*) CIA1_INTERRUPT#0
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_A#0
(byte*) CIA1_PORT_A_DDR
(byte*) CIA1_PORT_A_DDR#0
(byte*) CIA1_PORT_B
(byte*) CIA1_PORT_B#0
(byte*) CIA1_PORT_B_DDR
(byte*) CIA1_PORT_B_DDR#0
(byte*) CIA2_INTERRUPT
(byte*) CIA2_INTERRUPT#0
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A#0
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_A_DDR#0
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B#0
(byte*) CIA2_PORT_B_DDR
(byte*) CIA2_PORT_B_DDR#0
(byte) CIA_INTERRUPT_CLEAR
(byte) CIA_INTERRUPT_CLEAR#0
(byte*) COLS
(byte*) COLS#0
(byte) CYAN
(byte) CYAN#0
(byte*) D011
(byte*) D011#0
(byte*) D016
(byte*) D016#0
(byte*) D018
(byte*) D018#0
(byte) DARK_GREY
(byte) DARK_GREY#0
(byte) GREEN
(byte) GREEN#0
(byte) GREY
(byte) GREY#0
(void()**) HARDWARE_IRQ
(void()**) HARDWARE_IRQ#0
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_BG#0
(byte) IRQ_COLLISION_SPRITE
(byte) IRQ_COLLISION_SPRITE#0
(byte*) IRQ_ENABLE
(byte*) IRQ_ENABLE#0
(byte) IRQ_LIGHTPEN
(byte) IRQ_LIGHTPEN#0
(byte) IRQ_RASTER
(byte) IRQ_RASTER#0
(byte*) IRQ_STATUS
(byte*) IRQ_STATUS#0
(void()**) KERNEL_IRQ
(void()**) KERNEL_IRQ#0
(byte*) LIGHTPEN_X
(byte*) LIGHTPEN_X#0
(byte*) LIGHTPEN_Y
(byte*) LIGHTPEN_Y#0
(byte) LIGHT_BLUE
(byte) LIGHT_BLUE#0
(byte) LIGHT_GREEN
(byte) LIGHT_GREEN#0
(byte) LIGHT_GREY
(byte) LIGHT_GREY#0
(byte) ORANGE
(byte) ORANGE#0
(signed byte*) PERSP_Z
(signed byte*) PERSP_Z#0
(byte) PINK
(byte) PINK#0
(byte*) PROCPORT
(byte*) PROCPORT#0
(byte) PROCPORT_BASIC_KERNEL_IO
(byte) PROCPORT_BASIC_KERNEL_IO#0
(byte*) PROCPORT_DDR
(byte*) PROCPORT_DDR#0
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_DDR_MEMORY_MASK#0
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_KERNEL_IO#0
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_ALL#0
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_CHARROM#0
(byte) PROCPORT_RAM_IO
(byte) PROCPORT_RAM_IO#0
(byte) PURPLE
(byte) PURPLE#0
(byte*) RASTER
(byte*) RASTER#0
(byte) RED
(byte) RED#0
(byte*) SPRITES_COLS
(byte*) SPRITES_COLS#0
(byte*) SPRITES_ENABLE
(byte*) SPRITES_ENABLE#0
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_X#0
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_EXPAND_Y#0
(byte*) SPRITES_MC
(byte*) SPRITES_MC#0
(byte*) SPRITES_MC1
(byte*) SPRITES_MC1#0
(byte*) SPRITES_MC2
(byte*) SPRITES_MC2#0
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_PRIORITY#0
(byte*) SPRITES_XMSB
(byte*) SPRITES_XMSB#0
(byte*) SPRITES_XPOS
(byte*) SPRITES_XPOS#0
(byte*) SPRITES_YPOS
(byte*) SPRITES_YPOS#0
(word) SPRITE_PTRS
(word) SPRITE_PTRS#0
(byte) VIC_BMM
(byte) VIC_BMM#0
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL#0
(byte*) VIC_CONTROL2
(byte*) VIC_CONTROL2#0
(byte) VIC_CSEL
(byte) VIC_CSEL#0
(byte) VIC_DEN
(byte) VIC_DEN#0
(byte) VIC_ECM
(byte) VIC_ECM#0
(byte) VIC_MCM
(byte) VIC_MCM#0
(byte*) VIC_MEMORY
(byte*) VIC_MEMORY#0
(byte) VIC_RSEL
(byte) VIC_RSEL#0
(byte) VIC_RST8
(byte) VIC_RST8#0
(byte) WHITE
(byte) WHITE#0
(byte) YELLOW
(byte) YELLOW#0
(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
(byte~) do_perspective::$11
(byte~) do_perspective::$8
(label) do_perspective::@1
(label) do_perspective::@10
(label) do_perspective::@11
(label) do_perspective::@12
(label) do_perspective::@13
(label) do_perspective::@2
(label) do_perspective::@3
(label) do_perspective::@4
(label) do_perspective::@5
(label) do_perspective::@6
(label) do_perspective::@7
(label) do_perspective::@8
(label) do_perspective::@9
(label) do_perspective::@return
(const string) do_perspective::str = (string) "(@"
(const string) do_perspective::str1 = (string) ",@"
(const string) do_perspective::str2 = (string) ",@"
(const string) do_perspective::str3 = (string) ") -> (@"
(const string) do_perspective::str4 = (string) ",@"
(const string) do_perspective::str5 = (string) ")@"
(signed byte) do_perspective::x
(signed byte) do_perspective::x#0
(signed byte) do_perspective::x#1
(signed byte) do_perspective::x#2
(signed byte) do_perspective::x#3
(signed byte) do_perspective::x#4
(signed byte) do_perspective::x#5
(signed byte) do_perspective::x#6
(signed byte) do_perspective::x#7
(signed byte) do_perspective::x#8
(signed byte) do_perspective::y
(signed byte) do_perspective::y#0
(signed byte) do_perspective::y#1
(signed byte) do_perspective::y#2
(signed byte) do_perspective::y#3
(signed byte) do_perspective::y#4
(signed byte) do_perspective::y#5
(signed byte) do_perspective::y#6
(signed byte) do_perspective::y#7
(signed byte) do_perspective::y#8
(signed byte) do_perspective::z
(signed byte) do_perspective::z#0
(signed byte) do_perspective::z#1
(signed byte) do_perspective::z#2
(signed byte) do_perspective::z#3
(signed byte) do_perspective::z#4
(signed byte) do_perspective::z#5
(signed byte) do_perspective::z#6
(signed byte) do_perspective::z#7
(signed byte) do_perspective::z#8
(void()) main()
(word~) main::$1
(word~) main::$2
(signed byte/signed word/signed dword~) main::$4
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(void()) mulf_init()
(byte~) mulf_init::$0
(byte*~) mulf_init::$1
(byte/signed word/word/dword/signed dword~) mulf_init::$10
(bool~) mulf_init::$11
(byte~) mulf_init::$2
(byte*~) mulf_init::$3
(byte~) mulf_init::$4
(byte/signed word/word/dword/signed dword~) mulf_init::$5
(byte*~) mulf_init::$6
(byte/signed word/word/dword/signed dword~) mulf_init::$7
(byte/signed word/word/dword/signed dword~) mulf_init::$8
(byte*~) mulf_init::$9
(label) mulf_init::@1
(label) mulf_init::@return
(signed word) mulf_init::add
(signed word) mulf_init::add#0
(signed word) mulf_init::add#1
(signed word) mulf_init::add#2
(byte) mulf_init::i
(byte) mulf_init::i#0
(byte) mulf_init::i#1
(byte) mulf_init::i#2
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#0
(signed word) mulf_init::sqr#1
(signed word) mulf_init::sqr#2
(byte) mulf_init::val
(byte) mulf_init::val#0
(byte[512]) mulf_sqr1
(byte[512]) mulf_sqr1#0
(byte[512]) mulf_sqr2
(byte[512]) mulf_sqr2#0
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
(label) perspective::@return
(signed byte) perspective::x
(signed byte) perspective::x#0
(signed byte) perspective::x#1
(signed byte) perspective::y
(signed byte) perspective::y#0
(signed byte) perspective::y#1
(signed byte) perspective::z
(signed byte) perspective::z#0
(signed byte) perspective::z#1
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0
(byte~) print_byte::$2
(label) print_byte::@1
(label) print_byte::@2
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0
(byte) print_byte::b#1
(byte) print_byte::b#2
(byte) print_byte::b#3
(byte) print_byte::b#4
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0
(byte) print_char::ch#1
(byte) print_char::ch#2
(byte) print_char::ch#3
(byte) print_char::ch#4
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#40
(byte*) print_char_cursor#41
(byte*) print_char_cursor#42
(byte*) print_char_cursor#43
(byte*) print_char_cursor#44
(byte*) print_char_cursor#45
(byte*) print_char_cursor#46
(byte*) print_char_cursor#47
(byte*) print_char_cursor#48
(byte*) print_char_cursor#49
(byte*) print_char_cursor#5
(byte*) print_char_cursor#50
(byte*) print_char_cursor#51
(byte*) print_char_cursor#52
(byte*) print_char_cursor#53
(byte*) print_char_cursor#54
(byte*) print_char_cursor#55
(byte*) print_char_cursor#56
(byte*) print_char_cursor#57
(byte*) print_char_cursor#58
(byte*) print_char_cursor#59
(byte*) print_char_cursor#6
(byte*) print_char_cursor#60
(byte*) print_char_cursor#61
(byte*) print_char_cursor#62
(byte*) print_char_cursor#63
(byte*) print_char_cursor#64
(byte*) print_char_cursor#65
(byte*) print_char_cursor#66
(byte*) print_char_cursor#67
(byte*) print_char_cursor#68
(byte*) print_char_cursor#69
(byte*) print_char_cursor#7
(byte*) print_char_cursor#70
(byte*) print_char_cursor#71
(byte*) print_char_cursor#72
(byte*) print_char_cursor#73
(byte*) print_char_cursor#74
(byte*) print_char_cursor#75
(byte*) print_char_cursor#76
(byte*) print_char_cursor#77
(byte*) print_char_cursor#78
(byte*) print_char_cursor#79
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(void()) print_cls()
(byte*~) print_cls::$0
(bool~) print_cls::$1
(label) print_cls::@1
(label) print_cls::@2
(label) print_cls::@return
(byte*) print_cls::sc
(byte*) print_cls::sc#0
(byte*) print_cls::sc#1
(byte*) print_cls::sc#2
(byte[]) print_hextab
(byte[]) print_hextab#0
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_line_cursor#1
(byte*) print_line_cursor#10
(byte*) print_line_cursor#11
(byte*) print_line_cursor#12
(byte*) print_line_cursor#13
(byte*) print_line_cursor#14
(byte*) print_line_cursor#15
(byte*) print_line_cursor#16
(byte*) print_line_cursor#17
(byte*) print_line_cursor#18
(byte*) print_line_cursor#19
(byte*) print_line_cursor#2
(byte*) print_line_cursor#20
(byte*) print_line_cursor#21
(byte*) print_line_cursor#22
(byte*) print_line_cursor#23
(byte*) print_line_cursor#24
(byte*) print_line_cursor#25
(byte*) print_line_cursor#26
(byte*) print_line_cursor#27
(byte*) print_line_cursor#28
(byte*) print_line_cursor#29
(byte*) print_line_cursor#3
(byte*) print_line_cursor#30
(byte*) print_line_cursor#31
(byte*) print_line_cursor#32
(byte*) print_line_cursor#33
(byte*) print_line_cursor#34
(byte*) print_line_cursor#35
(byte*) print_line_cursor#36
(byte*) print_line_cursor#37
(byte*) print_line_cursor#38
(byte*) print_line_cursor#39
(byte*) print_line_cursor#4
(byte*) print_line_cursor#40
(byte*) print_line_cursor#5
(byte*) print_line_cursor#6
(byte*) print_line_cursor#7
(byte*) print_line_cursor#8
(byte*) print_line_cursor#9
(void()) print_ln()
(byte*~) print_ln::$0
(bool~) print_ln::$1
(label) print_ln::@1
(label) print_ln::@2
(label) print_ln::@return
(void()) print_sbyte((signed byte) print_sbyte::b)
(bool~) print_sbyte::$0
(signed byte~) print_sbyte::$3
(byte~) print_sbyte::$4
(label) print_sbyte::@1
(label) print_sbyte::@2
(label) print_sbyte::@3
(label) print_sbyte::@5
(label) print_sbyte::@6
(label) print_sbyte::@7
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0
(signed byte) print_sbyte::b#1
(signed byte) print_sbyte::b#2
(signed byte) print_sbyte::b#3
(signed byte) print_sbyte::b#4
(signed byte) print_sbyte::b#5
(signed byte) print_sbyte::b#6
(signed byte) print_sbyte::b#7
(signed byte) print_sbyte::b#8
(signed byte) print_sbyte::b#9
(byte*) print_screen
(byte*) print_screen#0
(byte*) print_screen#1
(byte*) print_screen#2
(byte*) print_screen#3
(byte*) print_screen#4
(byte*) print_screen#5
(byte*) print_screen#6
(byte*) print_screen#7
(byte*) print_screen#8
(byte*) print_screen#9
(void()) print_str((byte*) print_str::str)
(bool~) print_str::$0
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0
(byte*) print_str::str#1
(byte*) print_str::str#2
(byte*) print_str::str#3
(byte*) print_str::str#4
(byte*) print_str::str#5
(byte*) print_str::str#6
(byte*) print_str::str#7
(byte*) print_str::str#8
(byte*) print_str::str#9
(word*) psp1
(word*) psp1#0
(word*) psp1#1
(word*) psp1#2
(word*) psp1#3
(word*) psp1#4
(word*) psp2
(word*) psp2#0
(word*) psp2#1
(word*) psp2#2
(word*) psp2#3
(word*) psp2#4
(signed byte*) xr
(signed byte*) xr#0
(signed byte*) xr#1
(signed byte*) xr#10
(signed byte*) xr#11
(signed byte*) xr#12
(signed byte*) xr#13
(signed byte*) xr#14
(signed byte*) xr#15
(signed byte*) xr#2
(signed byte*) xr#3
(signed byte*) xr#4
(signed byte*) xr#5
(signed byte*) xr#6
(signed byte*) xr#7
(signed byte*) xr#8
(signed byte*) xr#9
(signed byte*) yr
(signed byte*) yr#0
(signed byte*) yr#1
(signed byte*) yr#10
(signed byte*) yr#11
(signed byte*) yr#12
(signed byte*) yr#13
(signed byte*) yr#14
(signed byte*) yr#15
(signed byte*) yr#16
(signed byte*) yr#17
(signed byte*) yr#2
(signed byte*) yr#3
(signed byte*) yr#4
(signed byte*) yr#5
(signed byte*) yr#6
(signed byte*) yr#7
(signed byte*) yr#8
(signed byte*) yr#9
(signed byte*) zr
(signed byte*) zr#0
(signed byte*) zr#1
(signed byte*) zr#10
(signed byte*) zr#11
(signed byte*) zr#12
(signed byte*) zr#13
(signed byte*) zr#14
(signed byte*) zr#2
(signed byte*) zr#3
(signed byte*) zr#4
(signed byte*) zr#5
(signed byte*) zr#6
(signed byte*) zr#7
(signed byte*) zr#8
(signed byte*) zr#9

Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#30 (byte*) print_char_cursor#79 (byte*) print_screen#9 (byte*) print_line_cursor#29 (byte*) print_char_cursor#78 (byte*) print_screen#8 (byte*) print_line_cursor#27 (byte*) print_char_cursor#77 (byte*) print_screen#7 (byte*) print_line_cursor#24 (byte*) print_char_cursor#73 (byte*) print_screen#6 
Alias (byte*) print_str::str#7 = (byte*) print_str::str#8 
Alias (byte*) print_char_cursor#2 = (byte*) print_char_cursor#33 (byte*) print_char_cursor#64 (byte*) print_char_cursor#34 
Alias (byte*) print_line_cursor#1 = (byte*~) print_ln::$0 (byte*) print_line_cursor#12 (byte*) print_char_cursor#3 (byte*) print_line_cursor#13 (byte*) print_char_cursor#36 (byte*) print_line_cursor#2 (byte*) print_char_cursor#4 
Alias (byte*) print_char_cursor#66 = (byte*) print_char_cursor#75 (byte*) print_char_cursor#67 
Alias (signed byte) print_sbyte::b#4 = (signed byte) print_sbyte::b#7 (signed byte) print_sbyte::b#5 (signed byte) print_sbyte::b#9 (signed byte) print_sbyte::b#8 
Alias (byte*) print_char_cursor#37 = (byte*) print_char_cursor#5 
Alias (signed byte) print_sbyte::b#0 = (signed byte~) print_sbyte::$3 
Alias (byte*) print_char_cursor#38 = (byte*) print_char_cursor#6 
Alias (byte) print_byte::b#0 = (byte~) print_sbyte::$4 
Alias (byte*) print_char_cursor#39 = (byte*) print_char_cursor#7 (byte*) print_char_cursor#40 (byte*) print_char_cursor#8 
Alias (byte) print_byte::b#3 = (byte) print_byte::b#4 
Alias (byte*) print_char_cursor#41 = (byte*) print_char_cursor#9 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#42 (byte*) print_char_cursor#43 (byte*) print_char_cursor#11 
Alias (byte*) print_char_cursor#12 = (byte*) print_char_cursor#45 (byte*) print_char_cursor#13 
Alias (byte*) print_line_cursor#14 = (byte*) print_screen#3 (byte*) print_screen#2 (byte*) print_line_cursor#3 (byte*) print_char_cursor#14 (byte*) print_char_cursor#46 (byte*) print_line_cursor#4 (byte*) print_char_cursor#15 
Alias (word*) psp1#1 = (word*) psp1#2 
Alias (word*) psp2#1 = (word*) psp2#2 
Alias (byte*) print_screen#4 = (byte*) print_screen#5 
Alias (byte*) print_line_cursor#22 = (byte*) print_line_cursor#25 
Alias (byte*) print_char_cursor#70 = (byte*) print_char_cursor#76 
Alias (signed byte*) xr#11 = (signed byte*) xr#12 (signed byte*) xr#13 
Alias (signed byte*) yr#13 = (signed byte*) yr#14 (signed byte*) yr#15 
Alias (signed byte*) zr#10 = (signed byte*) zr#11 (signed byte*) zr#12 
Alias (byte*) print_line_cursor#15 = (byte*) print_line_cursor#5 
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#47 
Alias (signed byte) do_perspective::y#0 = (signed byte/signed word/signed dword~) main::$4 
Alias (byte*) print_char_cursor#17 = (byte*) print_char_cursor#48 (byte*) print_char_cursor#49 (byte*) print_char_cursor#18 
Alias (byte*) print_line_cursor#16 = (byte*) print_line_cursor#6 (byte*) print_line_cursor#17 (byte*) print_line_cursor#7 
Alias (signed byte) do_perspective::x#1 = (signed byte) do_perspective::x#3 (signed byte) do_perspective::x#8 (signed byte) do_perspective::x#7 (signed byte) do_perspective::x#6 (signed byte) do_perspective::x#5 (signed byte) do_perspective::x#4 (signed byte) do_perspective::x#2 
Alias (signed byte) do_perspective::y#1 = (signed byte) do_perspective::y#5 (signed byte) do_perspective::y#7 (signed byte) do_perspective::y#3 (signed byte) do_perspective::y#8 (signed byte) do_perspective::y#6 (signed byte) do_perspective::y#4 (signed byte) do_perspective::y#2 
Alias (signed byte) do_perspective::z#1 = (signed byte) do_perspective::z#7 (signed byte) do_perspective::z#8 (signed byte) do_perspective::z#6 (signed byte) do_perspective::z#5 (signed byte) do_perspective::z#3 (signed byte) do_perspective::z#4 (signed byte) do_perspective::z#2 
Alias (signed byte*) xr#1 = (signed byte*) xr#9 (signed byte*) xr#10 (signed byte*) xr#8 (signed byte*) xr#7 (signed byte*) xr#6 (signed byte*) xr#5 (signed byte*) xr#4 (signed byte*) xr#3 
Alias (signed byte*) yr#1 = (signed byte*) yr#11 (signed byte*) yr#12 (signed byte*) yr#10 (signed byte*) yr#9 (signed byte*) yr#8 (signed byte*) yr#7 (signed byte*) yr#5 (signed byte*) yr#4 (signed byte*) yr#6 (signed byte*) yr#3 
Alias (signed byte*) zr#2 = (signed byte*) zr#8 (signed byte*) zr#9 (signed byte*) zr#7 (signed byte*) zr#6 (signed byte*) zr#5 (signed byte*) zr#4 (signed byte*) zr#3 
Alias (byte*) print_line_cursor#23 = (byte*) print_line_cursor#39 (byte*) print_line_cursor#40 (byte*) print_line_cursor#38 (byte*) print_line_cursor#37 (byte*) print_line_cursor#36 (byte*) print_line_cursor#35 (byte*) print_line_cursor#34 (byte*) print_line_cursor#33 (byte*) print_line_cursor#32 (byte*) print_line_cursor#31 (byte*) print_line_cursor#28 (byte*) print_line_cursor#26 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#50 
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#51 
Alias (byte*) print_char_cursor#21 = (byte*) print_char_cursor#52 
Alias (byte*) print_char_cursor#22 = (byte*) print_char_cursor#53 
Alias (byte*) print_char_cursor#23 = (byte*) print_char_cursor#54 
Alias (byte*) print_char_cursor#24 = (byte*) print_char_cursor#55 
Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#56 (byte*) print_char_cursor#72 
Alias (byte) print_byte::b#1 = (byte~) do_perspective::$8 
Alias (byte*) print_char_cursor#26 = (byte*) print_char_cursor#57 
Alias (byte*) print_char_cursor#27 = (byte*) print_char_cursor#58 
Alias (byte) print_byte::b#2 = (byte~) do_perspective::$11 
Alias (byte*) print_char_cursor#28 = (byte*) print_char_cursor#59 
Alias (byte*) print_char_cursor#29 = (byte*) print_char_cursor#60 
Alias (byte*) print_line_cursor#18 = (byte*) print_line_cursor#8 (byte*) print_line_cursor#19 (byte*) print_line_cursor#9 
Alias (byte*) print_char_cursor#30 = (byte*) print_char_cursor#61 (byte*) print_char_cursor#62 (byte*) print_char_cursor#31 
Alias (word*) psp1#0 = (word*) psp1#4 (word*) psp1#3 
Alias (word*) psp2#0 = (word*) psp2#4 (word*) psp2#3 
Alias (signed byte*) xr#0 = (signed byte*) xr#15 (signed byte*) xr#14 
Alias (signed byte*) yr#0 = (signed byte*) yr#17 (signed byte*) yr#16 
Alias (signed byte*) zr#0 = (signed byte*) zr#14 (signed byte*) zr#13 
Alias (byte) mulf_init::val#0 = (byte~) mulf_init::$0 
Alias (byte*) print_line_cursor#10 = (byte*) print_line_cursor#20 
Alias (byte*) print_char_cursor#32 = (byte*) print_char_cursor#63 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) print_char_cursor#35
Self Phi Eliminated (byte*) print_line_cursor#14
Successful SSA optimization Pass2SelfPhiElimination
Redundant Phi (byte*) print_line_cursor#21 (byte*) print_line_cursor#23
Redundant Phi (byte*) print_char_cursor#65 (byte*) print_char_cursor#29
Redundant Phi (byte*) print_char_cursor#35 (byte*) print_char_cursor#65
Redundant Phi (byte*) print_char_cursor#37 (byte*) print_char_cursor#12
Redundant Phi (byte*) print_char_cursor#38 (byte*) print_char_cursor#12
Redundant Phi (byte*) print_char_cursor#39 (byte*) print_char_cursor#10
Redundant Phi (byte*) print_char_cursor#41 (byte*) print_char_cursor#12
Redundant Phi (byte*) print_char_cursor#10 (byte*) print_char_cursor#12
Redundant Phi (byte*) print_screen#1 (byte*) print_screen#4
Redundant Phi (byte*) print_line_cursor#14 (byte*) print_screen#1
Redundant Phi (word*) psp1#1 (word*) psp1#0
Redundant Phi (word*) psp2#1 (word*) psp2#0
Redundant Phi (byte*) print_screen#4 (byte*) print_line_cursor#0
Redundant Phi (byte*) print_line_cursor#22 (byte*) print_line_cursor#0
Redundant Phi (byte*) print_char_cursor#70 (byte*) print_line_cursor#0
Redundant Phi (signed byte*) xr#11 (signed byte*) xr#0
Redundant Phi (signed byte*) yr#13 (signed byte*) yr#0
Redundant Phi (signed byte*) zr#10 (signed byte*) zr#0
Redundant Phi (byte*) print_line_cursor#15 (byte*) print_line_cursor#14
Redundant Phi (byte*) print_char_cursor#16 (byte*) print_line_cursor#14
Redundant Phi (byte*) print_char_cursor#17 (byte*) print_char_cursor#30
Redundant Phi (byte*) print_line_cursor#16 (byte*) print_line_cursor#18
Redundant Phi (byte*) print_char_cursor#71 (byte*) print_char_cursor#16
Redundant Phi (signed byte) do_perspective::x#1 (signed byte) do_perspective::x#0
Redundant Phi (signed byte) do_perspective::y#1 (signed byte) do_perspective::y#0
Redundant Phi (signed byte) do_perspective::z#1 (signed byte) do_perspective::z#0
Redundant Phi (signed byte*) xr#1 (signed byte*) xr#11
Redundant Phi (signed byte*) yr#1 (signed byte*) yr#13
Redundant Phi (signed byte*) zr#2 (signed byte*) zr#10
Redundant Phi (byte*) print_line_cursor#23 (byte*) print_line_cursor#15
Redundant Phi (byte*) print_char_cursor#19 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_char_cursor#20 (byte*) print_char_cursor#39
Redundant Phi (byte*) print_char_cursor#21 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_char_cursor#22 (byte*) print_char_cursor#39
Redundant Phi (byte*) print_char_cursor#23 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_char_cursor#24 (byte*) print_char_cursor#39
Redundant Phi (byte*) print_char_cursor#25 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_char_cursor#26 (byte*) print_char_cursor#10
Redundant Phi (byte*) print_char_cursor#27 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_char_cursor#28 (byte*) print_char_cursor#10
Redundant Phi (byte*) print_char_cursor#29 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_line_cursor#18 (byte*) print_line_cursor#1
Redundant Phi (byte*) print_char_cursor#30 (byte*) print_line_cursor#1
Redundant Phi (signed byte) perspective::x#1 (signed byte) perspective::x#0
Redundant Phi (signed byte*) xr#2 (signed byte*) xr#1
Redundant Phi (signed byte) perspective::y#1 (signed byte) perspective::y#0
Redundant Phi (signed byte*) yr#2 (signed byte*) yr#1
Redundant Phi (signed byte) perspective::z#1 (signed byte) perspective::z#0
Redundant Phi (signed byte*) zr#1 (signed byte*) zr#2
Redundant Phi (byte*) print_line_cursor#10 (byte*) print_line_cursor#16
Redundant Phi (byte*) print_char_cursor#32 (byte*) print_char_cursor#17
Successful SSA optimization Pass2RedundantPhiElimination
Redundant Phi (byte*) print_char_cursor#66 (byte*) print_char_cursor#2
Redundant Phi (byte*) print_char_cursor#68 (byte*) print_char_cursor#12
Successful SSA optimization Pass2RedundantPhiElimination
Simple Condition (bool~) print_str::$0 [85] if(*((byte*) print_str::str#7)!=(byte) '@') goto print_str::@2
Simple Condition (bool~) print_ln::$1 [98] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1
Simple Condition (bool~) print_sbyte::$0 [107] if((signed byte) print_sbyte::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1
Simple Condition (bool~) print_cls::$1 [158] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1
Simple Condition (bool~) mulf_init::$11 [293] if((byte) mulf_init::i#1!=rangelast(0,128)) goto mulf_init::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0
Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7
Constant (const byte*) PROCPORT#0 = ((byte*))1
Constant (const byte) PROCPORT_RAM_ALL#0 = 48
Constant (const byte) PROCPORT_RAM_IO#0 = 53
Constant (const byte) PROCPORT_RAM_CHARROM#0 = 49
Constant (const byte) PROCPORT_KERNEL_IO#0 = 54
Constant (const byte) PROCPORT_BASIC_KERNEL_IO#0 = 55
Constant (const byte*) CHARGEN#0 = ((byte*))53248
Constant (const word) SPRITE_PTRS#0 = 1016
Constant (const byte*) SPRITES_XPOS#0 = ((byte*))53248
Constant (const byte*) SPRITES_YPOS#0 = ((byte*))53249
Constant (const byte*) SPRITES_XMSB#0 = ((byte*))53264
Constant (const byte*) RASTER#0 = ((byte*))53266
Constant (const byte*) SPRITES_ENABLE#0 = ((byte*))53269
Constant (const byte*) SPRITES_EXPAND_Y#0 = ((byte*))53271
Constant (const byte*) SPRITES_PRIORITY#0 = ((byte*))53275
Constant (const byte*) SPRITES_MC#0 = ((byte*))53276
Constant (const byte*) SPRITES_EXPAND_X#0 = ((byte*))53277
Constant (const byte*) BORDERCOL#0 = ((byte*))53280
Constant (const byte*) BGCOL#0 = ((byte*))53281
Constant (const byte*) BGCOL1#0 = ((byte*))53281
Constant (const byte*) BGCOL2#0 = ((byte*))53282
Constant (const byte*) BGCOL3#0 = ((byte*))53283
Constant (const byte*) BGCOL4#0 = ((byte*))53284
Constant (const byte*) SPRITES_MC1#0 = ((byte*))53285
Constant (const byte*) SPRITES_MC2#0 = ((byte*))53286
Constant (const byte*) SPRITES_COLS#0 = ((byte*))53287
Constant (const byte*) VIC_CONTROL#0 = ((byte*))53265
Constant (const byte*) D011#0 = ((byte*))53265
Constant (const byte) VIC_RST8#0 = 128
Constant (const byte) VIC_ECM#0 = 64
Constant (const byte) VIC_BMM#0 = 32
Constant (const byte) VIC_DEN#0 = 16
Constant (const byte) VIC_RSEL#0 = 8
Constant (const byte*) VIC_CONTROL2#0 = ((byte*))53270
Constant (const byte*) D016#0 = ((byte*))53270
Constant (const byte) VIC_MCM#0 = 16
Constant (const byte) VIC_CSEL#0 = 8
Constant (const byte*) D018#0 = ((byte*))53272
Constant (const byte*) VIC_MEMORY#0 = ((byte*))53272
Constant (const byte*) LIGHTPEN_X#0 = ((byte*))53267
Constant (const byte*) LIGHTPEN_Y#0 = ((byte*))53268
Constant (const byte*) IRQ_STATUS#0 = ((byte*))53273
Constant (const byte*) IRQ_ENABLE#0 = ((byte*))53274
Constant (const byte) IRQ_RASTER#0 = 1
Constant (const byte) IRQ_COLLISION_BG#0 = 2
Constant (const byte) IRQ_COLLISION_SPRITE#0 = 4
Constant (const byte) IRQ_LIGHTPEN#0 = 8
Constant (const byte*) COLS#0 = ((byte*))55296
Constant (const byte*) CIA1_PORT_A#0 = ((byte*))56320
Constant (const byte*) CIA1_PORT_B#0 = ((byte*))56321
Constant (const byte*) CIA1_PORT_A_DDR#0 = ((byte*))56322
Constant (const byte*) CIA1_PORT_B_DDR#0 = ((byte*))56323
Constant (const byte*) CIA1_INTERRUPT#0 = ((byte*))56333
Constant (const byte) CIA_INTERRUPT_CLEAR#0 = 127
Constant (const byte*) CIA2_PORT_A#0 = ((byte*))56576
Constant (const byte*) CIA2_PORT_B#0 = ((byte*))56577
Constant (const byte*) CIA2_PORT_A_DDR#0 = ((byte*))56578
Constant (const byte*) CIA2_PORT_B_DDR#0 = ((byte*))56579
Constant (const byte*) CIA2_INTERRUPT#0 = ((byte*))56589
Constant (const void()**) KERNEL_IRQ#0 = ((void()**))788
Constant (const void()**) HARDWARE_IRQ#0 = ((void()**))65534
Constant (const byte) BLACK#0 = 0
Constant (const byte) WHITE#0 = 1
Constant (const byte) RED#0 = 2
Constant (const byte) CYAN#0 = 3
Constant (const byte) PURPLE#0 = 4
Constant (const byte) GREEN#0 = 5
Constant (const byte) BLUE#0 = 6
Constant (const byte) YELLOW#0 = 7
Constant (const byte) ORANGE#0 = 8
Constant (const byte) BROWN#0 = 9
Constant (const byte) PINK#0 = 10
Constant (const byte) DARK_GREY#0 = 11
Constant (const byte) GREY#0 = 12
Constant (const byte) LIGHT_GREEN#0 = 13
Constant (const byte) LIGHT_BLUE#0 = 14
Constant (const byte) LIGHT_GREY#0 = 15
Constant (const byte*) print_line_cursor#0 = ((byte*))1024
Constant (const byte) print_char::ch#0 = '-'
Constant (const byte) print_char::ch#1 = ' '
Constant (const byte[]) print_hextab#0 = $0
Constant (const signed byte*) xr#0 = ((signed byte*))240
Constant (const signed byte*) yr#0 = ((signed byte*))241
Constant (const signed byte*) zr#0 = ((signed byte*))242
Constant (const word*) psp1#0 = ((word*))243
Constant (const word*) psp2#0 = ((word*))245
Constant (const signed byte) do_perspective::y#0 = -71
Constant (const signed byte) do_perspective::x#0 = 57
Constant (const signed byte) do_perspective::z#0 = 54
Constant (const byte*) print_str::str#1 = do_perspective::str
Constant (const byte*) print_str::str#2 = do_perspective::str1
Constant (const byte*) print_str::str#3 = do_perspective::str2
Constant (const byte*) print_str::str#4 = do_perspective::str3
Constant (const byte*) print_str::str#5 = do_perspective::str4
Constant (const byte*) print_str::str#6 = do_perspective::str5
Constant (const byte[512]) mulf_sqr1#0 = { fill( 512, 0) }
Constant (const byte[512]) mulf_sqr2#0 = { fill( 512, 0) }
Constant (const signed word) mulf_init::sqr#0 = 0
Constant (const signed word) mulf_init::add#0 = 1
Constant (const byte) mulf_init::i#0 = 0
Constant (const signed byte*) PERSP_Z#0 = ((signed byte*))9216
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) print_cls::sc#0 = print_line_cursor#0
Constant (const byte*) print_cls::$0 = print_line_cursor#0+1000
Constant (const word) main::$1 = ((word))mulf_sqr1#0
Constant (const word) main::$2 = ((word))mulf_sqr2#0
Constant (const signed byte) print_sbyte::b#1 = do_perspective::x#0
Constant (const signed byte) print_sbyte::b#2 = do_perspective::y#0
Constant (const signed byte) print_sbyte::b#3 = do_perspective::z#0
Constant (const signed byte) perspective::x#0 = do_perspective::x#0
Constant (const signed byte) perspective::y#0 = do_perspective::y#0
Constant (const signed byte) perspective::z#0 = do_perspective::z#0
Constant (const byte*) mulf_init::$1 = mulf_sqr1#0+256
Constant (const byte*) mulf_init::$3 = mulf_sqr1#0+256
Constant (const byte*) mulf_init::$6 = mulf_sqr2#0+256
Constant (const byte*) mulf_init::$9 = mulf_sqr2#0+256
Successful SSA optimization Pass2ConstantIdentification
Consolidated array index constant in assignment *(mulf_sqr2#0+1 + mulf_init::$5)
Consolidated array index constant in assignment *(mulf_init::$6+1 + mulf_init::$7)
Successful SSA optimization Pass2ConstantAdditionElimination
Successful SSA optimization Pass2ConstantStringConsolidation
Inferred type updated to byte in [73] (byte/signed word/word/dword/signed dword~) mulf_init::$5 ← (byte) mulf_init::i#2
Inferred type updated to byte in [75] (byte/signed word/word/dword/signed dword~) mulf_init::$7 ← (byte) mulf_init::i#2
Successful SSA optimization PassNEliminateUnusedVars
Eliminating Noop Cast (byte) print_byte::b#0 ← ((byte)) (signed byte) print_sbyte::b#6
Eliminating Noop Cast (byte) print_byte::b#1 ← ((byte)) *((const signed byte*) xr#0)
Eliminating Noop Cast (byte) print_byte::b#2 ← ((byte)) *((const signed byte*) yr#0)
Successful SSA optimization Pass2NopCastElimination
Resolved ranged next value mulf_init::i#1 ← ++ mulf_init::i#2 to ++
Resolved ranged comparison value if(mulf_init::i#1!=rangelast(0,128)) goto mulf_init::@1 to (byte/word/signed word/dword/signed dword) 129
Culled Empty Block (label) @4
Culled Empty Block (label) print_ln::@2
Culled Empty Block (label) print_sbyte::@6
Culled Empty Block (label) print_sbyte::@7
Culled Empty Block (label) @16
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) print_cls::@2
Culled Empty Block (label) @23
Culled Empty Block (label) main::@3
Culled Empty Block (label) do_perspective::@13
Culled Empty Block (label) @26
Culled Empty Block (label) @28
Successful SSA optimization Pass2CullEmptyBlocks
Alias (byte) mulf_init::i#2 = (byte~) mulf_init::$5 (byte~) mulf_init::$7 
Successful SSA optimization Pass2AliasElimination
Inlining constant with var siblings (const byte*) print_str::str#1
Inlining constant with var siblings (const byte*) print_str::str#2
Inlining constant with var siblings (const byte*) print_str::str#3
Inlining constant with var siblings (const byte*) print_str::str#4
Inlining constant with var siblings (const byte*) print_str::str#5
Inlining constant with var siblings (const byte*) print_str::str#6
Inlining constant with var siblings (const signed byte) print_sbyte::b#1
Inlining constant with var siblings (const signed byte) print_sbyte::b#2
Inlining constant with var siblings (const signed byte) print_sbyte::b#3
Inlining constant with var siblings (const byte) print_char::ch#0
Inlining constant with var siblings (const byte) print_char::ch#1
Inlining constant with var siblings (const byte*) print_cls::sc#0
Inlining constant with var siblings (const signed word) mulf_init::sqr#0
Inlining constant with var siblings (const signed word) mulf_init::add#0
Inlining constant with var siblings (const byte) mulf_init::i#0
Inlining constant with var siblings (const byte*) print_line_cursor#0
Constant inlined print_cls::$0 = ((byte*))(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000
Constant inlined print_sbyte::b#1 = (const signed byte) do_perspective::x#0
Constant inlined print_sbyte::b#2 = (const signed byte) do_perspective::y#0
Constant inlined do_perspective::str4 = (const string) do_perspective::str1
Constant inlined print_sbyte::b#3 = (const signed byte) do_perspective::z#0
Constant inlined do_perspective::str2 = (const string) do_perspective::str1
Constant inlined mulf_init::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined mulf_init::$1 = (const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256
Constant inlined $0 = (const byte[]) print_hextab#0
Constant inlined mulf_init::$3 = (const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256
Constant inlined mulf_init::$6 = (const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256
Constant inlined mulf_init::add#0 = (byte/signed byte/word/signed word/dword/signed dword) 1
Constant inlined perspective::z#0 = (const signed byte) do_perspective::z#0
Constant inlined perspective::y#0 = (const signed byte) do_perspective::y#0
Constant inlined perspective::x#0 = (const signed byte) do_perspective::x#0
Constant inlined mulf_init::sqr#0 = (byte/signed byte/word/signed word/dword/signed dword) 0
Constant inlined print_line_cursor#0 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined print_cls::sc#0 = ((byte*))(word/signed word/dword/signed dword) 1024
Constant inlined mulf_init::$9 = (const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256
Constant inlined main::$1 = ((word))(const byte[512]) mulf_sqr1#0
Constant inlined main::$2 = ((word))(const byte[512]) mulf_sqr2#0
Constant inlined print_char::ch#1 = (byte) ' '
Constant inlined print_char::ch#0 = (byte) '-'
Constant inlined print_str::str#4 = (const string) do_perspective::str3
Constant inlined print_str::str#3 = (const string) do_perspective::str1
Constant inlined print_str::str#2 = (const string) do_perspective::str1
Constant inlined print_str::str#1 = (const string) do_perspective::str
Constant inlined print_str::str#6 = (const string) do_perspective::str5
Constant inlined print_str::str#5 = (const string) do_perspective::str1
Successful SSA optimization Pass2ConstantInlining
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
Added new block during phi lifting print_cls::@3(between print_cls::@1 and print_cls::@1)
Added new block during phi lifting mulf_init::@3(between mulf_init::@1 and mulf_init::@1)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of do_perspective
Adding NOP phi() at start of do_perspective::@1
Adding NOP phi() at start of do_perspective::@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 print_ln
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of mulf_init
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to mulf_init:5 print_cls:8 do_perspective:10 
Calls in [do_perspective] to print_str:13 print_sbyte:15 print_str:17 print_sbyte:19 print_str:21 print_sbyte:23 print_str:25 perspective:27 print_byte:30 print_str:32 print_byte:35 print_str:37 print_ln:39 
Calls in [print_byte] to print_char:63 print_char:68 
Calls in [print_sbyte] to print_char:82 print_byte:87 print_char:90 

Created 15 initial phi equivalence classes
Coalesced [16] print_char_cursor#81 ← print_char_cursor#12
Coalesced (already) [20] print_char_cursor#82 ← print_char_cursor#12
Coalesced (already) [24] print_char_cursor#83 ← print_char_cursor#12
Coalesced [29] print_char_cursor#88 ← print_char_cursor#2
Coalesced (already) [31] print_char_cursor#84 ← print_char_cursor#12
Coalesced (already) [34] print_char_cursor#87 ← print_char_cursor#2
Coalesced (already) [36] print_char_cursor#80 ← print_char_cursor#12
Coalesced [46] print_line_cursor#41 ← print_line_cursor#1
Coalesced [48] print_str::str#10 ← print_str::str#9
Coalesced [49] print_char_cursor#85 ← print_char_cursor#74
Coalesced [56] print_str::str#11 ← print_str::str#0
Coalesced [57] print_char_cursor#86 ← print_char_cursor#1
Coalesced [61] print_char::ch#5 ← print_char::ch#2
Coalesced [62] print_char_cursor#90 ← print_char_cursor#69
Coalesced [66] print_char::ch#6 ← print_char::ch#3
Coalesced (already) [67] print_char_cursor#91 ← print_char_cursor#12
Coalesced (already) [81] print_char_cursor#93 ← print_char_cursor#2
Coalesced [83] print_sbyte::b#11 ← print_sbyte::b#4
Coalesced (already) [86] print_char_cursor#89 ← print_char_cursor#12
Coalesced (already) [89] print_char_cursor#92 ← print_char_cursor#2
Coalesced [92] print_sbyte::b#10 ← print_sbyte::b#0
Coalesced [99] print_cls::sc#3 ← print_cls::sc#1
Coalesced [120] mulf_init::sqr#3 ← mulf_init::sqr#1
Coalesced [121] mulf_init::i#3 ← mulf_init::i#1
Coalesced [122] mulf_init::add#3 ← mulf_init::add#1
Coalesced down to 10 phi equivalence classes
Culled Empty Block (label) print_ln::@3
Culled Empty Block (label) print_cls::@3
Culled Empty Block (label) mulf_init::@3
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @end
Adding NOP phi() at start of main::@2
Adding NOP phi() at start of do_perspective
Adding NOP phi() at start of do_perspective::@1
Adding NOP phi() at start of do_perspective::@2
Adding NOP phi() at start of do_perspective::@3
Adding NOP phi() at start of do_perspective::@4
Adding NOP phi() at start of do_perspective::@5
Adding NOP phi() at start of do_perspective::@6
Adding NOP phi() at start of do_perspective::@7
Adding NOP phi() at start of do_perspective::@9
Adding NOP phi() at start of do_perspective::@11
Adding NOP phi() at start of do_perspective::@12
Adding NOP phi() at start of print_ln
Adding NOP phi() at start of print_sbyte::@3
Adding NOP phi() at start of print_sbyte::@1
Adding NOP phi() at start of print_cls
Adding NOP phi() at start of mulf_init

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


VARIABLE REGISTER WEIGHTS
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
(byte*) BGCOL3
(byte*) BGCOL4
(byte) BLACK
(byte) BLUE
(byte*) BORDERCOL
(byte) BROWN
(byte*) CHARGEN
(byte*) CIA1_INTERRUPT
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_A_DDR
(byte*) CIA1_PORT_B
(byte*) CIA1_PORT_B_DDR
(byte*) CIA2_INTERRUPT
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR
(byte*) COLS
(byte) CYAN
(byte*) D011
(byte*) D016
(byte*) D018
(byte) DARK_GREY
(byte) GREEN
(byte) GREY
(void()**) HARDWARE_IRQ
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE
(byte*) IRQ_ENABLE
(byte) IRQ_LIGHTPEN
(byte) IRQ_RASTER
(byte*) IRQ_STATUS
(void()**) KERNEL_IRQ
(byte*) LIGHTPEN_X
(byte*) LIGHTPEN_Y
(byte) LIGHT_BLUE
(byte) LIGHT_GREEN
(byte) LIGHT_GREY
(byte) ORANGE
(signed byte*) PERSP_Z
(byte) PINK
(byte*) PROCPORT
(byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO
(byte) PURPLE
(byte*) RASTER
(byte) RED
(byte*) SPRITES_COLS
(byte*) SPRITES_ENABLE
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_MC
(byte*) SPRITES_MC1
(byte*) SPRITES_MC2
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_XMSB
(byte*) SPRITES_XPOS
(byte*) SPRITES_YPOS
(word) SPRITE_PTRS
(byte) VIC_BMM
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL2
(byte) VIC_CSEL
(byte) VIC_DEN
(byte) VIC_ECM
(byte) VIC_MCM
(byte*) VIC_MEMORY
(byte) VIC_RSEL
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
(signed byte) do_perspective::x
(signed byte) do_perspective::y
(signed byte) do_perspective::z
(void()) main()
(void()) mulf_init()
(byte/signed word/word/dword/signed dword~) mulf_init::$10 22.0
(byte~) mulf_init::$2 22.0
(byte~) mulf_init::$4 22.0
(byte/signed word/word/dword/signed dword~) mulf_init::$8 22.0
(signed word) mulf_init::add
(signed word) mulf_init::add#1 7.333333333333333
(signed word) mulf_init::add#2 2.1999999999999997
(byte) mulf_init::i
(byte) mulf_init::i#1 16.5
(byte) mulf_init::i#2 6.875
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#1 5.5
(signed word) mulf_init::sqr#2 2.357142857142857
(byte) mulf_init::val
(byte) mulf_init::val#0 8.25
(byte[512]) mulf_sqr1
(byte[512]) mulf_sqr2
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
(signed byte) perspective::x
(signed byte) perspective::y
(signed byte) perspective::z
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 4.0
(byte~) print_byte::$2 4.0
(byte) print_byte::b
(byte) print_byte::b#3 2.5
(byte~) print_byte::b#5 4.0
(byte~) print_byte::b#6 4.0
(byte~) print_byte::b#7 4.0
(void()) print_char((byte) print_char::ch)
(byte) print_char::ch
(byte) print_char::ch#2 4.0
(byte) print_char::ch#3 4.0
(byte) print_char::ch#4 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 11.0
(byte*) print_char_cursor#12 0.6666666666666666
(byte*) print_char_cursor#2 2.076923076923077
(byte*) print_char_cursor#44 6.0
(byte*) print_char_cursor#69 2.6666666666666665
(byte*) print_char_cursor#74 12.0
(void()) print_cls()
(byte*) print_cls::sc
(byte*) print_cls::sc#1 16.5
(byte*) print_cls::sc#2 16.5
(byte[]) print_hextab
(byte*) print_line_cursor
(byte*) print_line_cursor#1 16.5
(byte*) print_line_cursor#11 22.0
(void()) print_ln()
(void()) print_sbyte((signed byte) print_sbyte::b)
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 4.0
(signed byte) print_sbyte::b#4 1.0
(signed byte) print_sbyte::b#6 4.0
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(byte*) print_str::str
(byte*) print_str::str#0 22.0
(byte*) print_str::str#7 11.5
(byte*) print_str::str#9 2.0
(word*) psp1
(word*) psp2
(signed byte*) xr
(signed byte*) yr
(signed byte*) zr

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

INITIAL ASM
//SEG0 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  
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  // The rotated point - updated by calling rotate()
  .label xr = $f0
  .label yr = $f1
  .label zr = $f2
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $f3
  .label psp2 = $f5
  // Perspective multiplication table containing (d/(z0-z)[z] for each z-value   
  .label PERSP_Z = $2400
  .label print_char_cursor = 8
  .label print_line_cursor = 2
//SEG3 @begin
bbegin:
  jmp b27
//SEG4 @27
b27:
//SEG5 kickasm(location (const signed byte*) PERSP_Z#0) {{ {     .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)));     	}     } 	}  }}
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @27 to @end [phi:@27->@end]
bend_from_b27:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 asm { sei  }
    sei
  //SEG11 [5] call mulf_init 
  //SEG12 [85] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp b1
  //SEG13 main::@1
  b1:
  //SEG14 [6] *((const word*) psp1#0) ← ((word))(const byte[512]) mulf_sqr1#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
  //SEG15 [7] *((const word*) psp2#0) ← ((word))(const byte[512]) mulf_sqr2#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr2
    sta psp2
    lda #>mulf_sqr2
    sta psp2+1
  //SEG16 [8] call print_cls 
  //SEG17 [79] phi from main::@1 to print_cls [phi:main::@1->print_cls]
  print_cls_from_b1:
    jsr print_cls
  //SEG18 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
  //SEG19 main::@2
  b2:
  //SEG20 [10] call do_perspective 
  //SEG21 [12] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
  do_perspective_from_b2:
    jsr do_perspective
    jmp breturn
  //SEG22 main::@return
  breturn:
  //SEG23 [11] return 
    rts
}
//SEG24 do_perspective
do_perspective: {
    .label y = -$47
    .label x = $39
    .label z = $36
  //SEG25 [13] call print_str 
  //SEG26 [44] phi from do_perspective to print_str [phi:do_perspective->print_str]
  print_str_from_do_perspective:
  //SEG27 [44] phi (byte*) print_char_cursor#74 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
  //SEG28 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str [phi:do_perspective->print_str#1] -- pbuz1=pbuc1 
    lda #<str
    sta print_str.str
    lda #>str
    sta print_str.str+1
    jsr print_str
  //SEG29 [14] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
  b1_from_do_perspective:
    jmp b1
  //SEG30 do_perspective::@1
  b1:
  //SEG31 [15] call print_sbyte 
  //SEG32 [68] phi from do_perspective::@1 to print_sbyte [phi:do_perspective::@1->print_sbyte]
  print_sbyte_from_b1:
  //SEG33 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::x#0 [phi:do_perspective::@1->print_sbyte#0] -- vbsz1=vbsc1 
    lda #x
    sta print_sbyte.b
    jsr print_sbyte
  //SEG34 [16] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
  b2_from_b1:
    jmp b2
  //SEG35 do_perspective::@2
  b2:
  //SEG36 [17] call print_str 
  //SEG37 [44] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
  print_str_from_b2:
  //SEG38 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@2->print_str#0] -- register_copy 
  //SEG39 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@2->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG40 [18] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
  b3_from_b2:
    jmp b3
  //SEG41 do_perspective::@3
  b3:
  //SEG42 [19] call print_sbyte 
  //SEG43 [68] phi from do_perspective::@3 to print_sbyte [phi:do_perspective::@3->print_sbyte]
  print_sbyte_from_b3:
  //SEG44 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::y#0 [phi:do_perspective::@3->print_sbyte#0] -- vbsz1=vbsc1 
    lda #y
    sta print_sbyte.b
    jsr print_sbyte
  //SEG45 [20] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
  b4_from_b3:
    jmp b4
  //SEG46 do_perspective::@4
  b4:
  //SEG47 [21] call print_str 
  //SEG48 [44] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
  print_str_from_b4:
  //SEG49 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@4->print_str#0] -- register_copy 
  //SEG50 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@4->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG51 [22] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
  b5_from_b4:
    jmp b5
  //SEG52 do_perspective::@5
  b5:
  //SEG53 [23] call print_sbyte 
  //SEG54 [68] phi from do_perspective::@5 to print_sbyte [phi:do_perspective::@5->print_sbyte]
  print_sbyte_from_b5:
  //SEG55 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::z#0 [phi:do_perspective::@5->print_sbyte#0] -- vbsz1=vbsc1 
    lda #z
    sta print_sbyte.b
    jsr print_sbyte
  //SEG56 [24] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
  b6_from_b5:
    jmp b6
  //SEG57 do_perspective::@6
  b6:
  //SEG58 [25] call print_str 
  //SEG59 [44] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
  print_str_from_b6:
  //SEG60 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@6->print_str#0] -- register_copy 
  //SEG61 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str3 [phi:do_perspective::@6->print_str#1] -- pbuz1=pbuc1 
    lda #<str3
    sta print_str.str
    lda #>str3
    sta print_str.str+1
    jsr print_str
  //SEG62 [26] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
  b7_from_b6:
    jmp b7
  //SEG63 do_perspective::@7
  b7:
  //SEG64 [27] call perspective 
    jsr perspective
    jmp b8
  //SEG65 do_perspective::@8
  b8:
  //SEG66 [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0) -- vbuz1=_deref_pbuc1 
    lda xr
    sta print_byte.b
  //SEG67 [29] call print_byte 
  //SEG68 [51] phi from do_perspective::@8 to print_byte [phi:do_perspective::@8->print_byte]
  print_byte_from_b8:
  //SEG69 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@8->print_byte#0] -- register_copy 
  //SEG70 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#6 [phi:do_perspective::@8->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG71 [30] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
  b9_from_b8:
    jmp b9
  //SEG72 do_perspective::@9
  b9:
  //SEG73 [31] call print_str 
  //SEG74 [44] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
  print_str_from_b9:
  //SEG75 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@9->print_str#0] -- register_copy 
  //SEG76 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@9->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
    jmp b10
  //SEG77 do_perspective::@10
  b10:
  //SEG78 [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0) -- vbuz1=_deref_pbuc1 
    lda yr
    sta print_byte.b
  //SEG79 [33] call print_byte 
  //SEG80 [51] phi from do_perspective::@10 to print_byte [phi:do_perspective::@10->print_byte]
  print_byte_from_b10:
  //SEG81 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@10->print_byte#0] -- register_copy 
  //SEG82 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#5 [phi:do_perspective::@10->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG83 [34] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
  b11_from_b10:
    jmp b11
  //SEG84 do_perspective::@11
  b11:
  //SEG85 [35] call print_str 
  //SEG86 [44] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
  print_str_from_b11:
  //SEG87 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@11->print_str#0] -- register_copy 
  //SEG88 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str5 [phi:do_perspective::@11->print_str#1] -- pbuz1=pbuc1 
    lda #<str5
    sta print_str.str
    lda #>str5
    sta print_str.str+1
    jsr print_str
  //SEG89 [36] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
  b12_from_b11:
    jmp b12
  //SEG90 do_perspective::@12
  b12:
  //SEG91 [37] call print_ln 
  //SEG92 [39] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
  print_ln_from_b12:
    jsr print_ln
    jmp breturn
  //SEG93 do_perspective::@return
  breturn:
  //SEG94 [38] return 
    rts
    str: .text "(@"
    str1: .text ",@"
    str3: .text ") -> (@"
    str5: .text ")@"
}
//SEG95 print_ln
// Print a newline
print_ln: {
  //SEG96 [40] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  b1_from_print_ln:
  //SEG97 [40] phi (byte*) print_line_cursor#11 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
    jmp b1
  //SEG98 [40] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  b1_from_b1:
  //SEG99 [40] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
  //SEG100 print_ln::@1
  b1:
  //SEG101 [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda print_line_cursor
    clc
    adc #$28
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
  //SEG102 [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG103 print_ln::@return
  breturn:
  //SEG104 [43] return 
    rts
}
//SEG105 print_str
// Print a zero-terminated string
// print_str(byte* zeropage(4) str)
print_str: {
    .label str = 4
  //SEG106 [45] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  b1_from_print_str:
  b1_from_b2:
  //SEG107 [45] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#74 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
  //SEG108 [45] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    jmp b1
  //SEG109 print_str::@1
  b1:
  //SEG110 [46] if(*((byte*) print_str::str#7)!=(byte) '@') goto print_str::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 
    ldy #0
    lda (str),y
    cmp #'@'
    bne b2
    jmp breturn
  //SEG111 print_str::@return
  breturn:
  //SEG112 [47] return 
    rts
  //SEG113 print_str::@2
  b2:
  //SEG114 [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
  //SEG115 [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
  //SEG116 [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1_from_b2
}
//SEG117 print_byte
// Print a byte as HEX
// print_byte(byte zeropage(6) b)
print_byte: {
    .label _0 = $12
    .label _2 = $13
    .label b = 6
  //SEG118 [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuz1=vbuz2_ror_4 
    lda b
    lsr
    lsr
    lsr
    lsr
    sta _0
  //SEG119 [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _0
    lda print_hextab,y
    sta print_char.ch
  //SEG120 [54] call print_char 
  //SEG121 [59] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
  //SEG122 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#69 [phi:print_byte->print_char#0] -- register_copy 
  //SEG123 [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
  //SEG124 print_byte::@1
  b1:
  //SEG125 [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word/dword/signed dword) 15 -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and b
    sta _2
  //SEG126 [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _2
    lda print_hextab,y
    sta print_char.ch
  //SEG127 [57] call print_char 
  //SEG128 [59] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
  //SEG129 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#12 [phi:print_byte::@1->print_char#0] -- register_copy 
  //SEG130 [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
  //SEG131 print_byte::@return
  breturn:
  //SEG132 [58] return 
    rts
}
//SEG133 print_char
// Print a single char
// print_char(byte zeropage(7) ch)
print_char: {
    .label ch = 7
  //SEG134 [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (print_char_cursor),y
  //SEG135 [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
  //SEG136 print_char::@return
  breturn:
  //SEG137 [62] return 
    rts
}
//SEG138 perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
perspective: {
  //SEG139 [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
  //SEG140 [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
  //SEG141 [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.z
    sta zr
  //SEG142 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
  //SEG143 perspective::@return
  breturn:
  //SEG144 [67] return 
    rts
}
//SEG145 print_sbyte
// Print a signed byte as HEX
// print_sbyte(signed byte zeropage($a) b)
print_sbyte: {
    .label b = $a
  //SEG146 [69] if((signed byte) print_sbyte::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -- vbsz1_lt_0_then_la1 
    lda b
    bmi b1_from_print_sbyte
  //SEG147 [70] phi from print_sbyte to print_sbyte::@3 [phi:print_sbyte->print_sbyte::@3]
  b3_from_print_sbyte:
    jmp b3
  //SEG148 print_sbyte::@3
  b3:
  //SEG149 [71] call print_char 
  //SEG150 [59] phi from print_sbyte::@3 to print_char [phi:print_sbyte::@3->print_char]
  print_char_from_b3:
  //SEG151 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@3->print_char#0] -- register_copy 
  //SEG152 [59] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sbyte::@3->print_char#1] -- vbuz1=vbuc1 
    lda #' '
    sta print_char.ch
    jsr print_char
  //SEG153 [72] phi from print_sbyte::@3 print_sbyte::@5 to print_sbyte::@2 [phi:print_sbyte::@3/print_sbyte::@5->print_sbyte::@2]
  b2_from_b3:
  b2_from_b5:
  //SEG154 [72] phi (signed byte) print_sbyte::b#6 = (signed byte) print_sbyte::b#4 [phi:print_sbyte::@3/print_sbyte::@5->print_sbyte::@2#0] -- register_copy 
    jmp b2
  //SEG155 print_sbyte::@2
  b2:
  //SEG156 [73] (byte~) print_byte::b#7 ← (byte)(signed byte) print_sbyte::b#6 -- vbuz1=vbuz2 
    lda b
    sta print_byte.b
  //SEG157 [74] call print_byte 
  //SEG158 [51] phi from print_sbyte::@2 to print_byte [phi:print_sbyte::@2->print_byte]
  print_byte_from_b2:
  //SEG159 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#12 [phi:print_sbyte::@2->print_byte#0] -- register_copy 
  //SEG160 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#7 [phi:print_sbyte::@2->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
  //SEG161 print_sbyte::@return
  breturn:
  //SEG162 [75] return 
    rts
  //SEG163 [76] phi from print_sbyte to print_sbyte::@1 [phi:print_sbyte->print_sbyte::@1]
  b1_from_print_sbyte:
    jmp b1
  //SEG164 print_sbyte::@1
  b1:
  //SEG165 [77] call print_char 
  //SEG166 [59] phi from print_sbyte::@1 to print_char [phi:print_sbyte::@1->print_char]
  print_char_from_b1:
  //SEG167 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@1->print_char#0] -- register_copy 
  //SEG168 [59] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sbyte::@1->print_char#1] -- vbuz1=vbuc1 
    lda #'-'
    sta print_char.ch
    jsr print_char
    jmp b5
  //SEG169 print_sbyte::@5
  b5:
  //SEG170 [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 -- vbsz1=_neg_vbsz1 
    lda b
    eor #$ff
    clc
    adc #1
    sta b
    jmp b2_from_b5
}
//SEG171 print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    .label sc = $b
  //SEG172 [80] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1]
  b1_from_print_cls:
  //SEG173 [80] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    jmp b1
  //SEG174 [80] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1]
  b1_from_b1:
  //SEG175 [80] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy 
    jmp b1
  //SEG176 print_cls::@1
  b1:
  //SEG177 [81] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG178 [82] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG179 [83] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bne b1_from_b1
    lda sc
    cmp #<$400+$3e8
    bne b1_from_b1
    jmp breturn
  //SEG180 print_cls::@return
  breturn:
  //SEG181 [84] return 
    rts
}
//SEG182 mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label _2 = $15
    .label _4 = $16
    .label _8 = $17
    .label _10 = $18
    .label val = $14
    .label sqr = $d
    .label add = $10
    .label i = $f
  //SEG183 [86] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  b1_from_mulf_init:
  //SEG184 [86] phi (signed word) mulf_init::add#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vbuc1 
    lda #<1
    sta add
    lda #>1
    sta add+1
  //SEG185 [86] phi (byte) mulf_init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mulf_init->mulf_init::@1#1] -- vbuz1=vbuc1 
    lda #0
    sta i
  //SEG186 [86] phi (signed word) mulf_init::sqr#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vbuc1 
    lda #<0
    sta sqr
    lda #>0
    sta sqr+1
    jmp b1
  //SEG187 [86] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
  b1_from_b1:
  //SEG188 [86] phi (signed word) mulf_init::add#2 = (signed word) mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
  //SEG189 [86] phi (byte) mulf_init::i#2 = (byte) mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
  //SEG190 [86] phi (signed word) mulf_init::sqr#2 = (signed word) mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    jmp b1
  //SEG191 mulf_init::@1
  b1:
  //SEG192 [87] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 -- vbuz1=_hi_vwsz2 
    lda sqr+1
    sta val
  //SEG193 [88] *((const byte[512]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy i
    sta mulf_sqr1,y
  //SEG194 [89] *((const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy i
    sta mulf_sqr1+$100,y
  //SEG195 [90] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2 -- vbuz1=_neg_vbuz2 
    lda i
    eor #$ff
    clc
    adc #1
    sta _2
  //SEG196 [91] *((const byte[512]) mulf_sqr1#0 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy _2
    sta mulf_sqr1,y
  //SEG197 [92] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 -- vbuz1=_neg_vbuz2 
    lda i
    eor #$ff
    clc
    adc #1
    sta _4
  //SEG198 [93] *((const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy _4
    sta mulf_sqr1+$100,y
  //SEG199 [94] *((const byte[512]) mulf_sqr2#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy i
    sta mulf_sqr2+1,y
  //SEG200 [95] *((const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy i
    sta mulf_sqr2+$100+1,y
  //SEG201 [96] (byte/signed word/word/dword/signed dword~) mulf_init::$8 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2 -- vbuz1=vbuc1_minus_vbuz2 
    lda #1
    sec
    sbc i
    sta _8
  //SEG202 [97] *((const byte[512]) mulf_sqr2#0 + (byte/signed word/word/dword/signed dword~) mulf_init::$8) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy _8
    sta mulf_sqr2,y
  //SEG203 [98] (byte/signed word/word/dword/signed dword~) mulf_init::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2 -- vbuz1=vbuc1_minus_vbuz2 
    lda #1
    sec
    sbc i
    sta _10
  //SEG204 [99] *((const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256 + (byte/signed word/word/dword/signed dword~) mulf_init::$10) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuz1=vbuz2 
    lda val
    ldy _10
    sta mulf_sqr2+$100,y
  //SEG205 [100] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    lda sqr
    clc
    adc add
    sta sqr
    lda sqr+1
    adc add+1
    sta sqr+1
  //SEG206 [101] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vwsz1=vwsz1_plus_2 
    lda add
    clc
    adc #2
    sta add
    bcc !+
    inc add+1
  !:
  //SEG207 [102] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2 -- vbuz1=_inc_vbuz1 
    inc i
  //SEG208 [103] if((byte) mulf_init::i#1!=(byte/word/signed word/dword/signed dword) 129) goto mulf_init::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda i
    cmp #$81
    bne b1_from_b1
    jmp breturn
  //SEG209 mulf_init::@return
  breturn:
  //SEG210 [104] return 
    rts
}
  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
.pc = PERSP_Z "PERSP_Z"
  {
    .var d = 256.0	
    .var z0 = 5.0	
    .for(var z=0;z<$100;z++) {
    	.if(z>127) {
    		.byte round(d / (z0 - ((z - 256) / 64.0)));
    	} else {
    		.byte round(d / (z0 - (z / 64.0)));
    	}
    }
	}


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

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

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

ASSEMBLER BEFORE OPTIMIZATION
//SEG0 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  
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  // The rotated point - updated by calling rotate()
  .label xr = $f0
  .label yr = $f1
  .label zr = $f2
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $f3
  .label psp2 = $f5
  // Perspective multiplication table containing (d/(z0-z)[z] for each z-value   
  .label PERSP_Z = $2400
  .label print_char_cursor = 4
  .label print_line_cursor = 2
//SEG3 @begin
bbegin:
  jmp b27
//SEG4 @27
b27:
//SEG5 kickasm(location (const signed byte*) PERSP_Z#0) {{ {     .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)));     	}     } 	}  }}
//SEG6 [2] call main 
  jsr main
//SEG7 [3] phi from @27 to @end [phi:@27->@end]
bend_from_b27:
  jmp bend
//SEG8 @end
bend:
//SEG9 main
main: {
  //SEG10 asm { sei  }
    sei
  //SEG11 [5] call mulf_init 
  //SEG12 [85] phi from main to mulf_init [phi:main->mulf_init]
  mulf_init_from_main:
    jsr mulf_init
    jmp b1
  //SEG13 main::@1
  b1:
  //SEG14 [6] *((const word*) psp1#0) ← ((word))(const byte[512]) mulf_sqr1#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
  //SEG15 [7] *((const word*) psp2#0) ← ((word))(const byte[512]) mulf_sqr2#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr2
    sta psp2
    lda #>mulf_sqr2
    sta psp2+1
  //SEG16 [8] call print_cls 
  //SEG17 [79] phi from main::@1 to print_cls [phi:main::@1->print_cls]
  print_cls_from_b1:
    jsr print_cls
  //SEG18 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  b2_from_b1:
    jmp b2
  //SEG19 main::@2
  b2:
  //SEG20 [10] call do_perspective 
  //SEG21 [12] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
  do_perspective_from_b2:
    jsr do_perspective
    jmp breturn
  //SEG22 main::@return
  breturn:
  //SEG23 [11] return 
    rts
}
//SEG24 do_perspective
do_perspective: {
    .label y = -$47
    .label x = $39
    .label z = $36
  //SEG25 [13] call print_str 
  //SEG26 [44] phi from do_perspective to print_str [phi:do_perspective->print_str]
  print_str_from_do_perspective:
  //SEG27 [44] phi (byte*) print_char_cursor#74 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
  //SEG28 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str [phi:do_perspective->print_str#1] -- pbuz1=pbuc1 
    lda #<str
    sta print_str.str
    lda #>str
    sta print_str.str+1
    jsr print_str
  //SEG29 [14] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
  b1_from_do_perspective:
    jmp b1
  //SEG30 do_perspective::@1
  b1:
  //SEG31 [15] call print_sbyte 
  //SEG32 [68] phi from do_perspective::@1 to print_sbyte [phi:do_perspective::@1->print_sbyte]
  print_sbyte_from_b1:
  //SEG33 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::x#0 [phi:do_perspective::@1->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #x
    jsr print_sbyte
  //SEG34 [16] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
  b2_from_b1:
    jmp b2
  //SEG35 do_perspective::@2
  b2:
  //SEG36 [17] call print_str 
  //SEG37 [44] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
  print_str_from_b2:
  //SEG38 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@2->print_str#0] -- register_copy 
  //SEG39 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@2->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG40 [18] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
  b3_from_b2:
    jmp b3
  //SEG41 do_perspective::@3
  b3:
  //SEG42 [19] call print_sbyte 
  //SEG43 [68] phi from do_perspective::@3 to print_sbyte [phi:do_perspective::@3->print_sbyte]
  print_sbyte_from_b3:
  //SEG44 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::y#0 [phi:do_perspective::@3->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #y
    jsr print_sbyte
  //SEG45 [20] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
  b4_from_b3:
    jmp b4
  //SEG46 do_perspective::@4
  b4:
  //SEG47 [21] call print_str 
  //SEG48 [44] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
  print_str_from_b4:
  //SEG49 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@4->print_str#0] -- register_copy 
  //SEG50 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@4->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG51 [22] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
  b5_from_b4:
    jmp b5
  //SEG52 do_perspective::@5
  b5:
  //SEG53 [23] call print_sbyte 
  //SEG54 [68] phi from do_perspective::@5 to print_sbyte [phi:do_perspective::@5->print_sbyte]
  print_sbyte_from_b5:
  //SEG55 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::z#0 [phi:do_perspective::@5->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #z
    jsr print_sbyte
  //SEG56 [24] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
  b6_from_b5:
    jmp b6
  //SEG57 do_perspective::@6
  b6:
  //SEG58 [25] call print_str 
  //SEG59 [44] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
  print_str_from_b6:
  //SEG60 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@6->print_str#0] -- register_copy 
  //SEG61 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str3 [phi:do_perspective::@6->print_str#1] -- pbuz1=pbuc1 
    lda #<str3
    sta print_str.str
    lda #>str3
    sta print_str.str+1
    jsr print_str
  //SEG62 [26] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
  b7_from_b6:
    jmp b7
  //SEG63 do_perspective::@7
  b7:
  //SEG64 [27] call perspective 
    jsr perspective
    jmp b8
  //SEG65 do_perspective::@8
  b8:
  //SEG66 [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0) -- vbuxx=_deref_pbuc1 
    ldx xr
  //SEG67 [29] call print_byte 
  //SEG68 [51] phi from do_perspective::@8 to print_byte [phi:do_perspective::@8->print_byte]
  print_byte_from_b8:
  //SEG69 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@8->print_byte#0] -- register_copy 
  //SEG70 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#6 [phi:do_perspective::@8->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG71 [30] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
  b9_from_b8:
    jmp b9
  //SEG72 do_perspective::@9
  b9:
  //SEG73 [31] call print_str 
  //SEG74 [44] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
  print_str_from_b9:
  //SEG75 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@9->print_str#0] -- register_copy 
  //SEG76 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@9->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
    jmp b10
  //SEG77 do_perspective::@10
  b10:
  //SEG78 [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0) -- vbuxx=_deref_pbuc1 
    ldx yr
  //SEG79 [33] call print_byte 
  //SEG80 [51] phi from do_perspective::@10 to print_byte [phi:do_perspective::@10->print_byte]
  print_byte_from_b10:
  //SEG81 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@10->print_byte#0] -- register_copy 
  //SEG82 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#5 [phi:do_perspective::@10->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG83 [34] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
  b11_from_b10:
    jmp b11
  //SEG84 do_perspective::@11
  b11:
  //SEG85 [35] call print_str 
  //SEG86 [44] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
  print_str_from_b11:
  //SEG87 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@11->print_str#0] -- register_copy 
  //SEG88 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str5 [phi:do_perspective::@11->print_str#1] -- pbuz1=pbuc1 
    lda #<str5
    sta print_str.str
    lda #>str5
    sta print_str.str+1
    jsr print_str
  //SEG89 [36] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
  b12_from_b11:
    jmp b12
  //SEG90 do_perspective::@12
  b12:
  //SEG91 [37] call print_ln 
  //SEG92 [39] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
  print_ln_from_b12:
    jsr print_ln
    jmp breturn
  //SEG93 do_perspective::@return
  breturn:
  //SEG94 [38] return 
    rts
    str: .text "(@"
    str1: .text ",@"
    str3: .text ") -> (@"
    str5: .text ")@"
}
//SEG95 print_ln
// Print a newline
print_ln: {
  //SEG96 [40] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  b1_from_print_ln:
  //SEG97 [40] phi (byte*) print_line_cursor#11 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
    jmp b1
  //SEG98 [40] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  b1_from_b1:
  //SEG99 [40] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
    jmp b1
  //SEG100 print_ln::@1
  b1:
  //SEG101 [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda print_line_cursor
    clc
    adc #$28
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
  //SEG102 [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1_from_b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1_from_b1
  !:
    jmp breturn
  //SEG103 print_ln::@return
  breturn:
  //SEG104 [43] return 
    rts
}
//SEG105 print_str
// Print a zero-terminated string
// print_str(byte* zeropage(2) str)
print_str: {
    .label str = 2
  //SEG106 [45] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  b1_from_print_str:
  b1_from_b2:
  //SEG107 [45] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#74 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
  //SEG108 [45] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
    jmp b1
  //SEG109 print_str::@1
  b1:
  //SEG110 [46] if(*((byte*) print_str::str#7)!=(byte) '@') goto print_str::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 
    ldy #0
    lda (str),y
    cmp #'@'
    bne b2
    jmp breturn
  //SEG111 print_str::@return
  breturn:
  //SEG112 [47] return 
    rts
  //SEG113 print_str::@2
  b2:
  //SEG114 [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    ldy #0
    sta (print_char_cursor),y
  //SEG115 [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
  //SEG116 [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1_from_b2
}
//SEG117 print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
  //SEG118 [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
  //SEG119 [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG120 [54] call print_char 
  //SEG121 [59] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
  //SEG122 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#69 [phi:print_byte->print_char#0] -- register_copy 
  //SEG123 [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
  //SEG124 print_byte::@1
  b1:
  //SEG125 [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word/dword/signed dword) 15 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f
  //SEG126 [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG127 [57] call print_char 
  //SEG128 [59] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
  //SEG129 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#12 [phi:print_byte::@1->print_char#0] -- register_copy 
  //SEG130 [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
  //SEG131 print_byte::@return
  breturn:
  //SEG132 [58] return 
    rts
}
//SEG133 print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
  //SEG134 [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
  //SEG135 [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
  //SEG136 print_char::@return
  breturn:
  //SEG137 [62] return 
    rts
}
//SEG138 perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
perspective: {
  //SEG139 [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
  //SEG140 [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
  //SEG141 [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.z
    sta zr
  //SEG142 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
  //SEG143 perspective::@return
  breturn:
  //SEG144 [67] return 
    rts
}
//SEG145 print_sbyte
// Print a signed byte as HEX
// print_sbyte(signed byte register(X) b)
print_sbyte: {
  //SEG146 [69] if((signed byte) print_sbyte::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -- vbsxx_lt_0_then_la1 
    cpx #0
    bmi b1_from_print_sbyte
  //SEG147 [70] phi from print_sbyte to print_sbyte::@3 [phi:print_sbyte->print_sbyte::@3]
  b3_from_print_sbyte:
    jmp b3
  //SEG148 print_sbyte::@3
  b3:
  //SEG149 [71] call print_char 
  //SEG150 [59] phi from print_sbyte::@3 to print_char [phi:print_sbyte::@3->print_char]
  print_char_from_b3:
  //SEG151 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@3->print_char#0] -- register_copy 
  //SEG152 [59] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sbyte::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
  //SEG153 [72] phi from print_sbyte::@3 print_sbyte::@5 to print_sbyte::@2 [phi:print_sbyte::@3/print_sbyte::@5->print_sbyte::@2]
  b2_from_b3:
  b2_from_b5:
  //SEG154 [72] phi (signed byte) print_sbyte::b#6 = (signed byte) print_sbyte::b#4 [phi:print_sbyte::@3/print_sbyte::@5->print_sbyte::@2#0] -- register_copy 
    jmp b2
  //SEG155 print_sbyte::@2
  b2:
  //SEG156 [73] (byte~) print_byte::b#7 ← (byte)(signed byte) print_sbyte::b#6
  //SEG157 [74] call print_byte 
  //SEG158 [51] phi from print_sbyte::@2 to print_byte [phi:print_sbyte::@2->print_byte]
  print_byte_from_b2:
  //SEG159 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#12 [phi:print_sbyte::@2->print_byte#0] -- register_copy 
  //SEG160 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#7 [phi:print_sbyte::@2->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
  //SEG161 print_sbyte::@return
  breturn:
  //SEG162 [75] return 
    rts
  //SEG163 [76] phi from print_sbyte to print_sbyte::@1 [phi:print_sbyte->print_sbyte::@1]
  b1_from_print_sbyte:
    jmp b1
  //SEG164 print_sbyte::@1
  b1:
  //SEG165 [77] call print_char 
  //SEG166 [59] phi from print_sbyte::@1 to print_char [phi:print_sbyte::@1->print_char]
  print_char_from_b1:
  //SEG167 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@1->print_char#0] -- register_copy 
  //SEG168 [59] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sbyte::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
    jmp b5
  //SEG169 print_sbyte::@5
  b5:
  //SEG170 [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 -- vbsxx=_neg_vbsxx 
    txa
    eor #$ff
    clc
    adc #1
    tax
    jmp b2_from_b5
}
//SEG171 print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    .label sc = 2
  //SEG172 [80] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1]
  b1_from_print_cls:
  //SEG173 [80] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
    jmp b1
  //SEG174 [80] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1]
  b1_from_b1:
  //SEG175 [80] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy 
    jmp b1
  //SEG176 print_cls::@1
  b1:
  //SEG177 [81] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG178 [82] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG179 [83] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bne b1_from_b1
    lda sc
    cmp #<$400+$3e8
    bne b1_from_b1
    jmp breturn
  //SEG180 print_cls::@return
  breturn:
  //SEG181 [84] return 
    rts
}
//SEG182 mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label val = 6
    .label sqr = 2
    .label add = 4
  //SEG183 [86] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  b1_from_mulf_init:
  //SEG184 [86] phi (signed word) mulf_init::add#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vbuc1 
    lda #<1
    sta add
    lda #>1
    sta add+1
  //SEG185 [86] phi (byte) mulf_init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mulf_init->mulf_init::@1#1] -- vbuxx=vbuc1 
    ldx #0
  //SEG186 [86] phi (signed word) mulf_init::sqr#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vbuc1 
    lda #<0
    sta sqr
    lda #>0
    sta sqr+1
    jmp b1
  //SEG187 [86] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
  b1_from_b1:
  //SEG188 [86] phi (signed word) mulf_init::add#2 = (signed word) mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
  //SEG189 [86] phi (byte) mulf_init::i#2 = (byte) mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
  //SEG190 [86] phi (signed word) mulf_init::sqr#2 = (signed word) mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
    jmp b1
  //SEG191 mulf_init::@1
  b1:
  //SEG192 [87] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 -- vbuz1=_hi_vwsz2 
    lda sqr+1
    sta val
  //SEG193 [88] *((const byte[512]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda val
    sta mulf_sqr1,x
  //SEG194 [89] *((const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda val
    sta mulf_sqr1+$100,x
  //SEG195 [90] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2 -- vbuaa=_neg_vbuxx 
    txa
    eor #$ff
    clc
    adc #1
  //SEG196 [91] *((const byte[512]) mulf_sqr1#0 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr1,y
  //SEG197 [92] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 -- vbuaa=_neg_vbuxx 
    txa
    eor #$ff
    clc
    adc #1
  //SEG198 [93] *((const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr1+$100,y
  //SEG199 [94] *((const byte[512]) mulf_sqr2#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda val
    sta mulf_sqr2+1,x
  //SEG200 [95] *((const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    lda val
    sta mulf_sqr2+$100+1,x
  //SEG201 [96] (byte/signed word/word/dword/signed dword~) mulf_init::$8 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2 -- vbuaa=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    clc
    adc #1+1
  //SEG202 [97] *((const byte[512]) mulf_sqr2#0 + (byte/signed word/word/dword/signed dword~) mulf_init::$8) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr2,y
  //SEG203 [98] (byte/signed word/word/dword/signed dword~) mulf_init::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2 -- vbuaa=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    clc
    adc #1+1
  //SEG204 [99] *((const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256 + (byte/signed word/word/dword/signed dword~) mulf_init::$10) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr2+$100,y
  //SEG205 [100] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    lda sqr
    clc
    adc add
    sta sqr
    lda sqr+1
    adc add+1
    sta sqr+1
  //SEG206 [101] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vwsz1=vwsz1_plus_2 
    lda add
    clc
    adc #2
    sta add
    bcc !+
    inc add+1
  !:
  //SEG207 [102] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG208 [103] if((byte) mulf_init::i#1!=(byte/word/signed word/dword/signed dword) 129) goto mulf_init::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$81
    bne b1_from_b1
    jmp breturn
  //SEG209 mulf_init::@return
  breturn:
  //SEG210 [104] return 
    rts
}
  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
.pc = PERSP_Z "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 b27
Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp b9
Removing instruction jmp b10
Removing instruction jmp b11
Removing instruction jmp b12
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp b3
Removing instruction jmp b2
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction ldy #0
Removing instruction lda zr
Replacing instruction ldx #0 with TAX
Removing instruction lda #<0
Removing instruction lda #>0
Removing instruction lda val
Removing instruction lda val
Removing instruction lda val
Removing instruction lda val
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b2 with b1
Replacing label b1_from_print_sbyte with b1
Replacing label b2_from_b5 with b2
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction b27:
Removing instruction bend_from_b27:
Removing instruction b2_from_b1:
Removing instruction do_perspective_from_b2:
Removing instruction b1_from_do_perspective:
Removing instruction print_sbyte_from_b1:
Removing instruction b2_from_b1:
Removing instruction print_str_from_b2:
Removing instruction b3_from_b2:
Removing instruction print_sbyte_from_b3:
Removing instruction b4_from_b3:
Removing instruction print_str_from_b4:
Removing instruction b5_from_b4:
Removing instruction print_sbyte_from_b5:
Removing instruction b6_from_b5:
Removing instruction print_str_from_b6:
Removing instruction b7_from_b6:
Removing instruction b9_from_b8:
Removing instruction print_str_from_b9:
Removing instruction b11_from_b10:
Removing instruction print_str_from_b11:
Removing instruction b12_from_b11:
Removing instruction print_ln_from_b12:
Removing instruction b1_from_b1:
Removing instruction b1_from_print_str:
Removing instruction b1_from_b2:
Removing instruction b3_from_print_sbyte:
Removing instruction print_char_from_b3:
Removing instruction b2_from_b3:
Removing instruction b2_from_b5:
Removing instruction print_byte_from_b2:
Removing instruction b1_from_print_sbyte:
Removing instruction print_char_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bend:
Removing instruction mulf_init_from_main:
Removing instruction b1:
Removing instruction print_cls_from_b1:
Removing instruction b2:
Removing instruction breturn:
Removing instruction print_str_from_do_perspective:
Removing instruction b1:
Removing instruction b2:
Removing instruction b3:
Removing instruction b4:
Removing instruction b5:
Removing instruction b6:
Removing instruction b7:
Removing instruction b8:
Removing instruction print_byte_from_b8:
Removing instruction b9:
Removing instruction b10:
Removing instruction print_byte_from_b10:
Removing instruction b11:
Removing instruction b12:
Removing instruction breturn:
Removing instruction b1_from_print_ln:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction print_char_from_print_byte:
Removing instruction b1:
Removing instruction print_char_from_b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction b3:
Removing instruction breturn:
Removing instruction b5:
Removing instruction b1_from_print_cls:
Removing instruction breturn:
Removing instruction b1_from_mulf_init:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
(label) @27
(label) @begin
(label) @end
(byte*) BGCOL
(byte*) BGCOL1
(byte*) BGCOL2
(byte*) BGCOL3
(byte*) BGCOL4
(byte) BLACK
(byte) BLUE
(byte*) BORDERCOL
(byte) BROWN
(byte*) CHARGEN
(byte*) CIA1_INTERRUPT
(byte*) CIA1_PORT_A
(byte*) CIA1_PORT_A_DDR
(byte*) CIA1_PORT_B
(byte*) CIA1_PORT_B_DDR
(byte*) CIA2_INTERRUPT
(byte*) CIA2_PORT_A
(byte*) CIA2_PORT_A_DDR
(byte*) CIA2_PORT_B
(byte*) CIA2_PORT_B_DDR
(byte) CIA_INTERRUPT_CLEAR
(byte*) COLS
(byte) CYAN
(byte*) D011
(byte*) D016
(byte*) D018
(byte) DARK_GREY
(byte) GREEN
(byte) GREY
(void()**) HARDWARE_IRQ
(byte) IRQ_COLLISION_BG
(byte) IRQ_COLLISION_SPRITE
(byte*) IRQ_ENABLE
(byte) IRQ_LIGHTPEN
(byte) IRQ_RASTER
(byte*) IRQ_STATUS
(void()**) KERNEL_IRQ
(byte*) LIGHTPEN_X
(byte*) LIGHTPEN_Y
(byte) LIGHT_BLUE
(byte) LIGHT_GREEN
(byte) LIGHT_GREY
(byte) ORANGE
(signed byte*) PERSP_Z
(const signed byte*) PERSP_Z#0 PERSP_Z = ((signed byte*))(word/signed word/dword/signed dword) 9216
(byte) PINK
(byte*) PROCPORT
(byte) PROCPORT_BASIC_KERNEL_IO
(byte*) PROCPORT_DDR
(byte) PROCPORT_DDR_MEMORY_MASK
(byte) PROCPORT_KERNEL_IO
(byte) PROCPORT_RAM_ALL
(byte) PROCPORT_RAM_CHARROM
(byte) PROCPORT_RAM_IO
(byte) PURPLE
(byte*) RASTER
(byte) RED
(byte*) SPRITES_COLS
(byte*) SPRITES_ENABLE
(byte*) SPRITES_EXPAND_X
(byte*) SPRITES_EXPAND_Y
(byte*) SPRITES_MC
(byte*) SPRITES_MC1
(byte*) SPRITES_MC2
(byte*) SPRITES_PRIORITY
(byte*) SPRITES_XMSB
(byte*) SPRITES_XPOS
(byte*) SPRITES_YPOS
(word) SPRITE_PTRS
(byte) VIC_BMM
(byte*) VIC_CONTROL
(byte*) VIC_CONTROL2
(byte) VIC_CSEL
(byte) VIC_DEN
(byte) VIC_ECM
(byte) VIC_MCM
(byte*) VIC_MEMORY
(byte) VIC_RSEL
(byte) VIC_RST8
(byte) WHITE
(byte) YELLOW
(void()) do_perspective((signed byte) do_perspective::x , (signed byte) do_perspective::y , (signed byte) do_perspective::z)
(label) do_perspective::@1
(label) do_perspective::@10
(label) do_perspective::@11
(label) do_perspective::@12
(label) do_perspective::@2
(label) do_perspective::@3
(label) do_perspective::@4
(label) do_perspective::@5
(label) do_perspective::@6
(label) do_perspective::@7
(label) do_perspective::@8
(label) do_perspective::@9
(label) do_perspective::@return
(const string) do_perspective::str str = (string) "(@"
(const string) do_perspective::str1 str1 = (string) ",@"
(const string) do_perspective::str3 str3 = (string) ") -> (@"
(const string) do_perspective::str5 str5 = (string) ")@"
(signed byte) do_perspective::x
(const signed byte) do_perspective::x#0 x = (byte/signed byte/word/signed word/dword/signed dword) 57
(signed byte) do_perspective::y
(const signed byte) do_perspective::y#0 y = -(byte/signed byte/word/signed word/dword/signed dword) 71
(signed byte) do_perspective::z
(const signed byte) do_perspective::z#0 z = (byte/signed byte/word/signed word/dword/signed dword) 54
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@return
(void()) mulf_init()
(byte/signed word/word/dword/signed dword~) mulf_init::$10 reg byte a 22.0
(byte~) mulf_init::$2 reg byte a 22.0
(byte~) mulf_init::$4 reg byte a 22.0
(byte/signed word/word/dword/signed dword~) mulf_init::$8 reg byte a 22.0
(label) mulf_init::@1
(label) mulf_init::@return
(signed word) mulf_init::add
(signed word) mulf_init::add#1 add zp ZP_WORD:4 7.333333333333333
(signed word) mulf_init::add#2 add zp ZP_WORD:4 2.1999999999999997
(byte) mulf_init::i
(byte) mulf_init::i#1 reg byte x 16.5
(byte) mulf_init::i#2 reg byte x 6.875
(signed word) mulf_init::sqr
(signed word) mulf_init::sqr#1 sqr zp ZP_WORD:2 5.5
(signed word) mulf_init::sqr#2 sqr zp ZP_WORD:2 2.357142857142857
(byte) mulf_init::val
(byte) mulf_init::val#0 val zp ZP_BYTE:6 8.25
(byte[512]) mulf_sqr1
(const byte[512]) mulf_sqr1#0 mulf_sqr1 = { fill( 512, 0) }
(byte[512]) mulf_sqr2
(const byte[512]) mulf_sqr2#0 mulf_sqr2 = { fill( 512, 0) }
(void()) perspective((signed byte) perspective::x , (signed byte) perspective::y , (signed byte) perspective::z)
(label) perspective::@return
(signed byte) perspective::x
(signed byte) perspective::y
(signed byte) perspective::z
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte a 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#3 reg byte x 2.5
(byte~) print_byte::b#5 reg byte x 4.0
(byte~) print_byte::b#6 reg byte x 4.0
(byte~) print_byte::b#7 reg byte x 4.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#2 reg byte a 4.0
(byte) print_char::ch#3 reg byte a 4.0
(byte) print_char::ch#4 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:4 11.0
(byte*) print_char_cursor#12 print_char_cursor zp ZP_WORD:4 0.6666666666666666
(byte*) print_char_cursor#2 print_char_cursor zp ZP_WORD:4 2.076923076923077
(byte*) print_char_cursor#44 print_char_cursor zp ZP_WORD:4 6.0
(byte*) print_char_cursor#69 print_char_cursor zp ZP_WORD:4 2.6666666666666665
(byte*) print_char_cursor#74 print_char_cursor zp ZP_WORD:4 12.0
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
(byte*) print_cls::sc
(byte*) print_cls::sc#1 sc zp ZP_WORD:2 16.5
(byte*) print_cls::sc#2 sc zp ZP_WORD:2 16.5
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(byte*) print_line_cursor
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:2 16.5
(byte*) print_line_cursor#11 print_line_cursor zp ZP_WORD:2 22.0
(void()) print_ln()
(label) print_ln::@1
(label) print_ln::@return
(void()) print_sbyte((signed byte) print_sbyte::b)
(label) print_sbyte::@1
(label) print_sbyte::@2
(label) print_sbyte::@3
(label) print_sbyte::@5
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 reg byte x 4.0
(signed byte) print_sbyte::b#4 reg byte x 1.0
(signed byte) print_sbyte::b#6 reg byte x 4.0
(byte*) print_screen
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0 str zp ZP_WORD:2 22.0
(byte*) print_str::str#7 str zp ZP_WORD:2 11.5
(byte*) print_str::str#9 str zp ZP_WORD:2 2.0
(word*) psp1
(const word*) psp1#0 psp1 = ((word*))(byte/word/signed word/dword/signed dword) 243
(word*) psp2
(const word*) psp2#0 psp2 = ((word*))(byte/word/signed word/dword/signed dword) 245
(signed byte*) xr
(const signed byte*) xr#0 xr = ((signed byte*))(byte/word/signed word/dword/signed dword) 240
(signed byte*) yr
(const signed byte*) yr#0 yr = ((signed byte*))(byte/word/signed word/dword/signed dword) 241
(signed byte*) zr
(const signed byte*) zr#0 zr = ((signed byte*))(byte/word/signed word/dword/signed dword) 242

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


FINAL ASSEMBLER
Score: 3781

//SEG0 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  
//SEG1 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
//SEG2 Global Constants & labels
  // The rotated point - updated by calling rotate()
  .label xr = $f0
  .label yr = $f1
  .label zr = $f2
  // Pointers used to multiply perspective (d/z0-z) onto x- & y-coordinates. Points into mulf_sqr1 / mulf_sqr2.  
  .label psp1 = $f3
  .label psp2 = $f5
  // Perspective multiplication table containing (d/(z0-z)[z] for each z-value   
  .label PERSP_Z = $2400
  .label print_char_cursor = 4
  .label print_line_cursor = 2
//SEG3 @begin
//SEG4 @27
//SEG5 kickasm(location (const signed byte*) PERSP_Z#0) {{ {     .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)));     	}     } 	}  }}
//SEG6 [2] call main 
//SEG7 [3] phi from @27 to @end [phi:@27->@end]
//SEG8 @end
//SEG9 main
main: {
  //SEG10 asm { sei  }
    sei
  //SEG11 [5] call mulf_init 
  //SEG12 [85] phi from main to mulf_init [phi:main->mulf_init]
    jsr mulf_init
  //SEG13 main::@1
  //SEG14 [6] *((const word*) psp1#0) ← ((word))(const byte[512]) mulf_sqr1#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr1
    sta psp1
    lda #>mulf_sqr1
    sta psp1+1
  //SEG15 [7] *((const word*) psp2#0) ← ((word))(const byte[512]) mulf_sqr2#0 -- _deref_pwuc1=vwuc2 
    lda #<mulf_sqr2
    sta psp2
    lda #>mulf_sqr2
    sta psp2+1
  //SEG16 [8] call print_cls 
  //SEG17 [79] phi from main::@1 to print_cls [phi:main::@1->print_cls]
    jsr print_cls
  //SEG18 [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  //SEG19 main::@2
  //SEG20 [10] call do_perspective 
  //SEG21 [12] phi from main::@2 to do_perspective [phi:main::@2->do_perspective]
    jsr do_perspective
  //SEG22 main::@return
  //SEG23 [11] return 
    rts
}
//SEG24 do_perspective
do_perspective: {
    .label y = -$47
    .label x = $39
    .label z = $36
  //SEG25 [13] call print_str 
  //SEG26 [44] phi from do_perspective to print_str [phi:do_perspective->print_str]
  //SEG27 [44] phi (byte*) print_char_cursor#74 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:do_perspective->print_str#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
  //SEG28 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str [phi:do_perspective->print_str#1] -- pbuz1=pbuc1 
    lda #<str
    sta print_str.str
    lda #>str
    sta print_str.str+1
    jsr print_str
  //SEG29 [14] phi from do_perspective to do_perspective::@1 [phi:do_perspective->do_perspective::@1]
  //SEG30 do_perspective::@1
  //SEG31 [15] call print_sbyte 
  //SEG32 [68] phi from do_perspective::@1 to print_sbyte [phi:do_perspective::@1->print_sbyte]
  //SEG33 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::x#0 [phi:do_perspective::@1->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #x
    jsr print_sbyte
  //SEG34 [16] phi from do_perspective::@1 to do_perspective::@2 [phi:do_perspective::@1->do_perspective::@2]
  //SEG35 do_perspective::@2
  //SEG36 [17] call print_str 
  //SEG37 [44] phi from do_perspective::@2 to print_str [phi:do_perspective::@2->print_str]
  //SEG38 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@2->print_str#0] -- register_copy 
  //SEG39 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@2->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG40 [18] phi from do_perspective::@2 to do_perspective::@3 [phi:do_perspective::@2->do_perspective::@3]
  //SEG41 do_perspective::@3
  //SEG42 [19] call print_sbyte 
  //SEG43 [68] phi from do_perspective::@3 to print_sbyte [phi:do_perspective::@3->print_sbyte]
  //SEG44 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::y#0 [phi:do_perspective::@3->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #y
    jsr print_sbyte
  //SEG45 [20] phi from do_perspective::@3 to do_perspective::@4 [phi:do_perspective::@3->do_perspective::@4]
  //SEG46 do_perspective::@4
  //SEG47 [21] call print_str 
  //SEG48 [44] phi from do_perspective::@4 to print_str [phi:do_perspective::@4->print_str]
  //SEG49 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@4->print_str#0] -- register_copy 
  //SEG50 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@4->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG51 [22] phi from do_perspective::@4 to do_perspective::@5 [phi:do_perspective::@4->do_perspective::@5]
  //SEG52 do_perspective::@5
  //SEG53 [23] call print_sbyte 
  //SEG54 [68] phi from do_perspective::@5 to print_sbyte [phi:do_perspective::@5->print_sbyte]
  //SEG55 [68] phi (signed byte) print_sbyte::b#4 = (const signed byte) do_perspective::z#0 [phi:do_perspective::@5->print_sbyte#0] -- vbsxx=vbsc1 
    ldx #z
    jsr print_sbyte
  //SEG56 [24] phi from do_perspective::@5 to do_perspective::@6 [phi:do_perspective::@5->do_perspective::@6]
  //SEG57 do_perspective::@6
  //SEG58 [25] call print_str 
  //SEG59 [44] phi from do_perspective::@6 to print_str [phi:do_perspective::@6->print_str]
  //SEG60 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@6->print_str#0] -- register_copy 
  //SEG61 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str3 [phi:do_perspective::@6->print_str#1] -- pbuz1=pbuc1 
    lda #<str3
    sta print_str.str
    lda #>str3
    sta print_str.str+1
    jsr print_str
  //SEG62 [26] phi from do_perspective::@6 to do_perspective::@7 [phi:do_perspective::@6->do_perspective::@7]
  //SEG63 do_perspective::@7
  //SEG64 [27] call perspective 
    jsr perspective
  //SEG65 do_perspective::@8
  //SEG66 [28] (byte~) print_byte::b#6 ← (byte)*((const signed byte*) xr#0) -- vbuxx=_deref_pbuc1 
    ldx xr
  //SEG67 [29] call print_byte 
  //SEG68 [51] phi from do_perspective::@8 to print_byte [phi:do_perspective::@8->print_byte]
  //SEG69 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@8->print_byte#0] -- register_copy 
  //SEG70 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#6 [phi:do_perspective::@8->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG71 [30] phi from do_perspective::@8 to do_perspective::@9 [phi:do_perspective::@8->do_perspective::@9]
  //SEG72 do_perspective::@9
  //SEG73 [31] call print_str 
  //SEG74 [44] phi from do_perspective::@9 to print_str [phi:do_perspective::@9->print_str]
  //SEG75 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@9->print_str#0] -- register_copy 
  //SEG76 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str1 [phi:do_perspective::@9->print_str#1] -- pbuz1=pbuc1 
    lda #<str1
    sta print_str.str
    lda #>str1
    sta print_str.str+1
    jsr print_str
  //SEG77 do_perspective::@10
  //SEG78 [32] (byte~) print_byte::b#5 ← (byte)*((const signed byte*) yr#0) -- vbuxx=_deref_pbuc1 
    ldx yr
  //SEG79 [33] call print_byte 
  //SEG80 [51] phi from do_perspective::@10 to print_byte [phi:do_perspective::@10->print_byte]
  //SEG81 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#2 [phi:do_perspective::@10->print_byte#0] -- register_copy 
  //SEG82 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#5 [phi:do_perspective::@10->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG83 [34] phi from do_perspective::@10 to do_perspective::@11 [phi:do_perspective::@10->do_perspective::@11]
  //SEG84 do_perspective::@11
  //SEG85 [35] call print_str 
  //SEG86 [44] phi from do_perspective::@11 to print_str [phi:do_perspective::@11->print_str]
  //SEG87 [44] phi (byte*) print_char_cursor#74 = (byte*) print_char_cursor#12 [phi:do_perspective::@11->print_str#0] -- register_copy 
  //SEG88 [44] phi (byte*) print_str::str#9 = (const string) do_perspective::str5 [phi:do_perspective::@11->print_str#1] -- pbuz1=pbuc1 
    lda #<str5
    sta print_str.str
    lda #>str5
    sta print_str.str+1
    jsr print_str
  //SEG89 [36] phi from do_perspective::@11 to do_perspective::@12 [phi:do_perspective::@11->do_perspective::@12]
  //SEG90 do_perspective::@12
  //SEG91 [37] call print_ln 
  //SEG92 [39] phi from do_perspective::@12 to print_ln [phi:do_perspective::@12->print_ln]
    jsr print_ln
  //SEG93 do_perspective::@return
  //SEG94 [38] return 
    rts
    str: .text "(@"
    str1: .text ",@"
    str3: .text ") -> (@"
    str5: .text ")@"
}
//SEG95 print_ln
// Print a newline
print_ln: {
  //SEG96 [40] phi from print_ln to print_ln::@1 [phi:print_ln->print_ln::@1]
  //SEG97 [40] phi (byte*) print_line_cursor#11 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_ln->print_ln::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_line_cursor
    lda #>$400
    sta print_line_cursor+1
  //SEG98 [40] phi from print_ln::@1 to print_ln::@1 [phi:print_ln::@1->print_ln::@1]
  //SEG99 [40] phi (byte*) print_line_cursor#11 = (byte*) print_line_cursor#1 [phi:print_ln::@1->print_ln::@1#0] -- register_copy 
  //SEG100 print_ln::@1
  b1:
  //SEG101 [41] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#11 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 
    lda print_line_cursor
    clc
    adc #$28
    sta print_line_cursor
    bcc !+
    inc print_line_cursor+1
  !:
  //SEG102 [42] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 
    lda print_line_cursor+1
    cmp print_char_cursor+1
    bcc b1
    bne !+
    lda print_line_cursor
    cmp print_char_cursor
    bcc b1
  !:
  //SEG103 print_ln::@return
  //SEG104 [43] return 
    rts
}
//SEG105 print_str
// Print a zero-terminated string
// print_str(byte* zeropage(2) str)
print_str: {
    .label str = 2
  //SEG106 [45] phi from print_str print_str::@2 to print_str::@1 [phi:print_str/print_str::@2->print_str::@1]
  //SEG107 [45] phi (byte*) print_char_cursor#2 = (byte*) print_char_cursor#74 [phi:print_str/print_str::@2->print_str::@1#0] -- register_copy 
  //SEG108 [45] phi (byte*) print_str::str#7 = (byte*) print_str::str#9 [phi:print_str/print_str::@2->print_str::@1#1] -- register_copy 
  //SEG109 print_str::@1
  b1:
  //SEG110 [46] if(*((byte*) print_str::str#7)!=(byte) '@') goto print_str::@2 -- _deref_pbuz1_neq_vbuc1_then_la1 
    ldy #0
    lda (str),y
    cmp #'@'
    bne b2
  //SEG111 print_str::@return
  //SEG112 [47] return 
    rts
  //SEG113 print_str::@2
  b2:
  //SEG114 [48] *((byte*) print_char_cursor#2) ← *((byte*) print_str::str#7) -- _deref_pbuz1=_deref_pbuz2 
    ldy #0
    lda (str),y
    sta (print_char_cursor),y
  //SEG115 [49] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#2 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
  //SEG116 [50] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#7 -- pbuz1=_inc_pbuz1 
    inc str
    bne !+
    inc str+1
  !:
    jmp b1
}
//SEG117 print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
  //SEG118 [52] (byte~) print_byte::$0 ← (byte) print_byte::b#3 >> (byte/signed byte/word/signed word/dword/signed dword) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
  //SEG119 [53] (byte) print_char::ch#2 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG120 [54] call print_char 
  //SEG121 [59] phi from print_byte to print_char [phi:print_byte->print_char]
  //SEG122 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#69 [phi:print_byte->print_char#0] -- register_copy 
  //SEG123 [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#2 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
  //SEG124 print_byte::@1
  //SEG125 [55] (byte~) print_byte::$2 ← (byte) print_byte::b#3 & (byte/signed byte/word/signed word/dword/signed dword) 15 -- vbuaa=vbuxx_band_vbuc1 
    txa
    and #$f
  //SEG126 [56] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
  //SEG127 [57] call print_char 
  //SEG128 [59] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  //SEG129 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#12 [phi:print_byte::@1->print_char#0] -- register_copy 
  //SEG130 [59] phi (byte) print_char::ch#4 = (byte) print_char::ch#3 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
  //SEG131 print_byte::@return
  //SEG132 [58] return 
    rts
}
//SEG133 print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
  //SEG134 [60] *((byte*) print_char_cursor#44) ← (byte) print_char::ch#4 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
  //SEG135 [61] (byte*) print_char_cursor#12 ← ++ (byte*) print_char_cursor#44 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
  //SEG136 print_char::@return
  //SEG137 [62] return 
    rts
}
//SEG138 perspective
// Apply perspective to a 3d-point. Result is returned in (*xr,*yr) 
// Implemented in assembler to utilize seriously fast multiplication 
perspective: {
  //SEG139 [63] *((const signed byte*) xr#0) ← (const signed byte) do_perspective::x#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.x
    sta xr
  //SEG140 [64] *((const signed byte*) yr#0) ← (const signed byte) do_perspective::y#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.y
    sta yr
  //SEG141 [65] *((const signed byte*) zr#0) ← (const signed byte) do_perspective::z#0 -- _deref_pbsc1=vbsc2 
    lda #do_perspective.z
    sta zr
  //SEG142 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
  //SEG143 perspective::@return
  //SEG144 [67] return 
    rts
}
//SEG145 print_sbyte
// Print a signed byte as HEX
// print_sbyte(signed byte register(X) b)
print_sbyte: {
  //SEG146 [69] if((signed byte) print_sbyte::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -- vbsxx_lt_0_then_la1 
    cpx #0
    bmi b1
  //SEG147 [70] phi from print_sbyte to print_sbyte::@3 [phi:print_sbyte->print_sbyte::@3]
  //SEG148 print_sbyte::@3
  //SEG149 [71] call print_char 
  //SEG150 [59] phi from print_sbyte::@3 to print_char [phi:print_sbyte::@3->print_char]
  //SEG151 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@3->print_char#0] -- register_copy 
  //SEG152 [59] phi (byte) print_char::ch#4 = (byte) ' ' [phi:print_sbyte::@3->print_char#1] -- vbuaa=vbuc1 
    lda #' '
    jsr print_char
  //SEG153 [72] phi from print_sbyte::@3 print_sbyte::@5 to print_sbyte::@2 [phi:print_sbyte::@3/print_sbyte::@5->print_sbyte::@2]
  //SEG154 [72] phi (signed byte) print_sbyte::b#6 = (signed byte) print_sbyte::b#4 [phi:print_sbyte::@3/print_sbyte::@5->print_sbyte::@2#0] -- register_copy 
  //SEG155 print_sbyte::@2
  b2:
  //SEG156 [73] (byte~) print_byte::b#7 ← (byte)(signed byte) print_sbyte::b#6
  //SEG157 [74] call print_byte 
  //SEG158 [51] phi from print_sbyte::@2 to print_byte [phi:print_sbyte::@2->print_byte]
  //SEG159 [51] phi (byte*) print_char_cursor#69 = (byte*) print_char_cursor#12 [phi:print_sbyte::@2->print_byte#0] -- register_copy 
  //SEG160 [51] phi (byte) print_byte::b#3 = (byte~) print_byte::b#7 [phi:print_sbyte::@2->print_byte#1] -- register_copy 
    jsr print_byte
  //SEG161 print_sbyte::@return
  //SEG162 [75] return 
    rts
  //SEG163 [76] phi from print_sbyte to print_sbyte::@1 [phi:print_sbyte->print_sbyte::@1]
  //SEG164 print_sbyte::@1
  b1:
  //SEG165 [77] call print_char 
  //SEG166 [59] phi from print_sbyte::@1 to print_char [phi:print_sbyte::@1->print_char]
  //SEG167 [59] phi (byte*) print_char_cursor#44 = (byte*) print_char_cursor#2 [phi:print_sbyte::@1->print_char#0] -- register_copy 
  //SEG168 [59] phi (byte) print_char::ch#4 = (byte) '-' [phi:print_sbyte::@1->print_char#1] -- vbuaa=vbuc1 
    lda #'-'
    jsr print_char
  //SEG169 print_sbyte::@5
  //SEG170 [78] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#4 -- vbsxx=_neg_vbsxx 
    txa
    eor #$ff
    clc
    adc #1
    tax
    jmp b2
}
//SEG171 print_cls
// Clear the screen. Also resets current line/char cursor.
print_cls: {
    .label sc = 2
  //SEG172 [80] phi from print_cls to print_cls::@1 [phi:print_cls->print_cls::@1]
  //SEG173 [80] phi (byte*) print_cls::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:print_cls->print_cls::@1#0] -- pbuz1=pbuc1 
    lda #<$400
    sta sc
    lda #>$400
    sta sc+1
  //SEG174 [80] phi from print_cls::@1 to print_cls::@1 [phi:print_cls::@1->print_cls::@1]
  //SEG175 [80] phi (byte*) print_cls::sc#2 = (byte*) print_cls::sc#1 [phi:print_cls::@1->print_cls::@1#0] -- register_copy 
  //SEG176 print_cls::@1
  b1:
  //SEG177 [81] *((byte*) print_cls::sc#2) ← (byte) ' ' -- _deref_pbuz1=vbuc1 
    lda #' '
    ldy #0
    sta (sc),y
  //SEG178 [82] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2 -- pbuz1=_inc_pbuz1 
    inc sc
    bne !+
    inc sc+1
  !:
  //SEG179 [83] if((byte*) print_cls::sc#1!=((byte*))(word/signed word/dword/signed dword) 1024+(word/signed word/dword/signed dword) 1000) goto print_cls::@1 -- pbuz1_neq_pbuc1_then_la1 
    lda sc+1
    cmp #>$400+$3e8
    bne b1
    lda sc
    cmp #<$400+$3e8
    bne b1
  //SEG180 print_cls::@return
  //SEG181 [84] return 
    rts
}
//SEG182 mulf_init
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x) and g(x) = f(1-x) 
mulf_init: {
    .label val = 6
    .label sqr = 2
    .label add = 4
  //SEG183 [86] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1]
  //SEG184 [86] phi (signed word) mulf_init::add#2 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:mulf_init->mulf_init::@1#0] -- vwsz1=vbuc1 
    lda #<1
    sta add
    lda #>1
    sta add+1
  //SEG185 [86] phi (byte) mulf_init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mulf_init->mulf_init::@1#1] -- vbuxx=vbuc1 
    tax
  //SEG186 [86] phi (signed word) mulf_init::sqr#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:mulf_init->mulf_init::@1#2] -- vwsz1=vbuc1 
    sta sqr
    sta sqr+1
  //SEG187 [86] phi from mulf_init::@1 to mulf_init::@1 [phi:mulf_init::@1->mulf_init::@1]
  //SEG188 [86] phi (signed word) mulf_init::add#2 = (signed word) mulf_init::add#1 [phi:mulf_init::@1->mulf_init::@1#0] -- register_copy 
  //SEG189 [86] phi (byte) mulf_init::i#2 = (byte) mulf_init::i#1 [phi:mulf_init::@1->mulf_init::@1#1] -- register_copy 
  //SEG190 [86] phi (signed word) mulf_init::sqr#2 = (signed word) mulf_init::sqr#1 [phi:mulf_init::@1->mulf_init::@1#2] -- register_copy 
  //SEG191 mulf_init::@1
  b1:
  //SEG192 [87] (byte) mulf_init::val#0 ← > (signed word) mulf_init::sqr#2 -- vbuz1=_hi_vwsz2 
    lda sqr+1
    sta val
  //SEG193 [88] *((const byte[512]) mulf_sqr1#0 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr1,x
  //SEG194 [89] *((const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr1+$100,x
  //SEG195 [90] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2 -- vbuaa=_neg_vbuxx 
    txa
    eor #$ff
    clc
    adc #1
  //SEG196 [91] *((const byte[512]) mulf_sqr1#0 + (byte~) mulf_init::$2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr1,y
  //SEG197 [92] (byte~) mulf_init::$4 ← - (byte) mulf_init::i#2 -- vbuaa=_neg_vbuxx 
    txa
    eor #$ff
    clc
    adc #1
  //SEG198 [93] *((const byte[512]) mulf_sqr1#0+(word/signed word/dword/signed dword) 256 + (byte~) mulf_init::$4) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr1+$100,y
  //SEG199 [94] *((const byte[512]) mulf_sqr2#0+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr2+1,x
  //SEG200 [95] *((const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256+(byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) mulf_init::i#2) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuxx=vbuz1 
    sta mulf_sqr2+$100+1,x
  //SEG201 [96] (byte/signed word/word/dword/signed dword~) mulf_init::$8 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2 -- vbuaa=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    clc
    adc #1+1
  //SEG202 [97] *((const byte[512]) mulf_sqr2#0 + (byte/signed word/word/dword/signed dword~) mulf_init::$8) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr2,y
  //SEG203 [98] (byte/signed word/word/dword/signed dword~) mulf_init::$10 ← (byte/signed byte/word/signed word/dword/signed dword) 1 - (byte) mulf_init::i#2 -- vbuaa=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    clc
    adc #1+1
  //SEG204 [99] *((const byte[512]) mulf_sqr2#0+(word/signed word/dword/signed dword) 256 + (byte/signed word/word/dword/signed dword~) mulf_init::$10) ← (byte) mulf_init::val#0 -- pbuc1_derefidx_vbuaa=vbuz1 
    tay
    lda val
    sta mulf_sqr2+$100,y
  //SEG205 [100] (signed word) mulf_init::sqr#1 ← (signed word) mulf_init::sqr#2 + (signed word) mulf_init::add#2 -- vwsz1=vwsz1_plus_vwsz2 
    lda sqr
    clc
    adc add
    sta sqr
    lda sqr+1
    adc add+1
    sta sqr+1
  //SEG206 [101] (signed word) mulf_init::add#1 ← (signed word) mulf_init::add#2 + (byte/signed byte/word/signed word/dword/signed dword) 2 -- vwsz1=vwsz1_plus_2 
    lda add
    clc
    adc #2
    sta add
    bcc !+
    inc add+1
  !:
  //SEG207 [102] (byte) mulf_init::i#1 ← ++ (byte) mulf_init::i#2 -- vbuxx=_inc_vbuxx 
    inx
  //SEG208 [103] if((byte) mulf_init::i#1!=(byte/word/signed word/dword/signed dword) 129) goto mulf_init::@1 -- vbuxx_neq_vbuc1_then_la1 
    cpx #$81
    bne b1
  //SEG209 mulf_init::@return
  //SEG210 [104] return 
    rts
}
  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
.pc = PERSP_Z "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)));
    	}
    }
	}


