Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Resolved forward reference FONT_HEX_PROTO to (byte[]) FONT_HEX_PROTO
Fixing pointer addition (word*~) bsearch16u::$7 ← (word*) bsearch16u::items + (byte~) bsearch16u::$6
Fixing pointer addition (word*~) bsearch16u::$15 ← (word*) bsearch16u::pivot + (number) 1
Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items - (number) 1
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)
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean sub-expression (byte) atan2_16::shift
Identified constant variable (byte*) HEAP_TOP
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) atan2_16::@9
Culled Empty Block (label) atan2_16::@10
Culled Empty Block (label) atan2_16::@11
Culled Empty Block (label) atan2_16::@12
Culled Empty Block (label) atan2_16::@28
Culled Empty Block (label) atan2_16::@29
Culled Empty Block (label) atan2_16::@21
Culled Empty Block (label) atan2_16::@22
Culled Empty Block (label) atan2_16::@23
Culled Empty Block (label) atan2_16::@31
Culled Empty Block (label) atan2_16::@32
Culled Empty Block (label) atan2_16::@14
Culled Empty Block (label) @2
Culled Empty Block (label) @4
Culled Empty Block (label) @5
Culled Empty Block (label) @6
Culled Empty Block (label) @7
Culled Empty Block (label) @8
Culled Empty Block (label) @9
Culled Empty Block (label) @10
Culled Empty Block (label) @11
Culled Empty Block (label) @12
Culled Empty Block (label) @13
Culled Empty Block (label) @14
Culled Empty Block (label) @15
Culled Empty Block (label) @16
Culled Empty Block (label) @17
Culled Empty Block (label) @18
Culled Empty Block (label) @20
Culled Empty Block (label) @21
Culled Empty Block (label) @22
Culled Empty Block (label) @23
Culled Empty Block (label) @24
Culled Empty Block (label) @25
Culled Empty Block (label) @26
Culled Empty Block (label) @27
Culled Empty Block (label) @28
Culled Empty Block (label) @29
Culled Empty Block (label) @30
Culled Empty Block (label) @31
Culled Empty Block (label) @32
Culled Empty Block (label) @33
Culled Empty Block (label) @34
Culled Empty Block (label) @36
Culled Empty Block (label) @37
Culled Empty Block (label) @38
Culled Empty Block (label) @39
Culled Empty Block (label) @40
Culled Empty Block (label) @41
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
Culled Empty Block (label) @43
Culled Empty Block (label) diff::@4
Culled Empty Block (label) diff::@5
Culled Empty Block (label) diff::@6

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) CORDIC_ITERATIONS_16#0 ← (number) $f
  (word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 ← kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2
 }}
  to:@3
