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)
Eliminating unused variable with no statement atan2_8::$19
Eliminating unused variable with no statement atan2_8::$20
Eliminating unused variable with no statement main::$2

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

char atan2_8(signed char x , signed char y)
atan2_8: scope:[atan2_8]  from main::@2
  atan2_8::x#9 = phi( main::@2/atan2_8::x#0 )
  atan2_8::y#1 = phi( main::@2/atan2_8::y#0 )
  atan2_8::$0 = atan2_8::y#1 > 0
  if(atan2_8::$0) goto atan2_8::@1
  to:atan2_8::@2
atan2_8::@1: scope:[atan2_8]  from atan2_8
  atan2_8::x#5 = phi( atan2_8/atan2_8::x#9 )
  atan2_8::y#2 = phi( atan2_8/atan2_8::y#1 )
  atan2_8::$3 = atan2_8::y#2
  to:atan2_8::@3
atan2_8::@2: scope:[atan2_8]  from atan2_8
  atan2_8::x#6 = phi( atan2_8/atan2_8::x#9 )
  atan2_8::y#3 = phi( atan2_8/atan2_8::y#1 )
  atan2_8::$1 = - atan2_8::y#3
  atan2_8::$2 = atan2_8::$1
  to:atan2_8::@3
atan2_8::@3: scope:[atan2_8]  from atan2_8::@1 atan2_8::@2
  atan2_8::y#15 = phi( atan2_8::@1/atan2_8::y#2, atan2_8::@2/atan2_8::y#3 )
  atan2_8::x#1 = phi( atan2_8::@1/atan2_8::x#5, atan2_8::@2/atan2_8::x#6 )
  atan2_8::$4 = phi( atan2_8::@1/atan2_8::$3, atan2_8::@2/atan2_8::$2 )
  atan2_8::yi#0 = atan2_8::$4
  atan2_8::$5 = atan2_8::x#1 > 0
  if(atan2_8::$5) goto atan2_8::@4
  to:atan2_8::@5
atan2_8::@4: scope:[atan2_8]  from atan2_8::@3
  atan2_8::y#12 = phi( atan2_8::@3/atan2_8::y#15 )
  atan2_8::yi#9 = phi( atan2_8::@3/atan2_8::yi#0 )
  atan2_8::x#2 = phi( atan2_8::@3/atan2_8::x#1 )
  atan2_8::$8 = atan2_8::x#2
  to:atan2_8::@6
atan2_8::@5: scope:[atan2_8]  from atan2_8::@3
  atan2_8::y#13 = phi( atan2_8::@3/atan2_8::y#15 )
  atan2_8::yi#10 = phi( atan2_8::@3/atan2_8::yi#0 )
  atan2_8::x#3 = phi( atan2_8::@3/atan2_8::x#1 )
  atan2_8::$6 = - atan2_8::x#3
  atan2_8::$7 = atan2_8::$6
  to:atan2_8::@6
atan2_8::@6: scope:[atan2_8]  from atan2_8::@4 atan2_8::@5
  atan2_8::y#9 = phi( atan2_8::@4/atan2_8::y#12, atan2_8::@5/atan2_8::y#13 )
  atan2_8::x#10 = phi( atan2_8::@4/atan2_8::x#2, atan2_8::@5/atan2_8::x#3 )
  atan2_8::yi#8 = phi( atan2_8::@4/atan2_8::yi#9, atan2_8::@5/atan2_8::yi#10 )
  atan2_8::$9 = phi( atan2_8::@4/atan2_8::$8, atan2_8::@5/atan2_8::$7 )
  atan2_8::xi#0 = atan2_8::$9
  atan2_8::angle#0 = 0
  atan2_8::i#0 = 0
  to:atan2_8::@10
atan2_8::@10: scope:[atan2_8]  from atan2_8::@14 atan2_8::@6
  atan2_8::y#7 = phi( atan2_8::@14/atan2_8::y#8, atan2_8::@6/atan2_8::y#9 )
  atan2_8::x#7 = phi( atan2_8::@14/atan2_8::x#8, atan2_8::@6/atan2_8::x#10 )
  atan2_8::angle#12 = phi( atan2_8::@14/atan2_8::angle#13, atan2_8::@6/atan2_8::angle#0 )
  atan2_8::i#6 = phi( atan2_8::@14/atan2_8::i#1, atan2_8::@6/atan2_8::i#0 )
  atan2_8::xi#6 = phi( atan2_8::@14/atan2_8::xi#7, atan2_8::@6/atan2_8::xi#0 )
  atan2_8::yi#3 = phi( atan2_8::@14/atan2_8::yi#7, atan2_8::@6/atan2_8::yi#8 )
  atan2_8::$17 = atan2_8::yi#3 == 0
  atan2_8::$18 = ! atan2_8::$17
  if(atan2_8::$18) goto atan2_8::@11
  to:atan2_8::@12
atan2_8::@11: scope:[atan2_8]  from atan2_8::@10
  atan2_8::y#14 = phi( atan2_8::@10/atan2_8::y#7 )
  atan2_8::x#13 = phi( atan2_8::@10/atan2_8::x#7 )
  atan2_8::angle#14 = phi( atan2_8::@10/atan2_8::angle#12 )
  atan2_8::yi#4 = phi( atan2_8::@10/atan2_8::yi#3 )
  atan2_8::i#2 = phi( atan2_8::@10/atan2_8::i#6 )
  atan2_8::xi#3 = phi( atan2_8::@10/atan2_8::xi#6 )
  atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2
  atan2_8::yd#0 = atan2_8::yi#4 >> atan2_8::i#2
  atan2_8::$21 = atan2_8::yi#4 > 0
  if(atan2_8::$21) goto atan2_8::@13
  to:atan2_8::@15
atan2_8::@12: scope:[atan2_8]  from atan2_8::@10 atan2_8::@14
  atan2_8::y#5 = phi( atan2_8::@10/atan2_8::y#7, atan2_8::@14/atan2_8::y#8 )
  atan2_8::x#4 = phi( atan2_8::@10/atan2_8::x#7, atan2_8::@14/atan2_8::x#8 )
  atan2_8::angle#6 = phi( atan2_8::@10/atan2_8::angle#12, atan2_8::@14/atan2_8::angle#13 )
  atan2_8::$10 = atan2_8::angle#6 / 2
  atan2_8::angle#1 = atan2_8::$10
  atan2_8::$11 = atan2_8::x#4 < 0
  atan2_8::$12 = ! atan2_8::$11
  if(atan2_8::$12) goto atan2_8::@7
  to:atan2_8::@16
atan2_8::@13: scope:[atan2_8]  from atan2_8::@11
  atan2_8::y#10 = phi( atan2_8::@11/atan2_8::y#14 )
  atan2_8::x#11 = phi( atan2_8::@11/atan2_8::x#13 )
  atan2_8::i#3 = phi( atan2_8::@11/atan2_8::i#2 )
  atan2_8::angle#7 = phi( atan2_8::@11/atan2_8::angle#14 )
  atan2_8::xd#1 = phi( atan2_8::@11/atan2_8::xd#0 )
  atan2_8::yi#5 = phi( atan2_8::@11/atan2_8::yi#4 )
  atan2_8::yd#1 = phi( atan2_8::@11/atan2_8::yd#0 )
  atan2_8::xi#4 = phi( atan2_8::@11/atan2_8::xi#3 )
  atan2_8::xi#1 = atan2_8::xi#4 + atan2_8::yd#1
  atan2_8::yi#1 = atan2_8::yi#5 - atan2_8::xd#1
  atan2_8::angle#2 = atan2_8::angle#7 + CORDIC_ATAN2_ANGLES_8[atan2_8::i#3]
  to:atan2_8::@14
atan2_8::@15: scope:[atan2_8]  from atan2_8::@11
  atan2_8::y#11 = phi( atan2_8::@11/atan2_8::y#14 )
  atan2_8::x#12 = phi( atan2_8::@11/atan2_8::x#13 )
  atan2_8::i#4 = phi( atan2_8::@11/atan2_8::i#2 )
  atan2_8::angle#8 = phi( atan2_8::@11/atan2_8::angle#14 )
  atan2_8::xd#2 = phi( atan2_8::@11/atan2_8::xd#0 )
  atan2_8::yi#6 = phi( atan2_8::@11/atan2_8::yi#4 )
  atan2_8::yd#2 = phi( atan2_8::@11/atan2_8::yd#0 )
  atan2_8::xi#5 = phi( atan2_8::@11/atan2_8::xi#3 )
  atan2_8::xi#2 = atan2_8::xi#5 - atan2_8::yd#2
  atan2_8::yi#2 = atan2_8::yi#6 + atan2_8::xd#2
  atan2_8::angle#3 = atan2_8::angle#8 - CORDIC_ATAN2_ANGLES_8[atan2_8::i#4]
  to:atan2_8::@14
atan2_8::@14: scope:[atan2_8]  from atan2_8::@13 atan2_8::@15
  atan2_8::y#8 = phi( atan2_8::@13/atan2_8::y#10, atan2_8::@15/atan2_8::y#11 )
  atan2_8::xi#7 = phi( atan2_8::@13/atan2_8::xi#1, atan2_8::@15/atan2_8::xi#2 )
  atan2_8::x#8 = phi( atan2_8::@13/atan2_8::x#11, atan2_8::@15/atan2_8::x#12 )
  atan2_8::angle#13 = phi( atan2_8::@13/atan2_8::angle#2, atan2_8::@15/atan2_8::angle#3 )
  atan2_8::yi#7 = phi( atan2_8::@13/atan2_8::yi#1, atan2_8::@15/atan2_8::yi#2 )
  atan2_8::i#5 = phi( atan2_8::@13/atan2_8::i#3, atan2_8::@15/atan2_8::i#4 )
  atan2_8::i#1 = atan2_8::i#5 + rangenext(0,CORDIC_ITERATIONS_8-1)
  atan2_8::$22 = atan2_8::i#1 != rangelast(0,CORDIC_ITERATIONS_8-1)
  if(atan2_8::$22) goto atan2_8::@10
  to:atan2_8::@12
atan2_8::@7: scope:[atan2_8]  from atan2_8::@12 atan2_8::@16
  atan2_8::angle#15 = phi( atan2_8::@12/atan2_8::angle#1, atan2_8::@16/atan2_8::angle#4 )
  atan2_8::y#4 = phi( atan2_8::@12/atan2_8::y#5, atan2_8::@16/atan2_8::y#6 )
  atan2_8::$14 = atan2_8::y#4 < 0
  atan2_8::$15 = ! atan2_8::$14
  if(atan2_8::$15) goto atan2_8::@8
  to:atan2_8::@9
atan2_8::@16: scope:[atan2_8]  from atan2_8::@12
  atan2_8::y#6 = phi( atan2_8::@12/atan2_8::y#5 )
  atan2_8::angle#9 = phi( atan2_8::@12/atan2_8::angle#1 )
  atan2_8::$13 = $80 - atan2_8::angle#9
  atan2_8::angle#4 = atan2_8::$13
  to:atan2_8::@7
atan2_8::@8: scope:[atan2_8]  from atan2_8::@7 atan2_8::@9
  atan2_8::angle#10 = phi( atan2_8::@7/atan2_8::angle#15, atan2_8::@9/atan2_8::angle#5 )
  atan2_8::return#0 = atan2_8::angle#10
  to:atan2_8::@return
