Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Fixing pointer array-indexing *((word[CORDIC_ITERATIONS_16]) CORDIC_ATAN2_ANGLES_16 + (byte) atan2_16::i)
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx 
Inlined call (byte~) main::$1 ← call toD018 (byte*) SCREEN (byte*) CHARSET 
Culled Empty Block (label) init_font_hex::@6
Culled Empty Block (label) @2
Culled Empty Block (label) @3
Culled Empty Block (label) @4
Culled Empty Block (label) @5
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) main::toD0181_@1
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:@1
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 ← (byte[]) FONT_HEX_PROTO#0
  (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 ← (byte[]) FONT_HEX_PROTO#0
  (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 ← (number) 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
@1: scope:[]  from @begin
  (byte[]) FONT_HEX_PROTO#0 ← { (number) 2, (number) 5, (number) 5, (number) 5, (number) 2, (number) 6, (number) 2, (number) 2, (number) 2, (number) 7, (number) 6, (number) 1, (number) 2, (number) 4, (number) 7, (number) 6, (number) 1, (number) 2, (number) 1, (number) 6, (number) 5, (number) 5, (number) 7, (number) 1, (number) 1, (number) 7, (number) 4, (number) 6, (number) 1, (number) 6, (number) 3, (number) 4, (number) 6, (number) 5, (number) 2, (number) 7, (number) 1, (number) 1, (number) 1, (number) 1, (number) 2, (number) 5, (number) 2, (number) 5, (number) 2, (number) 2, (number) 5, (number) 3, (number) 1, (number) 1, (number) 2, (number) 5, (number) 7, (number) 5, (number) 5, (number) 6, (number) 5, (number) 6, (number) 5, (number) 6, (number) 2, (number) 5, (number) 4, (number) 5, (number) 2, (number) 6, (number) 5, (number) 5, (number) 5, (number) 6, (number) 7, (number) 4, (number) 6, (number) 4, (number) 7, (number) 7, (number) 4, (number) 6, (number) 4, (number) 4 }
  (byte*) D018#0 ← ((byte*)) (number) $d018
  (byte*) COLS#0 ← ((byte*)) (number) $d800
  to:@6
@6: scope:[]  from @1
  (byte) CORDIC_ITERATIONS_8#0 ← (number) 8
  (byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 ← kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
  to:@7
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 ← (number) 0
  (number~) atan2_8::$17 ← (byte) CORDIC_ITERATIONS_8#0 - (number) 1
  (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::$18 ← (signed byte) atan2_8::yi#3 == (number) 0
  (bool~) atan2_8::$19 ← ! (bool~) atan2_8::$18
  if((bool~) atan2_8::$19) 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::$20 ← (signed byte) atan2_8::xi#3 >> (byte) atan2_8::i#2
  (signed byte) atan2_8::xd#0 ← (signed byte~) atan2_8::$20
  (signed byte~) atan2_8::$21 ← (signed byte) atan2_8::yi#4 >> (byte) atan2_8::i#2
  (signed byte) atan2_8::yd#0 ← (signed byte~) atan2_8::$21
  (bool~) atan2_8::$22 ← (signed byte) atan2_8::yi#4 > (number) 0
  if((bool~) atan2_8::$22) 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 + *((byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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 - *((byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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,atan2_8::$17)
  (bool~) atan2_8::$23 ← (byte) atan2_8::i#1 != rangelast(0,atan2_8::$17)
  if((bool~) atan2_8::$23) 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
@7: scope:[]  from @6
  (byte*) CHARSET#0 ← ((byte*)) (number) $2000
  (byte*) SCREEN#0 ← ((byte*)) (number) $2800
  to:@8
main: scope:[main]  from @8
  (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0
  call init_font_hex 
  to:main::@12
main::@12: scope:[main]  from main
  (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0
  (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0
  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#0 ← ((word)) (byte*) main::toD0181_screen#1
  (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff
  (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4
  (number~) main::toD0181_$3#0 ← > (number~) main::toD0181_$2#0
  (word~) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1
  (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0
  (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4
  (number~) main::toD0181_$7#0 ← (number~) main::toD0181_$6#0 & (number) $f
  (number~) main::toD0181_$8#0 ← (number~) main::toD0181_$3#0 | (number~) main::toD0181_$7#0
  (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0
  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
  *((byte*) D018#0) ← (byte~) main::$1
  (byte*) main::screen#0 ← (byte*) SCREEN#0
  (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::$4 ← (byte) atan2_8::return#4
  (byte) main::angle#0 ← (byte~) main::$4
  *((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::$5 ← (signed byte) main::x#1 != rangelast(-$13,$14)
  if((bool~) main::$5) 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::$6 ← (signed byte) main::y#1 != rangelast(-$c,$c)
  if((bool~) main::$6) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3
  (byte*~) main::$2 ← (byte*) COLS#0 + (number) $c*(number) $28
  (byte*~) main::$3 ← (byte*~) main::$2 + (number) $13
  (byte*) main::col00#0 ← (byte*~) main::$3
  to:main::@5
main::@5: scope:[main]  from main::@4 main::@6
  (byte*) main::col00#2 ← phi( main::@4/(byte*) main::col00#0 main::@6/(byte*) main::col00#1 )
  if(true) goto main::@6
  to:main::@return
main::@6: scope:[main]  from main::@5
  (byte*) main::col00#1 ← phi( main::@5/(byte*) main::col00#2 )
  *((byte*) main::col00#1) ← ++ *((byte*) main::col00#1)
  to:main::@5
main::@return: scope:[main]  from main::@5
  return 
  to:@return
@8: scope:[]  from @7
  call main 
  to:@9
@9: scope:[]  from @8
  to:@end
@end: scope:[]  from @9

SYMBOL TABLE SSA
(label) @1
(label) @6
(label) @7
(label) @8
(label) @9
(label) @begin
(label) @end
(byte*) CHARSET
(byte*) CHARSET#0
(byte*) COLS
(byte*) COLS#0
(byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8
(byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0
(byte) CORDIC_ITERATIONS_8
(byte) CORDIC_ITERATIONS_8#0
(byte*) D018
(byte*) D018#0
(byte[]) FONT_HEX_PROTO
(byte[]) FONT_HEX_PROTO#0
(byte*) SCREEN
(byte*) SCREEN#0
(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
(number~) atan2_8::$17
(bool~) atan2_8::$18
(bool~) atan2_8::$19
(signed byte~) atan2_8::$2
(signed byte~) atan2_8::$20
(signed byte~) atan2_8::$21
(bool~) atan2_8::$22
(bool~) atan2_8::$23
(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
(byte*~) main::$3
(byte~) main::$4
(bool~) main::$5
(bool~) main::$6
(label) main::@1
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::angle
(byte) main::angle#0
(byte*) main::col00
(byte*) main::col00#0
(byte*) main::col00#1
(byte*) main::col00#2
(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
(word~) main::toD0181_$0#0
(number~) main::toD0181_$1
(number~) main::toD0181_$1#0
(number~) main::toD0181_$2
(number~) main::toD0181_$2#0
(number~) main::toD0181_$3
(number~) main::toD0181_$3#0
(word~) main::toD0181_$4
(word~) main::toD0181_$4#0
(byte~) main::toD0181_$5
(byte~) main::toD0181_$5#0
(number~) main::toD0181_$6
(number~) main::toD0181_$6#0
(number~) main::toD0181_$7
(number~) main::toD0181_$7#0
(number~) main::toD0181_$8
(number~) main::toD0181_$8#0
(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) 0 in (byte) init_font_hex::idx#0 ← (number) 0
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 (unumber) 8 in (byte) CORDIC_ITERATIONS_8#0 ← (number) 8
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 (unumber) 0 in (byte) atan2_8::angle#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) atan2_8::$17 ← (byte) CORDIC_ITERATIONS_8#0 - (number) 1
Adding number conversion cast (unumber) atan2_8::$17 in (number~) atan2_8::$17 ← (byte) CORDIC_ITERATIONS_8#0 - (unumber)(number) 1
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$18 ← (signed byte) atan2_8::yi#3 == (number) 0
Adding number conversion cast (snumber) 0 in (bool~) atan2_8::$22 ← (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 (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#0 ← (word~) main::toD0181_$0#0 & (number) $3fff
Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4
Adding number conversion cast (unumber) main::toD0181_$2#0 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (unumber)(number) 4
Adding number conversion cast (unumber) main::toD0181_$3#0 in (number~) main::toD0181_$3#0 ← > (unumber~) main::toD0181_$2#0
Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4
Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (unumber)(number) 4
Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f
Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f
Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0
Adding number conversion cast (unumber) $c*$28 in (byte*~) main::$2 ← (byte*) COLS#0 + (number) $c*(number) $28
Adding number conversion cast (unumber) $13 in (byte*~) main::$3 ← (byte*~) main::$2 + (number) $13
Successful SSA optimization PassNAddNumberTypeConversions
Added casts to value list in (byte[]) FONT_HEX_PROTO#0 ← (byte[]){ (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 }
Successful SSA optimization PassNAddInitializerValueListTypeCasts
Inlining cast (byte) init_font_hex::idx#0 ← (unumber)(number) 0
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 (byte*) D018#0 ← (byte*)(number) $d018
Inlining cast (byte*) COLS#0 ← (byte*)(number) $d800
Inlining cast (byte) CORDIC_ITERATIONS_8#0 ← (unumber)(number) 8
Inlining cast (byte) atan2_8::angle#0 ← (unumber)(number) 0
Inlining cast (byte*) CHARSET#0 ← (byte*)(number) $2000
Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $2800
Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1
Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1
Successful SSA optimization Pass2InlineCast
Simplifying constant integer cast 0
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 2
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 1
Simplifying constant integer cast 6
Simplifying constant integer cast 3
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 7
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 3
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 7
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 2
Simplifying constant integer cast 5
Simplifying constant integer cast 4
Simplifying constant integer cast 5
Simplifying constant integer cast 2
Simplifying constant integer cast 6
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 5
Simplifying constant integer cast 6
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 7
Simplifying constant integer cast 7
Simplifying constant integer cast 4
Simplifying constant integer cast 6
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 55296
Simplifying constant integer cast 8
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast $80
Simplifying constant pointer cast (byte*) 8192
Simplifying constant pointer cast (byte*) 10240
Simplifying constant integer cast $3fff
Simplifying constant integer cast 4
Simplifying constant integer cast 4
Simplifying constant integer cast $f
Simplifying constant integer cast $13
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
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 unsigned number type (byte) 8
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
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 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
Finalized unsigned number type (byte) $13
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) atan2_8::$17 ← (byte) CORDIC_ITERATIONS_8#0 - (byte) 1
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#0 ← (word~) main::toD0181_$0#0 & (word) $3fff
Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0
Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4
Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f
Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0
Inversing boolean not [65] (bool~) atan2_8::$19 ← (signed byte) atan2_8::yi#3 != (signed byte) 0 from [64] (bool~) atan2_8::$18 ← (signed byte) atan2_8::yi#3 == (signed byte) 0
Inversing boolean not [78] (bool~) atan2_8::$12 ← (signed byte) atan2_8::x#4 >= (signed byte) 0 from [77] (bool~) atan2_8::$11 ← (signed byte) atan2_8::x#4 < (signed byte) 0
Inversing boolean not [94] (bool~) atan2_8::$15 ← (signed byte) atan2_8::y#4 >= (signed byte) 0 from [93] (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::$20 (signed byte) atan2_8::xd#1 (signed byte) atan2_8::xd#2 
Alias (signed byte) atan2_8::yd#0 = (signed byte~) atan2_8::$21 (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#0 (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::$4 
Alias (byte*) main::screen#1 = (byte*) main::screen#5 
Alias (byte*) main::col00#0 = (byte*~) main::$3 
Alias (byte*) main::col00#1 = (byte*) main::col00#2 
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
Identical Phi Values (byte*) main::col00#1 (byte*) main::col00#0
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 [43] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1
Simple Condition (bool~) atan2_8::$5 [52] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4
Simple Condition (bool~) atan2_8::$19 [66] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@16
Simple Condition (bool~) atan2_8::$22 [73] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@18
Simple Condition (bool~) atan2_8::$12 [79] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7
Simple Condition (bool~) atan2_8::$23 [91] if((byte) atan2_8::i#1!=rangelast(0,atan2_8::$17)) goto atan2_8::@15
Simple Condition (bool~) atan2_8::$15 [95] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8
Simple Condition (bool~) main::$5 [145] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$6 [149] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [91] if((byte) atan2_8::i#1==rangelast(0,atan2_8::$17)) goto atan2_8::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Identified constant from value list (byte[]) { (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 }
Successful SSA optimization Pass2ConstantInitializerValueLists
Constant (const byte) init_font_hex::c#0 = 0
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[]) FONT_HEX_PROTO#0 = { 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 }
Constant (const byte*) D018#0 = (byte*) 53272
Constant (const byte*) COLS#0 = (byte*) 55296
Constant (const byte) CORDIC_ITERATIONS_8#0 = 8
Constant (const byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
Constant (const byte) atan2_8::angle#0 = 0
Constant (const byte) atan2_8::i#0 = 0
Constant (const byte*) CHARSET#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 10240
Constant (const signed byte) main::y#0 = -$c
Constant (const signed byte) main::x#0 = -$13
Successful SSA optimization Pass2ConstantIdentification
Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO#0
Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO#0
Constant (const byte*) init_font_hex::charset#1 = CHARSET#0
Constant (const byte*) main::toD0181_screen#0 = SCREEN#0
Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0
Constant (const byte*) main::screen#0 = SCREEN#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (word)main::toD0181_screen#0 in [114] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0
Constant value identified (word)main::toD0181_gfx#0 in [118] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [154] 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 [143] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [145] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [147] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [149] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Converting *(pointer+n) to pointer[n] [156] *((byte*) main::col00#0) ← ++ *((byte*) main::col00#0)  -- *(main::$2 + $13)
Converting *(pointer+n) to pointer[n] [156] *((byte*) main::col00#0) ← ++ *((byte*~) main::$2 + (byte) $13)  -- *(main::$2 + $13)
Successful SSA optimization Pass2InlineDerefIdx
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
Eliminating unused variable (byte*) main::col00#0 and assignment [79] (byte*) main::col00#0 ← (byte*~) main::$2 + (byte) $13
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 (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 $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 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 [29] (byte~) atan2_8::$17 ← (const byte) CORDIC_ITERATIONS_8#0 - (byte) 1
Constant right-side identified [77] (byte*~) main::$2 ← (const byte*) COLS#0 + (word)(number) $c*(number) $28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0
Constant (const byte) atan2_8::$17 = CORDIC_ITERATIONS_8#0-1
Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0
Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0
Constant (const byte*) main::$2 = COLS#0+(word)$c*$28
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [45] atan2_8::i#1 ← ++ atan2_8::i#2 to ++
Resolved ranged comparison value [46] if(atan2_8::i#1==rangelast(0,atan2_8::$17)) goto atan2_8::@17 to (const byte) atan2_8::$17+(number) 1
Adding number conversion cast (unumber) atan2_8::$17+1 in if((byte) atan2_8::i#1==(const byte) atan2_8::$17+(number) 1) goto atan2_8::@17
Adding number conversion cast (unumber) 1 in if((byte) atan2_8::i#1==(unumber)(const byte) atan2_8::$17+(number) 1) goto atan2_8::@17
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast (const byte) atan2_8::$17+(unumber)(number) 1
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant right-side identified [52] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [55] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff
Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [52] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4
Constant right-side identified [54] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4
Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [52] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0
Constant right-side identified [53] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0
Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [52] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0
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::c#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::proto_hi#0
Inlining constant with var siblings (const byte*) init_font_hex::proto_lo#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 signed byte) main::y#0
Inlining constant with var siblings (const signed byte) main::x#0
Inlining constant with var siblings (const byte*) main::screen#0
Constant inlined main::screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0
Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0
Constant inlined init_font_hex::proto_hi#0 = (const byte[]) FONT_HEX_PROTO#0
Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0
Constant inlined atan2_8::i#0 = (byte) 0
Constant inlined init_font_hex::c1#0 = (byte) 0
Constant inlined atan2_8::angle#0 = (byte) 0
Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0
Constant inlined main::x#0 = (signed byte) -$13
Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff
Constant inlined main::y#0 = (signed byte) -$c
Constant inlined init_font_hex::i#0 = (byte) 0
Constant inlined atan2_8::$17 = (const byte) CORDIC_ITERATIONS_8#0-(byte) 1
Constant inlined main::toD0181_$6#0 = >(word)(const byte*) CHARSET#0/(byte) 4
Constant inlined main::toD0181_$7#0 = >(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
Constant inlined init_font_hex::idx#1 = ++(byte) 0
Constant inlined init_font_hex::idx#0 = (byte) 0
Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::$2 = (const byte*) COLS#0+(word)(number) $c*(number) $28
Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4
Constant inlined main::toD0181_$4#0 = (word)(const byte*) CHARSET#0
Constant inlined main::toD0181_$5#0 = >(word)(const byte*) CHARSET#0
Constant inlined init_font_hex::proto_lo#0 = (const byte[]) FONT_HEX_PROTO#0
Constant inlined init_font_hex::c#0 = (byte) 0
Successful SSA optimization Pass2ConstantInlining
Consolidated array index constant in *(COLS#0+(word)$c*$28+$13)
Consolidated array index constant in *(COLS#0+(word)$c*$28+$13)
Successful SSA optimization Pass2ConstantAdditionElimination
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 @1
Adding NOP phi() at start of @6
Adding NOP phi() at start of @7
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::@4
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:5 
Calls in [main] to init_font_hex:9 atan2_8:19 

Created 24 initial phi equivalence classes
Coalesced [15] main::screen#7 ← main::screen#4
Coalesced [31] main::y#6 ← main::y#1
Coalesced [32] main::screen#6 ← main::screen#1
Coalesced [33] main::x#4 ← main::x#1
Coalesced (already) [34] main::screen#8 ← main::screen#1
Coalesced [37] atan2_8::yi#12 ← atan2_8::$2
Coalesced [41] atan2_8::xi#9 ← atan2_8::$7
Coalesced [43] atan2_8::yi#14 ← atan2_8::yi#0
Coalesced [44] atan2_8::xi#11 ← atan2_8::xi#0
Coalesced [47] atan2_8::angle#17 ← atan2_8::angle#12
Coalesced [52] atan2_8::angle#22 ← atan2_8::angle#4
Coalesced [56] atan2_8::return#5 ← atan2_8::angle#5
Coalesced [59] atan2_8::return#6 ← atan2_8::angle#11
Coalesced [60] atan2_8::angle#21 ← atan2_8::angle#1
Coalesced [67] atan2_8::yi#16 ← atan2_8::yi#2
Coalesced [68] atan2_8::angle#20 ← atan2_8::angle#3
Coalesced [69] atan2_8::xi#13 ← atan2_8::xi#2
Coalesced [73] atan2_8::yi#13 ← atan2_8::yi#7
Coalesced [74] atan2_8::xi#10 ← atan2_8::xi#7
Coalesced [75] atan2_8::i#7 ← atan2_8::i#1
Coalesced [76] atan2_8::angle#16 ← atan2_8::angle#13
Coalesced (already) [77] atan2_8::angle#18 ← atan2_8::angle#13
Coalesced [81] atan2_8::yi#15 ← atan2_8::yi#1
Coalesced [82] atan2_8::angle#19 ← atan2_8::angle#2
Coalesced [83] atan2_8::xi#12 ← atan2_8::xi#1
Not coalescing [84] atan2_8::xi#8 ← atan2_8::x#0
Not coalescing [85] atan2_8::yi#11 ← atan2_8::y#0
Coalesced [88] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [110] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [111] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [112] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [113] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [114] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [115] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [116] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [117] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 17 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @9
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@4
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()
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#0) ← (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#0 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*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13)
  to:main::@4
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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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#0-(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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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
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#0 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#0 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#0 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*) CHARSET
(byte*) COLS
(byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8
(byte) CORDIC_ITERATIONS_8
(byte*) D018
(byte[]) FONT_HEX_PROTO
(byte*) SCREEN
(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::col00
(byte*) main::screen
(byte*) main::screen#1 42.599999999999994
(byte*) main::screen#2 44.85714285714286
(byte*) main::screen#4 22.0
(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
(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 zero page equivalence class [ atan2_8::x#0 ]
Added variable atan2_8::y#0 to zero page equivalence class [ atan2_8::y#0 ]
Added variable atan2_8::return#2 to zero page equivalence class [ atan2_8::return#2 ]
Added variable main::angle#0 to zero page equivalence class [ main::angle#0 ]
Added variable atan2_8::xd#0 to zero page equivalence class [ atan2_8::xd#0 ]
Added variable atan2_8::yd#0 to zero page equivalence class [ atan2_8::yd#0 ]
Added variable init_font_hex::$0 to zero page equivalence class [ init_font_hex::$0 ]
Added variable init_font_hex::$1 to zero page equivalence class [ init_font_hex::$1 ]
Added variable init_font_hex::$2 to zero page equivalence class [ init_font_hex::$2 ]
Added variable init_font_hex::idx#3 to zero page 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 ZP_BYTE:2 [ main::y#4 main::y#1 ]
Allocated zp ZP_BYTE:3 [ main::x#2 main::x#1 ]
Allocated zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ]
Allocated zp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ]
Allocated zp ZP_BYTE:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Allocated zp ZP_BYTE:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ]
Allocated zp ZP_WORD:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated zp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated zp ZP_WORD:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated zp ZP_WORD:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated zp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated zp ZP_BYTE:19 [ init_font_hex::i#2 init_font_hex::i#1 ]
Allocated zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated zp ZP_BYTE:21 [ atan2_8::x#0 ]
Allocated zp ZP_BYTE:22 [ atan2_8::y#0 ]
Allocated zp ZP_BYTE:23 [ atan2_8::return#2 ]
Allocated zp ZP_BYTE:24 [ main::angle#0 ]
Allocated zp ZP_BYTE:25 [ atan2_8::xd#0 ]
Allocated zp ZP_BYTE:26 [ atan2_8::yd#0 ]
Allocated zp ZP_BYTE:27 [ init_font_hex::$0 ]
Allocated zp ZP_BYTE:28 [ init_font_hex::$1 ]
Allocated zp ZP_BYTE:29 [ init_font_hex::$2 ]
Allocated zp ZP_BYTE:30 [ init_font_hex::idx#3 ]

INITIAL ASM
Target platform is c64basic
  // 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: {
    .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#0) ← (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#0 [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_2
    jmp b6
    // main::@6
  b6:
    // [14] (byte) main::angle#0 ← (byte) atan2_8::return#2 -- vbuz1=vbuz2 
    lda.z atan2_8.return_2
    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*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) -- _deref_pbuc1=_inc__deref_pbuc2 
    lda COLS+$c*$28+$13
    clc
    adc #1
    sta COLS+$c*$28+$13
    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 zeropage($15) x, signed byte zeropage($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_2 = 9
    .label angle_3 = 9
    .label i = 8
    .label return = $a
    .label x = $15
    .label y = $16
    .label return_2 = $17
    .label angle_6 = 9
    .label angle_12 = 9
    .label angle_13 = 9
    // [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_12
    // [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_6
    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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (byte) atan2_8::i#2) -- vbuz1=vbuz1_minus_pbuc1_derefidx_vbuz2 
    lda.z angle_3
    ldy.z i
    sec
    sbc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle_3
    // [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#0-(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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (byte) atan2_8::i#2) -- vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 
    lda.z angle_2
    ldy.z i
    clc
    adc CORDIC_ATAN2_ANGLES_8,y
    sta.z angle_2
    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* zeropage($e) charset)
init_font_hex: {
    .label _0 = $1b
    .label _1 = $1c
    .label _2 = $1d
    .label idx = $14
    .label i = $13
    .label idx_3 = $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#0 [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#0 [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#0 [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_3
    // [67] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy.z idx_3
    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#0) ← (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 ZP_BYTE:2 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ main::x#2 main::x#1 ]
Statement [21] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) [ ] ( main:2 [ ] ) 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 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::y#4 main::y#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::x#2 main::x#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ atan2_8::x#0 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE: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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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 ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE: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 ZP_BYTE:19 [ init_font_hex::i#2 init_font_hex::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE: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 ZP_BYTE: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#0) ← (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 [21] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) [ ] ( main:2 [ ] ) always clobbers reg byte a 
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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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 ZP_BYTE:2 [ main::y#4 main::y#1 ] : zp ZP_BYTE:2 , reg byte x , 
Potential registers zp ZP_BYTE:3 [ main::x#2 main::x#1 ] : zp ZP_BYTE:3 , reg byte x , 
Potential registers zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_BYTE: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 ZP_BYTE:6 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE: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 ZP_BYTE:7 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ] : zp ZP_BYTE:8 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:9 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ] : zp ZP_BYTE:10 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:11 , 
Potential registers zp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:13 , reg byte x , 
Potential registers zp ZP_WORD:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:14 , 
Potential registers zp ZP_WORD:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:16 , 
Potential registers zp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:18 , reg byte x , 
Potential registers zp ZP_BYTE:19 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:21 [ atan2_8::x#0 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:22 [ atan2_8::y#0 ] : zp ZP_BYTE:22 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:23 [ atan2_8::return#2 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:24 [ main::angle#0 ] : zp ZP_BYTE:24 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:25 [ atan2_8::xd#0 ] : zp ZP_BYTE:25 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:26 [ atan2_8::yd#0 ] : zp ZP_BYTE:26 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:27 [ init_font_hex::$0 ] : zp ZP_BYTE:27 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:28 [ init_font_hex::$1 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:29 [ init_font_hex::$2 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:30 [ init_font_hex::idx#3 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , 

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

Uplifting [atan2_8] best 278333 combination zp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ] zp ZP_BYTE:26 [ atan2_8::yd#0 ] zp ZP_BYTE:25 [ atan2_8::xd#0 ] zp ZP_BYTE:23 [ atan2_8::return#2 ] zp ZP_BYTE:10 [ atan2_8::return#0 atan2_8::angle#5 atan2_8::angle#11 atan2_8::angle#1 atan2_8::angle#4 ] zp ZP_BYTE:21 [ atan2_8::x#0 ] zp ZP_BYTE:22 [ atan2_8::y#0 ] 
Limited combination testing to 100 combinations of 104976 possible.
Uplifting [init_font_hex] best 259333 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 ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:27 [ init_font_hex::$0 ] zp ZP_BYTE:30 [ init_font_hex::idx#3 ] zp ZP_WORD:14 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:16 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [main] best 258733 combination reg byte a [ main::angle#0 ] zp ZP_BYTE:3 [ main::x#2 main::x#1 ] zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] zp ZP_BYTE:2 [ main::y#4 main::y#1 ] 
Uplifting [] best 258733 combination 
Attempting to uplift remaining variables inzp ZP_BYTE: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 258733 combination zp ZP_BYTE: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 ZP_BYTE: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 258733 combination zp ZP_BYTE: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 ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ]
Uplifting [atan2_8] best 258733 combination zp ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ atan2_8::yd#0 ]
Uplifting [atan2_8] best 257733 combination reg byte y [ atan2_8::yd#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 257733 combination zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 257733 combination zp ZP_BYTE:27 [ init_font_hex::$0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ atan2_8::xd#0 ]
Uplifting [atan2_8] best 257733 combination zp ZP_BYTE:25 [ atan2_8::xd#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ atan2_8::return#2 ]
Uplifting [atan2_8] best 257133 combination reg byte a [ atan2_8::return#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 256533 combination reg byte y [ init_font_hex::idx#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::x#2 main::x#1 ]
Uplifting [main] best 256533 combination zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 256533 combination zp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE: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 256428 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 ZP_BYTE:2 [ main::y#4 main::y#1 ]
Uplifting [main] best 256428 combination zp ZP_BYTE:2 [ main::y#4 main::y#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 256428 combination zp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ atan2_8::x#0 ]
Uplifting [atan2_8] best 256428 combination zp ZP_BYTE:21 [ atan2_8::x#0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ atan2_8::y#0 ]
Uplifting [atan2_8] best 256428 combination zp ZP_BYTE:22 [ atan2_8::y#0 ] 
Coalescing zero page register [ zp ZP_BYTE:2 [ main::y#4 main::y#1 ] ] with [ zp ZP_BYTE:22 [ atan2_8::y#0 ] ] - score: 1
Coalescing zero page register [ zp ZP_BYTE:3 [ main::x#2 main::x#1 ] ] with [ zp ZP_BYTE:21 [ atan2_8::x#0 ] ] - score: 1
Coalescing zero page register [ zp ZP_WORD:11 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] with [ zp ZP_WORD:4 [ main::screen#2 main::screen#4 main::screen#1 ] ]
Coalescing zero page register [ zp ZP_BYTE:13 [ init_font_hex::c#6 init_font_hex::c#1 ] ] with [ zp ZP_BYTE:2 [ main::y#4 main::y#1 atan2_8::y#0 ] ]
Coalescing zero page register [ zp ZP_BYTE:18 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ] with [ zp ZP_BYTE:3 [ main::x#2 main::x#1 atan2_8::x#0 ] ]
Coalescing zero page register [ zp ZP_BYTE:20 [ init_font_hex::idx#5 init_font_hex::idx#2 ] ] with [ zp ZP_BYTE: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 ZP_BYTE:27 [ init_font_hex::$0 ] ] with [ zp ZP_BYTE:8 [ atan2_8::i#2 atan2_8::i#1 ] ]
Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:2 [ atan2_8::angle#6 atan2_8::angle#12 atan2_8::angle#13 atan2_8::angle#2 atan2_8::angle#3 ]
Allocated (was zp ZP_WORD:11) zp ZP_WORD: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 ZP_BYTE:13) zp ZP_BYTE:5 [ init_font_hex::c#6 init_font_hex::c#1 main::y#4 main::y#1 atan2_8::y#0 ]
Allocated (was zp ZP_WORD:14) zp ZP_WORD:6 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated (was zp ZP_WORD:16) zp ZP_WORD:8 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:10 [ init_font_hex::c1#4 init_font_hex::c1#1 main::x#2 main::x#1 atan2_8::x#0 ]
Allocated (was zp ZP_BYTE:20) zp ZP_BYTE: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 ZP_BYTE:25) zp ZP_BYTE:12 [ atan2_8::xd#0 ]
Allocated (was zp ZP_BYTE:27) zp ZP_BYTE: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: {
    .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#0) ← (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#0 [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*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) -- _deref_pbuc1=_inc__deref_pbuc2 
    lda COLS+$c*$28+$13
    clc
    adc #1
    sta COLS+$c*$28+$13
    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 zeropage($a) x, signed byte zeropage(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
    clc
    adc #$80+1
    tax
    // [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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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#0-(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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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* zeropage(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#0 [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#0 [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#0 [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 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 b1_from_bbegin:
Removing instruction b1:
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 bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [68] bpl b1 to bmi
Fixing long branch [81] bpl b4 to bmi

FINAL SYMBOL TABLE
(label) @1
(label) @begin
(label) @end
(byte*) CHARSET
(const byte*) CHARSET#0 CHARSET = (byte*) 8192
(byte*) COLS
(const byte*) COLS#0 COLS = (byte*) 55296
(byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8
(const byte[CORDIC_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 CORDIC_ATAN2_ANGLES_8 = kickasm {{ .fill CORDIC_ITERATIONS_8, 2*256*atan(1/pow(2,i))/PI/2
 }}
(byte) CORDIC_ITERATIONS_8
(const byte) CORDIC_ITERATIONS_8#0 CORDIC_ITERATIONS_8 = (byte) 8
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte[]) FONT_HEX_PROTO
(const byte[]) FONT_HEX_PROTO#0 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 }
(byte*) SCREEN
(const byte*) SCREEN#0 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 $7 zp ZP_BYTE: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 ZP_BYTE:2 444.8888888888889
(byte) atan2_8::angle#13 angle zp ZP_BYTE:2 1334.6666666666667
(byte) atan2_8::angle#2 angle zp ZP_BYTE:2 2002.0
(byte) atan2_8::angle#3 angle zp ZP_BYTE: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 ZP_BYTE:2 2004.0
(byte) atan2_8::i
(byte) atan2_8::i#1 i zp ZP_BYTE:13 1501.5
(byte) atan2_8::i#2 i zp ZP_BYTE: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 ZP_BYTE:10 4.192307692307692
(signed byte) atan2_8::xd
(signed byte) atan2_8::xd#0 xd zp ZP_BYTE:12 600.5999999999999
(signed byte) atan2_8::xi
(signed byte) atan2_8::xi#0 xi zp ZP_BYTE:11 6.0
(signed byte) atan2_8::xi#1 xi zp ZP_BYTE:11 667.3333333333334
(signed byte) atan2_8::xi#2 xi zp ZP_BYTE:11 667.3333333333334
(signed byte) atan2_8::xi#3 xi zp ZP_BYTE:11 801.2
(signed byte) atan2_8::xi#7 xi zp ZP_BYTE:11 1001.0
(signed byte~) atan2_8::xi#8 xi zp ZP_BYTE:11 4.0
(signed byte) atan2_8::y
(signed byte) atan2_8::y#0 y zp ZP_BYTE: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 $0 zp ZP_BYTE: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 ZP_BYTE:5 16.5
(byte) init_font_hex::c#6 c zp ZP_BYTE:5 1.1578947368421053
(byte) init_font_hex::c1
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:10 151.5
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:10 13.466666666666667
(byte*) init_font_hex::charset
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:6 35.5
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:6 108.35714285714285
(byte*) init_font_hex::charset#5 charset zp ZP_WORD: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 ZP_BYTE:11 551.0
(byte) init_font_hex::idx#3 reg byte y 202.0
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:11 600.5999999999999
(byte*) init_font_hex::proto_hi
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:3 7.333333333333333
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:3 56.83333333333334
(byte*) init_font_hex::proto_lo
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:8 50.5
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD: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
(byte*) main::col00
(byte*) main::screen
(byte*) main::screen#1 screen zp ZP_WORD:3 42.599999999999994
(byte*) main::screen#2 screen zp ZP_WORD:3 44.85714285714286
(byte*) main::screen#4 screen zp ZP_WORD:3 22.0
(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
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(signed byte) main::x
(signed byte) main::x#1 x zp ZP_BYTE:10 151.5
(signed byte) main::x#2 x zp ZP_BYTE:10 37.875
(signed byte) main::y
(signed byte) main::y#1 y zp ZP_BYTE:5 16.5
(signed byte) main::y#4 y zp ZP_BYTE: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 ZP_BYTE: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 ZP_WORD:3 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 main::screen#2 main::screen#4 main::screen#1 ]
zp ZP_BYTE:5 [ init_font_hex::c#6 init_font_hex::c#1 main::y#4 main::y#1 atan2_8::y#0 ]
zp ZP_WORD:6 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
zp ZP_WORD:8 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
zp ZP_BYTE: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 ZP_BYTE: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 ZP_BYTE:12 [ atan2_8::xd#0 ]
reg byte y [ atan2_8::yd#0 ]
zp ZP_BYTE: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: 232352

  // 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: {
    .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#0) ← (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#0 [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*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) -- _deref_pbuc1=_inc__deref_pbuc2 
    lda COLS+$c*$28+$13
    clc
    adc #1
    sta COLS+$c*$28+$13
    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 zeropage($a) x, signed byte zeropage(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
    clc
    adc #$80+1
    tax
    // [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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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#0-(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_ITERATIONS_8#0]) CORDIC_ATAN2_ANGLES_8#0 + (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* zeropage(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#0 [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#0 [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#0 [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


