Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO
Inlined call vicSelectGfxBank::$0 = call toDd00(vicSelectGfxBank::gfx)
Inlined call main::$1 = call toD018(SCREEN, CHARSET)
Inlined call call __init
Eliminating unused variable with no statement main::$5
Eliminating unused variable with no statement main::$7

CONTROL FLOW GRAPH SSA

void init_font_hex(char *charset)
init_font_hex: scope:[init_font_hex]  from main
  init_font_hex::charset#6 = phi( main/init_font_hex::charset#1 )
  init_font_hex::proto_hi#0 = FONT_HEX_PROTO
  init_font_hex::c#0 = 0
  to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex]  from init_font_hex init_font_hex::@5
  init_font_hex::c#6 = phi( init_font_hex/init_font_hex::c#0, init_font_hex::@5/init_font_hex::c#1 )
  init_font_hex::proto_hi#6 = phi( init_font_hex/init_font_hex::proto_hi#0, init_font_hex::@5/init_font_hex::proto_hi#1 )
  init_font_hex::charset#5 = phi( init_font_hex/init_font_hex::charset#6, init_font_hex::@5/init_font_hex::charset#7 )
  init_font_hex::proto_lo#0 = FONT_HEX_PROTO
  init_font_hex::c1#0 = 0
  to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex]  from init_font_hex::@1 init_font_hex::@4
  init_font_hex::c#5 = phi( init_font_hex::@1/init_font_hex::c#6, init_font_hex::@4/init_font_hex::c#3 )
  init_font_hex::c1#4 = phi( init_font_hex::@1/init_font_hex::c1#0, init_font_hex::@4/init_font_hex::c1#1 )
  init_font_hex::proto_lo#4 = phi( init_font_hex::@1/init_font_hex::proto_lo#0, init_font_hex::@4/init_font_hex::proto_lo#1 )
  init_font_hex::proto_hi#4 = phi( init_font_hex::@1/init_font_hex::proto_hi#6, init_font_hex::@4/init_font_hex::proto_hi#5 )
  init_font_hex::charset#2 = phi( init_font_hex::@1/init_font_hex::charset#5, init_font_hex::@4/init_font_hex::charset#0 )
  init_font_hex::idx#0 = 0
  init_font_hex::charset#2[init_font_hex::idx#0] = 0
  init_font_hex::idx#1 = ++ init_font_hex::idx#0
  init_font_hex::i#0 = 0
  to:init_font_hex::@3
init_font_hex::@3: scope:[init_font_hex]  from init_font_hex::@2 init_font_hex::@3
  init_font_hex::c#4 = phi( init_font_hex::@2/init_font_hex::c#5, init_font_hex::@3/init_font_hex::c#4 )
  init_font_hex::c1#3 = phi( init_font_hex::@2/init_font_hex::c1#4, init_font_hex::@3/init_font_hex::c1#3 )
  init_font_hex::idx#5 = phi( init_font_hex::@2/init_font_hex::idx#1, init_font_hex::@3/init_font_hex::idx#2 )
  init_font_hex::charset#3 = phi( init_font_hex::@2/init_font_hex::charset#2, init_font_hex::@3/init_font_hex::charset#3 )
  init_font_hex::proto_lo#2 = phi( init_font_hex::@2/init_font_hex::proto_lo#4, init_font_hex::@3/init_font_hex::proto_lo#2 )
  init_font_hex::i#2 = phi( init_font_hex::@2/init_font_hex::i#0, init_font_hex::@3/init_font_hex::i#1 )
  init_font_hex::proto_hi#2 = phi( init_font_hex::@2/init_font_hex::proto_hi#4, init_font_hex::@3/init_font_hex::proto_hi#2 )
  init_font_hex::$0 = init_font_hex::proto_hi#2[init_font_hex::i#2] << 4
  init_font_hex::$1 = init_font_hex::proto_lo#2[init_font_hex::i#2] << 1
  init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1
  init_font_hex::charset#3[init_font_hex::idx#5] = init_font_hex::$2
  init_font_hex::idx#2 = ++ init_font_hex::idx#5
  init_font_hex::i#1 = init_font_hex::i#2 + rangenext(0,4)
  init_font_hex::$3 = init_font_hex::i#1 != rangelast(0,4)
  if(init_font_hex::$3) goto init_font_hex::@3
  to:init_font_hex::@4
init_font_hex::@4: scope:[init_font_hex]  from init_font_hex::@3
  init_font_hex::c#3 = phi( init_font_hex::@3/init_font_hex::c#4 )
  init_font_hex::proto_hi#5 = phi( init_font_hex::@3/init_font_hex::proto_hi#2 )
  init_font_hex::c1#2 = phi( init_font_hex::@3/init_font_hex::c1#3 )
  init_font_hex::proto_lo#3 = phi( init_font_hex::@3/init_font_hex::proto_lo#2 )
  init_font_hex::idx#6 = phi( init_font_hex::@3/init_font_hex::idx#2 )
  init_font_hex::charset#4 = phi( init_font_hex::@3/init_font_hex::charset#3 )
  init_font_hex::charset#4[init_font_hex::idx#6] = 0
  init_font_hex::idx#3 = ++ init_font_hex::idx#6
  init_font_hex::charset#4[init_font_hex::idx#3] = 0
  init_font_hex::idx#4 = ++ init_font_hex::idx#3
  init_font_hex::proto_lo#1 = init_font_hex::proto_lo#3 + 5
  init_font_hex::charset#0 = init_font_hex::charset#4 + 8
  init_font_hex::c1#1 = init_font_hex::c1#2 + rangenext(0,$f)
  init_font_hex::$4 = init_font_hex::c1#1 != rangelast(0,$f)
  if(init_font_hex::$4) goto init_font_hex::@2
  to:init_font_hex::@5
init_font_hex::@5: scope:[init_font_hex]  from init_font_hex::@4
  init_font_hex::charset#7 = phi( init_font_hex::@4/init_font_hex::charset#0 )
  init_font_hex::c#2 = phi( init_font_hex::@4/init_font_hex::c#3 )
  init_font_hex::proto_hi#3 = phi( init_font_hex::@4/init_font_hex::proto_hi#5 )
  init_font_hex::proto_hi#1 = init_font_hex::proto_hi#3 + 5
  init_font_hex::c#1 = init_font_hex::c#2 + rangenext(0,$f)
  init_font_hex::$5 = init_font_hex::c#1 != rangelast(0,$f)
  if(init_font_hex::$5) goto init_font_hex::@1
  to:init_font_hex::@return
init_font_hex::@return: scope:[init_font_hex]  from init_font_hex::@5
  return 
  to:@return

unsigned int atan2_16(int x , int y)
atan2_16: scope:[atan2_16]  from main::@2
  atan2_16::x#9 = phi( main::@2/atan2_16::x#0 )
  atan2_16::y#1 = phi( main::@2/atan2_16::y#0 )
  atan2_16::$0 = atan2_16::y#1 >= 0
  if(atan2_16::$0) goto atan2_16::@1
  to:atan2_16::@2
atan2_16::@1: scope:[atan2_16]  from atan2_16
  atan2_16::x#5 = phi( atan2_16/atan2_16::x#9 )
  atan2_16::y#2 = phi( atan2_16/atan2_16::y#1 )
  atan2_16::$3 = atan2_16::y#2
  to:atan2_16::@3
atan2_16::@2: scope:[atan2_16]  from atan2_16
  atan2_16::x#6 = phi( atan2_16/atan2_16::x#9 )
  atan2_16::y#3 = phi( atan2_16/atan2_16::y#1 )
  atan2_16::$1 = - atan2_16::y#3
  atan2_16::$2 = atan2_16::$1
  to:atan2_16::@3
atan2_16::@3: scope:[atan2_16]  from atan2_16::@1 atan2_16::@2
  atan2_16::y#15 = phi( atan2_16::@1/atan2_16::y#2, atan2_16::@2/atan2_16::y#3 )
  atan2_16::x#1 = phi( atan2_16::@1/atan2_16::x#5, atan2_16::@2/atan2_16::x#6 )
  atan2_16::$4 = phi( atan2_16::@1/atan2_16::$3, atan2_16::@2/atan2_16::$2 )
  atan2_16::yi#0 = atan2_16::$4
  atan2_16::$5 = atan2_16::x#1 >= 0
  if(atan2_16::$5) goto atan2_16::@4
  to:atan2_16::@5
atan2_16::@4: scope:[atan2_16]  from atan2_16::@3
  atan2_16::y#12 = phi( atan2_16::@3/atan2_16::y#15 )
  atan2_16::yi#12 = phi( atan2_16::@3/atan2_16::yi#0 )
  atan2_16::x#2 = phi( atan2_16::@3/atan2_16::x#1 )
  atan2_16::$8 = atan2_16::x#2
  to:atan2_16::@6
atan2_16::@5: scope:[atan2_16]  from atan2_16::@3
  atan2_16::y#13 = phi( atan2_16::@3/atan2_16::y#15 )
  atan2_16::yi#13 = phi( atan2_16::@3/atan2_16::yi#0 )
  atan2_16::x#3 = phi( atan2_16::@3/atan2_16::x#1 )
  atan2_16::$6 = - atan2_16::x#3
  atan2_16::$7 = atan2_16::$6
  to:atan2_16::@6
atan2_16::@6: scope:[atan2_16]  from atan2_16::@4 atan2_16::@5
  atan2_16::y#9 = phi( atan2_16::@4/atan2_16::y#12, atan2_16::@5/atan2_16::y#13 )
  atan2_16::x#10 = phi( atan2_16::@4/atan2_16::x#2, atan2_16::@5/atan2_16::x#3 )
  atan2_16::yi#9 = phi( atan2_16::@4/atan2_16::yi#12, atan2_16::@5/atan2_16::yi#13 )
  atan2_16::$9 = phi( atan2_16::@4/atan2_16::$8, atan2_16::@5/atan2_16::$7 )
  atan2_16::xi#0 = atan2_16::$9
  atan2_16::angle#0 = 0
  atan2_16::i#0 = 0
  to:atan2_16::@10
atan2_16::@10: scope:[atan2_16]  from atan2_16::@19 atan2_16::@6
  atan2_16::y#7 = phi( atan2_16::@19/atan2_16::y#8, atan2_16::@6/atan2_16::y#9 )
  atan2_16::x#7 = phi( atan2_16::@19/atan2_16::x#8, atan2_16::@6/atan2_16::x#10 )
  atan2_16::angle#12 = phi( atan2_16::@19/atan2_16::angle#13, atan2_16::@6/atan2_16::angle#0 )
  atan2_16::i#6 = phi( atan2_16::@19/atan2_16::i#1, atan2_16::@6/atan2_16::i#0 )
  atan2_16::xi#6 = phi( atan2_16::@19/atan2_16::xi#8, atan2_16::@6/atan2_16::xi#0 )
  atan2_16::yi#3 = phi( atan2_16::@19/atan2_16::yi#8, atan2_16::@6/atan2_16::yi#9 )
  atan2_16::$16 = atan2_16::yi#3 == 0
  atan2_16::$17 = ! atan2_16::$16
  if(atan2_16::$17) goto atan2_16::@11
  to:atan2_16::@12
atan2_16::@11: scope:[atan2_16]  from atan2_16::@10
  atan2_16::y#19 = phi( atan2_16::@10/atan2_16::y#7 )
  atan2_16::x#17 = phi( atan2_16::@10/atan2_16::x#7 )
  atan2_16::angle#19 = phi( atan2_16::@10/atan2_16::angle#12 )
  atan2_16::i#2 = phi( atan2_16::@10/atan2_16::i#6 )
  atan2_16::yi#4 = phi( atan2_16::@10/atan2_16::yi#3 )
  atan2_16::xi#3 = phi( atan2_16::@10/atan2_16::xi#6 )
  atan2_16::xd#0 = atan2_16::xi#3
  atan2_16::yd#0 = atan2_16::yi#4
  atan2_16::shift#0 = atan2_16::i#2
  to:atan2_16::@13
atan2_16::@12: scope:[atan2_16]  from atan2_16::@10 atan2_16::@19
  atan2_16::y#5 = phi( atan2_16::@10/atan2_16::y#7, atan2_16::@19/atan2_16::y#8 )
  atan2_16::x#4 = phi( atan2_16::@10/atan2_16::x#7, atan2_16::@19/atan2_16::x#8 )
  atan2_16::angle#6 = phi( atan2_16::@10/atan2_16::angle#12, atan2_16::@19/atan2_16::angle#13 )
  atan2_16::angle#1 = atan2_16::angle#6 / 2
  atan2_16::$10 = atan2_16::x#4 < 0
  atan2_16::$11 = ! atan2_16::$10
  if(atan2_16::$11) goto atan2_16::@7
  to:atan2_16::@21
atan2_16::@13: scope:[atan2_16]  from atan2_16::@11 atan2_16::@14
  atan2_16::y#18 = phi( atan2_16::@11/atan2_16::y#19, atan2_16::@14/atan2_16::y#20 )
  atan2_16::x#16 = phi( atan2_16::@11/atan2_16::x#17, atan2_16::@14/atan2_16::x#18 )
  atan2_16::angle#18 = phi( atan2_16::@11/atan2_16::angle#19, atan2_16::@14/atan2_16::angle#20 )
  atan2_16::i#10 = phi( atan2_16::@11/atan2_16::i#2, atan2_16::@14/atan2_16::i#11 )
  atan2_16::xi#11 = phi( atan2_16::@11/atan2_16::xi#3, atan2_16::@14/atan2_16::xi#12 )
  atan2_16::yi#14 = phi( atan2_16::@11/atan2_16::yi#4, atan2_16::@14/atan2_16::yi#15 )
  atan2_16::yd#7 = phi( atan2_16::@11/atan2_16::yd#0, atan2_16::@14/atan2_16::yd#1 )
  atan2_16::xd#7 = phi( atan2_16::@11/atan2_16::xd#0, atan2_16::@14/atan2_16::xd#1 )
  atan2_16::shift#2 = phi( atan2_16::@11/atan2_16::shift#0, atan2_16::@14/atan2_16::shift#1 )
  atan2_16::$18 = atan2_16::shift#2 >= 2
  if(atan2_16::$18) goto atan2_16::@14
  to:atan2_16::@15
atan2_16::@14: scope:[atan2_16]  from atan2_16::@13
  atan2_16::y#20 = phi( atan2_16::@13/atan2_16::y#18 )
  atan2_16::x#18 = phi( atan2_16::@13/atan2_16::x#16 )
  atan2_16::angle#20 = phi( atan2_16::@13/atan2_16::angle#18 )
  atan2_16::i#11 = phi( atan2_16::@13/atan2_16::i#10 )
  atan2_16::xi#12 = phi( atan2_16::@13/atan2_16::xi#11 )
  atan2_16::yi#15 = phi( atan2_16::@13/atan2_16::yi#14 )
  atan2_16::shift#3 = phi( atan2_16::@13/atan2_16::shift#2 )
  atan2_16::yd#3 = phi( atan2_16::@13/atan2_16::yd#7 )
  atan2_16::xd#3 = phi( atan2_16::@13/atan2_16::xd#7 )
  atan2_16::xd#1 = atan2_16::xd#3 >> 2
  atan2_16::yd#1 = atan2_16::yd#3 >> 2
  atan2_16::shift#1 = atan2_16::shift#3 - 2
  to:atan2_16::@13
atan2_16::@15: scope:[atan2_16]  from atan2_16::@13
  atan2_16::y#16 = phi( atan2_16::@13/atan2_16::y#18 )
  atan2_16::x#14 = phi( atan2_16::@13/atan2_16::x#16 )
  atan2_16::angle#16 = phi( atan2_16::@13/atan2_16::angle#18 )
  atan2_16::i#8 = phi( atan2_16::@13/atan2_16::i#10 )
  atan2_16::xi#9 = phi( atan2_16::@13/atan2_16::xi#11 )
  atan2_16::yd#8 = phi( atan2_16::@13/atan2_16::yd#7 )
  atan2_16::xd#8 = phi( atan2_16::@13/atan2_16::xd#7 )
  atan2_16::yi#10 = phi( atan2_16::@13/atan2_16::yi#14 )
  atan2_16::shift#4 = phi( atan2_16::@13/atan2_16::shift#2 )
  atan2_16::$24 = 0 != atan2_16::shift#4
  atan2_16::$19 = ! atan2_16::$24
  if(atan2_16::$19) goto atan2_16::@17
  to:atan2_16::@16
atan2_16::@17: scope:[atan2_16]  from atan2_16::@15 atan2_16::@16
  atan2_16::y#14 = phi( atan2_16::@15/atan2_16::y#16, atan2_16::@16/atan2_16::y#17 )
  atan2_16::x#13 = phi( atan2_16::@15/atan2_16::x#14, atan2_16::@16/atan2_16::x#15 )
  atan2_16::angle#14 = phi( atan2_16::@15/atan2_16::angle#16, atan2_16::@16/atan2_16::angle#17 )
  atan2_16::i#7 = phi( atan2_16::@15/atan2_16::i#8, atan2_16::@16/atan2_16::i#9 )
  atan2_16::xd#9 = phi( atan2_16::@15/atan2_16::xd#8, atan2_16::@16/atan2_16::xd#2 )
  atan2_16::yd#9 = phi( atan2_16::@15/atan2_16::yd#8, atan2_16::@16/atan2_16::yd#2 )
  atan2_16::xi#7 = phi( atan2_16::@15/atan2_16::xi#9, atan2_16::@16/atan2_16::xi#10 )
  atan2_16::yi#5 = phi( atan2_16::@15/atan2_16::yi#10, atan2_16::@16/atan2_16::yi#11 )
  atan2_16::$20 = atan2_16::yi#5 >= 0
  if(atan2_16::$20) goto atan2_16::@18
  to:atan2_16::@20
atan2_16::@16: scope:[atan2_16]  from atan2_16::@15
  atan2_16::y#17 = phi( atan2_16::@15/atan2_16::y#16 )
  atan2_16::x#15 = phi( atan2_16::@15/atan2_16::x#14 )
  atan2_16::angle#17 = phi( atan2_16::@15/atan2_16::angle#16 )
  atan2_16::i#9 = phi( atan2_16::@15/atan2_16::i#8 )
  atan2_16::xi#10 = phi( atan2_16::@15/atan2_16::xi#9 )
  atan2_16::yi#11 = phi( atan2_16::@15/atan2_16::yi#10 )
  atan2_16::yd#4 = phi( atan2_16::@15/atan2_16::yd#8 )
  atan2_16::xd#4 = phi( atan2_16::@15/atan2_16::xd#8 )
  atan2_16::xd#2 = atan2_16::xd#4 >> 1
  atan2_16::yd#2 = atan2_16::yd#4 >> 1
  to:atan2_16::@17
atan2_16::@18: scope:[atan2_16]  from atan2_16::@17
  atan2_16::y#10 = phi( atan2_16::@17/atan2_16::y#14 )
  atan2_16::x#11 = phi( atan2_16::@17/atan2_16::x#13 )
  atan2_16::angle#7 = phi( atan2_16::@17/atan2_16::angle#14 )
  atan2_16::i#3 = phi( atan2_16::@17/atan2_16::i#7 )
  atan2_16::xd#5 = phi( atan2_16::@17/atan2_16::xd#9 )
  atan2_16::yi#6 = phi( atan2_16::@17/atan2_16::yi#5 )
  atan2_16::yd#5 = phi( atan2_16::@17/atan2_16::yd#9 )
  atan2_16::xi#4 = phi( atan2_16::@17/atan2_16::xi#7 )
  atan2_16::xi#1 = atan2_16::xi#4 + atan2_16::yd#5
  atan2_16::yi#1 = atan2_16::yi#6 - atan2_16::xd#5
  atan2_16::$22 = atan2_16::i#3 * SIZEOF_UNSIGNED_INT
  atan2_16::angle#2 = atan2_16::angle#7 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22]
  to:atan2_16::@19
atan2_16::@20: scope:[atan2_16]  from atan2_16::@17
  atan2_16::y#11 = phi( atan2_16::@17/atan2_16::y#14 )
  atan2_16::x#12 = phi( atan2_16::@17/atan2_16::x#13 )
  atan2_16::angle#8 = phi( atan2_16::@17/atan2_16::angle#14 )
  atan2_16::i#4 = phi( atan2_16::@17/atan2_16::i#7 )
  atan2_16::xd#6 = phi( atan2_16::@17/atan2_16::xd#9 )
  atan2_16::yi#7 = phi( atan2_16::@17/atan2_16::yi#5 )
  atan2_16::yd#6 = phi( atan2_16::@17/atan2_16::yd#9 )
  atan2_16::xi#5 = phi( atan2_16::@17/atan2_16::xi#7 )
  atan2_16::xi#2 = atan2_16::xi#5 - atan2_16::yd#6
  atan2_16::yi#2 = atan2_16::yi#7 + atan2_16::xd#6
  atan2_16::$23 = atan2_16::i#4 * SIZEOF_UNSIGNED_INT
  atan2_16::angle#3 = atan2_16::angle#8 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23]
  to:atan2_16::@19
atan2_16::@19: scope:[atan2_16]  from atan2_16::@18 atan2_16::@20
  atan2_16::y#8 = phi( atan2_16::@18/atan2_16::y#10, atan2_16::@20/atan2_16::y#11 )
  atan2_16::xi#8 = phi( atan2_16::@18/atan2_16::xi#1, atan2_16::@20/atan2_16::xi#2 )
  atan2_16::x#8 = phi( atan2_16::@18/atan2_16::x#11, atan2_16::@20/atan2_16::x#12 )
  atan2_16::angle#13 = phi( atan2_16::@18/atan2_16::angle#2, atan2_16::@20/atan2_16::angle#3 )
  atan2_16::yi#8 = phi( atan2_16::@18/atan2_16::yi#1, atan2_16::@20/atan2_16::yi#2 )
  atan2_16::i#5 = phi( atan2_16::@18/atan2_16::i#3, atan2_16::@20/atan2_16::i#4 )
  atan2_16::i#1 = atan2_16::i#5 + rangenext(0,CORDIC_ITERATIONS_16-1)
  atan2_16::$21 = atan2_16::i#1 != rangelast(0,CORDIC_ITERATIONS_16-1)
  if(atan2_16::$21) goto atan2_16::@10
  to:atan2_16::@12
atan2_16::@7: scope:[atan2_16]  from atan2_16::@12 atan2_16::@21
  atan2_16::angle#15 = phi( atan2_16::@12/atan2_16::angle#1, atan2_16::@21/atan2_16::angle#4 )
  atan2_16::y#4 = phi( atan2_16::@12/atan2_16::y#5, atan2_16::@21/atan2_16::y#6 )
  atan2_16::$13 = atan2_16::y#4 < 0
  atan2_16::$14 = ! atan2_16::$13
  if(atan2_16::$14) goto atan2_16::@8
  to:atan2_16::@9
atan2_16::@21: scope:[atan2_16]  from atan2_16::@12
  atan2_16::y#6 = phi( atan2_16::@12/atan2_16::y#5 )
  atan2_16::angle#9 = phi( atan2_16::@12/atan2_16::angle#1 )
  atan2_16::$12 = $8000 - atan2_16::angle#9
  atan2_16::angle#4 = atan2_16::$12
  to:atan2_16::@7
atan2_16::@8: scope:[atan2_16]  from atan2_16::@7 atan2_16::@9
  atan2_16::angle#10 = phi( atan2_16::@7/atan2_16::angle#15, atan2_16::@9/atan2_16::angle#5 )
  atan2_16::return#0 = atan2_16::angle#10
  to:atan2_16::@return
atan2_16::@9: scope:[atan2_16]  from atan2_16::@7
  atan2_16::angle#11 = phi( atan2_16::@7/atan2_16::angle#15 )
  atan2_16::$15 = - atan2_16::angle#11
  atan2_16::angle#5 = atan2_16::$15
  to:atan2_16::@8