atan2_8::@9: scope:[atan2_8]  from atan2_8::@7
  atan2_8::angle#11 = phi( atan2_8::@7/atan2_8::angle#15 )
  atan2_8::$16 = - atan2_8::angle#11
  atan2_8::angle#5 = atan2_8::$16
  to:atan2_8::@8
atan2_8::@return: scope:[atan2_8]  from atan2_8::@8
  atan2_8::return#3 = phi( atan2_8::@8/atan2_8::return#0 )
  atan2_8::return#1 = atan2_8::return#3
  return 
  to:@return

void main()
main: scope:[main]  from __start
  init_font_hex::charset#1 = CHARSET
  call init_font_hex
  to:main::@7
main::@7: scope:[main]  from main
  main::toD0181_screen#0 = SCREEN
  main::toD0181_gfx#0 = CHARSET
  to:main::toD0181
main::toD0181: scope:[main]  from main::@7
  main::toD0181_gfx#1 = phi( main::@7/main::toD0181_gfx#0 )
  main::toD0181_screen#1 = phi( main::@7/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
  main::toD0181_return#2 = phi( main::toD0181/main::toD0181_return#0 )
  main::toD0181_return#1 = main::toD0181_return#2
  to:main::@6
main::@6: scope:[main]  from main::toD0181_@return
  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::y#0 = -$c
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@6
  main::screen#4 = phi( main::@3/main::screen#5, main::@6/main::screen#0 )
  main::y#4 = phi( main::@3/main::y#1, main::@6/main::y#0 )
  main::x#0 = -$13
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@8
  main::screen#3 = phi( main::@1/main::screen#4, main::@8/main::screen#1 )
  main::y#2 = phi( main::@1/main::y#4, main::@8/main::y#5 )
  main::x#2 = phi( main::@1/main::x#0, main::@8/main::x#1 )
  atan2_8::x#0 = main::x#2
  atan2_8::y#0 = main::y#2
  call atan2_8
  atan2_8::return#2 = atan2_8::return#1
  to:main::@8
main::@8: scope:[main]  from main::@2
  main::y#5 = phi( main::@2/main::y#2 )
  main::x#3 = phi( main::@2/main::x#2 )
  main::screen#2 = phi( main::@2/main::screen#3 )
  atan2_8::return#4 = phi( main::@2/atan2_8::return#2 )
  main::angle#0 = atan2_8::return#4
  *main::screen#2 = main::angle#0
  main::screen#1 = ++ main::screen#2
  main::x#1 = main::x#3 + rangenext(-$13,$14)
  main::$3 = main::x#1 != rangelast(-$13,$14)
  if(main::$3) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@8
  main::screen#5 = phi( main::@8/main::screen#1 )
  main::y#3 = phi( main::@8/main::y#5 )
  main::y#1 = main::y#3 + rangenext(-$c,$c)
  main::$4 = main::y#1 != rangelast(-$c,$c)
  if(main::$4) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@5
  if(true) goto main::@5
  to:main::@return
main::@5: scope:[main]  from main::@4
  *main::col00 = ++ *main::col00
  to:main::@4
main::@return: scope:[main]  from main::@4
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  call main
  to:__start::@1
__start::@1: scope:[__start]  from __start
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  return 
  to:@return