atan2_16: scope:[atan2_16]  from main::@2
  (signed word) atan2_16::x#9 ← phi( main::@2/(signed word) atan2_16::x#0 )
  (signed word) atan2_16::y#1 ← phi( main::@2/(signed word) atan2_16::y#0 )
  (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0
  if((bool~) atan2_16::$0) goto atan2_16::@1
  to:atan2_16::@2
atan2_16::@1: scope:[atan2_16]  from atan2_16
  (signed word) atan2_16::x#5 ← phi( atan2_16/(signed word) atan2_16::x#9 )
  (signed word) atan2_16::y#2 ← phi( atan2_16/(signed word) atan2_16::y#1 )
  (signed word~) atan2_16::$3 ← (signed word) atan2_16::y#2
  to:atan2_16::@3
atan2_16::@2: scope:[atan2_16]  from atan2_16
  (signed word) atan2_16::x#6 ← phi( atan2_16/(signed word) atan2_16::x#9 )
  (signed word) atan2_16::y#3 ← phi( atan2_16/(signed word) atan2_16::y#1 )
  (signed word~) atan2_16::$1 ← - (signed word) atan2_16::y#3
  (signed word~) atan2_16::$2 ← (signed word~) atan2_16::$1
  to:atan2_16::@3
atan2_16::@3: scope:[atan2_16]  from atan2_16::@1 atan2_16::@2
  (signed word) atan2_16::y#15 ← phi( atan2_16::@1/(signed word) atan2_16::y#2 atan2_16::@2/(signed word) atan2_16::y#3 )
  (signed word) atan2_16::x#1 ← phi( atan2_16::@1/(signed word) atan2_16::x#5 atan2_16::@2/(signed word) atan2_16::x#6 )
  (signed word~) atan2_16::$4 ← phi( atan2_16::@1/(signed word~) atan2_16::$3 atan2_16::@2/(signed word~) atan2_16::$2 )
  (signed word) atan2_16::yi#0 ← (signed word~) atan2_16::$4
  (bool~) atan2_16::$5 ← (signed word) atan2_16::x#1 >= (number) 0
  if((bool~) atan2_16::$5) goto atan2_16::@4
  to:atan2_16::@5
atan2_16::@4: scope:[atan2_16]  from atan2_16::@3
  (signed word) atan2_16::y#12 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 )
  (signed word) atan2_16::yi#12 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 )
  (signed word) atan2_16::x#2 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 )
  (signed word~) atan2_16::$8 ← (signed word) atan2_16::x#2
  to:atan2_16::@6
atan2_16::@5: scope:[atan2_16]  from atan2_16::@3
  (signed word) atan2_16::y#13 ← phi( atan2_16::@3/(signed word) atan2_16::y#15 )
  (signed word) atan2_16::yi#13 ← phi( atan2_16::@3/(signed word) atan2_16::yi#0 )
  (signed word) atan2_16::x#3 ← phi( atan2_16::@3/(signed word) atan2_16::x#1 )
  (signed word~) atan2_16::$6 ← - (signed word) atan2_16::x#3
  (signed word~) atan2_16::$7 ← (signed word~) atan2_16::$6
  to:atan2_16::@6
atan2_16::@6: scope:[atan2_16]  from atan2_16::@4 atan2_16::@5
  (signed word) atan2_16::y#9 ← phi( atan2_16::@4/(signed word) atan2_16::y#12 atan2_16::@5/(signed word) atan2_16::y#13 )
  (signed word) atan2_16::x#10 ← phi( atan2_16::@4/(signed word) atan2_16::x#2 atan2_16::@5/(signed word) atan2_16::x#3 )
  (signed word) atan2_16::yi#9 ← phi( atan2_16::@4/(signed word) atan2_16::yi#12 atan2_16::@5/(signed word) atan2_16::yi#13 )
  (signed word~) atan2_16::$9 ← phi( atan2_16::@4/(signed word~) atan2_16::$8 atan2_16::@5/(signed word~) atan2_16::$7 )
  (signed word) atan2_16::xi#0 ← (signed word~) atan2_16::$9
  (word) atan2_16::angle#0 ← (number) 0
  (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1
  (byte) atan2_16::i#0 ← (byte) 0
  to:atan2_16::@15
atan2_16::@15: scope:[atan2_16]  from atan2_16::@27 atan2_16::@6
  (signed word) atan2_16::y#7 ← phi( atan2_16::@27/(signed word) atan2_16::y#8 atan2_16::@6/(signed word) atan2_16::y#9 )
  (signed word) atan2_16::x#7 ← phi( atan2_16::@27/(signed word) atan2_16::x#8 atan2_16::@6/(signed word) atan2_16::x#10 )
  (word) atan2_16::angle#12 ← phi( atan2_16::@27/(word) atan2_16::angle#13 atan2_16::@6/(word) atan2_16::angle#0 )
  (byte) atan2_16::i#6 ← phi( atan2_16::@27/(byte) atan2_16::i#1 atan2_16::@6/(byte) atan2_16::i#0 )
  (signed word) atan2_16::xi#6 ← phi( atan2_16::@27/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
  (signed word) atan2_16::yi#3 ← phi( atan2_16::@27/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#9 )
  (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0
  (bool~) atan2_16::$18 ← ! (bool~) atan2_16::$17
  if((bool~) atan2_16::$18) goto atan2_16::@16
  to:atan2_16::@17
atan2_16::@16: scope:[atan2_16]  from atan2_16::@15
  (signed word) atan2_16::y#19 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 )
  (signed word) atan2_16::x#17 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 )
  (word) atan2_16::angle#19 ← phi( atan2_16::@15/(word) atan2_16::angle#12 )
  (byte) atan2_16::i#2 ← phi( atan2_16::@15/(byte) atan2_16::i#6 )
  (signed word) atan2_16::yi#4 ← phi( atan2_16::@15/(signed word) atan2_16::yi#3 )
  (signed word) atan2_16::xi#3 ← phi( atan2_16::@15/(signed word) atan2_16::xi#6 )
  (signed word) atan2_16::xd#0 ← (signed word) atan2_16::xi#3
  (signed word) atan2_16::yd#0 ← (signed word) atan2_16::yi#4
  (byte) atan2_16::shift#0 ← (byte) atan2_16::i#2
  to:atan2_16::@18
atan2_16::@17: scope:[atan2_16]  from atan2_16::@15 atan2_16::@27
  (signed word) atan2_16::y#5 ← phi( atan2_16::@15/(signed word) atan2_16::y#7 atan2_16::@27/(signed word) atan2_16::y#8 )
  (signed word) atan2_16::x#4 ← phi( atan2_16::@15/(signed word) atan2_16::x#7 atan2_16::@27/(signed word) atan2_16::x#8 )
  (word) atan2_16::angle#6 ← phi( atan2_16::@15/(word) atan2_16::angle#12 atan2_16::@27/(word) atan2_16::angle#13 )
  (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2
  (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0
  (bool~) atan2_16::$11 ← ! (bool~) atan2_16::$10
  if((bool~) atan2_16::$11) goto atan2_16::@7
  to:atan2_16::@33
atan2_16::@18: scope:[atan2_16]  from atan2_16::@16 atan2_16::@19
  (signed word) atan2_16::y#18 ← phi( atan2_16::@16/(signed word) atan2_16::y#19 atan2_16::@19/(signed word) atan2_16::y#20 )
  (signed word) atan2_16::x#16 ← phi( atan2_16::@16/(signed word) atan2_16::x#17 atan2_16::@19/(signed word) atan2_16::x#18 )
  (word) atan2_16::angle#18 ← phi( atan2_16::@16/(word) atan2_16::angle#19 atan2_16::@19/(word) atan2_16::angle#20 )
  (byte) atan2_16::i#10 ← phi( atan2_16::@16/(byte) atan2_16::i#2 atan2_16::@19/(byte) atan2_16::i#11 )
  (signed word) atan2_16::xi#11 ← phi( atan2_16::@16/(signed word) atan2_16::xi#3 atan2_16::@19/(signed word) atan2_16::xi#12 )
  (signed word) atan2_16::yi#14 ← phi( atan2_16::@16/(signed word) atan2_16::yi#4 atan2_16::@19/(signed word) atan2_16::yi#15 )
  (signed word) atan2_16::yd#7 ← phi( atan2_16::@16/(signed word) atan2_16::yd#0 atan2_16::@19/(signed word) atan2_16::yd#1 )
  (signed word) atan2_16::xd#7 ← phi( atan2_16::@16/(signed word) atan2_16::xd#0 atan2_16::@19/(signed word) atan2_16::xd#1 )
  (byte) atan2_16::shift#2 ← phi( atan2_16::@16/(byte) atan2_16::shift#0 atan2_16::@19/(byte) atan2_16::shift#1 )
  (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2
  if((bool~) atan2_16::$19) goto atan2_16::@19
  to:atan2_16::@20
atan2_16::@19: scope:[atan2_16]  from atan2_16::@18
  (signed word) atan2_16::y#20 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 )
  (signed word) atan2_16::x#18 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 )
  (word) atan2_16::angle#20 ← phi( atan2_16::@18/(word) atan2_16::angle#18 )
  (byte) atan2_16::i#11 ← phi( atan2_16::@18/(byte) atan2_16::i#10 )
  (signed word) atan2_16::xi#12 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 )
  (signed word) atan2_16::yi#15 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 )
  (byte) atan2_16::shift#3 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 )
  (signed word) atan2_16::yd#3 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 )
  (signed word) atan2_16::xd#3 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 )
  (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2
  (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2
  (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2
  to:atan2_16::@18
atan2_16::@20: scope:[atan2_16]  from atan2_16::@18
  (signed word) atan2_16::y#16 ← phi( atan2_16::@18/(signed word) atan2_16::y#18 )
  (signed word) atan2_16::x#14 ← phi( atan2_16::@18/(signed word) atan2_16::x#16 )
  (word) atan2_16::angle#16 ← phi( atan2_16::@18/(word) atan2_16::angle#18 )
  (byte) atan2_16::i#8 ← phi( atan2_16::@18/(byte) atan2_16::i#10 )
  (signed word) atan2_16::xi#9 ← phi( atan2_16::@18/(signed word) atan2_16::xi#11 )
  (signed word) atan2_16::yd#8 ← phi( atan2_16::@18/(signed word) atan2_16::yd#7 )
  (signed word) atan2_16::xd#8 ← phi( atan2_16::@18/(signed word) atan2_16::xd#7 )
  (signed word) atan2_16::yi#10 ← phi( atan2_16::@18/(signed word) atan2_16::yi#14 )
  (byte) atan2_16::shift#4 ← phi( atan2_16::@18/(byte) atan2_16::shift#2 )
  (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4
  (bool~) atan2_16::$20 ← ! (bool~) atan2_16::$25
  if((bool~) atan2_16::$20) goto atan2_16::@25
  to:atan2_16::@24
atan2_16::@25: scope:[atan2_16]  from atan2_16::@20 atan2_16::@24
  (signed word) atan2_16::y#14 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 atan2_16::@24/(signed word) atan2_16::y#17 )
  (signed word) atan2_16::x#13 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 atan2_16::@24/(signed word) atan2_16::x#15 )
  (word) atan2_16::angle#14 ← phi( atan2_16::@20/(word) atan2_16::angle#16 atan2_16::@24/(word) atan2_16::angle#17 )
  (byte) atan2_16::i#7 ← phi( atan2_16::@20/(byte) atan2_16::i#8 atan2_16::@24/(byte) atan2_16::i#9 )
  (signed word) atan2_16::xd#9 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 atan2_16::@24/(signed word) atan2_16::xd#2 )
  (signed word) atan2_16::yd#9 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 atan2_16::@24/(signed word) atan2_16::yd#2 )
  (signed word) atan2_16::xi#7 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 atan2_16::@24/(signed word) atan2_16::xi#10 )
  (signed word) atan2_16::yi#5 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 atan2_16::@24/(signed word) atan2_16::yi#11 )
  (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0
  if((bool~) atan2_16::$21) goto atan2_16::@26
  to:atan2_16::@30
atan2_16::@24: scope:[atan2_16]  from atan2_16::@20
  (signed word) atan2_16::y#17 ← phi( atan2_16::@20/(signed word) atan2_16::y#16 )
  (signed word) atan2_16::x#15 ← phi( atan2_16::@20/(signed word) atan2_16::x#14 )
  (word) atan2_16::angle#17 ← phi( atan2_16::@20/(word) atan2_16::angle#16 )
  (byte) atan2_16::i#9 ← phi( atan2_16::@20/(byte) atan2_16::i#8 )
  (signed word) atan2_16::xi#10 ← phi( atan2_16::@20/(signed word) atan2_16::xi#9 )
  (signed word) atan2_16::yi#11 ← phi( atan2_16::@20/(signed word) atan2_16::yi#10 )
  (signed word) atan2_16::yd#4 ← phi( atan2_16::@20/(signed word) atan2_16::yd#8 )
  (signed word) atan2_16::xd#4 ← phi( atan2_16::@20/(signed word) atan2_16::xd#8 )
  (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1
  (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1
  to:atan2_16::@25
atan2_16::@26: scope:[atan2_16]  from atan2_16::@25
  (signed word) atan2_16::y#10 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 )
  (signed word) atan2_16::x#11 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 )
  (word) atan2_16::angle#7 ← phi( atan2_16::@25/(word) atan2_16::angle#14 )
  (byte) atan2_16::i#3 ← phi( atan2_16::@25/(byte) atan2_16::i#7 )
  (signed word) atan2_16::xd#5 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 )
  (signed word) atan2_16::yi#6 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 )
  (signed word) atan2_16::yd#5 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 )
  (signed word) atan2_16::xi#4 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 )
  (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#4 + (signed word) atan2_16::yd#5
  (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#6 - (signed word) atan2_16::xd#5
  (byte~) atan2_16::$23 ← (byte) atan2_16::i#3 * (const byte) SIZEOF_WORD
  (word) atan2_16::angle#2 ← (word) atan2_16::angle#7 + *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
  to:atan2_16::@27
atan2_16::@30: scope:[atan2_16]  from atan2_16::@25
  (signed word) atan2_16::y#11 ← phi( atan2_16::@25/(signed word) atan2_16::y#14 )
  (signed word) atan2_16::x#12 ← phi( atan2_16::@25/(signed word) atan2_16::x#13 )
  (word) atan2_16::angle#8 ← phi( atan2_16::@25/(word) atan2_16::angle#14 )
  (byte) atan2_16::i#4 ← phi( atan2_16::@25/(byte) atan2_16::i#7 )
  (signed word) atan2_16::xd#6 ← phi( atan2_16::@25/(signed word) atan2_16::xd#9 )
  (signed word) atan2_16::yi#7 ← phi( atan2_16::@25/(signed word) atan2_16::yi#5 )
  (signed word) atan2_16::yd#6 ← phi( atan2_16::@25/(signed word) atan2_16::yd#9 )
  (signed word) atan2_16::xi#5 ← phi( atan2_16::@25/(signed word) atan2_16::xi#7 )
  (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#5 - (signed word) atan2_16::yd#6
  (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#7 + (signed word) atan2_16::xd#6
  (byte~) atan2_16::$24 ← (byte) atan2_16::i#4 * (const byte) SIZEOF_WORD
  (word) atan2_16::angle#3 ← (word) atan2_16::angle#8 - *((word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
  to:atan2_16::@27
atan2_16::@27: scope:[atan2_16]  from atan2_16::@26 atan2_16::@30
  (signed word) atan2_16::y#8 ← phi( atan2_16::@26/(signed word) atan2_16::y#10 atan2_16::@30/(signed word) atan2_16::y#11 )
  (signed word) atan2_16::xi#8 ← phi( atan2_16::@26/(signed word) atan2_16::xi#1 atan2_16::@30/(signed word) atan2_16::xi#2 )
  (signed word) atan2_16::x#8 ← phi( atan2_16::@26/(signed word) atan2_16::x#11 atan2_16::@30/(signed word) atan2_16::x#12 )
  (word) atan2_16::angle#13 ← phi( atan2_16::@26/(word) atan2_16::angle#2 atan2_16::@30/(word) atan2_16::angle#3 )
  (signed word) atan2_16::yi#8 ← phi( atan2_16::@26/(signed word) atan2_16::yi#1 atan2_16::@30/(signed word) atan2_16::yi#2 )
  (byte) atan2_16::i#5 ← phi( atan2_16::@26/(byte) atan2_16::i#3 atan2_16::@30/(byte) atan2_16::i#4 )
  (byte) atan2_16::i#1 ← (byte) atan2_16::i#5 + rangenext(0,atan2_16::$16)
  (bool~) atan2_16::$22 ← (byte) atan2_16::i#1 != rangelast(0,atan2_16::$16)
  if((bool~) atan2_16::$22) goto atan2_16::@15
  to:atan2_16::@17
atan2_16::@7: scope:[atan2_16]  from atan2_16::@17 atan2_16::@33
  (word) atan2_16::angle#15 ← phi( atan2_16::@17/(word) atan2_16::angle#1 atan2_16::@33/(word) atan2_16::angle#4 )
  (signed word) atan2_16::y#4 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 atan2_16::@33/(signed word) atan2_16::y#6 )
  (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0
  (bool~) atan2_16::$14 ← ! (bool~) atan2_16::$13
  if((bool~) atan2_16::$14) goto atan2_16::@8
  to:atan2_16::@13
atan2_16::@33: scope:[atan2_16]  from atan2_16::@17
  (signed word) atan2_16::y#6 ← phi( atan2_16::@17/(signed word) atan2_16::y#5 )
  (word) atan2_16::angle#9 ← phi( atan2_16::@17/(word) atan2_16::angle#1 )
  (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9
  (word) atan2_16::angle#4 ← (number~) atan2_16::$12
  to:atan2_16::@7
atan2_16::@8: scope:[atan2_16]  from atan2_16::@13 atan2_16::@7
  (word) atan2_16::angle#10 ← phi( atan2_16::@13/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#15 )
  (word) atan2_16::return#0 ← (word) atan2_16::angle#10
  to:atan2_16::@return
atan2_16::@13: scope:[atan2_16]  from atan2_16::@7
  (word) atan2_16::angle#11 ← phi( atan2_16::@7/(word) atan2_16::angle#15 )
  (word~) atan2_16::$15 ← - (word) atan2_16::angle#11
  (word) atan2_16::angle#5 ← (word~) atan2_16::$15
  to:atan2_16::@8
atan2_16::@return: scope:[atan2_16]  from atan2_16::@8
  (word) atan2_16::return#3 ← phi( atan2_16::@8/(word) atan2_16::return#0 )
  (word) atan2_16::return#1 ← (word) atan2_16::return#3
  return 
  to:@return
@3: scope:[]  from @1
  (byte*) D018#0 ← ((byte*)) (number) $d018
  (byte*) COLS#0 ← ((byte*)) (number) $d800
  to:@19
@19: scope:[]  from @3
  (byte*) print_screen#0 ← ((byte*)) (number) $400
  (byte*) print_line_cursor#0 ← (byte*) print_screen#0
  (byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
  to:@35
print_word: scope:[print_word]  from main::@4
  (byte*) print_char_cursor#23 ← phi( main::@4/(byte*) print_char_cursor#25 )
  (word) print_word::w#1 ← phi( main::@4/(word) print_word::w#0 )
  (byte~) print_word::$0 ← > (word) print_word::w#1
  (byte) print_byte::b#0 ← (byte~) print_word::$0
  call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  (word) print_word::w#2 ← phi( print_word/(word) print_word::w#1 )
  (byte*) print_char_cursor#12 ← phi( print_word/(byte*) print_char_cursor#6 )
  (byte*) print_char_cursor#1 ← (byte*) print_char_cursor#12
  (byte~) print_word::$2 ← < (word) print_word::w#2
  (byte) print_byte::b#1 ← (byte~) print_word::$2
  call print_byte 
  to:print_word::@2
print_word::@2: scope:[print_word]  from print_word::@1
  (byte*) print_char_cursor#13 ← phi( print_word::@1/(byte*) print_char_cursor#6 )
  (byte*) print_char_cursor#2 ← (byte*) print_char_cursor#13
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@2
  (byte*) print_char_cursor#14 ← phi( print_word::@2/(byte*) print_char_cursor#2 )
  (byte*) print_char_cursor#3 ← (byte*) print_char_cursor#14
  return 
  to:@return
@35: scope:[]  from @19
  (byte*) print_char_cursor#31 ← phi( @19/(byte*) print_char_cursor#0 )
  (byte[]) print_hextab#0 ← (const string) $0
  to:@42
print_byte: scope:[print_byte]  from print_word print_word::@1
  (byte*) print_char_cursor#24 ← phi( print_word/(byte*) print_char_cursor#23 print_word::@1/(byte*) print_char_cursor#1 )
  (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
  (byte) print_char::ch#0 ← *((byte[]) print_hextab#0 + (byte~) print_byte::$0)
  call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  (byte) print_byte::b#3 ← phi( print_byte/(byte) print_byte::b#2 )
  (byte*) print_char_cursor#15 ← phi( print_byte/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#4 ← (byte*) print_char_cursor#15
  (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
  (byte) print_char::ch#1 ← *((byte[]) print_hextab#0 + (number~) print_byte::$2)
  call print_char 
  to:print_byte::@2
print_byte::@2: scope:[print_byte]  from print_byte::@1
  (byte*) print_char_cursor#16 ← phi( print_byte::@1/(byte*) print_char_cursor#8 )
  (byte*) print_char_cursor#5 ← (byte*) print_char_cursor#16
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@2
  (byte*) print_char_cursor#17 ← phi( print_byte::@2/(byte*) print_char_cursor#5 )
  (byte*) print_char_cursor#6 ← (byte*) print_char_cursor#17
  return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1
  (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#4 )
  (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2
  (byte*) print_char_cursor#7 ← ++ (byte*) print_char_cursor#18
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  (byte*) print_char_cursor#19 ← phi( print_char/(byte*) print_char_cursor#7 )
  (byte*) print_char_cursor#8 ← (byte*) print_char_cursor#19
  return 
  to:@return
@42: scope:[]  from @35
  (byte*) print_char_cursor#30 ← phi( @35/(byte*) print_char_cursor#31 )
  (byte*) CHARSET#0 ← ((byte*)) (number) $2000
  (byte*) SCREEN#0 ← ((byte*)) (number) $2800
  (byte[$3e8]) SCREEN_REF#0 ← kickasm {{ .for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)
 }}
  to:@44
main: scope:[main]  from @44
  (byte*) print_char_cursor#40 ← phi( @44/(byte*) print_char_cursor#27 )
  (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0
  call init_font_hex 
  to:main::@12
main::@12: scope:[main]  from main
  (byte*) print_char_cursor#39 ← phi( main/(byte*) print_char_cursor#40 )
  (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*) print_char_cursor#38 ← phi( main::@12/(byte*) print_char_cursor#39 )
  (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*) print_char_cursor#37 ← phi( main::toD0181/(byte*) print_char_cursor#38 )
  (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*) print_char_cursor#36 ← phi( main::toD0181_@return/(byte*) print_char_cursor#37 )
  (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
  (byte*) main::screen_ref#0 ← (byte[$3e8]) SCREEN_REF#0
  (word) main::diff_sum#0 ← (number) 0
  (signed byte) main::y#0 ← (signed byte) -$c
  to:main::@1
main::@1: scope:[main]  from main::@11 main::@3
  (byte*) print_char_cursor#35 ← phi( main::@11/(byte*) print_char_cursor#36 main::@3/(byte*) print_char_cursor#28 )
  (byte*) main::screen#5 ← phi( main::@11/(byte*) main::screen#0 main::@3/(byte*) main::screen#6 )
  (word) main::diff_sum#7 ← phi( main::@11/(word) main::diff_sum#0 main::@3/(word) main::diff_sum#5 )
  (byte*) main::screen_ref#5 ← phi( main::@11/(byte*) main::screen_ref#0 main::@3/(byte*) main::screen_ref#6 )
  (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::@14
  (byte*) print_char_cursor#34 ← phi( main::@1/(byte*) print_char_cursor#35 main::@14/(byte*) print_char_cursor#32 )
  (byte*) main::screen#4 ← phi( main::@1/(byte*) main::screen#5 main::@14/(byte*) main::screen#1 )
  (word) main::diff_sum#6 ← phi( main::@1/(word) main::diff_sum#7 main::@14/(word) main::diff_sum#1 )
  (byte*) main::screen_ref#4 ← phi( main::@1/(byte*) main::screen_ref#5 main::@14/(byte*) main::screen_ref#1 )
  (signed byte) main::y#2 ← phi( main::@1/(signed byte) main::y#4 main::@14/(signed byte) main::y#5 )
  (signed byte) main::x#2 ← phi( main::@1/(signed byte) main::x#0 main::@14/(signed byte) main::x#1 )
  (byte~) main::$5 ← ((byte)) (signed byte) main::x#2
  (word~) main::$6 ← ((word)) { (byte~) main::$5, (number) 0 }
  (signed word~) main::$7 ← ((signed word)) (word~) main::$6
  (signed word) main::xw#0 ← (signed word~) main::$7
  (byte~) main::$8 ← ((byte)) (signed byte) main::y#2
  (word~) main::$9 ← ((word)) { (byte~) main::$8, (number) 0 }
  (signed word~) main::$10 ← ((signed word)) (word~) main::$9
  (signed word) main::yw#0 ← (signed word~) main::$10
  (signed word) atan2_16::x#0 ← (signed word) main::xw#0
  (signed word) atan2_16::y#0 ← (signed word) main::yw#0
  call atan2_16 
  (word) atan2_16::return#2 ← (word) atan2_16::return#1
  to:main::@13
main::@13: scope:[main]  from main::@2
  (byte*) print_char_cursor#33 ← phi( main::@2/(byte*) print_char_cursor#34 )
  (signed byte) main::y#6 ← phi( main::@2/(signed byte) main::y#2 )
  (signed byte) main::x#4 ← phi( main::@2/(signed byte) main::x#2 )
  (byte*) main::screen#3 ← phi( main::@2/(byte*) main::screen#4 )
  (word) main::diff_sum#4 ← phi( main::@2/(word) main::diff_sum#6 )
  (byte*) main::screen_ref#2 ← phi( main::@2/(byte*) main::screen_ref#4 )
  (word) atan2_16::return#4 ← phi( main::@2/(word) atan2_16::return#2 )
  (word~) main::$11 ← (word) atan2_16::return#4
  (word) main::angle_w#0 ← (word~) main::$11
  (number~) main::$12 ← (word) main::angle_w#0 + (number) $80
  (number~) main::$13 ← > (number~) main::$12
  (byte) main::ang_w#0 ← (number~) main::$13
  (byte) diff::bb1#0 ← (byte) main::ang_w#0
  (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2)
  call diff 
  (byte) diff::return#0 ← (byte) diff::return#2
  to:main::@14
main::@14: scope:[main]  from main::@13
  (byte*) print_char_cursor#32 ← phi( main::@13/(byte*) print_char_cursor#33 )
  (signed byte) main::y#5 ← phi( main::@13/(signed byte) main::y#6 )
  (signed byte) main::x#3 ← phi( main::@13/(signed byte) main::x#4 )
  (byte*) main::screen#2 ← phi( main::@13/(byte*) main::screen#3 )
  (byte*) main::screen_ref#3 ← phi( main::@13/(byte*) main::screen_ref#2 )
  (byte) main::ang_w#1 ← phi( main::@13/(byte) main::ang_w#0 )
  (word) main::diff_sum#2 ← phi( main::@13/(word) main::diff_sum#4 )
  (byte) diff::return#3 ← phi( main::@13/(byte) diff::return#0 )
  (byte~) main::$14 ← (byte) diff::return#3
  (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14
  (byte~) main::$15 ← (byte) main::ang_w#1 - *((byte*) main::screen_ref#3)
  *((byte*) main::screen#2) ← (byte~) main::$15
  (byte*) main::screen#1 ← ++ (byte*) main::screen#2
  (byte*) main::screen_ref#1 ← ++ (byte*) main::screen_ref#3
  (signed byte) main::x#1 ← (signed byte) main::x#3 + rangenext(-$13,$14)
  (bool~) main::$16 ← (signed byte) main::x#1 != rangelast(-$13,$14)
  if((bool~) main::$16) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@14
  (byte*) main::screen#6 ← phi( main::@14/(byte*) main::screen#1 )
  (byte*) main::screen_ref#6 ← phi( main::@14/(byte*) main::screen_ref#1 )
  (byte*) print_char_cursor#28 ← phi( main::@14/(byte*) print_char_cursor#32 )
  (word) main::diff_sum#5 ← phi( main::@14/(word) main::diff_sum#1 )
  (signed byte) main::y#3 ← phi( main::@14/(signed byte) main::y#5 )
  (signed byte) main::y#1 ← (signed byte) main::y#3 + rangenext(-$c,$c)
  (bool~) main::$17 ← (signed byte) main::y#1 != rangelast(-$c,$c)
  if((bool~) main::$17) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3
  (byte*) print_char_cursor#25 ← phi( main::@3/(byte*) print_char_cursor#28 )
  (word) main::diff_sum#3 ← phi( main::@3/(word) main::diff_sum#5 )
  (word) print_word::w#0 ← (word) main::diff_sum#3
  call print_word 
  to:main::@15
main::@15: scope:[main]  from main::@4
  (byte*) print_char_cursor#20 ← phi( main::@4/(byte*) print_char_cursor#3 )
  (byte*) print_char_cursor#9 ← (byte*) print_char_cursor#20
  (byte*~) main::$3 ← (byte*) COLS#0 + (number) $c*(number) $28
  (byte*~) main::$4 ← (byte*~) main::$3 + (number) $13
  (byte*) main::col00#0 ← (byte*~) main::$4
  to:main::@5
main::@5: scope:[main]  from main::@15 main::@6
  (byte*) print_char_cursor#26 ← phi( main::@15/(byte*) print_char_cursor#9 main::@6/(byte*) print_char_cursor#29 )
  (byte*) main::col00#2 ← phi( main::@15/(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*) print_char_cursor#29 ← phi( main::@5/(byte*) print_char_cursor#26 )
  (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
  (byte*) print_char_cursor#21 ← phi( main::@5/(byte*) print_char_cursor#26 )
  (byte*) print_char_cursor#10 ← (byte*) print_char_cursor#21
  return 
  to:@return
diff: scope:[diff]  from main::@13
  (byte) diff::bb2#1 ← phi( main::@13/(byte) diff::bb2#0 )
  (byte) diff::bb1#1 ← phi( main::@13/(byte) diff::bb1#0 )
  (bool~) diff::$0 ← (byte) diff::bb1#1 < (byte) diff::bb2#1
  if((bool~) diff::$0) goto diff::@1
  to:diff::@2
diff::@1: scope:[diff]  from diff
  (byte) diff::bb1#2 ← phi( diff/(byte) diff::bb1#1 )
  (byte) diff::bb2#2 ← phi( diff/(byte) diff::bb2#1 )
  (byte~) diff::$3 ← (byte) diff::bb2#2 - (byte) diff::bb1#2
  (byte~) diff::$4 ← (byte~) diff::$3
  to:diff::@3
diff::@2: scope:[diff]  from diff
  (byte) diff::bb2#3 ← phi( diff/(byte) diff::bb2#1 )
  (byte) diff::bb1#3 ← phi( diff/(byte) diff::bb1#1 )
  (byte~) diff::$1 ← (byte) diff::bb1#3 - (byte) diff::bb2#3
  (byte~) diff::$2 ← (byte~) diff::$1
  to:diff::@3
diff::@3: scope:[diff]  from diff::@1 diff::@2
  (byte~) diff::$5 ← phi( diff::@1/(byte~) diff::$4 diff::@2/(byte~) diff::$2 )
  (byte) diff::return#1 ← (byte~) diff::$5
  to:diff::@return
diff::@return: scope:[diff]  from diff::@3
  (byte) diff::return#4 ← phi( diff::@3/(byte) diff::return#1 )
  (byte) diff::return#2 ← (byte) diff::return#4
  return 
  to:@return
@44: scope:[]  from @42
  (byte*) print_char_cursor#27 ← phi( @42/(byte*) print_char_cursor#30 )
  call main 
  to:@45
@45: scope:[]  from @44
  (byte*) print_char_cursor#22 ← phi( @44/(byte*) print_char_cursor#10 )
  (byte*) print_char_cursor#11 ← (byte*) print_char_cursor#22
  to:@end
@end: scope:[]  from @45

SYMBOL TABLE SSA
(const string) $0 = (string) "0123456789abcdef"
(label) @1
(label) @19
(label) @3
(label) @35
(label) @42
(label) @44
(label) @45
(label) @begin
(label) @end
(byte*) CHARSET
(byte*) CHARSET#0
(byte*) COLS
(byte*) COLS#0
(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16
(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0
(byte) CORDIC_ITERATIONS_16
(byte) CORDIC_ITERATIONS_16#0
(byte*) D018
(byte*) D018#0
(byte[]) FONT_HEX_PROTO
(byte[]) FONT_HEX_PROTO#0
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(byte*) SCREEN
(byte*) SCREEN#0
(byte[$3e8]) SCREEN_REF
(byte[$3e8]) SCREEN_REF#0
(const byte) SIZEOF_WORD = (byte) 2
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
(bool~) atan2_16::$0
(signed word~) atan2_16::$1
(bool~) atan2_16::$10
(bool~) atan2_16::$11
(number~) atan2_16::$12
(bool~) atan2_16::$13
(bool~) atan2_16::$14
(word~) atan2_16::$15
(number~) atan2_16::$16
(bool~) atan2_16::$17
(bool~) atan2_16::$18
(bool~) atan2_16::$19
(signed word~) atan2_16::$2
(bool~) atan2_16::$20
(bool~) atan2_16::$21
(bool~) atan2_16::$22
(byte~) atan2_16::$23
(byte~) atan2_16::$24
(bool~) atan2_16::$25
(signed word~) atan2_16::$3
(signed word~) atan2_16::$4
(bool~) atan2_16::$5
(signed word~) atan2_16::$6
(signed word~) atan2_16::$7
(signed word~) atan2_16::$8
(signed word~) atan2_16::$9
(label) atan2_16::@1
(label) atan2_16::@13
(label) atan2_16::@15
(label) atan2_16::@16
(label) atan2_16::@17
(label) atan2_16::@18
(label) atan2_16::@19
(label) atan2_16::@2
(label) atan2_16::@20
(label) atan2_16::@24
(label) atan2_16::@25
(label) atan2_16::@26
(label) atan2_16::@27
(label) atan2_16::@3
(label) atan2_16::@30
(label) atan2_16::@33
(label) atan2_16::@4
(label) atan2_16::@5
(label) atan2_16::@6
(label) atan2_16::@7
(label) atan2_16::@8
(label) atan2_16::@return
(word) atan2_16::angle
(word) atan2_16::angle#0
(word) atan2_16::angle#1
(word) atan2_16::angle#10
(word) atan2_16::angle#11
(word) atan2_16::angle#12
(word) atan2_16::angle#13
(word) atan2_16::angle#14
(word) atan2_16::angle#15
(word) atan2_16::angle#16
(word) atan2_16::angle#17
(word) atan2_16::angle#18
(word) atan2_16::angle#19
(word) atan2_16::angle#2
(word) atan2_16::angle#20
(word) atan2_16::angle#3
(word) atan2_16::angle#4
(word) atan2_16::angle#5
(word) atan2_16::angle#6
(word) atan2_16::angle#7
(word) atan2_16::angle#8
(word) atan2_16::angle#9
(byte) atan2_16::i
(byte) atan2_16::i#0
(byte) atan2_16::i#1
(byte) atan2_16::i#10
(byte) atan2_16::i#11
(byte) atan2_16::i#2
(byte) atan2_16::i#3
(byte) atan2_16::i#4
(byte) atan2_16::i#5
(byte) atan2_16::i#6
(byte) atan2_16::i#7
(byte) atan2_16::i#8
(byte) atan2_16::i#9
(word) atan2_16::return
(word) atan2_16::return#0
(word) atan2_16::return#1
(word) atan2_16::return#2
(word) atan2_16::return#3
(word) atan2_16::return#4
(byte) atan2_16::shift
(byte) atan2_16::shift#0
(byte) atan2_16::shift#1
(byte) atan2_16::shift#2
(byte) atan2_16::shift#3
(byte) atan2_16::shift#4
(signed word) atan2_16::x
(signed word) atan2_16::x#0
(signed word) atan2_16::x#1
(signed word) atan2_16::x#10
(signed word) atan2_16::x#11
(signed word) atan2_16::x#12
(signed word) atan2_16::x#13
(signed word) atan2_16::x#14
(signed word) atan2_16::x#15
(signed word) atan2_16::x#16
(signed word) atan2_16::x#17
(signed word) atan2_16::x#18
(signed word) atan2_16::x#2
(signed word) atan2_16::x#3
(signed word) atan2_16::x#4
(signed word) atan2_16::x#5
(signed word) atan2_16::x#6
(signed word) atan2_16::x#7
(signed word) atan2_16::x#8
(signed word) atan2_16::x#9
(signed word) atan2_16::xd
(signed word) atan2_16::xd#0
(signed word) atan2_16::xd#1
(signed word) atan2_16::xd#2
(signed word) atan2_16::xd#3
(signed word) atan2_16::xd#4
(signed word) atan2_16::xd#5
(signed word) atan2_16::xd#6
(signed word) atan2_16::xd#7
(signed word) atan2_16::xd#8
(signed word) atan2_16::xd#9
(signed word) atan2_16::xi
(signed word) atan2_16::xi#0
(signed word) atan2_16::xi#1
(signed word) atan2_16::xi#10
(signed word) atan2_16::xi#11
(signed word) atan2_16::xi#12
(signed word) atan2_16::xi#2
(signed word) atan2_16::xi#3
(signed word) atan2_16::xi#4
(signed word) atan2_16::xi#5
(signed word) atan2_16::xi#6
(signed word) atan2_16::xi#7
(signed word) atan2_16::xi#8
(signed word) atan2_16::xi#9
(signed word) atan2_16::y
(signed word) atan2_16::y#0
(signed word) atan2_16::y#1
(signed word) atan2_16::y#10
(signed word) atan2_16::y#11
(signed word) atan2_16::y#12
(signed word) atan2_16::y#13
(signed word) atan2_16::y#14
(signed word) atan2_16::y#15
(signed word) atan2_16::y#16
(signed word) atan2_16::y#17
(signed word) atan2_16::y#18
(signed word) atan2_16::y#19
(signed word) atan2_16::y#2
(signed word) atan2_16::y#20
(signed word) atan2_16::y#3
(signed word) atan2_16::y#4
(signed word) atan2_16::y#5
(signed word) atan2_16::y#6
(signed word) atan2_16::y#7
(signed word) atan2_16::y#8
(signed word) atan2_16::y#9
(signed word) atan2_16::yd
(signed word) atan2_16::yd#0
(signed word) atan2_16::yd#1
(signed word) atan2_16::yd#2
(signed word) atan2_16::yd#3
(signed word) atan2_16::yd#4
(signed word) atan2_16::yd#5
(signed word) atan2_16::yd#6
(signed word) atan2_16::yd#7
(signed word) atan2_16::yd#8
(signed word) atan2_16::yd#9
(signed word) atan2_16::yi
(signed word) atan2_16::yi#0
(signed word) atan2_16::yi#1
(signed word) atan2_16::yi#10
(signed word) atan2_16::yi#11
(signed word) atan2_16::yi#12
(signed word) atan2_16::yi#13
(signed word) atan2_16::yi#14
(signed word) atan2_16::yi#15
(signed word) atan2_16::yi#2
(signed word) atan2_16::yi#3
(signed word) atan2_16::yi#4
(signed word) atan2_16::yi#5
(signed word) atan2_16::yi#6
(signed word) atan2_16::yi#7
(signed word) atan2_16::yi#8
(signed word) atan2_16::yi#9
(byte()) diff((byte) diff::bb1 , (byte) diff::bb2)
(bool~) diff::$0
(byte~) diff::$1
(byte~) diff::$2
(byte~) diff::$3
(byte~) diff::$4
(byte~) diff::$5
(label) diff::@1
(label) diff::@2
(label) diff::@3
(label) diff::@return
(byte) diff::bb1
(byte) diff::bb1#0
(byte) diff::bb1#1
(byte) diff::bb1#2
(byte) diff::bb1#3
(byte) diff::bb2
(byte) diff::bb2#0
(byte) diff::bb2#1
(byte) diff::bb2#2
(byte) diff::bb2#3
(byte) diff::return
(byte) diff::return#0
(byte) diff::return#1
(byte) diff::return#2
(byte) diff::return#3
(byte) diff::return#4
(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
(signed word~) main::$10
(word~) main::$11
(number~) main::$12
(number~) main::$13
(byte~) main::$14
(byte~) main::$15
(bool~) main::$16
(bool~) main::$17
(byte*~) main::$3
(byte*~) main::$4
(byte~) main::$5
(word~) main::$6
(signed word~) main::$7
(byte~) main::$8
(word~) main::$9
(label) main::@1
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@15
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@return
(byte) main::ang_w
(byte) main::ang_w#0
(byte) main::ang_w#1
(word) main::angle_w
(word) main::angle_w#0
(byte*) main::col00
(byte*) main::col00#0
(byte*) main::col00#1
(byte*) main::col00#2
(word) main::diff_sum
(word) main::diff_sum#0
(word) main::diff_sum#1
(word) main::diff_sum#2
(word) main::diff_sum#3
(word) main::diff_sum#4
(word) main::diff_sum#5
(word) main::diff_sum#6
(word) main::diff_sum#7
(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
(byte*) main::screen#6
(byte*) main::screen_ref
(byte*) main::screen_ref#0
(byte*) main::screen_ref#1
(byte*) main::screen_ref#2
(byte*) main::screen_ref#3
(byte*) main::screen_ref#4
(byte*) main::screen_ref#5
(byte*) main::screen_ref#6
(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::x#4
(signed word) main::xw
(signed word) main::xw#0
(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
(signed byte) main::y#6
(signed word) main::yw
(signed word) main::yw#0
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0
(number~) print_byte::$2
(label) print_byte::@1
(label) print_byte::@2
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0
(byte) print_byte::b#1
(byte) print_byte::b#2
(byte) print_byte::b#3
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0
(byte) print_char::ch#1
(byte) print_char::ch#2
(byte*) print_char_cursor
(byte*) print_char_cursor#0
(byte*) print_char_cursor#1
(byte*) print_char_cursor#10
(byte*) print_char_cursor#11
(byte*) print_char_cursor#12
(byte*) print_char_cursor#13
(byte*) print_char_cursor#14
(byte*) print_char_cursor#15
(byte*) print_char_cursor#16
(byte*) print_char_cursor#17
(byte*) print_char_cursor#18
(byte*) print_char_cursor#19
(byte*) print_char_cursor#2
(byte*) print_char_cursor#20
(byte*) print_char_cursor#21
(byte*) print_char_cursor#22
(byte*) print_char_cursor#23
(byte*) print_char_cursor#24
(byte*) print_char_cursor#25
(byte*) print_char_cursor#26
(byte*) print_char_cursor#27
(byte*) print_char_cursor#28
(byte*) print_char_cursor#29
(byte*) print_char_cursor#3
(byte*) print_char_cursor#30
(byte*) print_char_cursor#31
(byte*) print_char_cursor#32
(byte*) print_char_cursor#33
(byte*) print_char_cursor#34
(byte*) print_char_cursor#35
(byte*) print_char_cursor#36
(byte*) print_char_cursor#37
(byte*) print_char_cursor#38
(byte*) print_char_cursor#39
(byte*) print_char_cursor#4
(byte*) print_char_cursor#40
(byte*) print_char_cursor#5
(byte*) print_char_cursor#6
(byte*) print_char_cursor#7
(byte*) print_char_cursor#8
(byte*) print_char_cursor#9
(byte[]) print_hextab
(byte[]) print_hextab#0
(byte*) print_line_cursor
(byte*) print_line_cursor#0
(byte*) print_screen
(byte*) print_screen#0
(void()) print_word((word) print_word::w)
(byte~) print_word::$0
(byte~) print_word::$2
(label) print_word::@1
(label) print_word::@2
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0
(word) print_word::w#1
(word) print_word::w#2

Fixing inline constructor with main::$18 ← (byte)main::$5 w= (byte)0
Fixing inline constructor with main::$19 ← (byte)main::$8 w= (byte)0
Successful SSA optimization Pass2FixInlineConstructorsNew
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) $f in (byte) CORDIC_ITERATIONS_16#0 ← (number) $f
Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$0 ← (signed word) atan2_16::y#1 >= (number) 0
Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$5 ← (signed word) atan2_16::x#1 >= (number) 0
Adding number conversion cast (unumber) 0 in (word) atan2_16::angle#0 ← (number) 0
Adding number conversion cast (unumber) 1 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (number) 1
Adding number conversion cast (unumber) atan2_16::$16 in (number~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (unumber)(number) 1
Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (number) 0
Adding number conversion cast (unumber) 2 in (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (number) 2
Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (number) 0
Adding number conversion cast (unumber) 2 in (bool~) atan2_16::$19 ← (byte) atan2_16::shift#2 >= (number) 2
Adding number conversion cast (snumber) 2 in (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (number) 2
Adding number conversion cast (snumber) 2 in (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (number) 2
Adding number conversion cast (unumber) 2 in (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#3 - (number) 2
Adding number conversion cast (unumber) 0 in (bool~) atan2_16::$25 ← (number) 0 != (byte) atan2_16::shift#4
Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$21 ← (signed word) atan2_16::yi#5 >= (number) 0
Adding number conversion cast (snumber) 1 in (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#4 >> (number) 1
Adding number conversion cast (snumber) 1 in (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#4 >> (number) 1
Adding number conversion cast (snumber) 0 in (bool~) atan2_16::$13 ← (signed word) atan2_16::y#4 < (number) 0
Adding number conversion cast (unumber) $8000 in (number~) atan2_16::$12 ← (number) $8000 - (word) atan2_16::angle#9
Adding number conversion cast (unumber) atan2_16::$12 in (number~) atan2_16::$12 ← (unumber)(number) $8000 - (word) atan2_16::angle#9
Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
Adding number conversion cast (unumber) $f in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (number) $f
Adding number conversion cast (unumber) print_byte::$2 in (number~) print_byte::$2 ← (byte) print_byte::b#3 & (unumber)(number) $f
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) 0 in (word) main::diff_sum#0 ← (number) 0
Adding number conversion cast (unumber) $80 in (number~) main::$12 ← (word) main::angle_w#0 + (number) $80
Adding number conversion cast (unumber) main::$12 in (number~) main::$12 ← (word) main::angle_w#0 + (unumber)(number) $80
Adding number conversion cast (unumber) main::$13 in (number~) main::$13 ← > (unumber~) main::$12
Adding number conversion cast (unumber) $c*$28 in (byte*~) main::$3 ← (byte*) COLS#0 + (number) $c*(number) $28
Adding number conversion cast (unumber) $13 in (byte*~) main::$4 ← (byte*~) main::$3 + (number) $13
Successful SSA optimization PassNAddNumberTypeConversions
Adding number conversion cast (byte) to elements in (byte[]) FONT_HEX_PROTO#0 ← { (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 PassNAddArrayNumberTypeConversions
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) CORDIC_ITERATIONS_16#0 ← (unumber)(number) $f
Inlining cast (word) atan2_16::angle#0 ← (unumber)(number) 0
Inlining cast (byte*) D018#0 ← (byte*)(number) $d018
Inlining cast (byte*) COLS#0 ← (byte*)(number) $d800
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
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
Inlining cast (word) main::diff_sum#0 ← (unumber)(number) 0
Inlining cast (byte~) main::$5 ← (byte)(signed byte) main::x#2
Inlining cast (signed word~) main::$7 ← (signed word)(word~) main::$6
Inlining cast (byte~) main::$8 ← (byte)(signed byte) main::y#2
Inlining cast (signed word~) main::$10 ← (signed word)(word~) main::$9
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 integer cast $f
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 2
Simplifying constant integer cast 0
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 2
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $8000
Simplifying constant pointer cast (byte*) 53272
Simplifying constant pointer cast (byte*) 55296
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 4
Simplifying constant integer cast $f
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 0
Simplifying constant integer cast (byte~) main::$5
Simplifying constant integer cast 0
Simplifying constant integer cast (byte~) main::$8
Simplifying constant integer cast 0
Simplifying constant integer cast $80
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) $f
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 unsigned number type (byte) 2
Finalized signed number type (signed byte) 0
Finalized unsigned number type (byte) 2
Finalized signed number type (signed byte) 2
Finalized signed number type (signed byte) 2
Finalized unsigned number type (byte) 2
Finalized unsigned number type (byte) 0
Finalized signed number type (signed byte) 0
Finalized signed number type (signed byte) 1
Finalized signed number type (signed byte) 1
Finalized signed number type (signed byte) 0
Finalized unsigned number type (word) $8000
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) $f
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) 0
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $13
Successful SSA optimization PassNFinalizeNumberTypeConversions
Inferred type updated to byte in (unumber~) atan2_16::$16 ← (byte) CORDIC_ITERATIONS_16#0 - (byte) 1
Inferred type updated to word in (unumber~) atan2_16::$12 ← (word) $8000 - (word) atan2_16::angle#9
Inferred type updated to byte in (unumber~) print_byte::$2 ← (byte) print_byte::b#3 & (byte) $f
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
Inferred type updated to word in (unumber~) main::$12 ← (word) main::angle_w#0 + (byte) $80
Inferred type updated to byte in (unumber~) main::$13 ← > (word~) main::$12
Inversing boolean not [63] (bool~) atan2_16::$18 ← (signed word) atan2_16::yi#3 != (signed byte) 0 from [62] (bool~) atan2_16::$17 ← (signed word) atan2_16::yi#3 == (signed byte) 0
Inversing boolean not [72] (bool~) atan2_16::$11 ← (signed word) atan2_16::x#4 >= (signed byte) 0 from [71] (bool~) atan2_16::$10 ← (signed word) atan2_16::x#4 < (signed byte) 0
Inversing boolean not [83] (bool~) atan2_16::$20 ← (byte) 0 == (byte) atan2_16::shift#4 from [82] (bool~) atan2_16::$25 ← (byte) 0 != (byte) atan2_16::shift#4
Inversing boolean not [107] (bool~) atan2_16::$14 ← (signed word) atan2_16::y#4 >= (signed byte) 0 from [106] (bool~) atan2_16::$13 ← (signed word) atan2_16::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 word) atan2_16::y#1 = (signed word) atan2_16::y#2 (signed word~) atan2_16::$3 (signed word) atan2_16::y#3 
Alias (signed word) atan2_16::x#5 = (signed word) atan2_16::x#9 (signed word) atan2_16::x#6 
Alias (signed word~) atan2_16::$2 = (signed word~) atan2_16::$1 
Alias (signed word) atan2_16::yi#0 = (signed word~) atan2_16::$4 (signed word) atan2_16::yi#12 (signed word) atan2_16::yi#13 
Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#2 (signed word~) atan2_16::$8 (signed word) atan2_16::x#3 
Alias (signed word) atan2_16::y#12 = (signed word) atan2_16::y#15 (signed word) atan2_16::y#13 
Alias (signed word~) atan2_16::$7 = (signed word~) atan2_16::$6 
Alias (signed word) atan2_16::xi#0 = (signed word~) atan2_16::$9 
Alias (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#6 (signed word) atan2_16::xd#0 
Alias (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#4 (signed word) atan2_16::yd#0 
Alias (byte) atan2_16::i#2 = (byte) atan2_16::i#6 (byte) atan2_16::shift#0 
Alias (word) atan2_16::angle#12 = (word) atan2_16::angle#19 
Alias (signed word) atan2_16::x#17 = (signed word) atan2_16::x#7 
Alias (signed word) atan2_16::y#19 = (signed word) atan2_16::y#7 
Alias (signed word) atan2_16::xd#3 = (signed word) atan2_16::xd#7 (signed word) atan2_16::xd#8 (signed word) atan2_16::xd#4 
Alias (signed word) atan2_16::yd#3 = (signed word) atan2_16::yd#7 (signed word) atan2_16::yd#8 (signed word) atan2_16::yd#4 
Alias (byte) atan2_16::shift#2 = (byte) atan2_16::shift#3 (byte) atan2_16::shift#4 
Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#15 (signed word) atan2_16::yi#14 (signed word) atan2_16::yi#11 
Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#12 (signed word) atan2_16::xi#11 (signed word) atan2_16::xi#9 
Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#11 (byte) atan2_16::i#8 (byte) atan2_16::i#9 
Alias (word) atan2_16::angle#16 = (word) atan2_16::angle#20 (word) atan2_16::angle#18 (word) atan2_16::angle#17 
Alias (signed word) atan2_16::x#14 = (signed word) atan2_16::x#18 (signed word) atan2_16::x#16 (signed word) atan2_16::x#15 
Alias (signed word) atan2_16::y#16 = (signed word) atan2_16::y#20 (signed word) atan2_16::y#18 (signed word) atan2_16::y#17 
Alias (signed word) atan2_16::xi#4 = (signed word) atan2_16::xi#7 (signed word) atan2_16::xi#5 
Alias (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#9 (signed word) atan2_16::yd#6 
Alias (signed word) atan2_16::yi#5 = (signed word) atan2_16::yi#6 (signed word) atan2_16::yi#7 
Alias (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#9 (signed word) atan2_16::xd#6 
Alias (byte) atan2_16::i#3 = (byte) atan2_16::i#7 (byte) atan2_16::i#4 
Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#7 (word) atan2_16::angle#8 
Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#13 (signed word) atan2_16::x#12 
Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#14 (signed word) atan2_16::y#11 
Alias (word) atan2_16::angle#1 = (word) atan2_16::angle#9 
Alias (signed word) atan2_16::y#5 = (signed word) atan2_16::y#6 
Alias (word) atan2_16::angle#4 = (word~) atan2_16::$12 
Alias (word) atan2_16::return#0 = (word) atan2_16::angle#10 (word) atan2_16::return#3 (word) atan2_16::return#1 
Alias (word) atan2_16::angle#11 = (word) atan2_16::angle#15 
Alias (word) atan2_16::angle#5 = (word~) atan2_16::$15 
Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#31 (byte*) print_char_cursor#30 (byte*) print_char_cursor#27 
Alias (byte) print_byte::b#0 = (byte~) print_word::$0 
Alias (word) print_word::w#1 = (word) print_word::w#2 
Alias (byte*) print_char_cursor#1 = (byte*) print_char_cursor#12 
Alias (byte) print_byte::b#1 = (byte~) print_word::$2 
Alias (byte*) print_char_cursor#13 = (byte*) print_char_cursor#2 (byte*) print_char_cursor#14 (byte*) print_char_cursor#3 
Alias (byte) print_byte::b#2 = (byte) print_byte::b#3 
Alias (byte*) print_char_cursor#15 = (byte*) print_char_cursor#4 
Alias (byte*) print_char_cursor#16 = (byte*) print_char_cursor#5 (byte*) print_char_cursor#17 (byte*) print_char_cursor#6 
Alias (byte*) print_char_cursor#19 = (byte*) print_char_cursor#7 (byte*) print_char_cursor#8 
Alias (byte*) print_char_cursor#36 = (byte*) print_char_cursor#39 (byte*) print_char_cursor#40 (byte*) print_char_cursor#38 (byte*) print_char_cursor#37 
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 (word~) main::$6 = (word~) main::$18 
Alias (signed word) main::xw#0 = (signed word~) main::$7 
Alias (word~) main::$9 = (word~) main::$19 
Alias (signed word) main::yw#0 = (signed word~) main::$10 
Alias (word) atan2_16::return#2 = (word) atan2_16::return#4 
Alias (byte*) main::screen_ref#2 = (byte*) main::screen_ref#4 (byte*) main::screen_ref#3 
Alias (word) main::diff_sum#2 = (word) main::diff_sum#4 (word) main::diff_sum#6 
Alias (byte*) main::screen#2 = (byte*) main::screen#3 (byte*) main::screen#4 
Alias (signed byte) main::x#2 = (signed byte) main::x#4 (signed byte) main::x#3 
Alias (signed byte) main::y#2 = (signed byte) main::y#6 (signed byte) main::y#5 (signed byte) main::y#3 
Alias (byte*) print_char_cursor#25 = (byte*) print_char_cursor#33 (byte*) print_char_cursor#34 (byte*) print_char_cursor#32 (byte*) print_char_cursor#28 
Alias (word) main::angle_w#0 = (word~) main::$11 
Alias (byte) main::ang_w#0 = (byte~) main::$13 (byte) main::ang_w#1 
Alias (byte) diff::return#0 = (byte) diff::return#3 
Alias (word) main::diff_sum#1 = (word) main::diff_sum#5 (word) main::diff_sum#3 
Alias (byte*) main::screen_ref#1 = (byte*) main::screen_ref#6 
Alias (byte*) main::screen#1 = (byte*) main::screen#6 
Alias (byte*) print_char_cursor#20 = (byte*) print_char_cursor#9 
Alias (byte*) main::col00#0 = (byte*~) main::$4 
Alias (byte*) main::col00#1 = (byte*) main::col00#2 
Alias (byte*) print_char_cursor#10 = (byte*) print_char_cursor#29 (byte*) print_char_cursor#26 (byte*) print_char_cursor#21 
Alias (byte) diff::bb2#1 = (byte) diff::bb2#2 (byte) diff::bb2#3 
Alias (byte) diff::bb1#1 = (byte) diff::bb1#2 (byte) diff::bb1#3 
Alias (byte~) diff::$4 = (byte~) diff::$3 
Alias (byte~) diff::$2 = (byte~) diff::$1 
Alias (byte) diff::return#1 = (byte~) diff::$5 (byte) diff::return#4 (byte) diff::return#2 
Alias (byte*) print_char_cursor#11 = (byte*) print_char_cursor#22 
Successful SSA optimization Pass2AliasElimination
Alias (signed word) atan2_16::x#1 = (signed word) atan2_16::x#5 (signed word) atan2_16::x#10 
Alias (signed word) atan2_16::y#1 = (signed word) atan2_16::y#12 (signed word) atan2_16::y#9 
Alias (signed word) atan2_16::yi#0 = (signed word) atan2_16::yi#9 
Alias (signed word) atan2_16::yi#10 = (signed word) atan2_16::yi#5 
Alias (signed word) atan2_16::xi#10 = (signed word) atan2_16::xi#4 
Alias (byte) atan2_16::i#10 = (byte) atan2_16::i#3 (byte) atan2_16::i#5 
Alias (word) atan2_16::angle#14 = (word) atan2_16::angle#16 
Alias (signed word) atan2_16::x#11 = (signed word) atan2_16::x#14 (signed word) atan2_16::x#8 
Alias (signed word) atan2_16::y#10 = (signed word) atan2_16::y#16 (signed word) atan2_16::y#8 
Alias (signed word) atan2_16::y#4 = (signed word) atan2_16::y#5 
Successful SSA optimization Pass2AliasElimination
Self Phi Eliminated (byte*) init_font_hex::proto_hi#2
Self Phi Eliminated (byte*) init_font_hex::proto_lo#2
Self Phi Eliminated (byte*) init_font_hex::charset#3
Self Phi Eliminated (byte) init_font_hex::c1#2
Self Phi Eliminated (byte) init_font_hex::c#2
Self Phi Eliminated (signed word) atan2_16::yi#10
Self Phi Eliminated (signed word) atan2_16::xi#10
Self Phi Eliminated (byte) atan2_16::i#10
Self Phi Eliminated (word) atan2_16::angle#14
Self Phi Eliminated (signed word) atan2_16::x#11
Self Phi Eliminated (signed word) atan2_16::y#10
Self Phi Eliminated (signed byte) main::y#2
Self Phi Eliminated (byte*) print_char_cursor#25
Self Phi Eliminated (byte*) main::col00#1
Self Phi Eliminated (byte*) print_char_cursor#10
Successful SSA optimization Pass2SelfPhiElimination
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 word) atan2_16::y#1 (signed word) atan2_16::y#0
Identical Phi Values (signed word) atan2_16::x#1 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::yi#10 (signed word) atan2_16::yi#3
Identical Phi Values (signed word) atan2_16::xi#10 (signed word) atan2_16::xi#3
Identical Phi Values (byte) atan2_16::i#10 (byte) atan2_16::i#2
Identical Phi Values (word) atan2_16::angle#14 (word) atan2_16::angle#12
Identical Phi Values (signed word) atan2_16::x#11 (signed word) atan2_16::x#17
Identical Phi Values (signed word) atan2_16::y#10 (signed word) atan2_16::y#19
Identical Phi Values (word) print_word::w#1 (word) print_word::w#0
Identical Phi Values (byte*) print_char_cursor#23 (byte*) print_char_cursor#25
Identical Phi Values (byte*) print_char_cursor#1 (byte*) print_char_cursor#16
Identical Phi Values (byte*) print_char_cursor#13 (byte*) print_char_cursor#16
Identical Phi Values (byte*) print_char_cursor#15 (byte*) print_char_cursor#19
Identical Phi Values (byte*) print_char_cursor#16 (byte*) print_char_cursor#19
Identical Phi Values (byte*) print_char_cursor#36 (byte*) print_char_cursor#0
Identical Phi Values (signed byte) main::y#2 (signed byte) main::y#4
Identical Phi Values (byte*) print_char_cursor#25 (byte*) print_char_cursor#35
Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#13
Identical Phi Values (byte*) main::col00#1 (byte*) main::col00#0
Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_char_cursor#20
Identical Phi Values (byte) diff::bb1#1 (byte) diff::bb1#0
Identical Phi Values (byte) diff::bb2#1 (byte) diff::bb2#0
Identical Phi Values (byte*) print_char_cursor#11 (byte*) print_char_cursor#10
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17
Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19
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_16::$0 [41] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
Simple Condition (bool~) atan2_16::$5 [50] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
Simple Condition (bool~) atan2_16::$18 [64] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16
Simple Condition (bool~) atan2_16::$11 [73] if((signed word) atan2_16::x#17>=(signed byte) 0) goto atan2_16::@7
Simple Condition (bool~) atan2_16::$19 [76] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19
Simple Condition (bool~) atan2_16::$20 [84] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25
Simple Condition (bool~) atan2_16::$21 [87] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26
Simple Condition (bool~) atan2_16::$22 [104] if((byte) atan2_16::i#1!=rangelast(0,atan2_16::$16)) goto atan2_16::@15
Simple Condition (bool~) atan2_16::$14 [108] if((signed word) atan2_16::y#19>=(signed byte) 0) goto atan2_16::@8
Simple Condition (bool~) main::$16 [227] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2
Simple Condition (bool~) main::$17 [231] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1
Simple Condition (bool~) diff::$0 [249] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [104] if((byte) atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant right-side identified [36] (byte[]) FONT_HEX_PROTO#0 ← { (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 Pass2ConstantRValueConsolidation
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) CORDIC_ITERATIONS_16#0 = $f
Constant (const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2
 }}
Constant (const word) atan2_16::angle#0 = 0
Constant (const byte) atan2_16::i#0 = 0
Constant (const byte*) D018#0 = (byte*) 53272
Constant (const byte*) COLS#0 = (byte*) 55296
Constant (const byte*) print_char_cursor#0 = (byte*) 1024
Constant (const byte[]) print_hextab#0 = $0
Constant (const byte*) CHARSET#0 = (byte*) 8192
Constant (const byte*) SCREEN#0 = (byte*) 10240
Constant (const byte[$3e8]) SCREEN_REF#0 = kickasm {{ .for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)
 }}
Constant (const word) main::diff_sum#0 = 0
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
Constant (const byte*) main::screen_ref#0 = SCREEN_REF#0
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (word)main::toD0181_screen#0 in [172] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0
Constant value identified (word)main::toD0181_gfx#0 in [176] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0
Successful SSA optimization Pass2ConstantValues
if() condition always true - replacing block destination [241] 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#5 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 [225] main::x#1 ← ++ main::x#2 to ++
Resolved ranged comparison value [227] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15
Resolved ranged next value [229] main::y#1 ← ++ main::y#4 to ++
Resolved ranged comparison value [231] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d
Converting *(pointer+n) to pointer[n] [243] *((byte*) main::col00#0) ← ++ *((byte*) main::col00#0)  -- *(main::$3 + $13)
Converting *(pointer+n) to pointer[n] [243] *((byte*) main::col00#0) ← ++ *((byte*~) main::$3 + (byte) $13)  -- *(main::$3 + $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 [123] (byte*) main::col00#0 ← (byte*~) main::$3 + (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
Self Phi Eliminated (byte*) init_font_hex::proto_hi#4
Self Phi Eliminated (byte) init_font_hex::c#5
Self Phi Eliminated (signed word) atan2_16::x#17
Self Phi Eliminated (signed word) atan2_16::y#19
Self Phi Eliminated (byte*) print_char_cursor#35
Successful SSA optimization Pass2SelfPhiElimination
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
Identical Phi Values (signed word) atan2_16::x#17 (signed word) atan2_16::x#0
Identical Phi Values (signed word) atan2_16::y#19 (signed word) atan2_16::y#0
Identical Phi Values (byte*) print_char_cursor#35 (const byte*) print_char_cursor#0
Successful SSA optimization Pass2IdenticalPhiElimination
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_16::$16 ← (const byte) CORDIC_ITERATIONS_16#0 - (byte) 1
Constant right-side identified [121] (byte*~) main::$3 ← (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_16::$16 = CORDIC_ITERATIONS_16#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::$3 = COLS#0+(word)$c*$28
Successful SSA optimization Pass2ConstantIdentification
Resolved ranged next value [54] atan2_16::i#1 ← ++ atan2_16::i#2 to ++
Resolved ranged comparison value [55] if(atan2_16::i#1==rangelast(0,atan2_16::$16)) goto atan2_16::@17 to (const byte) atan2_16::$16+(number) 1
Adding number conversion cast (unumber) atan2_16::$16+1 in if((byte) atan2_16::i#1==(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17
Adding number conversion cast (unumber) 1 in if((byte) atan2_16::i#1==(unumber)(const byte) atan2_16::$16+(number) 1) goto atan2_16::@17
Successful SSA optimization PassNAddNumberTypeConversions
Simplifying constant integer cast (const byte) atan2_16::$16+(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 [78] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff
Constant right-side identified [81] (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 [78] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4
Constant right-side identified [80] (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 [78] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0
Constant right-side identified [79] (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 [78] (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
Inlining Noop Cast [81] (byte~) main::$5 ← (byte)(signed byte) main::x#2 keeping main::x#2
Inlining Noop Cast [84] (byte~) main::$8 ← (byte)(signed byte) main::y#4 keeping main::y#4
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [83] (signed word) main::xw#0 ← (signed word)(word~) main::$6 keeping main::xw#0
Inlining Noop Cast [86] (signed word) main::yw#0 ← (signed word)(word~) main::$9 keeping main::yw#0
Successful SSA optimization Pass2NopCastInlining
Rewriting division to use shift [31] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 / (byte) 2
Rewriting multiplication to use shift [45] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD
Rewriting multiplication to use shift [49] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 * (const byte) SIZEOF_WORD
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 word) atan2_16::angle#0
Inlining constant with var siblings (const byte) atan2_16::i#0
Inlining constant with var siblings (const word) main::diff_sum#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
Inlining constant with var siblings (const byte*) main::screen_ref#0
Inlining constant with var siblings (const byte*) print_char_cursor#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 main::diff_sum#0 = (byte) 0
Constant inlined init_font_hex::proto_hi#0 = (const byte[]) FONT_HEX_PROTO#0
Constant inlined $0 = (const byte[]) print_hextab#0
Constant inlined atan2_16::angle#0 = (byte) 0
Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0
Constant inlined init_font_hex::c1#0 = (byte) 0
Constant inlined atan2_16::$16 = (const byte) CORDIC_ITERATIONS_16#0-(byte) 1
Constant inlined main::screen_ref#0 = (const byte[$3e8]) SCREEN_REF#0
Constant inlined atan2_16::i#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 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 print_char_cursor#0 = (byte*) 1024
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::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
Constant inlined main::$3 = (const byte*) COLS#0+(word)(number) $c*(number) $28
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
Eliminating unused constant (const byte) SIZEOF_WORD
Successful SSA optimization PassNEliminateUnusedVars
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_16::@34(between atan2_16::@27 and atan2_16::@15)
Added new block during phi lifting atan2_16::@35(between atan2_16::@15 and atan2_16::@17)
Added new block during phi lifting atan2_16::@36(between atan2_16::@27 and atan2_16::@17)
Added new block during phi lifting atan2_16::@37(between atan2_16::@20 and atan2_16::@25)
Added new block during phi lifting atan2_16::@38(between atan2_16::@17 and atan2_16::@7)
Added new block during phi lifting atan2_16::@39(between atan2_16::@7 and atan2_16::@8)
Added new block during phi lifting main::@16(between main::@3 and main::@1)
Added new block during phi lifting main::@17(between main::@14 and main::@2)
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
Adding NOP phi() at start of @3
Adding NOP phi() at start of @19
Adding NOP phi() at start of @35
Adding NOP phi() at start of @42
Adding NOP phi() at start of @44
Adding NOP phi() at start of @45
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::@15
Adding NOP phi() at start of main::@5
Adding NOP phi() at start of print_word::@2
Adding NOP phi() at start of print_byte::@2
Adding NOP phi() at start of init_font_hex
CALL GRAPH
Calls in [] to main:7 
Calls in [main] to init_font_hex:11 atan2_16:25 diff:32 print_word:45 
Calls in [print_word] to print_byte:59 print_byte:63 
Calls in [print_byte] to print_char:71 print_char:76 

Created 38 initial phi equivalence classes
Coalesced [17] main::screen_ref#8 ← main::screen_ref#5
Coalesced [18] main::diff_sum#9 ← main::diff_sum#7
Coalesced [19] main::screen#8 ← main::screen#5
Coalesced [49] main::y#7 ← main::y#1
Coalesced [50] main::screen_ref#7 ← main::screen_ref#1
Coalesced [51] main::diff_sum#8 ← main::diff_sum#1
Coalesced [52] main::screen#7 ← main::screen#1
Coalesced [53] main::x#5 ← main::x#1
Coalesced (already) [54] main::screen_ref#9 ← main::screen_ref#1
Coalesced (already) [55] main::diff_sum#10 ← main::diff_sum#1
Coalesced (already) [56] main::screen#9 ← main::screen#1
Coalesced [58] print_byte::b#4 ← print_byte::b#0
Coalesced [61] print_byte::b#5 ← print_byte::b#1
Coalesced [62] print_char_cursor#41 ← print_char_cursor#19
Coalesced [69] print_char::ch#3 ← print_char::ch#0
Coalesced [70] print_char_cursor#42 ← print_char_cursor#24
Coalesced [74] print_char::ch#4 ← print_char::ch#1
Coalesced (already) [75] print_char_cursor#43 ← print_char_cursor#19
Coalesced [85] diff::return#6 ← diff::$2
Coalesced [89] diff::return#5 ← diff::$4
Coalesced [92] atan2_16::yi#17 ← atan2_16::$2
Coalesced [96] atan2_16::xi#14 ← atan2_16::$7
Coalesced [98] atan2_16::yi#19 ← atan2_16::yi#0
Coalesced [99] atan2_16::xi#16 ← atan2_16::xi#0
Coalesced [102] atan2_16::angle#22 ← atan2_16::angle#12
Coalesced [107] atan2_16::angle#27 ← atan2_16::angle#4
Coalesced [111] atan2_16::return#5 ← atan2_16::angle#5
Coalesced [114] atan2_16::return#6 ← atan2_16::angle#11
Coalesced [115] atan2_16::angle#26 ← atan2_16::angle#1
Not coalescing [116] atan2_16::shift#5 ← atan2_16::i#2
Not coalescing [117] atan2_16::xd#10 ← atan2_16::xi#3
Not coalescing [118] atan2_16::yd#10 ← atan2_16::yi#3
Coalesced [124] atan2_16::yd#13 ← atan2_16::yd#2
Coalesced [125] atan2_16::xd#13 ← atan2_16::xd#2
Coalesced [132] atan2_16::yi#21 ← atan2_16::yi#2
Coalesced [133] atan2_16::angle#25 ← atan2_16::angle#3
Coalesced [134] atan2_16::xi#18 ← atan2_16::xi#2
Coalesced [138] atan2_16::yi#18 ← atan2_16::yi#8
Coalesced [139] atan2_16::xi#15 ← atan2_16::xi#8
Coalesced [140] atan2_16::i#12 ← atan2_16::i#1
Coalesced [141] atan2_16::angle#21 ← atan2_16::angle#13
Coalesced (already) [142] atan2_16::angle#23 ← atan2_16::angle#13
Coalesced [147] atan2_16::yi#20 ← atan2_16::yi#1
Coalesced [148] atan2_16::angle#24 ← atan2_16::angle#2
Coalesced [149] atan2_16::xi#17 ← atan2_16::xi#1
Coalesced [150] atan2_16::yd#12 ← atan2_16::yd#3
Coalesced [151] atan2_16::xd#12 ← atan2_16::xd#3
Coalesced [155] atan2_16::shift#6 ← atan2_16::shift#1
Coalesced [156] atan2_16::xd#11 ← atan2_16::xd#1
Coalesced [157] atan2_16::yd#11 ← atan2_16::yd#1
Not coalescing [158] atan2_16::xi#13 ← atan2_16::x#0
Not coalescing [159] atan2_16::yi#16 ← atan2_16::y#0
Coalesced [162] init_font_hex::charset#9 ← init_font_hex::charset#5
Coalesced [184] init_font_hex::charset#8 ← init_font_hex::charset#0
Coalesced [185] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1
Coalesced [186] init_font_hex::c#7 ← init_font_hex::c#1
Coalesced (already) [187] init_font_hex::charset#10 ← init_font_hex::charset#0
Coalesced [188] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1
Coalesced [189] init_font_hex::c1#5 ← init_font_hex::c1#1
Coalesced [190] init_font_hex::i#3 ← init_font_hex::i#1
Coalesced [191] init_font_hex::idx#7 ← init_font_hex::idx#2
Coalesced down to 26 phi equivalence classes
Culled Empty Block (label) @1
Culled Empty Block (label) @3
Culled Empty Block (label) @19
Culled Empty Block (label) @35
Culled Empty Block (label) @42
Culled Empty Block (label) @45
Culled Empty Block (label) main::@12
Culled Empty Block (label) main::toD0181_@return
Culled Empty Block (label) main::@15
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@16
Culled Empty Block (label) main::@17
Culled Empty Block (label) print_word::@2
Culled Empty Block (label) print_byte::@2
Culled Empty Block (label) atan2_16::@35
Culled Empty Block (label) atan2_16::@39
Culled Empty Block (label) atan2_16::@38
Culled Empty Block (label) atan2_16::@34
Culled Empty Block (label) atan2_16::@36
Culled Empty Block (label) atan2_16::@37
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 @44 to @1
Renumbering block atan2_16::@13 to atan2_16::@9
Renumbering block atan2_16::@15 to atan2_16::@10
Renumbering block atan2_16::@16 to atan2_16::@11
Renumbering block atan2_16::@17 to atan2_16::@12
Renumbering block atan2_16::@18 to atan2_16::@13
Renumbering block atan2_16::@19 to atan2_16::@14
Renumbering block atan2_16::@20 to atan2_16::@15
Renumbering block atan2_16::@24 to atan2_16::@16
Renumbering block atan2_16::@25 to atan2_16::@17
Renumbering block atan2_16::@26 to atan2_16::@18
Renumbering block atan2_16::@27 to atan2_16::@19
Renumbering block atan2_16::@30 to atan2_16::@20
Renumbering block atan2_16::@33 to atan2_16::@21
Renumbering block main::@6 to main::@5
Renumbering block main::@11 to main::@6
Renumbering block main::@13 to main::@7
Renumbering block main::@14 to main::@8
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::@6
main::@6: 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::@6
  [8] (byte*) main::screen#5 ← phi( main::@6/(const byte*) SCREEN#0 main::@3/(byte*) main::screen#1 )
  [8] (word) main::diff_sum#7 ← phi( main::@6/(byte) 0 main::@3/(word) main::diff_sum#1 )
  [8] (byte*) main::screen_ref#5 ← phi( main::@6/(const byte[$3e8]) SCREEN_REF#0 main::@3/(byte*) main::screen_ref#1 )
  [8] (signed byte) main::y#4 ← phi( main::@6/(signed byte) -$c main::@3/(signed byte) main::y#1 )
  to:main::@2
main::@2: scope:[main]  from main::@1 main::@8
  [9] (byte*) main::screen#2 ← phi( main::@1/(byte*) main::screen#5 main::@8/(byte*) main::screen#1 )
  [9] (word) main::diff_sum#2 ← phi( main::@1/(word) main::diff_sum#7 main::@8/(word) main::diff_sum#1 )
  [9] (byte*) main::screen_ref#2 ← phi( main::@1/(byte*) main::screen_ref#5 main::@8/(byte*) main::screen_ref#1 )
  [9] (signed byte) main::x#2 ← phi( main::@1/(signed byte) -$13 main::@8/(signed byte) main::x#1 )
  [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0
  [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0
  [12] (signed word) atan2_16::x#0 ← (signed word)(word) main::xw#0
  [13] (signed word) atan2_16::y#0 ← (signed word)(word) main::yw#0
  [14] call atan2_16 
  [15] (word) atan2_16::return#2 ← (word) atan2_16::return#0
  to:main::@7
main::@7: scope:[main]  from main::@2
  [16] (word) main::angle_w#0 ← (word) atan2_16::return#2
  [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80
  [18] (byte) main::ang_w#0 ← > (word~) main::$12
  [19] (byte) diff::bb1#0 ← (byte) main::ang_w#0
  [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2)
  [21] call diff 
  [22] (byte) diff::return#0 ← (byte) diff::return#1
  to:main::@8
main::@8: scope:[main]  from main::@7
  [23] (byte~) main::$14 ← (byte) diff::return#0
  [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14
  [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2)
  [26] *((byte*) main::screen#2) ← (byte~) main::$15
  [27] (byte*) main::screen#1 ← ++ (byte*) main::screen#2
  [28] (byte*) main::screen_ref#1 ← ++ (byte*) main::screen_ref#2
  [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2
  [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2
  to:main::@3
main::@3: scope:[main]  from main::@8
  [31] (signed byte) main::y#1 ← ++ (signed byte) main::y#4
  [32] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1
  to:main::@4
main::@4: scope:[main]  from main::@3
  [33] (word) print_word::w#0 ← (word) main::diff_sum#1
  [34] call print_word 
  to:main::@5
main::@5: scope:[main]  from main::@4 main::@5
  [35] *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13) ← ++ *((const byte*) COLS#0+(word)(number) $c*(number) $28+(byte) $13)
  to:main::@5
print_word: scope:[print_word]  from main::@4
  [36] (byte) print_byte::b#0 ← > (word) print_word::w#0
  [37] call print_byte 
  to:print_word::@1
print_word::@1: scope:[print_word]  from print_word
  [38] (byte) print_byte::b#1 ← < (word) print_word::w#0
  [39] call print_byte 
  to:print_word::@return
print_word::@return: scope:[print_word]  from print_word::@1
  [40] return 
  to:@return
print_byte: scope:[print_byte]  from print_word print_word::@1
  [41] (byte*) print_char_cursor#24 ← phi( print_word/(byte*) 1024 print_word::@1/(byte*) print_char_cursor#19 )
  [41] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
  [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4
  [43] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
  [44] call print_char 
  to:print_byte::@1
print_byte::@1: scope:[print_byte]  from print_byte
  [45] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f
  [46] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
  [47] call print_char 
  to:print_byte::@return
print_byte::@return: scope:[print_byte]  from print_byte::@1
  [48] return 
  to:@return
print_char: scope:[print_char]  from print_byte print_byte::@1
  [49] (byte*) print_char_cursor#18 ← phi( print_byte/(byte*) print_char_cursor#24 print_byte::@1/(byte*) print_char_cursor#19 )
  [49] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 )
  [50] *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2
  [51] (byte*) print_char_cursor#19 ← ++ (byte*) print_char_cursor#18
  to:print_char::@return
print_char::@return: scope:[print_char]  from print_char
  [52] return 
  to:@return
diff: scope:[diff]  from main::@7
  [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1
  to:diff::@2
diff::@2: scope:[diff]  from diff
  [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0
  to:diff::@3
diff::@3: scope:[diff]  from diff::@1 diff::@2
  [55] (byte) diff::return#1 ← phi( diff::@1/(byte~) diff::$4 diff::@2/(byte~) diff::$2 )
  to:diff::@return
diff::@return: scope:[diff]  from diff::@3
  [56] return 
  to:@return
diff::@1: scope:[diff]  from diff
  [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0
  to:diff::@3
atan2_16: scope:[atan2_16]  from main::@2
  [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
  to:atan2_16::@2
atan2_16::@2: scope:[atan2_16]  from atan2_16
  [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
  to:atan2_16::@3
atan2_16::@3: scope:[atan2_16]  from atan2_16::@1 atan2_16::@2
  [60] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
  [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
  to:atan2_16::@5
atan2_16::@5: scope:[atan2_16]  from atan2_16::@3
  [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
  to:atan2_16::@6
atan2_16::@6: scope:[atan2_16]  from atan2_16::@4 atan2_16::@5
  [63] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
  to:atan2_16::@10
atan2_16::@10: scope:[atan2_16]  from atan2_16::@19 atan2_16::@6
  [64] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
  [64] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
  [64] (signed word) atan2_16::xi#3 ← phi( atan2_16::@19/(signed word) atan2_16::xi#8 atan2_16::@6/(signed word) atan2_16::xi#0 )
  [64] (signed word) atan2_16::yi#3 ← phi( atan2_16::@19/(signed word) atan2_16::yi#8 atan2_16::@6/(signed word) atan2_16::yi#0 )
  [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
  to:atan2_16::@12
atan2_16::@12: scope:[atan2_16]  from atan2_16::@10 atan2_16::@19
  [66] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
  [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
  [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
  to:atan2_16::@21
atan2_16::@21: scope:[atan2_16]  from atan2_16::@12
  [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
  to:atan2_16::@7
atan2_16::@7: scope:[atan2_16]  from atan2_16::@12 atan2_16::@21
  [70] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
  [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
  to:atan2_16::@9
atan2_16::@9: scope:[atan2_16]  from atan2_16::@7
  [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11
  to:atan2_16::@8
atan2_16::@8: scope:[atan2_16]  from atan2_16::@7 atan2_16::@9
  [73] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 )
  to:atan2_16::@return
atan2_16::@return: scope:[atan2_16]  from atan2_16::@8
  [74] return 
  to:@return
atan2_16::@11: scope:[atan2_16]  from atan2_16::@10
  [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
  [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
  [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
  to:atan2_16::@13
atan2_16::@13: scope:[atan2_16]  from atan2_16::@11 atan2_16::@14
  [78] (signed word) atan2_16::yd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::yd#10 atan2_16::@14/(signed word) atan2_16::yd#1 )
  [78] (signed word) atan2_16::xd#3 ← phi( atan2_16::@11/(signed word~) atan2_16::xd#10 atan2_16::@14/(signed word) atan2_16::xd#1 )
  [78] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
  [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14
  to:atan2_16::@15
atan2_16::@15: scope:[atan2_16]  from atan2_16::@13
  [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
  to:atan2_16::@16
atan2_16::@16: scope:[atan2_16]  from atan2_16::@15
  [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
  [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
  to:atan2_16::@17
atan2_16::@17: scope:[atan2_16]  from atan2_16::@15 atan2_16::@16
  [83] (signed word) atan2_16::xd#5 ← phi( atan2_16::@15/(signed word) atan2_16::xd#3 atan2_16::@16/(signed word) atan2_16::xd#2 )
  [83] (signed word) atan2_16::yd#5 ← phi( atan2_16::@15/(signed word) atan2_16::yd#3 atan2_16::@16/(signed word) atan2_16::yd#2 )
  [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
  to:atan2_16::@20
atan2_16::@20: scope:[atan2_16]  from atan2_16::@17
  [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
  [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
  [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
  [88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24)
  to:atan2_16::@19
atan2_16::@19: scope:[atan2_16]  from atan2_16::@18 atan2_16::@20
  [89] (signed word) atan2_16::xi#8 ← phi( atan2_16::@18/(signed word) atan2_16::xi#1 atan2_16::@20/(signed word) atan2_16::xi#2 )
  [89] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
  [89] (signed word) atan2_16::yi#8 ← phi( atan2_16::@18/(signed word) atan2_16::yi#1 atan2_16::@20/(signed word) atan2_16::yi#2 )
  [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
  [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
  to:atan2_16::@10
atan2_16::@18: scope:[atan2_16]  from atan2_16::@17
  [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
  [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
  [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
  [95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23)
  to:atan2_16::@19
atan2_16::@14: scope:[atan2_16]  from atan2_16::@13
  [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
  [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
  [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
  to:atan2_16::@13
atan2_16::@4: scope:[atan2_16]  from atan2_16::@3
  [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0
  to:atan2_16::@6
atan2_16::@1: scope:[atan2_16]  from atan2_16
  [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
  to:atan2_16::@3
init_font_hex: scope:[init_font_hex]  from main
  [101] phi()
  to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex]  from init_font_hex init_font_hex::@5
  [102] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
  [102] (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 )
  [102] (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
  [103] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
  [103] (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 )
  [103] (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 )
  [104] *((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
  [105] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
  [105] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
  [106] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
  [107] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
  [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
  [109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
  [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
  [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
  [112] 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
  [113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
  [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
  [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
  [116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
  [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
  [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
  [119] 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
  [120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
  [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
  [122] 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
  [123] return 
  to:@return


VARIABLE REGISTER WEIGHTS
(byte*) CHARSET
(byte*) COLS
(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16
(byte) CORDIC_ITERATIONS_16
(byte*) D018
(byte[]) FONT_HEX_PROTO
(byte*) SCREEN
(byte[$3e8]) SCREEN_REF
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
(signed word~) atan2_16::$2 4.0
(byte~) atan2_16::$23 2002.0
(byte~) atan2_16::$24 2002.0
(signed word~) atan2_16::$7 4.0
(word) atan2_16::angle
(word) atan2_16::angle#1 3.0
(word) atan2_16::angle#11 4.0
(word) atan2_16::angle#12 190.66666666666666
(word) atan2_16::angle#13 1334.6666666666667
(word) atan2_16::angle#2 2002.0
(word) atan2_16::angle#3 2002.0
(word) atan2_16::angle#4 4.0
(word) atan2_16::angle#5 4.0
(word) atan2_16::angle#6 2004.0
(byte) atan2_16::i
(byte) atan2_16::i#1 1501.5
(byte) atan2_16::i#2 208.54166666666669
(word) atan2_16::return
(word) atan2_16::return#0 34.99999999999999
(word) atan2_16::return#2 202.0
(byte) atan2_16::shift
(byte) atan2_16::shift#1 20002.0
(byte) atan2_16::shift#2 8001.25
(byte~) atan2_16::shift#5 667.3333333333334
(signed word) atan2_16::x
(signed word) atan2_16::x#0 2.8684210526315796
(signed word) atan2_16::xd
(signed word) atan2_16::xd#1 6667.333333333333
(signed word~) atan2_16::xd#10 1001.0
(signed word) atan2_16::xd#2 1001.0
(signed word) atan2_16::xd#3 7668.333333333332
(signed word) atan2_16::xd#5 1001.0
(signed word) atan2_16::xi
(signed word) atan2_16::xi#0 6.0
(signed word) atan2_16::xi#1 500.5
(signed word~) atan2_16::xi#13 4.0
(signed word) atan2_16::xi#2 500.5
(signed word) atan2_16::xi#3 267.0666666666667
(signed word) atan2_16::xi#8 1001.0
(signed word) atan2_16::y
(signed word) atan2_16::y#0 2.724999999999999
(signed word) atan2_16::yd
(signed word) atan2_16::yd#1 10001.0
(signed word~) atan2_16::yd#10 2002.0
(signed word) atan2_16::yd#2 2002.0
(signed word) atan2_16::yd#3 4601.0
(signed word) atan2_16::yd#5 2002.0
(signed word) atan2_16::yi
(signed word) atan2_16::yi#0 1.2000000000000002
(signed word) atan2_16::yi#1 667.3333333333334
(signed word~) atan2_16::yi#16 4.0
(signed word) atan2_16::yi#2 667.3333333333334
(signed word) atan2_16::yi#3 353.4117647058823
(signed word) atan2_16::yi#8 1001.0
(byte()) diff((byte) diff::bb1 , (byte) diff::bb2)
(byte~) diff::$2 4.0
(byte~) diff::$4 4.0
(byte) diff::bb1
(byte) diff::bb1#0 35.66666666666666
(byte) diff::bb2
(byte) diff::bb2#0 53.5
(byte) diff::return
(byte) diff::return#0 202.0
(byte) diff::return#1 34.99999999999999
(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()
(word~) main::$12 202.0
(byte~) main::$14 202.0
(byte~) main::$15 202.0
(byte) main::ang_w
(byte) main::ang_w#0 43.285714285714285
(word) main::angle_w
(word) main::angle_w#0 202.0
(byte*) main::col00
(word) main::diff_sum
(word) main::diff_sum#1 23.888888888888886
(word) main::diff_sum#2 14.2
(word) main::diff_sum#7 22.0
(byte*) main::screen
(byte*) main::screen#1 35.5
(byte*) main::screen#2 17.444444444444443
(byte*) main::screen#5 22.0
(byte*) main::screen_ref
(byte*) main::screen_ref#1 42.599999999999994
(byte*) main::screen_ref#2 21.842105263157897
(byte*) main::screen_ref#5 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 10.1
(signed word) main::xw
(word) main::xw#0 50.5
(signed byte) main::y
(signed byte) main::y#1 16.5
(signed byte) main::y#4 0.9565217391304348
(signed word) main::yw
(word) main::yw#0 50.5
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 4.0
(byte~) print_byte::$2 4.0
(byte) print_byte::b
(byte) print_byte::b#0 4.0
(byte) print_byte::b#1 4.0
(byte) print_byte::b#2 2.0
(void()) print_char((byte) print_char::ch)
(byte) print_char::ch
(byte) print_char::ch#0 4.0
(byte) print_char::ch#1 4.0
(byte) print_char::ch#2 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#18 4.0
(byte*) print_char_cursor#19 0.6666666666666666
(byte*) print_char_cursor#24 1.3333333333333333
(byte[]) print_hextab
(byte*) print_line_cursor
(byte*) print_screen
(void()) print_word((word) print_word::w)
(word) print_word::w
(word) print_word::w#0 2.0

Initial phi equivalence classes
[ main::y#4 main::y#1 ]
[ main::x#2 main::x#1 ]
[ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
[ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ]
[ main::screen#2 main::screen#5 main::screen#1 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
[ diff::return#1 diff::$4 diff::$2 ]
[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
[ atan2_16::i#2 atan2_16::i#1 ]
[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ]
[ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ]
[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
[ 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 main::xw#0 to zero page equivalence class [ main::xw#0 ]
Added variable main::yw#0 to zero page equivalence class [ main::yw#0 ]
Added variable atan2_16::x#0 to zero page equivalence class [ atan2_16::x#0 ]
Added variable atan2_16::y#0 to zero page equivalence class [ atan2_16::y#0 ]
Added variable atan2_16::return#2 to zero page equivalence class [ atan2_16::return#2 ]
Added variable main::angle_w#0 to zero page equivalence class [ main::angle_w#0 ]
Added variable main::$12 to zero page equivalence class [ main::$12 ]
Added variable main::ang_w#0 to zero page equivalence class [ main::ang_w#0 ]
Added variable diff::bb1#0 to zero page equivalence class [ diff::bb1#0 ]
Added variable diff::bb2#0 to zero page equivalence class [ diff::bb2#0 ]
Added variable diff::return#0 to zero page equivalence class [ diff::return#0 ]
Added variable main::$14 to zero page equivalence class [ main::$14 ]
Added variable main::$15 to zero page equivalence class [ main::$15 ]
Added variable print_word::w#0 to zero page equivalence class [ print_word::w#0 ]
Added variable print_byte::$0 to zero page equivalence class [ print_byte::$0 ]
Added variable print_byte::$2 to zero page equivalence class [ print_byte::$2 ]
Added variable atan2_16::$24 to zero page equivalence class [ atan2_16::$24 ]
Added variable atan2_16::$23 to zero page equivalence class [ atan2_16::$23 ]
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_ref#2 main::screen_ref#5 main::screen_ref#1 ]
[ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ]
[ main::screen#2 main::screen#5 main::screen#1 ]
[ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
[ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
[ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
[ diff::return#1 diff::$4 diff::$2 ]
[ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
[ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
[ atan2_16::i#2 atan2_16::i#1 ]
[ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ]
[ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ]
[ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
[ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
[ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
[ 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 ]
[ main::xw#0 ]
[ main::yw#0 ]
[ atan2_16::x#0 ]
[ atan2_16::y#0 ]
[ atan2_16::return#2 ]
[ main::angle_w#0 ]
[ main::$12 ]
[ main::ang_w#0 ]
[ diff::bb1#0 ]
[ diff::bb2#0 ]
[ diff::return#0 ]
[ main::$14 ]
[ main::$15 ]
[ print_word::w#0 ]
[ print_byte::$0 ]
[ print_byte::$2 ]
[ atan2_16::$24 ]
[ atan2_16::$23 ]
[ 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_ref#2 main::screen_ref#5 main::screen_ref#1 ]
Allocated zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ]
Allocated zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ]
Allocated zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Allocated zp ZP_BYTE:11 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
Allocated zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
Allocated zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ]
Allocated zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
Allocated zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
Allocated zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ]
Allocated zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ]
Allocated zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ]
Allocated zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
Allocated zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
Allocated zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
Allocated zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated zp ZP_BYTE:37 [ init_font_hex::i#2 init_font_hex::i#1 ]
Allocated zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated zp ZP_WORD:39 [ main::xw#0 ]
Allocated zp ZP_WORD:41 [ main::yw#0 ]
Allocated zp ZP_WORD:43 [ atan2_16::x#0 ]
Allocated zp ZP_WORD:45 [ atan2_16::y#0 ]
Allocated zp ZP_WORD:47 [ atan2_16::return#2 ]
Allocated zp ZP_WORD:49 [ main::angle_w#0 ]
Allocated zp ZP_WORD:51 [ main::$12 ]
Allocated zp ZP_BYTE:53 [ main::ang_w#0 ]
Allocated zp ZP_BYTE:54 [ diff::bb1#0 ]
Allocated zp ZP_BYTE:55 [ diff::bb2#0 ]
Allocated zp ZP_BYTE:56 [ diff::return#0 ]
Allocated zp ZP_BYTE:57 [ main::$14 ]
Allocated zp ZP_BYTE:58 [ main::$15 ]
Allocated zp ZP_WORD:59 [ print_word::w#0 ]
Allocated zp ZP_BYTE:61 [ print_byte::$0 ]
Allocated zp ZP_BYTE:62 [ print_byte::$2 ]
Allocated zp ZP_BYTE:63 [ atan2_16::$24 ]
Allocated zp ZP_BYTE:64 [ atan2_16::$23 ]
Allocated zp ZP_BYTE:65 [ init_font_hex::$0 ]
Allocated zp ZP_BYTE:66 [ init_font_hex::$1 ]
Allocated zp ZP_BYTE:67 [ init_font_hex::$2 ]
Allocated zp ZP_BYTE:68 [ init_font_hex::idx#3 ]

INITIAL ASM
  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // The number of iterations performed during 16-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_16 = $f
  .label D018 = $d018
  // Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
  .label print_char_cursor = $c
  // @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 _12 = $33
    .label _14 = $39
    .label _15 = $3a
    .label xw = $27
    .label yw = $29
    .label angle_w = $31
    .label ang_w = $35
    .label diff_sum = 6
    .label screen = 8
    .label screen_ref = 4
    .label x = 3
    .label y = 2
    // [5] call init_font_hex 
    // [101] 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 b6
    // main::@6
  b6:
    // [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [8] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
    // [8] phi (byte*) main::screen#5 = (const byte*) SCREEN#0 [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta screen
    lda #>SCREEN
    sta screen+1
    // [8] phi (word) main::diff_sum#7 = (byte) 0 [phi:main::@6->main::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta diff_sum
    lda #>0
    sta diff_sum+1
    // [8] phi (byte*) main::screen_ref#5 = (const byte[$3e8]) SCREEN_REF#0 [phi:main::@6->main::@1#2] -- pbuz1=pbuc1 
    lda #<SCREEN_REF
    sta screen_ref
    lda #>SCREEN_REF
    sta screen_ref+1
    // [8] phi (signed byte) main::y#4 = (signed byte) -$c [phi:main::@6->main::@1#3] -- vbsz1=vbsc1 
    lda #-$c
    sta y
    jmp b1
    // [8] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  b1_from_b3:
    // [8] phi (byte*) main::screen#5 = (byte*) main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [8] phi (word) main::diff_sum#7 = (word) main::diff_sum#1 [phi:main::@3->main::@1#1] -- register_copy 
    // [8] phi (byte*) main::screen_ref#5 = (byte*) main::screen_ref#1 [phi:main::@3->main::@1#2] -- register_copy 
    // [8] phi (signed byte) main::y#4 = (signed byte) main::y#1 [phi:main::@3->main::@1#3] -- 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#5 [phi:main::@1->main::@2#0] -- register_copy 
    // [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy 
    // [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 
    lda #-$13
    sta x
    jmp b2
    // [9] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  b2_from_b8:
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@8->main::@2#0] -- register_copy 
    // [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#1 [phi:main::@8->main::@2#1] -- register_copy 
    // [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#1 [phi:main::@8->main::@2#2] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@8->main::@2#3] -- register_copy 
    jmp b2
    // main::@2
  b2:
    // [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 
    lda x
    ldy #0
    sta xw+1
    sty xw
    // [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 
    lda y
    ldy #0
    sta yw+1
    sty yw
    // [12] (signed word) atan2_16::x#0 ← (signed word)(word) main::xw#0 -- vwsz1=vwsz2 
    lda xw
    sta atan2_16.x
    lda xw+1
    sta atan2_16.x+1
    // [13] (signed word) atan2_16::y#0 ← (signed word)(word) main::yw#0 -- vwsz1=vwsz2 
    lda yw
    sta atan2_16.y
    lda yw+1
    sta atan2_16.y+1
    // [14] call atan2_16 
    jsr atan2_16
    // [15] (word) atan2_16::return#2 ← (word) atan2_16::return#0 -- vwuz1=vwuz2 
    lda atan2_16.return
    sta atan2_16.return_2
    lda atan2_16.return+1
    sta atan2_16.return_2+1
    jmp b7
    // main::@7
  b7:
    // [16] (word) main::angle_w#0 ← (word) atan2_16::return#2 -- vwuz1=vwuz2 
    lda atan2_16.return_2
    sta angle_w
    lda atan2_16.return_2+1
    sta angle_w+1
    // [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80 -- vwuz1=vwuz2_plus_vbuc1 
    lda #$80
    clc
    adc angle_w
    sta _12
    lda #0
    adc angle_w+1
    sta _12+1
    // [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuz1=_hi_vwuz2 
    lda _12+1
    sta ang_w
    // [19] (byte) diff::bb1#0 ← (byte) main::ang_w#0 -- vbuz1=vbuz2 
    lda ang_w
    sta diff.bb1
    // [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) -- vbuz1=_deref_pbuz2 
    ldy #0
    lda (screen_ref),y
    sta diff.bb2
    // [21] call diff 
    jsr diff
    // [22] (byte) diff::return#0 ← (byte) diff::return#1 -- vbuz1=vbuz2 
    lda diff.return_1
    sta diff.return
    jmp b8
    // main::@8
  b8:
    // [23] (byte~) main::$14 ← (byte) diff::return#0 -- vbuz1=vbuz2 
    lda diff.return
    sta _14
    // [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14 -- vwuz1=vwuz1_plus_vbuz2 
    //*screen = (>angle_w)-angle_b;
    //*screen = >angle_w;
    lda _14
    clc
    adc diff_sum
    sta diff_sum
    bcc !+
    inc diff_sum+1
  !:
    // [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuz1=vbuz2_minus__deref_pbuz3 
    lda ang_w
    sec
    ldy #0
    sbc (screen_ref),y
    sta _15
    // [26] *((byte*) main::screen#2) ← (byte~) main::$15 -- _deref_pbuz1=vbuz2 
    lda _15
    ldy #0
    sta (screen),y
    // [27] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
    // [28] (byte*) main::screen_ref#1 ← ++ (byte*) main::screen_ref#2 -- pbuz1=_inc_pbuz1 
    inc screen_ref
    bne !+
    inc screen_ref+1
  !:
    // [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 
    inc x
    // [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp x
    bne b2_from_b8
    jmp b3
    // main::@3
  b3:
    // [31] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 
    inc y
    // [32] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp y
    bne b1_from_b3
    jmp b4
    // main::@4
  b4:
    // [33] (word) print_word::w#0 ← (word) main::diff_sum#1 -- vwuz1=vwuz2 
    lda diff_sum
    sta print_word.w
    lda diff_sum+1
    sta print_word.w+1
    // [34] call print_word 
    jsr print_word
    jmp b5
    // main::@5
  b5:
    // [35] *((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 b5
}
  // print_word
// Print a word as HEX
// print_word(word zeropage($3b) w)
print_word: {
    .label w = $3b
    // [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2 
    lda w+1
    sta print_byte.b
    // [37] call print_byte 
    // [41] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [41] phi (byte*) print_char_cursor#24 = (byte*) 1024 [phi:print_word->print_byte#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
    // [41] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp b1
    // print_word::@1
  b1:
    // [38] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuz1=_lo_vwuz2 
    lda w
    sta print_byte.b
    // [39] call print_byte 
    // [41] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from_b1:
    // [41] phi (byte*) print_char_cursor#24 = (byte*) print_char_cursor#19 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [41] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
    // print_word::@return
  breturn:
    // [40] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte zeropage($a) b)
print_byte: {
    .label _0 = $3d
    .label _2 = $3e
    .label b = $a
    // [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuz1=vbuz2_ror_4 
    lda b
    lsr
    lsr
    lsr
    lsr
    sta _0
    // [43] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _0
    lda print_hextab,y
    sta print_char.ch
    // [44] call print_char 
    // [49] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [49] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#24 [phi:print_byte->print_char#0] -- register_copy 
    // [49] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
    // print_byte::@1
  b1:
    // [45] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 
    lda #$f
    and b
    sta _2
    // [46] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuz1=pbuc1_derefidx_vbuz2 
    ldy _2
    lda print_hextab,y
    sta print_char.ch
    // [47] call print_char 
    // [49] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
    // [49] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#19 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [49] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
    // print_byte::@return
  breturn:
    // [48] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte zeropage($b) ch)
print_char: {
    .label ch = $b
    // [50] *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2 
    lda ch
    ldy #0
    sta (print_char_cursor),y
    // [51] (byte*) print_char_cursor#19 ← ++ (byte*) print_char_cursor#18 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
    // print_char::@return
  breturn:
    // [52] return 
    rts
}
  // diff
// diff(byte zeropage($36) bb1, byte zeropage($37) bb2)
diff: {
    .label _2 = $e
    .label _4 = $e
    .label bb1 = $36
    .label bb2 = $37
    .label return = $38
    .label return_1 = $e
    // [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuz1_lt_vbuz2_then_la1 
    lda bb1
    cmp bb2
    bcc b1
    jmp b2
    // diff::@2
  b2:
    // [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda bb1
    sec
    sbc bb2
    sta _2
    // [55] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3]
  b3_from_b1:
  b3_from_b2:
    // [55] phi (byte) diff::return#1 = (byte~) diff::$4 [phi:diff::@1/diff::@2->diff::@3#0] -- register_copy 
    jmp b3
    // diff::@3
  b3:
    jmp breturn
    // diff::@return
  breturn:
    // [56] return 
    rts
    // diff::@1
  b1:
    // [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuz1=vbuz2_minus_vbuz3 
    lda bb2
    sec
    sbc bb1
    sta _4
    jmp b3_from_b1
}
  // atan2_16
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
// atan2_16(signed word zeropage($2b) x, signed word zeropage($2d) y)
atan2_16: {
    .label _2 = $f
    .label _7 = $11
    .label _23 = $40
    .label _24 = $3f
    .label yi = $f
    .label xi = $11
    .label angle = $16
    .label xd = $1b
    .label yd = $19
    .label shift = $18
    .label angle_2 = $14
    .label angle_3 = $14
    .label i = $13
    .label return = $16
    .label x = $2b
    .label y = $2d
    .label return_2 = $2f
    .label angle_6 = $14
    .label angle_12 = $14
    .label angle_13 = $14
    // [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 
    lda y+1
    bpl b1
    jmp b2
    // atan2_16::@2
  b2:
    // [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc y
    sta _2
    lda #0
    sbc y+1
    sta _2+1
    // [60] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3]
  b3_from_b1:
  b3_from_b2:
    // [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy 
    jmp b3
    // atan2_16::@3
  b3:
    // [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 
    lda x+1
    bpl b4
    jmp b5
    // atan2_16::@5
  b5:
    // [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc x
    sta _7
    lda #0
    sbc x+1
    sta _7+1
    // [63] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6]
  b6_from_b4:
  b6_from_b5:
    // [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy 
    jmp b6
    // atan2_16::@6
  b6:
    // [64] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10]
  b10_from_b6:
    // [64] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 
    lda #<0
    sta angle_12
    lda #>0
    sta angle_12+1
    // [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuz1=vbuc1 
    lda #0
    sta i
    // [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy 
    // [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy 
    jmp b10
    // atan2_16::@10
  b10:
    // [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 
    lda yi+1
    bne b11
    lda yi
    bne b11
    // [66] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12]
  b12_from_b10:
  b12_from_b19:
    // [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy 
    jmp b12
    // atan2_16::@12
  b12:
    // [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz2_ror_1 
    lda angle_6+1
    lsr
    sta angle+1
    lda angle_6
    ror
    sta angle
    // [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 
    lda x+1
    bpl b7_from_b12
    jmp b21
    // atan2_16::@21
  b21:
    // [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 
    sec
    lda #<$8000
    sbc angle
    sta angle
    lda #>$8000
    sbc angle+1
    sta angle+1
    // [70] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7]
  b7_from_b12:
  b7_from_b21:
    // [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy 
    jmp b7
    // atan2_16::@7
  b7:
    // [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 
    lda y+1
    bpl b8_from_b7
    jmp b9
    // atan2_16::@9
  b9:
    // [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc angle
    sta angle
    lda #0
    sbc angle+1
    sta angle+1
    // [73] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8]
  b8_from_b7:
  b8_from_b9:
    // [73] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy 
    jmp b8
    // atan2_16::@8
  b8:
    jmp breturn
    // atan2_16::@return
  breturn:
    // [74] return 
    rts
    // atan2_16::@11
  b11:
    // [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuz1=vbuz2 
    lda i
    sta shift
    // [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 
    lda xi
    sta xd
    lda xi+1
    sta xd+1
    // [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 
    lda yi
    sta yd
    lda yi+1
    sta yd+1
    // [78] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13]
  b13_from_b11:
  b13_from_b14:
    // [78] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy 
    // [78] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy 
    // [78] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy 
    jmp b13
    // atan2_16::@13
  b13:
    // [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuz1_ge_vbuc1_then_la1 
    lda shift
    cmp #2
    bcs b14
    jmp b15
    // atan2_16::@15
  b15:
    // [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuz1_then_la1 
    lda #0
    cmp shift
    beq b17_from_b15
    jmp b16
    // atan2_16::@16
  b16:
    // [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    // [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    // [83] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17]
  b17_from_b15:
  b17_from_b16:
    // [83] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy 
    // [83] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy 
    jmp b17
    // atan2_16::@17
  b17:
    // [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 
    lda yi+1
    bpl b18
    jmp b20
    // atan2_16::@20
  b20:
    // [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda xi
    sec
    sbc yd
    sta xi
    lda xi+1
    sbc yd+1
    sta xi+1
    // [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 
    lda yi
    clc
    adc xd
    sta yi
    lda yi+1
    adc xd+1
    sta yi+1
    // [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda i
    asl
    sta _24
    // [88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 
    ldy _24
    sec
    lda angle_3
    sbc CORDIC_ATAN2_ANGLES_16,y
    sta angle_3
    lda angle_3+1
    sbc CORDIC_ATAN2_ANGLES_16+1,y
    sta angle_3+1
    // [89] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19]
  b19_from_b18:
  b19_from_b20:
    // [89] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy 
    // [89] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy 
    // [89] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy 
    jmp b19
    // atan2_16::@19
  b19:
    // [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuz1=_inc_vbuz1 
    inc i
    // [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuz1_eq_vbuc1_then_la1 
    lda #CORDIC_ITERATIONS_16-1+1
    cmp i
    beq b12_from_b19
    // [64] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10]
  b10_from_b19:
    // [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy 
    // [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy 
    // [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy 
    // [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy 
    jmp b10
    // atan2_16::@18
  b18:
    // [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 
    lda xi
    clc
    adc yd
    sta xi
    lda xi+1
    adc yd+1
    sta xi+1
    // [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda yi
    sec
    sbc xd
    sta yi
    lda yi+1
    sbc xd+1
    sta yi+1
    // [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 
    lda i
    asl
    sta _23
    // [95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 
    ldy _23
    clc
    lda angle_2
    adc CORDIC_ATAN2_ANGLES_16,y
    sta angle_2
    lda angle_2+1
    adc CORDIC_ATAN2_ANGLES_16+1,y
    sta angle_2+1
    jmp b19_from_b18
    // atan2_16::@14
  b14:
    // [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    // [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    // [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuz1=vbuz1_minus_2 
    dec shift
    dec shift
    jmp b13_from_b14
    // atan2_16::@4
  b4:
    // [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 
    lda x
    sta xi
    lda x+1
    sta xi+1
    jmp b6_from_b4
    // atan2_16::@1
  b1:
    // [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 
    lda y
    sta yi
    lda y+1
    sta yi+1
    jmp b3_from_b1
}
  // init_font_hex
// Make charset from proto chars
// init_font_hex(byte* zeropage($20) charset)
init_font_hex: {
    .label _0 = $41
    .label _1 = $42
    .label _2 = $43
    .label idx = $26
    .label i = $25
    .label idx_3 = $44
    .label proto_lo = $22
    .label charset = $20
    .label c1 = $24
    .label proto_hi = $1d
    .label c = $1f
    // [102] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
  b1_from_init_font_hex:
    // [102] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta c
    // [102] 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 proto_hi
    lda #>FONT_HEX_PROTO
    sta proto_hi+1
    // [102] 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 charset
    lda #>CHARSET
    sta charset+1
    jmp b1
    // [102] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
  b1_from_b5:
    // [102] 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 
    // [102] 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 
    // [102] 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:
    // [103] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
  b2_from_b1:
    // [103] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta c1
    // [103] 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 proto_lo
    lda #>FONT_HEX_PROTO
    sta proto_lo+1
    // [103] 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
    // [103] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
  b2_from_b4:
    // [103] 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 
    // [103] 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 
    // [103] 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:
    // [104] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (charset),y
    // [105] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
  b3_from_b2:
    // [105] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta idx
    // [105] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 
    lda #0
    sta i
    jmp b3
    // [105] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
  b3_from_b3:
    // [105] 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 
    // [105] 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:
    // [106] (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 i
    lda (proto_hi),y
    asl
    asl
    asl
    asl
    sta _0
    // [107] (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 i
    lda (proto_lo),y
    asl
    sta _1
    // [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 
    lda _0
    ora _1
    sta _2
    // [109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 
    lda _2
    ldy idx
    sta (charset),y
    // [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc idx
    // [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 
    inc i
    // [112] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 
    lda #5
    cmp i
    bne b3_from_b3
    jmp b4
    // init_font_hex::@4
  b4:
    // [113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy idx
    sta (charset),y
    // [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 
    ldy idx
    iny
    sty idx_3
    // [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy idx_3
    sta (charset),y
    // [116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc proto_lo
    sta proto_lo
    bcc !+
    inc proto_lo+1
  !:
    // [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc charset
    sta charset
    bcc !+
    inc charset+1
  !:
    // [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc c1
    // [119] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp c1
    bne b2_from_b4
    jmp b5
    // init_font_hex::@5
  b5:
    // [120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc proto_hi
    sta proto_hi
    bcc !+
    inc proto_hi+1
  !:
    // [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc c
    // [122] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp c
    bne b1_from_b5
    jmp breturn
    // init_font_hex::@return
  breturn:
    // [123] 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_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2

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


REGISTER UPLIFT POTENTIAL REGISTERS
Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a 
Statement [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] ) 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 [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] ) always clobbers reg byte y 
Statement [12] (signed word) atan2_16::x#0 ← (signed word)(word) main::xw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] ) 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 ]
Statement [13] (signed word) atan2_16::y#0 ← (signed word)(word) main::yw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a 
Statement [15] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] ) always clobbers reg byte a 
Statement [16] (word) main::angle_w#0 ← (word) atan2_16::return#2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] ) always clobbers reg byte a 
Statement [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$12 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$12 ] ) always clobbers reg byte a 
Statement [18] (byte) main::ang_w#0 ← > (word~) main::$12 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 ] ) always clobbers reg byte a 
Statement [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] ) always clobbers reg byte a reg byte y 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:53 [ main::ang_w#0 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:53 [ main::ang_w#0 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ diff::bb1#0 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:54 [ diff::bb1#0 ]
Statement [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] ) always clobbers reg byte a 
Statement [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$15 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$15 ] ) always clobbers reg byte a reg byte y 
Statement [26] *((byte*) main::screen#2) ← (byte~) main::$15 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] ) always clobbers reg byte y 
Statement [33] (word) print_word::w#0 ← (word) main::diff_sum#1 [ print_word::w#0 ] ( main:2 [ print_word::w#0 ] ) always clobbers reg byte a 
Statement [35] *((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 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_word::w#0 print_byte::b#0 ] ( main:2::print_word:34 [ print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [38] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_byte::b#1 print_char_cursor#19 ] ( main:2::print_word:34 [ print_byte::b#1 print_char_cursor#19 ] ) always clobbers reg byte a 
Statement [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#24 print_byte::$0 ] ( main:2::print_word:34::print_byte:37 [ print_word::w#0 print_byte::b#2 print_char_cursor#24 print_byte::$0 ] main:2::print_word:34::print_byte:39 [ print_byte::b#2 print_char_cursor#24 print_byte::$0 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [45] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#19 print_byte::$2 ] ( main:2::print_word:34::print_byte:37 [ print_word::w#0 print_char_cursor#19 print_byte::$2 ] main:2::print_word:34::print_byte:39 [ print_char_cursor#19 print_byte::$2 ] ) always clobbers reg byte a 
Statement [50] *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2 [ print_char_cursor#18 ] ( main:2::print_word:34::print_byte:37::print_char:44 [ print_word::w#0 print_byte::b#2 print_char_cursor#18 ] main:2::print_word:34::print_byte:39::print_char:44 [ print_byte::b#2 print_char_cursor#18 ] main:2::print_word:34::print_byte:37::print_char:47 [ print_word::w#0 print_char_cursor#18 ] main:2::print_word:34::print_byte:39::print_char:47 [ print_char_cursor#18 ] ) always clobbers reg byte y 
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
Statement [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 [ diff::$2 ] ( main:2::diff:21 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$2 ] ) always clobbers reg byte a 
Statement [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 [ diff::$4 ] ( main:2::diff:21 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$4 ] ) always clobbers reg byte a 
Statement [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a 
Statement [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a 
Statement [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a 
Statement [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a 
Statement [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ]
Statement [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a 
Statement [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a 
Statement [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a 
Statement [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a 
Statement [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a 
Statement [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a 
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
Statement [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a 
Statement [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a 
Statement [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a 
Statement [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a 
Statement [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a 
Statement [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a 
Statement [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a 
Statement [88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a 
Statement [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a 
Statement [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a 
Statement [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a 
Statement [95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a 
Statement [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a 
Statement [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a 
Statement [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a 
Statement [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a 
Statement [104] *((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:31 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Statement [106] (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:37 [ init_font_hex::i#2 init_font_hex::i#1 ]
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Statement [107] (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:65 [ init_font_hex::$0 ]
Statement [113] *((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 [115] *((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 [116] (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 [117] (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 [120] (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 [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 ] ) always clobbers reg byte a reg byte y 
Statement [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::xw#0 main::yw#0 ] ) always clobbers reg byte a reg byte y 
Statement [12] (signed word) atan2_16::x#0 ← (signed word)(word) main::xw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::yw#0 atan2_16::x#0 ] ) always clobbers reg byte a 
Statement [13] (signed word) atan2_16::y#0 ← (signed word)(word) main::yw#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a 
Statement [15] (word) atan2_16::return#2 ← (word) atan2_16::return#0 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::return#2 ] ) always clobbers reg byte a 
Statement [16] (word) main::angle_w#0 ← (word) atan2_16::return#2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::angle_w#0 ] ) always clobbers reg byte a 
Statement [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$12 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::$12 ] ) always clobbers reg byte a 
Statement [18] (byte) main::ang_w#0 ← > (word~) main::$12 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 ] ) always clobbers reg byte a 
Statement [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] ( main:2 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::bb1#0 diff::bb2#0 ] ) always clobbers reg byte a reg byte y 
Statement [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::ang_w#0 ] ) always clobbers reg byte a 
Statement [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$15 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 main::$15 ] ) always clobbers reg byte a reg byte y 
Statement [26] *((byte*) main::screen#2) ← (byte~) main::$15 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] ( main:2 [ main::y#4 main::diff_sum#1 main::x#2 main::screen_ref#2 main::screen#2 ] ) always clobbers reg byte y 
Statement [33] (word) print_word::w#0 ← (word) main::diff_sum#1 [ print_word::w#0 ] ( main:2 [ print_word::w#0 ] ) always clobbers reg byte a 
Statement [35] *((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 [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 [ print_word::w#0 print_byte::b#0 ] ( main:2::print_word:34 [ print_word::w#0 print_byte::b#0 ] ) always clobbers reg byte a 
Statement [38] (byte) print_byte::b#1 ← < (word) print_word::w#0 [ print_byte::b#1 print_char_cursor#19 ] ( main:2::print_word:34 [ print_byte::b#1 print_char_cursor#19 ] ) always clobbers reg byte a 
Statement [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 [ print_byte::b#2 print_char_cursor#24 print_byte::$0 ] ( main:2::print_word:34::print_byte:37 [ print_word::w#0 print_byte::b#2 print_char_cursor#24 print_byte::$0 ] main:2::print_word:34::print_byte:39 [ print_byte::b#2 print_char_cursor#24 print_byte::$0 ] ) always clobbers reg byte a 
Statement [45] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f [ print_char_cursor#19 print_byte::$2 ] ( main:2::print_word:34::print_byte:37 [ print_word::w#0 print_char_cursor#19 print_byte::$2 ] main:2::print_word:34::print_byte:39 [ print_char_cursor#19 print_byte::$2 ] ) always clobbers reg byte a 
Statement [50] *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2 [ print_char_cursor#18 ] ( main:2::print_word:34::print_byte:37::print_char:44 [ print_word::w#0 print_byte::b#2 print_char_cursor#18 ] main:2::print_word:34::print_byte:39::print_char:44 [ print_byte::b#2 print_char_cursor#18 ] main:2::print_word:34::print_byte:37::print_char:47 [ print_word::w#0 print_char_cursor#18 ] main:2::print_word:34::print_byte:39::print_char:47 [ print_char_cursor#18 ] ) always clobbers reg byte y 
Statement [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 [ diff::$2 ] ( main:2::diff:21 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$2 ] ) always clobbers reg byte a 
Statement [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 [ diff::$4 ] ( main:2::diff:21 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 main::ang_w#0 diff::$4 ] ) always clobbers reg byte a 
Statement [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 ] ) always clobbers reg byte a 
Statement [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ) always clobbers reg byte a 
Statement [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ) always clobbers reg byte a 
Statement [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ) always clobbers reg byte a 
Statement [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ) always clobbers reg byte a 
Statement [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a 
Statement [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#1 ] ) always clobbers reg byte a 
Statement [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::y#0 atan2_16::angle#4 ] ) always clobbers reg byte a 
Statement [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#11 ] ) always clobbers reg byte a 
Statement [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 [ atan2_16::angle#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::angle#5 ] ) always clobbers reg byte a 
Statement [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ) always clobbers reg byte a 
Statement [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ) always clobbers reg byte a 
Statement [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ) always clobbers reg byte a 
Statement [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ) always clobbers reg byte a 
Statement [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ) always clobbers reg byte a 
Statement [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ) always clobbers reg byte a 
Statement [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ) always clobbers reg byte a 
Statement [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$24 ] ) always clobbers reg byte a 
Statement [88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ) always clobbers reg byte a 
Statement [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ) always clobbers reg byte a 
Statement [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ) always clobbers reg byte a 
Statement [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$23 ] ) always clobbers reg byte a 
Statement [95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ) always clobbers reg byte a 
Statement [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ) always clobbers reg byte a 
Statement [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ) always clobbers reg byte a 
Statement [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ) always clobbers reg byte a 
Statement [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( main:2::atan2_16:14 [ main::y#4 main::x#2 main::screen_ref#2 main::diff_sum#2 main::screen#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ) always clobbers reg byte a 
Statement [104] *((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 [106] (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 [107] (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 [113] *((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 [115] *((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 [116] (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 [117] (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 [120] (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_ref#2 main::screen_ref#5 main::screen_ref#1 ] : zp ZP_WORD:4 , 
Potential registers zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] : zp ZP_WORD:6 , 
Potential registers zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] : zp ZP_WORD:8 , 
Potential registers zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] : zp ZP_BYTE:10 , reg byte x , 
Potential registers zp ZP_BYTE:11 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] : zp ZP_WORD:12 , 
Potential registers zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ] : zp ZP_BYTE:14 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp ZP_WORD:15 , 
Potential registers zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp ZP_WORD:17 , 
Potential registers zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp ZP_WORD:20 , 
Potential registers zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] : zp ZP_WORD:22 , 
Potential registers zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp ZP_BYTE:24 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp ZP_WORD:25 , 
Potential registers zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp ZP_WORD:27 , 
Potential registers zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:29 , 
Potential registers zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:31 , reg byte x , 
Potential registers zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:32 , 
Potential registers zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:34 , 
Potential registers zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:36 , reg byte x , 
Potential registers zp ZP_BYTE:37 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:37 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:38 , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:39 [ main::xw#0 ] : zp ZP_WORD:39 , 
Potential registers zp ZP_WORD:41 [ main::yw#0 ] : zp ZP_WORD:41 , 
Potential registers zp ZP_WORD:43 [ atan2_16::x#0 ] : zp ZP_WORD:43 , 
Potential registers zp ZP_WORD:45 [ atan2_16::y#0 ] : zp ZP_WORD:45 , 
Potential registers zp ZP_WORD:47 [ atan2_16::return#2 ] : zp ZP_WORD:47 , 
Potential registers zp ZP_WORD:49 [ main::angle_w#0 ] : zp ZP_WORD:49 , 
Potential registers zp ZP_WORD:51 [ main::$12 ] : zp ZP_WORD:51 , 
Potential registers zp ZP_BYTE:53 [ main::ang_w#0 ] : zp ZP_BYTE:53 , reg byte x , 
Potential registers zp ZP_BYTE:54 [ diff::bb1#0 ] : zp ZP_BYTE:54 , reg byte x , 
Potential registers zp ZP_BYTE:55 [ diff::bb2#0 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:56 [ diff::return#0 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:57 [ main::$14 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:58 [ main::$15 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_WORD:59 [ print_word::w#0 ] : zp ZP_WORD:59 , 
Potential registers zp ZP_BYTE:61 [ print_byte::$0 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:62 [ print_byte::$2 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:63 [ atan2_16::$24 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:64 [ atan2_16::$23 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:65 [ init_font_hex::$0 ] : zp ZP_BYTE:65 , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:66 [ init_font_hex::$1 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:67 [ init_font_hex::$2 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , 
Potential registers zp ZP_BYTE:68 [ init_font_hex::idx#3 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , 

REGISTER UPLIFT SCOPES
Uplift Scope [atan2_16] 28,670.58: zp ZP_BYTE:24 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 20,608: zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 17,338.67: zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 7,533.33: zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 2,698.28: zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 2,283.07: zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 2,002: zp ZP_BYTE:63 [ atan2_16::$24 ] 2,002: zp ZP_BYTE:64 [ atan2_16::$23 ] 1,710.04: zp ZP_BYTE:19 [ atan2_16::i#2 atan2_16::i#1 ] 202: zp ZP_WORD:47 [ atan2_16::return#2 ] 50: zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] 2.87: zp ZP_WORD:43 [ atan2_16::x#0 ] 2.72: zp ZP_WORD:45 [ atan2_16::y#0 ] 
Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:37 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:66 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:67 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:65 [ init_font_hex::$0 ] 202: zp ZP_BYTE:68 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Uplift Scope [main] 202: zp ZP_WORD:49 [ main::angle_w#0 ] 202: zp ZP_WORD:51 [ main::$12 ] 202: zp ZP_BYTE:57 [ main::$14 ] 202: zp ZP_BYTE:58 [ main::$15 ] 161.6: zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 86.44: zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] 74.94: zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] 60.09: zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] 50.5: zp ZP_WORD:39 [ main::xw#0 ] 50.5: zp ZP_WORD:41 [ main::yw#0 ] 43.29: zp ZP_BYTE:53 [ main::ang_w#0 ] 17.46: zp ZP_BYTE:2 [ main::y#4 main::y#1 ] 
Uplift Scope [diff] 202: zp ZP_BYTE:56 [ diff::return#0 ] 53.5: zp ZP_BYTE:55 [ diff::bb2#0 ] 43: zp ZP_BYTE:14 [ diff::return#1 diff::$4 diff::$2 ] 35.67: zp ZP_BYTE:54 [ diff::bb1#0 ] 
Uplift Scope [print_byte] 10: zp ZP_BYTE:10 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] 4: zp ZP_BYTE:61 [ print_byte::$0 ] 4: zp ZP_BYTE:62 [ print_byte::$2 ] 
Uplift Scope [print_char] 14: zp ZP_BYTE:11 [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplift Scope [] 6: zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] 
Uplift Scope [print_word] 2: zp ZP_WORD:59 [ print_word::w#0 ] 
Uplift Scope [RADIX] 

Uplifting [atan2_16] best 1158709 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp ZP_WORD:25 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp ZP_WORD:27 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp ZP_WORD:15 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp ZP_WORD:17 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$24 ] reg byte a [ atan2_16::$23 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp ZP_WORD:47 [ atan2_16::return#2 ] zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] zp ZP_WORD:43 [ atan2_16::x#0 ] zp ZP_WORD:45 [ atan2_16::y#0 ] 
Limited combination testing to 100 combinations of 144 possible.
Uplifting [init_font_hex] best 1139709 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:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:65 [ init_font_hex::$0 ] zp ZP_BYTE:68 [ init_font_hex::idx#3 ] zp ZP_WORD:32 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:34 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:29 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Limited combination testing to 100 combinations of 6912 possible.
Uplifting [main] best 1138009 combination zp ZP_WORD:49 [ main::angle_w#0 ] zp ZP_WORD:51 [ main::$12 ] reg byte a [ main::$14 ] reg byte a [ main::$15 ] zp ZP_BYTE:3 [ main::x#2 main::x#1 ] zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ] zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ] zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] zp ZP_WORD:39 [ main::xw#0 ] zp ZP_WORD:41 [ main::yw#0 ] reg byte x [ main::ang_w#0 ] zp ZP_BYTE:2 [ main::y#4 main::y#1 ] 
Limited combination testing to 100 combinations of 128 possible.
Uplifting [diff] best 1136505 combination reg byte a [ diff::return#0 ] reg byte a [ diff::bb2#0 ] reg byte a [ diff::return#1 diff::$4 diff::$2 ] reg byte x [ diff::bb1#0 ] 
Limited combination testing to 100 combinations of 128 possible.
Uplifting [print_byte] best 1136491 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] 
Uplifting [print_char] best 1136482 combination reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ] 
Uplifting [] best 1136482 combination zp ZP_WORD:12 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ] 
Uplifting [print_word] best 1136482 combination zp ZP_WORD:59 [ print_word::w#0 ] 
Uplifting [RADIX] best 1136482 combination 
Attempting to uplift remaining variables inzp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Uplifting [init_font_hex] best 1136482 combination zp ZP_BYTE:38 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:65 [ init_font_hex::$0 ]
Uplifting [init_font_hex] best 1136482 combination zp ZP_BYTE:65 [ init_font_hex::$0 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:68 [ init_font_hex::idx#3 ]
Uplifting [init_font_hex] best 1135882 combination reg byte y [ init_font_hex::idx#3 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Uplifting [init_font_hex] best 1135882 combination zp ZP_BYTE:36 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::x#2 main::x#1 ]
Uplifting [main] best 1135882 combination zp ZP_BYTE:3 [ main::x#2 main::x#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ]
Uplifting [init_font_hex] best 1135882 combination zp ZP_BYTE:31 [ init_font_hex::c#6 init_font_hex::c#1 ] 
Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::y#4 main::y#1 ]
Uplifting [main] best 1135882 combination zp ZP_BYTE:2 [ main::y#4 main::y#1 ] 
Coalescing zero page register with common assignment [ zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 ] ] with [ zp ZP_WORD:59 [ print_word::w#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp ZP_WORD:22 [ atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:39 [ main::xw#0 ] ] with [ zp ZP_WORD:43 [ atan2_16::x#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ main::yw#0 ] ] with [ zp ZP_WORD:45 [ atan2_16::y#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:47 [ atan2_16::return#2 ] ] with [ zp ZP_WORD:49 [ main::angle_w#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 ] ] with [ zp ZP_WORD:47 [ atan2_16::return#2 main::angle_w#0 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:20 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 main::angle_w#0 ] ] with [ zp ZP_WORD:51 [ main::$12 ] ] - score: 1
Allocated (was zp ZP_WORD:12) zp ZP_WORD:10 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
Allocated (was zp ZP_WORD:17) zp ZP_WORD:14 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
Allocated (was zp ZP_WORD:20) zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 main::angle_w#0 main::$12 ]
Allocated (was zp ZP_WORD:25) zp ZP_WORD:18 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
Allocated (was zp ZP_WORD:27) zp ZP_WORD:20 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
Allocated (was zp ZP_WORD:29) zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
Allocated (was zp ZP_BYTE:31) zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ]
Allocated (was zp ZP_WORD:32) zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
Allocated (was zp ZP_WORD:34) zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
Allocated (was zp ZP_BYTE:36) zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
Allocated (was zp ZP_BYTE:38) zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
Allocated (was zp ZP_WORD:39) zp ZP_WORD:31 [ main::xw#0 atan2_16::x#0 ]
Allocated (was zp ZP_WORD:41) zp ZP_WORD:33 [ main::yw#0 atan2_16::y#0 ]
Allocated (was zp ZP_BYTE:65) zp ZP_BYTE:35 [ init_font_hex::$0 ]

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(bbegin)
.pc = $80d "Program"
  // Global Constants & labels
  // The number of iterations performed during 16-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_16 = $f
  .label D018 = $d018
  // Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
  .label print_char_cursor = $a
  // @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 _12 = $10
    .label xw = $1f
    .label yw = $21
    .label angle_w = $10
    .label diff_sum = 6
    .label screen = 8
    .label screen_ref = 4
    .label x = 3
    .label y = 2
    // [5] call init_font_hex 
    // [101] 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 b6
    // main::@6
  b6:
    // [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 
    lda #toD0181_return
    sta D018
    // [8] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
  b1_from_b6:
    // [8] phi (byte*) main::screen#5 = (const byte*) SCREEN#0 [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta screen
    lda #>SCREEN
    sta screen+1
    // [8] phi (word) main::diff_sum#7 = (byte) 0 [phi:main::@6->main::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta diff_sum
    lda #>0
    sta diff_sum+1
    // [8] phi (byte*) main::screen_ref#5 = (const byte[$3e8]) SCREEN_REF#0 [phi:main::@6->main::@1#2] -- pbuz1=pbuc1 
    lda #<SCREEN_REF
    sta screen_ref
    lda #>SCREEN_REF
    sta screen_ref+1
    // [8] phi (signed byte) main::y#4 = (signed byte) -$c [phi:main::@6->main::@1#3] -- vbsz1=vbsc1 
    lda #-$c
    sta y
    jmp b1
    // [8] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
  b1_from_b3:
    // [8] phi (byte*) main::screen#5 = (byte*) main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [8] phi (word) main::diff_sum#7 = (word) main::diff_sum#1 [phi:main::@3->main::@1#1] -- register_copy 
    // [8] phi (byte*) main::screen_ref#5 = (byte*) main::screen_ref#1 [phi:main::@3->main::@1#2] -- register_copy 
    // [8] phi (signed byte) main::y#4 = (signed byte) main::y#1 [phi:main::@3->main::@1#3] -- 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#5 [phi:main::@1->main::@2#0] -- register_copy 
    // [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy 
    // [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 
    lda #-$13
    sta x
    jmp b2
    // [9] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
  b2_from_b8:
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@8->main::@2#0] -- register_copy 
    // [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#1 [phi:main::@8->main::@2#1] -- register_copy 
    // [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#1 [phi:main::@8->main::@2#2] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@8->main::@2#3] -- register_copy 
    jmp b2
    // main::@2
  b2:
    // [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 
    lda x
    ldy #0
    sta xw+1
    sty xw
    // [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 
    lda y
    ldy #0
    sta yw+1
    sty yw
    // [12] (signed word) atan2_16::x#0 ← (signed word)(word) main::xw#0
    // [13] (signed word) atan2_16::y#0 ← (signed word)(word) main::yw#0
    // [14] call atan2_16 
    jsr atan2_16
    // [15] (word) atan2_16::return#2 ← (word) atan2_16::return#0
    jmp b7
    // main::@7
  b7:
    // [16] (word) main::angle_w#0 ← (word) atan2_16::return#2
    // [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 
    lda #$80
    clc
    adc _12
    sta _12
    bcc !+
    inc _12+1
  !:
    // [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuxx=_hi_vwuz1 
    lda _12+1
    tax
    // [19] (byte) diff::bb1#0 ← (byte) main::ang_w#0
    // [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (screen_ref),y
    // [21] call diff 
    jsr diff
    // [22] (byte) diff::return#0 ← (byte) diff::return#1
    jmp b8
    // main::@8
  b8:
    // [23] (byte~) main::$14 ← (byte) diff::return#0
    // [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14 -- vwuz1=vwuz1_plus_vbuaa 
    //*screen = (>angle_w)-angle_b;
    //*screen = >angle_w;
    clc
    adc diff_sum
    sta diff_sum
    bcc !+
    inc diff_sum+1
  !:
    // [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuaa=vbuxx_minus__deref_pbuz1 
    txa
    sec
    ldy #0
    sbc (screen_ref),y
    // [26] *((byte*) main::screen#2) ← (byte~) main::$15 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (screen),y
    // [27] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
    // [28] (byte*) main::screen_ref#1 ← ++ (byte*) main::screen_ref#2 -- pbuz1=_inc_pbuz1 
    inc screen_ref
    bne !+
    inc screen_ref+1
  !:
    // [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 
    inc x
    // [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp x
    bne b2_from_b8
    jmp b3
    // main::@3
  b3:
    // [31] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 
    inc y
    // [32] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp y
    bne b1_from_b3
    jmp b4
    // main::@4
  b4:
    // [33] (word) print_word::w#0 ← (word) main::diff_sum#1
    // [34] call print_word 
    jsr print_word
    jmp b5
    // main::@5
  b5:
    // [35] *((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 b5
}
  // print_word
// Print a word as HEX
// print_word(word zeropage(6) w)
print_word: {
    .label w = 6
    // [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda w+1
    tax
    // [37] call print_byte 
    // [41] phi from print_word to print_byte [phi:print_word->print_byte]
  print_byte_from_print_word:
    // [41] phi (byte*) print_char_cursor#24 = (byte*) 1024 [phi:print_word->print_byte#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
    // [41] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    jmp b1
    // print_word::@1
  b1:
    // [38] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda w
    tax
    // [39] call print_byte 
    // [41] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
  print_byte_from_b1:
    // [41] phi (byte*) print_char_cursor#24 = (byte*) print_char_cursor#19 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [41] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    jmp breturn
    // print_word::@return
  breturn:
    // [40] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // [43] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [44] call print_char 
    // [49] phi from print_byte to print_char [phi:print_byte->print_char]
  print_char_from_print_byte:
    // [49] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#24 [phi:print_byte->print_char#0] -- register_copy 
    // [49] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    jmp b1
    // print_byte::@1
  b1:
    // [45] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // [46] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [47] call print_char 
    // [49] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
  print_char_from_b1:
    // [49] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#19 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [49] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    jmp breturn
    // print_byte::@return
  breturn:
    // [48] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // [50] *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // [51] (byte*) print_char_cursor#19 ← ++ (byte*) print_char_cursor#18 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    jmp breturn
    // print_char::@return
  breturn:
    // [52] return 
    rts
}
  // diff
// diff(byte register(X) bb1, byte register(A) bb2)
diff: {
    // [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuxx_lt_vbuaa_then_la1 
    sta $ff
    cpx $ff
    bcc b1
    jmp b2
    // diff::@2
  b2:
    // [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuaa=vbuxx_minus_vbuaa 
    sta $ff
    txa
    sec
    sbc $ff
    // [55] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3]
  b3_from_b1:
  b3_from_b2:
    // [55] phi (byte) diff::return#1 = (byte~) diff::$4 [phi:diff::@1/diff::@2->diff::@3#0] -- register_copy 
    jmp b3
    // diff::@3
  b3:
    jmp breturn
    // diff::@return
  breturn:
    // [56] return 
    rts
    // diff::@1
  b1:
    // [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuaa=vbuaa_minus_vbuxx 
    stx $ff
    sec
    sbc $ff
    jmp b3_from_b1
}
  // atan2_16
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
// atan2_16(signed word zeropage($1f) x, signed word zeropage($21) y)
atan2_16: {
    .label _2 = $c
    .label _7 = $e
    .label yi = $c
    .label xi = $e
    .label angle = $10
    .label xd = $14
    .label yd = $12
    .label return = $10
    .label x = $1f
    .label y = $21
    // [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 
    lda y+1
    bpl b1
    jmp b2
    // atan2_16::@2
  b2:
    // [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc y
    sta _2
    lda #0
    sbc y+1
    sta _2+1
    // [60] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3]
  b3_from_b1:
  b3_from_b2:
    // [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy 
    jmp b3
    // atan2_16::@3
  b3:
    // [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 
    lda x+1
    bpl b4
    jmp b5
    // atan2_16::@5
  b5:
    // [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc x
    sta _7
    lda #0
    sbc x+1
    sta _7+1
    // [63] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6]
  b6_from_b4:
  b6_from_b5:
    // [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy 
    jmp b6
    // atan2_16::@6
  b6:
    // [64] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10]
  b10_from_b6:
    // [64] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 
    lda #<0
    sta angle
    lda #>0
    sta angle+1
    // [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 
    ldx #0
    // [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy 
    // [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy 
    jmp b10
    // atan2_16::@10
  b10:
    // [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 
    lda yi+1
    bne b11
    lda yi
    bne b11
    // [66] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12]
  b12_from_b10:
  b12_from_b19:
    // [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy 
    jmp b12
    // atan2_16::@12
  b12:
    // [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 
    lsr angle+1
    ror angle
    // [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 
    lda x+1
    bpl b7_from_b12
    jmp b21
    // atan2_16::@21
  b21:
    // [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 
    sec
    lda #<$8000
    sbc angle
    sta angle
    lda #>$8000
    sbc angle+1
    sta angle+1
    // [70] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7]
  b7_from_b12:
  b7_from_b21:
    // [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy 
    jmp b7
    // atan2_16::@7
  b7:
    // [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 
    lda y+1
    bpl b8_from_b7
    jmp b9
    // atan2_16::@9
  b9:
    // [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc angle
    sta angle
    lda #0
    sbc angle+1
    sta angle+1
    // [73] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8]
  b8_from_b7:
  b8_from_b9:
    // [73] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy 
    jmp b8
    // atan2_16::@8
  b8:
    jmp breturn
    // atan2_16::@return
  breturn:
    // [74] return 
    rts
    // atan2_16::@11
  b11:
    // [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx 
    txa
    tay
    // [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 
    lda xi
    sta xd
    lda xi+1
    sta xd+1
    // [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 
    lda yi
    sta yd
    lda yi+1
    sta yd+1
    // [78] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13]
  b13_from_b11:
  b13_from_b14:
    // [78] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy 
    // [78] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy 
    // [78] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy 
    jmp b13
    // atan2_16::@13
  b13:
    // [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 
    cpy #2
    bcs b14
    jmp b15
    // atan2_16::@15
  b15:
    // [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 
    cpy #0
    beq b17_from_b15
    jmp b16
    // atan2_16::@16
  b16:
    // [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    // [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    // [83] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17]
  b17_from_b15:
  b17_from_b16:
    // [83] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy 
    // [83] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy 
    jmp b17
    // atan2_16::@17
  b17:
    // [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 
    lda yi+1
    bpl b18
    jmp b20
    // atan2_16::@20
  b20:
    // [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda xi
    sec
    sbc yd
    sta xi
    lda xi+1
    sbc yd+1
    sta xi+1
    // [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 
    lda yi
    clc
    adc xd
    sta yi
    lda yi+1
    adc xd+1
    sta yi+1
    // [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa 
    tay
    sec
    lda angle
    sbc CORDIC_ATAN2_ANGLES_16,y
    sta angle
    lda angle+1
    sbc CORDIC_ATAN2_ANGLES_16+1,y
    sta angle+1
    // [89] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19]
  b19_from_b18:
  b19_from_b20:
    // [89] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy 
    // [89] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy 
    // [89] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy 
    jmp b19
    // atan2_16::@19
  b19:
    // [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 
    cpx #CORDIC_ITERATIONS_16-1+1
    beq b12_from_b19
    // [64] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10]
  b10_from_b19:
    // [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy 
    // [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy 
    // [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy 
    // [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy 
    jmp b10
    // atan2_16::@18
  b18:
    // [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 
    lda xi
    clc
    adc yd
    sta xi
    lda xi+1
    adc yd+1
    sta xi+1
    // [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda yi
    sec
    sbc xd
    sta yi
    lda yi+1
    sbc xd+1
    sta yi+1
    // [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa 
    tay
    clc
    lda angle
    adc CORDIC_ATAN2_ANGLES_16,y
    sta angle
    lda angle+1
    adc CORDIC_ATAN2_ANGLES_16+1,y
    sta angle+1
    jmp b19_from_b18
    // atan2_16::@14
  b14:
    // [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    // [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    // [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 
    dey
    dey
    jmp b13_from_b14
    // atan2_16::@4
  b4:
    // [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 
    lda x
    sta xi
    lda x+1
    sta xi+1
    jmp b6_from_b4
    // atan2_16::@1
  b1:
    // [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 
    lda y
    sta yi
    lda y+1
    sta yi+1
    jmp b3_from_b1
}
  // init_font_hex
// Make charset from proto chars
// init_font_hex(byte* zeropage($19) charset)
init_font_hex: {
    .label _0 = $23
    .label idx = $1e
    .label proto_lo = $1b
    .label charset = $19
    .label c1 = $1d
    .label proto_hi = $16
    .label c = $18
    // [102] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
  b1_from_init_font_hex:
    // [102] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta c
    // [102] 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 proto_hi
    lda #>FONT_HEX_PROTO
    sta proto_hi+1
    // [102] 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 charset
    lda #>CHARSET
    sta charset+1
    jmp b1
    // [102] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
  b1_from_b5:
    // [102] 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 
    // [102] 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 
    // [102] 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:
    // [103] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
  b2_from_b1:
    // [103] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta c1
    // [103] 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 proto_lo
    lda #>FONT_HEX_PROTO
    sta proto_lo+1
    // [103] 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
    // [103] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
  b2_from_b4:
    // [103] 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 
    // [103] 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 
    // [103] 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:
    // [104] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    ldy #0
    sta (charset),y
    // [105] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
  b3_from_b2:
    // [105] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta idx
    // [105] 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
    // [105] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
  b3_from_b3:
    // [105] 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 
    // [105] 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:
    // [106] (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 _0
    // [107] (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
    // [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora _0
    // [109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy idx
    sta (charset),y
    // [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc idx
    // [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [112] 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:
    // [113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy idx
    sta (charset),y
    // [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    ldy idx
    iny
    // [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    lda #0
    sta (charset),y
    // [116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc proto_lo
    sta proto_lo
    bcc !+
    inc proto_lo+1
  !:
    // [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc charset
    sta charset
    bcc !+
    inc charset+1
  !:
    // [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc c1
    // [119] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp c1
    bne b2_from_b4
    jmp b5
    // init_font_hex::@5
  b5:
    // [120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc proto_hi
    sta proto_hi
    bcc !+
    inc proto_hi+1
  !:
    // [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc c
    // [122] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp c
    bne b1_from_b5
    jmp breturn
    // init_font_hex::@return
  breturn:
    // [123] 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_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2

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


ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp toD0181
Removing instruction jmp b6
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b7
Removing instruction jmp b8
Removing instruction jmp b3
Removing instruction jmp b4
Removing instruction jmp b5
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b5
Removing instruction jmp b6
Removing instruction jmp b10
Removing instruction jmp b12
Removing instruction jmp b21
Removing instruction jmp b7
Removing instruction jmp b9
Removing instruction jmp b8
Removing instruction jmp breturn
Removing instruction jmp b13
Removing instruction jmp b15
Removing instruction jmp b16
Removing instruction jmp b17
Removing instruction jmp b20
Removing instruction jmp b19
Removing instruction jmp 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
Removing instruction ldy #0
Removing instruction ldy #0
Removing instruction lda #>0
Replacing instruction ldx #0 with TAX
Replacing instruction ldy #0 with TAY
Removing instruction ldy idx
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b2_from_b8 with b2
Replacing label b1_from_b3 with b1
Replacing label b3_from_b1 with b3
Replacing label b7_from_b12 with b7
Replacing label b8_from_b7 with b8
Replacing label b17_from_b15 with b17
Replacing label b12_from_b19 with b12
Replacing label b19_from_b18 with b19
Replacing label b13_from_b14 with b13
Replacing label b6_from_b4 with b6
Replacing label b3_from_b1 with b3
Replacing label b3_from_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_b8:
Removing instruction b3_from_b1:
Removing instruction b3_from_b2:
Removing instruction breturn:
Removing instruction b3_from_b1:
Removing instruction b3_from_b2:
Removing instruction b6_from_b4:
Removing instruction b6_from_b5:
Removing instruction b10_from_b6:
Removing instruction b12_from_b10:
Removing instruction b12_from_b19:
Removing instruction b7_from_b12:
Removing instruction b7_from_b21:
Removing instruction b8_from_b7:
Removing instruction b8_from_b9:
Removing instruction breturn:
Removing instruction b13_from_b11:
Removing instruction b13_from_b14:
Removing instruction b17_from_b15:
Removing instruction b17_from_b16:
Removing instruction b19_from_b18:
Removing instruction b19_from_b20:
Removing instruction 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 b6:
Removing instruction b1_from_b6:
Removing instruction b7:
Removing instruction b8:
Removing instruction b3:
Removing instruction b4:
Removing instruction print_byte_from_print_word:
Removing instruction b1:
Removing instruction print_byte_from_b1:
Removing instruction breturn:
Removing instruction print_char_from_print_byte:
Removing instruction b1:
Removing instruction print_char_from_b1:
Removing instruction breturn:
Removing instruction breturn:
Removing instruction b2:
Removing instruction b2:
Removing instruction b5:
Removing instruction b21:
Removing instruction b9:
Removing instruction b15:
Removing instruction b16:
Removing instruction b20:
Removing instruction b10_from_b19:
Removing instruction 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
Replacing jump to rts with rts in jmp b3
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b3:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [283] beq b12 to bne
Fixing long branch [177] bpl b1 to bmi
Fixing long branch [189] 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
(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16
(const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 CORDIC_ATAN2_ANGLES_16 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2
 }}
(byte) CORDIC_ITERATIONS_16
(const byte) CORDIC_ITERATIONS_16#0 CORDIC_ITERATIONS_16 = (byte) $f
(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 }
(const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
(byte[$3e8]) SCREEN_REF
(const byte[$3e8]) SCREEN_REF#0 SCREEN_REF = kickasm {{ .for(var y=-12;y<=12;y++)
        .for(var x=-19;x<=20;x++)
            .byte round(256*atan2(y, x)/PI/2)
 }}
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
(signed word~) atan2_16::$2 $2 zp ZP_WORD:12 4.0
(byte~) atan2_16::$23 reg byte a 2002.0
(byte~) atan2_16::$24 reg byte a 2002.0
(signed word~) atan2_16::$7 $7 zp ZP_WORD:14 4.0
(label) atan2_16::@1
(label) atan2_16::@10
(label) atan2_16::@11
(label) atan2_16::@12
(label) atan2_16::@13
(label) atan2_16::@14
(label) atan2_16::@15
(label) atan2_16::@16
(label) atan2_16::@17
(label) atan2_16::@18
(label) atan2_16::@19
(label) atan2_16::@2
(label) atan2_16::@20
(label) atan2_16::@21
(label) atan2_16::@3
(label) atan2_16::@4
(label) atan2_16::@5
(label) atan2_16::@6
(label) atan2_16::@7
(label) atan2_16::@8
(label) atan2_16::@9
(label) atan2_16::@return
(word) atan2_16::angle
(word) atan2_16::angle#1 angle zp ZP_WORD:16 3.0
(word) atan2_16::angle#11 angle zp ZP_WORD:16 4.0
(word) atan2_16::angle#12 angle zp ZP_WORD:16 190.66666666666666
(word) atan2_16::angle#13 angle zp ZP_WORD:16 1334.6666666666667
(word) atan2_16::angle#2 angle zp ZP_WORD:16 2002.0
(word) atan2_16::angle#3 angle zp ZP_WORD:16 2002.0
(word) atan2_16::angle#4 angle zp ZP_WORD:16 4.0
(word) atan2_16::angle#5 angle zp ZP_WORD:16 4.0
(word) atan2_16::angle#6 angle zp ZP_WORD:16 2004.0
(byte) atan2_16::i
(byte) atan2_16::i#1 reg byte x 1501.5
(byte) atan2_16::i#2 reg byte x 208.54166666666669
(word) atan2_16::return
(word) atan2_16::return#0 return zp ZP_WORD:16 34.99999999999999
(word) atan2_16::return#2 return zp ZP_WORD:16 202.0
(byte) atan2_16::shift
(byte) atan2_16::shift#1 reg byte y 20002.0
(byte) atan2_16::shift#2 reg byte y 8001.25
(byte~) atan2_16::shift#5 reg byte y 667.3333333333334
(signed word) atan2_16::x
(signed word) atan2_16::x#0 x zp ZP_WORD:31 2.8684210526315796
(signed word) atan2_16::xd
(signed word) atan2_16::xd#1 xd zp ZP_WORD:20 6667.333333333333
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:20 1001.0
(signed word) atan2_16::xd#2 xd zp ZP_WORD:20 1001.0
(signed word) atan2_16::xd#3 xd zp ZP_WORD:20 7668.333333333332
(signed word) atan2_16::xd#5 xd zp ZP_WORD:20 1001.0
(signed word) atan2_16::xi
(signed word) atan2_16::xi#0 xi zp ZP_WORD:14 6.0
(signed word) atan2_16::xi#1 xi zp ZP_WORD:14 500.5
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:14 4.0
(signed word) atan2_16::xi#2 xi zp ZP_WORD:14 500.5
(signed word) atan2_16::xi#3 xi zp ZP_WORD:14 267.0666666666667
(signed word) atan2_16::xi#8 xi zp ZP_WORD:14 1001.0
(signed word) atan2_16::y
(signed word) atan2_16::y#0 y zp ZP_WORD:33 2.724999999999999
(signed word) atan2_16::yd
(signed word) atan2_16::yd#1 yd zp ZP_WORD:18 10001.0
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:18 2002.0
(signed word) atan2_16::yd#2 yd zp ZP_WORD:18 2002.0
(signed word) atan2_16::yd#3 yd zp ZP_WORD:18 4601.0
(signed word) atan2_16::yd#5 yd zp ZP_WORD:18 2002.0
(signed word) atan2_16::yi
(signed word) atan2_16::yi#0 yi zp ZP_WORD:12 1.2000000000000002
(signed word) atan2_16::yi#1 yi zp ZP_WORD:12 667.3333333333334
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:12 4.0
(signed word) atan2_16::yi#2 yi zp ZP_WORD:12 667.3333333333334
(signed word) atan2_16::yi#3 yi zp ZP_WORD:12 353.4117647058823
(signed word) atan2_16::yi#8 yi zp ZP_WORD:12 1001.0
(byte()) diff((byte) diff::bb1 , (byte) diff::bb2)
(byte~) diff::$2 reg byte a 4.0
(byte~) diff::$4 reg byte a 4.0
(label) diff::@1
(label) diff::@2
(label) diff::@3
(label) diff::@return
(byte) diff::bb1
(byte) diff::bb1#0 reg byte x 35.66666666666666
(byte) diff::bb2
(byte) diff::bb2#0 reg byte a 53.5
(byte) diff::return
(byte) diff::return#0 reg byte a 202.0
(byte) diff::return#1 reg byte a 34.99999999999999
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:35 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:24 16.5
(byte) init_font_hex::c#6 c zp ZP_BYTE:24 1.1578947368421053
(byte) init_font_hex::c1
(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:29 151.5
(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:29 13.466666666666667
(byte*) init_font_hex::charset
(byte*) init_font_hex::charset#0 charset zp ZP_WORD:25 35.5
(byte*) init_font_hex::charset#2 charset zp ZP_WORD:25 108.35714285714285
(byte*) init_font_hex::charset#5 charset zp ZP_WORD:25 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:30 551.0
(byte) init_font_hex::idx#3 reg byte y 202.0
(byte) init_font_hex::idx#5 idx zp ZP_BYTE:30 600.5999999999999
(byte*) init_font_hex::proto_hi
(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:22 7.333333333333333
(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:22 56.83333333333334
(byte*) init_font_hex::proto_lo
(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:27 50.5
(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:27 92.53846153846155
(void()) main()
(word~) main::$12 $12 zp ZP_WORD:16 202.0
(byte~) main::$14 reg byte a 202.0
(byte~) main::$15 reg byte a 202.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(byte) main::ang_w
(byte) main::ang_w#0 reg byte x 43.285714285714285
(word) main::angle_w
(word) main::angle_w#0 angle_w zp ZP_WORD:16 202.0
(byte*) main::col00
(word) main::diff_sum
(word) main::diff_sum#1 diff_sum zp ZP_WORD:6 23.888888888888886
(word) main::diff_sum#2 diff_sum zp ZP_WORD:6 14.2
(word) main::diff_sum#7 diff_sum zp ZP_WORD:6 22.0
(byte*) main::screen
(byte*) main::screen#1 screen zp ZP_WORD:8 35.5
(byte*) main::screen#2 screen zp ZP_WORD:8 17.444444444444443
(byte*) main::screen#5 screen zp ZP_WORD:8 22.0
(byte*) main::screen_ref
(byte*) main::screen_ref#1 screen_ref zp ZP_WORD:4 42.599999999999994
(byte*) main::screen_ref#2 screen_ref zp ZP_WORD:4 21.842105263157897
(byte*) main::screen_ref#5 screen_ref zp ZP_WORD:4 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:3 151.5
(signed byte) main::x#2 x zp ZP_BYTE:3 10.1
(signed word) main::xw
(word) main::xw#0 xw zp ZP_WORD:31 50.5
(signed byte) main::y
(signed byte) main::y#1 y zp ZP_BYTE:2 16.5
(signed byte) main::y#4 y zp ZP_BYTE:2 0.9565217391304348
(signed word) main::yw
(word) main::yw#0 yw zp ZP_WORD:33 50.5
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
(byte~) print_byte::$2 reg byte x 4.0
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#0 reg byte a 4.0
(byte) print_char::ch#1 reg byte a 4.0
(byte) print_char::ch#2 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#18 print_char_cursor zp ZP_WORD:10 4.0
(byte*) print_char_cursor#19 print_char_cursor zp ZP_WORD:10 0.6666666666666666
(byte*) print_char_cursor#24 print_char_cursor zp ZP_WORD:10 1.3333333333333333
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(byte*) print_line_cursor
(byte*) print_screen
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0 w zp ZP_WORD:6 2.0

zp ZP_BYTE:2 [ main::y#4 main::y#1 ]
zp ZP_BYTE:3 [ main::x#2 main::x#1 ]
zp ZP_WORD:4 [ main::screen_ref#2 main::screen_ref#5 main::screen_ref#1 ]
zp ZP_WORD:6 [ main::diff_sum#2 main::diff_sum#7 main::diff_sum#1 print_word::w#0 ]
zp ZP_WORD:8 [ main::screen#2 main::screen#5 main::screen#1 ]
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
zp ZP_WORD:10 [ print_char_cursor#18 print_char_cursor#24 print_char_cursor#19 ]
reg byte a [ diff::return#1 diff::$4 diff::$2 ]
zp ZP_WORD:12 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ]
zp ZP_WORD:14 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ]
reg byte x [ atan2_16::i#2 atan2_16::i#1 ]
zp ZP_WORD:16 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#5 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::return#2 main::angle_w#0 main::$12 ]
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
zp ZP_WORD:18 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
zp ZP_WORD:20 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
zp ZP_WORD:22 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ]
zp ZP_BYTE:24 [ init_font_hex::c#6 init_font_hex::c#1 ]
zp ZP_WORD:25 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ]
zp ZP_WORD:27 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
zp ZP_BYTE:29 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
zp ZP_WORD:31 [ main::xw#0 atan2_16::x#0 ]
zp ZP_WORD:33 [ main::yw#0 atan2_16::y#0 ]
reg byte x [ main::ang_w#0 ]
reg byte x [ diff::bb1#0 ]
reg byte a [ diff::bb2#0 ]
reg byte a [ diff::return#0 ]
reg byte a [ main::$14 ]
reg byte a [ main::$15 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]
reg byte a [ atan2_16::$24 ]
reg byte a [ atan2_16::$23 ]
zp ZP_BYTE:35 [ init_font_hex::$0 ]
reg byte a [ init_font_hex::$1 ]
reg byte a [ init_font_hex::$2 ]
reg byte y [ init_font_hex::idx#3 ]


FINAL ASSEMBLER
Score: 1044367

  // File Comments
// Find atan2(x, y) using the CORDIC method
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
  // Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
  // Global Constants & labels
  // The number of iterations performed during 16-bit CORDIC atan2 calculation
  .const CORDIC_ITERATIONS_16 = $f
  .label D018 = $d018
  // Color Ram
  .label COLS = $d800
  .label CHARSET = $2000
  .label SCREEN = $2800
  .label print_char_cursor = $a
  // @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 _12 = $10
    .label xw = $1f
    .label yw = $21
    .label angle_w = $10
    .label diff_sum = 6
    .label screen = 8
    .label screen_ref = 4
    .label x = 3
    .label y = 2
    // init_font_hex(CHARSET)
    // [5] call init_font_hex 
    // [101] 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::@6
    // *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::@6 to main::@1 [phi:main::@6->main::@1]
    // [8] phi (byte*) main::screen#5 = (const byte*) SCREEN#0 [phi:main::@6->main::@1#0] -- pbuz1=pbuc1 
    lda #<SCREEN
    sta screen
    lda #>SCREEN
    sta screen+1
    // [8] phi (word) main::diff_sum#7 = (byte) 0 [phi:main::@6->main::@1#1] -- vwuz1=vbuc1 
    lda #<0
    sta diff_sum
    sta diff_sum+1
    // [8] phi (byte*) main::screen_ref#5 = (const byte[$3e8]) SCREEN_REF#0 [phi:main::@6->main::@1#2] -- pbuz1=pbuc1 
    lda #<SCREEN_REF
    sta screen_ref
    lda #>SCREEN_REF
    sta screen_ref+1
    // [8] phi (signed byte) main::y#4 = (signed byte) -$c [phi:main::@6->main::@1#3] -- vbsz1=vbsc1 
    lda #-$c
    sta y
    // [8] phi from main::@3 to main::@1 [phi:main::@3->main::@1]
    // [8] phi (byte*) main::screen#5 = (byte*) main::screen#1 [phi:main::@3->main::@1#0] -- register_copy 
    // [8] phi (word) main::diff_sum#7 = (word) main::diff_sum#1 [phi:main::@3->main::@1#1] -- register_copy 
    // [8] phi (byte*) main::screen_ref#5 = (byte*) main::screen_ref#1 [phi:main::@3->main::@1#2] -- register_copy 
    // [8] phi (signed byte) main::y#4 = (signed byte) main::y#1 [phi:main::@3->main::@1#3] -- 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#5 [phi:main::@1->main::@2#0] -- register_copy 
    // [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#7 [phi:main::@1->main::@2#1] -- register_copy 
    // [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#5 [phi:main::@1->main::@2#2] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) -$13 [phi:main::@1->main::@2#3] -- vbsz1=vbsc1 
    lda #-$13
    sta x
    // [9] phi from main::@8 to main::@2 [phi:main::@8->main::@2]
    // [9] phi (byte*) main::screen#2 = (byte*) main::screen#1 [phi:main::@8->main::@2#0] -- register_copy 
    // [9] phi (word) main::diff_sum#2 = (word) main::diff_sum#1 [phi:main::@8->main::@2#1] -- register_copy 
    // [9] phi (byte*) main::screen_ref#2 = (byte*) main::screen_ref#1 [phi:main::@8->main::@2#2] -- register_copy 
    // [9] phi (signed byte) main::x#2 = (signed byte) main::x#1 [phi:main::@8->main::@2#3] -- register_copy 
    // main::@2
  b2:
    // (word){ (byte)x, 0 }
    // [10] (word) main::xw#0 ← (byte)(signed byte) main::x#2 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 
    lda x
    ldy #0
    sta xw+1
    sty xw
    // (word){ (byte)y, 0 }
    // [11] (word) main::yw#0 ← (byte)(signed byte) main::y#4 w= (byte) 0 -- vwuz1=vbuz2_word_vbuc1 
    lda y
    sta yw+1
    sty yw
    // atan2_16(xw, yw)
    // [12] (signed word) atan2_16::x#0 ← (signed word)(word) main::xw#0
    // [13] (signed word) atan2_16::y#0 ← (signed word)(word) main::yw#0
    // [14] call atan2_16 
    jsr atan2_16
    // [15] (word) atan2_16::return#2 ← (word) atan2_16::return#0
    // main::@7
    // angle_w = atan2_16(xw, yw)
    // [16] (word) main::angle_w#0 ← (word) atan2_16::return#2
    // angle_w+0x0080
    // [17] (word~) main::$12 ← (word) main::angle_w#0 + (byte) $80 -- vwuz1=vwuz1_plus_vbuc1 
    lda #$80
    clc
    adc _12
    sta _12
    bcc !+
    inc _12+1
  !:
    // ang_w = >(angle_w+0x0080)
    // [18] (byte) main::ang_w#0 ← > (word~) main::$12 -- vbuxx=_hi_vwuz1 
    lda _12+1
    tax
    // diff(ang_w, *screen_ref)
    // [19] (byte) diff::bb1#0 ← (byte) main::ang_w#0
    // [20] (byte) diff::bb2#0 ← *((byte*) main::screen_ref#2) -- vbuaa=_deref_pbuz1 
    ldy #0
    lda (screen_ref),y
    // [21] call diff 
    jsr diff
    // [22] (byte) diff::return#0 ← (byte) diff::return#1
    // main::@8
    // [23] (byte~) main::$14 ← (byte) diff::return#0
    // diff_sum += diff(ang_w, *screen_ref)
    // [24] (word) main::diff_sum#1 ← (word) main::diff_sum#2 + (byte~) main::$14 -- vwuz1=vwuz1_plus_vbuaa 
    //*screen = (>angle_w)-angle_b;
    //*screen = >angle_w;
    clc
    adc diff_sum
    sta diff_sum
    bcc !+
    inc diff_sum+1
  !:
    // ang_w - *screen_ref
    // [25] (byte~) main::$15 ← (byte) main::ang_w#0 - *((byte*) main::screen_ref#2) -- vbuaa=vbuxx_minus__deref_pbuz1 
    txa
    sec
    ldy #0
    sbc (screen_ref),y
    // *screen =  ang_w - *screen_ref
    // [26] *((byte*) main::screen#2) ← (byte~) main::$15 -- _deref_pbuz1=vbuaa 
    sta (screen),y
    // screen++;
    // [27] (byte*) main::screen#1 ← ++ (byte*) main::screen#2 -- pbuz1=_inc_pbuz1 
    inc screen
    bne !+
    inc screen+1
  !:
    // screen_ref++;
    // [28] (byte*) main::screen_ref#1 ← ++ (byte*) main::screen_ref#2 -- pbuz1=_inc_pbuz1 
    inc screen_ref
    bne !+
    inc screen_ref+1
  !:
    // for(signed byte x: -19..20)
    // [29] (signed byte) main::x#1 ← ++ (signed byte) main::x#2 -- vbsz1=_inc_vbsz1 
    inc x
    // [30] if((signed byte) main::x#1!=(signed byte) $15) goto main::@2 -- vbsz1_neq_vbsc1_then_la1 
    lda #$15
    cmp x
    bne b2
    // main::@3
    // for(signed byte y: -12..12)
    // [31] (signed byte) main::y#1 ← ++ (signed byte) main::y#4 -- vbsz1=_inc_vbsz1 
    inc y
    // [32] if((signed byte) main::y#1!=(signed byte) $d) goto main::@1 -- vbsz1_neq_vbsc1_then_la1 
    lda #$d
    cmp y
    bne b1
    // main::@4
    // print_word(diff_sum)
    // [33] (word) print_word::w#0 ← (word) main::diff_sum#1
    // [34] call print_word 
    jsr print_word
    // main::@5
  b5:
    // (*col00)++;
    // [35] *((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 b5
}
  // print_word
// Print a word as HEX
// print_word(word zeropage(6) w)
print_word: {
    .label w = 6
    // print_byte(>w)
    // [36] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1 
    lda w+1
    tax
    // [37] call print_byte 
    // [41] phi from print_word to print_byte [phi:print_word->print_byte]
    // [41] phi (byte*) print_char_cursor#24 = (byte*) 1024 [phi:print_word->print_byte#0] -- pbuz1=pbuc1 
    lda #<$400
    sta print_char_cursor
    lda #>$400
    sta print_char_cursor+1
    // [41] phi (byte) print_byte::b#2 = (byte) print_byte::b#0 [phi:print_word->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@1
    // print_byte(<w)
    // [38] (byte) print_byte::b#1 ← < (word) print_word::w#0 -- vbuxx=_lo_vwuz1 
    lda w
    tax
    // [39] call print_byte 
    // [41] phi from print_word::@1 to print_byte [phi:print_word::@1->print_byte]
    // [41] phi (byte*) print_char_cursor#24 = (byte*) print_char_cursor#19 [phi:print_word::@1->print_byte#0] -- register_copy 
    // [41] phi (byte) print_byte::b#2 = (byte) print_byte::b#1 [phi:print_word::@1->print_byte#1] -- register_copy 
    jsr print_byte
    // print_word::@return
    // }
    // [40] return 
    rts
}
  // print_byte
// Print a byte as HEX
// print_byte(byte register(X) b)
print_byte: {
    // b>>4
    // [42] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4 -- vbuaa=vbuxx_ror_4 
    txa
    lsr
    lsr
    lsr
    lsr
    // print_char(print_hextab[b>>4])
    // [43] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) -- vbuaa=pbuc1_derefidx_vbuaa 
    tay
    lda print_hextab,y
    // [44] call print_char 
    // [49] phi from print_byte to print_char [phi:print_byte->print_char]
    // [49] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#24 [phi:print_byte->print_char#0] -- register_copy 
    // [49] phi (byte) print_char::ch#2 = (byte) print_char::ch#0 [phi:print_byte->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@1
    // b&$f
    // [45] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f -- vbuxx=vbuxx_band_vbuc1 
    lda #$f
    axs #0
    // print_char(print_hextab[b&$f])
    // [46] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) -- vbuaa=pbuc1_derefidx_vbuxx 
    lda print_hextab,x
    // [47] call print_char 
    // [49] phi from print_byte::@1 to print_char [phi:print_byte::@1->print_char]
    // [49] phi (byte*) print_char_cursor#18 = (byte*) print_char_cursor#19 [phi:print_byte::@1->print_char#0] -- register_copy 
    // [49] phi (byte) print_char::ch#2 = (byte) print_char::ch#1 [phi:print_byte::@1->print_char#1] -- register_copy 
    jsr print_char
    // print_byte::@return
    // }
    // [48] return 
    rts
}
  // print_char
// Print a single char
// print_char(byte register(A) ch)
print_char: {
    // *(print_char_cursor++) = ch
    // [50] *((byte*) print_char_cursor#18) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuaa 
    ldy #0
    sta (print_char_cursor),y
    // *(print_char_cursor++) = ch;
    // [51] (byte*) print_char_cursor#19 ← ++ (byte*) print_char_cursor#18 -- pbuz1=_inc_pbuz1 
    inc print_char_cursor
    bne !+
    inc print_char_cursor+1
  !:
    // print_char::@return
    // }
    // [52] return 
    rts
}
  // diff
// diff(byte register(X) bb1, byte register(A) bb2)
diff: {
    // (bb1<bb2)?(bb2-bb1):bb1-bb2
    // [53] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 -- vbuxx_lt_vbuaa_then_la1 
    sta $ff
    cpx $ff
    bcc b1
    // diff::@2
    // [54] (byte~) diff::$2 ← (byte) diff::bb1#0 - (byte) diff::bb2#0 -- vbuaa=vbuxx_minus_vbuaa 
    sta $ff
    txa
    sec
    sbc $ff
    // [55] phi from diff::@1 diff::@2 to diff::@3 [phi:diff::@1/diff::@2->diff::@3]
    // [55] phi (byte) diff::return#1 = (byte~) diff::$4 [phi:diff::@1/diff::@2->diff::@3#0] -- register_copy 
    // diff::@3
    // diff::@return
    // }
    // [56] return 
    rts
    // diff::@1
  b1:
    // (bb1<bb2)?(bb2-bb1):bb1-bb2
    // [57] (byte~) diff::$4 ← (byte) diff::bb2#0 - (byte) diff::bb1#0 -- vbuaa=vbuaa_minus_vbuxx 
    stx $ff
    sec
    sbc $ff
    rts
}
  // atan2_16
// Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y)
// Finding the angle requires a binary search using CORDIC_ITERATIONS_16
// Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI)
// atan2_16(signed word zeropage($1f) x, signed word zeropage($21) y)
atan2_16: {
    .label _2 = $c
    .label _7 = $e
    .label yi = $c
    .label xi = $e
    .label angle = $10
    .label xd = $14
    .label yd = $12
    .label return = $10
    .label x = $1f
    .label y = $21
    // (y>=0)?y:-y
    // [58] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 
    lda y+1
    bmi !b1+
    jmp b1
  !b1:
    // atan2_16::@2
    // [59] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc y
    sta _2
    lda #0
    sbc y+1
    sta _2+1
    // [60] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3]
    // [60] phi (signed word) atan2_16::yi#0 = (signed word~) atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy 
    // atan2_16::@3
  b3:
    // (x>=0)?x:-x
    // [61] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 
    lda x+1
    bmi !b4+
    jmp b4
  !b4:
    // atan2_16::@5
    // [62] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0 -- vwsz1=_neg_vwsz2 
    sec
    lda #0
    sbc x
    sta _7
    lda #0
    sbc x+1
    sta _7+1
    // [63] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6]
    // [63] phi (signed word) atan2_16::xi#0 = (signed word~) atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy 
    // atan2_16::@6
  b6:
    // [64] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10]
    // [64] phi (word) atan2_16::angle#12 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vbuc1 
    lda #<0
    sta angle
    sta angle+1
    // [64] phi (byte) atan2_16::i#2 = (byte) 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 
    tax
    // [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy 
    // [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy 
    // atan2_16::@10
  b10:
    // if(yi==0)
    // [65] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 
    lda yi+1
    bne b11
    lda yi
    bne b11
    // [66] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12]
    // [66] phi (word) atan2_16::angle#6 = (word) atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy 
    // atan2_16::@12
  b12:
    // angle /=2
    // [67] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1 -- vwuz1=vwuz1_ror_1 
    lsr angle+1
    ror angle
    // if(x<0)
    // [68] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 
    lda x+1
    bpl b7
    // atan2_16::@21
    // angle = 0x8000-angle
    // [69] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 
    sec
    lda #<$8000
    sbc angle
    sta angle
    lda #>$8000
    sbc angle+1
    sta angle+1
    // [70] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7]
    // [70] phi (word) atan2_16::angle#11 = (word) atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy 
    // atan2_16::@7
  b7:
    // if(y<0)
    // [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 
    lda y+1
    bpl b8
    // atan2_16::@9
    // angle = -angle
    // [72] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11 -- vwuz1=_neg_vwuz1 
    sec
    lda #0
    sbc angle
    sta angle
    lda #0
    sbc angle+1
    sta angle+1
    // [73] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8]
    // [73] phi (word) atan2_16::return#0 = (word) atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy 
    // atan2_16::@8
  b8:
    // atan2_16::@return
    // }
    // [74] return 
    rts
    // atan2_16::@11
  b11:
    // [75] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2 -- vbuyy=vbuxx 
    txa
    tay
    // [76] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3 -- vwsz1=vwsz2 
    lda xi
    sta xd
    lda xi+1
    sta xd+1
    // [77] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3 -- vwsz1=vwsz2 
    lda yi
    sta yd
    lda yi+1
    sta yd+1
    // [78] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13]
    // [78] phi (signed word) atan2_16::yd#3 = (signed word~) atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy 
    // [78] phi (signed word) atan2_16::xd#3 = (signed word~) atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy 
    // [78] phi (byte) atan2_16::shift#2 = (byte~) atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy 
    // atan2_16::@13
  b13:
    // while(shift>=2)
    // [79] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 
    cpy #2
    bcs b14
    // atan2_16::@15
    // if(shift)
    // [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17 -- vbuc1_eq_vbuyy_then_la1 
    cpy #0
    beq b17
    // atan2_16::@16
    // xd >>= 1
    // [81] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    // yd >>= 1
    // [82] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1 -- vwsz1=vwsz1_ror_1 
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    // [83] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17]
    // [83] phi (signed word) atan2_16::xd#5 = (signed word) atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy 
    // [83] phi (signed word) atan2_16::yd#5 = (signed word) atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy 
    // atan2_16::@17
  b17:
    // if(yi>=0)
    // [84] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 
    lda yi+1
    bpl b18
    // atan2_16::@20
    // xi -= yd
    // [85] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda xi
    sec
    sbc yd
    sta xi
    lda xi+1
    sbc yd+1
    sta xi+1
    // yi += xd
    // [86] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 
    lda yi
    clc
    adc xd
    sta yi
    lda yi+1
    adc xd+1
    sta yi+1
    // angle -= CORDIC_ATAN2_ANGLES_16[i]
    // [87] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [88] (word) atan2_16::angle#3 ← (word) atan2_16::angle#12 - *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$24) -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa 
    tay
    sec
    lda angle
    sbc CORDIC_ATAN2_ANGLES_16,y
    sta angle
    lda angle+1
    sbc CORDIC_ATAN2_ANGLES_16+1,y
    sta angle+1
    // [89] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19]
    // [89] phi (signed word) atan2_16::xi#8 = (signed word) atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy 
    // [89] phi (word) atan2_16::angle#13 = (word) atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy 
    // [89] phi (signed word) atan2_16::yi#8 = (signed word) atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy 
    // atan2_16::@19
  b19:
    // for( byte i: 0..CORDIC_ITERATIONS_16-1)
    // [90] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [91] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 
    cpx #CORDIC_ITERATIONS_16-1+1
    bne !b12+
    jmp b12
  !b12:
    // [64] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10]
    // [64] phi (word) atan2_16::angle#12 = (word) atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy 
    // [64] phi (byte) atan2_16::i#2 = (byte) atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy 
    // [64] phi (signed word) atan2_16::xi#3 = (signed word) atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy 
    // [64] phi (signed word) atan2_16::yi#3 = (signed word) atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy 
    jmp b10
    // atan2_16::@18
  b18:
    // xi += yd
    // [92] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 
    lda xi
    clc
    adc yd
    sta xi
    lda xi+1
    adc yd+1
    sta xi+1
    // yi -= xd
    // [93] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 
    lda yi
    sec
    sbc xd
    sta yi
    lda yi+1
    sbc xd+1
    sta yi+1
    // angle += CORDIC_ATAN2_ANGLES_16[i]
    // [94] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 
    txa
    asl
    // [95] (word) atan2_16::angle#2 ← (word) atan2_16::angle#12 + *((const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 + (byte~) atan2_16::$23) -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa 
    tay
    clc
    lda angle
    adc CORDIC_ATAN2_ANGLES_16,y
    sta angle
    lda angle+1
    adc CORDIC_ATAN2_ANGLES_16+1,y
    sta angle+1
    jmp b19
    // atan2_16::@14
  b14:
    // xd >>= 2
    // [96] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    lda xd+1
    cmp #$80
    ror xd+1
    ror xd
    // yd >>= 2
    // [97] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    lda yd+1
    cmp #$80
    ror yd+1
    ror yd
    // shift -=2
    // [98] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2 -- vbuyy=vbuyy_minus_2 
    dey
    dey
    jmp b13
    // atan2_16::@4
  b4:
    // [99] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0 -- vwsz1=vwsz2 
    lda x
    sta xi
    lda x+1
    sta xi+1
    jmp b6
    // atan2_16::@1
  b1:
    // [100] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0 -- vwsz1=vwsz2 
    lda y
    sta yi
    lda y+1
    sta yi+1
    jmp b3
}
  // init_font_hex
// Make charset from proto chars
// init_font_hex(byte* zeropage($19) charset)
init_font_hex: {
    .label _0 = $23
    .label idx = $1e
    .label proto_lo = $1b
    .label charset = $19
    .label c1 = $1d
    .label proto_hi = $16
    .label c = $18
    // [102] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1]
    // [102] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 
    lda #0
    sta c
    // [102] 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 proto_hi
    lda #>FONT_HEX_PROTO
    sta proto_hi+1
    // [102] 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 charset
    lda #>CHARSET
    sta charset+1
    // [102] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1]
    // [102] 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 
    // [102] 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 
    // [102] 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:
    // [103] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2]
    // [103] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 
    lda #0
    sta c1
    // [103] 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 proto_lo
    lda #>FONT_HEX_PROTO
    sta proto_lo+1
    // [103] 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 
    // [103] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2]
    // [103] 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 
    // [103] 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 
    // [103] 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
    // [104] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 
    lda #0
    tay
    sta (charset),y
    // [105] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3]
    // [105] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 
    lda #1
    sta idx
    // [105] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 
    ldx #0
    // [105] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3]
    // [105] 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 
    // [105] 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
    // [106] (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 _0
    // proto_lo[i]<<1
    // [107] (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
    // [108] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa 
    ora _0
    // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1
    // [109] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa 
    ldy idx
    sta (charset),y
    // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1;
    // [110] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 
    inc idx
    // for( byte i: 0..4)
    // [111] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx 
    inx
    // [112] 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
    // [113] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 
    lda #0
    ldy idx
    sta (charset),y
    // charset[idx++] = 0;
    // [114] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 
    iny
    // charset[idx++] = 0
    // [115] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 
    sta (charset),y
    // proto_lo += 5
    // [116] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc proto_lo
    sta proto_lo
    bcc !+
    inc proto_lo+1
  !:
    // charset += 8
    // [117] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 
    lda #8
    clc
    adc charset
    sta charset
    bcc !+
    inc charset+1
  !:
    // for( byte c: 0..15 )
    // [118] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 
    inc c1
    // [119] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp c1
    bne b2
    // init_font_hex::@5
    // proto_hi += 5
    // [120] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 
    lda #5
    clc
    adc proto_hi
    sta proto_hi
    bcc !+
    inc proto_hi+1
  !:
    // for( byte c: 0..15 )
    // [121] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 
    inc c
    // [122] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 
    lda #$10
    cmp c
    bne b1
    // init_font_hex::@return
    // }
    // [123] 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_16:
.for (var i=0; i<CORDIC_ITERATIONS_16; i++)
        .word 256*2*256*atan(1/pow(2,i))/PI/2

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


