1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-27 04:49:27 +00:00

Fixed tests.

This commit is contained in:
jespergravgaard 2019-07-09 00:51:54 +02:00
parent f8b4dde791
commit b5222c7929
9 changed files with 8414 additions and 558 deletions

View File

@ -50,7 +50,7 @@ void main() {
}
// Array containing the bucket size for each of the 256 buckets
const word* BUCKET_SIZES = malloc(0x80*sizeof(word));
const byte* BUCKET_SIZES = malloc(0x80);
void init_buckets() {
// Init bucket sizes to 0
@ -67,7 +67,6 @@ void init_buckets() {
// Populates 1000 bytes (a screen) with values representing the angle to the center.
// Utilizes symmetry around the center
void init_angle_screen(byte* screen) {
/*
byte* screen_topline = screen+40*12;
byte *screen_bottomline = screen+40*12;
for(byte y: 0..12) {
@ -84,13 +83,11 @@ void init_angle_screen(byte* screen) {
screen_topline -= 40;
screen_bottomline += 40;
}
*/
}
// Populates 1000 bytes (a screen) with values representing the distance to the center.
// The actual value stored is distance*2 to increase precision
void init_dist_screen(byte* screen) {
/*
NUM_SQUARES = 0x30;
init_squares();
byte* screen_topline = screen;
@ -113,5 +110,4 @@ void init_dist_screen(byte* screen) {
screen_topline += 40;
screen_bottomline -= 40;
}
*/
}

View File

@ -1,4 +1,5 @@
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
Warning! Adding boolean cast to non-boolean sub-expression (byte) frame_cnt

View File

@ -1,4 +1,5 @@
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab

View File

@ -1,4 +1,5 @@
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference frame_cnt to (byte) frame_cnt
Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq()
Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab
Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab

View File

@ -280,6 +280,7 @@ SYMBOL TABLE SSA
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
Adding number conversion cast (unumber) $3e8 in (byte*~) print_cls::$0 ← (byte*) print_screen#2 + (number) $3e8
Adding number conversion cast (unumber) 1 in *((byte[]) txt#0 + (number) 1) ← ++ *((byte[]) txt#0 + (number) 1)
Adding number conversion cast (unumber) 1 in *((byte[]) txt#0 + (number) 1) ← ++ *((byte[]) txt#0 + (unumber)(number) 1)
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
Successful SSA optimization Pass2InlineCast
@ -287,10 +288,12 @@ Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast $28
Simplifying constant integer cast $3e8
Simplifying constant integer cast 1
Simplifying constant integer cast 1
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) $28
Finalized unsigned number type (word) $3e8
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 1
Successful SSA optimization PassNFinalizeNumberTypeConversions
Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#22 (byte*) print_char_cursor#28 (byte*) print_screen#6 (byte*) print_line_cursor#20 (byte*) print_char_cursor#26 (byte*) print_screen#5
Alias (byte*) print_str::str#2 = (byte*) print_str::str#3

View File

@ -6,11 +6,17 @@
.const SIZEOF_WORD = 2
// Start of the heap used by malloc()
.label HEAP_START = $c000
.label heap_head = 6
// The number of iterations performed during 16-bit CORDIC atan2 calculation
.const CORDIC_ITERATIONS_16 = $f
.const NUM_SQUARES = $30
.label heap_head = $24
.label SQUARES = $37
// 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 = $a
.label BUCKET_SIZES = $28
bbegin:
lda #<$3e8
sta malloc.size
@ -30,14 +36,26 @@ bbegin:
lda #>$3e8
sta malloc.size+1
jsr malloc
lda #$80*SIZEOF_WORD
lda malloc.mem
sta SCREEN_ANGLE
lda malloc.mem+1
sta SCREEN_ANGLE+1
lda #$80
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
main: {
lda SCREEN_DIST
sta init_dist_screen.screen
lda SCREEN_DIST+1
sta init_dist_screen.screen+1
jsr init_dist_screen
jsr init_angle_screen
jsr init_buckets
@ -46,18 +64,13 @@ main: {
init_buckets: {
.label dist = 2
.label i1 = 4
ldx #0
ldy #0
// Init bucket sizes to 0
b1:
txa
asl
tay
lda #<0
lda #0
sta (BUCKET_SIZES),y
iny
sta (BUCKET_SIZES),y
inx
cpx #$80
cpy #$80
bne b1
// first find bucket sizes - by counting number of chars with each distance value
sta i1
@ -65,18 +78,11 @@ init_buckets: {
b3:
ldy #0
lda (dist),y
asl
tay
lda (BUCKET_SIZES),y
clc
adc #1
sta (BUCKET_SIZES),y
bne !+
iny
lda (BUCKET_SIZES),y
adc #0
sta (BUCKET_SIZES),y
!:
inc dist
bne !+
inc dist+1
@ -95,20 +101,568 @@ init_buckets: {
}
// 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
sta screen_topline
lda screen+1
adc #>$28*$c
sta screen_topline+1
clc
lda screen_bottomline
adc #<$28*$c
sta screen_bottomline
lda screen_bottomline+1
adc #>$28*$c
sta screen_bottomline+1
lda #0
sta y
b1:
lda #$27
sta xb
lda #0
sta x
b2:
lda x
asl
eor #$ff
clc
adc #$27+1
ldy #0
sta xw+1
sty xw
lda y
asl
sta yw+1
sty yw
jsr atan2_16
lda #$80
clc
adc _10
sta _10
bcc !+
inc _10+1
!:
lda _10+1
sta ang_w
ldy xb
sta (screen_bottomline),y
eor #$ff
clc
adc #1
sta (screen_topline),y
lda #$80
clc
adc ang_w
ldy x
sta (screen_topline),y
lda #$80
sec
sbc ang_w
sta (screen_bottomline),y
inc x
dec xb
lda x
cmp #$13+1
bcc b2
lda screen_topline
sec
sbc #<$28
sta screen_topline
lda screen_topline+1
sbc #>$28
sta screen_topline+1
lda #$28
clc
adc screen_bottomline
sta screen_bottomline
bcc !+
inc screen_bottomline+1
!:
inc y
lda #$d
cmp y
bne b1
rts
}
// 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: {
.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
lda y+1
bmi !b1+
jmp b1
!b1:
sec
lda #0
sbc y
sta _2
lda #0
sbc y+1
sta _2+1
b3:
lda x+1
bmi !b4+
jmp b4
!b4:
sec
lda #0
sbc x
sta _7
lda #0
sbc x+1
sta _7+1
b6:
lda #0
sta angle
sta angle+1
tax
b10:
lda yi+1
bne b11
lda yi
bne b11
b12:
lsr angle+1
ror angle
lda x+1
bpl b7
sec
lda #<$8000
sbc angle
sta angle
lda #>$8000
sbc angle+1
sta angle+1
b7:
lda y+1
bpl b8
sec
lda #0
sbc angle
sta angle
lda #0
sbc angle+1
sta angle+1
b8:
rts
b11:
txa
tay
lda xi
sta xd
lda xi+1
sta xd+1
lda yi
sta yd
lda yi+1
sta yd+1
b13:
cpy #2
bcs b14
cpy #0
beq b17
lda xd+1
cmp #$80
ror xd+1
ror xd
lda yd+1
cmp #$80
ror yd+1
ror yd
b17:
lda yi+1
bpl b18
lda xi
sec
sbc yd
sta xi
lda xi+1
sbc yd+1
sta xi+1
lda yi
clc
adc xd
sta yi
lda yi+1
adc xd+1
sta yi+1
txa
asl
tay
sec
lda angle
sbc CORDIC_ATAN2_ANGLES_16,y
sta angle
lda angle+1
sbc CORDIC_ATAN2_ANGLES_16+1,y
sta angle+1
b19:
inx
cpx #CORDIC_ITERATIONS_16-1+1
bne !b12+
jmp b12
!b12:
jmp b10
b18:
lda xi
clc
adc yd
sta xi
lda xi+1
adc yd+1
sta xi+1
lda yi
sec
sbc xd
sta yi
lda yi+1
sbc xd+1
sta yi+1
txa
asl
tay
clc
lda angle
adc CORDIC_ATAN2_ANGLES_16,y
sta angle
lda angle+1
adc CORDIC_ATAN2_ANGLES_16+1,y
sta angle+1
jmp b19
b14:
lda xd+1
cmp #$80
ror xd+1
ror xd
lda xd+1
cmp #$80
ror xd+1
ror xd
lda yd+1
cmp #$80
ror yd+1
ror yd
lda yd+1
cmp #$80
ror yd+1
ror yd
dey
dey
jmp b13
b4:
lda x
sta xi
lda x+1
sta xi+1
jmp b6
b1:
lda y
sta yi
lda y+1
sta yi+1
jmp b3
}
// 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
jsr init_squares
lda screen
clc
adc #<$28*$18
sta screen_bottomline
lda screen+1
adc #>$28*$18
sta screen_bottomline+1
lda #0
sta y
b1:
lda y
asl
cmp #$18
bcs b2
eor #$ff
clc
adc #$18+1
b4:
jsr sqr
lda sqr.return
sta sqr.return_2
lda sqr.return+1
sta sqr.return_2+1
lda #$27
sta xb
lda #0
sta x
b5:
lda x
asl
cmp #$27
bcs b6
eor #$ff
clc
adc #$27+1
b8:
jsr sqr
lda ds
clc
adc yds
sta ds
lda ds+1
adc yds+1
sta ds+1
jsr sqrt
ldy x
sta (screen_topline),y
sta (screen_bottomline),y
ldy xb
sta (screen_topline),y
sta (screen_bottomline),y
inc x
dec xb
lda x
cmp #$13+1
bcc b5
lda #$28
clc
adc screen_topline
sta screen_topline
bcc !+
inc screen_topline+1
!:
lda screen_bottomline
sec
sbc #<$28
sta screen_bottomline
lda screen_bottomline+1
sbc #>$28
sta screen_bottomline+1
inc y
lda #$d
cmp y
bne b1
rts
b6:
sec
sbc #$27
jmp b8
b2:
sec
sbc #$18
jmp b4
}
// 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: {
.label _1 = $1e
.label _3 = $1e
.label found = $1e
.label val = $31
lda SQUARES
sta bsearch16u.items
lda SQUARES+1
sta bsearch16u.items+1
jsr bsearch16u
lda _3
sec
sbc SQUARES
sta _3
lda _3+1
sbc SQUARES+1
sta _3+1
lsr _1+1
ror _1
lda _1
rts
}
// Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key.
// - key - The value to look for
// - 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: {
.label _2 = $1e
.label pivot = $33
.label result = $35
.label return = $1e
.label items = $1e
.label key = $31
ldx #NUM_SQUARES
b3:
cpx #0
bne b4
ldy #1
lda (items),y
cmp key+1
bne !+
dey
lda (items),y
cmp key
beq b2
!:
bcc b2
lda _2
sec
sbc #<1*SIZEOF_WORD
sta _2
lda _2+1
sbc #>1*SIZEOF_WORD
sta _2+1
b2:
rts
b4:
txa
lsr
asl
clc
adc items
sta pivot
lda #0
adc items+1
sta pivot+1
sec
lda key
ldy #0
sbc (pivot),y
sta result
lda key+1
iny
sbc (pivot),y
sta result+1
bne b6
lda result
bne b6
lda pivot
sta return
lda pivot+1
sta return+1
rts
b6:
lda result+1
bmi b7
bne !+
lda result
beq b7
!:
lda #1*SIZEOF_WORD
clc
adc pivot
sta items
lda #0
adc pivot+1
sta items+1
dex
b7:
txa
lsr
tax
jmp b3
}
// Find the square of a byte value
// 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
asl
tay
lda (SQUARES),y
sta return
iny
lda (SQUARES),y
sta return+1
rts
}
// Initialize squares table
// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1
init_squares: {
.label squares = $22
.label sqr = $20
lda #NUM_SQUARES*SIZEOF_WORD
sta malloc.size
lda #0
sta malloc.size+1
jsr malloc
lda SQUARES
sta squares
lda SQUARES+1
sta squares+1
ldx #0
txa
sta sqr
sta sqr+1
b1:
ldy #0
lda sqr
sta (squares),y
iny
lda sqr+1
sta (squares),y
lda #SIZEOF_WORD
clc
adc squares
sta squares
bcc !+
inc squares+1
!:
txa
asl
clc
adc #1
clc
adc sqr
sta sqr
bcc !+
inc sqr+1
!:
inx
cpx #NUM_SQUARES-1+1
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(8) size)
// malloc(word zeropage($26) size)
malloc: {
.label mem = $a
.label size = 8
.label mem = $37
.label size = $26
lda heap_head
sta mem
lda heap_head+1
@ -122,3 +676,8 @@ malloc: {
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

View File

@ -8,42 +8,44 @@
@4: scope:[] from @1
[3] (void*) SCREEN_DIST#0 ← (void*)(byte*) malloc::mem#0
[4] call malloc
to:@2
@2: scope:[] from @4
[5] phi()
[6] call malloc
to:@5
@5: scope:[] from @2
[7] (void*) BUCKET_SIZES#0 ← (void*)(byte*) malloc::mem#0
@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 @5
[8] phi()
[9] call main
@3: scope:[] from @6
[9] phi()
[10] call main
to:@end
@end: scope:[] from @3
[10] phi()
main: scope:[main] from @3
[11] phi()
[12] call init_dist_screen
main: scope:[main] from @3
[12] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0
[13] call init_dist_screen
to:main::@1
main::@1: scope:[main] from main
[13] phi()
[14] call init_angle_screen
[14] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0
[15] call init_angle_screen
to:main::@2
main::@2: scope:[main] from main::@1
[15] phi()
[16] call init_buckets
[16] phi()
[17] call init_buckets
to:main::@return
main::@return: scope:[main] from main::@2
[17] return
[18] return
to:@return
init_buckets: scope:[init_buckets] from main::@2
[18] phi()
[19] phi()
to:init_buckets::@1
init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1
[19] (byte) init_buckets::i#2 ← phi( init_buckets/(byte) 0 init_buckets::@1/(byte) init_buckets::i#1 )
[20] (byte~) init_buckets::$2 ← (byte) init_buckets::i#2 << (byte) 1
[21] *((word*)(void*) BUCKET_SIZES#0 + (byte~) init_buckets::$2) ← (byte) 0
[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!=(byte) $80) goto init_buckets::@1
to:init_buckets::@2
@ -53,33 +55,325 @@ init_buckets::@2: scope:[init_buckets] from init_buckets::@1
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~) init_buckets::$3 ← *((byte*) init_buckets::dist#2) << (byte) 1
[27] *((word*)(void*) BUCKET_SIZES#0 + (byte~) init_buckets::$3) ← ++ *((word*)(void*) BUCKET_SIZES#0 + (byte~) init_buckets::$3)
[28] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#2
[29] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2
[30] if((word) init_buckets::i1#1!=(word) $3e8) goto init_buckets::@3
[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
to:init_buckets::@return
init_buckets::@return: scope:[init_buckets] from init_buckets::@3
[31] return
[30] return
to:@return
init_angle_screen: scope:[init_angle_screen] from main::@1
[32] phi()
[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
[33] 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
[34] phi()
[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
[35] return
init_dist_screen::@return: scope:[init_dist_screen] from init_dist_screen::@9
[142] return
to:@return
malloc: scope:[malloc] from @1 @2 @4
[36] (word) malloc::size#3 ← phi( @4/(word) $3e8 @1/(word) $3e8 @2/(byte) $80*(const byte) SIZEOF_WORD )
[36] (byte*) heap_head#6 ← phi( @4/(byte*) heap_head#1 @1/(const byte*) HEAP_START#0 @2/(byte*) heap_head#1 )
[37] (byte*) malloc::mem#0 ← (byte*) heap_head#6
[38] (byte*) heap_head#1 ← (byte*) heap_head#6 + (word) malloc::size#3
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/(byte) $80 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_START#0 @2/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 )
[191] (byte*) malloc::mem#0 ← (byte*) heap_head#13
[192] (byte*) heap_head#1 ← (byte*) heap_head#13 + (word) malloc::size#4
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[39] return
[193] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -3,25 +3,184 @@
(label) @3
(label) @4
(label) @5
(label) @6
(label) @begin
(label) @end
(word*) BUCKET_SIZES
(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:10 0.1
(byte*) BUCKET_SIZES
(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:40 0.1111111111111111
(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16
(const word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16#0 CORDIC_ATAN2_ANGLES_16 = kickasm {{ .for (var i=0; i<CORDIC_ITERATIONS_16; i++)
.word 256*2*256*atan(1/pow(2,i))/PI/2
}}
(byte) CORDIC_ITERATIONS_16
(const byte) CORDIC_ITERATIONS_16#0 CORDIC_ITERATIONS_16 = (byte) $f
(byte*) HEAP_START
(const byte*) HEAP_START#0 HEAP_START = (byte*) 49152
(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_WORD SIZEOF_WORD = (byte) 2
(word*) SQUARES
(void*) SQUARES#1 SQUARES zp ZP_WORD:55 0.03225806451612903
(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
(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
(label) atan2_16::@1
(label) atan2_16::@10
(label) atan2_16::@11
(label) atan2_16::@12
(label) atan2_16::@13
(label) atan2_16::@14
(label) atan2_16::@15
(label) atan2_16::@16
(label) atan2_16::@17
(label) atan2_16::@18
(label) atan2_16::@19
(label) atan2_16::@2
(label) atan2_16::@20
(label) atan2_16::@21
(label) atan2_16::@3
(label) atan2_16::@4
(label) atan2_16::@5
(label) atan2_16::@6
(label) atan2_16::@7
(label) atan2_16::@8
(label) atan2_16::@9
(label) atan2_16::@return
(word) atan2_16::angle
(word) atan2_16::angle#1 angle zp ZP_WORD: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
(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
(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::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::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::y
(signed word) atan2_16::y#0 y zp ZP_WORD:44 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::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
(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
(byte~) bsearch16u::$6 reg byte a 2002.0
(label) bsearch16u::@1
(label) bsearch16u::@2
(label) bsearch16u::@3
(label) bsearch16u::@4
(label) bsearch16u::@5
(label) bsearch16u::@6
(label) bsearch16u::@7
(label) bsearch16u::@8
(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::key
(word) bsearch16u::key#0 key zp ZP_WORD:49 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
(signed word) bsearch16u::result
(signed word) bsearch16u::result#0 result zp ZP_WORD:53 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
(byte*) heap_head
(byte*) heap_head#1 heap_head zp ZP_WORD:6 1.0
(byte*) heap_head#6 heap_head zp ZP_WORD:6 4.0
(byte*) heap_head#1 heap_head zp ZP_WORD:36 0.6153846153846154
(byte*) heap_head#13 heap_head zp ZP_WORD:36 5.0
(void()) init_angle_screen((byte*) init_angle_screen::screen)
(word~) init_angle_screen::$10 $10 zp ZP_WORD:17 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
(byte~) init_angle_screen::$2 reg byte a 202.0
(byte~) init_angle_screen::$3 reg byte a 202.0
(byte~) init_angle_screen::$6 reg byte a 202.0
(label) init_angle_screen::@1
(label) init_angle_screen::@2
(label) init_angle_screen::@3
(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
(word) init_angle_screen::angle_w
(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:17 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_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::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::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
(signed word) init_angle_screen::xw
(word) init_angle_screen::xw#0 xw zp ZP_WORD:42 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
(signed word) init_angle_screen::yw
(word) init_angle_screen::yw#0 yw zp ZP_WORD:44 50.5
(void()) init_buckets()
(byte~) init_buckets::$2 reg byte a 22.0
(byte~) init_buckets::$3 reg byte a 33.0
(label) init_buckets::@1
(label) init_buckets::@2
(label) init_buckets::@3
@ -29,16 +188,82 @@
(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 11.666666666666666
(byte*) init_buckets::dist#2 dist zp ZP_WORD:2 23.0
(byte) init_buckets::i
(byte) init_buckets::i#1 reg byte x 16.5
(byte) init_buckets::i#2 reg byte x 11.0
(byte) init_buckets::i#1 reg byte y 16.5
(byte) init_buckets::i#2 reg byte y 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 5.5
(word) init_buckets::i1#2 i1 zp ZP_WORD:4 7.333333333333333
(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
(byte~) init_dist_screen::$5 reg byte a 22.0
(byte~) init_dist_screen::$7 reg byte a 22.0
(label) init_dist_screen::@1
(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
(label) init_dist_screen::@5
(label) init_dist_screen::@6
(label) init_dist_screen::@7
(label) init_dist_screen::@8
(label) init_dist_screen::@9
(label) init_dist_screen::@return
(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
(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_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::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::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::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
(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::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
(void()) init_squares()
(byte~) init_squares::$3 reg byte a 22.0
(byte~) init_squares::$4 reg byte a 22.0
(label) init_squares::@1
(label) init_squares::@2
(label) init_squares::@return
(byte) init_squares::i
(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::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
(void()) main()
(label) main::@1
(label) main::@2
@ -46,16 +271,89 @@
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
(byte*) malloc::mem#0 mem zp ZP_WORD:10 0.4
(byte*) malloc::mem#0 mem zp ZP_WORD:55 0.2857142857142857
(void*) malloc::return
(word) malloc::size
(word) malloc::size#3 size zp ZP_WORD:8 1.0
(word) malloc::size#4 size zp ZP_WORD:38 1.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
(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
(label) sqrt::@1
(label) sqrt::@return
(word*) sqrt::found
(word*) sqrt::found#0 found zp ZP_WORD:30 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
reg byte x [ init_buckets::i#2 init_buckets::i#1 ]
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_WORD:6 [ heap_head#6 heap_head#1 ]
zp ZP_WORD:8 [ malloc::size#3 ]
zp ZP_WORD:10 [ BUCKET_SIZES#0 malloc::mem#0 ]
reg byte a [ init_buckets::$2 ]
reg byte a [ init_buckets::$3 ]
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 ]
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 ]
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 ]
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 ]
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 ]
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 ]
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 ]
zp ZP_WORD:40 [ BUCKET_SIZES#0 ]
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 ]
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 ]
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 ]
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 ]
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 ]
reg byte a [ sqr::$0 ]
zp ZP_WORD:55 [ SQUARES#1 malloc::mem#0 ]
reg byte a [ init_squares::$3 ]
reg byte a [ init_squares::$4 ]