atan2_16::@return: scope:[atan2_16]  from atan2_16::@8
  atan2_16::return#3 = phi( atan2_16::@8/atan2_16::return#0 )
  atan2_16::return#1 = atan2_16::return#3
  return 
  to:@return

void print_uint(unsigned int w)
print_uint: scope:[print_uint]  from main::@4
  print_char_cursor#25 = phi( main::@4/print_char_cursor#27 )
  print_uint::w#1 = phi( main::@4/print_uint::w#0 )
  print_uint::$0 = byte1  print_uint::w#1
  print_uchar::b#0 = print_uint::$0
  call print_uchar
  to:print_uint::@1
print_uint::@1: scope:[print_uint]  from print_uint
  print_uint::w#2 = phi( print_uint/print_uint::w#1 )
  print_char_cursor#13 = phi( print_uint/print_char_cursor#5 )
  print_char_cursor#0 = print_char_cursor#13
  print_uint::$2 = byte0  print_uint::w#2
  print_uchar::b#1 = print_uint::$2
  call print_uchar
  to:print_uint::@2
print_uint::@2: scope:[print_uint]  from print_uint::@1
  print_char_cursor#14 = phi( print_uint::@1/print_char_cursor#5 )
  print_char_cursor#1 = print_char_cursor#14
  to:print_uint::@return
print_uint::@return: scope:[print_uint]  from print_uint::@2
  print_char_cursor#15 = phi( print_uint::@2/print_char_cursor#1 )
  print_char_cursor#2 = print_char_cursor#15
  return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from print_uint print_uint::@1
  print_char_cursor#26 = phi( print_uint/print_char_cursor#25, print_uint::@1/print_char_cursor#0 )
  print_uchar::b#2 = phi( print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
  print_uchar::$0 = print_uchar::b#2 >> 4
  print_char::ch#0 = print_hextab[print_uchar::$0]
  call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  print_uchar::b#3 = phi( print_uchar/print_uchar::b#2 )
  print_char_cursor#16 = phi( print_uchar/print_char_cursor#7 )
  print_char_cursor#3 = print_char_cursor#16
  print_uchar::$2 = print_uchar::b#3 & $f
  print_char::ch#1 = print_hextab[print_uchar::$2]
  call print_char
  to:print_uchar::@2
print_uchar::@2: scope:[print_uchar]  from print_uchar::@1
  print_char_cursor#17 = phi( print_uchar::@1/print_char_cursor#7 )
  print_char_cursor#4 = print_char_cursor#17
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@2
  print_char_cursor#18 = phi( print_uchar::@2/print_char_cursor#4 )
  print_char_cursor#5 = print_char_cursor#18
  return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_uchar print_uchar::@1
  print_char_cursor#19 = phi( print_uchar/print_char_cursor#26, print_uchar::@1/print_char_cursor#3 )
  print_char::ch#2 = phi( print_uchar/print_char::ch#0, print_uchar::@1/print_char::ch#1 )
  *print_char_cursor#19 = print_char::ch#2
  print_char_cursor#6 = ++ print_char_cursor#19
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  print_char_cursor#20 = phi( print_char/print_char_cursor#6 )
  print_char_cursor#7 = print_char_cursor#20
  return 
  to:@return

void main()
main: scope:[main]  from __start::@1
  print_char_cursor#40 = phi( __start::@1/print_char_cursor#29 )
  init_font_hex::charset#1 = CHARSET
  call init_font_hex
  to:main::@8
main::@8: scope:[main]  from main
  print_char_cursor#39 = phi( main/print_char_cursor#40 )
  main::toD0181_screen#0 = SCREEN
  main::toD0181_gfx#0 = CHARSET
  to:main::toD0181
main::toD0181: scope:[main]  from main::@8
  print_char_cursor#38 = phi( main::@8/print_char_cursor#39 )
  main::toD0181_gfx#1 = phi( main::@8/main::toD0181_gfx#0 )
  main::toD0181_screen#1 = phi( main::@8/main::toD0181_screen#0 )
  main::toD0181_$7 = (unsigned int)main::toD0181_screen#1
  main::toD0181_$0 = main::toD0181_$7 & $3fff
  main::toD0181_$1 = main::toD0181_$0 * 4
  main::toD0181_$2 = byte1  main::toD0181_$1
  main::toD0181_$3 = byte1  (unsigned int)main::toD0181_gfx#1
  main::toD0181_$4 = main::toD0181_$3 / 4
  main::toD0181_$5 = main::toD0181_$4 & $f
  main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
  main::toD0181_return#0 = main::toD0181_$6
  to:main::toD0181_@return
main::toD0181_@return: scope:[main]  from main::toD0181
  print_char_cursor#37 = phi( main::toD0181/print_char_cursor#38 )
  main::toD0181_return#2 = phi( main::toD0181/main::toD0181_return#0 )
  main::toD0181_return#1 = main::toD0181_return#2
  to:main::@7
main::@7: scope:[main]  from main::toD0181_@return
  print_char_cursor#36 = phi( main::toD0181_@return/print_char_cursor#37 )
  main::toD0181_return#3 = phi( main::toD0181_@return/main::toD0181_return#1 )
  main::$1 = main::toD0181_return#3
  *D018 = main::$1
  main::screen#0 = SCREEN
  main::screen_ref#0 = SCREEN_REF
  main::diff_sum#0 = 0
  main::y#0 = -$c
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@7
  print_char_cursor#35 = phi( main::@3/print_char_cursor#30, main::@7/print_char_cursor#36 )
  main::screen#5 = phi( main::@3/main::screen#6, main::@7/main::screen#0 )
  main::diff_sum#7 = phi( main::@3/main::diff_sum#5, main::@7/main::diff_sum#0 )
  main::screen_ref#5 = phi( main::@3/main::screen_ref#6, main::@7/main::screen_ref#0 )
  main::y#4 = phi( main::@3/main::y#1, main::@7/main::y#0 )
  main::x#0 = -$13
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@10
  print_char_cursor#34 = phi( main::@1/print_char_cursor#35, main::@10/print_char_cursor#32 )
  main::screen#4 = phi( main::@1/main::screen#5, main::@10/main::screen#1 )
  main::diff_sum#6 = phi( main::@1/main::diff_sum#7, main::@10/main::diff_sum#1 )
  main::screen_ref#4 = phi( main::@1/main::screen_ref#5, main::@10/main::screen_ref#1 )
  main::y#2 = phi( main::@1/main::y#4, main::@10/main::y#5 )
  main::x#2 = phi( main::@1/main::x#0, main::@10/main::x#1 )
  main::$13 = (char)main::x#2
  main::$3 = main::$13 w= 0
  main::xw#0 = (int)main::$3
  main::$14 = (char)main::y#2
  main::$4 = main::$14 w= 0
  main::yw#0 = (int)main::$4
  atan2_16::x#0 = main::xw#0
  atan2_16::y#0 = main::yw#0
  call atan2_16
  atan2_16::return#2 = atan2_16::return#1
  to:main::@9
main::@9: scope:[main]  from main::@2
  print_char_cursor#33 = phi( main::@2/print_char_cursor#34 )
  main::y#6 = phi( main::@2/main::y#2 )
  main::x#4 = phi( main::@2/main::x#2 )
  main::screen#3 = phi( main::@2/main::screen#4 )
  main::diff_sum#4 = phi( main::@2/main::diff_sum#6 )
  main::screen_ref#2 = phi( main::@2/main::screen_ref#4 )
  atan2_16::return#4 = phi( main::@2/atan2_16::return#2 )
  main::angle_w#0 = atan2_16::return#4
  main::$6 = main::angle_w#0 + $80
  main::ang_w#0 = byte1  main::$6
  diff::bb1#0 = main::ang_w#0
  diff::bb2#0 = *main::screen_ref#2
  call diff
  diff::return#0 = diff::return#2
  to:main::@10
main::@10: scope:[main]  from main::@9
  print_char_cursor#32 = phi( main::@9/print_char_cursor#33 )
  main::y#5 = phi( main::@9/main::y#6 )
  main::x#3 = phi( main::@9/main::x#4 )
  main::screen#2 = phi( main::@9/main::screen#3 )
  main::screen_ref#3 = phi( main::@9/main::screen_ref#2 )
  main::ang_w#1 = phi( main::@9/main::ang_w#0 )
  main::diff_sum#2 = phi( main::@9/main::diff_sum#4 )
  diff::return#3 = phi( main::@9/diff::return#0 )
  main::$8 = diff::return#3
  main::diff_sum#1 = main::diff_sum#2 + main::$8
  main::$9 = main::ang_w#1 - *main::screen_ref#3
  *main::screen#2 = main::$9
  main::screen#1 = ++ main::screen#2
  main::screen_ref#1 = ++ main::screen_ref#3
  main::x#1 = main::x#3 + rangenext(-$13,$14)
  main::$10 = main::x#1 != rangelast(-$13,$14)
  if(main::$10) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@10
  main::screen#6 = phi( main::@10/main::screen#1 )
  main::screen_ref#6 = phi( main::@10/main::screen_ref#1 )
  print_char_cursor#30 = phi( main::@10/print_char_cursor#32 )
  main::diff_sum#5 = phi( main::@10/main::diff_sum#1 )
  main::y#3 = phi( main::@10/main::y#5 )
  main::y#1 = main::y#3 + rangenext(-$c,$c)
  main::$11 = main::y#1 != rangelast(-$c,$c)
  if(main::$11) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3
  print_char_cursor#27 = phi( main::@3/print_char_cursor#30 )
  main::diff_sum#3 = phi( main::@3/main::diff_sum#5 )
  print_uint::w#0 = main::diff_sum#3
  call print_uint
  to:main::@11
main::@11: scope:[main]  from main::@4
  print_char_cursor#21 = phi( main::@4/print_char_cursor#2 )
  print_char_cursor#8 = print_char_cursor#21
  to:main::@5
main::@5: scope:[main]  from main::@11 main::@6
  print_char_cursor#28 = phi( main::@11/print_char_cursor#8, main::@6/print_char_cursor#31 )
  if(true) goto main::@6
  to:main::@return
main::@6: scope:[main]  from main::@5
  print_char_cursor#31 = phi( main::@5/print_char_cursor#28 )
  *main::col00 = ++ *main::col00
  to:main::@5
main::@return: scope:[main]  from main::@5
  print_char_cursor#22 = phi( main::@5/print_char_cursor#28 )
  print_char_cursor#9 = print_char_cursor#22
  return 
  to:@return

char diff(char bb1 , char bb2)
diff: scope:[diff]  from main::@9
  diff::bb2#1 = phi( main::@9/diff::bb2#0 )
  diff::bb1#1 = phi( main::@9/diff::bb1#0 )
  diff::$0 = diff::bb1#1 < diff::bb2#1
  if(diff::$0) goto diff::@1
  to:diff::@2
diff::@1: scope:[diff]  from diff
  diff::bb1#2 = phi( diff/diff::bb1#1 )
  diff::bb2#2 = phi( diff/diff::bb2#1 )
  diff::$3 = diff::bb2#2 - diff::bb1#2
  diff::$4 = diff::$3
  to:diff::@3
diff::@2: scope:[diff]  from diff
  diff::bb2#3 = phi( diff/diff::bb2#1 )
  diff::bb1#3 = phi( diff/diff::bb1#1 )
  diff::$1 = diff::bb1#3 - diff::bb2#3
  diff::$2 = diff::$1
  to:diff::@3
diff::@3: scope:[diff]  from diff::@1 diff::@2
  diff::$5 = phi( diff::@1/diff::$4, diff::@2/diff::$2 )
  diff::return#1 = diff::$5
  to:diff::@return
diff::@return: scope:[diff]  from diff::@3
  diff::return#4 = phi( diff::@3/diff::return#1 )
  diff::return#2 = diff::return#4
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  to:__start::__init1
__start::__init1: scope:[__start]  from __start
  print_screen#0 = (char *)$400
  print_line_cursor#0 = print_screen#0
  print_char_cursor#10 = print_line_cursor#0
  to:__start::@1
__start::@1: scope:[__start]  from __start::__init1
  print_line_cursor#4 = phi( __start::__init1/print_line_cursor#0 )
  print_screen#4 = phi( __start::__init1/print_screen#0 )
  print_char_cursor#29 = phi( __start::__init1/print_char_cursor#10 )
  call main
  to:__start::@2
__start::@2: scope:[__start]  from __start::@1
  print_line_cursor#3 = phi( __start::@1/print_line_cursor#4 )
  print_screen#3 = phi( __start::@1/print_screen#4 )
  print_char_cursor#23 = phi( __start::@1/print_char_cursor#9 )
  print_char_cursor#11 = print_char_cursor#23
  to:__start::@return
__start::@return: scope:[__start]  from __start::@2
  print_char_cursor#24 = phi( __start::@2/print_char_cursor#11 )
  print_line_cursor#2 = phi( __start::@2/print_line_cursor#3 )
  print_screen#2 = phi( __start::@2/print_screen#3 )
  print_screen#1 = print_screen#2
  print_line_cursor#1 = print_line_cursor#2
  print_char_cursor#12 = print_char_cursor#24
  return 
  to:@return

SYMBOL TABLE SSA
__constant char * const CHARSET = (char *)$2000
__constant char * const COLS = (char *)$d800
__constant unsigned int CORDIC_ATAN2_ANGLES_16[CORDIC_ITERATIONS_16] = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2
 }}
__constant const char CORDIC_ITERATIONS_16 = $f
__constant char * const D018 = (char *)$d018
__constant char FONT_HEX_PROTO[] = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
__constant char * const SCREEN = (char *)$2800
__constant const char SCREEN_REF[$3e8] = kickasm {{ .for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)
 }}
__constant char SIZEOF_UNSIGNED_INT = 2
void __start()
unsigned int atan2_16(int x , int y)
bool atan2_16::$0
int atan2_16::$1
bool atan2_16::$10
bool atan2_16::$11
number atan2_16::$12
bool atan2_16::$13
bool atan2_16::$14
unsigned int atan2_16::$15
bool atan2_16::$16
bool atan2_16::$17
bool atan2_16::$18
bool atan2_16::$19
int atan2_16::$2
bool atan2_16::$20
bool atan2_16::$21
char atan2_16::$22
char atan2_16::$23
bool atan2_16::$24
int atan2_16::$3
int atan2_16::$4
bool atan2_16::$5
int atan2_16::$6
int atan2_16::$7
int atan2_16::$8
int atan2_16::$9
unsigned int atan2_16::angle
unsigned int atan2_16::angle#0
unsigned int atan2_16::angle#1
unsigned int atan2_16::angle#10
unsigned int atan2_16::angle#11
unsigned int atan2_16::angle#12
unsigned int atan2_16::angle#13
unsigned int atan2_16::angle#14
unsigned int atan2_16::angle#15
unsigned int atan2_16::angle#16
unsigned int atan2_16::angle#17
unsigned int atan2_16::angle#18
unsigned int atan2_16::angle#19
unsigned int atan2_16::angle#2
unsigned int atan2_16::angle#20
unsigned int atan2_16::angle#3
unsigned int atan2_16::angle#4
unsigned int atan2_16::angle#5
unsigned int atan2_16::angle#6
unsigned int atan2_16::angle#7
unsigned int atan2_16::angle#8
unsigned int atan2_16::angle#9
char atan2_16::i
char atan2_16::i#0
char atan2_16::i#1
char atan2_16::i#10
char atan2_16::i#11
char atan2_16::i#2
char atan2_16::i#3
char atan2_16::i#4
char atan2_16::i#5
char atan2_16::i#6
char atan2_16::i#7
char atan2_16::i#8
char atan2_16::i#9
unsigned int atan2_16::return
unsigned int atan2_16::return#0
unsigned int atan2_16::return#1
unsigned int atan2_16::return#2
unsigned int atan2_16::return#3
unsigned int atan2_16::return#4
char atan2_16::shift
char atan2_16::shift#0
char atan2_16::shift#1
char atan2_16::shift#2
char atan2_16::shift#3
char atan2_16::shift#4
int atan2_16::x
int atan2_16::x#0
int atan2_16::x#1
int atan2_16::x#10
int atan2_16::x#11
int atan2_16::x#12
int atan2_16::x#13
int atan2_16::x#14
int atan2_16::x#15
int atan2_16::x#16
int atan2_16::x#17
int atan2_16::x#18
int atan2_16::x#2
int atan2_16::x#3
int atan2_16::x#4
int atan2_16::x#5
int atan2_16::x#6
int atan2_16::x#7
int atan2_16::x#8
int atan2_16::x#9
int atan2_16::xd
int atan2_16::xd#0
int atan2_16::xd#1
int atan2_16::xd#2
int atan2_16::xd#3
int atan2_16::xd#4
int atan2_16::xd#5
int atan2_16::xd#6
int atan2_16::xd#7
int atan2_16::xd#8
int atan2_16::xd#9
int atan2_16::xi
int atan2_16::xi#0
int atan2_16::xi#1
int atan2_16::xi#10
int atan2_16::xi#11
int atan2_16::xi#12
int atan2_16::xi#2
int atan2_16::xi#3
int atan2_16::xi#4
int atan2_16::xi#5
int atan2_16::xi#6
int atan2_16::xi#7
int atan2_16::xi#8
int atan2_16::xi#9
int atan2_16::y
int atan2_16::y#0
int atan2_16::y#1
int atan2_16::y#10
int atan2_16::y#11
int atan2_16::y#12
int atan2_16::y#13
int atan2_16::y#14
int atan2_16::y#15
int atan2_16::y#16
int atan2_16::y#17
int atan2_16::y#18
int atan2_16::y#19
int atan2_16::y#2
int atan2_16::y#20
int atan2_16::y#3
int atan2_16::y#4
int atan2_16::y#5
int atan2_16::y#6
int atan2_16::y#7
int atan2_16::y#8
int atan2_16::y#9
int atan2_16::yd
int atan2_16::yd#0
int atan2_16::yd#1
int atan2_16::yd#2
int atan2_16::yd#3
int atan2_16::yd#4
int atan2_16::yd#5
int atan2_16::yd#6
int atan2_16::yd#7
int atan2_16::yd#8
int atan2_16::yd#9
int atan2_16::yi
int atan2_16::yi#0
int atan2_16::yi#1
int atan2_16::yi#10
int atan2_16::yi#11
int atan2_16::yi#12
int atan2_16::yi#13
int atan2_16::yi#14
int atan2_16::yi#15
int atan2_16::yi#2
int atan2_16::yi#3
int atan2_16::yi#4
int atan2_16::yi#5
int atan2_16::yi#6
int atan2_16::yi#7
int atan2_16::yi#8
int atan2_16::yi#9
char diff(char bb1 , char bb2)
bool diff::$0
char diff::$1
char diff::$2
char diff::$3
char diff::$4
char diff::$5
char diff::bb1
char diff::bb1#0
char diff::bb1#1
char diff::bb1#2
char diff::bb1#3
char diff::bb2
char diff::bb2#0
char diff::bb2#1
char diff::bb2#2
char diff::bb2#3
char diff::return
char diff::return#0
char diff::return#1
char diff::return#2
char diff::return#3
char diff::return#4
void init_font_hex(char *charset)
char init_font_hex::$0
char init_font_hex::$1
char init_font_hex::$2
bool init_font_hex::$3
bool init_font_hex::$4
bool init_font_hex::$5
char init_font_hex::c
char init_font_hex::c#0
char init_font_hex::c#1
char init_font_hex::c#2
char init_font_hex::c#3
char init_font_hex::c#4
char init_font_hex::c#5
char init_font_hex::c#6
char init_font_hex::c1
char init_font_hex::c1#0
char init_font_hex::c1#1
char init_font_hex::c1#2
char init_font_hex::c1#3
char init_font_hex::c1#4
char *init_font_hex::charset
char *init_font_hex::charset#0
char *init_font_hex::charset#1
char *init_font_hex::charset#2
char *init_font_hex::charset#3
char *init_font_hex::charset#4
char *init_font_hex::charset#5
char *init_font_hex::charset#6
char *init_font_hex::charset#7
char init_font_hex::i
char init_font_hex::i#0
char init_font_hex::i#1
char init_font_hex::i#2
char init_font_hex::idx
char init_font_hex::idx#0
char init_font_hex::idx#1
char init_font_hex::idx#2
char init_font_hex::idx#3
char init_font_hex::idx#4
char init_font_hex::idx#5
char init_font_hex::idx#6
char *init_font_hex::proto_hi
char *init_font_hex::proto_hi#0
char *init_font_hex::proto_hi#1
char *init_font_hex::proto_hi#2
char *init_font_hex::proto_hi#3
char *init_font_hex::proto_hi#4
char *init_font_hex::proto_hi#5
char *init_font_hex::proto_hi#6
char *init_font_hex::proto_lo
char *init_font_hex::proto_lo#0
char *init_font_hex::proto_lo#1
char *init_font_hex::proto_lo#2
char *init_font_hex::proto_lo#3
char *init_font_hex::proto_lo#4
void main()
char main::$1
bool main::$10
bool main::$11
char main::$13
char main::$14
unsigned int main::$3
unsigned int main::$4
number main::$6
char main::$8
char main::$9
char main::ang_w
char main::ang_w#0
char main::ang_w#1
unsigned int main::angle_w
unsigned int main::angle_w#0
__constant char *main::col00 = COLS+$c*$28+$13
unsigned int main::diff_sum
unsigned int main::diff_sum#0
unsigned int main::diff_sum#1
unsigned int main::diff_sum#2
unsigned int main::diff_sum#3
unsigned int main::diff_sum#4
unsigned int main::diff_sum#5
unsigned int main::diff_sum#6
unsigned int main::diff_sum#7
char *main::screen
char *main::screen#0
char *main::screen#1
char *main::screen#2
char *main::screen#3
char *main::screen#4
char *main::screen#5
char *main::screen#6
char *main::screen_ref
char *main::screen_ref#0
char *main::screen_ref#1
char *main::screen_ref#2
char *main::screen_ref#3
char *main::screen_ref#4
char *main::screen_ref#5
char *main::screen_ref#6
number main::toD0181_$0
number main::toD0181_$1
char main::toD0181_$2
char main::toD0181_$3
number main::toD0181_$4
number main::toD0181_$5
number main::toD0181_$6
unsigned int main::toD0181_$7
char *main::toD0181_gfx
char *main::toD0181_gfx#0
char *main::toD0181_gfx#1
char main::toD0181_return
char main::toD0181_return#0
char main::toD0181_return#1
char main::toD0181_return#2
char main::toD0181_return#3
char *main::toD0181_screen
char *main::toD0181_screen#0
char *main::toD0181_screen#1
signed char main::x
signed char main::x#0
signed char main::x#1
signed char main::x#2
signed char main::x#3
signed char main::x#4
int main::xw
int main::xw#0
signed char main::y
signed char main::y#0
signed char main::y#1
signed char main::y#2
signed char main::y#3
signed char main::y#4
signed char main::y#5
signed char main::y#6
int main::yw
int main::yw#0
void print_char(char ch)
char print_char::ch
char print_char::ch#0
char print_char::ch#1
char print_char::ch#2
char *print_char_cursor
char *print_char_cursor#0
char *print_char_cursor#1
char *print_char_cursor#10
char *print_char_cursor#11
char *print_char_cursor#12
char *print_char_cursor#13
char *print_char_cursor#14
char *print_char_cursor#15
char *print_char_cursor#16
char *print_char_cursor#17
char *print_char_cursor#18
char *print_char_cursor#19
char *print_char_cursor#2
char *print_char_cursor#20
char *print_char_cursor#21
char *print_char_cursor#22
char *print_char_cursor#23
char *print_char_cursor#24
char *print_char_cursor#25
char *print_char_cursor#26
char *print_char_cursor#27
char *print_char_cursor#28
char *print_char_cursor#29
char *print_char_cursor#3
char *print_char_cursor#30
char *print_char_cursor#31
char *print_char_cursor#32
char *print_char_cursor#33
char *print_char_cursor#34
char *print_char_cursor#35
char *print_char_cursor#36
char *print_char_cursor#37
char *print_char_cursor#38
char *print_char_cursor#39
char *print_char_cursor#4
char *print_char_cursor#40
char *print_char_cursor#5
char *print_char_cursor#6
char *print_char_cursor#7
char *print_char_cursor#8
char *print_char_cursor#9
__constant const char print_hextab[] = "0123456789abcdef"z
char *print_line_cursor
char *print_line_cursor#0
char *print_line_cursor#1
char *print_line_cursor#2
char *print_line_cursor#3
char *print_line_cursor#4
char *print_screen
char *print_screen#0
char *print_screen#1
char *print_screen#2
char *print_screen#3
char *print_screen#4
void print_uchar(char b)
char print_uchar::$0
number print_uchar::$2
char print_uchar::b
char print_uchar::b#0
char print_uchar::b#1
char print_uchar::b#2
char print_uchar::b#3
void print_uint(unsigned int w)
char print_uint::$0
char print_uint::$2
unsigned int print_uint::w
unsigned int print_uint::w#0
unsigned int print_uint::w#1
unsigned int print_uint::w#2

