1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 02:24:34 +00:00

Added fragments. Implemented working buckets.

This commit is contained in:
jespergravgaard 2019-07-09 14:41:29 +02:00
parent a7ac33a653
commit 80e84f3234
11 changed files with 5846 additions and 3745 deletions

View File

@ -0,0 +1,4 @@
ldy #0
lda ({z1}),y
tax
inc {c1},x

View File

@ -0,0 +1,4 @@
lda {z1}
sta {c1},x
lda {z1}+1
sta {c1}+1,x

View File

@ -0,0 +1,4 @@
lda {z1}
sta {c1},y
lda {z1}+1
sta {c1}+1,y

View File

@ -0,0 +1,4 @@
lda {c1},x
sta {z1}
lda {c1}+1,x
sta {z1}+1

View File

@ -0,0 +1,4 @@
lda {c1},y
sta {z1}
lda {c1}+1,y
sta {z1}+1

View File

@ -0,0 +1,8 @@
clc
lda #<{c1}
adc ({z2}),y
sta {z1}
iny
lda #>{c1}
adc ({z2}),y
sta {z1}+1

View File

@ -1,14 +1,15 @@
// Fill screen using a spiral based on distance-to-center / angle-to-center
// Utilizes a bucket sort for identifying the minimum angle/distance
import "c64"
import "stdlib"
import "sqr"
import "atan2"
// Screen containing distance to center
const byte* SCREEN_DIST = malloc(1000);
const byte[1000] SCREEN_DIST; // = malloc(1000);
// Screen containing angle to center
const byte* SCREEN_ANGLE = malloc(1000);
const byte[1000] SCREEN_ANGLE; // = malloc(1000);
// Screen containing angle to center
const byte* SCREEN_FILL = 0x0400;
@ -19,6 +20,43 @@ void main() {
init_dist_screen(SCREEN_DIST);
init_angle_screen(SCREEN_ANGLE);
init_buckets();
// Test buckets by animating them
byte bucket_idx = 0;
while(true) {
do { } while (*RASTER!=0xfe);
do { } while (*RASTER!=0xff);
(*BORDERCOL)++;
{
// First clear the current bucket
byte bucket_size = BUCKET_SIZES[bucket_idx];
if(bucket_size>0) {
word* bucket = BUCKETS[bucket_idx];
for( byte i=0;i<bucket_size;i++) {
byte* sc = SCREEN_FILL+bucket[i];
*sc = ' ';
}
}
}
// Increase bucket index
bucket_idx++;
if(bucket_idx==NUM_BUCKETS) {
bucket_idx = 0;
}
{
// Plot char in the bucket
byte bucket_size = BUCKET_SIZES[bucket_idx];
if(bucket_size>0) {
word* bucket = BUCKETS[bucket_idx];
for( byte i=0;i<bucket_size;i++) {
byte* sc = SCREEN_FILL+bucket[i];
*sc = '*';
}
}
}
(*BORDERCOL)--;
}
/*
while(true) {
// Find the minimum dist/angle that is not already filled
@ -51,9 +89,16 @@ void main() {
// The number of buckets in our bucket sort
const byte NUM_BUCKETS = 0x30;
// Array containing the bucket size for each of the 256 buckets
const byte[] BUCKET_SIZES = malloc(NUM_BUCKETS*sizeof(byte));
//const word*[] BUCKETS = malloc(NUM_BUCKETS*sizeof(word*));
// Array containing the bucket size for each of the distance buckets
const byte[NUM_BUCKETS] BUCKET_SIZES; // = malloc(NUM_BUCKETS*sizeof(byte));
// Buckets containing screen indices for each distance from the center.
// BUCKETS[dist] is an array of words containing screen indices.
// The size of the array BUCKETS[dist] is BUCKET_SIZES[dist]
const word*[NUM_BUCKETS] BUCKETS; // = malloc(NUM_BUCKETS*sizeof(word*));
// Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes)
const byte[NUM_BUCKETS] BUCKET_IDX; // = malloc(NUM_BUCKETS*sizeof(byte));
void init_buckets() {
// Init bucket sizes to 0
@ -61,29 +106,26 @@ void init_buckets() {
// first find bucket sizes - by counting number of chars with each distance value
byte* dist = SCREEN_DIST;
for( word i:0..999) {
BUCKET_SIZES[*dist++]++;
BUCKET_SIZES[*dist]++;
dist++;
}
/*
// Allocate the buckets
for( byte i:0..NUM_BUCKETS-1) {
BUCKETS[i] = malloc(BUCKET_SIZES[i]*sizeof(byte*));
}
// Iterate all distances and fill the buckets with indices into the screens
const byte[] BUCKET_IDX = malloc(NUM_BUCKETS*sizeof(byte));
for(byte i:0..NUM_BUCKETS-1) BUCKET_IDX[i]=0;
dist = SCREEN_DIST;
for(word i:0..999) {
byte distance = *dist++;
byte distance = *dist;
word* bucket = BUCKETS[distance];
byte idx = BUCKET_IDX[distance];
bucket[idx] = dist-SCREEN_DIST;
BUCKET_IDX[distance]++;
*dist++;
}
*/
}
// Populates 1000 bytes (a screen) with values representing the angle to the center.
// Utilizes symmetry around the center
void init_angle_screen(byte* screen) {

View File

@ -1,92 +1,151 @@
// Fill screen using a spiral based on distance-to-center / angle-to-center
// Utilizes a bucket sort for identifying the minimum angle/distance
.pc = $801 "Basic"
:BasicUpstart(bbegin)
:BasicUpstart(main)
.pc = $80d "Program"
.const SIZEOF_WORD = 2
.const SIZEOF_BYTE = 1
.label RASTER = $d012
.label BORDERCOL = $d020
// Top of the heap used by malloc()
.label HEAP_TOP = $a000
// The number of iterations performed during 16-bit CORDIC atan2 calculation
.const CORDIC_ITERATIONS_16 = $f
// = malloc(1000);
// Screen containing angle to center
.label SCREEN_FILL = $400
// The number of buckets in our bucket sort
.const NUM_BUCKETS = $30
.const NUM_SQUARES = $30
.label heap_head = $24
.label SQUARES = $26
// Screen containing distance to center
.label SCREEN_DIST = 2
// Screen containing angle to center
.label SCREEN_ANGLE = 7
// Array containing the bucket size for each of the 256 buckets
.label BUCKET_SIZES = $28
bbegin:
lda #<$3e8
sta malloc.size
lda #>$3e8
sta malloc.size+1
lda #<HEAP_TOP
sta heap_head
lda #>HEAP_TOP
sta heap_head+1
jsr malloc
lda malloc.mem
sta SCREEN_DIST
lda malloc.mem+1
sta SCREEN_DIST+1
lda #<$3e8
sta malloc.size
lda #>$3e8
sta malloc.size+1
jsr malloc
lda malloc.mem
sta SCREEN_ANGLE
lda malloc.mem+1
sta SCREEN_ANGLE+1
lda #NUM_BUCKETS*SIZEOF_BYTE
sta malloc.size
lda #0
sta malloc.size+1
jsr malloc
lda malloc.mem
sta BUCKET_SIZES
lda malloc.mem+1
sta BUCKET_SIZES+1
jsr main
rts
.label heap_head = $b
.label SQUARES = $d
main: {
lda SCREEN_DIST
sta init_dist_screen.screen
lda SCREEN_DIST+1
sta init_dist_screen.screen+1
.label bucket_size = $2d
.label bucket_idx = 2
.label bucket = $2e
.label sc = $30
.label bucket_size1 = $32
.label bucket1 = $33
.label sc1 = $35
jsr init_dist_screen
jsr init_angle_screen
jsr init_buckets
rts
}
//const word*[] BUCKETS = malloc(NUM_BUCKETS*sizeof(word*));
init_buckets: {
.label dist = 2
.label i1 = 4
lda #0
sta bucket_idx
b2:
lda #$fe
cmp RASTER
bne b2
b3:
lda #$ff
cmp RASTER
bne b3
inc BORDERCOL
// First clear the current bucket
ldy bucket_idx
lda BUCKET_SIZES,y
sta bucket_size
cmp #0
beq b6
tya
asl
tay
lda BUCKETS,y
sta bucket
lda BUCKETS+1,y
sta bucket+1
ldx #0
b7:
txa
asl
tay
clc
lda #<SCREEN_FILL
adc (bucket),y
sta sc
iny
lda #>SCREEN_FILL
adc (bucket),y
sta sc+1
lda #' '
ldy #0
sta (sc),y
inx
cpx bucket_size
bcc b7
b6:
inc bucket_idx
lda #NUM_BUCKETS
cmp bucket_idx
bne b8
lda #0
sta bucket_idx
b8:
// Plot char in the bucket
ldy bucket_idx
lda BUCKET_SIZES,y
sta bucket_size1
cmp #0
beq b9
tya
asl
tay
lda BUCKETS,y
sta bucket1
lda BUCKETS+1,y
sta bucket1+1
ldx #0
b10:
txa
asl
tay
clc
lda #<SCREEN_FILL
adc (bucket1),y
sta sc1
iny
lda #>SCREEN_FILL
adc (bucket1),y
sta sc1+1
lda #'*'
ldy #0
sta (sc1),y
inx
cpx bucket_size1
bcc b10
b9:
dec BORDERCOL
jmp b2
}
// = malloc(NUM_BUCKETS*sizeof(byte));
init_buckets: {
.label _5 = $d
.label _9 = $3a
.label dist = 3
.label i1 = 5
.label distance = $37
.label bucket = $38
.label dist_3 = 7
.label i4 = 9
.label dist_5 = 7
ldx #0
// Init bucket sizes to 0
b1:
lda #0
sta (BUCKET_SIZES),y
iny
cpy #NUM_BUCKETS-1+1
sta BUCKET_SIZES,x
inx
cpx #NUM_BUCKETS-1+1
bne b1
// first find bucket sizes - by counting number of chars with each distance value
sta i1
sta i1+1
b3:
lda #<SCREEN_DIST
sta dist
lda #>SCREEN_DIST
sta dist+1
b2:
ldy #0
lda (dist),y
tay
lda (BUCKET_SIZES),y
clc
adc #1
sta (BUCKET_SIZES),y
tax
inc BUCKET_SIZES,x
inc dist
bne !+
inc dist+1
@ -97,40 +156,128 @@ init_buckets: {
!:
lda i1+1
cmp #>$3e8
bne b3
bne b2
lda i1
cmp #<$3e8
bne b2
ldx #0
// Allocate the buckets
b3:
lda BUCKET_SIZES,x
asl
sta malloc.size
lda #0
rol
sta malloc.size+1
jsr malloc
txa
asl
tay
lda _5
sta BUCKETS,y
lda _5+1
sta BUCKETS+1,y
inx
cpx #NUM_BUCKETS-1+1
bne b3
ldx #0
// Iterate all distances and fill the buckets with indices into the screens
b4:
lda #0
sta BUCKET_IDX,x
inx
cpx #NUM_BUCKETS-1+1
bne b4
sta i4
sta i4+1
lda #<SCREEN_DIST
sta dist_5
lda #>SCREEN_DIST
sta dist_5+1
b5:
ldy #0
lda (dist_5),y
sta distance
asl
tay
lda BUCKETS,y
sta bucket
lda BUCKETS+1,y
sta bucket+1
ldy distance
ldx BUCKET_IDX,y
lda dist_5
sec
sbc #<SCREEN_DIST
sta _9
lda dist_5+1
sbc #>SCREEN_DIST
sta _9+1
txa
asl
tay
lda _9
sta (bucket),y
iny
lda _9+1
sta (bucket),y
ldx distance
inc BUCKET_IDX,x
inc dist_3
bne !+
inc dist_3+1
!:
inc i4
bne !+
inc i4+1
!:
lda i4+1
cmp #>$3e8
bne b5
lda i4
cmp #<$3e8
bne b5
rts
}
// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block.
// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.
// malloc(word zeropage($d) size)
malloc: {
.label mem = $d
.label size = $d
lda heap_head
sec
sbc mem
sta mem
lda heap_head+1
sbc mem+1
sta mem+1
lda mem
sta heap_head
lda mem+1
sta heap_head+1
rts
}
// Populates 1000 bytes (a screen) with values representing the angle to the center.
// Utilizes symmetry around the center
// init_angle_screen(byte* zeropage(7) screen)
init_angle_screen: {
.label _10 = $11
.label screen = 7
.label screen_topline = 9
.label screen_bottomline = 7
.label xw = $2a
.label yw = $2c
.label angle_w = $11
.label ang_w = $2e
.label x = $b
.label xb = $c
.label y = 6
lda screen
clc
adc #<$28*$c
.label _10 = $1a
.label xw = $3c
.label yw = $3e
.label angle_w = $1a
.label ang_w = $40
.label x = $14
.label xb = $15
.label screen_topline = $12
.label screen_bottomline = $10
.label y = $f
lda #<SCREEN_ANGLE+$28*$c
sta screen_topline
lda screen+1
adc #>$28*$c
lda #>SCREEN_ANGLE+$28*$c
sta screen_topline+1
clc
lda screen_bottomline
adc #<$28*$c
lda #<SCREEN_ANGLE+$28*$c
sta screen_bottomline
lda screen_bottomline+1
adc #>$28*$c
lda #>SCREEN_ANGLE+$28*$c
sta screen_bottomline+1
lda #0
sta y
@ -205,18 +352,18 @@ init_angle_screen: {
// 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($2a) x, signed word zeropage($2c) y)
// atan2_16(signed word zeropage($3c) x, signed word zeropage($3e) y)
atan2_16: {
.label _2 = $d
.label _7 = $f
.label yi = $d
.label xi = $f
.label angle = $11
.label xd = $15
.label yd = $13
.label return = $11
.label x = $2a
.label y = $2c
.label _2 = $16
.label _7 = $18
.label yi = $16
.label xi = $18
.label angle = $1a
.label xd = $1e
.label yd = $1c
.label return = $1a
.label x = $3c
.label y = $3e
lda y+1
bmi !b1+
jmp b1
@ -393,25 +540,24 @@ atan2_16: {
}
// Populates 1000 bytes (a screen) with values representing the distance to the center.
// The actual value stored is distance*2 to increase precision
// init_dist_screen(byte* zeropage($18) screen)
init_dist_screen: {
.label screen = $18
.label screen_bottomline = $1a
.label yds = $2f
.label xds = $31
.label ds = $31
.label x = $1c
.label xb = $1d
.label screen_topline = $18
.label y = $17
.label yds = $41
.label xds = $43
.label ds = $43
.label x = $25
.label xb = $26
.label screen_topline = $21
.label screen_bottomline = $23
.label y = $20
jsr init_squares
lda screen
clc
adc #<$28*$18
lda #<SCREEN_DIST+$28*$18
sta screen_bottomline
lda screen+1
adc #>$28*$18
lda #>SCREEN_DIST+$28*$18
sta screen_bottomline+1
lda #<SCREEN_DIST
sta screen_topline
lda #>SCREEN_DIST
sta screen_topline+1
lda #0
sta y
b1:
@ -492,12 +638,12 @@ init_dist_screen: {
// Find the (integer) square root of a word value
// If the square is not an integer then it returns the largest integer N where N*N <= val
// Uses a table of squares that must be initialized by calling init_squares()
// sqrt(word zeropage($31) val)
// sqrt(word zeropage($43) val)
sqrt: {
.label _1 = $1e
.label _3 = $1e
.label found = $1e
.label val = $31
.label _1 = $27
.label _3 = $27
.label found = $27
.label val = $43
lda SQUARES
sta bsearch16u.items
lda SQUARES+1
@ -520,14 +666,14 @@ sqrt: {
// - items - Pointer to the start of the array to search in
// - num - The number of items in the array
// Returns pointer to an entry in the array that matches the search key
// bsearch16u(word zeropage($31) key, word* zeropage($1e) items, byte register(X) num)
// bsearch16u(word zeropage($43) key, word* zeropage($27) items, byte register(X) num)
bsearch16u: {
.label _2 = $1e
.label pivot = $33
.label result = $35
.label return = $1e
.label items = $1e
.label key = $31
.label _2 = $27
.label pivot = $45
.label result = $47
.label return = $27
.label items = $27
.label key = $43
ldx #NUM_SQUARES
b3:
cpx #0
@ -603,8 +749,8 @@ bsearch16u: {
// Uses a table of squares that must be initialized by calling init_squares()
// sqr(byte register(A) val)
sqr: {
.label return = $31
.label return_2 = $2f
.label return = $43
.label return_2 = $41
asl
tay
lda (SQUARES),y
@ -617,12 +763,16 @@ sqr: {
// Initialize squares table
// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1
init_squares: {
.label squares = $22
.label sqr = $20
.label squares = $2b
.label sqr = $29
lda #NUM_SQUARES*SIZEOF_WORD
sta malloc.size
lda #0
sta malloc.size+1
lda #<HEAP_TOP
sta heap_head
lda #>HEAP_TOP
sta heap_head+1
jsr malloc
lda SQUARES
sta squares
@ -661,27 +811,21 @@ init_squares: {
bne b1
rts
}
// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block.
// The content of the newly allocated block of memory is not initialized, remaining with indeterminate values.
// malloc(word zeropage($26) size)
malloc: {
.label mem = $26
.label size = $26
lda heap_head
sec
sbc mem
sta mem
lda heap_head+1
sbc mem+1
sta mem+1
lda mem
sta heap_head
lda mem+1
sta heap_head+1
rts
}
// 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
// Screen containing distance to center
SCREEN_DIST: .fill $3e8, 0
// = malloc(1000);
// Screen containing angle to center
SCREEN_ANGLE: .fill $3e8, 0
// Array containing the bucket size for each of the distance buckets
BUCKET_SIZES: .fill NUM_BUCKETS, 0
// Buckets containing screen indices for each distance from the center.
// BUCKETS[dist] is an array of words containing screen indices.
// The size of the array BUCKETS[dist] is BUCKET_SIZES[dist]
BUCKETS: .fill 2*NUM_BUCKETS, 0
// Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes)
BUCKET_IDX: .fill NUM_BUCKETS, 0

View File

@ -3,377 +3,435 @@
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call malloc
to:@4
@4: scope:[] from @1
[3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0
[4] call malloc
to:@5
@5: scope:[] from @4
[5] (void*) SCREEN_ANGLE#0 ← (void*)(byte*) malloc::mem#0
to:@2
@2: scope:[] from @5
[6] phi()
[7] call malloc
to:@6
@6: scope:[] from @2
[8] (void*) BUCKET_SIZES#0 ← (void*)(byte*) malloc::mem#0
to:@3
@3: scope:[] from @6
[9] phi()
[10] call main
[2] call main
to:@end
@end: scope:[] from @3
[11] phi()
main: scope:[main] from @3
[12] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0
[13] call init_dist_screen
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
[5] call init_dist_screen
to:main::@12
main::@12: scope:[main] from main
[6] phi()
[7] call init_angle_screen
to:main::@13
main::@13: scope:[main] from main::@12
[8] phi()
[9] call init_buckets
to:main::@1
main::@1: scope:[main] from main
[14] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0
[15] call init_angle_screen
main::@1: scope:[main] from main::@13 main::@9
[10] (byte) main::bucket_idx#11 ← phi( main::@9/(byte) main::bucket_idx#6 main::@13/(byte) 0 )
to:main::@2
main::@2: scope:[main] from main::@1
[16] phi()
[17] call init_buckets
to:main::@return
main::@return: scope:[main] from main::@2
[18] return
to:@return
init_buckets: scope:[init_buckets] from main::@2
[19] phi()
main::@2: scope:[main] from main::@1 main::@2
[11] if(*((const byte*) RASTER#0)!=(byte) $fe) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2 main::@3
[12] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@3
to:main::@4
main::@4: scope:[main] from main::@3
[13] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
[14] (byte) main::bucket_size#0 ← *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (byte) main::bucket_idx#11)
[15] if((byte) main::bucket_size#0<=(byte) 0) goto main::@6
to:main::@5
main::@5: scope:[main] from main::@4
[16] (byte~) main::$15 ← (byte) main::bucket_idx#11 << (byte) 1
[17] (word*) main::bucket#0 ← *((const word*[NUM_BUCKETS#0]) BUCKETS#0 + (byte~) main::$15)
to:main::@7
main::@7: scope:[main] from main::@5 main::@7
[18] (byte) main::i#2 ← phi( main::@7/(byte) main::i#1 main::@5/(byte) 0 )
[19] (byte~) main::$16 ← (byte) main::i#2 << (byte) 1
[20] (byte*) main::sc#0 ← (const byte*) SCREEN_FILL#0 + *((word*) main::bucket#0 + (byte~) main::$16)
[21] *((byte*) main::sc#0) ← (byte) ' '
[22] (byte) main::i#1 ← ++ (byte) main::i#2
[23] if((byte) main::i#1<(byte) main::bucket_size#0) goto main::@7
to:main::@6
main::@6: scope:[main] from main::@4 main::@7
[24] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#11
[25] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS#0) goto main::@14
to:main::@8
main::@14: scope:[main] from main::@6
[26] phi()
to:main::@8
main::@8: scope:[main] from main::@14 main::@6
[27] (byte) main::bucket_idx#6 ← phi( main::@6/(byte) 0 main::@14/(byte) main::bucket_idx#1 )
[28] (byte) main::bucket_size1#0 ← *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (byte) main::bucket_idx#6)
[29] if((byte) main::bucket_size1#0<=(byte) 0) goto main::@9
to:main::@11
main::@11: scope:[main] from main::@8
[30] (byte~) main::$17 ← (byte) main::bucket_idx#6 << (byte) 1
[31] (word*) main::bucket1#0 ← *((const word*[NUM_BUCKETS#0]) BUCKETS#0 + (byte~) main::$17)
to:main::@10
main::@10: scope:[main] from main::@10 main::@11
[32] (byte) main::i1#2 ← phi( main::@10/(byte) main::i1#1 main::@11/(byte) 0 )
[33] (byte~) main::$18 ← (byte) main::i1#2 << (byte) 1
[34] (byte*) main::sc1#0 ← (const byte*) SCREEN_FILL#0 + *((word*) main::bucket1#0 + (byte~) main::$18)
[35] *((byte*) main::sc1#0) ← (byte) '*'
[36] (byte) main::i1#1 ← ++ (byte) main::i1#2
[37] if((byte) main::i1#1<(byte) main::bucket_size1#0) goto main::@10
to:main::@9
main::@9: scope:[main] from main::@10 main::@8
[38] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
to:main::@1
init_buckets: scope:[init_buckets] from main::@13
[39] phi()
to:init_buckets::@1
init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1
[20] (byte) init_buckets::i#2 ← phi( init_buckets/(byte) 0 init_buckets::@1/(byte) init_buckets::i#1 )
[21] *((byte*)(void*) BUCKET_SIZES#0 + (byte) init_buckets::i#2) ← (byte) 0
[22] (byte) init_buckets::i#1 ← ++ (byte) init_buckets::i#2
[23] if((byte) init_buckets::i#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@1
[40] (byte) init_buckets::i#2 ← phi( init_buckets/(byte) 0 init_buckets::@1/(byte) init_buckets::i#1 )
[41] *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (byte) init_buckets::i#2) ← (byte) 0
[42] (byte) init_buckets::i#1 ← ++ (byte) init_buckets::i#2
[43] if((byte) init_buckets::i#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@1
to:init_buckets::@2
init_buckets::@2: scope:[init_buckets] from init_buckets::@1
[24] (byte*) init_buckets::dist#0 ← (byte*)(void*) SCREEN_DIST#0
init_buckets::@2: scope:[init_buckets] from init_buckets::@1 init_buckets::@2
[44] (word) init_buckets::i1#2 ← phi( init_buckets::@1/(word) 0 init_buckets::@2/(word) init_buckets::i1#1 )
[44] (byte*) init_buckets::dist#4 ← phi( init_buckets::@1/(const byte[$3e8]) SCREEN_DIST#0 init_buckets::@2/(byte*) init_buckets::dist#1 )
[45] *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4)) ← ++ *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4))
[46] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#4
[47] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2
[48] if((word) init_buckets::i1#1!=(word) $3e8) goto init_buckets::@2
to:init_buckets::@3
init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@3
[25] (word) init_buckets::i1#2 ← phi( init_buckets::@2/(word) 0 init_buckets::@3/(word) init_buckets::i1#1 )
[25] (byte*) init_buckets::dist#2 ← phi( init_buckets::@2/(byte*) init_buckets::dist#0 init_buckets::@3/(byte*) init_buckets::dist#1 )
[26] *((byte*)(void*) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#2)) ← ++ *((byte*)(void*) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#2))
[27] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#2
[28] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2
[29] if((word) init_buckets::i1#1!=(word) $3e8) goto init_buckets::@3
init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@6
[49] (byte) init_buckets::i2#2 ← phi( init_buckets::@6/(byte) init_buckets::i2#1 init_buckets::@2/(byte) 0 )
[50] (word) malloc::size#1 ← *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (byte) init_buckets::i2#2) << (byte) 1
[51] call malloc
to:init_buckets::@6
init_buckets::@6: scope:[init_buckets] from init_buckets::@3
[52] (void*~) init_buckets::$5 ← (void*)(byte*) malloc::mem#0
[53] (byte~) init_buckets::$11 ← (byte) init_buckets::i2#2 << (byte) 1
[54] *((const word*[NUM_BUCKETS#0]) BUCKETS#0 + (byte~) init_buckets::$11) ← (word*)(void*~) init_buckets::$5
[55] (byte) init_buckets::i2#1 ← ++ (byte) init_buckets::i2#2
[56] if((byte) init_buckets::i2#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@3
to:init_buckets::@4
init_buckets::@4: scope:[init_buckets] from init_buckets::@4 init_buckets::@6
[57] (byte) init_buckets::i3#2 ← phi( init_buckets::@6/(byte) 0 init_buckets::@4/(byte) init_buckets::i3#1 )
[58] *((const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 + (byte) init_buckets::i3#2) ← (byte) 0
[59] (byte) init_buckets::i3#1 ← ++ (byte) init_buckets::i3#2
[60] if((byte) init_buckets::i3#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@4
to:init_buckets::@5
init_buckets::@5: scope:[init_buckets] from init_buckets::@4 init_buckets::@5
[61] (word) init_buckets::i4#2 ← phi( init_buckets::@4/(word) 0 init_buckets::@5/(word) init_buckets::i4#1 )
[61] (byte*) init_buckets::dist#5 ← phi( init_buckets::@4/(const byte[$3e8]) SCREEN_DIST#0 init_buckets::@5/(byte*) init_buckets::dist#3 )
[62] (byte) init_buckets::distance#0 ← *((byte*) init_buckets::dist#5)
[63] (byte~) init_buckets::$12 ← (byte) init_buckets::distance#0 << (byte) 1
[64] (word*) init_buckets::bucket#0 ← *((const word*[NUM_BUCKETS#0]) BUCKETS#0 + (byte~) init_buckets::$12)
[65] (byte) init_buckets::idx#0 ← *((const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 + (byte) init_buckets::distance#0)
[66] (word~) init_buckets::$9 ← (byte*) init_buckets::dist#5 - (const byte[$3e8]) SCREEN_DIST#0
[67] (byte~) init_buckets::$13 ← (byte) init_buckets::idx#0 << (byte) 1
[68] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$13) ← (word~) init_buckets::$9
[69] *((const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 + (byte) init_buckets::distance#0)
[70] (byte*) init_buckets::dist#3 ← ++ (byte*) init_buckets::dist#5
[71] (word) init_buckets::i4#1 ← ++ (word) init_buckets::i4#2
[72] if((word) init_buckets::i4#1!=(word) $3e8) goto init_buckets::@5
to:init_buckets::@return
init_buckets::@return: scope:[init_buckets] from init_buckets::@3
[30] return
init_buckets::@return: scope:[init_buckets] from init_buckets::@5
[73] return
to:@return
init_angle_screen: scope:[init_angle_screen] from main::@1
[31] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
[32] (byte*) init_angle_screen::screen_bottomline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
to:init_angle_screen::@1
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3
[33] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_topline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 )
[33] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(byte*) init_angle_screen::screen_bottomline#0 init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 )
[33] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 )
to:init_angle_screen::@2
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4
[34] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 )
[34] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 )
[35] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1
[36] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2
[37] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0
[38] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1
[39] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0
[40] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[41] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[42] call atan2_16
[43] (word) atan2_16::return#2 ← (word) atan2_16::return#0
to:init_angle_screen::@4
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
[44] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[45] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[46] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10
[47] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[48] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0
[49] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12
[50] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[51] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13
[52] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[53] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14
[54] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[55] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
[56] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2
to:init_angle_screen::@3
init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4
[57] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28
[58] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28
[59] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4
[60] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1
to:init_angle_screen::@return
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3
[61] return
to:@return
atan2_16: scope:[atan2_16] from init_angle_screen::@2
[62] 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
[63] (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
[64] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[65] 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
[66] (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
[67] (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
[68] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
[68] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[68] (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 )
[68] (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 )
[69] 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
[70] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[71] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[72] 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
[73] (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
[74] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[75] 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
[76] (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
[77] (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
[78] return
to:@return
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
[79] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
[80] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[81] (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
[82] (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 )
[82] (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 )
[82] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[83] 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
[84] 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
[85] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[86] (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
[87] (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 )
[87] (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 )
[88] 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
[89] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[90] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[91] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
[92] (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
[93] (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 )
[93] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[93] (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 )
[94] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[95] 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
[96] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[97] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[98] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[99] (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
[100] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[101] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[102] (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
[103] (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
[104] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
to:atan2_16::@3
init_dist_screen: scope:[init_dist_screen] from main
[105] phi()
[106] call init_squares
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen
[107] (byte*) init_dist_screen::screen_bottomline#0 ← (byte*) init_dist_screen::screen#0 + (word)(number) $28*(number) $18
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@9
[108] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen_bottomline#0 )
[108] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen::@10/(byte*) init_dist_screen::screen#0 )
[108] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen::@10/(byte) 0 )
[109] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[110] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
to:init_dist_screen::@3
init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1
[111] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
to:init_dist_screen::@4
init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3
[112] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 )
[113] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[114] call sqr
[115] (word) sqr::return#2 ← (word) sqr::return#0
to:init_dist_screen::@11
init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@4
[116] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
to:init_dist_screen::@5
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13
[117] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 )
[117] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 )
[118] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[119] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6
to:init_dist_screen::@7
init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5
[120] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0
to:init_dist_screen::@8
init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7
[121] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 )
[122] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[123] call sqr
[124] (word) sqr::return#3 ← (word) sqr::return#0
to:init_dist_screen::@12
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8
[125] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[126] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[127] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[128] call sqrt
[129] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:init_dist_screen::@13
init_dist_screen::@13: scope:[init_dist_screen] from init_dist_screen::@12
[130] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[131] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[132] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[133] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[134] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[135] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[136] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[137] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5
to:init_dist_screen::@9
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13
[138] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[139] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[140] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[141] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
to:init_dist_screen::@return
init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9
[142] return
to:@return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[143] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27
to:init_dist_screen::@8
init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1
[144] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
to:init_dist_screen::@4
sqrt: scope:[sqrt] from init_dist_screen::@12
[145] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[146] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[147] call bsearch16u
[148] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[149] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[150] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[151] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[152] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[153] return
to:@return
bsearch16u: scope:[bsearch16u] from sqrt
[154] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[155] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[155] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[156] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[157] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[158] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
to:bsearch16u::@2
bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5
[159] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
to:bsearch16u::@return
bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8
[160] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[161] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[162] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[163] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[164] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[165] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[166] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[167] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[168] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[169] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[170] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[171] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[171] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[172] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
to:bsearch16u::@3
sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8
[173] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[174] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[175] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[176] return
to:@return
init_squares: scope:[init_squares] from init_dist_screen
[177] phi()
[178] call malloc
to:init_squares::@2
init_squares::@2: scope:[init_squares] from init_squares
[179] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[180] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1
to:init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2
[181] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 )
[181] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 )
[181] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 )
[182] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[183] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[184] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[185] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[186] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[187] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[188] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1
to:init_squares::@return
init_squares::@return: scope:[init_squares] from init_squares::@1
[189] return
to:@return
malloc: scope:[malloc] from @1 @2 @4 init_squares
[190] (word) malloc::size#4 ← phi( @4/(word) $3e8 @1/(word) $3e8 @2/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[190] (byte*) heap_head#13 ← phi( @4/(byte*) heap_head#1 @1/(const byte*) HEAP_TOP#0 @2/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 )
[191] (byte*) malloc::mem#0 ← (byte*) heap_head#13 - (word) malloc::size#4
[192] (byte*) heap_head#1 ← (byte*) malloc::mem#0
malloc: scope:[malloc] from init_buckets::@3 init_squares
[74] (word) malloc::size#2 ← phi( init_buckets::@3/(word) malloc::size#1 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[74] (byte*) heap_head#13 ← phi( init_buckets::@3/(byte*) heap_head#1 init_squares/(const byte*) HEAP_TOP#0 )
[75] (byte*) malloc::mem#0 ← (byte*) heap_head#13 - (word) malloc::size#2
[76] (byte*) heap_head#1 ← (byte*) malloc::mem#0
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[193] return
[77] return
to:@return
init_angle_screen: scope:[init_angle_screen] from main::@12
[78] phi()
to:init_angle_screen::@1
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@3
[79] (byte*) init_angle_screen::screen_topline#5 ← phi( init_angle_screen/(const byte[$3e8]) SCREEN_ANGLE#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_topline#1 )
[79] (byte*) init_angle_screen::screen_bottomline#5 ← phi( init_angle_screen/(const byte[$3e8]) SCREEN_ANGLE#0+(word)(number) $28*(number) $c init_angle_screen::@3/(byte*) init_angle_screen::screen_bottomline#1 )
[79] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 )
to:init_angle_screen::@2
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@4
[80] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 )
[80] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 )
[81] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1
[82] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2
[83] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0
[84] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1
[85] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0
[86] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[87] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[88] call atan2_16
[89] (word) atan2_16::return#2 ← (word) atan2_16::return#0
to:init_angle_screen::@4
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
[90] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[91] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[92] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10
[93] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[94] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0
[95] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12
[96] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[97] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13
[98] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[99] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14
[100] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[101] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
[102] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2
to:init_angle_screen::@3
init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@4
[103] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28
[104] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28
[105] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4
[106] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1
to:init_angle_screen::@return
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@3
[107] return
to:@return
atan2_16: scope:[atan2_16] from init_angle_screen::@2
[108] 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
[109] (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
[110] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[111] 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
[112] (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
[113] (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
[114] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
[114] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[114] (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 )
[114] (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 )
[115] 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
[116] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[117] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[118] 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
[119] (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
[120] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[121] 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
[122] (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
[123] (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
[124] return
to:@return
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
[125] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
[126] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[127] (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
[128] (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 )
[128] (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 )
[128] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[129] 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
[130] 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
[131] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[132] (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
[133] (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 )
[133] (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 )
[134] 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
[135] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[136] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[137] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
[138] (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
[139] (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 )
[139] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[139] (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 )
[140] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[141] 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
[142] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[143] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[144] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[145] (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
[146] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[147] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[148] (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
[149] (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
[150] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
to:atan2_16::@3
init_dist_screen: scope:[init_dist_screen] from main
[151] phi()
[152] call init_squares
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9
[153] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen/(const byte[$3e8]) SCREEN_DIST#0+(word)(number) $28*(number) $18 )
[153] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen/(const byte[$3e8]) SCREEN_DIST#0 )
[153] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 )
[154] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[155] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
to:init_dist_screen::@3
init_dist_screen::@3: scope:[init_dist_screen] from init_dist_screen::@1
[156] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
to:init_dist_screen::@4
init_dist_screen::@4: scope:[init_dist_screen] from init_dist_screen::@2 init_dist_screen::@3
[157] (byte) init_dist_screen::yd#0 ← phi( init_dist_screen::@2/(byte~) init_dist_screen::$7 init_dist_screen::@3/(byte~) init_dist_screen::$5 )
[158] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[159] call sqr
[160] (word) sqr::return#2 ← (word) sqr::return#0
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen::@4
[161] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
to:init_dist_screen::@5
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@12
[162] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 )
[162] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 )
[163] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[164] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6
to:init_dist_screen::@7
init_dist_screen::@7: scope:[init_dist_screen] from init_dist_screen::@5
[165] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0
to:init_dist_screen::@8
init_dist_screen::@8: scope:[init_dist_screen] from init_dist_screen::@6 init_dist_screen::@7
[166] (byte) init_dist_screen::xd#0 ← phi( init_dist_screen::@6/(byte~) init_dist_screen::$15 init_dist_screen::@7/(byte~) init_dist_screen::$13 )
[167] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[168] call sqr
[169] (word) sqr::return#3 ← (word) sqr::return#0
to:init_dist_screen::@11
init_dist_screen::@11: scope:[init_dist_screen] from init_dist_screen::@8
[170] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[171] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[172] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[173] call sqrt
[174] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:init_dist_screen::@12
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11
[175] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[176] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[177] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[178] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[179] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[180] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[181] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[182] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5
to:init_dist_screen::@9
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@12
[183] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[184] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[185] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[186] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
to:init_dist_screen::@return
init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9
[187] return
to:@return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[188] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27
to:init_dist_screen::@8
init_dist_screen::@2: scope:[init_dist_screen] from init_dist_screen::@1
[189] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
to:init_dist_screen::@4
sqrt: scope:[sqrt] from init_dist_screen::@11
[190] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[191] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[192] call bsearch16u
[193] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[194] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[195] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[196] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[197] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[198] return
to:@return
bsearch16u: scope:[bsearch16u] from sqrt
[199] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[200] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[200] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[201] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[202] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[203] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
to:bsearch16u::@2
bsearch16u::@2: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@5
[204] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
to:bsearch16u::@return
bsearch16u::@return: scope:[bsearch16u] from bsearch16u::@2 bsearch16u::@8
[205] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[206] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[207] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[208] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[209] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[210] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[211] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[212] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[213] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[214] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[215] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[216] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[216] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[217] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
to:bsearch16u::@3
sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8
[218] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[219] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[220] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[221] return
to:@return
init_squares: scope:[init_squares] from init_dist_screen
[222] phi()
[223] call malloc
to:init_squares::@2
init_squares::@2: scope:[init_squares] from init_squares
[224] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[225] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1
to:init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares::@1 init_squares::@2
[226] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 )
[226] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 )
[226] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 )
[227] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[228] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[229] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[230] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[231] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[232] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[233] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1
to:init_squares::@return
init_squares::@return: scope:[init_squares] from init_squares::@1
[234] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,14 @@
(label) @1
(label) @2
(label) @3
(label) @4
(label) @5
(label) @6
(label) @begin
(label) @end
(byte[]) BUCKET_SIZES
(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:40 0.1111111111111111
(byte*) BORDERCOL
(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280
(word*[NUM_BUCKETS#0]) BUCKETS
(const word*[NUM_BUCKETS#0]) BUCKETS#0 BUCKETS = { fill( NUM_BUCKETS#0, 0) }
(byte[NUM_BUCKETS#0]) BUCKET_IDX
(const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 BUCKET_IDX = { fill( NUM_BUCKETS#0, 0) }
(byte[NUM_BUCKETS#0]) BUCKET_SIZES
(const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 BUCKET_SIZES = { fill( NUM_BUCKETS#0, 0) }
(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
@ -20,19 +21,22 @@
(const byte) NUM_BUCKETS#0 NUM_BUCKETS = (byte) $30
(byte) NUM_SQUARES
(const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30
(byte*) SCREEN_ANGLE
(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:7 0.2857142857142857
(byte*) SCREEN_DIST
(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:2 0.11764705882352941
(const byte) SIZEOF_BYTE SIZEOF_BYTE = (byte) 1
(byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266
(byte[$3e8]) SCREEN_ANGLE
(const byte[$3e8]) SCREEN_ANGLE#0 SCREEN_ANGLE = { fill( $3e8, 0) }
(byte[$3e8]) SCREEN_DIST
(const byte[$3e8]) SCREEN_DIST#0 SCREEN_DIST = { fill( $3e8, 0) }
(byte*) SCREEN_FILL
(const byte*) SCREEN_FILL#0 SCREEN_FILL = (byte*) 1024
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
(word*) SQUARES
(void*) SQUARES#1 SQUARES zp ZP_WORD:38 0.03225806451612903
(void*) SQUARES#1 SQUARES zp ZP_WORD:13 0.03278688524590164
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
(signed word~) atan2_16::$2 $2 zp ZP_WORD:13 4.0
(signed word~) atan2_16::$2 $2 zp ZP_WORD:22 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:15 4.0
(signed word~) atan2_16::$7 $7 zp ZP_WORD:24 4.0
(label) atan2_16::@1
(label) atan2_16::@10
(label) atan2_16::@11
@ -56,58 +60,58 @@
(label) atan2_16::@9
(label) atan2_16::@return
(word) atan2_16::angle
(word) atan2_16::angle#1 angle zp ZP_WORD:17 3.0
(word) atan2_16::angle#11 angle zp ZP_WORD:17 4.0
(word) atan2_16::angle#12 angle zp ZP_WORD:17 190.66666666666666
(word) atan2_16::angle#13 angle zp ZP_WORD:17 1334.6666666666667
(word) atan2_16::angle#2 angle zp ZP_WORD:17 2002.0
(word) atan2_16::angle#3 angle zp ZP_WORD:17 2002.0
(word) atan2_16::angle#4 angle zp ZP_WORD:17 4.0
(word) atan2_16::angle#5 angle zp ZP_WORD:17 4.0
(word) atan2_16::angle#6 angle zp ZP_WORD:17 2004.0
(word) atan2_16::angle#1 angle zp ZP_WORD:26 3.0
(word) atan2_16::angle#11 angle zp ZP_WORD:26 4.0
(word) atan2_16::angle#12 angle zp ZP_WORD:26 190.66666666666666
(word) atan2_16::angle#13 angle zp ZP_WORD:26 1334.6666666666667
(word) atan2_16::angle#2 angle zp ZP_WORD:26 2002.0
(word) atan2_16::angle#3 angle zp ZP_WORD:26 2002.0
(word) atan2_16::angle#4 angle zp ZP_WORD:26 4.0
(word) atan2_16::angle#5 angle zp ZP_WORD:26 4.0
(word) atan2_16::angle#6 angle zp ZP_WORD:26 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:17 34.99999999999999
(word) atan2_16::return#2 return zp ZP_WORD:17 202.0
(word) atan2_16::return#0 return zp ZP_WORD:26 34.99999999999999
(word) atan2_16::return#2 return zp ZP_WORD:26 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:42 2.8684210526315796
(signed word) atan2_16::x#0 x zp ZP_WORD:60 2.8684210526315796
(signed word) atan2_16::xd
(signed word) atan2_16::xd#1 xd zp ZP_WORD:21 6667.333333333333
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:21 1001.0
(signed word) atan2_16::xd#2 xd zp ZP_WORD:21 1001.0
(signed word) atan2_16::xd#3 xd zp ZP_WORD:21 7668.333333333332
(signed word) atan2_16::xd#5 xd zp ZP_WORD:21 1001.0
(signed word) atan2_16::xd#1 xd zp ZP_WORD:30 6667.333333333333
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:30 1001.0
(signed word) atan2_16::xd#2 xd zp ZP_WORD:30 1001.0
(signed word) atan2_16::xd#3 xd zp ZP_WORD:30 7668.333333333332
(signed word) atan2_16::xd#5 xd zp ZP_WORD:30 1001.0
(signed word) atan2_16::xi
(signed word) atan2_16::xi#0 xi zp ZP_WORD:15 6.0
(signed word) atan2_16::xi#1 xi zp ZP_WORD:15 500.5
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:15 4.0
(signed word) atan2_16::xi#2 xi zp ZP_WORD:15 500.5
(signed word) atan2_16::xi#3 xi zp ZP_WORD:15 267.0666666666667
(signed word) atan2_16::xi#8 xi zp ZP_WORD:15 1001.0
(signed word) atan2_16::xi#0 xi zp ZP_WORD:24 6.0
(signed word) atan2_16::xi#1 xi zp ZP_WORD:24 500.5
(signed word~) atan2_16::xi#13 xi zp ZP_WORD:24 4.0
(signed word) atan2_16::xi#2 xi zp ZP_WORD:24 500.5
(signed word) atan2_16::xi#3 xi zp ZP_WORD:24 267.0666666666667
(signed word) atan2_16::xi#8 xi zp ZP_WORD:24 1001.0
(signed word) atan2_16::y
(signed word) atan2_16::y#0 y zp ZP_WORD:44 2.724999999999999
(signed word) atan2_16::y#0 y zp ZP_WORD:62 2.724999999999999
(signed word) atan2_16::yd
(signed word) atan2_16::yd#1 yd zp ZP_WORD:19 10001.0
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:19 2002.0
(signed word) atan2_16::yd#2 yd zp ZP_WORD:19 2002.0
(signed word) atan2_16::yd#3 yd zp ZP_WORD:19 4601.0
(signed word) atan2_16::yd#5 yd zp ZP_WORD:19 2002.0
(signed word) atan2_16::yd#1 yd zp ZP_WORD:28 10001.0
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:28 2002.0
(signed word) atan2_16::yd#2 yd zp ZP_WORD:28 2002.0
(signed word) atan2_16::yd#3 yd zp ZP_WORD:28 4601.0
(signed word) atan2_16::yd#5 yd zp ZP_WORD:28 2002.0
(signed word) atan2_16::yi
(signed word) atan2_16::yi#0 yi zp ZP_WORD:13 1.2000000000000002
(signed word) atan2_16::yi#1 yi zp ZP_WORD:13 667.3333333333334
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:13 4.0
(signed word) atan2_16::yi#2 yi zp ZP_WORD:13 667.3333333333334
(signed word) atan2_16::yi#3 yi zp ZP_WORD:13 353.4117647058823
(signed word) atan2_16::yi#8 yi zp ZP_WORD:13 1001.0
(signed word) atan2_16::yi#0 yi zp ZP_WORD:22 1.2000000000000002
(signed word) atan2_16::yi#1 yi zp ZP_WORD:22 667.3333333333334
(signed word~) atan2_16::yi#16 yi zp ZP_WORD:22 4.0
(signed word) atan2_16::yi#2 yi zp ZP_WORD:22 667.3333333333334
(signed word) atan2_16::yi#3 yi zp ZP_WORD:22 353.4117647058823
(signed word) atan2_16::yi#8 yi zp ZP_WORD:22 1001.0
(word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num)
(byte~) bsearch16u::$16 reg byte a 2002.0
(word*~) bsearch16u::$2 $2 zp ZP_WORD:30 4.0
(word*~) bsearch16u::$2 $2 zp ZP_WORD:39 4.0
(byte~) bsearch16u::$6 reg byte a 2002.0
(label) bsearch16u::@1
(label) bsearch16u::@2
@ -120,31 +124,31 @@
(label) bsearch16u::@9
(label) bsearch16u::@return
(word*) bsearch16u::items
(word*) bsearch16u::items#0 items zp ZP_WORD:30 1001.0
(word*) bsearch16u::items#1 items zp ZP_WORD:30 2.0
(word*) bsearch16u::items#2 items zp ZP_WORD:30 334.5555555555556
(word*) bsearch16u::items#8 items zp ZP_WORD:30 1501.5
(word*) bsearch16u::items#0 items zp ZP_WORD:39 1001.0
(word*) bsearch16u::items#1 items zp ZP_WORD:39 2.0
(word*) bsearch16u::items#2 items zp ZP_WORD:39 334.5555555555556
(word*) bsearch16u::items#8 items zp ZP_WORD:39 1501.5
(word) bsearch16u::key
(word) bsearch16u::key#0 key zp ZP_WORD:49 0.26666666666666666
(word) bsearch16u::key#0 key zp ZP_WORD:67 0.26666666666666666
(byte) bsearch16u::num
(byte) bsearch16u::num#0 reg byte x 2002.0
(byte) bsearch16u::num#1 reg byte x 2002.0
(byte) bsearch16u::num#3 reg byte x 556.1111111111111
(byte) bsearch16u::num#5 reg byte x 3003.0
(word*) bsearch16u::pivot
(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:51 501.0
(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:69 501.0
(signed word) bsearch16u::result
(signed word) bsearch16u::result#0 result zp ZP_WORD:53 1501.5
(signed word) bsearch16u::result#0 result zp ZP_WORD:71 1501.5
(word*) bsearch16u::return
(word*) bsearch16u::return#1 return zp ZP_WORD:30 2.0
(word*) bsearch16u::return#2 return zp ZP_WORD:30 6.0
(word*) bsearch16u::return#3 return zp ZP_WORD:30 4.0
(word*~) bsearch16u::return#6 return zp ZP_WORD:30 4.0
(word*) bsearch16u::return#1 return zp ZP_WORD:39 2.0
(word*) bsearch16u::return#2 return zp ZP_WORD:39 6.0
(word*) bsearch16u::return#3 return zp ZP_WORD:39 4.0
(word*~) bsearch16u::return#6 return zp ZP_WORD:39 4.0
(byte*) heap_head
(byte*) heap_head#1 heap_head zp ZP_WORD:36 0.6153846153846154
(byte*) heap_head#13 heap_head zp ZP_WORD:36 8.0
(byte*) heap_head#1 heap_head zp ZP_WORD:11 0.17567567567567569
(byte*) heap_head#13 heap_head zp ZP_WORD:11 13.0
(void()) init_angle_screen((byte*) init_angle_screen::screen)
(word~) init_angle_screen::$10 $10 zp ZP_WORD:17 202.0
(word~) init_angle_screen::$10 $10 zp ZP_WORD:26 202.0
(byte~) init_angle_screen::$12 reg byte a 202.0
(byte~) init_angle_screen::$13 reg byte a 202.0
(byte~) init_angle_screen::$14 reg byte a 202.0
@ -157,47 +161,68 @@
(label) init_angle_screen::@4
(label) init_angle_screen::@return
(byte) init_angle_screen::ang_w
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:46 84.16666666666666
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:64 84.16666666666666
(word) init_angle_screen::angle_w
(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:17 202.0
(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:26 202.0
(byte*) init_angle_screen::screen
(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:7 3.0
(byte*) init_angle_screen::screen_bottomline
(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:7 4.0
(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:7 7.333333333333333
(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:7 9.040000000000001
(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:16 7.333333333333333
(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:16 8.959999999999999
(byte*) init_angle_screen::screen_topline
(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:9 2.0
(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:9 5.5
(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:9 9.416666666666666
(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:18 5.5
(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:18 9.333333333333334
(byte) init_angle_screen::x
(byte) init_angle_screen::x#1 x zp ZP_BYTE:11 101.0
(byte) init_angle_screen::x#2 x zp ZP_BYTE:11 25.25
(byte) init_angle_screen::x#1 x zp ZP_BYTE:20 101.0
(byte) init_angle_screen::x#2 x zp ZP_BYTE:20 25.25
(byte) init_angle_screen::xb
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:12 101.0
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:12 19.238095238095237
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:21 101.0
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:21 19.238095238095237
(signed word) init_angle_screen::xw
(word) init_angle_screen::xw#0 xw zp ZP_WORD:42 33.666666666666664
(word) init_angle_screen::xw#0 xw zp ZP_WORD:60 33.666666666666664
(byte) init_angle_screen::y
(byte) init_angle_screen::y#1 y zp ZP_BYTE:6 16.5
(byte) init_angle_screen::y#4 y zp ZP_BYTE:6 4.730769230769231
(byte) init_angle_screen::y#1 y zp ZP_BYTE:15 16.5
(byte) init_angle_screen::y#4 y zp ZP_BYTE:15 4.730769230769231
(signed word) init_angle_screen::yw
(word) init_angle_screen::yw#0 yw zp ZP_WORD:44 50.5
(word) init_angle_screen::yw#0 yw zp ZP_WORD:62 50.5
(void()) init_buckets()
(byte~) init_buckets::$11 reg byte a 22.0
(byte~) init_buckets::$12 reg byte a 22.0
(byte~) init_buckets::$13 reg byte a 22.0
(void*~) init_buckets::$5 $5 zp ZP_WORD:13 5.5
(word~) init_buckets::$9 $9 zp ZP_WORD:58 11.0
(label) init_buckets::@1
(label) init_buckets::@2
(label) init_buckets::@3
(label) init_buckets::@4
(label) init_buckets::@5
(label) init_buckets::@6
(label) init_buckets::@return
(word*) init_buckets::bucket
(word*) init_buckets::bucket#0 bucket zp ZP_WORD:56 5.5
(byte*) init_buckets::dist
(byte*) init_buckets::dist#0 dist zp ZP_WORD:2 4.0
(byte*) init_buckets::dist#1 dist zp ZP_WORD:2 7.333333333333333
(byte*) init_buckets::dist#2 dist zp ZP_WORD:2 23.0
(byte*) init_buckets::dist#1 dist zp ZP_WORD:3 7.333333333333333
(byte*) init_buckets::dist#3 dist#3 zp ZP_WORD:7 7.333333333333333
(byte*) init_buckets::dist#4 dist zp ZP_WORD:3 22.0
(byte*) init_buckets::dist#5 dist#5 zp ZP_WORD:7 4.888888888888889
(byte) init_buckets::distance
(byte) init_buckets::distance#0 distance zp ZP_BYTE:55 7.857142857142857
(byte) init_buckets::i
(byte) init_buckets::i#1 reg byte y 16.5
(byte) init_buckets::i#2 reg byte y 16.5
(byte) init_buckets::i#1 reg byte x 16.5
(byte) init_buckets::i#2 reg byte x 16.5
(word) init_buckets::i1
(word) init_buckets::i1#1 i1 zp ZP_WORD:4 16.5
(word) init_buckets::i1#2 i1 zp ZP_WORD:4 7.333333333333333
(word) init_buckets::i1#1 i1 zp ZP_WORD:5 16.5
(word) init_buckets::i1#2 i1 zp ZP_WORD:5 7.333333333333333
(byte) init_buckets::i2
(byte) init_buckets::i2#1 reg byte x 16.5
(byte) init_buckets::i2#2 reg byte x 7.333333333333333
(byte) init_buckets::i3
(byte) init_buckets::i3#1 reg byte x 16.5
(byte) init_buckets::i3#2 reg byte x 16.5
(word) init_buckets::i4
(word) init_buckets::i4#1 i4 zp ZP_WORD:9 16.5
(word) init_buckets::i4#2 i4 zp ZP_WORD:9 2.2
(byte) init_buckets::idx
(byte) init_buckets::idx#0 reg byte x 11.0
(void()) init_dist_screen((byte*) init_dist_screen::screen)
(byte~) init_dist_screen::$13 reg byte a 202.0
(byte~) init_dist_screen::$15 reg byte a 202.0
@ -207,7 +232,6 @@
(label) init_dist_screen::@10
(label) init_dist_screen::@11
(label) init_dist_screen::@12
(label) init_dist_screen::@13
(label) init_dist_screen::@2
(label) init_dist_screen::@3
(label) init_dist_screen::@4
@ -220,37 +244,35 @@
(byte) init_dist_screen::d
(byte) init_dist_screen::d#0 reg byte a 126.25
(word) init_dist_screen::ds
(word) init_dist_screen::ds#0 ds zp ZP_WORD:49 202.0
(word) init_dist_screen::ds#0 ds zp ZP_WORD:67 202.0
(byte*) init_dist_screen::screen
(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:24 1.5
(byte*) init_dist_screen::screen_bottomline
(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:26 4.0
(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:26 7.333333333333333
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:26 6.848484848484849
(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:35 7.333333333333333
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:35 6.787878787878788
(byte*) init_dist_screen::screen_topline
(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:24 5.5
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:24 7.0625
(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:33 5.5
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:33 7.0
(byte) init_dist_screen::x
(byte) init_dist_screen::x#1 x zp ZP_BYTE:28 101.0
(byte) init_dist_screen::x#2 x zp ZP_BYTE:28 26.578947368421055
(byte) init_dist_screen::x#1 x zp ZP_BYTE:37 101.0
(byte) init_dist_screen::x#2 x zp ZP_BYTE:37 26.578947368421055
(byte) init_dist_screen::x2
(byte) init_dist_screen::x2#0 reg byte a 202.0
(byte) init_dist_screen::xb
(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:29 101.0
(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:29 20.2
(byte) init_dist_screen::xb#1 xb zp ZP_BYTE:38 101.0
(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:38 20.2
(byte) init_dist_screen::xd
(byte) init_dist_screen::xd#0 reg byte a 303.0
(word) init_dist_screen::xds
(word) init_dist_screen::xds#0 xds zp ZP_WORD:49 202.0
(word) init_dist_screen::xds#0 xds zp ZP_WORD:67 202.0
(byte) init_dist_screen::y
(byte) init_dist_screen::y#1 y zp ZP_BYTE:23 16.5
(byte) init_dist_screen::y#10 y zp ZP_BYTE:23 0.9705882352941178
(byte) init_dist_screen::y#1 y zp ZP_BYTE:32 16.5
(byte) init_dist_screen::y#10 y zp ZP_BYTE:32 0.9705882352941178
(byte) init_dist_screen::y2
(byte) init_dist_screen::y2#0 reg byte a 22.0
(byte) init_dist_screen::yd
(byte) init_dist_screen::yd#0 reg byte a 33.0
(word) init_dist_screen::yds
(word) init_dist_screen::yds#0 yds zp ZP_WORD:47 4.869565217391305
(word) init_dist_screen::yds#0 yds zp ZP_WORD:65 4.869565217391305
(void()) init_squares()
(byte~) init_squares::$3 reg byte a 22.0
(byte~) init_squares::$4 reg byte a 22.0
@ -261,101 +283,162 @@
(byte) init_squares::i#1 reg byte x 16.5
(byte) init_squares::i#2 reg byte x 5.5
(word) init_squares::sqr
(word) init_squares::sqr#1 sqr zp ZP_WORD:32 7.333333333333333
(word) init_squares::sqr#2 sqr zp ZP_WORD:32 6.6000000000000005
(word) init_squares::sqr#1 sqr zp ZP_WORD:41 7.333333333333333
(word) init_squares::sqr#2 sqr zp ZP_WORD:41 6.6000000000000005
(word*) init_squares::squares
(word*) init_squares::squares#0 squares zp ZP_WORD:34 4.0
(word*) init_squares::squares#1 squares zp ZP_WORD:34 3.6666666666666665
(word*) init_squares::squares#2 squares zp ZP_WORD:34 17.5
(word*) init_squares::squares#0 squares zp ZP_WORD:43 4.0
(word*) init_squares::squares#1 squares zp ZP_WORD:43 3.6666666666666665
(word*) init_squares::squares#2 squares zp ZP_WORD:43 17.5
(void()) main()
(byte~) main::$15 reg byte a 22.0
(byte~) main::$16 reg byte a 202.0
(byte~) main::$17 reg byte a 22.0
(byte~) main::$18 reg byte a 202.0
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@14
(label) main::@2
(label) main::@return
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(word*) main::bucket
(word*) main::bucket#0 bucket zp ZP_WORD:46 16.0
(word*) main::bucket1
(word*) main::bucket1#0 bucket1 zp ZP_WORD:51 16.0
(byte) main::bucket_idx
(byte) main::bucket_idx#1 bucket_idx zp ZP_BYTE:2 11.0
(byte) main::bucket_idx#11 bucket_idx zp ZP_BYTE:2 3.142857142857143
(byte) main::bucket_idx#6 bucket_idx zp ZP_BYTE:2 3.6666666666666665
(byte) main::bucket_size
(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:45 12.3
(byte) main::bucket_size1
(byte) main::bucket_size1#0 bucket_size1 zp ZP_BYTE:50 12.3
(byte) main::i
(byte) main::i#1 reg byte x 151.5
(byte) main::i#2 reg byte x 75.75
(byte) main::i1
(byte) main::i1#1 reg byte x 151.5
(byte) main::i1#2 reg byte x 75.75
(byte*) main::sc
(byte*) main::sc#0 sc zp ZP_WORD:48 202.0
(byte*) main::sc1
(byte*) main::sc1#0 sc1 zp ZP_WORD:53 202.0
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
(byte*) malloc::mem#0 mem zp ZP_WORD:38 0.5714285714285714
(byte*) malloc::mem#0 mem zp ZP_WORD:13 0.8
(void*) malloc::return
(word) malloc::size
(word) malloc::size#4 size zp ZP_WORD:38 2.0
(word) malloc::size#1 size zp ZP_WORD:13 22.0
(word) malloc::size#2 size zp ZP_WORD:13 13.0
(word()) sqr((byte) sqr::val)
(byte~) sqr::$0 reg byte a 4.0
(label) sqr::@return
(word) sqr::return
(word) sqr::return#0 return zp ZP_WORD:49 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:47 22.0
(word) sqr::return#3 return zp ZP_WORD:49 202.0
(word) sqr::return#0 return zp ZP_WORD:67 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:65 22.0
(word) sqr::return#3 return zp ZP_WORD:67 202.0
(byte) sqr::val
(byte) sqr::val#0 reg byte a 22.0
(byte) sqr::val#1 reg byte a 202.0
(byte) sqr::val#2 reg byte a 114.0
(byte()) sqrt((word) sqrt::val)
(word~) sqrt::$1 $1 zp ZP_WORD:30 2.0
(word~) sqrt::$3 $3 zp ZP_WORD:30 4.0
(word~) sqrt::$1 $1 zp ZP_WORD:39 2.0
(word~) sqrt::$3 $3 zp ZP_WORD:39 4.0
(label) sqrt::@1
(label) sqrt::@return
(word*) sqrt::found
(word*) sqrt::found#0 found zp ZP_WORD:30 4.0
(word*) sqrt::found#0 found zp ZP_WORD:39 4.0
(byte) sqrt::return
(byte) sqrt::return#0 reg byte a 34.33333333333333
(byte) sqrt::return#2 reg byte a 202.0
(byte) sqrt::sq
(word) sqrt::val
(word) sqrt::val#0 val zp ZP_WORD:49 103.0
(word) sqrt::val#0 val zp ZP_WORD:67 103.0
reg byte y [ init_buckets::i#2 init_buckets::i#1 ]
zp ZP_WORD:2 [ init_buckets::dist#2 init_buckets::dist#0 init_buckets::dist#1 SCREEN_DIST#0 ]
zp ZP_WORD:4 [ init_buckets::i1#2 init_buckets::i1#1 ]
zp ZP_BYTE:6 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
zp ZP_WORD:7 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 SCREEN_ANGLE#0 ]
zp ZP_WORD:9 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ]
zp ZP_BYTE:11 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
zp ZP_BYTE:12 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
zp ZP_WORD:13 [ 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 [ 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_BYTE:2 [ main::bucket_idx#11 main::bucket_idx#6 main::bucket_idx#1 ]
reg byte x [ main::i#2 main::i#1 ]
reg byte x [ main::i1#2 main::i1#1 ]
reg byte x [ init_buckets::i#2 init_buckets::i#1 ]
zp ZP_WORD:3 [ init_buckets::dist#4 init_buckets::dist#1 ]
zp ZP_WORD:5 [ init_buckets::i1#2 init_buckets::i1#1 ]
reg byte x [ init_buckets::i2#2 init_buckets::i2#1 ]
reg byte x [ init_buckets::i3#2 init_buckets::i3#1 ]
zp ZP_WORD:7 [ init_buckets::dist#5 init_buckets::dist#3 ]
zp ZP_WORD:9 [ init_buckets::i4#2 init_buckets::i4#1 ]
zp ZP_WORD:11 [ heap_head#13 heap_head#1 ]
zp ZP_WORD:13 [ malloc::size#2 malloc::size#1 malloc::mem#0 init_buckets::$5 SQUARES#1 ]
zp ZP_BYTE:15 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
zp ZP_WORD:16 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ]
zp ZP_WORD:18 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
zp ZP_BYTE:20 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
zp ZP_BYTE:21 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
zp ZP_WORD:22 [ 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:24 [ 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:17 [ 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 init_angle_screen::angle_w#0 init_angle_screen::$10 ]
zp ZP_WORD:26 [ 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 init_angle_screen::angle_w#0 init_angle_screen::$10 ]
reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
zp ZP_WORD:19 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
zp ZP_WORD:21 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
zp ZP_BYTE:23 [ init_dist_screen::y#10 init_dist_screen::y#1 ]
zp ZP_WORD:24 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ]
zp ZP_WORD:26 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 init_dist_screen::screen_bottomline#0 ]
zp ZP_WORD:28 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
zp ZP_WORD:30 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
zp ZP_BYTE:32 [ init_dist_screen::y#10 init_dist_screen::y#1 ]
zp ZP_WORD:33 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ]
zp ZP_WORD:35 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ]
reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ]
zp ZP_BYTE:28 [ init_dist_screen::x#2 init_dist_screen::x#1 ]
zp ZP_BYTE:29 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ]
zp ZP_BYTE:37 [ init_dist_screen::x#2 init_dist_screen::x#1 ]
zp ZP_BYTE:38 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ]
reg byte a [ init_dist_screen::xd#0 init_dist_screen::$15 init_dist_screen::$13 ]
zp ZP_WORD:30 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ]
zp ZP_WORD:39 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#1 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 sqrt::found#0 sqrt::$3 sqrt::$1 ]
reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ]
reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ]
zp ZP_WORD:32 [ init_squares::sqr#2 init_squares::sqr#1 ]
zp ZP_WORD:34 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ]
zp ZP_WORD:41 [ init_squares::sqr#2 init_squares::sqr#1 ]
zp ZP_WORD:43 [ init_squares::squares#2 init_squares::squares#1 init_squares::squares#0 ]
reg byte x [ init_squares::i#2 init_squares::i#1 ]
zp ZP_WORD:36 [ heap_head#13 heap_head#1 ]
zp ZP_WORD:38 [ malloc::size#4 malloc::mem#0 SQUARES#1 ]
zp ZP_WORD:40 [ BUCKET_SIZES#0 ]
zp ZP_BYTE:45 [ main::bucket_size#0 ]
reg byte a [ main::$15 ]
zp ZP_WORD:46 [ main::bucket#0 ]
reg byte a [ main::$16 ]
zp ZP_WORD:48 [ main::sc#0 ]
zp ZP_BYTE:50 [ main::bucket_size1#0 ]
reg byte a [ main::$17 ]
zp ZP_WORD:51 [ main::bucket1#0 ]
reg byte a [ main::$18 ]
zp ZP_WORD:53 [ main::sc1#0 ]
reg byte a [ init_buckets::$11 ]
zp ZP_BYTE:55 [ init_buckets::distance#0 ]
reg byte a [ init_buckets::$12 ]
zp ZP_WORD:56 [ init_buckets::bucket#0 ]
reg byte x [ init_buckets::idx#0 ]
zp ZP_WORD:58 [ init_buckets::$9 ]
reg byte a [ init_buckets::$13 ]
reg byte a [ init_angle_screen::$2 ]
reg byte a [ init_angle_screen::$3 ]
zp ZP_WORD:42 [ init_angle_screen::xw#0 atan2_16::x#0 ]
zp ZP_WORD:60 [ init_angle_screen::xw#0 atan2_16::x#0 ]
reg byte a [ init_angle_screen::$6 ]
zp ZP_WORD:44 [ init_angle_screen::yw#0 atan2_16::y#0 ]
zp ZP_BYTE:46 [ init_angle_screen::ang_w#0 ]
zp ZP_WORD:62 [ init_angle_screen::yw#0 atan2_16::y#0 ]
zp ZP_BYTE:64 [ init_angle_screen::ang_w#0 ]
reg byte a [ init_angle_screen::$12 ]
reg byte a [ init_angle_screen::$13 ]
reg byte a [ init_angle_screen::$14 ]
reg byte a [ atan2_16::$24 ]
reg byte a [ atan2_16::$23 ]
reg byte a [ init_dist_screen::y2#0 ]
zp ZP_WORD:47 [ sqr::return#2 init_dist_screen::yds#0 ]
zp ZP_WORD:65 [ sqr::return#2 init_dist_screen::yds#0 ]
reg byte a [ init_dist_screen::x2#0 ]
zp ZP_WORD:49 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ]
zp ZP_WORD:67 [ sqr::return#3 init_dist_screen::xds#0 sqr::return#0 init_dist_screen::ds#0 sqrt::val#0 bsearch16u::key#0 ]
reg byte a [ sqrt::return#2 ]
reg byte a [ init_dist_screen::d#0 ]
reg byte a [ sqrt::return#0 ]
reg byte a [ bsearch16u::$6 ]
reg byte a [ bsearch16u::$16 ]
zp ZP_WORD:51 [ bsearch16u::pivot#0 ]
zp ZP_WORD:53 [ bsearch16u::result#0 ]
zp ZP_WORD:69 [ bsearch16u::pivot#0 ]
zp ZP_WORD:71 [ bsearch16u::result#0 ]
reg byte a [ sqr::$0 ]
reg byte a [ init_squares::$3 ]
reg byte a [ init_squares::$4 ]