SYMBOL TABLE SSA
__constant char * const CHARSET = (char *)$2000
__constant char * const COLS = (char *)$d800
__constant char CORDIC_ATAN2_ANGLES_8[CORDIC_ITERATIONS_8] = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
__constant const char CORDIC_ITERATIONS_8 = 8
__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 * const SCREEN = (char *)$2800
void __start()
char atan2_8(signed char x , signed char y)
bool atan2_8::$0
signed char atan2_8::$1
number atan2_8::$10
bool atan2_8::$11
bool atan2_8::$12
number atan2_8::$13
bool atan2_8::$14
bool atan2_8::$15
char atan2_8::$16
bool atan2_8::$17
bool atan2_8::$18
signed char atan2_8::$2
bool atan2_8::$21
bool atan2_8::$22
signed char atan2_8::$3
signed char atan2_8::$4
bool atan2_8::$5
signed char atan2_8::$6
signed char atan2_8::$7
signed char atan2_8::$8
signed char atan2_8::$9
char atan2_8::angle
char atan2_8::angle#0
char atan2_8::angle#1
char atan2_8::angle#10
char atan2_8::angle#11
char atan2_8::angle#12
char atan2_8::angle#13
char atan2_8::angle#14
char atan2_8::angle#15
char atan2_8::angle#2
char atan2_8::angle#3
char atan2_8::angle#4
char atan2_8::angle#5
char atan2_8::angle#6
char atan2_8::angle#7
char atan2_8::angle#8
char atan2_8::angle#9
char atan2_8::i
char atan2_8::i#0
char atan2_8::i#1
char atan2_8::i#2
char atan2_8::i#3
char atan2_8::i#4
char atan2_8::i#5
char atan2_8::i#6
char atan2_8::return
char atan2_8::return#0
char atan2_8::return#1
char atan2_8::return#2
char atan2_8::return#3
char atan2_8::return#4
signed char atan2_8::x
signed char atan2_8::x#0
signed char atan2_8::x#1
signed char atan2_8::x#10
signed char atan2_8::x#11
signed char atan2_8::x#12
signed char atan2_8::x#13
signed char atan2_8::x#2
signed char atan2_8::x#3
signed char atan2_8::x#4
signed char atan2_8::x#5
signed char atan2_8::x#6
signed char atan2_8::x#7
signed char atan2_8::x#8
signed char atan2_8::x#9
signed char atan2_8::xd
signed char atan2_8::xd#0
signed char atan2_8::xd#1
signed char atan2_8::xd#2
signed char atan2_8::xi
signed char atan2_8::xi#0
signed char atan2_8::xi#1
signed char atan2_8::xi#2
signed char atan2_8::xi#3
signed char atan2_8::xi#4
signed char atan2_8::xi#5
signed char atan2_8::xi#6
signed char atan2_8::xi#7
signed char atan2_8::y
signed char atan2_8::y#0
signed char atan2_8::y#1
signed char atan2_8::y#10
signed char atan2_8::y#11
signed char atan2_8::y#12
signed char atan2_8::y#13
signed char atan2_8::y#14
signed char atan2_8::y#15
signed char atan2_8::y#2
signed char atan2_8::y#3
signed char atan2_8::y#4
signed char atan2_8::y#5
signed char atan2_8::y#6
signed char atan2_8::y#7
signed char atan2_8::y#8
signed char atan2_8::y#9
signed char atan2_8::yd
signed char atan2_8::yd#0
signed char atan2_8::yd#1
signed char atan2_8::yd#2
signed char atan2_8::yi
signed char atan2_8::yi#0
signed char atan2_8::yi#1
signed char atan2_8::yi#10
signed char atan2_8::yi#2
signed char atan2_8::yi#3
signed char atan2_8::yi#4
signed char atan2_8::yi#5
signed char atan2_8::yi#6
signed char atan2_8::yi#7
signed char atan2_8::yi#8
signed char atan2_8::yi#9
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::$3
bool main::$4
char main::angle
char main::angle#0
__constant char *main::col00 = COLS+$c*$28+$13
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
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::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

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_8::$0 = atan2_8::y#1 > 0
Adding number conversion cast (snumber) 0 in atan2_8::$5 = atan2_8::x#1 > 0
Adding number conversion cast (snumber) 0 in atan2_8::$17 = atan2_8::yi#3 == 0
Adding number conversion cast (snumber) 0 in atan2_8::$21 = atan2_8::yi#4 > 0
Adding number conversion cast (unumber) 2 in atan2_8::$10 = atan2_8::angle#6 / 2
Adding number conversion cast (unumber) atan2_8::$10 in atan2_8::$10 = atan2_8::angle#6 / (unumber)2
Adding number conversion cast (snumber) 0 in atan2_8::$11 = atan2_8::x#4 < 0
Adding number conversion cast (unumber) 1 in atan2_8::i#1 = atan2_8::i#5 + rangenext(0,CORDIC_ITERATIONS_8-1)
Adding number conversion cast (snumber) 0 in atan2_8::$14 = atan2_8::y#4 < 0
Adding number conversion cast (unumber) $80 in atan2_8::$13 = $80 - atan2_8::angle#9
Adding number conversion cast (unumber) atan2_8::$13 in atan2_8::$13 = (unumber)$80 - atan2_8::angle#9
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
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 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $f
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 signed number type (signed char) 0
Finalized unsigned number type (char) 2
Finalized signed number type (signed char) 0
Finalized unsigned number type (char) 1
Finalized signed number type (signed char) 0
Finalized unsigned number type (char) $80
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
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to char in atan2_8::$10 = atan2_8::angle#6 / 2
Inferred type updated to char in atan2_8::$13 = $80 - atan2_8::angle#9
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
Inversing boolean not [59] atan2_8::$18 = atan2_8::yi#3 != 0 from [58] atan2_8::$17 = atan2_8::yi#3 == 0
Inversing boolean not [70] atan2_8::$12 = atan2_8::x#4 >= 0 from [69] atan2_8::$11 = atan2_8::x#4 < 0
Inversing boolean not [86] atan2_8::$15 = atan2_8::y#4 >= 0 from [85] atan2_8::$14 = atan2_8::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_8::y#1 = atan2_8::y#2 atan2_8::$3 atan2_8::y#3 
Alias atan2_8::x#5 = atan2_8::x#9 atan2_8::x#6 
Alias atan2_8::$2 = atan2_8::$1 
Alias atan2_8::yi#0 = atan2_8::$4 atan2_8::yi#9 atan2_8::yi#10 
Alias atan2_8::x#1 = atan2_8::x#2 atan2_8::$8 atan2_8::x#3 
Alias atan2_8::y#12 = atan2_8::y#15 atan2_8::y#13 
Alias atan2_8::$7 = atan2_8::$6 
Alias atan2_8::xi#0 = atan2_8::$9 
Alias atan2_8::xi#3 = atan2_8::xi#6 atan2_8::xi#4 atan2_8::xi#5 
Alias atan2_8::i#2 = atan2_8::i#6 atan2_8::i#3 atan2_8::i#4 
Alias atan2_8::yi#3 = atan2_8::yi#4 atan2_8::yi#5 atan2_8::yi#6 
Alias atan2_8::angle#12 = atan2_8::angle#14 atan2_8::angle#7 atan2_8::angle#8 
Alias atan2_8::x#11 = atan2_8::x#13 atan2_8::x#7 atan2_8::x#12 
Alias atan2_8::y#10 = atan2_8::y#14 atan2_8::y#7 atan2_8::y#11 
Alias atan2_8::angle#1 = atan2_8::$10 atan2_8::angle#9 
Alias atan2_8::yd#0 = atan2_8::yd#1 atan2_8::yd#2 
Alias atan2_8::xd#0 = atan2_8::xd#1 atan2_8::xd#2 
Alias atan2_8::y#5 = atan2_8::y#6 
Alias atan2_8::angle#4 = atan2_8::$13 
Alias atan2_8::return#0 = atan2_8::angle#10 atan2_8::return#3 atan2_8::return#1 
Alias atan2_8::angle#11 = atan2_8::angle#15 
Alias atan2_8::angle#5 = atan2_8::$16 
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_8::return#2 = atan2_8::return#4 
Alias main::screen#2 = main::screen#3 
Alias main::x#2 = main::x#3 
Alias main::y#2 = main::y#5 main::y#3 
Alias main::screen#1 = main::screen#5 
Successful SSA optimization Pass2AliasElimination
Alias atan2_8::x#1 = atan2_8::x#5 atan2_8::x#10 
Alias atan2_8::y#1 = atan2_8::y#12 atan2_8::y#9 
Alias atan2_8::yi#0 = atan2_8::yi#8 
Alias atan2_8::i#2 = atan2_8::i#5 
Alias atan2_8::x#11 = atan2_8::x#8 
Alias atan2_8::y#10 = atan2_8::y#8 
Alias atan2_8::y#4 = atan2_8::y#5 
Successful SSA optimization Pass2AliasElimination
Alias atan2_8::x#11 = atan2_8::x#4 
Alias atan2_8::y#10 = atan2_8::y#4 
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_8::y#1 atan2_8::y#0
Identical Phi Values atan2_8::x#1 atan2_8::x#0
Identical Phi Values atan2_8::x#11 atan2_8::x#1
Identical Phi Values atan2_8::y#10 atan2_8::y#1
Identical Phi Values main::y#2 main::y#4
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
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_8::$0 [36] if(atan2_8::y#0>0) goto atan2_8::@1
Simple Condition atan2_8::$5 [40] if(atan2_8::x#0>0) goto atan2_8::@4
Simple Condition atan2_8::$18 [47] if(atan2_8::yi#3!=0) goto atan2_8::@11
Simple Condition atan2_8::$21 [51] if(atan2_8::yi#3>0) goto atan2_8::@13
Simple Condition atan2_8::$12 [55] if(atan2_8::x#0>=0) goto atan2_8::@7
Simple Condition atan2_8::$22 [65] if(atan2_8::i#1!=rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@10
Simple Condition atan2_8::$15 [68] if(atan2_8::y#0>=0) goto atan2_8::@8
Simple Condition main::$3 [100] if(main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition main::$4 [103] if(main::y#1!=rangelast(-$c,$c)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [65] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@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_8::angle#0 = 0
Constant atan2_8::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::y#0 = -$c
Constant main::x#0 = -$13
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 [81] main::toD0181_$3 = byte1  (unsigned int)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [104] if(true) goto main::@5
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 [63] atan2_8::i#1 = ++ atan2_8::i#2 to ++
Resolved ranged comparison value [65] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@12 to CORDIC_ITERATIONS_8-1+1
Resolved ranged next value [98] main::x#1 = ++ main::x#2 to ++
Resolved ranged comparison value [100] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to $15
Resolved ranged next value [101] main::y#1 = ++ main::y#4 to ++
Resolved ranged comparison value [103] 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::@1
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_8-1+1 in [45] if(atan2_8::i#1==CORDIC_ITERATIONS_8-1+1) goto atan2_8::@12
Adding number conversion cast (unumber) 1 in [45] if(atan2_8::i#1==(unumber)CORDIC_ITERATIONS_8-1+1) goto atan2_8::@12
Adding number conversion cast (snumber) $15 in [71] if(main::x#1!=$15) goto main::@2
Adding number conversion cast (snumber) $d in [73] 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_8-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 [53] main::toD0181_$0 = main::toD0181_$7 & $3fff
Constant right-side identified [56] 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 [52] main::toD0181_$1 = main::toD0181_$0 * 4
Constant right-side identified [54] 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 [52] main::toD0181_$2 = byte1  main::toD0181_$1
Constant right-side identified [53] 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 [52] 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
Rewriting division to use shift [34] atan2_8::angle#1 = atan2_8::angle#6 / 2
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_8::angle#0
Inlining constant with var siblings atan2_8::i#0
Inlining constant with var siblings main::screen#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 init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant inlined main::toD0181_$2 = byte1 (unsigned int)SCREEN&$3fff*4
Constant inlined atan2_8::angle#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 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 atan2_8::i#0 = 0
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
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_8::@17(between atan2_8::@14 and atan2_8::@10)
Added new block during phi lifting atan2_8::@18(between atan2_8::@10 and atan2_8::@12)
Added new block during phi lifting atan2_8::@19(between atan2_8::@14 and atan2_8::@12)
Added new block during phi lifting atan2_8::@20(between atan2_8::@12 and atan2_8::@7)
Added new block during phi lifting atan2_8::@21(between atan2_8::@7 and atan2_8::@8)
Added new block during phi lifting main::@9(between main::@3 and main::@1)
Added new block during phi lifting main::@10(between main::@8 and main::@2)
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@7
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@4
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [main] to init_font_hex:1 atan2_8:11 

Created 24 initial phi equivalence classes
Coalesced [7] main::screen#7 = main::screen#4
Coalesced [22] main::y#6 = main::y#1
Coalesced [23] main::screen#6 = main::screen#1
Coalesced [24] main::x#4 = main::x#1
Coalesced (already) [25] main::screen#8 = main::screen#1
Coalesced [28] init_font_hex::charset#9 = init_font_hex::charset#5
Coalesced [50] init_font_hex::charset#8 = init_font_hex::charset#0
Coalesced [51] init_font_hex::proto_hi#7 = init_font_hex::proto_hi#1
Coalesced [52] init_font_hex::c#7 = init_font_hex::c#1
Coalesced (already) [53] init_font_hex::charset#10 = init_font_hex::charset#0
Coalesced [54] init_font_hex::proto_lo#5 = init_font_hex::proto_lo#1
Coalesced [55] init_font_hex::c1#5 = init_font_hex::c1#1
Coalesced [56] init_font_hex::i#3 = init_font_hex::i#1
Coalesced [57] init_font_hex::idx#7 = init_font_hex::idx#2
Coalesced [60] atan2_8::yi#12 = atan2_8::$2
Coalesced [64] atan2_8::xi#9 = atan2_8::$7
Coalesced [66] atan2_8::yi#14 = atan2_8::yi#0
Coalesced [67] atan2_8::xi#11 = atan2_8::xi#0
Coalesced [70] atan2_8::angle#17 = atan2_8::angle#12
Coalesced [75] atan2_8::angle#22 = atan2_8::angle#4
Coalesced [79] atan2_8::return#6 = atan2_8::angle#5
Coalesced [82] atan2_8::return#5 = atan2_8::angle#11
Coalesced [83] atan2_8::angle#21 = atan2_8::angle#1
Coalesced [90] atan2_8::yi#16 = atan2_8::yi#2
Coalesced [91] atan2_8::angle#20 = atan2_8::angle#3
Coalesced [92] atan2_8::xi#13 = atan2_8::xi#2
Coalesced [96] atan2_8::yi#13 = atan2_8::yi#7
Coalesced [97] atan2_8::xi#10 = atan2_8::xi#7
Coalesced [98] atan2_8::i#7 = atan2_8::i#1
Coalesced [99] atan2_8::angle#16 = atan2_8::angle#13
Coalesced (already) [100] atan2_8::angle#18 = atan2_8::angle#13
Coalesced [104] atan2_8::yi#15 = atan2_8::yi#1
Coalesced [105] atan2_8::angle#19 = atan2_8::angle#2
Coalesced [106] atan2_8::xi#12 = atan2_8::xi#1
Not coalescing [107] atan2_8::xi#8 = atan2_8::x#0
Not coalescing [108] atan2_8::yi#11 = atan2_8::y#0
Coalesced down to 17 phi equivalence classes
Culled Empty Block label main::@7
Culled Empty Block label main::toD0181_@return
Culled Empty Block label main::@4
Culled Empty Block label main::@9
Culled Empty Block label main::@10
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_8::@18
Culled Empty Block label atan2_8::@21
Culled Empty Block label atan2_8::@20
Culled Empty Block label atan2_8::@17
Culled Empty Block label atan2_8::@19
Renumbering block main::@5 to main::@4
Renumbering block main::@6 to main::@5
Renumbering block main::@8 to main::@6
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::@5
main::@5: scope:[main]  from main::toD0181
  [3] *D018 = main::toD0181_return#0
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@5
  [4] main::screen#4 = phi( main::@3/main::screen#1, main::@5/SCREEN )
  [4] main::y#4 = phi( main::@3/main::y#1, main::@5/-$c )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@6
  [5] main::screen#2 = phi( main::@1/main::screen#4, main::@6/main::screen#1 )
  [5] main::x#2 = phi( main::@1/-$13, main::@6/main::x#1 )
  [6] atan2_8::x#0 = main::x#2
  [7] atan2_8::y#0 = main::y#4
  [8] call atan2_8
  [9] atan2_8::return#2 = atan2_8::return#0
  to:main::@6
main::@6: scope:[main]  from main::@2
  [10] main::angle#0 = atan2_8::return#2
  [11] *main::screen#2 = main::angle#0
  [12] main::screen#1 = ++ main::screen#2
  [13] main::x#1 = ++ main::x#2
  [14] if(main::x#1!=$15) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@6
  [15] main::y#1 = ++ main::y#4
  [16] if(main::y#1!=$d) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@4
  [17] *main::col00 = ++ *main::col00
  to:main::@4

void init_font_hex(char *charset)
init_font_hex: scope:[init_font_hex]  from main
  [18] phi()
  to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex]  from init_font_hex init_font_hex::@5
  [19] init_font_hex::c#6 = phi( init_font_hex/0, init_font_hex::@5/init_font_hex::c#1 )
  [19] init_font_hex::proto_hi#6 = phi( init_font_hex/FONT_HEX_PROTO, init_font_hex::@5/init_font_hex::proto_hi#1 )
  [19] 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
  [20] init_font_hex::c1#4 = phi( init_font_hex::@1/0, init_font_hex::@4/init_font_hex::c1#1 )
  [20] init_font_hex::proto_lo#4 = phi( init_font_hex::@1/FONT_HEX_PROTO, init_font_hex::@4/init_font_hex::proto_lo#1 )
  [20] init_font_hex::charset#2 = phi( init_font_hex::@1/init_font_hex::charset#5, init_font_hex::@4/init_font_hex::charset#0 )
  [21] *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
  [22] init_font_hex::idx#5 = phi( init_font_hex::@2/1, init_font_hex::@3/init_font_hex::idx#2 )
  [22] init_font_hex::i#2 = phi( init_font_hex::@2/0, init_font_hex::@3/init_font_hex::i#1 )
  [23] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4
  [24] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1
  [25] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1
  [26] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2
  [27] init_font_hex::idx#2 = ++ init_font_hex::idx#5
  [28] init_font_hex::i#1 = ++ init_font_hex::i#2
  [29] 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
  [30] init_font_hex::charset#2[init_font_hex::idx#2] = 0
  [31] init_font_hex::idx#3 = ++ init_font_hex::idx#2
  [32] init_font_hex::charset#2[init_font_hex::idx#3] = 0
  [33] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5
  [34] init_font_hex::charset#0 = init_font_hex::charset#2 + 8
  [35] init_font_hex::c1#1 = ++ init_font_hex::c1#4
  [36] 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
  [37] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5
  [38] init_font_hex::c#1 = ++ init_font_hex::c#6
  [39] 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
  [40] return 
  to:@return

char atan2_8(signed char x , signed char y)
atan2_8: scope:[atan2_8]  from main::@2
  [41] if(atan2_8::y#0>0) goto atan2_8::@1
  to:atan2_8::@2
atan2_8::@2: scope:[atan2_8]  from atan2_8
  [42] atan2_8::$2 = - atan2_8::y#0
  to:atan2_8::@3
atan2_8::@3: scope:[atan2_8]  from atan2_8::@1 atan2_8::@2
  [43] atan2_8::yi#0 = phi( atan2_8::@1/atan2_8::yi#11, atan2_8::@2/atan2_8::$2 )
  [44] if(atan2_8::x#0>0) goto atan2_8::@4
  to:atan2_8::@5
atan2_8::@5: scope:[atan2_8]  from atan2_8::@3
  [45] atan2_8::$7 = - atan2_8::x#0
  to:atan2_8::@6
atan2_8::@6: scope:[atan2_8]  from atan2_8::@4 atan2_8::@5
  [46] atan2_8::xi#0 = phi( atan2_8::@4/atan2_8::xi#8, atan2_8::@5/atan2_8::$7 )
  to:atan2_8::@10
atan2_8::@10: scope:[atan2_8]  from atan2_8::@14 atan2_8::@6
  [47] atan2_8::angle#12 = phi( atan2_8::@14/atan2_8::angle#13, atan2_8::@6/0 )
  [47] atan2_8::i#2 = phi( atan2_8::@14/atan2_8::i#1, atan2_8::@6/0 )
  [47] atan2_8::xi#3 = phi( atan2_8::@14/atan2_8::xi#7, atan2_8::@6/atan2_8::xi#0 )
  [47] atan2_8::yi#3 = phi( atan2_8::@14/atan2_8::yi#7, atan2_8::@6/atan2_8::yi#0 )
  [48] if(atan2_8::yi#3!=0) goto atan2_8::@11
  to:atan2_8::@12
atan2_8::@12: scope:[atan2_8]  from atan2_8::@10 atan2_8::@14
  [49] atan2_8::angle#6 = phi( atan2_8::@10/atan2_8::angle#12, atan2_8::@14/atan2_8::angle#13 )
  [50] atan2_8::angle#1 = atan2_8::angle#6 >> 1
  [51] if(atan2_8::x#0>=0) goto atan2_8::@7
  to:atan2_8::@16
atan2_8::@16: scope:[atan2_8]  from atan2_8::@12
  [52] atan2_8::angle#4 = $80 - atan2_8::angle#1
  to:atan2_8::@7
atan2_8::@7: scope:[atan2_8]  from atan2_8::@12 atan2_8::@16
  [53] atan2_8::angle#11 = phi( atan2_8::@12/atan2_8::angle#1, atan2_8::@16/atan2_8::angle#4 )
  [54] if(atan2_8::y#0>=0) goto atan2_8::@8
  to:atan2_8::@9
atan2_8::@9: scope:[atan2_8]  from atan2_8::@7
  [55] atan2_8::angle#5 = - atan2_8::angle#11
  to:atan2_8::@8
atan2_8::@8: scope:[atan2_8]  from atan2_8::@7 atan2_8::@9
  [56] atan2_8::return#0 = phi( atan2_8::@7/atan2_8::angle#11, atan2_8::@9/atan2_8::angle#5 )
  to:atan2_8::@return
atan2_8::@return: scope:[atan2_8]  from atan2_8::@8
  [57] return 
  to:@return
atan2_8::@11: scope:[atan2_8]  from atan2_8::@10
  [58] atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2
  [59] atan2_8::yd#0 = atan2_8::yi#3 >> atan2_8::i#2
  [60] if(atan2_8::yi#3>0) goto atan2_8::@13
  to:atan2_8::@15
atan2_8::@15: scope:[atan2_8]  from atan2_8::@11
  [61] atan2_8::xi#2 = atan2_8::xi#3 - atan2_8::yd#0
  [62] atan2_8::yi#2 = atan2_8::yi#3 + atan2_8::xd#0
  [63] atan2_8::angle#3 = atan2_8::angle#12 - CORDIC_ATAN2_ANGLES_8[atan2_8::i#2]
  to:atan2_8::@14
atan2_8::@14: scope:[atan2_8]  from atan2_8::@13 atan2_8::@15
  [64] atan2_8::xi#7 = phi( atan2_8::@13/atan2_8::xi#1, atan2_8::@15/atan2_8::xi#2 )
  [64] atan2_8::angle#13 = phi( atan2_8::@13/atan2_8::angle#2, atan2_8::@15/atan2_8::angle#3 )
  [64] atan2_8::yi#7 = phi( atan2_8::@13/atan2_8::yi#1, atan2_8::@15/atan2_8::yi#2 )
  [65] atan2_8::i#1 = ++ atan2_8::i#2
  [66] if(atan2_8::i#1==CORDIC_ITERATIONS_8-1+1) goto atan2_8::@12
  to:atan2_8::@10
atan2_8::@13: scope:[atan2_8]  from atan2_8::@11
  [67] atan2_8::xi#1 = atan2_8::xi#3 + atan2_8::yd#0
  [68] atan2_8::yi#1 = atan2_8::yi#3 - atan2_8::xd#0
  [69] atan2_8::angle#2 = atan2_8::angle#12 + CORDIC_ATAN2_ANGLES_8[atan2_8::i#2]
  to:atan2_8::@14
atan2_8::@4: scope:[atan2_8]  from atan2_8::@3
  [70] atan2_8::xi#8 = atan2_8::x#0
  to:atan2_8::@6
atan2_8::@1: scope:[atan2_8]  from atan2_8
  [71] atan2_8::yi#11 = atan2_8::y#0
  to:atan2_8::@3


VARIABLE REGISTER WEIGHTS
char atan2_8(signed char x , signed char y)
signed char atan2_8::$2 // 2002.0
signed char atan2_8::$7 // 2002.0
char atan2_8::angle
char atan2_8::angle#1 // 1501.5
char atan2_8::angle#11 // 2002.0
char atan2_8::angle#12 // 444444.8888888889
char atan2_8::angle#13 // 1333334.6666666667
char atan2_8::angle#2 // 2000002.0
char atan2_8::angle#3 // 2000002.0
char atan2_8::angle#4 // 2002.0
char atan2_8::angle#5 // 2002.0
char atan2_8::angle#6 // 2001003.0
char atan2_8::i
char atan2_8::i#1 // 1500001.5
char atan2_8::i#2 // 500000.50000000006
char atan2_8::return
char atan2_8::return#0 // 701.0
char atan2_8::return#2 // 202.0
signed char atan2_8::x
signed char atan2_8::x#0 // 157.8846153846154
signed char atan2_8::xd
signed char atan2_8::xd#0 // 600000.6000000001
signed char atan2_8::xi
signed char atan2_8::xi#0 // 3003.0
signed char atan2_8::xi#1 // 666667.3333333334
signed char atan2_8::xi#2 // 666667.3333333334
signed char atan2_8::xi#3 // 800201.0
signed char atan2_8::xi#7 // 1000001.0
signed char atan2_8::xi#8 // 2002.0
signed char atan2_8::y
signed char atan2_8::y#0 // 146.60714285714286
signed char atan2_8::yd
signed char atan2_8::yd#0 // 1500001.5
signed char atan2_8::yi
signed char atan2_8::yi#0 // 600.5999999999999
signed char atan2_8::yi#1 // 1000001.0
signed char atan2_8::yi#11 // 2002.0
signed char atan2_8::yi#2 // 1000001.0
signed char atan2_8::yi#3 // 857286.7142857142
signed char atan2_8::yi#7 // 1000001.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()
char main::angle
char main::angle#0 // 202.0
char *main::screen
char *main::screen#1 // 42.599999999999994
char *main::screen#2 // 44.85714285714286
char *main::screen#4 // 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 // 37.875
signed char main::y
signed char main::y#1 // 16.5
signed char main::y#4 // 11.181818181818182

Initial phi equivalence classes
[ main::y#4 main::y#1 ]
[ main::x#2 main::x#1 ]
[ main::screen#2 main::screen#4 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_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ]
[ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ]
[ atan2_8::i#2 atan2_8::i#1 ]
[ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
[ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ]
Added variable atan2_8::x#0 to live range equivalence class [ atan2_8::x#0 ]
Added variable atan2_8::y#0 to live range equivalence class [ atan2_8::y#0 ]
Added variable atan2_8::return#2 to live range equivalence class [ atan2_8::return#2 ]
Added variable main::angle#0 to live range equivalence class [ main::angle#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_8::xd#0 to live range equivalence class [ atan2_8::xd#0 ]
Added variable atan2_8::yd#0 to live range equivalence class [ atan2_8::yd#0 ]
Complete equivalence classes
[ main::y#4 main::y#1 ]
[ main::x#2 main::x#1 ]
[ main::screen#2 main::screen#4 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_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ]
[ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ]
[ atan2_8::i#2 atan2_8::i#1 ]
[ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
[ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ]
[ atan2_8::x#0 ]
[ atan2_8::y#0 ]
[ atan2_8::return#2 ]
[ main::angle#0 ]
[ init_font_hex::$0 ]
[ init_font_hex::$1 ]
[ init_font_hex::$2 ]
[ init_font_hex::idx#3 ]
[ atan2_8::xd#0 ]
[ atan2_8::yd#0 ]
Allocated zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Allocated zp[1]:3 [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ]
Allocated zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ]
Allocated zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ]
Allocated zp[1]:6 [ atan2_8::yd#0 ]
Allocated zp[1]:7 [ atan2_8::xd#0 ]
Allocated zp[1]:8 [ init_font_hex::i#2 init_font_hex::i#1 ]
Allocated zp[1]:9 [ init_font_hex::$1 ]
Allocated zp[1]:10 [ init_font_hex::$2 ]
Allocated zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated zp[1]:12 [ init_font_hex::$0 ]
Allocated zp[1]:13 [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ]
Allocated zp[1]:14 [ init_font_hex::idx#3 ]
Allocated zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated zp[2]:16 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated zp[2]:18 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated zp[2]:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated zp[1]:22 [ atan2_8::return#2 ]
Allocated zp[1]:23 [ main::angle#0 ]
Allocated zp[1]:24 [ main::x#2 main::x#1 ]
Allocated zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated zp[1]:26 [ atan2_8::x#0 ]
Allocated zp[1]:27 [ atan2_8::y#0 ]
Allocated zp[2]:28 [ main::screen#2 main::screen#4 main::screen#1 ]
Allocated zp[1]:30 [ main::y#4 main::y#1 ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [3] *D018 = main::toD0181_return#0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [11] *main::screen#2 = main::angle#0 [ main::y#4 main::x#2 main::screen#2 ] (  [ main::y#4 main::x#2 main::screen#2 ] { }  ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp[1]:30 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:24 [ main::x#2 main::x#1 ]
Statement [21] *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]:25 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Statement [23] 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]:8 [ init_font_hex::i#2 init_font_hex::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Statement [24] 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]:12 [ init_font_hex::$0 ]
Statement [30] 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 [32] 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 [33] 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 [34] 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 [37] 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 [42] atan2_8::$2 = - atan2_8::y#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:30 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:24 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:26 [ atan2_8::x#0 ]
Removing always clobbered register reg byte a as potential for zp[1]:27 [ atan2_8::y#0 ]
Statement [44] if(atan2_8::x#0>0) goto atan2_8::@4 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:3 [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ]
Statement [45] atan2_8::$7 = - atan2_8::x#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [50] atan2_8::angle#1 = atan2_8::angle#6 >> 1 [ atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [52] atan2_8::angle#4 = $80 - atan2_8::angle#1 [ atan2_8::y#0 atan2_8::angle#4 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::y#0 atan2_8::angle#4 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [55] atan2_8::angle#5 = - atan2_8::angle#11 [ atan2_8::angle#5 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::angle#5 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [58] atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ]
Removing always clobbered register reg byte a as potential for zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Statement [59] atan2_8::yd#0 = atan2_8::yi#3 >> atan2_8::i#2 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:7 [ atan2_8::xd#0 ]
Statement [60] if(atan2_8::yi#3>0) goto atan2_8::@13 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:6 [ atan2_8::yd#0 ]
Statement [61] atan2_8::xi#2 = atan2_8::xi#3 - atan2_8::yd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#2 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#2 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [62] atan2_8::yi#2 = atan2_8::yi#3 + atan2_8::xd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::xi#2 atan2_8::yi#2 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::xi#2 atan2_8::yi#2 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [63] atan2_8::angle#3 = atan2_8::angle#12 - CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::xi#2 atan2_8::yi#2 atan2_8::angle#3 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::xi#2 atan2_8::yi#2 atan2_8::angle#3 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [67] atan2_8::xi#1 = atan2_8::xi#3 + atan2_8::yd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [68] atan2_8::yi#1 = atan2_8::yi#3 - atan2_8::xd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::yi#1 atan2_8::xi#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::yi#1 atan2_8::xi#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [69] atan2_8::angle#2 = atan2_8::angle#12 + CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::yi#1 atan2_8::angle#2 atan2_8::xi#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::yi#1 atan2_8::angle#2 atan2_8::xi#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [3] *D018 = main::toD0181_return#0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [11] *main::screen#2 = main::angle#0 [ main::y#4 main::x#2 main::screen#2 ] (  [ main::y#4 main::x#2 main::screen#2 ] { }  ) always clobbers reg byte y 
Statement [21] *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 [23] 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 [24] 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 [30] 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 [32] 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 [33] 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 [34] 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 [37] 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 [41] if(atan2_8::y#0>0) goto atan2_8::@1 [ atan2_8::x#0 atan2_8::y#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [42] atan2_8::$2 = - atan2_8::y#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [44] if(atan2_8::x#0>0) goto atan2_8::@4 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [45] atan2_8::$7 = - atan2_8::x#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [50] atan2_8::angle#1 = atan2_8::angle#6 >> 1 [ atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [52] atan2_8::angle#4 = $80 - atan2_8::angle#1 [ atan2_8::y#0 atan2_8::angle#4 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::y#0 atan2_8::angle#4 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [55] atan2_8::angle#5 = - atan2_8::angle#11 [ atan2_8::angle#5 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::angle#5 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [58] atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [59] atan2_8::yd#0 = atan2_8::yi#3 >> atan2_8::i#2 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [60] if(atan2_8::yi#3>0) goto atan2_8::@13 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::yd#0 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [61] atan2_8::xi#2 = atan2_8::xi#3 - atan2_8::yd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#2 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#2 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [62] atan2_8::yi#2 = atan2_8::yi#3 + atan2_8::xd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::xi#2 atan2_8::yi#2 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::xi#2 atan2_8::yi#2 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [63] atan2_8::angle#3 = atan2_8::angle#12 - CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::xi#2 atan2_8::yi#2 atan2_8::angle#3 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::xi#2 atan2_8::yi#2 atan2_8::angle#3 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [67] atan2_8::xi#1 = atan2_8::xi#3 + atan2_8::yd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::i#2 atan2_8::angle#12 atan2_8::xd#0 atan2_8::xi#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [68] atan2_8::yi#1 = atan2_8::yi#3 - atan2_8::xd#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::yi#1 atan2_8::xi#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::angle#12 atan2_8::yi#1 atan2_8::xi#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Statement [69] atan2_8::angle#2 = atan2_8::angle#12 + CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] [ atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::yi#1 atan2_8::angle#2 atan2_8::xi#1 ] ( atan2_8:8 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::i#2 atan2_8::yi#1 atan2_8::angle#2 atan2_8::xi#1 ] { { atan2_8::x#0 = main::x#2 } { atan2_8::y#0 = main::y#4 } { atan2_8::return#0 = atan2_8::return#2 } }  ) always clobbers reg byte a 
Potential registers zp[1]:30 [ main::y#4 main::y#1 ] : zp[1]:30 , reg byte x , 
Potential registers zp[1]:24 [ main::x#2 main::x#1 ] : zp[1]:24 , reg byte x , 
Potential registers zp[2]:28 [ main::screen#2 main::screen#4 main::screen#1 ] : zp[2]:28 , 
Potential registers zp[2]:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp[2]:20 , 
Potential registers zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp[1]:25 , reg byte x , 
Potential registers zp[2]:16 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp[2]:16 , 
Potential registers zp[2]:18 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp[2]:18 , 
Potential registers zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp[1]:15 , reg byte x , 
Potential registers zp[1]:8 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp[1]:8 , reg byte x , reg byte y , 
Potential registers zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp[1]:11 , reg byte x , reg byte y , 
Potential registers zp[1]:3 [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ] : zp[1]:3 , reg byte x , reg byte y , 
Potential registers zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ] : zp[1]:4 , reg byte x , reg byte y , 
Potential registers zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ] : zp[1]:5 , reg byte x , reg byte y , 
Potential registers zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] : zp[1]:2 , reg byte x , reg byte y , 
Potential registers zp[1]:13 [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:26 [ atan2_8::x#0 ] : zp[1]:26 , reg byte x , reg byte y , 
Potential registers zp[1]:27 [ atan2_8::y#0 ] : zp[1]:27 , reg byte x , reg byte y , 
Potential registers zp[1]:22 [ atan2_8::return#2 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:23 [ main::angle#0 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:12 [ init_font_hex::$0 ] : zp[1]:12 , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ init_font_hex::$1 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:10 [ init_font_hex::$2 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:14 [ init_font_hex::idx#3 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ atan2_8::xd#0 ] : zp[1]:7 , reg byte x , reg byte y , 
Potential registers zp[1]:6 [ atan2_8::yd#0 ] : zp[1]:6 , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [atan2_8] 7,778,786.56: zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] 3,861,894.31: zp[1]:3 [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ] 3,140,543.67: zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ] 2,000,002: zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ] 1,500,001.5: zp[1]:6 [ atan2_8::yd#0 ] 600,000.6: zp[1]:7 [ atan2_8::xd#0 ] 8,208.5: zp[1]:13 [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ] 202: zp[1]:22 [ atan2_8::return#2 ] 157.88: zp[1]:26 [ atan2_8::x#0 ] 146.61: zp[1]:27 [ atan2_8::y#0 ] 
Uplift Scope [init_font_hex] 21,668.83: zp[1]:8 [ init_font_hex::i#2 init_font_hex::i#1 ] 20,002: zp[1]:9 [ init_font_hex::$1 ] 20,002: zp[1]:10 [ init_font_hex::$2 ] 11,501.6: zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 10,001: zp[1]:12 [ init_font_hex::$0 ] 2,002: zp[1]:14 [ init_font_hex::idx#3 ] 1,634.97: zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 1,631.57: zp[2]:16 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 1,423.81: zp[2]:18 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 634.17: zp[2]:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 162.13: zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Uplift Scope [main] 202: zp[1]:23 [ main::angle#0 ] 189.38: zp[1]:24 [ main::x#2 main::x#1 ] 109.46: zp[2]:28 [ main::screen#2 main::screen#4 main::screen#1 ] 27.68: zp[1]:30 [ main::y#4 main::y#1 ] 
Uplift Scope [MOS6526_CIA] 
Uplift Scope [MOS6569_VICII] 
Uplift Scope [MOS6581_SID] 
Uplift Scope [] 

Uplifting [atan2_8] best 276261 combination zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] reg byte x [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ] zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ] zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ] zp[1]:6 [ atan2_8::yd#0 ] zp[1]:7 [ atan2_8::xd#0 ] zp[1]:13 [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ] zp[1]:22 [ atan2_8::return#2 ] zp[1]:26 [ atan2_8::x#0 ] zp[1]:27 [ atan2_8::y#0 ] 
Limited combination testing to 100 combinations of 104976 possible.
Uplifting [init_font_hex] best 257261 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]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp[1]:12 [ init_font_hex::$0 ] zp[1]:14 [ init_font_hex::idx#3 ] zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp[2]:16 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp[2]:18 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp[2]:20 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [main] best 256661 combination reg byte a [ main::angle#0 ] zp[1]:24 [ main::x#2 main::x#1 ] zp[2]:28 [ main::screen#2 main::screen#4 main::screen#1 ] zp[1]:30 [ main::y#4 main::y#1 ] 
Uplifting [MOS6526_CIA] best 256661 combination 
Uplifting [MOS6569_VICII] best 256661 combination 
Uplifting [MOS6581_SID] best 256661 combination 
Uplifting [] best 256661 combination 
Attempting to uplift remaining variables inzp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Uplifting [atan2_8] best 256661 combination zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] 
Attempting to uplift remaining variables inzp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ]
Uplifting [atan2_8] best 256661 combination zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ] 
Attempting to uplift remaining variables inzp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ]
Uplifting [atan2_8] best 256661 combination zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ] 
Attempting to uplift remaining variables inzp[1]:6 [ atan2_8::yd#0 ]
Uplifting [atan2_8] best 255661 combination reg byte y [ atan2_8::yd#0 ] 
Attempting to uplift remaining variables inzp[1]:7 [ atan2_8::xd#0 ]
Uplifting [atan2_8] best 255661 combination zp[1]:7 [ atan2_8::xd#0 ] 
Attempting to uplift remaining variables inzp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 255661 combination zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 
Attempting to uplift remaining variables inzp[1]:12 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 255661 combination zp[1]:12 [ init_font_hex::$0 ] 
Attempting to uplift remaining variables inzp[1]:13 [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ]
Uplifting [atan2_8] best 255354 combination reg byte x [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ] 
Attempting to uplift remaining variables inzp[1]:14 [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 254754 combination reg byte y [ init_font_hex::idx#3 ] 
Attempting to uplift remaining variables inzp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 254754 combination zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 
Attempting to uplift remaining variables inzp[1]:22 [ atan2_8::return#2 ]
Uplifting [atan2_8] best 254354 combination reg byte a [ atan2_8::return#2 ] 
Attempting to uplift remaining variables inzp[1]:24 [ main::x#2 main::x#1 ]
Uplifting [main] best 254354 combination zp[1]:24 [ main::x#2 main::x#1 ] 
Attempting to uplift remaining variables inzp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 254354 combination zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Attempting to uplift remaining variables inzp[1]:26 [ atan2_8::x#0 ]
Uplifting [atan2_8] best 254354 combination zp[1]:26 [ atan2_8::x#0 ] 
Attempting to uplift remaining variables inzp[1]:27 [ atan2_8::y#0 ]
Uplifting [atan2_8] best 254354 combination zp[1]:27 [ atan2_8::y#0 ] 
Attempting to uplift remaining variables inzp[1]:30 [ main::y#4 main::y#1 ]
Uplifting [main] best 254354 combination zp[1]:30 [ main::y#4 main::y#1 ] 
Coalescing zero page register [ zp[1]:30 [ main::y#4 main::y#1 ] ] with [ zp[1]:27 [ atan2_8::y#0 ] ] - score: 1
Coalescing zero page register [ zp[1]:24 [ main::x#2 main::x#1 ] ] with [ zp[1]:26 [ atan2_8::x#0 ] ] - score: 1
Coalescing zero page register [ zp[1]:4 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 ] ] with [ zp[1]:25 [ init_font_hex::c#6 init_font_hex::c#1 ] ]
Coalescing zero page register [ zp[1]:5 [ atan2_8::i#2 atan2_8::i#1 ] ] with [ zp[1]:15 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ]
Coalescing zero page register [ zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] ] with [ zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] ]
Coalescing zero page register [ zp[1]:7 [ atan2_8::xd#0 ] ] with [ zp[1]:12 [ init_font_hex::$0 ] ]
Allocated (was zp[1]:4) zp[1]:3 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 init_font_hex::c#6 init_font_hex::c#1 ]
Allocated (was zp[1]:5) zp[1]:4 [ atan2_8::i#2 atan2_8::i#1 init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated (was zp[1]:7) zp[1]:5 [ atan2_8::xd#0 init_font_hex::$0 ]
Allocated (was zp[2]:16) zp[2]:6 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated (was zp[2]:18) zp[2]:8 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated (was zp[2]:20) zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated (was zp[1]:24) zp[1]:12 [ main::x#2 main::x#1 atan2_8::x#0 ]
Allocated (was zp[1]:30) zp[1]:13 [ main::y#4 main::y#1 atan2_8::y#0 ]
Allocated (was zp[2]:28) zp[2]:14 [ main::screen#2 main::screen#4 main::screen#1 ]

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.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 8-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_8 = 8
  /// $D018 VIC-II base addresses
  // @see #VICII_MEMORY
  .label D018 = $d018
  /// Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
.segment Code
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label col00 = COLS+$c*$28+$13
    .label screen = $e
    .label x = $c
    .label y = $d
    // [1] call init_font_hex
    // [18] 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 __b5
    // main::@5
  __b5:
    // [3] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [4] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  __b1_from___b5:
    // [4] phi main::screen#4 = SCREEN [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [4] phi main::y#4 = -$c [phi:main::@5->main::@1#1] -- 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#4 = main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [4] phi main::y#4 = main::y#1 [phi:main::@3->main::@1#1] -- 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#4 [phi:main::@1->main::@2#0] -- register_copy 
    // [5] phi main::x#2 = -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    jmp __b2
    // [5] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
  __b2_from___b6:
    // [5] phi main::screen#2 = main::screen#1 [phi:main::@6->main::@2#0] -- register_copy 
    // [5] phi main::x#2 = main::x#1 [phi:main::@6->main::@2#1] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [6] atan2_8::x#0 = main::x#2
    // [7] atan2_8::y#0 = main::y#4
    // [8] call atan2_8
    jsr atan2_8
    // [9] atan2_8::return#2 = atan2_8::return#0 -- vbuaa=vbuxx 
    txa
    jmp __b6
    // main::@6
  __b6:
    // [10] main::angle#0 = atan2_8::return#2
    // [11] *main::screen#2 = main::angle#0 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (screen),y
    // [12] main::screen#1 = ++ main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [13] main::x#1 = ++ main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [14] if(main::x#1!=$15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp.z x
    bne __b2_from___b6
    jmp __b3
    // main::@3
  __b3:
    // [15] main::y#1 = ++ main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [16] 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:
    // [17] *main::col00 = ++ *main::col00 -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b4
}
  // init_font_hex
// Make charset from proto chars
// void init_font_hex(__zp(6) char *charset)
init_font_hex: {
    .label __0 = 5
    .label idx = 2
    .label proto_lo = 8
    .label charset = 6
    .label c1 = 4
    .label proto_hi = $a
    .label c = 3
    // [19] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
  __b1_from_init_font_hex:
    // [19] phi init_font_hex::c#6 = 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [19] 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
    // [19] 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
    // [19] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
  __b1_from___b5:
    // [19] phi init_font_hex::c#6 = init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [19] 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 
    // [19] 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:
    // [20] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
  __b2_from___b1:
    // [20] phi init_font_hex::c1#4 = 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [20] 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
    // [20] 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
    // [20] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
  __b2_from___b4:
    // [20] phi init_font_hex::c1#4 = init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [20] 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 
    // [20] 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:
    // [21] *init_font_hex::charset#2 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (charset),y
    // [22] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
  __b3_from___b2:
    // [22] phi init_font_hex::idx#5 = 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [22] phi init_font_hex::i#2 = 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp __b3
    // [22] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
  __b3_from___b3:
    // [22] phi init_font_hex::idx#5 = init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [22] 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:
    // [23] 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
    // [24] 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
    // [25] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __0
    // [26] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z idx
    sta (charset),y
    // [27] init_font_hex::idx#2 = ++ init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // [28] init_font_hex::i#1 = ++ init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [29] 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:
    // [30] init_font_hex::charset#2[init_font_hex::idx#2] = 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx
    sta (charset),y
    // [31] init_font_hex::idx#3 = ++ init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    ldy.z idx
    iny
    // [32] init_font_hex::charset#2[init_font_hex::idx#3] = 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    lda #0
    sta (charset),y
    // [33] 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
  !:
    // [34] 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
  !:
    // [35] init_font_hex::c1#1 = ++ init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [36] 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:
    // [37] 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
  !:
    // [38] init_font_hex::c#1 = ++ init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [39] 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:
    // [40] return 
    rts
}
  // atan2_8
// 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_8
// Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI)
// __register(A) char atan2_8(__zp($c) signed char x, __zp($d) signed char y)
atan2_8: {
    .label __7 = 3
    .label xi = 3
    .label xd = 5
    .label angle = 2
    .label i = 4
    .label x = $c
    .label y = $d
    // [41] if(atan2_8::y#0>0) goto atan2_8::@1 -- vbsz1_gt_0_then_la1 
    lda.z y
    cmp #0
    beq !+
    bpl __b1
  !:
    jmp __b2
    // atan2_8::@2
  __b2:
    // [42] atan2_8::$2 = - atan2_8::y#0 -- vbsxx=_neg_vbsz1 
    lda.z y
    eor #$ff
    clc
    adc #1
    tax
    // [43] phi from atan2_8::@1 atan2_8::@2 to atan2_8::@3 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3]
  __b3_from___b1:
  __b3_from___b2:
    // [43] phi atan2_8::yi#0 = atan2_8::yi#11 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3#0] -- register_copy 
    jmp __b3
    // atan2_8::@3
  __b3:
    // [44] if(atan2_8::x#0>0) goto atan2_8::@4 -- vbsz1_gt_0_then_la1 
    lda.z x
    cmp #0
    beq !+
    bpl __b4
  !:
    jmp __b5
    // atan2_8::@5
  __b5:
    // [45] atan2_8::$7 = - atan2_8::x#0 -- vbsz1=_neg_vbsz2 
    lda.z x
    eor #$ff
    clc
    adc #1
    sta.z __7
    // [46] phi from atan2_8::@4 atan2_8::@5 to atan2_8::@6 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6]
  __b6_from___b4:
  __b6_from___b5:
    // [46] phi atan2_8::xi#0 = atan2_8::xi#8 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6#0] -- register_copy 
    jmp __b6
    // atan2_8::@6
  __b6:
    // [47] phi from atan2_8::@6 to atan2_8::@10 [phi:atan2_8::@6->atan2_8::@10]
  __b10_from___b6:
    // [47] phi atan2_8::angle#12 = 0 [phi:atan2_8::@6->atan2_8::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta.z angle
    // [47] phi atan2_8::i#2 = 0 [phi:atan2_8::@6->atan2_8::@10#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [47] phi atan2_8::xi#3 = atan2_8::xi#0 [phi:atan2_8::@6->atan2_8::@10#2] -- register_copy 
    // [47] phi atan2_8::yi#3 = atan2_8::yi#0 [phi:atan2_8::@6->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@10
  __b10:
    // [48] if(atan2_8::yi#3!=0) goto atan2_8::@11 -- vbsxx_neq_0_then_la1 
    cpx #0
    bne __b11
    // [49] phi from atan2_8::@10 atan2_8::@14 to atan2_8::@12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12]
  __b12_from___b10:
  __b12_from___b14:
    // [49] phi atan2_8::angle#6 = atan2_8::angle#12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12#0] -- register_copy 
    jmp __b12
    // atan2_8::@12
  __b12:
    // [50] atan2_8::angle#1 = atan2_8::angle#6 >> 1 -- vbuxx=vbuz1_ror_1 
    lda.z angle
    lsr
    tax
    // [51] if(atan2_8::x#0>=0) goto atan2_8::@7 -- vbsz1_ge_0_then_la1 
    lda.z x
    cmp #0
    bpl __b7_from___b12
    jmp __b16
    // atan2_8::@16
  __b16:
    // [52] atan2_8::angle#4 = $80 - atan2_8::angle#1 -- vbuxx=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    tax
    axs #-$80-1
    // [53] phi from atan2_8::@12 atan2_8::@16 to atan2_8::@7 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7]
  __b7_from___b12:
  __b7_from___b16:
    // [53] phi atan2_8::angle#11 = atan2_8::angle#1 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7#0] -- register_copy 
    jmp __b7
    // atan2_8::@7
  __b7:
    // [54] if(atan2_8::y#0>=0) goto atan2_8::@8 -- vbsz1_ge_0_then_la1 
    lda.z y
    cmp #0
    bpl __b8_from___b7
    jmp __b9
    // atan2_8::@9
  __b9:
    // [55] atan2_8::angle#5 = - atan2_8::angle#11 -- vbuxx=_neg_vbuxx 
    dex
    txa
    eor #$ff
    tax
    // [56] phi from atan2_8::@7 atan2_8::@9 to atan2_8::@8 [phi:atan2_8::@7/atan2_8::@9->atan2_8::@8]
  __b8_from___b7:
  __b8_from___b9:
    // [56] phi atan2_8::return#0 = atan2_8::angle#11 [phi:atan2_8::@7/atan2_8::@9->atan2_8::@8#0] -- register_copy 
    jmp __b8
    // atan2_8::@8
  __b8:
    jmp __breturn
    // atan2_8::@return
  __breturn:
    // [57] return 
    rts
    // atan2_8::@11
  __b11:
    // [58] atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2 -- vbsz1=vbsz2_ror_vbuz3 
    lda.z xi
    ldy.z i
    cpy #0
    beq !e+
  !l:
    cmp #$80
    ror
    dey
    bne !l-
  !e:
    sta.z xd
    // [59] atan2_8::yd#0 = atan2_8::yi#3 >> atan2_8::i#2 -- vbsyy=vbsxx_ror_vbuz1 
    ldy.z i
    txa
    cpy #0
    beq !e+
  !l:
    cmp #$80
    ror
    dey
    bne !l-
  !e:
    tay
    // [60] if(atan2_8::yi#3>0) goto atan2_8::@13 -- vbsxx_gt_0_then_la1 
    txa
    cmp #0
    beq !+
    bpl __b13
  !:
    jmp __b15
    // atan2_8::@15
  __b15:
    // [61] atan2_8::xi#2 = atan2_8::xi#3 - atan2_8::yd#0 -- vbsz1=vbsz1_minus_vbsyy 
    tya
    eor #$ff
    sec
    adc.z xi
    sta.z xi
    // [62] atan2_8::yi#2 = atan2_8::yi#3 + atan2_8::xd#0 -- vbsxx=vbsxx_plus_vbsz1 
    txa
    clc
    adc.z xd
    tax
    // [63] atan2_8::angle#3 = atan2_8::angle#12 - CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] -- vbuz1=vbuz1_minus_pbuc1_derefidx_vbuz2 
    lda.z angle
    ldy.z i
    sec
    sbc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle
    // [64] phi from atan2_8::@13 atan2_8::@15 to atan2_8::@14 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14]
  __b14_from___b13:
  __b14_from___b15:
    // [64] phi atan2_8::xi#7 = atan2_8::xi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#0] -- register_copy 
    // [64] phi atan2_8::angle#13 = atan2_8::angle#2 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#1] -- register_copy 
    // [64] phi atan2_8::yi#7 = atan2_8::yi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#2] -- register_copy 
    jmp __b14
    // atan2_8::@14
  __b14:
    // [65] atan2_8::i#1 = ++ atan2_8::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [66] if(atan2_8::i#1==CORDIC_ITERATIONS_8-1+1) goto atan2_8::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #CORDIC_ITERATIONS_8-1+1
    cmp.z i
    beq __b12_from___b14
    // [47] phi from atan2_8::@14 to atan2_8::@10 [phi:atan2_8::@14->atan2_8::@10]
  __b10_from___b14:
    // [47] phi atan2_8::angle#12 = atan2_8::angle#13 [phi:atan2_8::@14->atan2_8::@10#0] -- register_copy 
    // [47] phi atan2_8::i#2 = atan2_8::i#1 [phi:atan2_8::@14->atan2_8::@10#1] -- register_copy 
    // [47] phi atan2_8::xi#3 = atan2_8::xi#7 [phi:atan2_8::@14->atan2_8::@10#2] -- register_copy 
    // [47] phi atan2_8::yi#3 = atan2_8::yi#7 [phi:atan2_8::@14->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@13
  __b13:
    // [67] atan2_8::xi#1 = atan2_8::xi#3 + atan2_8::yd#0 -- vbsz1=vbsz1_plus_vbsyy 
    tya
    clc
    adc.z xi
    sta.z xi
    // [68] atan2_8::yi#1 = atan2_8::yi#3 - atan2_8::xd#0 -- vbsxx=vbsxx_minus_vbsz1 
    txa
    sec
    sbc.z xd
    tax
    // [69] atan2_8::angle#2 = atan2_8::angle#12 + CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] -- vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 
    lda.z angle
    ldy.z i
    clc
    adc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle
    jmp __b14_from___b13
    // atan2_8::@4
  __b4:
    // [70] atan2_8::xi#8 = atan2_8::x#0 -- vbsz1=vbsz2 
    lda.z x
    sta.z xi
    jmp __b6_from___b4
    // atan2_8::@1
  __b1:
    // [71] atan2_8::yi#11 = atan2_8::y#0 -- vbsxx=vbsz1 
    ldx.z y
    jmp __b3_from___b1
}
  // 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_8:
.fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp toD0181
Removing instruction jmp __b5
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b6
Removing instruction jmp __b3
Removing instruction jmp __b4
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 __b16
Removing instruction jmp __b7
Removing instruction jmp __b9
Removing instruction jmp __b8
Removing instruction jmp __breturn
Removing instruction jmp __b15
Removing instruction jmp __b14
Succesful ASM optimization Pass5NextJumpElimination
Replacing instruction ldy #0 with TAY
Removing instruction ldy.z idx
Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __b2_from___b6 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 __b12_from___b14 with __b12
Replacing label __b14_from___b13 with __b14
Replacing label __b6_from___b4 with __b6
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___b6:
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___b14:
Removing instruction __b7_from___b12:
Removing instruction __b7_from___b16:
Removing instruction __b8_from___b7:
Removing instruction __b8_from___b9:
Removing instruction __breturn:
Removing instruction __b14_from___b13:
Removing instruction __b14_from___b15:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction init_font_hex_from_main:
Removing instruction __b5:
Removing instruction __b1_from___b5:
Removing instruction __b6:
Removing instruction __b3:
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 __b16:
Removing instruction __b9:
Removing instruction __b15:
Removing instruction __b10_from___b14:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Succesful ASM optimization Pass5NextJumpElimination
Fixing long branch [164] bpl __b1 to bmi
Fixing long branch [177] bpl __b4 to bmi

FINAL SYMBOL TABLE
__constant char * const CHARSET = (char *) 8192
__constant char * const COLS = (char *) 55296
__constant char CORDIC_ATAN2_ANGLES_8[CORDIC_ITERATIONS_8] = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
__constant const char CORDIC_ITERATIONS_8 = 8
__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 * const SCREEN = (char *) 10240
char atan2_8(signed char x , signed char y)
signed char atan2_8::$2 // reg byte x 2002.0
signed char atan2_8::$7 // zp[1]:3 2002.0
char atan2_8::angle
char atan2_8::angle#1 // reg byte x 1501.5
char atan2_8::angle#11 // reg byte x 2002.0
char atan2_8::angle#12 // angle zp[1]:2 444444.8888888889
char atan2_8::angle#13 // angle zp[1]:2 1333334.6666666667
char atan2_8::angle#2 // angle zp[1]:2 2000002.0
char atan2_8::angle#3 // angle zp[1]:2 2000002.0
char atan2_8::angle#4 // reg byte x 2002.0
char atan2_8::angle#5 // reg byte x 2002.0
char atan2_8::angle#6 // angle zp[1]:2 2001003.0
char atan2_8::i
char atan2_8::i#1 // i zp[1]:4 1500001.5
char atan2_8::i#2 // i zp[1]:4 500000.50000000006
char atan2_8::return
char atan2_8::return#0 // reg byte x 701.0
char atan2_8::return#2 // reg byte a 202.0
signed char atan2_8::x
signed char atan2_8::x#0 // x zp[1]:12 157.8846153846154
signed char atan2_8::xd
signed char atan2_8::xd#0 // xd zp[1]:5 600000.6000000001
signed char atan2_8::xi
signed char atan2_8::xi#0 // xi zp[1]:3 3003.0
signed char atan2_8::xi#1 // xi zp[1]:3 666667.3333333334
signed char atan2_8::xi#2 // xi zp[1]:3 666667.3333333334
signed char atan2_8::xi#3 // xi zp[1]:3 800201.0
signed char atan2_8::xi#7 // xi zp[1]:3 1000001.0
signed char atan2_8::xi#8 // xi zp[1]:3 2002.0
signed char atan2_8::y
signed char atan2_8::y#0 // y zp[1]:13 146.60714285714286
signed char atan2_8::yd
signed char atan2_8::yd#0 // reg byte y 1500001.5
signed char atan2_8::yi
signed char atan2_8::yi#0 // reg byte x 600.5999999999999
signed char atan2_8::yi#1 // reg byte x 1000001.0
signed char atan2_8::yi#11 // reg byte x 2002.0
signed char atan2_8::yi#2 // reg byte x 1000001.0
signed char atan2_8::yi#3 // reg byte x 857286.7142857142
signed char atan2_8::yi#7 // reg byte x 1000001.0
void init_font_hex(char *charset)
char init_font_hex::$0 // zp[1]:5 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]:3 151.5
char init_font_hex::c#6 // c zp[1]:3 10.631578947368421
char init_font_hex::c1
char init_font_hex::c1#1 // c1 zp[1]:4 1501.5
char init_font_hex::c1#4 // c1 zp[1]:4 133.46666666666667
char *init_font_hex::charset
char *init_font_hex::charset#0 // charset zp[2]:6 350.5
char *init_font_hex::charset#2 // charset zp[2]:6 1079.0714285714287
char *init_font_hex::charset#5 // charset zp[2]:6 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]:2 5501.0
char init_font_hex::idx#3 // reg byte y 2002.0
char init_font_hex::idx#5 // idx zp[1]:2 6000.6
char *init_font_hex::proto_hi
char *init_font_hex::proto_hi#1 // proto_hi zp[2]:10 67.33333333333333
char *init_font_hex::proto_hi#6 // proto_hi zp[2]:10 566.8333333333333
char *init_font_hex::proto_lo
char *init_font_hex::proto_lo#1 // proto_lo zp[2]:8 500.5
char *init_font_hex::proto_lo#4 // proto_lo zp[2]:8 923.3076923076923
void main()
char main::angle
char main::angle#0 // reg byte a 202.0
__constant char *main::col00 = COLS+(unsigned int)$c*$28+$13
char *main::screen
char *main::screen#1 // screen zp[2]:14 42.599999999999994
char *main::screen#2 // screen zp[2]:14 44.85714285714286
char *main::screen#4 // screen zp[2]:14 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]:12 151.5
signed char main::x#2 // x zp[1]:12 37.875
signed char main::y
signed char main::y#1 // y zp[1]:13 16.5
signed char main::y#4 // y zp[1]:13 11.181818181818182

zp[1]:13 [ main::y#4 main::y#1 atan2_8::y#0 ]
zp[1]:12 [ main::x#2 main::x#1 atan2_8::x#0 ]
zp[2]:14 [ main::screen#2 main::screen#4 main::screen#1 ]
zp[2]:10 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
zp[2]:6 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
zp[2]:8 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
reg byte x [ atan2_8::yi#3 atan2_8::yi#7 atan2_8::yi#0 atan2_8::yi#11 atan2_8::$2 atan2_8::yi#1 atan2_8::yi#2 ]
zp[1]:3 [ atan2_8::xi#3 atan2_8::xi#7 atan2_8::xi#0 atan2_8::xi#8 atan2_8::$7 atan2_8::xi#1 atan2_8::xi#2 init_font_hex::c#6 init_font_hex::c#1 ]
zp[1]:4 [ atan2_8::i#2 atan2_8::i#1 init_font_hex::c1#4 init_font_hex::c1#1 ]
zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 init_font_hex::idx#5 init_font_hex::idx#2 ]
reg byte x [ atan2_8::return#0 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 atan2_8::angle#5 ]
reg byte a [ atan2_8::return#2 ]
reg byte a [ main::angle#0 ]
reg byte a [ init_font_hex::$1 ]
reg byte a [ init_font_hex::$2 ]
reg byte y [ init_font_hex::idx#3 ]
zp[1]:5 [ atan2_8::xd#0 init_font_hex::$0 ]
reg byte y [ atan2_8::yd#0 ]


FINAL ASSEMBLER
Score: 230290

  // 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.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 8-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_8 = 8
  /// $D018 VIC-II base addresses
  // @see #VICII_MEMORY
  .label D018 = $d018
  /// Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
.segment Code
  // main
main: {
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label col00 = COLS+$c*$28+$13
    .label screen = $e
    .label x = $c
    .label y = $d
    // init_font_hex(CHARSET)
    // [1] call init_font_hex
    // [18] 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::@5
    // *D018 = toD018(SCREEN, CHARSET)
    // [3] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [4] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
    // [4] phi main::screen#4 = SCREEN [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [4] phi main::y#4 = -$c [phi:main::@5->main::@1#1] -- vbsz1=vbsc1 
    lda #-$c
    sta.z y
    // [4] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [4] phi main::screen#4 = main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [4] phi main::y#4 = main::y#1 [phi:main::@3->main::@1#1] -- 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#4 [phi:main::@1->main::@2#0] -- register_copy 
    // [5] phi main::x#2 = -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    // [5] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
    // [5] phi main::screen#2 = main::screen#1 [phi:main::@6->main::@2#0] -- register_copy 
    // [5] phi main::x#2 = main::x#1 [phi:main::@6->main::@2#1] -- register_copy 
    // main::@2
  __b2:
    // byte angle = atan2_8(x, y)
    // [6] atan2_8::x#0 = main::x#2
    // [7] atan2_8::y#0 = main::y#4
    // [8] call atan2_8
    jsr atan2_8
    // [9] atan2_8::return#2 = atan2_8::return#0 -- vbuaa=vbuxx 
    txa
    // main::@6
    // [10] main::angle#0 = atan2_8::return#2
    // *screen++ = angle
    // [11] *main::screen#2 = main::angle#0 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (screen),y
    // *screen++ = angle;
    // [12] main::screen#1 = ++ main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // for(signed byte x: -19..20)
    // [13] main::x#1 = ++ main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [14] 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)
    // [15] main::y#1 = ++ main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [16] if(main::y#1!=$d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp.z y
    bne __b1
    // main::@4
  __b4:
    // (*col00)++;
    // [17] *main::col00 = ++ *main::col00 -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b4
}
  // init_font_hex
// Make charset from proto chars
// void init_font_hex(__zp(6) char *charset)
init_font_hex: {
    .label __0 = 5
    .label idx = 2
    .label proto_lo = 8
    .label charset = 6
    .label c1 = 4
    .label proto_hi = $a
    .label c = 3
    // [19] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
    // [19] phi init_font_hex::c#6 = 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [19] 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
    // [19] 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
    // [19] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
    // [19] phi init_font_hex::c#6 = init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [19] 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 
    // [19] 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:
    // [20] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
    // [20] phi init_font_hex::c1#4 = 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [20] 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
    // [20] phi init_font_hex::charset#2 = init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy 
    // [20] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
    // [20] phi init_font_hex::c1#4 = init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [20] 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 
    // [20] 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
    // [21] *init_font_hex::charset#2 = 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (charset),y
    // [22] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
    // [22] phi init_font_hex::idx#5 = 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [22] phi init_font_hex::i#2 = 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    // [22] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
    // [22] phi init_font_hex::idx#5 = init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [22] 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
    // [23] 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
    // [24] 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
    // [25] 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
    // [26] 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;
    // [27] init_font_hex::idx#2 = ++ init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // for( byte i: 0..4)
    // [28] init_font_hex::i#1 = ++ init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [29] 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
    // [30] 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;
    // [31] init_font_hex::idx#3 = ++ init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    iny
    // charset[idx++] = 0
    // [32] init_font_hex::charset#2[init_font_hex::idx#3] = 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    sta (charset),y
    // proto_lo += 5
    // [33] 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
    // [34] 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 )
    // [35] init_font_hex::c1#1 = ++ init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [36] 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
    // [37] 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 )
    // [38] init_font_hex::c#1 = ++ init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [39] 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
    // }
    // [40] return 
    rts
}
  // atan2_8
// 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_8
// Returns the angle in hex-degrees (0=0, 0x80=PI, 0x100=2*PI)
// __register(A) char atan2_8(__zp($c) signed char x, __zp($d) signed char y)
atan2_8: {
    .label __7 = 3
    .label xi = 3
    .label xd = 5
    .label angle = 2
    .label i = 4
    .label x = $c
    .label y = $d
    // (y>0)?y:-y
    // [41] if(atan2_8::y#0>0) goto atan2_8::@1 -- vbsz1_gt_0_then_la1 
    lda.z y
    cmp #0
    beq !+
    bmi !__b1+
    jmp __b1
  !__b1:
  !:
    // atan2_8::@2
    // [42] atan2_8::$2 = - atan2_8::y#0 -- vbsxx=_neg_vbsz1 
    lda.z y
    eor #$ff
    clc
    adc #1
    tax
    // [43] phi from atan2_8::@1 atan2_8::@2 to atan2_8::@3 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3]
    // [43] phi atan2_8::yi#0 = atan2_8::yi#11 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3#0] -- register_copy 
    // atan2_8::@3
  __b3:
    // (x>0)?x:-x
    // [44] if(atan2_8::x#0>0) goto atan2_8::@4 -- vbsz1_gt_0_then_la1 
    lda.z x
    cmp #0
    beq !+
    bmi !__b4+
    jmp __b4
  !__b4:
  !:
    // atan2_8::@5
    // [45] atan2_8::$7 = - atan2_8::x#0 -- vbsz1=_neg_vbsz2 
    lda.z x
    eor #$ff
    clc
    adc #1
    sta.z __7
    // [46] phi from atan2_8::@4 atan2_8::@5 to atan2_8::@6 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6]
    // [46] phi atan2_8::xi#0 = atan2_8::xi#8 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6#0] -- register_copy 
    // atan2_8::@6
  __b6:
    // [47] phi from atan2_8::@6 to atan2_8::@10 [phi:atan2_8::@6->atan2_8::@10]
    // [47] phi atan2_8::angle#12 = 0 [phi:atan2_8::@6->atan2_8::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta.z angle
    // [47] phi atan2_8::i#2 = 0 [phi:atan2_8::@6->atan2_8::@10#1] -- vbuz1=vbuc1 
    sta.z i
    // [47] phi atan2_8::xi#3 = atan2_8::xi#0 [phi:atan2_8::@6->atan2_8::@10#2] -- register_copy 
    // [47] phi atan2_8::yi#3 = atan2_8::yi#0 [phi:atan2_8::@6->atan2_8::@10#3] -- register_copy 
    // atan2_8::@10
  __b10:
    // if(yi==0)
    // [48] if(atan2_8::yi#3!=0) goto atan2_8::@11 -- vbsxx_neq_0_then_la1 
    cpx #0
    bne __b11
    // [49] phi from atan2_8::@10 atan2_8::@14 to atan2_8::@12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12]
    // [49] phi atan2_8::angle#6 = atan2_8::angle#12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12#0] -- register_copy 
    // atan2_8::@12
  __b12:
    // angle = angle/2
    // [50] atan2_8::angle#1 = atan2_8::angle#6 >> 1 -- vbuxx=vbuz1_ror_1 
    lda.z angle
    lsr
    tax
    // if(x<0)
    // [51] if(atan2_8::x#0>=0) goto atan2_8::@7 -- vbsz1_ge_0_then_la1 
    lda.z x
    cmp #0
    bpl __b7
    // atan2_8::@16
    // angle = 128-angle
    // [52] atan2_8::angle#4 = $80 - atan2_8::angle#1 -- vbuxx=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    tax
    axs #-$80-1
    // [53] phi from atan2_8::@12 atan2_8::@16 to atan2_8::@7 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7]
    // [53] phi atan2_8::angle#11 = atan2_8::angle#1 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7#0] -- register_copy 
    // atan2_8::@7
  __b7:
    // if(y<0)
    // [54] if(atan2_8::y#0>=0) goto atan2_8::@8 -- vbsz1_ge_0_then_la1 
    lda.z y
    cmp #0
    bpl __b8
    // atan2_8::@9
    // angle = -angle
    // [55] atan2_8::angle#5 = - atan2_8::angle#11 -- vbuxx=_neg_vbuxx 
    dex
    txa
    eor #$ff
    tax
    // [56] phi from atan2_8::@7 atan2_8::@9 to atan2_8::@8 [phi:atan2_8::@7/atan2_8::@9->atan2_8::@8]
    // [56] phi atan2_8::return#0 = atan2_8::angle#11 [phi:atan2_8::@7/atan2_8::@9->atan2_8::@8#0] -- register_copy 
    // atan2_8::@8
  __b8:
    // atan2_8::@return
    // }
    // [57] return 
    rts
    // atan2_8::@11
  __b11:
    // signed char xd = xi>>i
    // [58] atan2_8::xd#0 = atan2_8::xi#3 >> atan2_8::i#2 -- vbsz1=vbsz2_ror_vbuz3 
    lda.z xi
    ldy.z i
    cpy #0
    beq !e+
  !l:
    cmp #$80
    ror
    dey
    bne !l-
  !e:
    sta.z xd
    // signed char yd = yi>>i
    // [59] atan2_8::yd#0 = atan2_8::yi#3 >> atan2_8::i#2 -- vbsyy=vbsxx_ror_vbuz1 
    ldy.z i
    txa
    cpy #0
    beq !e+
  !l:
    cmp #$80
    ror
    dey
    bne !l-
  !e:
    tay
    // if(yi>0)
    // [60] if(atan2_8::yi#3>0) goto atan2_8::@13 -- vbsxx_gt_0_then_la1 
    txa
    cmp #0
    beq !+
    bpl __b13
  !:
    // atan2_8::@15
    // xi -= yd
    // [61] atan2_8::xi#2 = atan2_8::xi#3 - atan2_8::yd#0 -- vbsz1=vbsz1_minus_vbsyy 
    tya
    eor #$ff
    sec
    adc.z xi
    sta.z xi
    // yi += xd
    // [62] atan2_8::yi#2 = atan2_8::yi#3 + atan2_8::xd#0 -- vbsxx=vbsxx_plus_vbsz1 
    txa
    clc
    adc.z xd
    tax
    // angle -= CORDIC_ATAN2_ANGLES_8[i]
    // [63] atan2_8::angle#3 = atan2_8::angle#12 - CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] -- vbuz1=vbuz1_minus_pbuc1_derefidx_vbuz2 
    lda.z angle
    ldy.z i
    sec
    sbc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle
    // [64] phi from atan2_8::@13 atan2_8::@15 to atan2_8::@14 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14]
    // [64] phi atan2_8::xi#7 = atan2_8::xi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#0] -- register_copy 
    // [64] phi atan2_8::angle#13 = atan2_8::angle#2 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#1] -- register_copy 
    // [64] phi atan2_8::yi#7 = atan2_8::yi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#2] -- register_copy 
    // atan2_8::@14
  __b14:
    // for( char i: 0..CORDIC_ITERATIONS_8-1)
    // [65] atan2_8::i#1 = ++ atan2_8::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [66] if(atan2_8::i#1==CORDIC_ITERATIONS_8-1+1) goto atan2_8::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #CORDIC_ITERATIONS_8-1+1
    cmp.z i
    beq __b12
    // [47] phi from atan2_8::@14 to atan2_8::@10 [phi:atan2_8::@14->atan2_8::@10]
    // [47] phi atan2_8::angle#12 = atan2_8::angle#13 [phi:atan2_8::@14->atan2_8::@10#0] -- register_copy 
    // [47] phi atan2_8::i#2 = atan2_8::i#1 [phi:atan2_8::@14->atan2_8::@10#1] -- register_copy 
    // [47] phi atan2_8::xi#3 = atan2_8::xi#7 [phi:atan2_8::@14->atan2_8::@10#2] -- register_copy 
    // [47] phi atan2_8::yi#3 = atan2_8::yi#7 [phi:atan2_8::@14->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@13
  __b13:
    // xi += yd
    // [67] atan2_8::xi#1 = atan2_8::xi#3 + atan2_8::yd#0 -- vbsz1=vbsz1_plus_vbsyy 
    tya
    clc
    adc.z xi
    sta.z xi
    // yi -= xd
    // [68] atan2_8::yi#1 = atan2_8::yi#3 - atan2_8::xd#0 -- vbsxx=vbsxx_minus_vbsz1 
    txa
    sec
    sbc.z xd
    tax
    // angle += CORDIC_ATAN2_ANGLES_8[i]
    // [69] atan2_8::angle#2 = atan2_8::angle#12 + CORDIC_ATAN2_ANGLES_8[atan2_8::i#2] -- vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 
    lda.z angle
    ldy.z i
    clc
    adc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle
    jmp __b14
    // atan2_8::@4
  __b4:
    // (x>0)?x:-x
    // [70] atan2_8::xi#8 = atan2_8::x#0 -- vbsz1=vbsz2 
    lda.z x
    sta.z xi
    jmp __b6
    // atan2_8::@1
  __b1:
    // (y>0)?y:-y
    // [71] atan2_8::yi#11 = atan2_8::y#0 -- vbsxx=vbsz1 
    ldx.z y
    jmp __b3
}
  // 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_8:
.fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2