Adding number conversion cast (unumber) $13 in 
Adding number conversion cast (unumber) $c*$28 in 
Adding number conversion cast (unumber) 0 in init_font_hex::charset#2[init_font_hex::idx#0] = 0
Adding number conversion cast (unumber) 4 in init_font_hex::$0 = init_font_hex::proto_hi#2[init_font_hex::i#2] << 4
Adding number conversion cast (unumber) 1 in init_font_hex::$1 = init_font_hex::proto_lo#2[init_font_hex::i#2] << 1
Adding number conversion cast (unumber) 0 in init_font_hex::charset#4[init_font_hex::idx#6] = 0
Adding number conversion cast (unumber) 0 in init_font_hex::charset#4[init_font_hex::idx#3] = 0
Adding number conversion cast (unumber) 5 in init_font_hex::proto_lo#1 = init_font_hex::proto_lo#3 + 5
Adding number conversion cast (unumber) 8 in init_font_hex::charset#0 = init_font_hex::charset#4 + 8
Adding number conversion cast (unumber) 5 in init_font_hex::proto_hi#1 = init_font_hex::proto_hi#3 + 5
Adding number conversion cast (snumber) 0 in atan2_16::$0 = atan2_16::y#1 >= 0
Adding number conversion cast (snumber) 0 in atan2_16::$5 = atan2_16::x#1 >= 0
Adding number conversion cast (snumber) 0 in atan2_16::$16 = atan2_16::yi#3 == 0
Adding number conversion cast (unumber) 2 in atan2_16::angle#1 = atan2_16::angle#6 / 2
Adding number conversion cast (snumber) 0 in atan2_16::$10 = atan2_16::x#4 < 0
Adding number conversion cast (unumber) 2 in atan2_16::$18 = atan2_16::shift#2 >= 2
Adding number conversion cast (snumber) 2 in atan2_16::xd#1 = atan2_16::xd#3 >> 2
Adding number conversion cast (snumber) 2 in atan2_16::yd#1 = atan2_16::yd#3 >> 2
Adding number conversion cast (unumber) 2 in atan2_16::shift#1 = atan2_16::shift#3 - 2
Adding number conversion cast (unumber) 0 in atan2_16::$24 = 0 != atan2_16::shift#4
Adding number conversion cast (snumber) 0 in atan2_16::$20 = atan2_16::yi#5 >= 0
Adding number conversion cast (snumber) 1 in atan2_16::xd#2 = atan2_16::xd#4 >> 1
Adding number conversion cast (snumber) 1 in atan2_16::yd#2 = atan2_16::yd#4 >> 1
Adding number conversion cast (unumber) 1 in atan2_16::i#1 = atan2_16::i#5 + rangenext(0,CORDIC_ITERATIONS_16-1)
Adding number conversion cast (snumber) 0 in atan2_16::$13 = atan2_16::y#4 < 0
Adding number conversion cast (unumber) $8000 in atan2_16::$12 = $8000 - atan2_16::angle#9
Adding number conversion cast (unumber) atan2_16::$12 in atan2_16::$12 = (unumber)$8000 - atan2_16::angle#9
Adding number conversion cast (unumber) 4 in print_uchar::$0 = print_uchar::b#2 >> 4
Adding number conversion cast (unumber) $f in print_uchar::$2 = print_uchar::b#3 & $f
Adding number conversion cast (unumber) print_uchar::$2 in print_uchar::$2 = print_uchar::b#3 & (unumber)$f
Adding number conversion cast (unumber) $3fff in main::toD0181_$0 = main::toD0181_$7 & $3fff
Adding number conversion cast (unumber) main::toD0181_$0 in main::toD0181_$0 = main::toD0181_$7 & (unumber)$3fff
Adding number conversion cast (unumber) 4 in main::toD0181_$1 = main::toD0181_$0 * 4
Adding number conversion cast (unumber) main::toD0181_$1 in main::toD0181_$1 = main::toD0181_$0 * (unumber)4
Adding number conversion cast (unumber) 4 in main::toD0181_$4 = main::toD0181_$3 / 4
Adding number conversion cast (unumber) main::toD0181_$4 in main::toD0181_$4 = main::toD0181_$3 / (unumber)4
Adding number conversion cast (unumber) $f in main::toD0181_$5 = main::toD0181_$4 & $f
Adding number conversion cast (unumber) main::toD0181_$5 in main::toD0181_$5 = main::toD0181_$4 & (unumber)$f
Adding number conversion cast (unumber) main::toD0181_$6 in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Adding number conversion cast (unumber) 0 in main::$3 = main::$13 w= 0
Adding number conversion cast (unumber) 0 in main::$4 = main::$14 w= 0
Adding number conversion cast (unumber) $80 in main::$6 = main::angle_w#0 + $80
Adding number conversion cast (unumber) main::$6 in main::$6 = main::angle_w#0 + (unumber)$80
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast init_font_hex::charset#2[init_font_hex::idx#0] = (unumber)0
Inlining cast init_font_hex::charset#4[init_font_hex::idx#6] = (unumber)0
Inlining cast init_font_hex::charset#4[init_font_hex::idx#3] = (unumber)0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (char *) 53272
Simplifying constant pointer cast (char *) 55296
Simplifying constant pointer cast (char *) 8192
Simplifying constant pointer cast (char *) 10240
Simplifying constant integer cast $13
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 5
Simplifying constant integer cast 8
Simplifying constant integer cast 5
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $8000
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) $13
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) 1
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 5
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) 5
Finalized signed number type (signed char) 0
Finalized signed number type (signed char) 0
Finalized signed number type (signed char) 0
Finalized unsigned number type (char) 2
Finalized signed number type (signed char) 0
Finalized unsigned number type (char) 2
Finalized signed number type (signed char) 2
Finalized signed number type (signed char) 2
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 0
Finalized signed number type (signed char) 0
Finalized signed number type (signed char) 1
Finalized signed number type (signed char) 1
Finalized unsigned number type (char) 1
Finalized signed number type (signed char) 0
Finalized unsigned number type (unsigned int) $8000
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) $f
Finalized unsigned number type (unsigned int) $3fff
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) 4
Finalized unsigned number type (char) $f
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) 0
Finalized unsigned number type (char) $80
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to unsigned int in atan2_16::$12 = $8000 - atan2_16::angle#9
Inferred type updated to char in print_uchar::$2 = print_uchar::b#3 & $f
Inferred type updated to unsigned int in main::toD0181_$0 = main::toD0181_$7 & $3fff
Inferred type updated to unsigned int in main::toD0181_$1 = main::toD0181_$0 * 4
Inferred type updated to char in main::toD0181_$4 = main::toD0181_$3 / 4
Inferred type updated to char in main::toD0181_$5 = main::toD0181_$4 & $f
Inferred type updated to char in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5
Inferred type updated to unsigned int in main::$6 = main::angle_w#0 + $80
Inversing boolean not [59] atan2_16::$17 = atan2_16::yi#3 != 0 from [58] atan2_16::$16 = atan2_16::yi#3 == 0
Inversing boolean not [68] atan2_16::$11 = atan2_16::x#4 >= 0 from [67] atan2_16::$10 = atan2_16::x#4 < 0
Inversing boolean not [79] atan2_16::$19 = 0 == atan2_16::shift#4 from [78] atan2_16::$24 = 0 != atan2_16::shift#4
Inversing boolean not [103] atan2_16::$14 = atan2_16::y#4 >= 0 from [102] atan2_16::$13 = atan2_16::y#4 < 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias init_font_hex::charset#3 = init_font_hex::charset#4 
Alias init_font_hex::idx#2 = init_font_hex::idx#6 
Alias init_font_hex::proto_lo#2 = init_font_hex::proto_lo#3 
Alias init_font_hex::c1#2 = init_font_hex::c1#3 
Alias init_font_hex::proto_hi#2 = init_font_hex::proto_hi#5 init_font_hex::proto_hi#3 
Alias init_font_hex::c#2 = init_font_hex::c#3 init_font_hex::c#4 
Alias init_font_hex::charset#0 = init_font_hex::charset#7 
Alias atan2_16::y#1 = atan2_16::y#2 atan2_16::$3 atan2_16::y#3 
Alias atan2_16::x#5 = atan2_16::x#9 atan2_16::x#6 
Alias atan2_16::$2 = atan2_16::$1 
Alias atan2_16::yi#0 = atan2_16::$4 atan2_16::yi#12 atan2_16::yi#13 
Alias atan2_16::x#1 = atan2_16::x#2 atan2_16::$8 atan2_16::x#3 
Alias atan2_16::y#12 = atan2_16::y#15 atan2_16::y#13 
Alias atan2_16::$7 = atan2_16::$6 
Alias atan2_16::xi#0 = atan2_16::$9 
Alias atan2_16::xi#3 = atan2_16::xi#6 atan2_16::xd#0 
Alias atan2_16::yi#3 = atan2_16::yi#4 atan2_16::yd#0 
Alias atan2_16::i#2 = atan2_16::i#6 atan2_16::shift#0 
Alias atan2_16::angle#12 = atan2_16::angle#19 
Alias atan2_16::x#17 = atan2_16::x#7 
Alias atan2_16::y#19 = atan2_16::y#7 
Alias atan2_16::xd#3 = atan2_16::xd#7 atan2_16::xd#8 atan2_16::xd#4 
Alias atan2_16::yd#3 = atan2_16::yd#7 atan2_16::yd#8 atan2_16::yd#4 
Alias atan2_16::shift#2 = atan2_16::shift#3 atan2_16::shift#4 
Alias atan2_16::yi#10 = atan2_16::yi#15 atan2_16::yi#14 atan2_16::yi#11 
Alias atan2_16::xi#10 = atan2_16::xi#12 atan2_16::xi#11 atan2_16::xi#9 
Alias atan2_16::i#10 = atan2_16::i#11 atan2_16::i#8 atan2_16::i#9 
Alias atan2_16::angle#16 = atan2_16::angle#20 atan2_16::angle#18 atan2_16::angle#17 
Alias atan2_16::x#14 = atan2_16::x#18 atan2_16::x#16 atan2_16::x#15 
Alias atan2_16::y#16 = atan2_16::y#20 atan2_16::y#18 atan2_16::y#17 
Alias atan2_16::xi#4 = atan2_16::xi#7 atan2_16::xi#5 
Alias atan2_16::yd#5 = atan2_16::yd#9 atan2_16::yd#6 
Alias atan2_16::yi#5 = atan2_16::yi#6 atan2_16::yi#7 
Alias atan2_16::xd#5 = atan2_16::xd#9 atan2_16::xd#6 
Alias atan2_16::i#3 = atan2_16::i#7 atan2_16::i#4 
Alias atan2_16::angle#14 = atan2_16::angle#7 atan2_16::angle#8 
Alias atan2_16::x#11 = atan2_16::x#13 atan2_16::x#12 
Alias atan2_16::y#10 = atan2_16::y#14 atan2_16::y#11 
Alias atan2_16::angle#1 = atan2_16::angle#9 
Alias atan2_16::y#5 = atan2_16::y#6 
Alias atan2_16::angle#4 = atan2_16::$12 
Alias atan2_16::return#0 = atan2_16::angle#10 atan2_16::return#3 atan2_16::return#1 
Alias atan2_16::angle#11 = atan2_16::angle#15 
Alias atan2_16::angle#5 = atan2_16::$15 
Alias print_uchar::b#0 = print_uint::$0 
Alias print_uint::w#1 = print_uint::w#2 
Alias print_char_cursor#0 = print_char_cursor#13 
Alias print_uchar::b#1 = print_uint::$2 
Alias print_char_cursor#1 = print_char_cursor#14 print_char_cursor#15 print_char_cursor#2 
Alias print_uchar::b#2 = print_uchar::b#3 
Alias print_char_cursor#16 = print_char_cursor#3 
Alias print_char_cursor#17 = print_char_cursor#4 print_char_cursor#18 print_char_cursor#5 
Alias print_char_cursor#20 = print_char_cursor#6 print_char_cursor#7 
Alias print_char_cursor#36 = print_char_cursor#39 print_char_cursor#40 print_char_cursor#38 print_char_cursor#37 
Alias main::toD0181_screen#0 = main::toD0181_screen#1 
Alias main::toD0181_gfx#0 = main::toD0181_gfx#1 
Alias main::toD0181_return#0 = main::toD0181_$6 main::toD0181_return#2 main::toD0181_return#1 main::toD0181_return#3 main::$1 
Alias atan2_16::return#2 = atan2_16::return#4 
Alias main::screen_ref#2 = main::screen_ref#4 main::screen_ref#3 
Alias main::diff_sum#2 = main::diff_sum#4 main::diff_sum#6 
Alias main::screen#2 = main::screen#3 main::screen#4 
Alias main::x#2 = main::x#4 main::x#3 
Alias main::y#2 = main::y#6 main::y#5 main::y#3 
Alias print_char_cursor#27 = print_char_cursor#33 print_char_cursor#34 print_char_cursor#32 print_char_cursor#30 
Alias diff::return#0 = diff::return#3 
Alias main::ang_w#0 = main::ang_w#1 
Alias main::diff_sum#1 = main::diff_sum#5 main::diff_sum#3 
Alias main::screen_ref#1 = main::screen_ref#6 
Alias main::screen#1 = main::screen#6 
Alias print_char_cursor#21 = print_char_cursor#8 
Alias print_char_cursor#22 = print_char_cursor#31 print_char_cursor#28 print_char_cursor#9 
Alias diff::bb2#1 = diff::bb2#2 diff::bb2#3 
Alias diff::bb1#1 = diff::bb1#2 diff::bb1#3 
Alias diff::$4 = diff::$3 
Alias diff::$2 = diff::$1 
Alias diff::return#1 = diff::$5 diff::return#4 diff::return#2 
Alias print_screen#0 = print_line_cursor#0 print_char_cursor#10 print_char_cursor#29 print_screen#4 print_line_cursor#4 print_screen#3 print_line_cursor#3 print_screen#2 print_line_cursor#2 print_screen#1 print_line_cursor#1 
Alias print_char_cursor#11 = print_char_cursor#23 print_char_cursor#24 print_char_cursor#12 
Successful SSA optimization Pass2AliasElimination
Alias atan2_16::x#1 = atan2_16::x#5 atan2_16::x#10 
Alias atan2_16::y#1 = atan2_16::y#12 atan2_16::y#9 
Alias atan2_16::yi#0 = atan2_16::yi#9 
Alias atan2_16::yi#10 = atan2_16::yi#5 
Alias atan2_16::xi#10 = atan2_16::xi#4 
Alias atan2_16::i#10 = atan2_16::i#3 atan2_16::i#5 
Alias atan2_16::angle#14 = atan2_16::angle#16 
Alias atan2_16::x#11 = atan2_16::x#14 atan2_16::x#8 
Alias atan2_16::y#10 = atan2_16::y#16 atan2_16::y#8 
Alias atan2_16::y#4 = atan2_16::y#5 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values init_font_hex::charset#6 init_font_hex::charset#1
Identical Phi Values init_font_hex::proto_hi#2 init_font_hex::proto_hi#4
Identical Phi Values init_font_hex::proto_lo#2 init_font_hex::proto_lo#4
Identical Phi Values init_font_hex::charset#3 init_font_hex::charset#2
Identical Phi Values init_font_hex::c1#2 init_font_hex::c1#4
Identical Phi Values init_font_hex::c#2 init_font_hex::c#5
Identical Phi Values atan2_16::y#1 atan2_16::y#0
Identical Phi Values atan2_16::x#1 atan2_16::x#0
Identical Phi Values atan2_16::yi#10 atan2_16::yi#3
Identical Phi Values atan2_16::xi#10 atan2_16::xi#3
Identical Phi Values atan2_16::i#10 atan2_16::i#2
Identical Phi Values atan2_16::angle#14 atan2_16::angle#12
Identical Phi Values atan2_16::x#11 atan2_16::x#17
Identical Phi Values atan2_16::y#10 atan2_16::y#19
Identical Phi Values print_uint::w#1 print_uint::w#0
Identical Phi Values print_char_cursor#25 print_char_cursor#27
Identical Phi Values print_char_cursor#0 print_char_cursor#17
Identical Phi Values print_char_cursor#1 print_char_cursor#17
Identical Phi Values print_char_cursor#16 print_char_cursor#20
Identical Phi Values print_char_cursor#17 print_char_cursor#20
Identical Phi Values print_char_cursor#36 print_screen#0
Identical Phi Values main::y#2 main::y#4
Identical Phi Values print_char_cursor#27 print_char_cursor#35
Identical Phi Values print_char_cursor#21 print_char_cursor#1
Identical Phi Values print_char_cursor#22 print_char_cursor#21
Identical Phi Values diff::bb1#1 diff::bb1#0
Identical Phi Values diff::bb2#1 diff::bb2#0
Identical Phi Values print_char_cursor#11 print_char_cursor#22
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values init_font_hex::proto_hi#4 init_font_hex::proto_hi#6
Identical Phi Values init_font_hex::c#5 init_font_hex::c#6
Identical Phi Values atan2_16::x#17 atan2_16::x#0
Identical Phi Values atan2_16::y#19 atan2_16::y#0
Identical Phi Values atan2_16::x#4 atan2_16::x#17
Identical Phi Values atan2_16::y#4 atan2_16::y#19
Identical Phi Values print_char_cursor#35 print_screen#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition init_font_hex::$3 [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition init_font_hex::$4 [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition init_font_hex::$5 [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition atan2_16::$0 [36] if(atan2_16::y#0>=0) goto atan2_16::@1
Simple Condition atan2_16::$5 [40] if(atan2_16::x#0>=0) goto atan2_16::@4
Simple Condition atan2_16::$17 [47] if(atan2_16::yi#3!=0) goto atan2_16::@11
Simple Condition atan2_16::$11 [51] if(atan2_16::x#0>=0) goto atan2_16::@7
Simple Condition atan2_16::$18 [54] if(atan2_16::shift#2>=2) goto atan2_16::@14
Simple Condition atan2_16::$19 [59] if(0==atan2_16::shift#2) goto atan2_16::@17
Simple Condition atan2_16::$20 [62] if(atan2_16::yi#3>=0) goto atan2_16::@18
Simple Condition atan2_16::$21 [76] if(atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@10
Simple Condition atan2_16::$14 [79] if(atan2_16::y#0>=0) goto atan2_16::@8
Simple Condition main::$10 [152] if(main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition main::$11 [155] if(main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition diff::$0 [165] if(diff::bb1#0<diff::bb2#0) goto diff::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@12
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant init_font_hex::c#0 = 0
Constant init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant init_font_hex::c1#0 = 0
Constant init_font_hex::idx#0 = 0
Constant init_font_hex::i#0 = 0
Constant atan2_16::angle#0 = 0
Constant atan2_16::i#0 = 0
Constant init_font_hex::charset#1 = CHARSET
Constant main::toD0181_screen#0 = SCREEN
Constant main::toD0181_gfx#0 = CHARSET
Constant main::screen#0 = SCREEN
Constant main::screen_ref#0 = SCREEN_REF
Constant main::diff_sum#0 = 0
Constant main::y#0 = -$c
Constant main::x#0 = -$13
Constant print_screen#0 = (char *) 1024
Successful SSA optimization Pass2ConstantIdentification
Constant main::toD0181_$7 = (unsigned int)main::toD0181_screen#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (unsigned int)main::toD0181_gfx#0 in [115] main::toD0181_$3 = byte1  (unsigned int)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [160] if(true) goto main::@6
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] init_font_hex::i#1 = ++ init_font_hex::i#2 to ++
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to 5
Resolved ranged next value [26] init_font_hex::c1#1 = ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to $10
Resolved ranged next value [30] init_font_hex::c#1 = ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to $10
Resolved ranged next value [74] atan2_16::i#1 = ++ atan2_16::i#2 to ++
Resolved ranged comparison value [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@12 to CORDIC_ITERATIONS_16-1+1
Resolved ranged next value [150] main::x#1 = ++ main::x#2 to ++
Resolved ranged comparison value [152] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to $15
Resolved ranged next value [153] main::y#1 = ++ main::y#4 to ++
Resolved ranged comparison value [155] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to $d
Simplifying expression containing zero init_font_hex::charset#2 in [8] init_font_hex::charset#2[init_font_hex::idx#0] = 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Eliminating unused variable init_font_hex::idx#4 and assignment [15] init_font_hex::idx#4 = ++ init_font_hex::idx#3
Successful SSA optimization PassNEliminateUnusedVars
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::__init1
Removing unused procedure block __start::@1
Removing unused procedure block __start::@2
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
Adding number conversion cast (unumber) 5 in [11] if(init_font_hex::i#1!=5) goto init_font_hex::@3
Adding number conversion cast (unumber) $10 in [18] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2
Adding number conversion cast (unumber) $10 in [21] if(init_font_hex::c#1!=$10) goto init_font_hex::@1
Adding number conversion cast (unumber) CORDIC_ITERATIONS_16-1+1 in [54] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12
Adding number conversion cast (unumber) 1 in [54] if(atan2_16::i#1==(unumber)CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12
Adding number conversion cast (snumber) $15 in [113] if(main::x#1!=$15) goto main::@2
Adding number conversion cast (snumber) $d in [115] if(main::y#1!=$d) goto main::@1
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast 5
Simplifying constant integer cast $10
Simplifying constant integer cast $10
Simplifying constant integer cast CORDIC_ITERATIONS_16-1+(unumber)1
Simplifying constant integer cast 1
Simplifying constant integer cast $15
Simplifying constant integer cast $d
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (char) 5
Finalized unsigned number type (char) $10
Finalized unsigned number type (char) $10
Finalized unsigned number type (char) 1
Finalized signed number type (signed char) $15
Finalized signed number type (signed char) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [3] init_font_hex::idx#1 = ++ init_font_hex::idx#0
Constant right-side identified [79] main::toD0181_$0 = main::toD0181_$7 & $3fff
Constant right-side identified [82] main::toD0181_$3 = byte1  (unsigned int)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant init_font_hex::idx#1 = ++init_font_hex::idx#0
Constant main::toD0181_$0 = main::toD0181_$7&$3fff
Constant main::toD0181_$3 = byte1 (unsigned int)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [78] main::toD0181_$1 = main::toD0181_$0 * 4
Constant right-side identified [80] main::toD0181_$4 = main::toD0181_$3 / 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::toD0181_$1 = main::toD0181_$0*4
Constant main::toD0181_$4 = main::toD0181_$3/4
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [78] main::toD0181_$2 = byte1  main::toD0181_$1
Constant right-side identified [79] main::toD0181_$5 = main::toD0181_$4 & $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::toD0181_$2 = byte1 main::toD0181_$1
Constant main::toD0181_$5 = main::toD0181_$4&$f
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [78] main::toD0181_return#0 = main::toD0181_$2 | main::toD0181_$5
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::toD0181_return#0 = main::toD0181_$2|main::toD0181_$5
Successful SSA optimization Pass2ConstantIdentification
Inlining Noop Cast [81] main::$13 = (char)main::x#2 keeping main::x#2
Inlining Noop Cast [84] main::$14 = (char)main::y#4 keeping main::y#4
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [83] main::xw#0 = (int)main::$3 keeping main::xw#0
Inlining Noop Cast [86] main::yw#0 = (int)main::$4 keeping main::yw#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [31] atan2_16::angle#1 = atan2_16::angle#6 / 2
Rewriting multiplication to use shift [45] atan2_16::$22 = atan2_16::i#2 * SIZEOF_UNSIGNED_INT
Rewriting multiplication to use shift [49] atan2_16::$23 = atan2_16::i#2 * SIZEOF_UNSIGNED_INT
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings init_font_hex::proto_hi#0
Inlining constant with var siblings init_font_hex::c#0
Inlining constant with var siblings init_font_hex::proto_lo#0
Inlining constant with var siblings init_font_hex::c1#0
Inlining constant with var siblings init_font_hex::idx#0
Inlining constant with var siblings init_font_hex::i#0
Inlining constant with var siblings init_font_hex::charset#1
Inlining constant with var siblings init_font_hex::idx#1
Inlining constant with var siblings atan2_16::angle#0
Inlining constant with var siblings atan2_16::i#0
Inlining constant with var siblings main::screen#0
Inlining constant with var siblings main::screen_ref#0
Inlining constant with var siblings main::diff_sum#0
Inlining constant with var siblings main::y#0
Inlining constant with var siblings main::x#0
Constant inlined main::screen#0 = SCREEN
Constant inlined main::toD0181_screen#0 = SCREEN
Constant inlined main::toD0181_gfx#0 = CHARSET
Constant inlined main::toD0181_$7 = (unsigned int)SCREEN
Constant inlined main::diff_sum#0 = 0
Constant inlined init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant inlined main::screen_ref#0 = SCREEN_REF
Constant inlined main::toD0181_$2 = byte1 (unsigned int)SCREEN&$3fff*4
Constant inlined atan2_16::i#0 = 0
Constant inlined main::toD0181_$1 = (unsigned int)SCREEN&$3fff*4
Constant inlined main::toD0181_$0 = (unsigned int)SCREEN&$3fff
Constant inlined main::x#0 = -$13
Constant inlined main::y#0 = -$c
Constant inlined init_font_hex::i#0 = 0
Constant inlined atan2_16::angle#0 = 0
Constant inlined main::toD0181_$5 = byte1 (unsigned int)CHARSET/4&$f
Constant inlined main::toD0181_$4 = byte1 (unsigned int)CHARSET/4
Constant inlined main::toD0181_$3 = byte1 (unsigned int)CHARSET
Constant inlined init_font_hex::charset#1 = CHARSET
Constant inlined init_font_hex::idx#1 = ++0
Constant inlined init_font_hex::idx#0 = 0
Constant inlined init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant inlined init_font_hex::c#0 = 0
Constant inlined init_font_hex::c1#0 = 0
Successful SSA optimization Pass2ConstantInlining
Simplifying constant integer increment ++0
Successful SSA optimization Pass2ConstantSimplification
Eliminating unused constant SIZEOF_UNSIGNED_INT
Successful SSA optimization PassNEliminateUnusedVars
Finalized unsigned number type (char) 2
Finalized unsigned number type (char) 8
Finalized unsigned number type (char) $a
Finalized unsigned number type (char) $10
Finalized unsigned number type (unsigned int) $3e8
Finalized unsigned number type (char) $c
Finalized unsigned number type (char) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Added new block during phi lifting init_font_hex::@6(between init_font_hex::@5 and init_font_hex::@1)
Added new block during phi lifting init_font_hex::@7(between init_font_hex::@4 and init_font_hex::@2)
Added new block during phi lifting init_font_hex::@8(between init_font_hex::@3 and init_font_hex::@3)
Added new block during phi lifting atan2_16::@22(between atan2_16::@19 and atan2_16::@10)
Added new block during phi lifting atan2_16::@23(between atan2_16::@10 and atan2_16::@12)
Added new block during phi lifting atan2_16::@24(between atan2_16::@19 and atan2_16::@12)
Added new block during phi lifting atan2_16::@25(between atan2_16::@15 and atan2_16::@17)
Added new block during phi lifting atan2_16::@26(between atan2_16::@12 and atan2_16::@7)
Added new block during phi lifting atan2_16::@27(between atan2_16::@7 and atan2_16::@8)
Added new block during phi lifting main::@12(between main::@3 and main::@1)
Added new block during phi lifting main::@13(between main::@10 and main::@2)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@8
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@11
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of init_font_hex
Adding NOP phi() at start of print_uint::@2
Adding NOP phi() at start of print_uchar::@2
CALL GRAPH
Calls in [main] to init_font_hex:1 atan2_16:15 diff:22 print_uint:35 
Calls in [print_uint] to print_uchar:158 print_uchar:162 
Calls in [print_uchar] to print_char:170 print_char:175 

Created 38 initial phi equivalence classes
Coalesced [7] main::screen_ref#8 = main::screen_ref#5
Coalesced [8] main::diff_sum#9 = main::diff_sum#7
Coalesced [9] main::screen#8 = main::screen#5
Coalesced [39] main::y#7 = main::y#1
Coalesced [40] main::screen_ref#7 = main::screen_ref#1
Coalesced [41] main::diff_sum#8 = main::diff_sum#1
Coalesced [42] main::screen#7 = main::screen#1
Coalesced [43] main::x#5 = main::x#1
Coalesced (already) [44] main::screen_ref#9 = main::screen_ref#1
Coalesced (already) [45] main::diff_sum#10 = main::diff_sum#1
Coalesced (already) [46] main::screen#9 = main::screen#1
Coalesced [49] init_font_hex::charset#9 = init_font_hex::charset#5
Coalesced [71] init_font_hex::charset#8 = init_font_hex::charset#0
Coalesced [72] init_font_hex::proto_hi#7 = init_font_hex::proto_hi#1
Coalesced [73] init_font_hex::c#7 = init_font_hex::c#1
Coalesced (already) [74] init_font_hex::charset#10 = init_font_hex::charset#0
Coalesced [75] init_font_hex::proto_lo#5 = init_font_hex::proto_lo#1
Coalesced [76] init_font_hex::c1#5 = init_font_hex::c1#1
Coalesced [77] init_font_hex::i#3 = init_font_hex::i#1
Coalesced [78] init_font_hex::idx#7 = init_font_hex::idx#2
Coalesced [81] atan2_16::yi#17 = atan2_16::$2
Coalesced [85] atan2_16::xi#14 = atan2_16::$7
Coalesced [87] atan2_16::yi#19 = atan2_16::yi#0
Coalesced [88] atan2_16::xi#16 = atan2_16::xi#0
Coalesced [91] atan2_16::angle#22 = atan2_16::angle#12
Coalesced [96] atan2_16::angle#27 = atan2_16::angle#4
Coalesced [100] atan2_16::return#6 = atan2_16::angle#5
Coalesced [103] atan2_16::return#5 = atan2_16::angle#11
Coalesced [104] atan2_16::angle#26 = atan2_16::angle#1
Not coalescing [105] atan2_16::shift#5 = atan2_16::i#2
Not coalescing [106] atan2_16::xd#10 = atan2_16::xi#3
Not coalescing [107] atan2_16::yd#10 = atan2_16::yi#3
Coalesced [113] atan2_16::yd#13 = atan2_16::yd#2
Coalesced [114] atan2_16::xd#13 = atan2_16::xd#2
Coalesced [121] atan2_16::yi#21 = atan2_16::yi#2
Coalesced [122] atan2_16::angle#25 = atan2_16::angle#3
Coalesced [123] atan2_16::xi#18 = atan2_16::xi#2
Coalesced [127] atan2_16::yi#18 = atan2_16::yi#8
Coalesced [128] atan2_16::xi#15 = atan2_16::xi#8
Coalesced [129] atan2_16::i#12 = atan2_16::i#1
Coalesced [130] atan2_16::angle#21 = atan2_16::angle#13
Coalesced (already) [131] atan2_16::angle#23 = atan2_16::angle#13
Coalesced [136] atan2_16::yi#20 = atan2_16::yi#1
Coalesced [137] atan2_16::angle#24 = atan2_16::angle#2
Coalesced [138] atan2_16::xi#17 = atan2_16::xi#1
Coalesced [139] atan2_16::yd#12 = atan2_16::yd#3
Coalesced [140] atan2_16::xd#12 = atan2_16::xd#3
Coalesced [144] atan2_16::shift#6 = atan2_16::shift#1
Coalesced [145] atan2_16::xd#11 = atan2_16::xd#1
Coalesced [146] atan2_16::yd#11 = atan2_16::yd#1
Not coalescing [147] atan2_16::xi#13 = atan2_16::x#0
Not coalescing [148] atan2_16::yi#16 = atan2_16::y#0
Coalesced [151] diff::return#6 = diff::$2
Coalesced [155] diff::return#5 = diff::$4
Coalesced [157] print_uchar::b#4 = print_uchar::b#0
Coalesced [160] print_uchar::b#5 = print_uchar::b#1
Coalesced [161] print_char_cursor#41 = print_char_cursor#20
Coalesced [168] print_char::ch#3 = print_char::ch#0
Coalesced [169] print_char_cursor#42 = print_char_cursor#26
Coalesced [173] print_char::ch#4 = print_char::ch#1
Coalesced (already) [174] print_char_cursor#43 = print_char_cursor#20
Coalesced down to 26 phi equivalence classes
Culled Empty Block label main::@8
Culled Empty Block label main::toD0181_@return
Culled Empty Block label main::@11
Culled Empty Block label main::@5
Culled Empty Block label main::@12
Culled Empty Block label main::@13
Culled Empty Block label init_font_hex::@6
Culled Empty Block label init_font_hex::@7
Culled Empty Block label init_font_hex::@8
Culled Empty Block label atan2_16::@23
Culled Empty Block label atan2_16::@27
Culled Empty Block label atan2_16::@26
Culled Empty Block label atan2_16::@22
Culled Empty Block label atan2_16::@24
Culled Empty Block label atan2_16::@25
Culled Empty Block label print_uint::@2
Culled Empty Block label print_uchar::@2
Renumbering block main::@6 to main::@5
Renumbering block main::@7 to main::@6
Renumbering block main::@9 to main::@7
Renumbering block main::@10 to main::@8
Adding NOP phi() at start of main
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of init_font_hex

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] phi()
  [1] call init_font_hex
  to:main::toD0181
main::toD0181: scope:[main]  from main
  [2] phi()
  to:main::@6
main::@6: scope:[main]  from main::toD0181
  [3] *D018 = main::toD0181_return#0
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@6
  [4] main::screen#5 = phi( main::@3/main::screen#1, main::@6/SCREEN )
  [4] main::diff_sum#7 = phi( main::@3/main::diff_sum#1, main::@6/0 )
  [4] main::screen_ref#5 = phi( main::@3/main::screen_ref#1, main::@6/SCREEN_REF )
  [4] main::y#4 = phi( main::@3/main::y#1, main::@6/-$c )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@8
  [5] main::screen#2 = phi( main::@1/main::screen#5, main::@8/main::screen#1 )
  [5] main::diff_sum#2 = phi( main::@1/main::diff_sum#7, main::@8/main::diff_sum#1 )
  [5] main::screen_ref#2 = phi( main::@1/main::screen_ref#5, main::@8/main::screen_ref#1 )
  [5] main::x#2 = phi( main::@1/-$13, main::@8/main::x#1 )
  [6] main::xw#0 = (char)main::x#2 w= 0
  [7] main::yw#0 = (char)main::y#4 w= 0
  [8] atan2_16::x#0 = (int)main::xw#0
  [9] atan2_16::y#0 = (int)main::yw#0
  [10] call atan2_16
  [11] atan2_16::return#2 = atan2_16::return#0
  to:main::@7
main::@7: scope:[main]  from main::@2
  [12] main::angle_w#0 = atan2_16::return#2
  [13] main::$6 = main::angle_w#0 + $80
  [14] main::ang_w#0 = byte1  main::$6
  [15] diff::bb1#0 = main::ang_w#0
  [16] diff::bb2#0 = *main::screen_ref#2
  [17] call diff
  [18] diff::return#0 = diff::return#1
  to:main::@8
main::@8: scope:[main]  from main::@7
  [19] main::$8 = diff::return#0
  [20] main::diff_sum#1 = main::diff_sum#2 + main::$8
  [21] main::$9 = main::ang_w#0 - *main::screen_ref#2
  [22] *main::screen#2 = main::$9
  [23] main::screen#1 = ++ main::screen#2
  [24] main::screen_ref#1 = ++ main::screen_ref#2
  [25] main::x#1 = ++ main::x#2
  [26] if(main::x#1!=$15) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@8
  [27] main::y#1 = ++ main::y#4
  [28] if(main::y#1!=$d) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3
  [29] print_uint::w#0 = main::diff_sum#1
  [30] call print_uint
  to:main::@5
main::@5: scope:[main]  from main::@4 main::@5
  [31] *main::col00 = ++ *main::col00
  to:main::@5

void init_font_hex(char *charset)
init_font_hex: scope:[init_font_hex]  from main
  [32] phi()
  to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex]  from init_font_hex init_font_hex::@5
  [33] init_font_hex::c#6 = phi( init_font_hex/0, init_font_hex::@5/init_font_hex::c#1 )
  [33] init_font_hex::proto_hi#6 = phi( init_font_hex/FONT_HEX_PROTO, init_font_hex::@5/init_font_hex::proto_hi#1 )
  [33] init_font_hex::charset#5 = phi( init_font_hex/CHARSET, init_font_hex::@5/init_font_hex::charset#0 )
  to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex]  from init_font_hex::@1 init_font_hex::@4
  [34] init_font_hex::c1#4 = phi( init_font_hex::@1/0, init_font_hex::@4/init_font_hex::c1#1 )
  [34] init_font_hex::proto_lo#4 = phi( init_font_hex::@1/FONT_HEX_PROTO, init_font_hex::@4/init_font_hex::proto_lo#1 )
  [34] init_font_hex::charset#2 = phi( init_font_hex::@1/init_font_hex::charset#5, init_font_hex::@4/init_font_hex::charset#0 )
  [35] *init_font_hex::charset#2 = 0
  to:init_font_hex::@3
init_font_hex::@3: scope:[init_font_hex]  from init_font_hex::@2 init_font_hex::@3
  [36] init_font_hex::idx#5 = phi( init_font_hex::@2/1, init_font_hex::@3/init_font_hex::idx#2 )
  [36] init_font_hex::i#2 = phi( init_font_hex::@2/0, init_font_hex::@3/init_font_hex::i#1 )
  [37] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4
  [38] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1
  [39] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1
  [40] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2
  [41] init_font_hex::idx#2 = ++ init_font_hex::idx#5
  [42] init_font_hex::i#1 = ++ init_font_hex::i#2
  [43] if(init_font_hex::i#1!=5) goto init_font_hex::@3
  to:init_font_hex::@4
init_font_hex::@4: scope:[init_font_hex]  from init_font_hex::@3
  [44] init_font_hex::charset#2[init_font_hex::idx#2] = 0
  [45] init_font_hex::idx#3 = ++ init_font_hex::idx#2
  [46] init_font_hex::charset#2[init_font_hex::idx#3] = 0
  [47] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5
  [48] init_font_hex::charset#0 = init_font_hex::charset#2 + 8
  [49] init_font_hex::c1#1 = ++ init_font_hex::c1#4
  [50] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2
  to:init_font_hex::@5
init_font_hex::@5: scope:[init_font_hex]  from init_font_hex::@4
  [51] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5
  [52] init_font_hex::c#1 = ++ init_font_hex::c#6
  [53] if(init_font_hex::c#1!=$10) goto init_font_hex::@1
  to:init_font_hex::@return
init_font_hex::@return: scope:[init_font_hex]  from init_font_hex::@5
  [54] return 
  to:@return

unsigned int atan2_16(int x , int y)
atan2_16: scope:[atan2_16]  from main::@2
  [55] if(atan2_16::y#0>=0) goto atan2_16::@1
  to:atan2_16::@2
atan2_16::@2: scope:[atan2_16]  from atan2_16
  [56] atan2_16::$2 = - atan2_16::y#0
  to:atan2_16::@3
atan2_16::@3: scope:[atan2_16]  from atan2_16::@1 atan2_16::@2
  [57] atan2_16::yi#0 = phi( atan2_16::@1/atan2_16::yi#16, atan2_16::@2/atan2_16::$2 )
  [58] if(atan2_16::x#0>=0) goto atan2_16::@4
  to:atan2_16::@5
atan2_16::@5: scope:[atan2_16]  from atan2_16::@3
  [59] atan2_16::$7 = - atan2_16::x#0
  to:atan2_16::@6
atan2_16::@6: scope:[atan2_16]  from atan2_16::@4 atan2_16::@5
  [60] atan2_16::xi#0 = phi( atan2_16::@4/atan2_16::xi#13, atan2_16::@5/atan2_16::$7 )
  to:atan2_16::@10
atan2_16::@10: scope:[atan2_16]  from atan2_16::@19 atan2_16::@6
  [61] atan2_16::angle#12 = phi( atan2_16::@19/atan2_16::angle#13, atan2_16::@6/0 )
  [61] atan2_16::i#2 = phi( atan2_16::@19/atan2_16::i#1, atan2_16::@6/0 )
  [61] atan2_16::xi#3 = phi( atan2_16::@19/atan2_16::xi#8, atan2_16::@6/atan2_16::xi#0 )
  [61] atan2_16::yi#3 = phi( atan2_16::@19/atan2_16::yi#8, atan2_16::@6/atan2_16::yi#0 )
  [62] if(atan2_16::yi#3!=0) goto atan2_16::@11
  to:atan2_16::@12
atan2_16::@12: scope:[atan2_16]  from atan2_16::@10 atan2_16::@19
  [63] atan2_16::angle#6 = phi( atan2_16::@10/atan2_16::angle#12, atan2_16::@19/atan2_16::angle#13 )
  [64] atan2_16::angle#1 = atan2_16::angle#6 >> 1
  [65] if(atan2_16::x#0>=0) goto atan2_16::@7
  to:atan2_16::@21
atan2_16::@21: scope:[atan2_16]  from atan2_16::@12
  [66] atan2_16::angle#4 = $8000 - atan2_16::angle#1
  to:atan2_16::@7
atan2_16::@7: scope:[atan2_16]  from atan2_16::@12 atan2_16::@21
  [67] atan2_16::angle#11 = phi( atan2_16::@12/atan2_16::angle#1, atan2_16::@21/atan2_16::angle#4 )
  [68] if(atan2_16::y#0>=0) goto atan2_16::@8
  to:atan2_16::@9
atan2_16::@9: scope:[atan2_16]  from atan2_16::@7
  [69] atan2_16::angle#5 = - atan2_16::angle#11
  to:atan2_16::@8
atan2_16::@8: scope:[atan2_16]  from atan2_16::@7 atan2_16::@9
  [70] atan2_16::return#0 = phi( atan2_16::@7/atan2_16::angle#11, atan2_16::@9/atan2_16::angle#5 )
  to:atan2_16::@return
atan2_16::@return: scope:[atan2_16]  from atan2_16::@8
  [71] return 
  to:@return
atan2_16::@11: scope:[atan2_16]  from atan2_16::@10
  [72] atan2_16::shift#5 = atan2_16::i#2
  [73] atan2_16::xd#10 = atan2_16::xi#3
  [74] atan2_16::yd#10 = atan2_16::yi#3
  to:atan2_16::@13
atan2_16::@13: scope:[atan2_16]  from atan2_16::@11 atan2_16::@14
  [75] atan2_16::yd#3 = phi( atan2_16::@11/atan2_16::yd#10, atan2_16::@14/atan2_16::yd#1 )
  [75] atan2_16::xd#3 = phi( atan2_16::@11/atan2_16::xd#10, atan2_16::@14/atan2_16::xd#1 )
  [75] atan2_16::shift#2 = phi( atan2_16::@11/atan2_16::shift#5, atan2_16::@14/atan2_16::shift#1 )
  [76] if(atan2_16::shift#2>=2) goto atan2_16::@14
  to:atan2_16::@15
atan2_16::@15: scope:[atan2_16]  from atan2_16::@13
  [77] if(0==atan2_16::shift#2) goto atan2_16::@17
  to:atan2_16::@16
atan2_16::@16: scope:[atan2_16]  from atan2_16::@15
  [78] atan2_16::xd#2 = atan2_16::xd#3 >> 1
  [79] atan2_16::yd#2 = atan2_16::yd#3 >> 1
  to:atan2_16::@17
atan2_16::@17: scope:[atan2_16]  from atan2_16::@15 atan2_16::@16
  [80] atan2_16::xd#5 = phi( atan2_16::@15/atan2_16::xd#3, atan2_16::@16/atan2_16::xd#2 )
  [80] atan2_16::yd#5 = phi( atan2_16::@15/atan2_16::yd#3, atan2_16::@16/atan2_16::yd#2 )
  [81] if(atan2_16::yi#3>=0) goto atan2_16::@18
  to:atan2_16::@20
atan2_16::@20: scope:[atan2_16]  from atan2_16::@17
  [82] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5
  [83] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5
  [84] atan2_16::$23 = atan2_16::i#2 << 1
  [85] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23]
  to:atan2_16::@19
atan2_16::@19: scope:[atan2_16]  from atan2_16::@18 atan2_16::@20
  [86] atan2_16::xi#8 = phi( atan2_16::@18/atan2_16::xi#1, atan2_16::@20/atan2_16::xi#2 )
  [86] atan2_16::angle#13 = phi( atan2_16::@18/atan2_16::angle#2, atan2_16::@20/atan2_16::angle#3 )
  [86] atan2_16::yi#8 = phi( atan2_16::@18/atan2_16::yi#1, atan2_16::@20/atan2_16::yi#2 )
  [87] atan2_16::i#1 = ++ atan2_16::i#2
  [88] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12
  to:atan2_16::@10
atan2_16::@18: scope:[atan2_16]  from atan2_16::@17
  [89] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5
  [90] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5
  [91] atan2_16::$22 = atan2_16::i#2 << 1
  [92] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22]
  to:atan2_16::@19
atan2_16::@14: scope:[atan2_16]  from atan2_16::@13
  [93] atan2_16::xd#1 = atan2_16::xd#3 >> 2
  [94] atan2_16::yd#1 = atan2_16::yd#3 >> 2
  [95] atan2_16::shift#1 = atan2_16::shift#2 - 2
  to:atan2_16::@13
atan2_16::@4: scope:[atan2_16]  from atan2_16::@3
  [96] atan2_16::xi#13 = atan2_16::x#0
  to:atan2_16::@6
atan2_16::@1: scope:[atan2_16]  from atan2_16
  [97] atan2_16::yi#16 = atan2_16::y#0
  to:atan2_16::@3

char diff(char bb1 , char bb2)
diff: scope:[diff]  from main::@7
  [98] if(diff::bb1#0<diff::bb2#0) goto diff::@1
  to:diff::@2
diff::@2: scope:[diff]  from diff
  [99] diff::$2 = diff::bb1#0 - diff::bb2#0
  to:diff::@3
diff::@3: scope:[diff]  from diff::@1 diff::@2
  [100] diff::return#1 = phi( diff::@1/diff::$4, diff::@2/diff::$2 )
  to:diff::@return
diff::@return: scope:[diff]  from diff::@3
  [101] return 
  to:@return
diff::@1: scope:[diff]  from diff
  [102] diff::$4 = diff::bb2#0 - diff::bb1#0
  to:diff::@3

void print_uint(unsigned int w)
print_uint: scope:[print_uint]  from main::@4
  [103] print_uchar::b#0 = byte1  print_uint::w#0
  [104] call print_uchar
  to:print_uint::@1
print_uint::@1: scope:[print_uint]  from print_uint
  [105] print_uchar::b#1 = byte0  print_uint::w#0
  [106] call print_uchar
  to:print_uint::@return
print_uint::@return: scope:[print_uint]  from print_uint::@1
  [107] return 
  to:@return

void print_uchar(char b)
print_uchar: scope:[print_uchar]  from print_uint print_uint::@1
  [108] print_char_cursor#26 = phi( print_uint/print_screen#0, print_uint::@1/print_char_cursor#20 )
  [108] print_uchar::b#2 = phi( print_uint/print_uchar::b#0, print_uint::@1/print_uchar::b#1 )
  [109] print_uchar::$0 = print_uchar::b#2 >> 4
  [110] print_char::ch#0 = print_hextab[print_uchar::$0]
  [111] call print_char
  to:print_uchar::@1
print_uchar::@1: scope:[print_uchar]  from print_uchar
  [112] print_uchar::$2 = print_uchar::b#2 & $f
  [113] print_char::ch#1 = print_hextab[print_uchar::$2]
  [114] call print_char
  to:print_uchar::@return
print_uchar::@return: scope:[print_uchar]  from print_uchar::@1
  [115] return 
  to:@return

void print_char(char ch)
print_char: scope:[print_char]  from print_uchar print_uchar::@1
  [116] print_char_cursor#19 = phi( print_uchar/print_char_cursor#26, print_uchar::@1/print_char_cursor#20 )
  [116] print_char::ch#2 = phi( print_uchar/print_char::ch#0, print_uchar::@1/print_char::ch#1 )
  [117] *print_char_cursor#19 = print_char::ch#2
  [118] print_char_cursor#20 = ++ print_char_cursor#19
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [119] return 
  to:@return


VARIABLE REGISTER WEIGHTS
unsigned int atan2_16(int x , int y)
int atan2_16::$2 // 2002.0
char atan2_16::$22 // 2000002.0
char atan2_16::$23 // 2000002.0
int atan2_16::$7 // 2002.0
unsigned int atan2_16::angle
unsigned int atan2_16::angle#1 // 1501.5
unsigned int atan2_16::angle#11 // 2002.0
unsigned int atan2_16::angle#12 // 190476.38095238095
unsigned int atan2_16::angle#13 // 1333334.6666666667
unsigned int atan2_16::angle#2 // 2000002.0
unsigned int atan2_16::angle#3 // 2000002.0
unsigned int atan2_16::angle#4 // 2002.0
unsigned int atan2_16::angle#5 // 2002.0
unsigned int atan2_16::angle#6 // 2001003.0
char atan2_16::i
char atan2_16::i#1 // 1500001.5
char atan2_16::i#2 // 208333.5416666667
unsigned int atan2_16::return
unsigned int atan2_16::return#0 // 701.0
unsigned int atan2_16::return#2 // 202.0
char atan2_16::shift
char atan2_16::shift#1 // 2.0000002E7
char atan2_16::shift#2 // 8000001.25
char atan2_16::shift#5 // 666667.3333333334
int atan2_16::x
int atan2_16::x#0 // 108.02631578947367
int atan2_16::xd
int atan2_16::xd#1 // 6666667.333333333
int atan2_16::xd#10 // 1000001.0
int atan2_16::xd#2 // 1000001.0
int atan2_16::xd#3 // 7666668.333333332
int atan2_16::xd#5 // 1000001.0
int atan2_16::xi
int atan2_16::xi#0 // 3003.0
int atan2_16::xi#1 // 500000.5
int atan2_16::xi#13 // 2002.0
int atan2_16::xi#2 // 500000.5
int atan2_16::xi#3 // 266733.6666666667
int atan2_16::xi#8 // 1000001.0
int atan2_16::y
int atan2_16::y#0 // 102.625
int atan2_16::yd
int atan2_16::yd#1 // 1.0000001E7
int atan2_16::yd#10 // 2000002.0
int atan2_16::yd#2 // 2000002.0
int atan2_16::yd#3 // 4600001.0
int atan2_16::yd#5 // 2000002.0
int atan2_16::yi
int atan2_16::yi#0 // 600.5999999999999
int atan2_16::yi#1 // 666667.3333333334
int atan2_16::yi#16 // 2002.0
int atan2_16::yi#2 // 666667.3333333334
int atan2_16::yi#3 // 353000.41176470584
int atan2_16::yi#8 // 1000001.0
char diff(char bb1 , char bb2)
char diff::$2 // 2002.0
char diff::$4 // 2002.0
char diff::bb1
char diff::bb1#0 // 1034.6666666666667
char diff::bb2
char diff::bb2#0 // 1552.0
char diff::return
char diff::return#0 // 202.0
char diff::return#1 // 701.0
void init_font_hex(char *charset)
char init_font_hex::$0 // 10001.0
char init_font_hex::$1 // 20002.0
char init_font_hex::$2 // 20002.0
char init_font_hex::c
char init_font_hex::c#1 // 151.5
char init_font_hex::c#6 // 10.631578947368421
char init_font_hex::c1
char init_font_hex::c1#1 // 1501.5
char init_font_hex::c1#4 // 133.46666666666667
char *init_font_hex::charset
char *init_font_hex::charset#0 // 350.5
char *init_font_hex::charset#2 // 1079.0714285714287
char *init_font_hex::charset#5 // 202.0
char init_font_hex::i
char init_font_hex::i#1 // 15001.5
char init_font_hex::i#2 // 6667.333333333333
char init_font_hex::idx
char init_font_hex::idx#2 // 5501.0
char init_font_hex::idx#3 // 2002.0
char init_font_hex::idx#5 // 6000.6
char *init_font_hex::proto_hi
char *init_font_hex::proto_hi#1 // 67.33333333333333
char *init_font_hex::proto_hi#6 // 566.8333333333333
char *init_font_hex::proto_lo
char *init_font_hex::proto_lo#1 // 500.5
char *init_font_hex::proto_lo#4 // 923.3076923076923
void main()
unsigned int main::$6 // 202.0
char main::$8 // 202.0
char main::$9 // 202.0
char main::ang_w
char main::ang_w#0 // 43.285714285714285
unsigned int main::angle_w
unsigned int main::angle_w#0 // 202.0
unsigned int main::diff_sum
unsigned int main::diff_sum#1 // 23.888888888888886
unsigned int main::diff_sum#2 // 14.2
unsigned int main::diff_sum#7 // 22.0
char *main::screen
char *main::screen#1 // 35.5
char *main::screen#2 // 17.444444444444443
char *main::screen#5 // 22.0
char *main::screen_ref
char *main::screen_ref#1 // 42.599999999999994
char *main::screen_ref#2 // 21.842105263157897
char *main::screen_ref#5 // 22.0
char *main::toD0181_gfx
char main::toD0181_return
char *main::toD0181_screen
signed char main::x
signed char main::x#1 // 151.5
signed char main::x#2 // 10.1
int main::xw
unsigned int main::xw#0 // 50.5
signed char main::y
signed char main::y#1 // 16.5
signed char main::y#4 // 0.9565217391304348
int main::yw
unsigned int main::yw#0 // 50.5
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // 202.0
char print_char::ch#1 // 202.0
char print_char::ch#2 // 1203.0
char *print_char_cursor
char *print_char_cursor#19 // 1102.0
char *print_char_cursor#20 // 123.66666666666667
char *print_char_cursor#26 // 37.33333333333333
char *print_line_cursor
char *print_screen
void print_uchar(char b)
char print_uchar::$0 // 202.0
char print_uchar::$2 // 202.0
char print_uchar::b
char print_uchar::b#0 // 22.0
char print_uchar::b#1 // 22.0
char print_uchar::b#2 // 56.0
void print_uint(unsigned int w)
unsigned int print_uint::w
unsigned int print_uint::w#0 // 8.0

Initial phi equivalence classes
[ main::y#4 main::y#1 ]
[ main::x#2 main::x#1 ]
[ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
[ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ]
[ main::screen#2 main::screen#5 main::screen#1 ]
[ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
[ init_font_hex::c#6 init_font_hex::c#1 ]
[ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
[ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
[ init_font_hex::c1#4 init_font_hex::c1#1 ]
[ init_font_hex::i#2 init_font_hex::i#1 ]
[ init_font_hex::idx#5 init_font_hex::idx#2 ]
[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
[ atan2_16::i#2 atan2_16::i#1 ]
[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ]
[ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ]
[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
[ diff::return#1 diff::$4 diff::$2 ]
[ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ]
Added variable main::xw#0 to live range equivalence class [ main::xw#0 ]
Added variable main::yw#0 to live range equivalence class [ main::yw#0 ]
Added variable atan2_16::x#0 to live range equivalence class [ atan2_16::x#0 ]
Added variable atan2_16::y#0 to live range equivalence class [ atan2_16::y#0 ]
Added variable atan2_16::return#2 to live range equivalence class [ atan2_16::return#2 ]
Added variable main::angle_w#0 to live range equivalence class [ main::angle_w#0 ]
Added variable main::$6 to live range equivalence class [ main::$6 ]
Added variable main::ang_w#0 to live range equivalence class [ main::ang_w#0 ]
Added variable diff::bb1#0 to live range equivalence class [ diff::bb1#0 ]
Added variable diff::bb2#0 to live range equivalence class [ diff::bb2#0 ]
Added variable diff::return#0 to live range equivalence class [ diff::return#0 ]
Added variable main::$8 to live range equivalence class [ main::$8 ]
Added variable main::$9 to live range equivalence class [ main::$9 ]
Added variable print_uint::w#0 to live range equivalence class [ print_uint::w#0 ]
Added variable init_font_hex::$0 to live range equivalence class [ init_font_hex::$0 ]
Added variable init_font_hex::$1 to live range equivalence class [ init_font_hex::$1 ]
Added variable init_font_hex::$2 to live range equivalence class [ init_font_hex::$2 ]
Added variable init_font_hex::idx#3 to live range equivalence class [ init_font_hex::idx#3 ]
Added variable atan2_16::$23 to live range equivalence class [ atan2_16::$23 ]
Added variable atan2_16::$22 to live range equivalence class [ atan2_16::$22 ]
Added variable print_uchar::$0 to live range equivalence class [ print_uchar::$0 ]
Added variable print_uchar::$2 to live range equivalence class [ print_uchar::$2 ]
Complete equivalence classes
[ main::y#4 main::y#1 ]
[ main::x#2 main::x#1 ]
[ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
[ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ]
[ main::screen#2 main::screen#5 main::screen#1 ]
[ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
[ init_font_hex::c#6 init_font_hex::c#1 ]
[ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
[ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
[ init_font_hex::c1#4 init_font_hex::c1#1 ]
[ init_font_hex::i#2 init_font_hex::i#1 ]
[ init_font_hex::idx#5 init_font_hex::idx#2 ]
[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
[ atan2_16::i#2 atan2_16::i#1 ]
[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ]
[ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ]
[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
[ diff::return#1 diff::$4 diff::$2 ]
[ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ]
[ main::xw#0 ]
[ main::yw#0 ]
[ atan2_16::x#0 ]
[ atan2_16::y#0 ]
[ atan2_16::return#2 ]
[ main::angle_w#0 ]
[ main::$6 ]
[ main::ang_w#0 ]
[ diff::bb1#0 ]
[ diff::bb2#0 ]
[ diff::return#0 ]
[ main::$8 ]
[ main::$9 ]
[ print_uint::w#0 ]
[ init_font_hex::$0 ]
[ init_font_hex::$1 ]
[ init_font_hex::$2 ]
[ init_font_hex::idx#3 ]
[ atan2_16::$23 ]
[ atan2_16::$22 ]
[ print_uchar::$0 ]
[ print_uchar::$2 ]
Allocated zp[1]:2 [ main::y#4 main::y#1 ]
Allocated zp[1]:3 [ main::x#2 main::x#1 ]
Allocated zp[2]:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
Allocated zp[2]:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ]
Allocated zp[2]:8 [ main::screen#2 main::screen#5 main::screen#1 ]
Allocated zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated zp[2]:13 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated zp[2]:15 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated zp[1]:18 [ init_font_hex::i#2 init_font_hex::i#1 ]
Allocated zp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated zp[2]:20 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
Allocated zp[2]:22 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
Allocated zp[1]:24 [ atan2_16::i#2 atan2_16::i#1 ]
Allocated zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ]
Allocated zp[2]:27 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ]
Allocated zp[1]:29 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
Allocated zp[2]:30 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
Allocated zp[2]:32 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
Allocated zp[1]:34 [ diff::return#1 diff::$4 diff::$2 ]
Allocated zp[1]:35 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Allocated zp[1]:36 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp[2]:37 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ]
Allocated zp[2]:39 [ main::xw#0 ]
Allocated zp[2]:41 [ main::yw#0 ]
Allocated zp[2]:43 [ atan2_16::x#0 ]
Allocated zp[2]:45 [ atan2_16::y#0 ]
Allocated zp[2]:47 [ atan2_16::return#2 ]
Allocated zp[2]:49 [ main::angle_w#0 ]
Allocated zp[2]:51 [ main::$6 ]
Allocated zp[1]:53 [ main::ang_w#0 ]
Allocated zp[1]:54 [ diff::bb1#0 ]
Allocated zp[1]:55 [ diff::bb2#0 ]
Allocated zp[1]:56 [ diff::return#0 ]
Allocated zp[1]:57 [ main::$8 ]
Allocated zp[1]:58 [ main::$9 ]
Allocated zp[2]:59 [ print_uint::w#0 ]
Allocated zp[1]:61 [ init_font_hex::$0 ]
Allocated zp[1]:62 [ init_font_hex::$1 ]
Allocated zp[1]:63 [ init_font_hex::$2 ]
Allocated zp[1]:64 [ init_font_hex::idx#3 ]
Allocated zp[1]:65 [ atan2_16::$23 ]
Allocated zp[1]:66 [ atan2_16::$22 ]
Allocated zp[1]:67 [ print_uchar::$0 ]
Allocated zp[1]:68 [ print_uchar::$2 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [3] *D018 = main::toD0181_return#0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [8] atan2_16::x#0 = (int)main::xw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::x#2 main::x#1 ]
Statement [9] atan2_16::y#0 = (int)main::yw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [11] atan2_16::return#2 = atan2_16::return#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [12] main::angle_w#0 = atan2_16::return#2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [13] main::$6 = main::angle_w#0 + $80 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$6 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$6 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [16] diff::bb2#0 = *main::screen_ref#2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:2 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:3 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:53 [ main::ang_w#0 ]
Removing always clobbered register reg byte y as potential for zp[1]:53 [ main::ang_w#0 ]
Removing always clobbered register reg byte a as potential for zp[1]:54 [ diff::bb1#0 ]
Removing always clobbered register reg byte y as potential for zp[1]:54 [ diff::bb1#0 ]
Statement [20] main::diff_sum#1 = main::diff_sum#2 + main::$8 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] (  [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] { }  ) always clobbers reg byte a 
Statement [21] main::$9 = main::ang_w#0 - *main::screen_ref#2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$9 ] (  [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$9 ] { }  ) always clobbers reg byte a reg byte y 
Statement [22] *main::screen#2 = main::$9 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] (  [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] { }  ) always clobbers reg byte y 
Statement [29] print_uint::w#0 = main::diff_sum#1 [ print_uint::w#0 ] (  [ print_uint::w#0 ] { { print_uint::w#0 = main::diff_sum#1 } }  ) always clobbers reg byte a 
Statement [35] *init_font_hex::charset#2 = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { }  ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Statement [37] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:18 [ init_font_hex::i#2 init_font_hex::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Statement [38] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] { }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:61 [ init_font_hex::$0 ]
Statement [44] init_font_hex::charset#2[init_font_hex::idx#2] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] { }  ) always clobbers reg byte a 
Statement [46] init_font_hex::charset#2[init_font_hex::idx#3] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { }  ) always clobbers reg byte a 
Statement [47] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { }  ) always clobbers reg byte a 
Statement [48] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { }  ) always clobbers reg byte a 
Statement [51] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( init_font_hex:1 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] { }  ) always clobbers reg byte a 
Statement [55] if(atan2_16::y#0>=0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [56] atan2_16::$2 = - atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [58] if(atan2_16::x#0>=0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [59] atan2_16::$7 = - atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [62] if(atan2_16::yi#3!=0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:24 [ atan2_16::i#2 atan2_16::i#1 ]
Statement [64] atan2_16::angle#1 = atan2_16::angle#6 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [65] if(atan2_16::x#0>=0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [66] atan2_16::angle#4 = $8000 - atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [68] if(atan2_16::y#0>=0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#11 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [69] atan2_16::angle#5 = - atan2_16::angle#11 [ atan2_16::angle#5 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#5 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [73] atan2_16::xd#10 = atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:29 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
Statement [74] atan2_16::yd#10 = atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [78] atan2_16::xd#2 = atan2_16::xd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [79] atan2_16::yd#2 = atan2_16::yd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [81] if(atan2_16::yi#3>=0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [82] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [83] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [84] atan2_16::$23 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [85] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [89] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [90] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [91] atan2_16::$22 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [92] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [93] atan2_16::xd#1 = atan2_16::xd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [94] atan2_16::yd#1 = atan2_16::yd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [96] atan2_16::xi#13 = atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [97] atan2_16::yi#16 = atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [99] diff::$2 = diff::bb1#0 - diff::bb2#0 [ diff::$2 ] ( diff:17 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$2 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [102] diff::$4 = diff::bb2#0 - diff::bb1#0 [ diff::$4 ] ( diff:17 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$4 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [109] print_uchar::$0 = print_uchar::b#2 >> 4 [ print_uchar::b#2 print_char_cursor#26 print_uchar::$0 ] ( print_uint:30::print_uchar:104 [ print_uint::w#0 print_uchar::b#2 print_char_cursor#26 print_uchar::$0 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#0 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#26 } }  print_uint:30::print_uchar:106 [ print_uchar::b#2 print_char_cursor#26 print_uchar::$0 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#0 = print_char::ch#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:35 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Statement [112] print_uchar::$2 = print_uchar::b#2 & $f [ print_char_cursor#20 print_uchar::$2 ] ( print_uint:30::print_uchar:104 [ print_uint::w#0 print_char_cursor#20 print_uchar::$2 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#20 } }  print_uint:30::print_uchar:106 [ print_char_cursor#20 print_uchar::$2 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte a 
Statement [117] *print_char_cursor#19 = print_char::ch#2 [ print_char_cursor#19 ] ( print_uint:30::print_uchar:104::print_char:111 [ print_uint::w#0 print_uchar::b#2 print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#0 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#26 } }  print_uint:30::print_uchar:106::print_char:111 [ print_uchar::b#2 print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:30::print_uchar:104::print_char:114 [ print_uint::w#0 print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#20 } }  print_uint:30::print_uchar:106::print_char:114 [ print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:35 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
Statement [3] *D018 = main::toD0181_return#0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [6] main::xw#0 = (char)main::x#2 w= 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [7] main::yw#0 = (char)main::y#4 w= 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [8] atan2_16::x#0 = (int)main::xw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [9] atan2_16::y#0 = (int)main::yw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [11] atan2_16::return#2 = atan2_16::return#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [12] main::angle_w#0 = atan2_16::return#2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [13] main::$6 = main::angle_w#0 + $80 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$6 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$6 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [16] diff::bb2#0 = *main::screen_ref#2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] (  [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a reg byte y 
Statement [20] main::diff_sum#1 = main::diff_sum#2 + main::$8 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] (  [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] { }  ) always clobbers reg byte a 
Statement [21] main::$9 = main::ang_w#0 - *main::screen_ref#2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$9 ] (  [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$9 ] { }  ) always clobbers reg byte a reg byte y 
Statement [22] *main::screen#2 = main::$9 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] (  [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] { }  ) always clobbers reg byte y 
Statement [29] print_uint::w#0 = main::diff_sum#1 [ print_uint::w#0 ] (  [ print_uint::w#0 ] { { print_uint::w#0 = main::diff_sum#1 } }  ) always clobbers reg byte a 
Statement [35] *init_font_hex::charset#2 = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { }  ) always clobbers reg byte a reg byte y 
Statement [37] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] { }  ) always clobbers reg byte a 
Statement [38] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] { }  ) always clobbers reg byte a 
Statement [44] init_font_hex::charset#2[init_font_hex::idx#2] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] { }  ) always clobbers reg byte a 
Statement [46] init_font_hex::charset#2[init_font_hex::idx#3] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { }  ) always clobbers reg byte a 
Statement [47] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { }  ) always clobbers reg byte a 
Statement [48] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { }  ) always clobbers reg byte a 
Statement [51] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( init_font_hex:1 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] { }  ) always clobbers reg byte a 
Statement [55] if(atan2_16::y#0>=0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [56] atan2_16::$2 = - atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [58] if(atan2_16::x#0>=0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [59] atan2_16::$7 = - atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [62] if(atan2_16::yi#3!=0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [64] atan2_16::angle#1 = atan2_16::angle#6 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [65] if(atan2_16::x#0>=0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [66] atan2_16::angle#4 = $8000 - atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [68] if(atan2_16::y#0>=0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#11 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [69] atan2_16::angle#5 = - atan2_16::angle#11 [ atan2_16::angle#5 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#5 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [73] atan2_16::xd#10 = atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [74] atan2_16::yd#10 = atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [78] atan2_16::xd#2 = atan2_16::xd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [79] atan2_16::yd#2 = atan2_16::yd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [81] if(atan2_16::yi#3>=0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [82] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [83] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [84] atan2_16::$23 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [85] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [89] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [90] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [91] atan2_16::$22 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [92] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [93] atan2_16::xd#1 = atan2_16::xd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [94] atan2_16::yd#1 = atan2_16::yd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [96] atan2_16::xi#13 = atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [97] atan2_16::yi#16 = atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( atan2_16:10 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] { { atan2_16::return#0 = atan2_16::return#2 } }  ) always clobbers reg byte a 
Statement [99] diff::$2 = diff::bb1#0 - diff::bb2#0 [ diff::$2 ] ( diff:17 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$2 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [102] diff::$4 = diff::bb2#0 - diff::bb1#0 [ diff::$4 ] ( diff:17 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$4 ] { { diff::bb1#0 = main::ang_w#0 } { diff::return#0 = diff::return#1 } }  ) always clobbers reg byte a 
Statement [109] print_uchar::$0 = print_uchar::b#2 >> 4 [ print_uchar::b#2 print_char_cursor#26 print_uchar::$0 ] ( print_uint:30::print_uchar:104 [ print_uint::w#0 print_uchar::b#2 print_char_cursor#26 print_uchar::$0 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#0 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#26 } }  print_uint:30::print_uchar:106 [ print_uchar::b#2 print_char_cursor#26 print_uchar::$0 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#0 = print_char::ch#2 } }  ) always clobbers reg byte a 
Statement [112] print_uchar::$2 = print_uchar::b#2 & $f [ print_char_cursor#20 print_uchar::$2 ] ( print_uint:30::print_uchar:104 [ print_uint::w#0 print_char_cursor#20 print_uchar::$2 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#20 } }  print_uint:30::print_uchar:106 [ print_char_cursor#20 print_uchar::$2 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte a 
Statement [117] *print_char_cursor#19 = print_char::ch#2 [ print_char_cursor#19 ] ( print_uint:30::print_uchar:104::print_char:111 [ print_uint::w#0 print_uchar::b#2 print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#0 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#26 } }  print_uint:30::print_uchar:106::print_char:111 [ print_uchar::b#2 print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#0 = print_char::ch#2 } }  print_uint:30::print_uchar:104::print_char:114 [ print_uint::w#0 print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#0 = print_uchar::b#2 } { print_char::ch#1 = print_char::ch#2 } { print_char_cursor#19 = print_char_cursor#20 } }  print_uint:30::print_uchar:106::print_char:114 [ print_char_cursor#19 ] { { print_uint::w#0 = main::diff_sum#1 } { print_uchar::b#1 = print_uchar::b#2 } { print_char_cursor#19 = print_char_cursor#26 print_char_cursor#20 } { print_char::ch#1 = print_char::ch#2 } }  ) always clobbers reg byte y 
Potential registers zp[1]:2 [ main::y#4 main::y#1 ] : zp[1]:2 , reg byte x , 
Potential registers zp[1]:3 [ main::x#2 main::x#1 ] : zp[1]:3 , reg byte x , 
Potential registers zp[2]:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] : zp[2]:4 , 
Potential registers zp[2]:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] : zp[2]:6 , 
Potential registers zp[2]:8 [ main::screen#2 main::screen#5 main::screen#1 ] : zp[2]:8 , 
Potential registers zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp[2]:10 , 
Potential registers zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp[1]:12 , reg byte x , 
Potential registers zp[2]:13 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp[2]:13 , 
Potential registers zp[2]:15 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp[2]:15 , 
Potential registers zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp[1]:17 , reg byte x , 
Potential registers zp[1]:18 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp[1]:18 , reg byte x , reg byte y , 
Potential registers zp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp[1]:19 , reg byte x , reg byte y , 
Potential registers zp[2]:20 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp[2]:20 , 
Potential registers zp[2]:22 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp[2]:22 , 
Potential registers zp[1]:24 [ atan2_16::i#2 atan2_16::i#1 ] : zp[1]:24 , reg byte x , reg byte y , 
Potential registers zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp[2]:25 , 
Potential registers zp[2]:27 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] : zp[2]:27 , 
Potential registers zp[1]:29 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp[1]:29 , reg byte x , reg byte y , 
Potential registers zp[2]:30 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp[2]:30 , 
Potential registers zp[2]:32 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp[2]:32 , 
Potential registers zp[1]:34 [ diff::return#1 diff::$4 diff::$2 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:35 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] : zp[1]:35 , reg byte x , 
Potential registers zp[1]:36 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp[1]:36 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:37 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ] : zp[2]:37 , 
Potential registers zp[2]:39 [ main::xw#0 ] : zp[2]:39 , 
Potential registers zp[2]:41 [ main::yw#0 ] : zp[2]:41 , 
Potential registers zp[2]:43 [ atan2_16::x#0 ] : zp[2]:43 , 
Potential registers zp[2]:45 [ atan2_16::y#0 ] : zp[2]:45 , 
Potential registers zp[2]:47 [ atan2_16::return#2 ] : zp[2]:47 , 
Potential registers zp[2]:49 [ main::angle_w#0 ] : zp[2]:49 , 
Potential registers zp[2]:51 [ main::$6 ] : zp[2]:51 , 
Potential registers zp[1]:53 [ main::ang_w#0 ] : zp[1]:53 , reg byte x , 
Potential registers zp[1]:54 [ diff::bb1#0 ] : zp[1]:54 , reg byte x , 
Potential registers zp[1]:55 [ diff::bb2#0 ] : zp[1]:55 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:56 [ diff::return#0 ] : zp[1]:56 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:57 [ main::$8 ] : zp[1]:57 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:58 [ main::$9 ] : zp[1]:58 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:59 [ print_uint::w#0 ] : zp[2]:59 , 
Potential registers zp[1]:61 [ init_font_hex::$0 ] : zp[1]:61 , reg byte x , reg byte y , 
Potential registers zp[1]:62 [ init_font_hex::$1 ] : zp[1]:62 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:63 [ init_font_hex::$2 ] : zp[1]:63 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:64 [ init_font_hex::idx#3 ] : zp[1]:64 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:65 [ atan2_16::$23 ] : zp[1]:65 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:66 [ atan2_16::$22 ] : zp[1]:66 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:67 [ print_uchar::$0 ] : zp[1]:67 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:68 [ print_uchar::$2 ] : zp[1]:68 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [atan2_16] 28,666,670.58: zp[1]:29 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,600,008: zp[2]:30 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,333,338.67: zp[2]:32 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,524,818.05: zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,690,940.68: zp[2]:20 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,273,742.67: zp[2]:22 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,000,002: zp[1]:65 [ atan2_16::$23 ] 2,000,002: zp[1]:66 [ atan2_16::$22 ] 1,708,335.04: zp[1]:24 [ atan2_16::i#2 atan2_16::i#1 ] 8,208.5: zp[2]:27 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] 202: zp[2]:47 [ atan2_16::return#2 ] 108.03: zp[2]:43 [ atan2_16::x#0 ] 102.62: zp[2]:45 [ atan2_16::y#0 ] 
Uplift Scope [init_font_hex] 21,668.83: zp[1]:18 [ init_font_hex::i#2 init_font_hex::i#1 ] 20,002: zp[1]:62 [ init_font_hex::$1 ] 20,002: zp[1]:63 [ init_font_hex::$2 ] 11,501.6: zp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 10,001: zp[1]:61 [ init_font_hex::$0 ] 2,002: zp[1]:64 [ init_font_hex::idx#3 ] 1,634.97: zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 1,631.57: zp[2]:13 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 1,423.81: zp[2]:15 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 634.17: zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 162.13: zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Uplift Scope [diff] 4,705: zp[1]:34 [ diff::return#1 diff::$4 diff::$2 ] 1,552: zp[1]:55 [ diff::bb2#0 ] 1,034.67: zp[1]:54 [ diff::bb1#0 ] 202: zp[1]:56 [ diff::return#0 ] 
Uplift Scope [print_char] 1,607: zp[1]:36 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [main] 202: zp[2]:49 [ main::angle_w#0 ] 202: zp[2]:51 [ main::$6 ] 202: zp[1]:57 [ main::$8 ] 202: zp[1]:58 [ main::$9 ] 161.6: zp[1]:3 [ main::x#2 main::x#1 ] 86.44: zp[2]:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] 74.94: zp[2]:8 [ main::screen#2 main::screen#5 main::screen#1 ] 60.09: zp[2]:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] 50.5: zp[2]:39 [ main::xw#0 ] 50.5: zp[2]:41 [ main::yw#0 ] 43.29: zp[1]:53 [ main::ang_w#0 ] 17.46: zp[1]:2 [ main::y#4 main::y#1 ] 
Uplift Scope [] 1,263: zp[2]:37 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ] 
Uplift Scope [print_uchar] 202: zp[1]:67 [ print_uchar::$0 ] 202: zp[1]:68 [ print_uchar::$2 ] 100: zp[1]:35 [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] 
Uplift Scope [print_uint] 8: zp[2]:59 [ print_uint::w#0 ] 
Uplift Scope [MOS6526_CIA] 
Uplift Scope [MOS6569_VICII] 
Uplift Scope [MOS6581_SID] 
Uplift Scope [RADIX] 

Uplifting [atan2_16] best 1156137 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp[2]:30 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp[2]:32 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp[2]:20 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp[2]:22 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$23 ] reg byte a [ atan2_16::$22 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp[2]:27 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] zp[2]:47 [ atan2_16::return#2 ] zp[2]:43 [ atan2_16::x#0 ] zp[2]:45 [ atan2_16::y#0 ] 
Limited combination testing to 100 combinations of 144 possible.
Uplifting [init_font_hex] best 1137137 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp[1]:61 [ init_font_hex::$0 ] zp[1]:64 [ init_font_hex::idx#3 ] zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp[2]:13 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp[2]:15 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [diff] best 1135633 combination reg byte a [ diff::return#1 diff::$4 diff::$2 ] reg byte a [ diff::bb2#0 ] reg byte x [ diff::bb1#0 ] reg byte a [ diff::return#0 ] 
Limited combination testing to 100 combinations of 128 possible.
Uplifting [print_char] best 1135624 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [main] best 1133724 combination zp[2]:49 [ main::angle_w#0 ] zp[2]:51 [ main::$6 ] reg byte a [ main::$8 ] reg byte a [ main::$9 ] zp[1]:3 [ main::x#2 main::x#1 ] zp[2]:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] zp[2]:8 [ main::screen#2 main::screen#5 main::screen#1 ] zp[2]:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] zp[2]:39 [ main::xw#0 ] zp[2]:41 [ main::yw#0 ] reg byte x [ main::ang_w#0 ] zp[1]:2 [ main::y#4 main::y#1 ] 
Limited combination testing to 100 combinations of 128 possible.
Uplifting [] best 1133724 combination zp[2]:37 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ] 
Uplifting [print_uchar] best 1133706 combination reg byte a [ print_uchar::$0 ] reg byte x [ print_uchar::$2 ] reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ] 
Uplifting [print_uint] best 1133706 combination zp[2]:59 [ print_uint::w#0 ] 
Uplifting [MOS6526_CIA] best 1133706 combination 
Uplifting [MOS6569_VICII] best 1133706 combination 
Uplifting [MOS6581_SID] best 1133706 combination 
Uplifting [RADIX] best 1133706 combination 
Attempting to uplift remaining variables inzp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 1133706 combination zp[1]:19 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 
Attempting to uplift remaining variables inzp[1]:61 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 1133706 combination zp[1]:61 [ init_font_hex::$0 ] 
Attempting to uplift remaining variables inzp[1]:64 [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 1133106 combination reg byte y [ init_font_hex::idx#3 ] 
Attempting to uplift remaining variables inzp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 1133106 combination zp[1]:17 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 
Attempting to uplift remaining variables inzp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 1133106 combination zp[1]:12 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Attempting to uplift remaining variables inzp[1]:3 [ main::x#2 main::x#1 ]
Uplifting [main] best 1133106 combination zp[1]:3 [ main::x#2 main::x#1 ] 
Attempting to uplift remaining variables inzp[1]:2 [ main::y#4 main::y#1 ]
Uplifting [main] best 1133106 combination zp[1]:2 [ main::y#4 main::y#1 ] 
Coalescing zero page register [ zp[2]:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] ] with [ zp[2]:59 [ print_uint::w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp[2]:27 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] ] - score: 1
Coalescing zero page register [ zp[2]:39 [ main::xw#0 ] ] with [ zp[2]:43 [ atan2_16::x#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:41 [ main::yw#0 ] ] with [ zp[2]:45 [ atan2_16::y#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:47 [ atan2_16::return#2 ] ] with [ zp[2]:49 [ main::angle_w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] ] with [ zp[2]:47 [ atan2_16::return#2 main::angle_w#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 main::angle_w#0 ] ] with [ zp[2]:51 [ main::$6 ] ] - score: 1
Coalescing zero page register [ zp[2]:20 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] with [ zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ]
Coalescing zero page register [ zp[2]:22 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] with [ zp[2]:13 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] ]
Coalescing zero page register [ zp[2]:25 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 main::angle_w#0 main::$6 ] ] with [ zp[2]:15 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] ]
Coalescing zero page register [ zp[2]:37 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 ] ] with [ zp[2]:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] ]
Allocated (was zp[2]:6) zp[2]:4 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_uint::w#0 ]
Allocated (was zp[2]:8) zp[2]:6 [ main::screen#2 main::screen#5 main::screen#1 ]
Allocated (was zp[1]:12) zp[1]:8 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated (was zp[1]:17) zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated (was zp[1]:19) zp[1]:10 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated (was zp[2]:20) zp[2]:11 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated (was zp[2]:22) zp[2]:13 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated (was zp[2]:25) zp[2]:15 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 main::angle_w#0 main::$6 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated (was zp[2]:30) zp[2]:17 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
Allocated (was zp[2]:32) zp[2]:19 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
Allocated (was zp[2]:37) zp[2]:21 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
Allocated (was zp[2]:39) zp[2]:23 [ main::xw#0 atan2_16::x#0 ]
Allocated (was zp[2]:41) zp[2]:25 [ main::yw#0 atan2_16::y#0 ]
Allocated (was zp[1]:61) zp[1]:27 [ init_font_hex::$0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Upstart
  // Commodore 64 PRG executable file
.file [name="cordic-atan2-16-ref.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  // The number of iterations performed during 16-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_16 = $f
  /// $D018 VIC-II base addresses
  // @see #VICII_MEMORY
  .label D018 = $d018
  /// Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
  .label print_screen = $400
  .label print_char_cursor = $15
.segment Code
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label col00 = COLS+$c*$28+$13
    .label __6 = $f
    .label xw = $17
    .label yw = $19
    .label angle_w = $f
    .label diff_sum = 4
    .label screen = 6
    .label screen_ref = $15
    .label x = 3
    .label y = 2
    // [1] call init_font_hex
    // [32] phi from main to init_font_hex [phi:main->init_font_hex]
  init_font_hex_from_main:
    jsr init_font_hex
    // [2] phi from main to main::toD0181 [phi:main->main::toD0181]
  toD0181_from_main:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp __b6
    // main::@6
  __b6:
    // [3] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [4] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  __b1_from___b6:
    // [4] phi main::screen#5 = SCREEN [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [4] phi main::diff_sum#7 = 0 [phi:main::@6->main::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z diff_sum
    lda #>0
    sta.z diff_sum+1
    // [4] phi main::screen_ref#5 = SCREEN_REF [phi:main::@6->main::@1#2] -- pbuz1=pbuc1 
    lda #<SCREEN_REF
    sta.z screen_ref
    lda #>SCREEN_REF
    sta.z screen_ref+1
    // [4] phi main::y#4 = -$c [phi:main::@6->main::@1#3] -- vbsz1=vbsc1 
    lda #-$c
    sta.z y
    jmp __b1
    // [4] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  __b1_from___b3:
    // [4] phi main::screen#5 = main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [4] phi main::diff_sum#7 = main::diff_sum#1 [phi:main::@3->main::@1#1] -- register_copy 
    // [4] phi main::screen_ref#5 = main::screen_ref#1 [phi:main::@3->main::@1#2] -- register_copy 
    // [4] phi main::y#4 = main::y#1 [phi:main::@3->main::@1#3] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    // [5] phi main::screen#2 = main::screen#5 [phi:main::@1->main::@2#0] -- register_copy 
    // [5] phi main::diff_sum#2 = main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy 
    // [5] phi main::screen_ref#2 = main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy 
    // [5] phi main::x#2 = -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    jmp __b2
    // [5] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  __b2_from___b8:
    // [5] phi main::screen#2 = main::screen#1 [phi:main::@8->main::@2#0] -- register_copy 
    // [5] phi main::diff_sum#2 = main::diff_sum#1 [phi:main::@8->main::@2#1] -- register_copy 
    // [5] phi main::screen_ref#2 = main::screen_ref#1 [phi:main::@8->main::@2#2] -- register_copy 
    // [5] phi main::x#2 = main::x#1 [phi:main::@8->main::@2#3] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [6] main::xw#0 = (char)main::x#2 w= 0 -- vwuz1=vbuz2_word_vbuc1 
    lda #0
    ldy.z x
    sty.z xw+1
    sta.z xw
    // [7] main::yw#0 = (char)main::y#4 w= 0 -- vwuz1=vbuz2_word_vbuc1 
    lda #0
    ldy.z y
    sty.z yw+1
    sta.z yw
    // [8] atan2_16::x#0 = (int)main::xw#0
    // [9] atan2_16::y#0 = (int)main::yw#0
    // [10] call atan2_16
    jsr atan2_16
    // [11] atan2_16::return#2 = atan2_16::return#0
    jmp __b7
    // main::@7
  __b7:
    // [12] main::angle_w#0 = atan2_16::return#2
    // [13] main::$6 = main::angle_w#0 + $80 -- vwuz1=vwuz1_plus_vbuc1 
    lda #$80
    clc
    adc.z __6
    sta.z __6
    bcc !+
    inc.z __6+1
  !:
    // [14] main::ang_w#0 = byte1  main::$6 -- vbuxx=_byte1_vwuz1 
    ldx.z __6+1
    // [15] diff::bb1#0 = main::ang_w#0
    // [16] diff::bb2#0 = *main::screen_ref#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (screen_ref),y
    // [17] call diff
    jsr diff
    // [18] diff::return#0 = diff::return#1
    jmp __b8
    // main::@8
  __b8:
    // [19] main::$8 = diff::return#0
    // [20] main::diff_sum#1 = main::diff_sum#2 + main::$8 -- vwuz1=vwuz1_plus_vbuaa 
    //*screen = (>angle_w)-angle_b;
    //*screen = >angle_w;
    clc
    adc.z diff_sum
    sta.z diff_sum
    bcc !+
    inc.z diff_sum+1
  !:
    // [21] main::$9 = main::ang_w#0 - *main::screen_ref#2 -- vbuaa=vbuxx_minus__deref_pbuz1 
    txa
    sec
    ldy #0
    sbc (screen_ref),y
    // [22] *main::screen#2 = main::$9 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (screen),y
    // [23] main::screen#1 = ++ main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [24] main::screen_ref#1 = ++ main::screen_ref#2 -- pbuz1=_inc_pbuz1 
    inc.z screen_ref
    bne !+
    inc.z screen_ref+1
  !:
    // [25] main::x#1 = ++ main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [26] if(main::x#1!=$15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp.z x
    bne __b2_from___b8
    jmp __b3
    // main::@3
  __b3:
    // [27] main::y#1 = ++ main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [28] if(main::y#1!=$d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp.z y
    bne __b1_from___b3
    jmp __b4
    // main::@4
  __b4:
    // [29] print_uint::w#0 = main::diff_sum#1
    // [30] call print_uint
    jsr print_uint
    jmp __b5
    // main::@5
  __b5:
    // [31] *main::col00 = ++ *main::col00 -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b5
}
  // init_font_hex
// Make charset from proto chars
// void init_font_hex(__zp($d) char *charset)
init_font_hex: {
    .label __0 = $1b
    .label idx = $a
    .label proto_lo = $f
    .label charset = $d
    .label c1 = 9
    .label proto_hi = $b
    .label c = 8
    // [33] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
  __b1_from_init_font_hex:
    // [33] phi init_font_hex::c#6 = 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [33] phi init_font_hex::proto_hi#6 = FONT_HEX_PROTO [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 
    lda #<FONT_HEX_PROTO
    sta.z proto_hi
    lda #>FONT_HEX_PROTO
    sta.z proto_hi+1
    // [33] phi init_font_hex::charset#5 = CHARSET [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 
    lda #<CHARSET
    sta.z charset
    lda #>CHARSET
    sta.z charset+1
    jmp __b1
    // [33] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
  __b1_from___b5:
    // [33] phi init_font_hex::c#6 = init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [33] phi init_font_hex::proto_hi#6 = init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy 
    // [33] phi init_font_hex::charset#5 = init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy 
    jmp __b1
    // init_font_hex::@1
  __b1:
    // [34] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
  __b2_from___b1:
    // [34] phi init_font_hex::c1#4 = 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [34] phi init_font_hex::proto_lo#4 = FONT_HEX_PROTO [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 
    lda #<FONT_HEX_PROTO
    sta.z proto_lo
    lda #>FONT_HEX_PROTO
    sta.z proto_lo+1
    // [34] phi init_font_hex::charset#2 = init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy 
    jmp __b2
    // [34] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
  __b2_from___b4:
    // [34] phi init_font_hex::c1#4 = init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [34] phi init_font_hex::proto_lo#4 = init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy 
    // [34] phi init_font_hex::charset#2 = init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy 
    jmp __b2
    // init_font_hex::@2
  __b2:
    // [35] *init_font_hex::charset#2 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (charset),y
    // [36] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
  __b3_from___b2:
    // [36] phi init_font_hex::idx#5 = 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [36] phi init_font_hex::i#2 = 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp __b3
    // [36] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
  __b3_from___b3:
    // [36] phi init_font_hex::idx#5 = init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [36] phi init_font_hex::i#2 = init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy 
    jmp __b3
    // init_font_hex::@3
  __b3:
    // [37] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 
    txa
    tay
    lda (proto_hi),y
    asl
    asl
    asl
    asl
    sta.z __0
    // [38] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 
    txa
    tay
    lda (proto_lo),y
    asl
    // [39] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __0
    // [40] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z idx
    sta (charset),y
    // [41] init_font_hex::idx#2 = ++ init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // [42] init_font_hex::i#1 = ++ init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [43] if(init_font_hex::i#1!=5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #5
    bne __b3_from___b3
    jmp __b4
    // init_font_hex::@4
  __b4:
    // [44] init_font_hex::charset#2[init_font_hex::idx#2] = 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx
    sta (charset),y
    // [45] init_font_hex::idx#3 = ++ init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    ldy.z idx
    iny
    // [46] init_font_hex::charset#2[init_font_hex::idx#3] = 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    lda #0
    sta (charset),y
    // [47] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_lo
    sta.z proto_lo
    bcc !+
    inc.z proto_lo+1
  !:
    // [48] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc.z charset
    sta.z charset
    bcc !+
    inc.z charset+1
  !:
    // [49] init_font_hex::c1#1 = ++ init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [50] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z c1
    bne __b2_from___b4
    jmp __b5
    // init_font_hex::@5
  __b5:
    // [51] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_hi
    sta.z proto_hi
    bcc !+
    inc.z proto_hi+1
  !:
    // [52] init_font_hex::c#1 = ++ init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [53] if(init_font_hex::c#1!=$10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z c
    bne __b1_from___b5
    jmp __breturn
    // init_font_hex::@return
  __breturn:
    // [54] return 
    rts
}
  // atan2_16
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
// __zp($f) unsigned int atan2_16(__zp($17) int x, __zp($19) int y)
atan2_16: {
    .label __2 = $b
    .label __7 = $d
    .label yi = $b
    .label xi = $d
    .label angle = $f
    .label xd = $13
    .label yd = $11
    .label return = $f
    .label x = $17
    .label y = $19
    // [55] if(atan2_16::y#0>=0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 
    lda.z y+1
    bpl __b1
    jmp __b2
    // atan2_16::@2
  __b2:
    // [56] atan2_16::$2 = - atan2_16::y#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc.z y
    sta.z __2
    lda #0
    sbc.z y+1
    sta.z __2+1
    // [57] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3]
  __b3_from___b1:
  __b3_from___b2:
    // [57] phi atan2_16::yi#0 = atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy 
    jmp __b3
    // atan2_16::@3
  __b3:
    // [58] if(atan2_16::x#0>=0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 
    lda.z x+1
    bpl __b4
    jmp __b5
    // atan2_16::@5
  __b5:
    // [59] atan2_16::$7 = - atan2_16::x#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc.z x
    sta.z __7
    lda #0
    sbc.z x+1
    sta.z __7+1
    // [60] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6]
  __b6_from___b4:
  __b6_from___b5:
    // [60] phi atan2_16::xi#0 = atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy 
    jmp __b6
    // atan2_16::@6
  __b6:
    // [61] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10]
  __b10_from___b6:
    // [61] phi atan2_16::angle#12 = 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z angle
    lda #>0
    sta.z angle+1
    // [61] phi atan2_16::i#2 = 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 
    ldx #0
    // [61] phi atan2_16::xi#3 = atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy 
    // [61] phi atan2_16::yi#3 = atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy 
    jmp __b10
    // atan2_16::@10
  __b10:
    // [62] if(atan2_16::yi#3!=0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 
    lda.z yi+1
    ora.z yi
    bne __b11
    // [63] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12]
  __b12_from___b10:
  __b12_from___b19:
    // [63] phi atan2_16::angle#6 = atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy 
    jmp __b12
    // atan2_16::@12
  __b12:
    // [64] atan2_16::angle#1 = atan2_16::angle#6 >> 1 -- vwuz1=vwuz1_ror_1 
    lsr.z angle+1
    ror.z angle
    // [65] if(atan2_16::x#0>=0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 
    lda.z x+1
    bpl __b7_from___b12
    jmp __b21
    // atan2_16::@21
  __b21:
    // [66] atan2_16::angle#4 = $8000 - atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 
    lda #<$8000
    sec
    sbc.z angle
    sta.z angle
    lda #>$8000
    sbc.z angle+1
    sta.z angle+1
    // [67] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7]
  __b7_from___b12:
  __b7_from___b21:
    // [67] phi atan2_16::angle#11 = atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy 
    jmp __b7
    // atan2_16::@7
  __b7:
    // [68] if(atan2_16::y#0>=0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 
    lda.z y+1
    bpl __b8_from___b7
    jmp __b9
    // atan2_16::@9
  __b9:
    // [69] atan2_16::angle#5 = - atan2_16::angle#11 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc.z angle
    sta.z angle
    lda #0
    sbc.z angle+1
    sta.z angle+1
    // [70] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8]
  __b8_from___b7:
  __b8_from___b9:
    // [70] phi atan2_16::return#0 = atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy 
    jmp __b8
    // atan2_16::@8
  __b8:
    jmp __breturn
    // atan2_16::@return
  __breturn:
    // [71] return 
    rts
    // atan2_16::@11
  __b11:
    // [72] atan2_16::shift#5 = atan2_16::i#2 -- vbuyy=vbuxx 
    txa
    tay
    // [73] atan2_16::xd#10 = atan2_16::xi#3 -- vwsz1=vwsz2 
    lda.z xi
    sta.z xd
    lda.z xi+1
    sta.z xd+1
    // [74] atan2_16::yd#10 = atan2_16::yi#3 -- vwsz1=vwsz2 
    lda.z yi
    sta.z yd
    lda.z yi+1
    sta.z yd+1
    // [75] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13]
  __b13_from___b11:
  __b13_from___b14:
    // [75] phi atan2_16::yd#3 = atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy 
    // [75] phi atan2_16::xd#3 = atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy 
    // [75] phi atan2_16::shift#2 = atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy 
    jmp __b13
    // atan2_16::@13
  __b13:
    // [76] if(atan2_16::shift#2>=2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 
    cpy #2
    bcs __b14
    jmp __b15
    // atan2_16::@15
  __b15:
    // [77] if(0==atan2_16::shift#2) goto atan2_16::@17 -- 0_eq_vbuyy_then_la1 
    cpy #0
    beq __b17_from___b15
    jmp __b16
    // atan2_16::@16
  __b16:
    // [78] atan2_16::xd#2 = atan2_16::xd#3 >> 1 -- vwsz1=vwsz1_ror_1 
    lda.z xd+1
    cmp #$80
    ror.z xd+1
    ror.z xd
    // [79] atan2_16::yd#2 = atan2_16::yd#3 >> 1 -- vwsz1=vwsz1_ror_1 
    lda.z yd+1
    cmp #$80
    ror.z yd+1
    ror.z yd
    // [80] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17]
  __b17_from___b15:
  __b17_from___b16:
    // [80] phi atan2_16::xd#5 = atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy 
    // [80] phi atan2_16::yd#5 = atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy 
    jmp __b17
    // atan2_16::@17
  __b17:
    // [81] if(atan2_16::yi#3>=0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 
    lda.z yi+1
    bpl __b18
    jmp __b20
    // atan2_16::@20
  __b20:
    // [82] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda.z xi
    sec
    sbc.z yd
    sta.z xi
    lda.z xi+1
    sbc.z yd+1
    sta.z xi+1
    // [83] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 
    clc
    lda.z yi
    adc.z xd
    sta.z yi
    lda.z yi+1
    adc.z xd+1
    sta.z yi+1
    // [84] atan2_16::$23 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [85] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa 
    tay
    lda.z angle
    sec
    sbc CORDIC_ATAN2_ANGLES_16,y
    sta.z angle
    lda.z angle+1
    sbc CORDIC_ATAN2_ANGLES_16+1,y
    sta.z angle+1
    // [86] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19]
  __b19_from___b18:
  __b19_from___b20:
    // [86] phi atan2_16::xi#8 = atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy 
    // [86] phi atan2_16::angle#13 = atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy 
    // [86] phi atan2_16::yi#8 = atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy 
    jmp __b19
    // atan2_16::@19
  __b19:
    // [87] atan2_16::i#1 = ++ atan2_16::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [88] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 
    cpx #CORDIC_ITERATIONS_16-1+1
    beq __b12_from___b19
    // [61] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10]
  __b10_from___b19:
    // [61] phi atan2_16::angle#12 = atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy 
    // [61] phi atan2_16::i#2 = atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy 
    // [61] phi atan2_16::xi#3 = atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy 
    // [61] phi atan2_16::yi#3 = atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy 
    jmp __b10
    // atan2_16::@18
  __b18:
    // [89] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 
    clc
    lda.z xi
    adc.z yd
    sta.z xi
    lda.z xi+1
    adc.z yd+1
    sta.z xi+1
    // [90] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda.z yi
    sec
    sbc.z xd
    sta.z yi
    lda.z yi+1
    sbc.z xd+1
    sta.z yi+1
    // [91] atan2_16::$22 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [92] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa 
    tay
    clc
    lda.z angle
    adc CORDIC_ATAN2_ANGLES_16,y
    sta.z angle
    lda.z angle+1
    adc CORDIC_ATAN2_ANGLES_16+1,y
    sta.z angle+1
    jmp __b19_from___b18
    // atan2_16::@14
  __b14:
    // [93] atan2_16::xd#1 = atan2_16::xd#3 >> 2 -- vwsz1=vwsz1_ror_2 
    lda.z xd+1
    cmp #$80
    ror.z xd+1
    ror.z xd
    lda.z xd+1
    cmp #$80
    ror.z xd+1
    ror.z xd
    // [94] atan2_16::yd#1 = atan2_16::yd#3 >> 2 -- vwsz1=vwsz1_ror_2 
    lda.z yd+1
    cmp #$80
    ror.z yd+1
    ror.z yd
    lda.z yd+1
    cmp #$80
    ror.z yd+1
    ror.z yd
    // [95] atan2_16::shift#1 = atan2_16::shift#2 - 2 -- vbuyy=vbuyy_minus_2 
    dey
    dey
    jmp __b13_from___b14
    // atan2_16::@4
  __b4:
    // [96] atan2_16::xi#13 = atan2_16::x#0 -- vwsz1=vwsz2 
    lda.z x
    sta.z xi
    lda.z x+1
    sta.z xi+1
    jmp __b6_from___b4
    // atan2_16::@1
  __b1:
    // [97] atan2_16::yi#16 = atan2_16::y#0 -- vwsz1=vwsz2 
    lda.z y
    sta.z yi
    lda.z y+1
    sta.z yi+1
    jmp __b3_from___b1
}
  // diff
// __register(A) char diff(__register(X) char bb1, __register(A) char bb2)
diff: {
    // [98] if(diff::bb1#0<diff::bb2#0) goto diff::@1 -- vbuxx_lt_vbuaa_then_la1 
    sta.z $ff
    cpx.z $ff
    bcc __b1
    jmp __b2
    // diff::@2
  __b2:
    // [99] diff::$2 = diff::bb1#0 - diff::bb2#0 -- vbuaa=vbuxx_minus_vbuaa 
    sta.z $ff
    txa
    sec
    sbc.z $ff
    // [100] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3]
  __b3_from___b1:
  __b3_from___b2:
    // [100] phi diff::return#1 = diff::$4 [phi:diff::@1/diff::@2->diff::@3#0] -- register_copy 
    jmp __b3
    // diff::@3
  __b3:
    jmp __breturn
    // diff::@return
  __breturn:
    // [101] return 
    rts
    // diff::@1
  __b1:
    // [102] diff::$4 = diff::bb2#0 - diff::bb1#0 -- vbuaa=vbuaa_minus_vbuxx 
    stx.z $ff
    sec
    sbc.z $ff
    jmp __b3_from___b1
}
  // print_uint
// Print a unsigned int as HEX
// void print_uint(__zp(4) unsigned int w)
print_uint: {
    .label w = 4
    // [103] print_uchar::b#0 = byte1  print_uint::w#0 -- vbuxx=_byte1_vwuz1 
    ldx.z w+1
    // [104] call print_uchar
    // [108] phi from print_uint to print_uchar [phi:print_uint->print_uchar]
  print_uchar_from_print_uint:
    // [108] phi print_char_cursor#26 = print_screen#0 [phi:print_uint->print_uchar#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [108] phi print_uchar::b#2 = print_uchar::b#0 [phi:print_uint->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __b1
    // print_uint::@1
  __b1:
    // [105] print_uchar::b#1 = byte0  print_uint::w#0 -- vbuxx=_byte0_vwuz1 
    ldx.z w
    // [106] call print_uchar
    // [108] phi from print_uint::@1 to print_uchar [phi:print_uint::@1->print_uchar]
  print_uchar_from___b1:
    // [108] phi print_char_cursor#26 = print_char_cursor#20 [phi:print_uint::@1->print_uchar#0] -- register_copy 
    // [108] phi print_uchar::b#2 = print_uchar::b#1 [phi:print_uint::@1->print_uchar#1] -- register_copy 
    jsr print_uchar
    jmp __breturn
    // print_uint::@return
  __breturn:
    // [107] return 
    rts
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // [109] print_uchar::$0 = print_uchar::b#2 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [110] print_char::ch#0 = print_hextab[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [111] call print_char
  // Table of hexadecimal digits
    // [116] phi from print_uchar to print_char [phi:print_uchar->print_char]
  print_char_from_print_uchar:
    // [116] phi print_char_cursor#19 = print_char_cursor#26 [phi:print_uchar->print_char#0] -- register_copy 
    // [116] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    jmp __b1
    // print_uchar::@1
  __b1:
    // [112] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [113] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [114] call print_char
    // [116] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
  print_char_from___b1:
    // [116] phi print_char_cursor#19 = print_char_cursor#20 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [116] phi print_char::ch#2 = print_char::ch#1 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp __breturn
    // print_uchar::@return
  __breturn:
    // [115] return 
    rts
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // [117] *print_char_cursor#19 = print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [118] print_char_cursor#20 = ++ print_char_cursor#19 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    jmp __breturn
    // print_char::@return
  __breturn:
    // [119] return 
    rts
}
  // File Data
.segment Data
  // Bit patterns for symbols 0-f (3x5 pixels) used in font hex
  FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
  // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2

  print_hextab: .text "0123456789abcdef"
SCREEN_REF:
.for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp toD0181
Removing instruction jmp __b6
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b7
Removing instruction jmp __b8
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __breturn
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b5
Removing instruction jmp __b6
Removing instruction jmp __b10
Removing instruction jmp __b12
Removing instruction jmp __b21
Removing instruction jmp __b7
Removing instruction jmp __b9
Removing instruction jmp __b8
Removing instruction jmp __breturn
Removing instruction jmp __b13
Removing instruction jmp __b15
Removing instruction jmp __b16
Removing instruction jmp __b17
Removing instruction jmp __b20
Removing instruction jmp __b19
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __b1
Removing instruction jmp __breturn
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #>0
Removing instruction lda #0
Removing instruction ldy #0
Replacing instruction ldy #0 with TAY
Removing instruction ldy.z idx
Removing instruction lda #0
Removing instruction lda #>0
Replacing instruction ldx #0 with TAX
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b2_from___b8 with __b2
Replacing label __b1_from___b3 with __b1
Replacing label __b3_from___b3 with __b3
Replacing label __b2_from___b4 with __b2
Replacing label __b1_from___b5 with __b1
Replacing label __b7_from___b12 with __b7
Replacing label __b8_from___b7 with __b8
Replacing label __b17_from___b15 with __b17
Replacing label __b12_from___b19 with __b12
Replacing label __b19_from___b18 with __b19
Replacing label __b13_from___b14 with __b13
Replacing label __b6_from___b4 with __b6
Replacing label __b3_from___b1 with __b3
Replacing label __b3_from___b1 with __b3
Removing instruction toD0181_from_main:
Removing instruction toD0181:
Removing instruction __b1_from___b3:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b8:
Removing instruction __b1_from___b5:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b4:
Removing instruction __b3_from___b3:
Removing instruction __b3_from___b1:
Removing instruction __b3_from___b2:
Removing instruction __b6_from___b4:
Removing instruction __b6_from___b5:
Removing instruction __b10_from___b6:
Removing instruction __b12_from___b10:
Removing instruction __b12_from___b19:
Removing instruction __b7_from___b12:
Removing instruction __b7_from___b21:
Removing instruction __b8_from___b7:
Removing instruction __b8_from___b9:
Removing instruction __breturn:
Removing instruction __b13_from___b11:
Removing instruction __b13_from___b14:
Removing instruction __b17_from___b15:
Removing instruction __b17_from___b16:
Removing instruction __b19_from___b18:
Removing instruction __b19_from___b20:
Removing instruction __b3_from___b1:
Removing instruction __b3_from___b2:
Removing instruction __breturn:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction init_font_hex_from_main:
Removing instruction __b6:
Removing instruction __b1_from___b6:
Removing instruction __b7:
Removing instruction __b8:
Removing instruction __b3:
Removing instruction __b4:
Removing instruction __b1_from_init_font_hex:
Removing instruction __b3_from___b2:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __breturn:
Removing instruction __b2:
Removing instruction __b5:
Removing instruction __b21:
Removing instruction __b9:
Removing instruction __b15:
Removing instruction __b16:
Removing instruction __b20:
Removing instruction __b10_from___b19:
Removing instruction __b2:
Removing instruction print_uchar_from_print_uint:
Removing instruction __b1:
Removing instruction print_uchar_from___b1:
Removing instruction __breturn:
Removing instruction print_char_from_print_uchar:
Removing instruction __b1:
Removing instruction print_char_from___b1:
Removing instruction __breturn:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Replacing jump to rts with rts in jmp __b3
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b3:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [318] beq __b12 to bne
Fixing long branch [213] bpl __b1 to bmi
Fixing long branch [225] bpl __b4 to bmi

FINAL SYMBOL TABLE
__constant char * const CHARSET = (char *) 8192
__constant char * const COLS = (char *) 55296
__constant unsigned int CORDIC_ATAN2_ANGLES_16[CORDIC_ITERATIONS_16] = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2
 }}
__constant const char CORDIC_ITERATIONS_16 = $f
__constant char * const D018 = (char *) 53272
__constant char FONT_HEX_PROTO[] = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
__constant char RADIX::BINARY = 2
__constant char RADIX::DECIMAL = $a
__constant char RADIX::HEXADECIMAL = $10
__constant char RADIX::OCTAL = 8
__constant char * const SCREEN = (char *) 10240
__constant const char SCREEN_REF[$3e8] = kickasm {{ .for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)
 }}
unsigned int atan2_16(int x , int y)
int atan2_16::$2 // zp[2]:11 2002.0
char atan2_16::$22 // reg byte a 2000002.0
char atan2_16::$23 // reg byte a 2000002.0
int atan2_16::$7 // zp[2]:13 2002.0
unsigned int atan2_16::angle
unsigned int atan2_16::angle#1 // angle zp[2]:15 1501.5
unsigned int atan2_16::angle#11 // angle zp[2]:15 2002.0
unsigned int atan2_16::angle#12 // angle zp[2]:15 190476.38095238095
unsigned int atan2_16::angle#13 // angle zp[2]:15 1333334.6666666667
unsigned int atan2_16::angle#2 // angle zp[2]:15 2000002.0
unsigned int atan2_16::angle#3 // angle zp[2]:15 2000002.0
unsigned int atan2_16::angle#4 // angle zp[2]:15 2002.0
unsigned int atan2_16::angle#5 // angle zp[2]:15 2002.0
unsigned int atan2_16::angle#6 // angle zp[2]:15 2001003.0
char atan2_16::i
char atan2_16::i#1 // reg byte x 1500001.5
char atan2_16::i#2 // reg byte x 208333.5416666667
unsigned int atan2_16::return
unsigned int atan2_16::return#0 // return zp[2]:15 701.0
unsigned int atan2_16::return#2 // return zp[2]:15 202.0
char atan2_16::shift
char atan2_16::shift#1 // reg byte y 2.0000002E7
char atan2_16::shift#2 // reg byte y 8000001.25
char atan2_16::shift#5 // reg byte y 666667.3333333334
int atan2_16::x
int atan2_16::x#0 // x zp[2]:23 108.02631578947367
int atan2_16::xd
int atan2_16::xd#1 // xd zp[2]:19 6666667.333333333
int atan2_16::xd#10 // xd zp[2]:19 1000001.0
int atan2_16::xd#2 // xd zp[2]:19 1000001.0
int atan2_16::xd#3 // xd zp[2]:19 7666668.333333332
int atan2_16::xd#5 // xd zp[2]:19 1000001.0
int atan2_16::xi
int atan2_16::xi#0 // xi zp[2]:13 3003.0
int atan2_16::xi#1 // xi zp[2]:13 500000.5
int atan2_16::xi#13 // xi zp[2]:13 2002.0
int atan2_16::xi#2 // xi zp[2]:13 500000.5
int atan2_16::xi#3 // xi zp[2]:13 266733.6666666667
int atan2_16::xi#8 // xi zp[2]:13 1000001.0
int atan2_16::y
int atan2_16::y#0 // y zp[2]:25 102.625
int atan2_16::yd
int atan2_16::yd#1 // yd zp[2]:17 1.0000001E7
int atan2_16::yd#10 // yd zp[2]:17 2000002.0
int atan2_16::yd#2 // yd zp[2]:17 2000002.0
int atan2_16::yd#3 // yd zp[2]:17 4600001.0
int atan2_16::yd#5 // yd zp[2]:17 2000002.0
int atan2_16::yi
int atan2_16::yi#0 // yi zp[2]:11 600.5999999999999
int atan2_16::yi#1 // yi zp[2]:11 666667.3333333334
int atan2_16::yi#16 // yi zp[2]:11 2002.0
int atan2_16::yi#2 // yi zp[2]:11 666667.3333333334
int atan2_16::yi#3 // yi zp[2]:11 353000.41176470584
int atan2_16::yi#8 // yi zp[2]:11 1000001.0
char diff(char bb1 , char bb2)
char diff::$2 // reg byte a 2002.0
char diff::$4 // reg byte a 2002.0
char diff::bb1
char diff::bb1#0 // reg byte x 1034.6666666666667
char diff::bb2
char diff::bb2#0 // reg byte a 1552.0
char diff::return
char diff::return#0 // reg byte a 202.0
char diff::return#1 // reg byte a 701.0
void init_font_hex(char *charset)
char init_font_hex::$0 // zp[1]:27 10001.0
char init_font_hex::$1 // reg byte a 20002.0
char init_font_hex::$2 // reg byte a 20002.0
char init_font_hex::c
char init_font_hex::c#1 // c zp[1]:8 151.5
char init_font_hex::c#6 // c zp[1]:8 10.631578947368421
char init_font_hex::c1
char init_font_hex::c1#1 // c1 zp[1]:9 1501.5
char init_font_hex::c1#4 // c1 zp[1]:9 133.46666666666667
char *init_font_hex::charset
char *init_font_hex::charset#0 // charset zp[2]:13 350.5
char *init_font_hex::charset#2 // charset zp[2]:13 1079.0714285714287
char *init_font_hex::charset#5 // charset zp[2]:13 202.0
char init_font_hex::i
char init_font_hex::i#1 // reg byte x 15001.5
char init_font_hex::i#2 // reg byte x 6667.333333333333
char init_font_hex::idx
char init_font_hex::idx#2 // idx zp[1]:10 5501.0
char init_font_hex::idx#3 // reg byte y 2002.0
char init_font_hex::idx#5 // idx zp[1]:10 6000.6
char *init_font_hex::proto_hi
char *init_font_hex::proto_hi#1 // proto_hi zp[2]:11 67.33333333333333
char *init_font_hex::proto_hi#6 // proto_hi zp[2]:11 566.8333333333333
char *init_font_hex::proto_lo
char *init_font_hex::proto_lo#1 // proto_lo zp[2]:15 500.5
char *init_font_hex::proto_lo#4 // proto_lo zp[2]:15 923.3076923076923
void main()
unsigned int main::$6 // zp[2]:15 202.0
char main::$8 // reg byte a 202.0
char main::$9 // reg byte a 202.0
char main::ang_w
char main::ang_w#0 // reg byte x 43.285714285714285
unsigned int main::angle_w
unsigned int main::angle_w#0 // angle_w zp[2]:15 202.0
__constant char *main::col00 = COLS+(unsigned int)$c*$28+$13
unsigned int main::diff_sum
unsigned int main::diff_sum#1 // diff_sum zp[2]:4 23.888888888888886
unsigned int main::diff_sum#2 // diff_sum zp[2]:4 14.2
unsigned int main::diff_sum#7 // diff_sum zp[2]:4 22.0
char *main::screen
char *main::screen#1 // screen zp[2]:6 35.5
char *main::screen#2 // screen zp[2]:6 17.444444444444443
char *main::screen#5 // screen zp[2]:6 22.0
char *main::screen_ref
char *main::screen_ref#1 // screen_ref zp[2]:21 42.599999999999994
char *main::screen_ref#2 // screen_ref zp[2]:21 21.842105263157897
char *main::screen_ref#5 // screen_ref zp[2]:21 22.0
char *main::toD0181_gfx
char main::toD0181_return
__constant char main::toD0181_return#0 = byte1 (unsigned int)SCREEN&$3fff*4|byte1 (unsigned int)CHARSET/4&$f // toD0181_return
char *main::toD0181_screen
signed char main::x
signed char main::x#1 // x zp[1]:3 151.5
signed char main::x#2 // x zp[1]:3 10.1
int main::xw
unsigned int main::xw#0 // xw zp[2]:23 50.5
signed char main::y
signed char main::y#1 // y zp[1]:2 16.5
signed char main::y#4 // y zp[1]:2 0.9565217391304348
int main::yw
unsigned int main::yw#0 // yw zp[2]:25 50.5
void print_char(char ch)
char print_char::ch
char print_char::ch#0 // reg byte a 202.0
char print_char::ch#1 // reg byte a 202.0
char print_char::ch#2 // reg byte a 1203.0
char *print_char_cursor
char *print_char_cursor#19 // print_char_cursor zp[2]:21 1102.0
char *print_char_cursor#20 // print_char_cursor zp[2]:21 123.66666666666667
char *print_char_cursor#26 // print_char_cursor zp[2]:21 37.33333333333333
__constant const char print_hextab[] = "0123456789abcdef"z
char *print_line_cursor
char *print_screen
__constant char *print_screen#0 = (char *) 1024 // print_screen
void print_uchar(char b)
char print_uchar::$0 // reg byte a 202.0
char print_uchar::$2 // reg byte x 202.0
char print_uchar::b
char print_uchar::b#0 // reg byte x 22.0
char print_uchar::b#1 // reg byte x 22.0
char print_uchar::b#2 // reg byte x 56.0
void print_uint(unsigned int w)
unsigned int print_uint::w
unsigned int print_uint::w#0 // w zp[2]:4 8.0

zp[1]:2 [ main::y#4 main::y#1 ]
zp[1]:3 [ main::x#2 main::x#1 ]
zp[2]:4 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_uint::w#0 ]
zp[2]:6 [ main::screen#2 main::screen#5 main::screen#1 ]
zp[1]:8 [ init_font_hex::c#6 init_font_hex::c#1 ]
zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
zp[1]:10 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
zp[2]:11 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
zp[2]:13 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
reg byte x [ atan2_16::i#2 atan2_16::i#1 ]
zp[2]:15 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 main::angle_w#0 main::$6 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
zp[2]:17 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
zp[2]:19 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
reg byte a [ diff::return#1 diff::$4 diff::$2 ]
reg byte x [ print_uchar::b#2 print_uchar::b#0 print_uchar::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp[2]:21 [ print_char_cursor#19 print_char_cursor#26 print_char_cursor#20 main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
zp[2]:23 [ main::xw#0 atan2_16::x#0 ]
zp[2]:25 [ main::yw#0 atan2_16::y#0 ]
reg byte x [ main::ang_w#0 ]
reg byte x [ diff::bb1#0 ]
reg byte a [ diff::bb2#0 ]
reg byte a [ diff::return#0 ]
reg byte a [ main::$8 ]
reg byte a [ main::$9 ]
zp[1]:27 [ init_font_hex::$0 ]
reg byte a [ init_font_hex::$1 ]
reg byte a [ init_font_hex::$2 ]
reg byte y [ init_font_hex::idx#3 ]
reg byte a [ atan2_16::$23 ]
reg byte a [ atan2_16::$22 ]
reg byte a [ print_uchar::$0 ]
reg byte x [ print_uchar::$2 ]


FINAL ASSEMBLER
Score: 1041603

  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Upstart
  // Commodore 64 PRG executable file
.file [name="cordic-atan2-16-ref.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
  // The number of iterations performed during 16-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_16 = $f
  /// $D018 VIC-II base addresses
  // @see #VICII_MEMORY
  .label D018 = $d018
  /// Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
  .label print_screen = $400
  .label print_char_cursor = $15
.segment Code
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label col00 = COLS+$c*$28+$13
    .label __6 = $f
    .label xw = $17
    .label yw = $19
    .label angle_w = $f
    .label diff_sum = 4
    .label screen = 6
    .label screen_ref = $15
    .label x = 3
    .label y = 2
    // init_font_hex(CHARSET)
    // [1] call init_font_hex
    // [32] phi from main to init_font_hex [phi:main->init_font_hex]
    jsr init_font_hex
    // [2] phi from main to main::toD0181 [phi:main->main::toD0181]
    // main::toD0181
    // main::@6
    // *D018 = toD018(SCREEN, CHARSET)
    // [3] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [4] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
    // [4] phi main::screen#5 = SCREEN [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [4] phi main::diff_sum#7 = 0 [phi:main::@6->main::@1#1] -- vwuz1=vwuc1 
    lda #<0
    sta.z diff_sum
    sta.z diff_sum+1
    // [4] phi main::screen_ref#5 = SCREEN_REF [phi:main::@6->main::@1#2] -- pbuz1=pbuc1 
    lda #<SCREEN_REF
    sta.z screen_ref
    lda #>SCREEN_REF
    sta.z screen_ref+1
    // [4] phi main::y#4 = -$c [phi:main::@6->main::@1#3] -- vbsz1=vbsc1 
    lda #-$c
    sta.z y
    // [4] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [4] phi main::screen#5 = main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [4] phi main::diff_sum#7 = main::diff_sum#1 [phi:main::@3->main::@1#1] -- register_copy 
    // [4] phi main::screen_ref#5 = main::screen_ref#1 [phi:main::@3->main::@1#2] -- register_copy 
    // [4] phi main::y#4 = main::y#1 [phi:main::@3->main::@1#3] -- register_copy 
    // main::@1
  __b1:
    // [5] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // [5] phi main::screen#2 = main::screen#5 [phi:main::@1->main::@2#0] -- register_copy 
    // [5] phi main::diff_sum#2 = main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy 
    // [5] phi main::screen_ref#2 = main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy 
    // [5] phi main::x#2 = -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    // [5] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
    // [5] phi main::screen#2 = main::screen#1 [phi:main::@8->main::@2#0] -- register_copy 
    // [5] phi main::diff_sum#2 = main::diff_sum#1 [phi:main::@8->main::@2#1] -- register_copy 
    // [5] phi main::screen_ref#2 = main::screen_ref#1 [phi:main::@8->main::@2#2] -- register_copy 
    // [5] phi main::x#2 = main::x#1 [phi:main::@8->main::@2#3] -- register_copy 
    // main::@2
  __b2:
    // MAKEWORD( (byte)x, 0 )
    // [6] main::xw#0 = (char)main::x#2 w= 0 -- vwuz1=vbuz2_word_vbuc1 
    lda #0
    ldy.z x
    sty.z xw+1
    sta.z xw
    // MAKEWORD( (byte)y, 0 )
    // [7] main::yw#0 = (char)main::y#4 w= 0 -- vwuz1=vbuz2_word_vbuc1 
    ldy.z y
    sty.z yw+1
    sta.z yw
    // word angle_w = atan2_16(xw, yw)
    // [8] atan2_16::x#0 = (int)main::xw#0
    // [9] atan2_16::y#0 = (int)main::yw#0
    // [10] call atan2_16
    jsr atan2_16
    // [11] atan2_16::return#2 = atan2_16::return#0
    // main::@7
    // [12] main::angle_w#0 = atan2_16::return#2
    // angle_w+0x0080
    // [13] main::$6 = main::angle_w#0 + $80 -- vwuz1=vwuz1_plus_vbuc1 
    lda #$80
    clc
    adc.z __6
    sta.z __6
    bcc !+
    inc.z __6+1
  !:
    // byte ang_w = BYTE1(angle_w+0x0080)
    // [14] main::ang_w#0 = byte1  main::$6 -- vbuxx=_byte1_vwuz1 
    ldx.z __6+1
    // diff(ang_w, *screen_ref)
    // [15] diff::bb1#0 = main::ang_w#0
    // [16] diff::bb2#0 = *main::screen_ref#2 -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (screen_ref),y
    // [17] call diff
    jsr diff
    // [18] diff::return#0 = diff::return#1
    // main::@8
    // [19] main::$8 = diff::return#0
    // diff_sum += diff(ang_w, *screen_ref)
    // [20] main::diff_sum#1 = main::diff_sum#2 + main::$8 -- vwuz1=vwuz1_plus_vbuaa 
    //*screen = (>angle_w)-angle_b;
    //*screen = >angle_w;
    clc
    adc.z diff_sum
    sta.z diff_sum
    bcc !+
    inc.z diff_sum+1
  !:
    // ang_w - *screen_ref
    // [21] main::$9 = main::ang_w#0 - *main::screen_ref#2 -- vbuaa=vbuxx_minus__deref_pbuz1 
    txa
    sec
    ldy #0
    sbc (screen_ref),y
    // *screen =  ang_w - *screen_ref
    // [22] *main::screen#2 = main::$9 -- _deref_pbuz1=vbuaa 
    sta (screen),y
    // screen++;
    // [23] main::screen#1 = ++ main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // screen_ref++;
    // [24] main::screen_ref#1 = ++ main::screen_ref#2 -- pbuz1=_inc_pbuz1 
    inc.z screen_ref
    bne !+
    inc.z screen_ref+1
  !:
    // for(signed byte x: -19..20)
    // [25] main::x#1 = ++ main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [26] if(main::x#1!=$15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp.z x
    bne __b2
    // main::@3
    // for(signed byte y: -12..12)
    // [27] main::y#1 = ++ main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [28] if(main::y#1!=$d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp.z y
    bne __b1
    // main::@4
    // print_uint(diff_sum)
    // [29] print_uint::w#0 = main::diff_sum#1
    // [30] call print_uint
    jsr print_uint
    // main::@5
  __b5:
    // (*col00)++;
    // [31] *main::col00 = ++ *main::col00 -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b5
}
  // init_font_hex
// Make charset from proto chars
// void init_font_hex(__zp($d) char *charset)
init_font_hex: {
    .label __0 = $1b
    .label idx = $a
    .label proto_lo = $f
    .label charset = $d
    .label c1 = 9
    .label proto_hi = $b
    .label c = 8
    // [33] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
    // [33] phi init_font_hex::c#6 = 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [33] phi init_font_hex::proto_hi#6 = FONT_HEX_PROTO [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 
    lda #<FONT_HEX_PROTO
    sta.z proto_hi
    lda #>FONT_HEX_PROTO
    sta.z proto_hi+1
    // [33] phi init_font_hex::charset#5 = CHARSET [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 
    lda #<CHARSET
    sta.z charset
    lda #>CHARSET
    sta.z charset+1
    // [33] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
    // [33] phi init_font_hex::c#6 = init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [33] phi init_font_hex::proto_hi#6 = init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy 
    // [33] phi init_font_hex::charset#5 = init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy 
    // init_font_hex::@1
  __b1:
    // [34] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
    // [34] phi init_font_hex::c1#4 = 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [34] phi init_font_hex::proto_lo#4 = FONT_HEX_PROTO [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 
    lda #<FONT_HEX_PROTO
    sta.z proto_lo
    lda #>FONT_HEX_PROTO
    sta.z proto_lo+1
    // [34] phi init_font_hex::charset#2 = init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy 
    // [34] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
    // [34] phi init_font_hex::c1#4 = init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [34] phi init_font_hex::proto_lo#4 = init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy 
    // [34] phi init_font_hex::charset#2 = init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy 
    // init_font_hex::@2
  __b2:
    // charset[idx++] = 0
    // [35] *init_font_hex::charset#2 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (charset),y
    // [36] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
    // [36] phi init_font_hex::idx#5 = 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [36] phi init_font_hex::i#2 = 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    // [36] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
    // [36] phi init_font_hex::idx#5 = init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [36] phi init_font_hex::i#2 = init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy 
    // init_font_hex::@3
  __b3:
    // proto_hi[i]<<4
    // [37] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 
    txa
    tay
    lda (proto_hi),y
    asl
    asl
    asl
    asl
    sta.z __0
    // proto_lo[i]<<1
    // [38] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 
    txa
    tay
    lda (proto_lo),y
    asl
    // proto_hi[i]<<4 | proto_lo[i]<<1
    // [39] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __0
    // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1
    // [40] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z idx
    sta (charset),y
    // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1;
    // [41] init_font_hex::idx#2 = ++ init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // for( byte i: 0..4)
    // [42] init_font_hex::i#1 = ++ init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [43] if(init_font_hex::i#1!=5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #5
    bne __b3
    // init_font_hex::@4
    // charset[idx++] = 0
    // [44] init_font_hex::charset#2[init_font_hex::idx#2] = 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx
    sta (charset),y
    // charset[idx++] = 0;
    // [45] init_font_hex::idx#3 = ++ init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    iny
    // charset[idx++] = 0
    // [46] init_font_hex::charset#2[init_font_hex::idx#3] = 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    sta (charset),y
    // proto_lo += 5
    // [47] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_lo
    sta.z proto_lo
    bcc !+
    inc.z proto_lo+1
  !:
    // charset += 8
    // [48] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc.z charset
    sta.z charset
    bcc !+
    inc.z charset+1
  !:
    // for( byte c: 0..15 )
    // [49] init_font_hex::c1#1 = ++ init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [50] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z c1
    bne __b2
    // init_font_hex::@5
    // proto_hi += 5
    // [51] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_hi
    sta.z proto_hi
    bcc !+
    inc.z proto_hi+1
  !:
    // for( byte c: 0..15 )
    // [52] init_font_hex::c#1 = ++ init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [53] if(init_font_hex::c#1!=$10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z c
    bne __b1
    // init_font_hex::@return
    // }
    // [54] return 
    rts
}
  // atan2_16
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
// __zp($f) unsigned int atan2_16(__zp($17) int x, __zp($19) int y)
atan2_16: {
    .label __2 = $b
    .label __7 = $d
    .label yi = $b
    .label xi = $d
    .label angle = $f
    .label xd = $13
    .label yd = $11
    .label return = $f
    .label x = $17
    .label y = $19
    // (y>=0)?y:-y
    // [55] if(atan2_16::y#0>=0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 
    lda.z y+1
    bmi !__b1+
    jmp __b1
  !__b1:
    // atan2_16::@2
    // [56] atan2_16::$2 = - atan2_16::y#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc.z y
    sta.z __2
    lda #0
    sbc.z y+1
    sta.z __2+1
    // [57] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3]
    // [57] phi atan2_16::yi#0 = atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy 
    // atan2_16::@3
  __b3:
    // (x>=0)?x:-x
    // [58] if(atan2_16::x#0>=0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 
    lda.z x+1
    bmi !__b4+
    jmp __b4
  !__b4:
    // atan2_16::@5
    // [59] atan2_16::$7 = - atan2_16::x#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc.z x
    sta.z __7
    lda #0
    sbc.z x+1
    sta.z __7+1
    // [60] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6]
    // [60] phi atan2_16::xi#0 = atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy 
    // atan2_16::@6
  __b6:
    // [61] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10]
    // [61] phi atan2_16::angle#12 = 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vwuc1 
    lda #<0
    sta.z angle
    sta.z angle+1
    // [61] phi atan2_16::i#2 = 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 
    tax
    // [61] phi atan2_16::xi#3 = atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy 
    // [61] phi atan2_16::yi#3 = atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy 
    // atan2_16::@10
  __b10:
    // if(yi==0)
    // [62] if(atan2_16::yi#3!=0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 
    lda.z yi+1
    ora.z yi
    bne __b11
    // [63] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12]
    // [63] phi atan2_16::angle#6 = atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy 
    // atan2_16::@12
  __b12:
    // angle /=2
    // [64] atan2_16::angle#1 = atan2_16::angle#6 >> 1 -- vwuz1=vwuz1_ror_1 
    lsr.z angle+1
    ror.z angle
    // if(x<0)
    // [65] if(atan2_16::x#0>=0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 
    lda.z x+1
    bpl __b7
    // atan2_16::@21
    // angle = 0x8000-angle
    // [66] atan2_16::angle#4 = $8000 - atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 
    lda #<$8000
    sec
    sbc.z angle
    sta.z angle
    lda #>$8000
    sbc.z angle+1
    sta.z angle+1
    // [67] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7]
    // [67] phi atan2_16::angle#11 = atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy 
    // atan2_16::@7
  __b7:
    // if(y<0)
    // [68] if(atan2_16::y#0>=0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 
    lda.z y+1
    bpl __b8
    // atan2_16::@9
    // angle = -angle
    // [69] atan2_16::angle#5 = - atan2_16::angle#11 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc.z angle
    sta.z angle
    lda #0
    sbc.z angle+1
    sta.z angle+1
    // [70] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8]
    // [70] phi atan2_16::return#0 = atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy 
    // atan2_16::@8
  __b8:
    // atan2_16::@return
    // }
    // [71] return 
    rts
    // atan2_16::@11
  __b11:
    // [72] atan2_16::shift#5 = atan2_16::i#2 -- vbuyy=vbuxx 
    txa
    tay
    // [73] atan2_16::xd#10 = atan2_16::xi#3 -- vwsz1=vwsz2 
    lda.z xi
    sta.z xd
    lda.z xi+1
    sta.z xd+1
    // [74] atan2_16::yd#10 = atan2_16::yi#3 -- vwsz1=vwsz2 
    lda.z yi
    sta.z yd
    lda.z yi+1
    sta.z yd+1
    // [75] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13]
    // [75] phi atan2_16::yd#3 = atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy 
    // [75] phi atan2_16::xd#3 = atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy 
    // [75] phi atan2_16::shift#2 = atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy 
    // atan2_16::@13
  __b13:
    // while(shift>=2)
    // [76] if(atan2_16::shift#2>=2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 
    cpy #2
    bcs __b14
    // atan2_16::@15
    // if(shift)
    // [77] if(0==atan2_16::shift#2) goto atan2_16::@17 -- 0_eq_vbuyy_then_la1 
    cpy #0
    beq __b17
    // atan2_16::@16
    // xd >>= 1
    // [78] atan2_16::xd#2 = atan2_16::xd#3 >> 1 -- vwsz1=vwsz1_ror_1 
    lda.z xd+1
    cmp #$80
    ror.z xd+1
    ror.z xd
    // yd >>= 1
    // [79] atan2_16::yd#2 = atan2_16::yd#3 >> 1 -- vwsz1=vwsz1_ror_1 
    lda.z yd+1
    cmp #$80
    ror.z yd+1
    ror.z yd
    // [80] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17]
    // [80] phi atan2_16::xd#5 = atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy 
    // [80] phi atan2_16::yd#5 = atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy 
    // atan2_16::@17
  __b17:
    // if(yi>=0)
    // [81] if(atan2_16::yi#3>=0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 
    lda.z yi+1
    bpl __b18
    // atan2_16::@20
    // xi -= yd
    // [82] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda.z xi
    sec
    sbc.z yd
    sta.z xi
    lda.z xi+1
    sbc.z yd+1
    sta.z xi+1
    // yi += xd
    // [83] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 
    clc
    lda.z yi
    adc.z xd
    sta.z yi
    lda.z yi+1
    adc.z xd+1
    sta.z yi+1
    // angle -= CORDIC_ATAN2_ANGLES_16[i]
    // [84] atan2_16::$23 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [85] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa 
    tay
    lda.z angle
    sec
    sbc CORDIC_ATAN2_ANGLES_16,y
    sta.z angle
    lda.z angle+1
    sbc CORDIC_ATAN2_ANGLES_16+1,y
    sta.z angle+1
    // [86] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19]
    // [86] phi atan2_16::xi#8 = atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy 
    // [86] phi atan2_16::angle#13 = atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy 
    // [86] phi atan2_16::yi#8 = atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy 
    // atan2_16::@19
  __b19:
    // for( char i: 0..CORDIC_ITERATIONS_16-1)
    // [87] atan2_16::i#1 = ++ atan2_16::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [88] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 
    cpx #CORDIC_ITERATIONS_16-1+1
    bne !__b12+
    jmp __b12
  !__b12:
    // [61] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10]
    // [61] phi atan2_16::angle#12 = atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy 
    // [61] phi atan2_16::i#2 = atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy 
    // [61] phi atan2_16::xi#3 = atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy 
    // [61] phi atan2_16::yi#3 = atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy 
    jmp __b10
    // atan2_16::@18
  __b18:
    // xi += yd
    // [89] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 
    clc
    lda.z xi
    adc.z yd
    sta.z xi
    lda.z xi+1
    adc.z yd+1
    sta.z xi+1
    // yi -= xd
    // [90] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda.z yi
    sec
    sbc.z xd
    sta.z yi
    lda.z yi+1
    sbc.z xd+1
    sta.z yi+1
    // angle += CORDIC_ATAN2_ANGLES_16[i]
    // [91] atan2_16::$22 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [92] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa 
    tay
    clc
    lda.z angle
    adc CORDIC_ATAN2_ANGLES_16,y
    sta.z angle
    lda.z angle+1
    adc CORDIC_ATAN2_ANGLES_16+1,y
    sta.z angle+1
    jmp __b19
    // atan2_16::@14
  __b14:
    // xd >>= 2
    // [93] atan2_16::xd#1 = atan2_16::xd#3 >> 2 -- vwsz1=vwsz1_ror_2 
    lda.z xd+1
    cmp #$80
    ror.z xd+1
    ror.z xd
    lda.z xd+1
    cmp #$80
    ror.z xd+1
    ror.z xd
    // yd >>= 2
    // [94] atan2_16::yd#1 = atan2_16::yd#3 >> 2 -- vwsz1=vwsz1_ror_2 
    lda.z yd+1
    cmp #$80
    ror.z yd+1
    ror.z yd
    lda.z yd+1
    cmp #$80
    ror.z yd+1
    ror.z yd
    // shift -=2
    // [95] atan2_16::shift#1 = atan2_16::shift#2 - 2 -- vbuyy=vbuyy_minus_2 
    dey
    dey
    jmp __b13
    // atan2_16::@4
  __b4:
    // (x>=0)?x:-x
    // [96] atan2_16::xi#13 = atan2_16::x#0 -- vwsz1=vwsz2 
    lda.z x
    sta.z xi
    lda.z x+1
    sta.z xi+1
    jmp __b6
    // atan2_16::@1
  __b1:
    // (y>=0)?y:-y
    // [97] atan2_16::yi#16 = atan2_16::y#0 -- vwsz1=vwsz2 
    lda.z y
    sta.z yi
    lda.z y+1
    sta.z yi+1
    jmp __b3
}
  // diff
// __register(A) char diff(__register(X) char bb1, __register(A) char bb2)
diff: {
    // (bb1<bb2)?(bb2-bb1):bb1-bb2
    // [98] if(diff::bb1#0<diff::bb2#0) goto diff::@1 -- vbuxx_lt_vbuaa_then_la1 
    sta.z $ff
    cpx.z $ff
    bcc __b1
    // diff::@2
    // [99] diff::$2 = diff::bb1#0 - diff::bb2#0 -- vbuaa=vbuxx_minus_vbuaa 
    sta.z $ff
    txa
    sec
    sbc.z $ff
    // [100] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3]
    // [100] phi diff::return#1 = diff::$4 [phi:diff::@1/diff::@2->diff::@3#0] -- register_copy 
    // diff::@3
    // diff::@return
    // }
    // [101] return 
    rts
    // diff::@1
  __b1:
    // (bb1<bb2)?(bb2-bb1):bb1-bb2
    // [102] diff::$4 = diff::bb2#0 - diff::bb1#0 -- vbuaa=vbuaa_minus_vbuxx 
    stx.z $ff
    sec
    sbc.z $ff
    rts
}
  // print_uint
// Print a unsigned int as HEX
// void print_uint(__zp(4) unsigned int w)
print_uint: {
    .label w = 4
    // print_uchar(BYTE1(w))
    // [103] print_uchar::b#0 = byte1  print_uint::w#0 -- vbuxx=_byte1_vwuz1 
    ldx.z w+1
    // [104] call print_uchar
    // [108] phi from print_uint to print_uchar [phi:print_uint->print_uchar]
    // [108] phi print_char_cursor#26 = print_screen#0 [phi:print_uint->print_uchar#0] -- pbuz1=pbuc1 
    lda #<print_screen
    sta.z print_char_cursor
    lda #>print_screen
    sta.z print_char_cursor+1
    // [108] phi print_uchar::b#2 = print_uchar::b#0 [phi:print_uint->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_uint::@1
    // print_uchar(BYTE0(w))
    // [105] print_uchar::b#1 = byte0  print_uint::w#0 -- vbuxx=_byte0_vwuz1 
    ldx.z w
    // [106] call print_uchar
    // [108] phi from print_uint::@1 to print_uchar [phi:print_uint::@1->print_uchar]
    // [108] phi print_char_cursor#26 = print_char_cursor#20 [phi:print_uint::@1->print_uchar#0] -- register_copy 
    // [108] phi print_uchar::b#2 = print_uchar::b#1 [phi:print_uint::@1->print_uchar#1] -- register_copy 
    jsr print_uchar
    // print_uint::@return
    // }
    // [107] return 
    rts
}
  // print_uchar
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
    // b>>4
    // [109] print_uchar::$0 = print_uchar::b#2 >> 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [110] print_char::ch#0 = print_hextab[print_uchar::$0] -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [111] call print_char
  // Table of hexadecimal digits
    // [116] phi from print_uchar to print_char [phi:print_uchar->print_char]
    // [116] phi print_char_cursor#19 = print_char_cursor#26 [phi:print_uchar->print_char#0] -- register_copy 
    // [116] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@1
    // b&$f
    // [112] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [113] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [114] call print_char
    // [116] phi from print_uchar::@1 to print_char [phi:print_uchar::@1->print_char]
    // [116] phi print_char_cursor#19 = print_char_cursor#20 [phi:print_uchar::@1->print_char#0] -- register_copy 
    // [116] phi print_char::ch#2 = print_char::ch#1 [phi:print_uchar::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_uchar::@return
    // }
    // [115] return 
    rts
}
  // print_char
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [117] *print_char_cursor#19 = print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [118] print_char_cursor#20 = ++ print_char_cursor#19 -- pbuz1=_inc_pbuz1 
    inc.z print_char_cursor
    bne !+
    inc.z print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [119] return 
    rts
}
  // File Data
.segment Data
  // Bit patterns for symbols 0-f (3x5 pixels) used in font hex
  FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4
  // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
CORDIC_ATAN2_ANGLES_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2

  print_hextab: .text "0123456789abcdef"
SCREEN_REF:
.for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)


