Resolved forward reference FONT_HEX_PROTO to (const byte*) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (const byte*) FONT_HEX_PROTO
Fixing pointer array-indexing *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Fixing pointer array-indexing *((const word*) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
Identified constant variable (byte*) main::col00
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Inlined call (byte~) main::$1 ← call toD018 (const byte*) SCREEN (const byte*) CHARSET 
Culled Empty Block (label) init_font_hex::@6
Culled Empty Block (label) @1
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) atan2_8::@9
Culled Empty Block (label) atan2_8::@10
Culled Empty Block (label) atan2_8::@11
Culled Empty Block (label) atan2_8::@12
Culled Empty Block (label) atan2_8::@20
Culled Empty Block (label) atan2_8::@21
Culled Empty Block (label) atan2_8::@23
Culled Empty Block (label) atan2_8::@24
Culled Empty Block (label) atan2_8::@14
Culled Empty Block (label) @7
Culled Empty Block (label) main::toD0181_@1
Culled Empty Block (label) main::@4
Culled Empty Block (label) main::@8
Culled Empty Block (label) main::@7
Culled Empty Block (label) main::@9
Culled Empty Block (label) main::@10

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

(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex]  from main
  (byte*) init_font_hex::charset#6 ← phi( main/(byte*) init_font_hex::charset#1 )
  (byte*) init_font_hex::proto_hi#0 ← (const byte*) FONT_HEX_PROTO
  (byte) init_font_hex::c#0 ← (byte) 0
  to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex]  from init_font_hex init_font_hex::@5
  (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) init_font_hex::c#0 init_font_hex::@5/(byte) init_font_hex::c#1 )
  (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(byte*) init_font_hex::proto_hi#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
  (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(byte*) init_font_hex::charset#6 init_font_hex::@5/(byte*) init_font_hex::charset#7 )
  (byte*) init_font_hex::proto_lo#0 ← (const byte*) FONT_HEX_PROTO
  (byte) init_font_hex::c1#0 ← (byte) 0
  to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex]  from init_font_hex::@1 init_font_hex::@4
  (byte) init_font_hex::c#5 ← phi( init_font_hex::@1/(byte) init_font_hex::c#6 init_font_hex::@4/(byte) init_font_hex::c#3 )
  (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) init_font_hex::c1#0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
  (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(byte*) init_font_hex::proto_lo#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
  (byte*) init_font_hex::proto_hi#4 ← phi( init_font_hex::@1/(byte*) init_font_hex::proto_hi#6 init_font_hex::@4/(byte*) init_font_hex::proto_hi#5 )
  (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
  (byte) init_font_hex::idx#0 ← (byte) 0
  *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (number) 0
  (byte) init_font_hex::idx#1 ← ++ (byte) init_font_hex::idx#0
  (byte) init_font_hex::i#0 ← (byte) 0
  to:init_font_hex::@3
init_font_hex::@3: scope:[init_font_hex]  from init_font_hex::@2 init_font_hex::@3
  (byte) init_font_hex::c#4 ← phi( init_font_hex::@2/(byte) init_font_hex::c#5 init_font_hex::@3/(byte) init_font_hex::c#4 )
  (byte) init_font_hex::c1#3 ← phi( init_font_hex::@2/(byte) init_font_hex::c1#4 init_font_hex::@3/(byte) init_font_hex::c1#3 )
  (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) init_font_hex::idx#1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
  (byte*) init_font_hex::charset#3 ← phi( init_font_hex::@2/(byte*) init_font_hex::charset#2 init_font_hex::@3/(byte*) init_font_hex::charset#3 )
  (byte*) init_font_hex::proto_lo#2 ← phi( init_font_hex::@2/(byte*) init_font_hex::proto_lo#4 init_font_hex::@3/(byte*) init_font_hex::proto_lo#2 )
  (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) init_font_hex::i#0 init_font_hex::@3/(byte) init_font_hex::i#1 )
  (byte*) init_font_hex::proto_hi#2 ← phi( init_font_hex::@2/(byte*) init_font_hex::proto_hi#4 init_font_hex::@3/(byte*) init_font_hex::proto_hi#2 )
  (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#2 + (byte) init_font_hex::i#2) << (number) 4
  (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#2 + (byte) init_font_hex::i#2) << (number) 1
  (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
  *((byte*) init_font_hex::charset#3 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
  (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
  (byte) init_font_hex::i#1 ← (byte) init_font_hex::i#2 + rangenext(0,4)
  (bool~) init_font_hex::$3 ← (byte) init_font_hex::i#1 != rangelast(0,4)
  if((bool~) 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
  (byte) init_font_hex::c#3 ← phi( init_font_hex::@3/(byte) init_font_hex::c#4 )
  (byte*) init_font_hex::proto_hi#5 ← phi( init_font_hex::@3/(byte*) init_font_hex::proto_hi#2 )
  (byte) init_font_hex::c1#2 ← phi( init_font_hex::@3/(byte) init_font_hex::c1#3 )
  (byte*) init_font_hex::proto_lo#3 ← phi( init_font_hex::@3/(byte*) init_font_hex::proto_lo#2 )
  (byte) init_font_hex::idx#6 ← phi( init_font_hex::@3/(byte) init_font_hex::idx#2 )
  (byte*) init_font_hex::charset#4 ← phi( init_font_hex::@3/(byte*) init_font_hex::charset#3 )
  *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (number) 0
  (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#6
  *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#3) ← (number) 0
  (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
  (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#3 + (number) 5
  (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#4 + (number) 8
  (byte) init_font_hex::c1#1 ← (byte) init_font_hex::c1#2 + rangenext(0,$f)
  (bool~) init_font_hex::$4 ← (byte) init_font_hex::c1#1 != rangelast(0,$f)
  if((bool~) 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
  (byte*) init_font_hex::charset#7 ← phi( init_font_hex::@4/(byte*) init_font_hex::charset#0 )
  (byte) init_font_hex::c#2 ← phi( init_font_hex::@4/(byte) init_font_hex::c#3 )
  (byte*) init_font_hex::proto_hi#3 ← phi( init_font_hex::@4/(byte*) init_font_hex::proto_hi#5 )
  (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#3 + (number) 5
  (byte) init_font_hex::c#1 ← (byte) init_font_hex::c#2 + rangenext(0,$f)
  (bool~) init_font_hex::$5 ← (byte) init_font_hex::c#1 != rangelast(0,$f)
  if((bool~) 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

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

(void()) main()
main: scope:[main]  from @8
  (byte*) init_font_hex::charset#1 ← (const byte*) CHARSET
  call init_font_hex 
  to:main::@12
main::@12: scope:[main]  from main
  (byte*) main::toD0181_screen#0 ← (const byte*) SCREEN
  (byte*) main::toD0181_gfx#0 ← (const byte*) CHARSET
  to:main::toD0181
main::toD0181: scope:[main]  from main::@12
  (byte*) main::toD0181_gfx#1 ← phi( main::@12/(byte*) main::toD0181_gfx#0 )
  (byte*) main::toD0181_screen#1 ← phi( main::@12/(byte*) main::toD0181_screen#0 )
  (word~) main::toD0181_$0 ← ((word)) (byte*) main::toD0181_screen#1
  (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (number) $3fff
  (number~) main::toD0181_$2 ← (number~) main::toD0181_$1 * (number) 4
  (number~) main::toD0181_$3 ← > (number~) main::toD0181_$2
  (word~) main::toD0181_$4 ← ((word)) (byte*) main::toD0181_gfx#1
  (byte~) main::toD0181_$5 ← > (word~) main::toD0181_$4
  (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (number) 4
  (number~) main::toD0181_$7 ← (number~) main::toD0181_$6 & (number) $f
  (number~) main::toD0181_$8 ← (number~) main::toD0181_$3 | (number~) main::toD0181_$7
  (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8
  to:main::toD0181_@return
main::toD0181_@return: scope:[main]  from main::toD0181
  (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 )
  (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2
  to:main::@11
main::@11: scope:[main]  from main::toD0181_@return
  (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 )
  (byte~) main::$1 ← (byte) main::toD0181_return#3
  *((const byte*) D018) ← (byte~) main::$1
  (byte*) main::screen#0 ← (const byte*) SCREEN
  (signed byte) main::y#0 ← (signed byte) -$c
  to:main::@1
main::@1: scope:[main]  from main::@11 main::@3
  (byte*) main::screen#4 ← phi( main::@11/(byte*) main::screen#0 main::@3/(byte*) main::screen#5 )
  (signed byte) main::y#4 ← phi( main::@11/(signed byte) main::y#0 main::@3/(signed byte) main::y#1 )
  (signed byte) main::x#0 ← (signed byte) -$13
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@13
  (byte*) main::screen#3 ← phi( main::@1/(byte*) main::screen#4 main::@13/(byte*) main::screen#1 )
  (signed byte) main::y#2 ← phi( main::@1/(signed byte) main::y#4 main::@13/(signed byte) main::y#5 )
  (signed byte) main::x#2 ← phi( main::@1/(signed byte) main::x#0 main::@13/(signed byte) main::x#1 )
  (signed byte) atan2_8::x#0 ← (signed byte) main::x#2
  (signed byte) atan2_8::y#0 ← (signed byte) main::y#2
  call atan2_8 
  (byte) atan2_8::return#2 ← (byte) atan2_8::return#1
  to:main::@13
main::@13: scope:[main]  from main::@2
  (signed byte) main::y#5 ← phi( main::@2/(signed byte) main::y#2 )
  (signed byte) main::x#3 ← phi( main::@2/(signed byte) main::x#2 )
  (byte*) main::screen#2 ← phi( main::@2/(byte*) main::screen#3 )
  (byte) atan2_8::return#4 ← phi( main::@2/(byte) atan2_8::return#2 )
  (byte~) main::$2 ← (byte) atan2_8::return#4
  (byte) main::angle#0 ← (byte~) main::$2
  *((byte*) main::screen#2) ← (byte) main::angle#0
  (byte*) main::screen#1 ← ++ (byte*) main::screen#2
  (signed byte) main::x#1 ← (signed byte) main::x#3 + rangenext(-$13,$14)
  (bool~) main::$3 ← (signed byte) main::x#1 != rangelast(-$13,$14)
  if((bool~) main::$3) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@13
  (byte*) main::screen#5 ← phi( main::@13/(byte*) main::screen#1 )
  (signed byte) main::y#3 ← phi( main::@13/(signed byte) main::y#5 )
  (signed byte) main::y#1 ← (signed byte) main::y#3 + rangenext(-$c,$c)
  (bool~) main::$4 ← (signed byte) main::y#1 != rangelast(-$c,$c)
  if((bool~) main::$4) goto main::@1
  to:main::@5
main::@5: scope:[main]  from main::@3 main::@6
  if(true) goto main::@6
  to:main::@return
main::@6: scope:[main]  from main::@5
  *((const byte*) main::col00) ← ++ *((const byte*) main::col00)
  to:main::@5
main::@return: scope:[main]  from main::@5
  return 
  to:@return
@8: scope:[]  from @begin
  call main 
  to:@9
@9: scope:[]  from @8
  to:@end
@end: scope:[]  from @9

SYMBOL TABLE SSA
(label) @8
(label) @9
(label) @begin
(label) @end
(const byte*) CHARSET = (byte*)(number) $2000
(const byte*) COLS = (byte*)(number) $d800
(const byte*) CORDIC_ATAN2_ANGLES_8[(const byte) CORDIC_ITERATIONS_8]  = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
(const byte) CORDIC_ITERATIONS_8 = (byte) 8
(const byte*) D018 = (byte*)(number) $d018
(const byte*) FONT_HEX_PROTO[]  = { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
(const byte*) SCREEN = (byte*)(number) $2800
(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y)
(bool~) atan2_8::$0
(signed byte~) 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
(byte~) atan2_8::$16
(bool~) atan2_8::$17
(bool~) atan2_8::$18
(signed byte~) atan2_8::$19
(signed byte~) atan2_8::$2
(signed byte~) atan2_8::$20
(bool~) atan2_8::$21
(bool~) atan2_8::$22
(signed byte~) atan2_8::$3
(signed byte~) atan2_8::$4
(bool~) atan2_8::$5
(signed byte~) atan2_8::$6
(signed byte~) atan2_8::$7
(signed byte~) atan2_8::$8
(signed byte~) atan2_8::$9
(label) atan2_8::@1
(label) atan2_8::@13
(label) atan2_8::@15
(label) atan2_8::@16
(label) atan2_8::@17
(label) atan2_8::@18
(label) atan2_8::@19
(label) atan2_8::@2
(label) atan2_8::@22
(label) atan2_8::@25
(label) atan2_8::@3
(label) atan2_8::@4
(label) atan2_8::@5
(label) atan2_8::@6
(label) atan2_8::@7
(label) atan2_8::@8
(label) atan2_8::@return
(byte) atan2_8::angle
(byte) atan2_8::angle#0
(byte) atan2_8::angle#1
(byte) atan2_8::angle#10
(byte) atan2_8::angle#11
(byte) atan2_8::angle#12
(byte) atan2_8::angle#13
(byte) atan2_8::angle#14
(byte) atan2_8::angle#15
(byte) atan2_8::angle#2
(byte) atan2_8::angle#3
(byte) atan2_8::angle#4
(byte) atan2_8::angle#5
(byte) atan2_8::angle#6
(byte) atan2_8::angle#7
(byte) atan2_8::angle#8
(byte) atan2_8::angle#9
(byte) atan2_8::i
(byte) atan2_8::i#0
(byte) atan2_8::i#1
(byte) atan2_8::i#2
(byte) atan2_8::i#3
(byte) atan2_8::i#4
(byte) atan2_8::i#5
(byte) atan2_8::i#6
(byte) atan2_8::return
(byte) atan2_8::return#0
(byte) atan2_8::return#1
(byte) atan2_8::return#2
(byte) atan2_8::return#3
(byte) atan2_8::return#4
(signed byte) atan2_8::x
(signed byte) atan2_8::x#0
(signed byte) atan2_8::x#1
(signed byte) atan2_8::x#10
(signed byte) atan2_8::x#11
(signed byte) atan2_8::x#12
(signed byte) atan2_8::x#13
(signed byte) atan2_8::x#2
(signed byte) atan2_8::x#3
(signed byte) atan2_8::x#4
(signed byte) atan2_8::x#5
(signed byte) atan2_8::x#6
(signed byte) atan2_8::x#7
(signed byte) atan2_8::x#8
(signed byte) atan2_8::x#9
(signed byte) atan2_8::xd
(signed byte) atan2_8::xd#0
(signed byte) atan2_8::xd#1
(signed byte) atan2_8::xd#2
(signed byte) atan2_8::xi
(signed byte) atan2_8::xi#0
(signed byte) atan2_8::xi#1
(signed byte) atan2_8::xi#2
(signed byte) atan2_8::xi#3
(signed byte) atan2_8::xi#4
(signed byte) atan2_8::xi#5
(signed byte) atan2_8::xi#6
(signed byte) atan2_8::xi#7
(signed byte) atan2_8::y
(signed byte) atan2_8::y#0
(signed byte) atan2_8::y#1
(signed byte) atan2_8::y#10
(signed byte) atan2_8::y#11
(signed byte) atan2_8::y#12
(signed byte) atan2_8::y#13
(signed byte) atan2_8::y#14
(signed byte) atan2_8::y#15
(signed byte) atan2_8::y#2
(signed byte) atan2_8::y#3
(signed byte) atan2_8::y#4
(signed byte) atan2_8::y#5
(signed byte) atan2_8::y#6
(signed byte) atan2_8::y#7
(signed byte) atan2_8::y#8
(signed byte) atan2_8::y#9
(signed byte) atan2_8::yd
(signed byte) atan2_8::yd#0
(signed byte) atan2_8::yd#1
(signed byte) atan2_8::yd#2
(signed byte) atan2_8::yi
(signed byte) atan2_8::yi#0
(signed byte) atan2_8::yi#1
(signed byte) atan2_8::yi#10
(signed byte) atan2_8::yi#2
(signed byte) atan2_8::yi#3
(signed byte) atan2_8::yi#4
(signed byte) atan2_8::yi#5
(signed byte) atan2_8::yi#6
(signed byte) atan2_8::yi#7
(signed byte) atan2_8::yi#8
(signed byte) atan2_8::yi#9
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0
(byte~) init_font_hex::$1
(byte~) init_font_hex::$2
(bool~) init_font_hex::$3
(bool~) init_font_hex::$4
(bool~) init_font_hex::$5
(label) init_font_hex::@1
(label) init_font_hex::@2
(label) init_font_hex::@3
(label) init_font_hex::@4
(label) init_font_hex::@5
(label) init_font_hex::@return
(byte) init_font_hex::c
(byte) init_font_hex::c#0
(byte) init_font_hex::c#1
(byte) init_font_hex::c#2
(byte) init_font_hex::c#3
(byte) init_font_hex::c#4
(byte) init_font_hex::c#5
(byte) init_font_hex::c#6
(byte) init_font_hex::c1
(byte) init_font_hex::c1#0
(byte) init_font_hex::c1#1
(byte) init_font_hex::c1#2
(byte) init_font_hex::c1#3
(byte) init_font_hex::c1#4
(byte*) init_font_hex::charset
(byte*) init_font_hex::charset#0
(byte*) init_font_hex::charset#1
(byte*) init_font_hex::charset#2
(byte*) init_font_hex::charset#3
(byte*) init_font_hex::charset#4
(byte*) init_font_hex::charset#5
(byte*) init_font_hex::charset#6
(byte*) init_font_hex::charset#7
(byte) init_font_hex::i
(byte) init_font_hex::i#0
(byte) init_font_hex::i#1
(byte) init_font_hex::i#2
(byte) init_font_hex::idx
(byte) init_font_hex::idx#0
(byte) init_font_hex::idx#1
(byte) init_font_hex::idx#2
(byte) init_font_hex::idx#3
(byte) init_font_hex::idx#4
(byte) init_font_hex::idx#5
(byte) init_font_hex::idx#6
(byte*) init_font_hex::proto_hi
(byte*) init_font_hex::proto_hi#0
(byte*) init_font_hex::proto_hi#1
(byte*) init_font_hex::proto_hi#2
(byte*) init_font_hex::proto_hi#3
(byte*) init_font_hex::proto_hi#4
(byte*) init_font_hex::proto_hi#5
(byte*) init_font_hex::proto_hi#6
(byte*) init_font_hex::proto_lo
(byte*) init_font_hex::proto_lo#0
(byte*) init_font_hex::proto_lo#1
(byte*) init_font_hex::proto_lo#2
(byte*) init_font_hex::proto_lo#3
(byte*) init_font_hex::proto_lo#4
(void()) main()
(byte~) main::$1
(byte~) main::$2
(bool~) main::$3
(bool~) main::$4
(label) main::@1
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@2
(label) main::@3
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::angle
(byte) main::angle#0
(const byte*) main::col00 = (const byte*) COLS+(number) $c*(number) $28+(number) $13
(byte*) main::screen
(byte*) main::screen#0
(byte*) main::screen#1
(byte*) main::screen#2
(byte*) main::screen#3
(byte*) main::screen#4
(byte*) main::screen#5
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(label) main::toD0181_@return
(byte*) main::toD0181_gfx
(byte*) main::toD0181_gfx#0
(byte*) main::toD0181_gfx#1
(byte) main::toD0181_return
(byte) main::toD0181_return#0
(byte) main::toD0181_return#1
(byte) main::toD0181_return#2
(byte) main::toD0181_return#3
(byte*) main::toD0181_screen
(byte*) main::toD0181_screen#0
(byte*) main::toD0181_screen#1
(signed byte) main::x
(signed byte) main::x#0
(signed byte) main::x#1
(signed byte) main::x#2
(signed byte) main::x#3
(signed byte) main::y
(signed byte) main::y#0
(signed byte) main::y#1
(signed byte) main::y#2
(signed byte) main::y#3
(signed byte) main::y#4
(signed byte) 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 *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (number) 0
Adding number conversion cast (unumber) 4 in (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#2 + (byte) init_font_hex::i#2) << (number) 4
Adding number conversion cast (unumber) 1 in (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#2 + (byte) init_font_hex::i#2) << (number) 1
Adding number conversion cast (unumber) 0 in *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (number) 0
Adding number conversion cast (unumber) 0 in *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#3) ← (number) 0
Adding number conversion cast (unumber) 5 in (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#3 + (number) 5
Adding number conversion cast (unumber) 8 in (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#4 + (number) 8
Adding number conversion cast (unumber) 5 in (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#3 + (number) 5
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$0 ← (signed byte) atan2_8::y#1 > (number) 0
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$5 ← (signed byte) atan2_8::x#1 > (number) 0
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$17 ← (signed byte) atan2_8::yi#3 == (number) 0
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$21 ← (signed byte) atan2_8::yi#4 > (number) 0
Adding number conversion cast (unumber) 2 in (number~) atan2_8::$10 ← (byte) atan2_8::angle#6 / (number) 2
Adding number conversion cast (unumber) atan2_8::$10 in (number~) atan2_8::$10 ← (byte) atan2_8::angle#6 / (unumber)(number) 2
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$11 ← (signed byte) atan2_8::x#4 < (number) 0
Adding number conversion cast (unumber) 1 in (byte) atan2_8::i#1 ← (byte) atan2_8::i#5 + rangenext(0,CORDIC_ITERATIONS_8-1)
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$14 ← (signed byte) atan2_8::y#4 < (number) 0
Adding number conversion cast (unumber) $80 in (number~) atan2_8::$13 ← (number) $80 - (byte) atan2_8::angle#9
Adding number conversion cast (unumber) atan2_8::$13 in (number~) atan2_8::$13 ← (unumber)(number) $80 - (byte) atan2_8::angle#9
Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (number) $3fff
Adding number conversion cast (unumber) main::toD0181_$1 in (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$1 * (number) 4
Adding number conversion cast (unumber) main::toD0181_$2 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$1 * (unumber)(number) 4
Adding number conversion cast (unumber) main::toD0181_$3 in (number~) main::toD0181_$3 ← > (unumber~) main::toD0181_$2
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (number) 4
Adding number conversion cast (unumber) main::toD0181_$6 in (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (unumber)(number) 4
Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (number) $f
Adding number conversion cast (unumber) main::toD0181_$7 in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8 in (number~) main::toD0181_$8 ← (unumber~) main::toD0181_$3 | (unumber~) main::toD0181_$7
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#0) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#6) ← (unumber)(number) 0
Inlining cast *((byte*) init_font_hex::charset#4 + (byte) init_font_hex::idx#3) ← (unumber)(number) 0
Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 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 (byte) $13
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) 8
Finalized unsigned number type (byte) 5
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) 2
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) 1
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (word) $3fff
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) atan2_8::$10 ← (byte) atan2_8::angle#6 / (byte) 2
Inferred type updated to byte in (unumber~) atan2_8::$13 ← (byte) $80 - (byte) atan2_8::angle#9
Inferred type updated to word in (unumber~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (word) $3fff
Inferred type updated to word in (unumber~) main::toD0181_$2 ← (word~) main::toD0181_$1 * (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$3 ← > (word~) main::toD0181_$2
Inferred type updated to byte in (unumber~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::toD0181_$6 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7
Inversing boolean not [59] (bool~) atan2_8::$18 ← (signed byte) atan2_8::yi#3 != (signed byte) 0 from [58] (bool~) atan2_8::$17 ← (signed byte) atan2_8::yi#3 == (signed byte) 0
Inversing boolean not [72] (bool~) atan2_8::$12 ← (signed byte) atan2_8::x#4 >= (signed byte) 0 from [71] (bool~) atan2_8::$11 ← (signed byte) atan2_8::x#4 < (signed byte) 0
Inversing boolean not [88] (bool~) atan2_8::$15 ← (signed byte) atan2_8::y#4 >= (signed byte) 0 from [87] (bool~) atan2_8::$14 ← (signed byte) atan2_8::y#4 < (signed byte) 0
Successful SSA optimization Pass2UnaryNotSimplification
Alias (byte*) init_font_hex::charset#3 = (byte*) init_font_hex::charset#4 
Alias (byte) init_font_hex::idx#2 = (byte) init_font_hex::idx#6 
Alias (byte*) init_font_hex::proto_lo#2 = (byte*) init_font_hex::proto_lo#3 
Alias (byte) init_font_hex::c1#2 = (byte) init_font_hex::c1#3 
Alias (byte*) init_font_hex::proto_hi#2 = (byte*) init_font_hex::proto_hi#5 (byte*) init_font_hex::proto_hi#3 
Alias (byte) init_font_hex::c#2 = (byte) init_font_hex::c#3 (byte) init_font_hex::c#4 
Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 
Alias (signed byte) atan2_8::y#1 = (signed byte) atan2_8::y#2 (signed byte~) atan2_8::$3 (signed byte) atan2_8::y#3 
Alias (signed byte) atan2_8::x#5 = (signed byte) atan2_8::x#9 (signed byte) atan2_8::x#6 
Alias (signed byte~) atan2_8::$2 = (signed byte~) atan2_8::$1 
Alias (signed byte) atan2_8::yi#0 = (signed byte~) atan2_8::$4 (signed byte) atan2_8::yi#9 (signed byte) atan2_8::yi#10 
Alias (signed byte) atan2_8::x#1 = (signed byte) atan2_8::x#2 (signed byte~) atan2_8::$8 (signed byte) atan2_8::x#3 
Alias (signed byte) atan2_8::y#12 = (signed byte) atan2_8::y#15 (signed byte) atan2_8::y#13 
Alias (signed byte~) atan2_8::$7 = (signed byte~) atan2_8::$6 
Alias (signed byte) atan2_8::xi#0 = (signed byte~) atan2_8::$9 
Alias (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#6 (signed byte) atan2_8::xi#4 (signed byte) atan2_8::xi#5 
Alias (byte) atan2_8::i#2 = (byte) atan2_8::i#6 (byte) atan2_8::i#3 (byte) atan2_8::i#4 
Alias (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#4 (signed byte) atan2_8::yi#5 (signed byte) atan2_8::yi#6 
Alias (byte) atan2_8::angle#12 = (byte) atan2_8::angle#14 (byte) atan2_8::angle#7 (byte) atan2_8::angle#8 
Alias (signed byte) atan2_8::x#11 = (signed byte) atan2_8::x#13 (signed byte) atan2_8::x#7 (signed byte) atan2_8::x#12 
Alias (signed byte) atan2_8::y#10 = (signed byte) atan2_8::y#14 (signed byte) atan2_8::y#7 (signed byte) atan2_8::y#11 
Alias (signed byte) atan2_8::xd#0 = (signed byte~) atan2_8::$19 (signed byte) atan2_8::xd#1 (signed byte) atan2_8::xd#2 
Alias (signed byte) atan2_8::yd#0 = (signed byte~) atan2_8::$20 (signed byte) atan2_8::yd#1 (signed byte) atan2_8::yd#2 
Alias (byte) atan2_8::angle#1 = (byte~) atan2_8::$10 (byte) atan2_8::angle#9 
Alias (signed byte) atan2_8::y#5 = (signed byte) atan2_8::y#6 
Alias (byte) atan2_8::angle#4 = (byte~) atan2_8::$13 
Alias (byte) atan2_8::return#0 = (byte) atan2_8::angle#10 (byte) atan2_8::return#3 (byte) atan2_8::return#1 
Alias (byte) atan2_8::angle#11 = (byte) atan2_8::angle#15 
Alias (byte) atan2_8::angle#5 = (byte~) atan2_8::$16 
Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 
Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 
Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 
Alias (byte) atan2_8::return#2 = (byte) atan2_8::return#4 
Alias (byte*) main::screen#2 = (byte*) main::screen#3 
Alias (signed byte) main::x#2 = (signed byte) main::x#3 
Alias (signed byte) main::y#2 = (signed byte) main::y#5 (signed byte) main::y#3 
Alias (byte) main::angle#0 = (byte~) main::$2 
Alias (byte*) main::screen#1 = (byte*) main::screen#5 
Successful SSA optimization Pass2AliasElimination
Alias (signed byte) atan2_8::x#1 = (signed byte) atan2_8::x#5 (signed byte) atan2_8::x#10 
Alias (signed byte) atan2_8::y#1 = (signed byte) atan2_8::y#12 (signed byte) atan2_8::y#9 
Alias (signed byte) atan2_8::yi#0 = (signed byte) atan2_8::yi#8 
Alias (byte) atan2_8::i#2 = (byte) atan2_8::i#5 
Alias (signed byte) atan2_8::x#11 = (signed byte) atan2_8::x#8 
Alias (signed byte) atan2_8::y#10 = (signed byte) atan2_8::y#8 
Alias (signed byte) atan2_8::y#4 = (signed byte) atan2_8::y#5 
Successful SSA optimization Pass2AliasElimination
Alias (signed byte) atan2_8::x#11 = (signed byte) atan2_8::x#4 
Alias (signed byte) atan2_8::y#10 = (signed byte) atan2_8::y#4 
Successful SSA optimization Pass2AliasElimination
Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1
Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4
Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4
Identical Phi Values (byte*) init_font_hex::charset#3 (byte*) init_font_hex::charset#2
Identical Phi Values (byte) init_font_hex::c1#2 (byte) init_font_hex::c1#4
Identical Phi Values (byte) init_font_hex::c#2 (byte) init_font_hex::c#5
Identical Phi Values (signed byte) atan2_8::y#1 (signed byte) atan2_8::y#0
Identical Phi Values (signed byte) atan2_8::x#1 (signed byte) atan2_8::x#0
Identical Phi Values (signed byte) atan2_8::x#11 (signed byte) atan2_8::x#1
Identical Phi Values (signed byte) atan2_8::y#10 (signed byte) atan2_8::y#1
Identical Phi Values (signed byte) main::y#2 (signed byte) main::y#4
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6
Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3
Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2
Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1
Simple Condition (bool~) atan2_8::$0 [38] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1
Simple Condition (bool~) atan2_8::$5 [47] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4
Simple Condition (bool~) atan2_8::$18 [60] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@16
Simple Condition (bool~) atan2_8::$21 [67] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@18
Simple Condition (bool~) atan2_8::$12 [73] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7
Simple Condition (bool~) atan2_8::$22 [85] if((byte) atan2_8::i#1!=rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@15
Simple Condition (bool~) atan2_8::$15 [89] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8
Simple Condition (bool~) main::$3 [137] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$4 [141] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [85] if((byte) atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c#0 = 0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO
Constant (const byte) init_font_hex::c1#0 = 0
Constant (const byte) init_font_hex::idx#0 = 0
Constant (const byte) init_font_hex::i#0 = 0
Constant (const byte) atan2_8::angle#0 = 0
Constant (const byte) atan2_8::i#0 = 0
Constant (const byte*) init_font_hex::charset#1 = CHARSET
Constant (const byte*) main::toD0181_screen#0 = SCREEN
Constant (const byte*) main::toD0181_gfx#0 = CHARSET
Constant (const byte*) main::screen#0 = SCREEN
Constant (const signed byte) main::y#0 = -$c
Constant (const signed byte) main::x#0 = -$13
Successful SSA optimization Pass2ConstantIdentification
Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [142] if(true) goto main::@6
Successful SSA optimization Pass2ConstantIfs
Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++
Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5
Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++
Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10
Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++
Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10
Resolved ranged next value [83] atan2_8::i#1 ← ++ atan2_8::i#2 to ++
Resolved ranged comparison value [85] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 to (const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1
Resolved ranged next value [135] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [137] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [139] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [141] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3
Successful SSA optimization PassNEliminateUnusedVars
Removing unused block main::@return
Successful SSA optimization Pass2EliminateUnusedBlocks
Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3
Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2
Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1
Adding number conversion cast (unumber) CORDIC_ITERATIONS_8-1+1 in if((byte) atan2_8::i#1==(const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1) goto atan2_8::@17
Adding number conversion cast (unumber) 1 in if((byte) atan2_8::i#1==(unumber)(const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1) goto atan2_8::@17
Adding number conversion cast (snumber) $15 in if((signed byte) main::x#1!=(number) $15) goto main::@2
Adding number conversion cast (snumber) $d in if((signed byte) main::y#1!=(number) $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 (const byte) CORDIC_ITERATIONS_8-(byte) 1+(unumber)(number) 1
Simplifying constant integer cast 1
Simplifying constant integer cast $15
Simplifying constant integer cast $d
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 5
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 1
Finalized signed number type (signed byte) $15
Finalized signed number type (signed byte) $d
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [3] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0
Constant right-side identified [53] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff
Constant right-side identified [56] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0
Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff
Constant (const byte) main::toD0181_$5 = >main::toD0181_$4
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [52] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4
Constant right-side identified [54] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) main::toD0181_$2 = main::toD0181_$1*4
Constant (const byte) main::toD0181_$6 = main::toD0181_$5/4
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [52] (byte~) main::toD0181_$3 ← > (const word) main::toD0181_$2
Constant right-side identified [53] (byte~) main::toD0181_$7 ← (const byte) main::toD0181_$6 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_$3 = >main::toD0181_$2
Constant (const byte) main::toD0181_$7 = main::toD0181_$6&$f
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [52] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3|main::toD0181_$7
Successful SSA optimization Pass2ConstantIdentification
Rewriting division to use shift [34] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 / (byte) 2
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings (const byte*) init_font_hex::proto_hi#0
Inlining constant with var siblings (const byte) init_font_hex::c#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#0
Inlining constant with var siblings (const byte) init_font_hex::c1#0
Inlining constant with var siblings (const byte) init_font_hex::idx#0
Inlining constant with var siblings (const byte) init_font_hex::i#0
Inlining constant with var siblings (const byte*) init_font_hex::charset#1
Inlining constant with var siblings (const byte) init_font_hex::idx#1
Inlining constant with var siblings (const byte) atan2_8::angle#0
Inlining constant with var siblings (const byte) atan2_8::i#0
Inlining constant with var siblings (const byte*) main::screen#0
Inlining constant with var siblings (const signed byte) main::y#0
Inlining constant with var siblings (const signed byte) main::x#0
Constant inlined main::screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN
Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET
Constant inlined main::toD0181_$7 = >(word)(const byte*) CHARSET/(byte) 4&(byte) $f
Constant inlined init_font_hex::proto_hi#0 = (const byte*) FONT_HEX_PROTO
Constant inlined main::toD0181_$2 = (word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined atan2_8::angle#0 = (byte) 0
Constant inlined main::toD0181_$1 = (word)(const byte*) SCREEN&(word) $3fff
Constant inlined main::toD0181_$0 = (word)(const byte*) SCREEN
Constant inlined main::x#0 = (signed byte) -$13
Constant inlined main::y#0 = (signed byte) -$c
Constant inlined main::toD0181_$6 = >(word)(const byte*) CHARSET/(byte) 4
Constant inlined init_font_hex::i#0 = (byte) 0
Constant inlined main::toD0181_$5 = >(word)(const byte*) CHARSET
Constant inlined main::toD0181_$4 = (word)(const byte*) CHARSET
Constant inlined main::toD0181_$3 = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4
Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET
Constant inlined init_font_hex::idx#1 = ++(byte) 0
Constant inlined init_font_hex::idx#0 = (byte) 0
Constant inlined init_font_hex::proto_lo#0 = (const byte*) FONT_HEX_PROTO
Constant inlined atan2_8::i#0 = (byte) 0
Constant inlined init_font_hex::c#0 = (byte) 0
Constant inlined init_font_hex::c1#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Simplifying constant integer increment ++0
Successful SSA optimization Pass2ConstantSimplification
Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1)
Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2)
Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3)
Added new block during phi lifting atan2_8::@26(between atan2_8::@19 and atan2_8::@15)
Added new block during phi lifting atan2_8::@27(between atan2_8::@15 and atan2_8::@17)
Added new block during phi lifting atan2_8::@28(between atan2_8::@19 and atan2_8::@17)
Added new block during phi lifting atan2_8::@29(between atan2_8::@17 and atan2_8::@7)
Added new block during phi lifting atan2_8::@30(between atan2_8::@7 and atan2_8::@8)
Added new block during phi lifting main::@14(between main::@3 and main::@1)
Added new block during phi lifting main::@15(between main::@13 and main::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @8
Adding NOP phi() at start of @9
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::@12
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of main::toD0181_@return
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:2 
Calls in [main] to init_font_hex:6 atan2_8:16 

Created 24 initial phi equivalence classes
Coalesced [12] main::screen#7 ← main::screen#4
Coalesced [27] main::y#6 ← main::y#1
Coalesced [28] main::screen#6 ← main::screen#1
Coalesced [29] main::x#4 ← main::x#1
Coalesced (already) [30] main::screen#8 ← main::screen#1
Coalesced [33] atan2_8::yi#12 ← atan2_8::$2
Coalesced [37] atan2_8::xi#9 ← atan2_8::$7
Coalesced [39] atan2_8::yi#14 ← atan2_8::yi#0
Coalesced [40] atan2_8::xi#11 ← atan2_8::xi#0
Coalesced [43] atan2_8::angle#17 ← atan2_8::angle#12
Coalesced [48] atan2_8::angle#22 ← atan2_8::angle#4
Coalesced [52] atan2_8::return#5 ← atan2_8::angle#5
Coalesced [55] atan2_8::return#6 ← atan2_8::angle#11
Coalesced [56] atan2_8::angle#21 ← atan2_8::angle#1
Coalesced [63] atan2_8::yi#16 ← atan2_8::yi#2
Coalesced [64] atan2_8::angle#20 ← atan2_8::angle#3
Coalesced [65] atan2_8::xi#13 ← atan2_8::xi#2
Coalesced [69] atan2_8::yi#13 ← atan2_8::yi#7
Coalesced [70] atan2_8::xi#10 ← atan2_8::xi#7
Coalesced [71] atan2_8::i#7 ← atan2_8::i#1
Coalesced [72] atan2_8::angle#16 ← atan2_8::angle#13
Coalesced (already) [73] atan2_8::angle#18 ← atan2_8::angle#13
Coalesced [77] atan2_8::yi#15 ← atan2_8::yi#1
Coalesced [78] atan2_8::angle#19 ← atan2_8::angle#2
Coalesced [79] atan2_8::xi#12 ← atan2_8::xi#1
Not coalescing [80] atan2_8::xi#8 ← atan2_8::x#0
Not coalescing [81] atan2_8::yi#11 ← atan2_8::y#0
Coalesced [84] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [106] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [107] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [108] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [109] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [110] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [111] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [112] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [113] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 17 phi equivalence classes
Culled Empty Block (label) @9
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@14
Culled Empty Block (label) main::@15
Culled Empty Block (label) atan2_8::@27
Culled Empty Block (label) atan2_8::@30
Culled Empty Block (label) atan2_8::@29
Culled Empty Block (label) atan2_8::@26
Culled Empty Block (label) atan2_8::@28
Culled Empty Block (label) init_font_hex::@7
Culled Empty Block (label) init_font_hex::@8
Culled Empty Block (label) init_font_hex::@9
Renumbering block @8 to @1
Renumbering block atan2_8::@13 to atan2_8::@9
Renumbering block atan2_8::@15 to atan2_8::@10
Renumbering block atan2_8::@16 to atan2_8::@11
Renumbering block atan2_8::@17 to atan2_8::@12
Renumbering block atan2_8::@18 to atan2_8::@13
Renumbering block atan2_8::@19 to atan2_8::@14
Renumbering block atan2_8::@22 to atan2_8::@15
Renumbering block atan2_8::@25 to atan2_8::@16
Renumbering block main::@6 to main::@4
Renumbering block main::@11 to main::@5
Renumbering block main::@13 to main::@6
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @end
Adding NOP phi() at start of main
Adding NOP phi() at start of main::toD0181
Adding NOP phi() at start of init_font_hex

FINAL CONTROL FLOW GRAPH
@begin: scope:[]  from
  [0] phi()
  to:@1
@1: scope:[]  from @begin
  [1] phi()
  [2] call main 
  to:@end
@end: scope:[]  from @1
  [3] phi()

(void()) main()
main: scope:[main]  from @1
  [4] phi()
  [5] call init_font_hex 
  to:main::toD0181
main::toD0181: scope:[main]  from main
  [6] phi()
  to:main::@5
main::@5: scope:[main]  from main::toD0181
  [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0
  to:main::@1
main::@1: scope:[main]  from main::@3 main::@5
  [8] (byte*) main::screen#4 ← phi( main::@5/(const byte*) SCREEN main::@3/(byte*) main::screen#1 )
  [8] (signed byte) main::y#4 ← phi( main::@5/(signed byte) -$c main::@3/(signed byte) main::y#1 )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@6
  [9] (byte*) main::screen#2 ← phi( main::@1/(byte*) main::screen#4 main::@6/(byte*) main::screen#1 )
  [9] (signed byte) main::x#2 ← phi( main::@1/(signed byte) -$13 main::@6/(signed byte) main::x#1 )
  [10] (signed byte) atan2_8::x#0 ← (signed byte) main::x#2
  [11] (signed byte) atan2_8::y#0 ← (signed byte) main::y#4
  [12] call atan2_8 
  [13] (byte) atan2_8::return#2 ← (byte) atan2_8::return#0
  to:main::@6
main::@6: scope:[main]  from main::@2
  [14] (byte) main::angle#0 ← (byte) atan2_8::return#2
  [15] *((byte*) main::screen#2) ← (byte) main::angle#0
  [16] (byte*) main::screen#1 ← ++ (byte*) main::screen#2
  [17] (signed byte) main::x#1 ← ++ (signed byte) main::x#2
  [18] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@6
  [19] (signed byte) main::y#1 ← ++ (signed byte) main::y#4
  [20] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3 main::@4
  [21] *((const byte*) main::col00) ← ++ *((const byte*) main::col00)
  to:main::@4

(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y)
atan2_8: scope:[atan2_8]  from main::@2
  [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1
  to:atan2_8::@2
atan2_8::@2: scope:[atan2_8]  from atan2_8
  [23] (signed byte~) atan2_8::$2 ← - (signed byte) atan2_8::y#0
  to:atan2_8::@3
atan2_8::@3: scope:[atan2_8]  from atan2_8::@1 atan2_8::@2
  [24] (signed byte) atan2_8::yi#0 ← phi( atan2_8::@1/(signed byte) atan2_8::yi#11 atan2_8::@2/(signed byte~) atan2_8::$2 )
  [25] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4
  to:atan2_8::@5
atan2_8::@5: scope:[atan2_8]  from atan2_8::@3
  [26] (signed byte~) atan2_8::$7 ← - (signed byte) atan2_8::x#0
  to:atan2_8::@6
atan2_8::@6: scope:[atan2_8]  from atan2_8::@4 atan2_8::@5
  [27] (signed byte) atan2_8::xi#0 ← phi( atan2_8::@4/(signed byte) atan2_8::xi#8 atan2_8::@5/(signed byte~) atan2_8::$7 )
  to:atan2_8::@10
atan2_8::@10: scope:[atan2_8]  from atan2_8::@14 atan2_8::@6
  [28] (byte) atan2_8::angle#12 ← phi( atan2_8::@14/(byte) atan2_8::angle#13 atan2_8::@6/(byte) 0 )
  [28] (byte) atan2_8::i#2 ← phi( atan2_8::@14/(byte) atan2_8::i#1 atan2_8::@6/(byte) 0 )
  [28] (signed byte) atan2_8::xi#3 ← phi( atan2_8::@14/(signed byte) atan2_8::xi#7 atan2_8::@6/(signed byte) atan2_8::xi#0 )
  [28] (signed byte) atan2_8::yi#3 ← phi( atan2_8::@14/(signed byte) atan2_8::yi#7 atan2_8::@6/(signed byte) atan2_8::yi#0 )
  [29] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@11
  to:atan2_8::@12
atan2_8::@12: scope:[atan2_8]  from atan2_8::@10 atan2_8::@14
  [30] (byte) atan2_8::angle#6 ← phi( atan2_8::@10/(byte) atan2_8::angle#12 atan2_8::@14/(byte) atan2_8::angle#13 )
  [31] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 >> (byte) 1
  [32] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7
  to:atan2_8::@16
atan2_8::@16: scope:[atan2_8]  from atan2_8::@12
  [33] (byte) atan2_8::angle#4 ← (byte) $80 - (byte) atan2_8::angle#1
  to:atan2_8::@7
atan2_8::@7: scope:[atan2_8]  from atan2_8::@12 atan2_8::@16
  [34] (byte) atan2_8::angle#11 ← phi( atan2_8::@12/(byte) atan2_8::angle#1 atan2_8::@16/(byte) atan2_8::angle#4 )
  [35] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8
  to:atan2_8::@9
atan2_8::@9: scope:[atan2_8]  from atan2_8::@7
  [36] (byte) atan2_8::angle#5 ← - (byte) atan2_8::angle#11
  to:atan2_8::@8
atan2_8::@8: scope:[atan2_8]  from atan2_8::@7 atan2_8::@9
  [37] (byte) atan2_8::return#0 ← phi( atan2_8::@9/(byte) atan2_8::angle#5 atan2_8::@7/(byte) atan2_8::angle#11 )
  to:atan2_8::@return
atan2_8::@return: scope:[atan2_8]  from atan2_8::@8
  [38] return 
  to:@return
atan2_8::@11: scope:[atan2_8]  from atan2_8::@10
  [39] (signed byte) atan2_8::xd#0 ← (signed byte) atan2_8::xi#3 >> (byte) atan2_8::i#2
  [40] (signed byte) atan2_8::yd#0 ← (signed byte) atan2_8::yi#3 >> (byte) atan2_8::i#2
  [41] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@13
  to:atan2_8::@15
atan2_8::@15: scope:[atan2_8]  from atan2_8::@11
  [42] (signed byte) atan2_8::xi#2 ← (signed byte) atan2_8::xi#3 - (signed byte) atan2_8::yd#0
  [43] (signed byte) atan2_8::yi#2 ← (signed byte) atan2_8::yi#3 + (signed byte) atan2_8::xd#0
  [44] (byte) atan2_8::angle#3 ← (byte) atan2_8::angle#12 - *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) atan2_8::i#2)
  to:atan2_8::@14
atan2_8::@14: scope:[atan2_8]  from atan2_8::@13 atan2_8::@15
  [45] (signed byte) atan2_8::xi#7 ← phi( atan2_8::@13/(signed byte) atan2_8::xi#1 atan2_8::@15/(signed byte) atan2_8::xi#2 )
  [45] (byte) atan2_8::angle#13 ← phi( atan2_8::@13/(byte) atan2_8::angle#2 atan2_8::@15/(byte) atan2_8::angle#3 )
  [45] (signed byte) atan2_8::yi#7 ← phi( atan2_8::@13/(signed byte) atan2_8::yi#1 atan2_8::@15/(signed byte) atan2_8::yi#2 )
  [46] (byte) atan2_8::i#1 ← ++ (byte) atan2_8::i#2
  [47] if((byte) atan2_8::i#1==(const byte) CORDIC_ITERATIONS_8-(byte) 1+(byte) 1) goto atan2_8::@12
  to:atan2_8::@10
atan2_8::@13: scope:[atan2_8]  from atan2_8::@11
  [48] (signed byte) atan2_8::xi#1 ← (signed byte) atan2_8::xi#3 + (signed byte) atan2_8::yd#0
  [49] (signed byte) atan2_8::yi#1 ← (signed byte) atan2_8::yi#3 - (signed byte) atan2_8::xd#0
  [50] (byte) atan2_8::angle#2 ← (byte) atan2_8::angle#12 + *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) atan2_8::i#2)
  to:atan2_8::@14
atan2_8::@4: scope:[atan2_8]  from atan2_8::@3
  [51] (signed byte) atan2_8::xi#8 ← (signed byte) atan2_8::x#0
  to:atan2_8::@6
atan2_8::@1: scope:[atan2_8]  from atan2_8
  [52] (signed byte) atan2_8::yi#11 ← (signed byte) atan2_8::y#0
  to:atan2_8::@3

(void()) init_font_hex((byte*) init_font_hex::charset)
init_font_hex: scope:[init_font_hex]  from main
  [53] phi()
  to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex]  from init_font_hex init_font_hex::@5
  [54] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
  [54] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte*) FONT_HEX_PROTO init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
  [54] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET init_font_hex::@5/(byte*) 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
  [55] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
  [55] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte*) FONT_HEX_PROTO init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
  [55] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
  [56] *((byte*) init_font_hex::charset#2) ← (byte) 0
  to:init_font_hex::@3
init_font_hex::@3: scope:[init_font_hex]  from init_font_hex::@2 init_font_hex::@3
  [57] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
  [57] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
  [58] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
  [59] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
  [60] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
  [61] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
  [62] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
  [63] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
  [64] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
  to:init_font_hex::@4
init_font_hex::@4: scope:[init_font_hex]  from init_font_hex::@3
  [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
  [66] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
  [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
  [68] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
  [69] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
  [70] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
  [71] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
  to:init_font_hex::@5
init_font_hex::@5: scope:[init_font_hex]  from init_font_hex::@4
  [72] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
  [73] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
  [74] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
  to:init_font_hex::@return
init_font_hex::@return: scope:[init_font_hex]  from init_font_hex::@5
  [75] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y)
(signed byte~) atan2_8::$2 4.0
(signed byte~) atan2_8::$7 4.0
(byte) atan2_8::angle
(byte) atan2_8::angle#1 3.0
(byte) atan2_8::angle#11 4.0
(byte) atan2_8::angle#12 444.8888888888889
(byte) atan2_8::angle#13 1334.6666666666667
(byte) atan2_8::angle#2 2002.0
(byte) atan2_8::angle#3 2002.0
(byte) atan2_8::angle#4 4.0
(byte) atan2_8::angle#5 4.0
(byte) atan2_8::angle#6 2004.0
(byte) atan2_8::i
(byte) atan2_8::i#1 1501.5
(byte) atan2_8::i#2 500.50000000000006
(byte) atan2_8::return
(byte) atan2_8::return#0 34.99999999999999
(byte) atan2_8::return#2 202.0
(signed byte) atan2_8::x
(signed byte) atan2_8::x#0 4.192307692307692
(signed byte) atan2_8::xd
(signed byte) atan2_8::xd#0 600.5999999999999
(signed byte) atan2_8::xi
(signed byte) atan2_8::xi#0 6.0
(signed byte) atan2_8::xi#1 667.3333333333334
(signed byte) atan2_8::xi#2 667.3333333333334
(signed byte) atan2_8::xi#3 801.2
(signed byte) atan2_8::xi#7 1001.0
(signed byte) atan2_8::xi#8 4.0
(signed byte) atan2_8::y
(signed byte) atan2_8::y#0 3.8928571428571437
(signed byte) atan2_8::yd
(signed byte) atan2_8::yd#0 1501.5
(signed byte) atan2_8::yi
(signed byte) atan2_8::yi#0 1.2000000000000002
(signed byte) atan2_8::yi#1 1001.0
(signed byte) atan2_8::yi#11 4.0
(signed byte) atan2_8::yi#2 1001.0
(signed byte) atan2_8::yi#3 858.2857142857142
(signed byte) atan2_8::yi#7 1001.0
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0 1001.0
(byte~) init_font_hex::$1 2002.0
(byte~) init_font_hex::$2 2002.0
(byte) init_font_hex::c
(byte) init_font_hex::c#1 16.5
(byte) init_font_hex::c#6 1.1578947368421053
(byte) init_font_hex::c1
(byte) init_font_hex::c1#1 151.5
(byte) init_font_hex::c1#4 13.466666666666667
(byte*) init_font_hex::charset
(byte*) init_font_hex::charset#0 35.5
(byte*) init_font_hex::charset#2 108.35714285714285
(byte*) init_font_hex::charset#5 22.0
(byte) init_font_hex::i
(byte) init_font_hex::i#1 1501.5
(byte) init_font_hex::i#2 667.3333333333334
(byte) init_font_hex::idx
(byte) init_font_hex::idx#2 551.0
(byte) init_font_hex::idx#3 202.0
(byte) init_font_hex::idx#5 600.5999999999999
(byte*) init_font_hex::proto_hi
(byte*) init_font_hex::proto_hi#1 7.333333333333333
(byte*) init_font_hex::proto_hi#6 56.83333333333334
(byte*) init_font_hex::proto_lo
(byte*) init_font_hex::proto_lo#1 50.5
(byte*) init_font_hex::proto_lo#4 92.53846153846155
(void()) main()
(byte) main::angle
(byte) main::angle#0 202.0
(byte*) main::screen
(byte*) main::screen#1 42.599999999999994
(byte*) main::screen#2 44.85714285714286
(byte*) main::screen#4 22.0
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(byte*) main::toD0181_screen
(signed byte) main::x
(signed byte) main::x#1 151.5
(signed byte) main::x#2 37.875
(signed byte) main::y
(signed byte) main::y#1 16.5
(signed byte) 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 ]
[ 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#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ]
[ 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 ]
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 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 ]
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 ]
Complete equivalence classes
[ main::y#4 main::y#1 ]
[ main::x#2 main::x#1 ]
[ main::screen#2 main::screen#4 main::screen#1 ]
[ 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#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ]
[ 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::x#0 ]
[ atan2_8::y#0 ]
[ atan2_8::return#2 ]
[ main::angle#0 ]
[ atan2_8::xd#0 ]
[ atan2_8::yd#0 ]
[ init_font_hex::$0 ]
[ init_font_hex::$1 ]
[ init_font_hex::$2 ]
[ init_font_hex::idx#3 ]
Allocated zp[1]:2 [ main::y#4 main::y#1 ]
Allocated zp[1]:3 [ main::x#2 main::x#1 ]
Allocated zp[2]:4 [ main::screen#2 main::screen#4 main::screen#1 ]
Allocated zp[1]:6 [ 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]:7 [ 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]:8 [ atan2_8::i#2 atan2_8::i#1 ]
Allocated zp[1]:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Allocated zp[1]:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ]
Allocated zp[2]:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated zp[2]:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated zp[2]:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated zp[1]:19 [ init_font_hex::i#2 init_font_hex::i#1 ]
Allocated zp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated zp[1]:21 [ atan2_8::x#0 ]
Allocated zp[1]:22 [ atan2_8::y#0 ]
Allocated zp[1]:23 [ atan2_8::return#2 ]
Allocated zp[1]:24 [ main::angle#0 ]
Allocated zp[1]:25 [ atan2_8::xd#0 ]
Allocated zp[1]:26 [ atan2_8::yd#0 ]
Allocated zp[1]:27 [ init_font_hex::$0 ]
Allocated zp[1]:28 [ init_font_hex::$1 ]
Allocated zp[1]:29 [ init_font_hex::$2 ]
Allocated zp[1]:30 [ init_font_hex::idx#3 ]

INITIAL ASM
Target platform is c64basic / MOS6502X
  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label D018 = $d018
  // Color Ram
  .label COLS = $d800
  // The number of iterations performed during 8-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_8 = 8
  .label CHARSET = $2000
  .label SCREEN = $2800
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label col00 = COLS+$c*$28+$13
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label angle = $18
    .label screen = 4
    .label x = 3
    .label y = 2
    // [5] call init_font_hex 
    // [53] phi from main to init_font_hex [phi:main->init_font_hex]
  init_font_hex_from_main:
    jsr init_font_hex
    // [6] phi from main to main::toD0181 [phi:main->main::toD0181]
  toD0181_from_main:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp __b5
    // main::@5
  __b5:
    // [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [8] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  __b1_from___b5:
    // [8] phi (byte*) main::screen#4 = (const byte*) SCREEN [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [8] phi (signed byte) main::y#4 = (signed byte) -$c [phi:main::@5->main::@1#1] -- vbsz1=vbsc1 
    lda #-$c
    sta.z y
    jmp __b1
    // [8] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  __b1_from___b3:
    // [8] phi (byte*) main::screen#4 = (byte*) main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [8] phi (signed byte) main::y#4 = (signed byte) main::y#1 [phi:main::@3->main::@1#1] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#4 [phi:main::@1->main::@2#0] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    jmp __b2
    // [9] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
  __b2_from___b6:
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@6->main::@2#0] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@6->main::@2#1] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [10] (signed byte) atan2_8::x#0 ← (signed byte) main::x#2 -- vbsz1=vbsz2 
    lda.z x
    sta.z atan2_8.x
    // [11] (signed byte) atan2_8::y#0 ← (signed byte) main::y#4 -- vbsz1=vbsz2 
    lda.z y
    sta.z atan2_8.y
    // [12] call atan2_8 
    jsr atan2_8
    // [13] (byte) atan2_8::return#2 ← (byte) atan2_8::return#0 -- vbuz1=vbuz2 
    lda.z atan2_8.return
    sta.z atan2_8.return_1
    jmp __b6
    // main::@6
  __b6:
    // [14] (byte) main::angle#0 ← (byte) atan2_8::return#2 -- vbuz1=vbuz2 
    lda.z atan2_8.return_1
    sta.z angle
    // [15] *((byte*) main::screen#2) ← (byte) main::angle#0 -- _deref_pbuz1=vbuz2 
    lda.z angle
    ldy #0
    sta (screen),y
    // [16] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [17] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [18] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp.z x
    bne __b2_from___b6
    jmp __b3
    // main::@3
  __b3:
    // [19] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [20] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp.z y
    bne __b1_from___b3
    jmp __b4
    // main::@4
  __b4:
    // [21] *((const byte*) main::col00) ← ++ *((const byte*) main::col00) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b4
}
  // 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)
// atan2_8(signed byte zp($15) x, signed byte zp($16) y)
atan2_8: {
    .label __2 = 6
    .label __7 = 7
    .label yi = 6
    .label xi = 7
    .label xd = $19
    .label yd = $1a
    .label angle = $a
    .label angle_1 = 9
    .label i = 8
    .label return = $a
    .label x = $15
    .label y = $16
    .label return_1 = $17
    // [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 -- vbsz1_gt_0_then_la1 
    lda.z y
    cmp #0
    beq !+
    bpl __b1
  !:
    jmp __b2
    // atan2_8::@2
  __b2:
    // [23] (signed byte~) atan2_8::$2 ← - (signed byte) atan2_8::y#0 -- vbsz1=_neg_vbsz2 
    lda.z y
    eor #$ff
    clc
    adc #1
    sta.z __2
    // [24] 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:
    // [24] phi (signed byte) atan2_8::yi#0 = (signed byte) atan2_8::yi#11 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3#0] -- register_copy 
    jmp __b3
    // atan2_8::@3
  __b3:
    // [25] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 -- vbsz1_gt_0_then_la1 
    lda.z x
    cmp #0
    beq !+
    bpl __b4
  !:
    jmp __b5
    // atan2_8::@5
  __b5:
    // [26] (signed byte~) atan2_8::$7 ← - (signed byte) atan2_8::x#0 -- vbsz1=_neg_vbsz2 
    lda.z x
    eor #$ff
    clc
    adc #1
    sta.z __7
    // [27] 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:
    // [27] phi (signed byte) atan2_8::xi#0 = (signed byte) atan2_8::xi#8 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6#0] -- register_copy 
    jmp __b6
    // atan2_8::@6
  __b6:
    // [28] phi from atan2_8::@6 to atan2_8::@10 [phi:atan2_8::@6->atan2_8::@10]
  __b10_from___b6:
    // [28] phi (byte) atan2_8::angle#12 = (byte) 0 [phi:atan2_8::@6->atan2_8::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta.z angle_1
    // [28] phi (byte) atan2_8::i#2 = (byte) 0 [phi:atan2_8::@6->atan2_8::@10#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [28] phi (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#0 [phi:atan2_8::@6->atan2_8::@10#2] -- register_copy 
    // [28] phi (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#0 [phi:atan2_8::@6->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@10
  __b10:
    // [29] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@11 -- vbsz1_neq_0_then_la1 
    lda.z yi
    cmp #0
    bne __b11
    // [30] 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:
    // [30] phi (byte) atan2_8::angle#6 = (byte) atan2_8::angle#12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12#0] -- register_copy 
    jmp __b12
    // atan2_8::@12
  __b12:
    // [31] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 >> (byte) 1 -- vbuz1=vbuz2_ror_1 
    lda.z angle_1
    lsr
    sta.z angle
    // [32] if((signed byte) atan2_8::x#0>=(signed byte) 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:
    // [33] (byte) atan2_8::angle#4 ← (byte) $80 - (byte) atan2_8::angle#1 -- vbuz1=vbuc1_minus_vbuz1 
    lda #$80
    sec
    sbc.z angle
    sta.z angle
    // [34] 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:
    // [34] phi (byte) atan2_8::angle#11 = (byte) atan2_8::angle#1 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7#0] -- register_copy 
    jmp __b7
    // atan2_8::@7
  __b7:
    // [35] if((signed byte) atan2_8::y#0>=(signed byte) 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:
    // [36] (byte) atan2_8::angle#5 ← - (byte) atan2_8::angle#11 -- vbuz1=_neg_vbuz1 
    lda.z angle
    eor #$ff
    clc
    adc #1
    sta.z angle
    // [37] 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:
    // [37] phi (byte) atan2_8::return#0 = (byte) 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:
    // [38] return 
    rts
    // atan2_8::@11
  __b11:
    // [39] (signed byte) atan2_8::xd#0 ← (signed byte) atan2_8::xi#3 >> (byte) 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
    // [40] (signed byte) atan2_8::yd#0 ← (signed byte) atan2_8::yi#3 >> (byte) atan2_8::i#2 -- vbsz1=vbsz2_ror_vbuz3 
    lda.z yi
    ldy.z i
    cpy #0
    beq !e+
  !l:
    cmp #$80
    ror
    dey
    bne !l-
  !e:
    sta.z yd
    // [41] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@13 -- vbsz1_gt_0_then_la1 
    lda.z yi
    cmp #0
    beq !+
    bpl __b13
  !:
    jmp __b15
    // atan2_8::@15
  __b15:
    // [42] (signed byte) atan2_8::xi#2 ← (signed byte) atan2_8::xi#3 - (signed byte) atan2_8::yd#0 -- vbsz1=vbsz1_minus_vbsz2 
    lda.z xi
    sec
    sbc.z yd
    sta.z xi
    // [43] (signed byte) atan2_8::yi#2 ← (signed byte) atan2_8::yi#3 + (signed byte) atan2_8::xd#0 -- vbsz1=vbsz1_plus_vbsz2 
    lda.z yi
    clc
    adc.z xd
    sta.z yi
    // [44] (byte) atan2_8::angle#3 ← (byte) atan2_8::angle#12 - *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) atan2_8::i#2) -- vbuz1=vbuz1_minus_pbuc1_derefidx_vbuz2 
    lda.z angle_1
    ldy.z i
    sec
    sbc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle_1
    // [45] 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:
    // [45] phi (signed byte) atan2_8::xi#7 = (signed byte) atan2_8::xi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#0] -- register_copy 
    // [45] phi (byte) atan2_8::angle#13 = (byte) atan2_8::angle#2 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#1] -- register_copy 
    // [45] phi (signed byte) atan2_8::yi#7 = (signed byte) atan2_8::yi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#2] -- register_copy 
    jmp __b14
    // atan2_8::@14
  __b14:
    // [46] (byte) atan2_8::i#1 ← ++ (byte) atan2_8::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [47] if((byte) atan2_8::i#1==(const byte) CORDIC_ITERATIONS_8-(byte) 1+(byte) 1) goto atan2_8::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #CORDIC_ITERATIONS_8-1+1
    cmp.z i
    beq __b12_from___b14
    // [28] phi from atan2_8::@14 to atan2_8::@10 [phi:atan2_8::@14->atan2_8::@10]
  __b10_from___b14:
    // [28] phi (byte) atan2_8::angle#12 = (byte) atan2_8::angle#13 [phi:atan2_8::@14->atan2_8::@10#0] -- register_copy 
    // [28] phi (byte) atan2_8::i#2 = (byte) atan2_8::i#1 [phi:atan2_8::@14->atan2_8::@10#1] -- register_copy 
    // [28] phi (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#7 [phi:atan2_8::@14->atan2_8::@10#2] -- register_copy 
    // [28] phi (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#7 [phi:atan2_8::@14->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@13
  __b13:
    // [48] (signed byte) atan2_8::xi#1 ← (signed byte) atan2_8::xi#3 + (signed byte) atan2_8::yd#0 -- vbsz1=vbsz1_plus_vbsz2 
    lda.z xi
    clc
    adc.z yd
    sta.z xi
    // [49] (signed byte) atan2_8::yi#1 ← (signed byte) atan2_8::yi#3 - (signed byte) atan2_8::xd#0 -- vbsz1=vbsz1_minus_vbsz2 
    lda.z yi
    sec
    sbc.z xd
    sta.z yi
    // [50] (byte) atan2_8::angle#2 ← (byte) atan2_8::angle#12 + *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) atan2_8::i#2) -- vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 
    lda.z angle_1
    ldy.z i
    clc
    adc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle_1
    jmp __b14_from___b13
    // atan2_8::@4
  __b4:
    // [51] (signed byte) atan2_8::xi#8 ← (signed byte) atan2_8::x#0 -- vbsz1=vbsz2 
    lda.z x
    sta.z xi
    jmp __b6_from___b4
    // atan2_8::@1
  __b1:
    // [52] (signed byte) atan2_8::yi#11 ← (signed byte) atan2_8::y#0 -- vbsz1=vbsz2 
    lda.z y
    sta.z yi
    jmp __b3_from___b1
}
  // init_font_hex
// Make charset from proto chars
// init_font_hex(byte* zp($e) charset)
init_font_hex: {
    .label __0 = $1b
    .label __1 = $1c
    .label __2 = $1d
    .label idx = $14
    .label i = $13
    .label idx_1 = $1e
    .label proto_lo = $10
    .label charset = $e
    .label c1 = $12
    .label proto_hi = $b
    .label c = $d
    // [54] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
  __b1_from_init_font_hex:
    // [54] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [54] phi (byte*) init_font_hex::proto_hi#6 = (const byte*) 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
    // [54] phi (byte*) init_font_hex::charset#5 = (const byte*) 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
    // [54] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
  __b1_from___b5:
    // [54] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [54] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy 
    // [54] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy 
    jmp __b1
    // init_font_hex::@1
  __b1:
    // [55] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
  __b2_from___b1:
    // [55] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [55] phi (byte*) init_font_hex::proto_lo#4 = (const byte*) 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
    // [55] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy 
    jmp __b2
    // [55] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
  __b2_from___b4:
    // [55] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [55] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy 
    // [55] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy 
    jmp __b2
    // init_font_hex::@2
  __b2:
    // [56] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (charset),y
    // [57] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
  __b3_from___b2:
    // [57] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [57] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    jmp __b3
    // [57] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
  __b3_from___b3:
    // [57] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [57] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy 
    jmp __b3
    // init_font_hex::@3
  __b3:
    // [58] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 
    ldy.z i
    lda (proto_hi),y
    asl
    asl
    asl
    asl
    sta.z __0
    // [59] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 
    ldy.z i
    lda (proto_lo),y
    asl
    sta.z __1
    // [60] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 
    lda.z __0
    ora.z __1
    sta.z __2
    // [61] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 
    lda.z __2
    ldy.z idx
    sta (charset),y
    // [62] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // [63] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [64] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #5
    cmp.z i
    bne __b3_from___b3
    jmp __b4
    // init_font_hex::@4
  __b4:
    // [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx
    sta (charset),y
    // [66] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 
    ldy.z idx
    iny
    sty.z idx_1
    // [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx_1
    sta (charset),y
    // [68] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_lo
    sta.z proto_lo
    bcc !+
    inc.z proto_lo+1
  !:
    // [69] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc.z charset
    sta.z charset
    bcc !+
    inc.z charset+1
  !:
    // [70] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [71] if((byte) init_font_hex::c1#1!=(byte) $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:
    // [72] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_hi
    sta.z proto_hi
    bcc !+
    inc.z proto_hi+1
  !:
    // [73] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [74] if((byte) init_font_hex::c#1!=(byte) $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:
    // [75] return 
    rts
}
  // File 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


REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((byte*) main::screen#2) ← (byte) main::angle#0 [ main::y#4 main::x#2 main::screen#2 ] ( main: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]:2 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:3 [ main::x#2 main::x#1 ]
Statement [23] (signed byte~) atan2_8::$2 ← - (signed byte) atan2_8::y#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:21 [ atan2_8::x#0 ]
Removing always clobbered register reg byte a as potential for zp[1]:22 [ atan2_8::y#0 ]
Statement [25] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:6 [ 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 [26] (signed byte~) atan2_8::$7 ← - (signed byte) atan2_8::x#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] ) always clobbers reg byte a 
Statement [29] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@11 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:7 [ 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]:8 [ atan2_8::i#2 atan2_8::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Statement [31] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 >> (byte) 1 [ atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] ) always clobbers reg byte a 
Statement [33] (byte) atan2_8::angle#4 ← (byte) $80 - (byte) atan2_8::angle#1 [ atan2_8::y#0 atan2_8::angle#4 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::y#0 atan2_8::angle#4 ] ) always clobbers reg byte a 
Statement [36] (byte) atan2_8::angle#5 ← - (byte) atan2_8::angle#11 [ atan2_8::angle#5 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::angle#5 ] ) always clobbers reg byte a 
Statement [39] (signed byte) atan2_8::xd#0 ← (signed byte) atan2_8::xi#3 >> (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [40] (signed byte) atan2_8::yd#0 ← (signed byte) atan2_8::yi#3 >> (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:25 [ atan2_8::xd#0 ]
Statement [41] if((signed byte) atan2_8::yi#3>(signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp[1]:26 [ atan2_8::yd#0 ]
Statement [42] (signed byte) atan2_8::xi#2 ← (signed byte) atan2_8::xi#3 - (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [43] (signed byte) atan2_8::yi#2 ← (signed byte) atan2_8::yi#3 + (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [44] (byte) atan2_8::angle#3 ← (byte) atan2_8::angle#12 - *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [48] (signed byte) atan2_8::xi#1 ← (signed byte) atan2_8::xi#3 + (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [49] (signed byte) atan2_8::yi#1 ← (signed byte) atan2_8::yi#3 - (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [50] (byte) atan2_8::angle#2 ← (byte) atan2_8::angle#12 + *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [56] *((byte*) init_font_hex::charset#2) ← (byte) 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 ] ( main:2::init_font_hex:5 [ 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]:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Removing always clobbered register reg byte y as potential for zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Statement [58] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 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 ] ( main:2::init_font_hex:5 [ 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]:19 [ init_font_hex::i#2 init_font_hex::i#1 ]
Removing always clobbered register reg byte a as potential for zp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Statement [59] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 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 ] ( main:2::init_font_hex:5 [ 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]:27 [ init_font_hex::$0 ]
Statement [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [68] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 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 ] ( main:2::init_font_hex: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 ] ) always clobbers reg byte a 
Statement [69] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [72] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a 
Statement [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [15] *((byte*) main::screen#2) ← (byte) main::angle#0 [ main::y#4 main::x#2 main::screen#2 ] ( main:2 [ main::y#4 main::x#2 main::screen#2 ] ) always clobbers reg byte y 
Statement [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 [ atan2_8::x#0 atan2_8::y#0 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 ] ) always clobbers reg byte a 
Statement [23] (signed byte~) atan2_8::$2 ← - (signed byte) atan2_8::y#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::$2 ] ) always clobbers reg byte a 
Statement [25] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 ] ) always clobbers reg byte a 
Statement [26] (signed byte~) atan2_8::$7 ← - (signed byte) atan2_8::x#0 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::yi#0 atan2_8::$7 ] ) always clobbers reg byte a 
Statement [29] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@11 [ atan2_8::x#0 atan2_8::y#0 atan2_8::yi#3 atan2_8::xi#3 atan2_8::i#2 atan2_8::angle#12 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [31] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 >> (byte) 1 [ atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::x#0 atan2_8::y#0 atan2_8::angle#1 ] ) always clobbers reg byte a 
Statement [33] (byte) atan2_8::angle#4 ← (byte) $80 - (byte) atan2_8::angle#1 [ atan2_8::y#0 atan2_8::angle#4 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::y#0 atan2_8::angle#4 ] ) always clobbers reg byte a 
Statement [36] (byte) atan2_8::angle#5 ← - (byte) atan2_8::angle#11 [ atan2_8::angle#5 ] ( main:2::atan2_8:12 [ main::y#4 main::x#2 main::screen#2 atan2_8::angle#5 ] ) always clobbers reg byte a 
Statement [39] (signed byte) atan2_8::xd#0 ← (signed byte) atan2_8::xi#3 >> (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [40] (signed byte) atan2_8::yd#0 ← (signed byte) atan2_8::yi#3 >> (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [41] if((signed byte) atan2_8::yi#3>(signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [42] (signed byte) atan2_8::xi#2 ← (signed byte) atan2_8::xi#3 - (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [43] (signed byte) atan2_8::yi#2 ← (signed byte) atan2_8::yi#3 + (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [44] (byte) atan2_8::angle#3 ← (byte) atan2_8::angle#12 - *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [48] (signed byte) atan2_8::xi#1 ← (signed byte) atan2_8::xi#3 + (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [49] (signed byte) atan2_8::yi#1 ← (signed byte) atan2_8::yi#3 - (signed byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [50] (byte) atan2_8::angle#2 ← (byte) atan2_8::angle#12 + *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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 ] ( main:2::atan2_8:12 [ 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 ] ) always clobbers reg byte a 
Statement [56] *((byte*) init_font_hex::charset#2) ← (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [58] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [59] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [68] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 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 ] ( main:2::init_font_hex: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 ] ) always clobbers reg byte a 
Statement [69] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 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 ] ( main:2::init_font_hex:5 [ 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 [72] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a 
Potential registers zp[1]:2 [ main::y#4 main::y#1 ] : zp[1]:2 , reg byte x , 
Potential registers zp[1]:3 [ main::x#2 main::x#1 ] : zp[1]:3 , reg byte x , 
Potential registers zp[2]:4 [ main::screen#2 main::screen#4 main::screen#1 ] : zp[2]:4 , 
Potential registers zp[1]:6 [ 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]:6 , reg byte x , reg byte y , 
Potential registers zp[1]:7 [ 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]:7 , reg byte x , reg byte y , 
Potential registers zp[1]:8 [ atan2_8::i#2 atan2_8::i#1 ] : zp[1]:8 , reg byte x , reg byte y , 
Potential registers zp[1]:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] : zp[1]:9 , reg byte x , reg byte y , 
Potential registers zp[1]:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[2]:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp[2]:11 , 
Potential registers zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp[1]:13 , reg byte x , 
Potential registers zp[2]:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp[2]:14 , 
Potential registers zp[2]:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp[2]:16 , 
Potential registers zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp[1]:18 , reg byte x , 
Potential registers zp[1]:19 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp[1]:19 , reg byte x , reg byte y , 
Potential registers zp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp[1]:20 , reg byte x , reg byte y , 
Potential registers zp[1]:21 [ atan2_8::x#0 ] : zp[1]:21 , reg byte x , reg byte y , 
Potential registers zp[1]:22 [ atan2_8::y#0 ] : zp[1]:22 , reg byte x , reg byte y , 
Potential registers zp[1]:23 [ atan2_8::return#2 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:24 [ main::angle#0 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:25 [ atan2_8::xd#0 ] : zp[1]:25 , reg byte x , reg byte y , 
Potential registers zp[1]:26 [ atan2_8::yd#0 ] : zp[1]:26 , reg byte x , reg byte y , 
Potential registers zp[1]:27 [ init_font_hex::$0 ] : zp[1]:27 , reg byte x , reg byte y , 
Potential registers zp[1]:28 [ init_font_hex::$1 ] : zp[1]:28 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:29 [ init_font_hex::$2 ] : zp[1]:29 , reg byte a , reg byte x , reg byte y , 
Potential registers zp[1]:30 [ init_font_hex::idx#3 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [atan2_8] 7,787.56: zp[1]:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] 3,870.49: zp[1]:6 [ 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,150.87: zp[1]:7 [ 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,002: zp[1]:8 [ atan2_8::i#2 atan2_8::i#1 ] 1,501.5: zp[1]:26 [ atan2_8::yd#0 ] 600.6: zp[1]:25 [ atan2_8::xd#0 ] 202: zp[1]:23 [ atan2_8::return#2 ] 50: zp[1]:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ] 4.19: zp[1]:21 [ atan2_8::x#0 ] 3.89: zp[1]:22 [ atan2_8::y#0 ] 
Uplift Scope [init_font_hex] 2,168.83: zp[1]:19 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp[1]:28 [ init_font_hex::$1 ] 2,002: zp[1]:29 [ init_font_hex::$2 ] 1,151.6: zp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp[1]:27 [ init_font_hex::$0 ] 202: zp[1]:30 [ init_font_hex::idx#3 ] 165.86: zp[2]:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp[2]:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp[2]:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Uplift Scope [main] 202: zp[1]:24 [ main::angle#0 ] 189.38: zp[1]:3 [ main::x#2 main::x#1 ] 109.46: zp[2]:4 [ main::screen#2 main::screen#4 main::screen#1 ] 27.68: zp[1]:2 [ main::y#4 main::y#1 ] 
Uplift Scope [] 

Uplifting [atan2_8] best 278273 combination zp[1]:9 [ 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]:7 [ 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]:8 [ atan2_8::i#2 atan2_8::i#1 ] zp[1]:26 [ atan2_8::yd#0 ] zp[1]:25 [ atan2_8::xd#0 ] zp[1]:23 [ atan2_8::return#2 ] zp[1]:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ] zp[1]:21 [ atan2_8::x#0 ] zp[1]:22 [ atan2_8::y#0 ] 
Limited combination testing to 100 combinations of 104976 possible.
Uplifting [init_font_hex] best 259273 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]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp[1]:27 [ init_font_hex::$0 ] zp[1]:30 [ init_font_hex::idx#3 ] zp[2]:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp[2]:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp[2]:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [main] best 258673 combination reg byte a [ main::angle#0 ] zp[1]:3 [ main::x#2 main::x#1 ] zp[2]:4 [ main::screen#2 main::screen#4 main::screen#1 ] zp[1]:2 [ main::y#4 main::y#1 ] 
Uplifting [] best 258673 combination 
Attempting to uplift remaining variables inzp[1]:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Uplifting [atan2_8] best 258673 combination zp[1]:9 [ 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]:7 [ 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 258673 combination zp[1]:7 [ 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]:8 [ atan2_8::i#2 atan2_8::i#1 ]
Uplifting [atan2_8] best 258673 combination zp[1]:8 [ atan2_8::i#2 atan2_8::i#1 ] 
Attempting to uplift remaining variables inzp[1]:26 [ atan2_8::yd#0 ]
Uplifting [atan2_8] best 257673 combination reg byte y [ atan2_8::yd#0 ] 
Attempting to uplift remaining variables inzp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 257673 combination zp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 
Attempting to uplift remaining variables inzp[1]:27 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 257673 combination zp[1]:27 [ init_font_hex::$0 ] 
Attempting to uplift remaining variables inzp[1]:25 [ atan2_8::xd#0 ]
Uplifting [atan2_8] best 257673 combination zp[1]:25 [ atan2_8::xd#0 ] 
Attempting to uplift remaining variables inzp[1]:23 [ atan2_8::return#2 ]
Uplifting [atan2_8] best 257073 combination reg byte a [ atan2_8::return#2 ] 
Attempting to uplift remaining variables inzp[1]:30 [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 256473 combination reg byte y [ init_font_hex::idx#3 ] 
Attempting to uplift remaining variables inzp[1]:3 [ main::x#2 main::x#1 ]
Uplifting [main] best 256473 combination zp[1]:3 [ main::x#2 main::x#1 ] 
Attempting to uplift remaining variables inzp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 256473 combination zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 
Attempting to uplift remaining variables inzp[1]:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ]
Uplifting [atan2_8] best 256366 combination reg byte x [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ] 
Attempting to uplift remaining variables inzp[1]:2 [ main::y#4 main::y#1 ]
Uplifting [main] best 256366 combination zp[1]:2 [ main::y#4 main::y#1 ] 
Attempting to uplift remaining variables inzp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 256366 combination zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Attempting to uplift remaining variables inzp[1]:21 [ atan2_8::x#0 ]
Uplifting [atan2_8] best 256366 combination zp[1]:21 [ atan2_8::x#0 ] 
Attempting to uplift remaining variables inzp[1]:22 [ atan2_8::y#0 ]
Uplifting [atan2_8] best 256366 combination zp[1]:22 [ atan2_8::y#0 ] 
Coalescing zero page register [ zp[1]:2 [ main::y#4 main::y#1 ] ] with [ zp[1]:22 [ atan2_8::y#0 ] ] - score: 1
Coalescing zero page register [ zp[1]:3 [ main::x#2 main::x#1 ] ] with [ zp[1]:21 [ atan2_8::x#0 ] ] - score: 1
Coalescing zero page register [ zp[2]:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] with [ zp[2]:4 [ main::screen#2 main::screen#4 main::screen#1 ] ]
Coalescing zero page register [ zp[1]:13 [ init_font_hex::c#6 init_font_hex::c#1 ] ] with [ zp[1]:2 [ main::y#4 main::y#1 atan2_8::y#0 ] ]
Coalescing zero page register [ zp[1]:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ] with [ zp[1]:3 [ main::x#2 main::x#1 atan2_8::x#0 ] ]
Coalescing zero page register [ zp[1]:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] ] with [ zp[1]:7 [ 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 ] ]
Coalescing zero page register [ zp[1]:27 [ init_font_hex::$0 ] ] with [ zp[1]:8 [ atan2_8::i#2 atan2_8::i#1 ] ]
Allocated (was zp[1]:9) zp[1]:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Allocated (was zp[2]:11) zp[2]:3 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 main::screen#2 main::screen#4 main::screen#1 ]
Allocated (was zp[1]:13) zp[1]:5 [ init_font_hex::c#6 init_font_hex::c#1 main::y#4 main::y#1 atan2_8::y#0 ]
Allocated (was zp[2]:14) zp[2]:6 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated (was zp[2]:16) zp[2]:8 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated (was zp[1]:18) zp[1]:10 [ init_font_hex::c1#4 init_font_hex::c1#1 main::x#2 main::x#1 atan2_8::x#0 ]
Allocated (was zp[1]:20) zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#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 ]
Allocated (was zp[1]:25) zp[1]:12 [ atan2_8::xd#0 ]
Allocated (was zp[1]:27) zp[1]:13 [ init_font_hex::$0 atan2_8::i#2 atan2_8::i#1 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(__bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  .label D018 = $d018
  // Color Ram
  .label COLS = $d800
  // The number of iterations performed during 8-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_8 = 8
  .label CHARSET = $2000
  .label SCREEN = $2800
  // @begin
__bbegin:
  // [1] phi from @begin to @1 [phi:@begin->@1]
__b1_from___bbegin:
  jmp __b1
  // @1
__b1:
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
main_from___b1:
  jsr main
  // [3] phi from @1 to @end [phi:@1->@end]
__bend_from___b1:
  jmp __bend
  // @end
__bend:
  // main
main: {
    .label col00 = COLS+$c*$28+$13
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label screen = 3
    .label x = $a
    .label y = 5
    // [5] call init_font_hex 
    // [53] phi from main to init_font_hex [phi:main->init_font_hex]
  init_font_hex_from_main:
    jsr init_font_hex
    // [6] phi from main to main::toD0181 [phi:main->main::toD0181]
  toD0181_from_main:
    jmp toD0181
    // main::toD0181
  toD0181:
    jmp __b5
    // main::@5
  __b5:
    // [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [8] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
  __b1_from___b5:
    // [8] phi (byte*) main::screen#4 = (const byte*) SCREEN [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [8] phi (signed byte) main::y#4 = (signed byte) -$c [phi:main::@5->main::@1#1] -- vbsz1=vbsc1 
    lda #-$c
    sta.z y
    jmp __b1
    // [8] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  __b1_from___b3:
    // [8] phi (byte*) main::screen#4 = (byte*) main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [8] phi (signed byte) main::y#4 = (signed byte) main::y#1 [phi:main::@3->main::@1#1] -- register_copy 
    jmp __b1
    // main::@1
  __b1:
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
  __b2_from___b1:
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#4 [phi:main::@1->main::@2#0] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    jmp __b2
    // [9] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
  __b2_from___b6:
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@6->main::@2#0] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@6->main::@2#1] -- register_copy 
    jmp __b2
    // main::@2
  __b2:
    // [10] (signed byte) atan2_8::x#0 ← (signed byte) main::x#2
    // [11] (signed byte) atan2_8::y#0 ← (signed byte) main::y#4
    // [12] call atan2_8 
    jsr atan2_8
    // [13] (byte) atan2_8::return#2 ← (byte) atan2_8::return#0 -- vbuaa=vbuxx 
    txa
    jmp __b6
    // main::@6
  __b6:
    // [14] (byte) main::angle#0 ← (byte) atan2_8::return#2
    // [15] *((byte*) main::screen#2) ← (byte) main::angle#0 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (screen),y
    // [16] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // [17] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [18] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp.z x
    bne __b2_from___b6
    jmp __b3
    // main::@3
  __b3:
    // [19] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [20] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp.z y
    bne __b1_from___b3
    jmp __b4
    // main::@4
  __b4:
    // [21] *((const byte*) main::col00) ← ++ *((const byte*) main::col00) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b4
}
  // 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)
// atan2_8(signed byte zp($a) x, signed byte zp(5) y)
atan2_8: {
    .label __7 = $b
    .label xi = $b
    .label xd = $c
    .label angle = 2
    .label i = $d
    .label x = $a
    .label y = 5
    // [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 -- vbsz1_gt_0_then_la1 
    lda.z y
    cmp #0
    beq !+
    bpl __b1
  !:
    jmp __b2
    // atan2_8::@2
  __b2:
    // [23] (signed byte~) atan2_8::$2 ← - (signed byte) atan2_8::y#0 -- vbsxx=_neg_vbsz1 
    lda.z y
    eor #$ff
    clc
    adc #1
    tax
    // [24] 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:
    // [24] phi (signed byte) atan2_8::yi#0 = (signed byte) atan2_8::yi#11 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3#0] -- register_copy 
    jmp __b3
    // atan2_8::@3
  __b3:
    // [25] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 -- vbsz1_gt_0_then_la1 
    lda.z x
    cmp #0
    beq !+
    bpl __b4
  !:
    jmp __b5
    // atan2_8::@5
  __b5:
    // [26] (signed byte~) atan2_8::$7 ← - (signed byte) atan2_8::x#0 -- vbsz1=_neg_vbsz2 
    lda.z x
    eor #$ff
    clc
    adc #1
    sta.z __7
    // [27] 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:
    // [27] phi (signed byte) atan2_8::xi#0 = (signed byte) atan2_8::xi#8 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6#0] -- register_copy 
    jmp __b6
    // atan2_8::@6
  __b6:
    // [28] phi from atan2_8::@6 to atan2_8::@10 [phi:atan2_8::@6->atan2_8::@10]
  __b10_from___b6:
    // [28] phi (byte) atan2_8::angle#12 = (byte) 0 [phi:atan2_8::@6->atan2_8::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta.z angle
    // [28] phi (byte) atan2_8::i#2 = (byte) 0 [phi:atan2_8::@6->atan2_8::@10#1] -- vbuz1=vbuc1 
    lda #0
    sta.z i
    // [28] phi (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#0 [phi:atan2_8::@6->atan2_8::@10#2] -- register_copy 
    // [28] phi (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#0 [phi:atan2_8::@6->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@10
  __b10:
    // [29] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@11 -- vbsxx_neq_0_then_la1 
    txa
    cmp #0
    bne __b11
    // [30] 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:
    // [30] phi (byte) atan2_8::angle#6 = (byte) atan2_8::angle#12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12#0] -- register_copy 
    jmp __b12
    // atan2_8::@12
  __b12:
    // [31] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 >> (byte) 1 -- vbuxx=vbuz1_ror_1 
    lda.z angle
    lsr
    tax
    // [32] if((signed byte) atan2_8::x#0>=(signed byte) 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:
    // [33] (byte) atan2_8::angle#4 ← (byte) $80 - (byte) atan2_8::angle#1 -- vbuxx=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    tax
    axs #-$80-1
    // [34] 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:
    // [34] phi (byte) atan2_8::angle#11 = (byte) atan2_8::angle#1 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7#0] -- register_copy 
    jmp __b7
    // atan2_8::@7
  __b7:
    // [35] if((signed byte) atan2_8::y#0>=(signed byte) 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:
    // [36] (byte) atan2_8::angle#5 ← - (byte) atan2_8::angle#11 -- vbuxx=_neg_vbuxx 
    dex
    txa
    eor #$ff
    tax
    // [37] 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:
    // [37] phi (byte) atan2_8::return#0 = (byte) 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:
    // [38] return 
    rts
    // atan2_8::@11
  __b11:
    // [39] (signed byte) atan2_8::xd#0 ← (signed byte) atan2_8::xi#3 >> (byte) 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
    // [40] (signed byte) atan2_8::yd#0 ← (signed byte) atan2_8::yi#3 >> (byte) 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
    // [41] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@13 -- vbsxx_gt_0_then_la1 
    txa
    cmp #0
    beq !+
    bpl __b13
  !:
    jmp __b15
    // atan2_8::@15
  __b15:
    // [42] (signed byte) atan2_8::xi#2 ← (signed byte) atan2_8::xi#3 - (signed byte) atan2_8::yd#0 -- vbsz1=vbsz1_minus_vbsyy 
    tya
    eor #$ff
    sec
    adc.z xi
    sta.z xi
    // [43] (signed byte) atan2_8::yi#2 ← (signed byte) atan2_8::yi#3 + (signed byte) atan2_8::xd#0 -- vbsxx=vbsxx_plus_vbsz1 
    txa
    clc
    adc.z xd
    tax
    // [44] (byte) atan2_8::angle#3 ← (byte) atan2_8::angle#12 - *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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
    // [45] 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:
    // [45] phi (signed byte) atan2_8::xi#7 = (signed byte) atan2_8::xi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#0] -- register_copy 
    // [45] phi (byte) atan2_8::angle#13 = (byte) atan2_8::angle#2 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#1] -- register_copy 
    // [45] phi (signed byte) atan2_8::yi#7 = (signed byte) atan2_8::yi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#2] -- register_copy 
    jmp __b14
    // atan2_8::@14
  __b14:
    // [46] (byte) atan2_8::i#1 ← ++ (byte) atan2_8::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [47] if((byte) atan2_8::i#1==(const byte) CORDIC_ITERATIONS_8-(byte) 1+(byte) 1) goto atan2_8::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #CORDIC_ITERATIONS_8-1+1
    cmp.z i
    beq __b12_from___b14
    // [28] phi from atan2_8::@14 to atan2_8::@10 [phi:atan2_8::@14->atan2_8::@10]
  __b10_from___b14:
    // [28] phi (byte) atan2_8::angle#12 = (byte) atan2_8::angle#13 [phi:atan2_8::@14->atan2_8::@10#0] -- register_copy 
    // [28] phi (byte) atan2_8::i#2 = (byte) atan2_8::i#1 [phi:atan2_8::@14->atan2_8::@10#1] -- register_copy 
    // [28] phi (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#7 [phi:atan2_8::@14->atan2_8::@10#2] -- register_copy 
    // [28] phi (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#7 [phi:atan2_8::@14->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@13
  __b13:
    // [48] (signed byte) atan2_8::xi#1 ← (signed byte) atan2_8::xi#3 + (signed byte) atan2_8::yd#0 -- vbsz1=vbsz1_plus_vbsyy 
    tya
    clc
    adc.z xi
    sta.z xi
    // [49] (signed byte) atan2_8::yi#1 ← (signed byte) atan2_8::yi#3 - (signed byte) atan2_8::xd#0 -- vbsxx=vbsxx_minus_vbsz1 
    txa
    sec
    sbc.z xd
    tax
    // [50] (byte) atan2_8::angle#2 ← (byte) atan2_8::angle#12 + *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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:
    // [51] (signed byte) atan2_8::xi#8 ← (signed byte) atan2_8::x#0 -- vbsz1=vbsz2 
    lda.z x
    sta.z xi
    jmp __b6_from___b4
    // atan2_8::@1
  __b1:
    // [52] (signed byte) atan2_8::yi#11 ← (signed byte) atan2_8::y#0 -- vbsxx=vbsz1 
    ldx.z y
    jmp __b3_from___b1
}
  // init_font_hex
// Make charset from proto chars
// init_font_hex(byte* zp(6) charset)
init_font_hex: {
    .label __0 = $d
    .label idx = $b
    .label proto_lo = 8
    .label charset = 6
    .label c1 = $a
    .label proto_hi = 3
    .label c = 5
    // [54] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
  __b1_from_init_font_hex:
    // [54] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [54] phi (byte*) init_font_hex::proto_hi#6 = (const byte*) 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
    // [54] phi (byte*) init_font_hex::charset#5 = (const byte*) 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
    // [54] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
  __b1_from___b5:
    // [54] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [54] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy 
    // [54] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy 
    jmp __b1
    // init_font_hex::@1
  __b1:
    // [55] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
  __b2_from___b1:
    // [55] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [55] phi (byte*) init_font_hex::proto_lo#4 = (const byte*) 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
    // [55] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy 
    jmp __b2
    // [55] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
  __b2_from___b4:
    // [55] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [55] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy 
    // [55] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy 
    jmp __b2
    // init_font_hex::@2
  __b2:
    // [56] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (charset),y
    // [57] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
  __b3_from___b2:
    // [57] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [57] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    jmp __b3
    // [57] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
  __b3_from___b3:
    // [57] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [57] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy 
    jmp __b3
    // init_font_hex::@3
  __b3:
    // [58] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 
    txa
    tay
    lda (proto_hi),y
    asl
    asl
    asl
    asl
    sta.z __0
    // [59] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 
    txa
    tay
    lda (proto_lo),y
    asl
    // [60] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __0
    // [61] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z idx
    sta (charset),y
    // [62] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // [63] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [64] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #5
    bne __b3_from___b3
    jmp __b4
    // init_font_hex::@4
  __b4:
    // [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx
    sta (charset),y
    // [66] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    ldy.z idx
    iny
    // [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    lda #0
    sta (charset),y
    // [68] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_lo
    sta.z proto_lo
    bcc !+
    inc.z proto_lo+1
  !:
    // [69] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc.z charset
    sta.z charset
    bcc !+
    inc.z charset+1
  !:
    // [70] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [71] if((byte) init_font_hex::c1#1!=(byte) $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:
    // [72] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_hi
    sta.z proto_hi
    bcc !+
    inc.z proto_hi+1
  !:
    // [73] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [74] if((byte) init_font_hex::c#1!=(byte) $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:
    // [75] return 
    rts
}
  // File 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 __b1
Removing instruction jmp __bend
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 __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
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Removing instruction jmp __b4
Removing instruction jmp __b5
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #0
Replacing instruction ldy #0 with TAY
Removing instruction ldy.z idx
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label __bbegin with __b1
Replacing label __b2_from___b6 with __b2
Replacing label __b1_from___b3 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
Replacing label __b3_from___b3 with __b3
Replacing label __b2_from___b4 with __b2
Replacing label __b1_from___b5 with __b1
Removing instruction __bbegin:
Removing instruction __b1_from___bbegin:
Removing instruction main_from___b1:
Removing instruction __bend_from___b1:
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 __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:
Removing instruction __b1_from___b5:
Removing instruction __b2_from___b1:
Removing instruction __b2_from___b4:
Removing instruction __b3_from___b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction __bend:
Removing instruction init_font_hex_from_main:
Removing instruction __b5:
Removing instruction __b1_from___b5:
Removing instruction __b6:
Removing instruction __b3:
Removing instruction __b2:
Removing instruction __b5:
Removing instruction __b16:
Removing instruction __b9:
Removing instruction __b15:
Removing instruction __b10_from___b14:
Removing instruction __b1_from_init_font_hex:
Removing instruction __b3_from___b2:
Removing instruction __b4:
Removing instruction __b5:
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b1
Removing instruction jmp __b2
Removing instruction jmp __b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __b1:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [66] bpl __b1 to bmi
Fixing long branch [79] bpl __b4 to bmi

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(const byte*) CHARSET = (byte*) 8192
(const byte*) COLS = (byte*) 55296
(const byte*) CORDIC_ATAN2_ANGLES_8[(const byte) CORDIC_ITERATIONS_8]  = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
(const byte) CORDIC_ITERATIONS_8 = (byte) 8
(const byte*) D018 = (byte*) 53272
(const byte*) FONT_HEX_PROTO[]  = { (byte) 2, (byte) 5, (byte) 5, (byte) 5, (byte) 2, (byte) 6, (byte) 2, (byte) 2, (byte) 2, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 4, (byte) 7, (byte) 6, (byte) 1, (byte) 2, (byte) 1, (byte) 6, (byte) 5, (byte) 5, (byte) 7, (byte) 1, (byte) 1, (byte) 7, (byte) 4, (byte) 6, (byte) 1, (byte) 6, (byte) 3, (byte) 4, (byte) 6, (byte) 5, (byte) 2, (byte) 7, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 2, (byte) 5, (byte) 2, (byte) 2, (byte) 5, (byte) 3, (byte) 1, (byte) 1, (byte) 2, (byte) 5, (byte) 7, (byte) 5, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 5, (byte) 6, (byte) 2, (byte) 5, (byte) 4, (byte) 5, (byte) 2, (byte) 6, (byte) 5, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 7, (byte) 7, (byte) 4, (byte) 6, (byte) 4, (byte) 4 }
(const byte*) SCREEN = (byte*) 10240
(byte()) atan2_8((signed byte) atan2_8::x , (signed byte) atan2_8::y)
(signed byte~) atan2_8::$2 reg byte x 4.0
(signed byte~) atan2_8::$7 zp[1]:11 4.0
(label) atan2_8::@1
(label) atan2_8::@10
(label) atan2_8::@11
(label) atan2_8::@12
(label) atan2_8::@13
(label) atan2_8::@14
(label) atan2_8::@15
(label) atan2_8::@16
(label) atan2_8::@2
(label) atan2_8::@3
(label) atan2_8::@4
(label) atan2_8::@5
(label) atan2_8::@6
(label) atan2_8::@7
(label) atan2_8::@8
(label) atan2_8::@9
(label) atan2_8::@return
(byte) atan2_8::angle
(byte) atan2_8::angle#1 reg byte x 3.0
(byte) atan2_8::angle#11 reg byte x 4.0
(byte) atan2_8::angle#12 angle zp[1]:2 444.8888888888889
(byte) atan2_8::angle#13 angle zp[1]:2 1334.6666666666667
(byte) atan2_8::angle#2 angle zp[1]:2 2002.0
(byte) atan2_8::angle#3 angle zp[1]:2 2002.0
(byte) atan2_8::angle#4 reg byte x 4.0
(byte) atan2_8::angle#5 reg byte x 4.0
(byte) atan2_8::angle#6 angle zp[1]:2 2004.0
(byte) atan2_8::i
(byte) atan2_8::i#1 i zp[1]:13 1501.5
(byte) atan2_8::i#2 i zp[1]:13 500.50000000000006
(byte) atan2_8::return
(byte) atan2_8::return#0 reg byte x 34.99999999999999
(byte) atan2_8::return#2 reg byte a 202.0
(signed byte) atan2_8::x
(signed byte) atan2_8::x#0 x zp[1]:10 4.192307692307692
(signed byte) atan2_8::xd
(signed byte) atan2_8::xd#0 xd zp[1]:12 600.5999999999999
(signed byte) atan2_8::xi
(signed byte) atan2_8::xi#0 xi zp[1]:11 6.0
(signed byte) atan2_8::xi#1 xi zp[1]:11 667.3333333333334
(signed byte) atan2_8::xi#2 xi zp[1]:11 667.3333333333334
(signed byte) atan2_8::xi#3 xi zp[1]:11 801.2
(signed byte) atan2_8::xi#7 xi zp[1]:11 1001.0
(signed byte) atan2_8::xi#8 xi zp[1]:11 4.0
(signed byte) atan2_8::y
(signed byte) atan2_8::y#0 y zp[1]:5 3.8928571428571437
(signed byte) atan2_8::yd
(signed byte) atan2_8::yd#0 reg byte y 1501.5
(signed byte) atan2_8::yi
(signed byte) atan2_8::yi#0 reg byte x 1.2000000000000002
(signed byte) atan2_8::yi#1 reg byte x 1001.0
(signed byte) atan2_8::yi#11 reg byte x 4.0
(signed byte) atan2_8::yi#2 reg byte x 1001.0
(signed byte) atan2_8::yi#3 reg byte x 858.2857142857142
(signed byte) atan2_8::yi#7 reg byte x 1001.0
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0 zp[1]:13 1001.0
(byte~) init_font_hex::$1 reg byte a 2002.0
(byte~) init_font_hex::$2 reg byte a 2002.0
(label) init_font_hex::@1
(label) init_font_hex::@2
(label) init_font_hex::@3
(label) init_font_hex::@4
(label) init_font_hex::@5
(label) init_font_hex::@return
(byte) init_font_hex::c
(byte) init_font_hex::c#1 c zp[1]:5 16.5
(byte) init_font_hex::c#6 c zp[1]:5 1.1578947368421053
(byte) init_font_hex::c1
(byte) init_font_hex::c1#1 c1 zp[1]:10 151.5
(byte) init_font_hex::c1#4 c1 zp[1]:10 13.466666666666667
(byte*) init_font_hex::charset
(byte*) init_font_hex::charset#0 charset zp[2]:6 35.5
(byte*) init_font_hex::charset#2 charset zp[2]:6 108.35714285714285
(byte*) init_font_hex::charset#5 charset zp[2]:6 22.0
(byte) init_font_hex::i
(byte) init_font_hex::i#1 reg byte x 1501.5
(byte) init_font_hex::i#2 reg byte x 667.3333333333334
(byte) init_font_hex::idx
(byte) init_font_hex::idx#2 idx zp[1]:11 551.0
(byte) init_font_hex::idx#3 reg byte y 202.0
(byte) init_font_hex::idx#5 idx zp[1]:11 600.5999999999999
(byte*) init_font_hex::proto_hi
(byte*) init_font_hex::proto_hi#1 proto_hi zp[2]:3 7.333333333333333
(byte*) init_font_hex::proto_hi#6 proto_hi zp[2]:3 56.83333333333334
(byte*) init_font_hex::proto_lo
(byte*) init_font_hex::proto_lo#1 proto_lo zp[2]:8 50.5
(byte*) init_font_hex::proto_lo#4 proto_lo zp[2]:8 92.53846153846155
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(byte) main::angle
(byte) main::angle#0 reg byte a 202.0
(const byte*) main::col00 = (const byte*) COLS+(word)(number) $c*(number) $28+(byte) $13
(byte*) main::screen
(byte*) main::screen#1 screen zp[2]:3 42.599999999999994
(byte*) main::screen#2 screen zp[2]:3 44.85714285714286
(byte*) main::screen#4 screen zp[2]:3 22.0
(label) main::toD0181
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(signed byte) main::x
(signed byte) main::x#1 x zp[1]:10 151.5
(signed byte) main::x#2 x zp[1]:10 37.875
(signed byte) main::y
(signed byte) main::y#1 y zp[1]:5 16.5
(signed byte) main::y#4 y zp[1]:5 11.181818181818182

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]: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::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ]
zp[2]:3 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 main::screen#2 main::screen#4 main::screen#1 ]
zp[1]:5 [ init_font_hex::c#6 init_font_hex::c#1 main::y#4 main::y#1 atan2_8::y#0 ]
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 ]
zp[1]:10 [ init_font_hex::c1#4 init_font_hex::c1#1 main::x#2 main::x#1 atan2_8::x#0 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#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 ]
reg byte a [ atan2_8::return#2 ]
reg byte a [ main::angle#0 ]
zp[1]:12 [ atan2_8::xd#0 ]
reg byte y [ atan2_8::yd#0 ]
zp[1]:13 [ init_font_hex::$0 atan2_8::i#2 atan2_8::i#1 ]
reg byte a [ init_font_hex::$1 ]
reg byte a [ init_font_hex::$2 ]
reg byte y [ init_font_hex::idx#3 ]


FINAL ASSEMBLER
Score: 232290

  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  .label D018 = $d018
  // Color Ram
  .label COLS = $d800
  // The number of iterations performed during 8-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_8 = 8
  .label CHARSET = $2000
  .label SCREEN = $2800
  // @begin
  // [1] phi from @begin to @1 [phi:@begin->@1]
  // @1
  // [2] call main 
  // [4] phi from @1 to main [phi:@1->main]
  // [3] phi from @1 to @end [phi:@1->@end]
  // @end
  // main
main: {
    .label col00 = COLS+$c*$28+$13
    .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
    .label screen = 3
    .label x = $a
    .label y = 5
    // init_font_hex(CHARSET)
    // [5] call init_font_hex 
    // [53] phi from main to init_font_hex [phi:main->init_font_hex]
    jsr init_font_hex
    // [6] phi from main to main::toD0181 [phi:main->main::toD0181]
    // main::toD0181
    // main::@5
    // *D018 = toD018(SCREEN, CHARSET)
    // [7] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [8] phi from main::@5 to main::@1 [phi:main::@5->main::@1]
    // [8] phi (byte*) main::screen#4 = (const byte*) SCREEN [phi:main::@5->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta.z screen
    lda #>SCREEN
    sta.z screen+1
    // [8] phi (signed byte) main::y#4 = (signed byte) -$c [phi:main::@5->main::@1#1] -- vbsz1=vbsc1 
    lda #-$c
    sta.z y
    // [8] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [8] phi (byte*) main::screen#4 = (byte*) main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [8] phi (signed byte) main::y#4 = (signed byte) main::y#1 [phi:main::@3->main::@1#1] -- register_copy 
    // main::@1
  __b1:
    // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2]
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#4 [phi:main::@1->main::@2#0] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#1] -- vbsz1=vbsc1 
    lda #-$13
    sta.z x
    // [9] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@6->main::@2#0] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@6->main::@2#1] -- register_copy 
    // main::@2
  __b2:
    // atan2_8(x, y)
    // [10] (signed byte) atan2_8::x#0 ← (signed byte) main::x#2
    // [11] (signed byte) atan2_8::y#0 ← (signed byte) main::y#4
    // [12] call atan2_8 
    jsr atan2_8
    // [13] (byte) atan2_8::return#2 ← (byte) atan2_8::return#0 -- vbuaa=vbuxx 
    txa
    // main::@6
    // angle = atan2_8(x, y)
    // [14] (byte) main::angle#0 ← (byte) atan2_8::return#2
    // *screen++ = angle
    // [15] *((byte*) main::screen#2) ← (byte) main::angle#0 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (screen),y
    // *screen++ = angle;
    // [16] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 -- pbuz1=_inc_pbuz1 
    inc.z screen
    bne !+
    inc.z screen+1
  !:
    // for(signed byte x: -19..20)
    // [17] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 
    inc.z x
    // [18] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp.z x
    bne __b2
    // main::@3
    // for(signed byte y: -12..12)
    // [19] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 
    inc.z y
    // [20] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp.z y
    bne __b1
    // main::@4
  __b4:
    // (*col00)++;
    // [21] *((const byte*) main::col00) ← ++ *((const byte*) main::col00) -- _deref_pbuc1=_inc__deref_pbuc1 
    inc col00
    jmp __b4
}
  // 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)
// atan2_8(signed byte zp($a) x, signed byte zp(5) y)
atan2_8: {
    .label __7 = $b
    .label xi = $b
    .label xd = $c
    .label angle = 2
    .label i = $d
    .label x = $a
    .label y = 5
    // (y>0)?y:-y
    // [22] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 -- vbsz1_gt_0_then_la1 
    lda.z y
    cmp #0
    beq !+
    bmi !__b1+
    jmp __b1
  !__b1:
  !:
    // atan2_8::@2
    // [23] (signed byte~) atan2_8::$2 ← - (signed byte) atan2_8::y#0 -- vbsxx=_neg_vbsz1 
    lda.z y
    eor #$ff
    clc
    adc #1
    tax
    // [24] phi from atan2_8::@1 atan2_8::@2 to atan2_8::@3 [phi:atan2_8::@1/atan2_8::@2->atan2_8::@3]
    // [24] phi (signed byte) atan2_8::yi#0 = (signed byte) 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
    // [25] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 -- vbsz1_gt_0_then_la1 
    lda.z x
    cmp #0
    beq !+
    bmi !__b4+
    jmp __b4
  !__b4:
  !:
    // atan2_8::@5
    // [26] (signed byte~) atan2_8::$7 ← - (signed byte) atan2_8::x#0 -- vbsz1=_neg_vbsz2 
    lda.z x
    eor #$ff
    clc
    adc #1
    sta.z __7
    // [27] phi from atan2_8::@4 atan2_8::@5 to atan2_8::@6 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6]
    // [27] phi (signed byte) atan2_8::xi#0 = (signed byte) atan2_8::xi#8 [phi:atan2_8::@4/atan2_8::@5->atan2_8::@6#0] -- register_copy 
    // atan2_8::@6
  __b6:
    // [28] phi from atan2_8::@6 to atan2_8::@10 [phi:atan2_8::@6->atan2_8::@10]
    // [28] phi (byte) atan2_8::angle#12 = (byte) 0 [phi:atan2_8::@6->atan2_8::@10#0] -- vbuz1=vbuc1 
    lda #0
    sta.z angle
    // [28] phi (byte) atan2_8::i#2 = (byte) 0 [phi:atan2_8::@6->atan2_8::@10#1] -- vbuz1=vbuc1 
    sta.z i
    // [28] phi (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#0 [phi:atan2_8::@6->atan2_8::@10#2] -- register_copy 
    // [28] phi (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#0 [phi:atan2_8::@6->atan2_8::@10#3] -- register_copy 
    // atan2_8::@10
  __b10:
    // if(yi==0)
    // [29] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@11 -- vbsxx_neq_0_then_la1 
    txa
    cmp #0
    bne __b11
    // [30] phi from atan2_8::@10 atan2_8::@14 to atan2_8::@12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12]
    // [30] phi (byte) atan2_8::angle#6 = (byte) atan2_8::angle#12 [phi:atan2_8::@10/atan2_8::@14->atan2_8::@12#0] -- register_copy 
    // atan2_8::@12
  __b12:
    // angle = angle/2
    // [31] (byte) atan2_8::angle#1 ← (byte) atan2_8::angle#6 >> (byte) 1 -- vbuxx=vbuz1_ror_1 
    lda.z angle
    lsr
    tax
    // if(x<0)
    // [32] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7 -- vbsz1_ge_0_then_la1 
    lda.z x
    cmp #0
    bpl __b7
    // atan2_8::@16
    // angle = 128-angle
    // [33] (byte) atan2_8::angle#4 ← (byte) $80 - (byte) atan2_8::angle#1 -- vbuxx=vbuc1_minus_vbuxx 
    txa
    eor #$ff
    tax
    axs #-$80-1
    // [34] phi from atan2_8::@12 atan2_8::@16 to atan2_8::@7 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7]
    // [34] phi (byte) atan2_8::angle#11 = (byte) atan2_8::angle#1 [phi:atan2_8::@12/atan2_8::@16->atan2_8::@7#0] -- register_copy 
    // atan2_8::@7
  __b7:
    // if(y<0)
    // [35] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8 -- vbsz1_ge_0_then_la1 
    lda.z y
    cmp #0
    bpl __b8
    // atan2_8::@9
    // angle = -angle
    // [36] (byte) atan2_8::angle#5 ← - (byte) atan2_8::angle#11 -- vbuxx=_neg_vbuxx 
    dex
    txa
    eor #$ff
    tax
    // [37] phi from atan2_8::@7 atan2_8::@9 to atan2_8::@8 [phi:atan2_8::@7/atan2_8::@9->atan2_8::@8]
    // [37] phi (byte) atan2_8::return#0 = (byte) atan2_8::angle#11 [phi:atan2_8::@7/atan2_8::@9->atan2_8::@8#0] -- register_copy 
    // atan2_8::@8
  __b8:
    // atan2_8::@return
    // }
    // [38] return 
    rts
    // atan2_8::@11
  __b11:
    // xd = xi>>i
    // [39] (signed byte) atan2_8::xd#0 ← (signed byte) atan2_8::xi#3 >> (byte) 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
    // yd = yi>>i
    // [40] (signed byte) atan2_8::yd#0 ← (signed byte) atan2_8::yi#3 >> (byte) 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)
    // [41] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@13 -- vbsxx_gt_0_then_la1 
    txa
    cmp #0
    beq !+
    bpl __b13
  !:
    // atan2_8::@15
    // xi -= yd
    // [42] (signed byte) atan2_8::xi#2 ← (signed byte) atan2_8::xi#3 - (signed byte) atan2_8::yd#0 -- vbsz1=vbsz1_minus_vbsyy 
    tya
    eor #$ff
    sec
    adc.z xi
    sta.z xi
    // yi += xd
    // [43] (signed byte) atan2_8::yi#2 ← (signed byte) atan2_8::yi#3 + (signed byte) atan2_8::xd#0 -- vbsxx=vbsxx_plus_vbsz1 
    txa
    clc
    adc.z xd
    tax
    // angle -= CORDIC_ATAN2_ANGLES_8[i]
    // [44] (byte) atan2_8::angle#3 ← (byte) atan2_8::angle#12 - *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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
    // [45] phi from atan2_8::@13 atan2_8::@15 to atan2_8::@14 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14]
    // [45] phi (signed byte) atan2_8::xi#7 = (signed byte) atan2_8::xi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#0] -- register_copy 
    // [45] phi (byte) atan2_8::angle#13 = (byte) atan2_8::angle#2 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#1] -- register_copy 
    // [45] phi (signed byte) atan2_8::yi#7 = (signed byte) atan2_8::yi#1 [phi:atan2_8::@13/atan2_8::@15->atan2_8::@14#2] -- register_copy 
    // atan2_8::@14
  __b14:
    // for( byte i: 0..CORDIC_ITERATIONS_8-1)
    // [46] (byte) atan2_8::i#1 ← ++ (byte) atan2_8::i#2 -- vbuz1=_inc_vbuz1 
    inc.z i
    // [47] if((byte) atan2_8::i#1==(const byte) CORDIC_ITERATIONS_8-(byte) 1+(byte) 1) goto atan2_8::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #CORDIC_ITERATIONS_8-1+1
    cmp.z i
    beq __b12
    // [28] phi from atan2_8::@14 to atan2_8::@10 [phi:atan2_8::@14->atan2_8::@10]
    // [28] phi (byte) atan2_8::angle#12 = (byte) atan2_8::angle#13 [phi:atan2_8::@14->atan2_8::@10#0] -- register_copy 
    // [28] phi (byte) atan2_8::i#2 = (byte) atan2_8::i#1 [phi:atan2_8::@14->atan2_8::@10#1] -- register_copy 
    // [28] phi (signed byte) atan2_8::xi#3 = (signed byte) atan2_8::xi#7 [phi:atan2_8::@14->atan2_8::@10#2] -- register_copy 
    // [28] phi (signed byte) atan2_8::yi#3 = (signed byte) atan2_8::yi#7 [phi:atan2_8::@14->atan2_8::@10#3] -- register_copy 
    jmp __b10
    // atan2_8::@13
  __b13:
    // xi += yd
    // [48] (signed byte) atan2_8::xi#1 ← (signed byte) atan2_8::xi#3 + (signed byte) atan2_8::yd#0 -- vbsz1=vbsz1_plus_vbsyy 
    tya
    clc
    adc.z xi
    sta.z xi
    // yi -= xd
    // [49] (signed byte) atan2_8::yi#1 ← (signed byte) atan2_8::yi#3 - (signed byte) atan2_8::xd#0 -- vbsxx=vbsxx_minus_vbsz1 
    txa
    sec
    sbc.z xd
    tax
    // angle += CORDIC_ATAN2_ANGLES_8[i]
    // [50] (byte) atan2_8::angle#2 ← (byte) atan2_8::angle#12 + *((const byte*) CORDIC_ATAN2_ANGLES_8 + (byte) 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:
    // [51] (signed byte) atan2_8::xi#8 ← (signed byte) atan2_8::x#0 -- vbsz1=vbsz2 
    lda.z x
    sta.z xi
    jmp __b6
    // atan2_8::@1
  __b1:
    // [52] (signed byte) atan2_8::yi#11 ← (signed byte) atan2_8::y#0 -- vbsxx=vbsz1 
    ldx.z y
    jmp __b3
}
  // init_font_hex
// Make charset from proto chars
// init_font_hex(byte* zp(6) charset)
init_font_hex: {
    .label __0 = $d
    .label idx = $b
    .label proto_lo = 8
    .label charset = 6
    .label c1 = $a
    .label proto_hi = 3
    .label c = 5
    // [54] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
    // [54] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c
    // [54] phi (byte*) init_font_hex::proto_hi#6 = (const byte*) 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
    // [54] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 
    lda #<CHARSET
    sta.z charset
    lda #>CHARSET
    sta.z charset+1
    // [54] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
    // [54] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy 
    // [54] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy 
    // [54] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy 
    // init_font_hex::@1
  __b1:
    // [55] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
    // [55] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta.z c1
    // [55] phi (byte*) init_font_hex::proto_lo#4 = (const byte*) 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
    // [55] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy 
    // [55] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
    // [55] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy 
    // [55] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy 
    // [55] phi (byte*) init_font_hex::charset#2 = (byte*) 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
    // [56] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (charset),y
    // [57] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
    // [57] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta.z idx
    // [57] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    // [57] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
    // [57] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy 
    // [57] phi (byte) init_font_hex::i#2 = (byte) 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
    // [58] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 
    txa
    tay
    lda (proto_hi),y
    asl
    asl
    asl
    asl
    sta.z __0
    // proto_lo[i]<<1
    // [59] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 
    txa
    tay
    lda (proto_lo),y
    asl
    // proto_hi[i]<<4 | proto_lo[i]<<1
    // [60] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora.z __0
    // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1
    // [61] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy.z idx
    sta (charset),y
    // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1;
    // [62] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc.z idx
    // for( byte i: 0..4)
    // [63] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [64] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 
    cpx #5
    bne __b3
    // init_font_hex::@4
    // charset[idx++] = 0
    // [65] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx
    sta (charset),y
    // charset[idx++] = 0;
    // [66] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    iny
    // charset[idx++] = 0
    // [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    sta (charset),y
    // proto_lo += 5
    // [68] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc.z proto_lo
    sta.z proto_lo
    bcc !+
    inc.z proto_lo+1
  !:
    // charset += 8
    // [69] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc.z charset
    sta.z charset
    bcc !+
    inc.z charset+1
  !:
    // for( byte c: 0..15 )
    // [70] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc.z c1
    // [71] if((byte) init_font_hex::c1#1!=(byte) $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
    // [72] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 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 )
    // [73] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc.z c
    // [74] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp.z c
    bne __b1
    // init_font_hex::@return
    // }
    // [75] return 
    rts
}
  // File 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


