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

Moved back to malloc() based impl.

This commit is contained in:
jespergravgaard 2019-07-10 12:07:06 +02:00
parent fe0f0f9a1c
commit 62d7ecbeff
5 changed files with 4334 additions and 3459 deletions

View File

@ -7,9 +7,9 @@ import "sqr"
import "atan2"
// Screen containing distance to center
const byte[1000] SCREEN_DIST; // = malloc(1000);
const byte[] SCREEN_DIST = malloc(1000);
// Screen containing angle to center
const byte[1000] SCREEN_ANGLE; // = malloc(1000);
const byte[] SCREEN_ANGLE= malloc(1000);
// Screen containing angle to center
const byte* SCREEN_FILL = 0x0400;
@ -70,15 +70,15 @@ void main() {
const byte NUM_BUCKETS = 0x30;
// Array containing the bucket size for each of the distance buckets
const byte[NUM_BUCKETS] BUCKET_SIZES; // = malloc(NUM_BUCKETS*sizeof(byte));
const byte[] 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*));
const word*[] 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));
const byte[] BUCKET_IDX = malloc(NUM_BUCKETS*sizeof(byte));
// Initialize buckets containing indices of chars on the screen with specific distances to the center.
void init_buckets(byte* screen) {

View File

@ -1,9 +1,11 @@
// 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(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
.const SIZEOF_WORD = 2
.const SIZEOF_BYTE = 1
.const SIZEOF_POINTER = 2
.label RASTER = $d012
.label BORDERCOL = $d020
// Color Ram
@ -12,7 +14,6 @@
.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
// Char to fill with
@ -22,20 +23,92 @@
.const NUM_SQUARES = $30
.label heap_head = $12
.label SQUARES = $14
// Screen containing distance to center
.label SCREEN_DIST = $34
// Screen containing angle to center
.label SCREEN_ANGLE = $36
// Array containing the bucket size for each of the distance buckets
.label BUCKET_SIZES = $38
// 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]
.label BUCKETS = $3a
// Current index into each bucket. Used while populating the buckets. (After population the end the values will be equal to the bucket sizes)
.label BUCKET_IDX = $3c
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
lda #NUM_BUCKETS*SIZEOF_POINTER
sta malloc.size
lda #0
sta malloc.size+1
jsr malloc
lda malloc.mem
sta BUCKETS
lda malloc.mem+1
sta BUCKETS+1
lda #NUM_BUCKETS*SIZEOF_BYTE
sta malloc.size
lda #0
sta malloc.size+1
jsr malloc
lda malloc.mem
sta BUCKET_IDX
lda malloc.mem+1
sta BUCKET_IDX+1
jsr main
rts
main: {
.label bucket = $34
.label bucket_size = $36
.label bucket = $3e
.label bucket_size = $40
.label bucket_idx = 2
.label offset = 6
.label fill = $37
.label angle = $39
.label fill = $41
.label angle = $43
.label min_angle = 3
.label fill1 = 6
.label min_offset = 6
.label min_offset_5 = 4
.label min_offset_7 = 4
sei
lda SCREEN_DIST
sta init_dist_screen.screen
lda SCREEN_DIST+1
sta init_dist_screen.screen+1
jsr init_dist_screen
lda SCREEN_ANGLE
sta init_angle_screen.screen
lda SCREEN_ANGLE+1
sta init_angle_screen.screen+1
jsr init_angle_screen
jsr init_buckets
lda #0
@ -48,12 +121,13 @@ main: {
lda bucket_idx
asl
tay
lda BUCKETS,y
lda (BUCKETS),y
sta bucket
lda BUCKETS+1,y
iny
lda (BUCKETS),y
sta bucket+1
ldy bucket_idx
lda BUCKET_SIZES,y
lda (BUCKET_SIZES),y
sta bucket_size
cmp #0
beq b4
@ -84,12 +158,12 @@ main: {
ldy #0
cmp (fill),y
beq b18
lda offset
lda SCREEN_ANGLE
clc
adc #<SCREEN_ANGLE
adc offset
sta angle
lda offset+1
adc #>SCREEN_ANGLE
lda SCREEN_ANGLE+1
adc offset+1
sta angle+1
lda (angle),y
cmp min_angle
@ -154,41 +228,49 @@ main: {
jmp b6
}
// Initialize buckets containing indices of chars on the screen with specific distances to the center.
// init_buckets(byte* zeropage($34) screen)
init_buckets: {
.label _5 = $14
.label _9 = $3d
.label _10 = $3f
.label _12 = $3b
.label _13 = $3d
.label _9 = $48
.label _10 = $4a
.label _12 = $45
.label _13 = $48
.label screen = $34
.label dist = 8
.label i1 = $a
.label i2 = $c
.label bucket = $3d
.label distance = $47
.label bucket = $48
.label dist_3 = $e
.label i4 = $10
.label dist_5 = $e
.label _15 = $14
.label _16 = $3b
.label _17 = $3d
ldx #0
.label _16 = $45
.label _17 = $48
.label dist_8 = $e
ldy #0
// Init bucket sizes to 0
b1:
lda #0
sta BUCKET_SIZES,x
inx
cpx #NUM_BUCKETS-1+1
sta (BUCKET_SIZES),y
iny
cpy #NUM_BUCKETS-1+1
bne b1
lda screen
sta dist
lda screen+1
sta dist+1
lda #<0
sta i1
sta i1+1
lda #<SCREEN_DIST
sta dist
lda #>SCREEN_DIST
sta dist+1
b2:
b3:
ldy #0
lda (dist),y
tax
inc BUCKET_SIZES,x
tay
lda (BUCKET_SIZES),y
clc
adc #1
sta (BUCKET_SIZES),y
inc dist
bne !+
inc dist+1
@ -199,21 +281,21 @@ init_buckets: {
!:
lda i1+1
cmp #>$3e8
bne b2
bne b3
lda i1
cmp #<$3e8
bne b2
bne b3
lda #<0
sta i2
sta i2+1
// Allocate the buckets
b3:
lda i2
b4:
lda BUCKET_SIZES
clc
adc #<BUCKET_SIZES
adc i2
sta _15
lda i2+1
adc #>BUCKET_SIZES
lda BUCKET_SIZES+1
adc i2+1
sta _15+1
ldy #0
lda (malloc.size),y
@ -229,12 +311,12 @@ init_buckets: {
lda i2+1
rol
sta _12+1
clc
lda _16
adc #<BUCKETS
clc
adc BUCKETS
sta _16
lda _16+1
adc #>BUCKETS
adc BUCKETS+1
sta _16+1
ldy #0
lda _5
@ -248,40 +330,40 @@ init_buckets: {
!:
lda i2+1
cmp #>NUM_BUCKETS-1+1
bne b3
bne b4
lda i2
cmp #<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
ldy #0
// Iterate all distances and fill the buckets with indices into the screens
b5:
lda #0
sta (BUCKET_IDX),y
iny
cpy #NUM_BUCKETS-1+1
bne b5
lda screen
sta dist_8
lda screen+1
sta dist_8+1
lda #<0
sta i4
sta i4+1
lda #<SCREEN_DIST
sta dist_5
lda #>SCREEN_DIST
sta dist_5+1
b5:
b7:
ldy #0
lda (dist_5),y
tax
txa
sta distance
sta _9
tya
sta _9+1
asl _13
rol _13+1
clc
lda _17
adc #<BUCKETS
clc
adc BUCKETS
sta _17
lda _17+1
adc #>BUCKETS
adc BUCKETS+1
sta _17+1
lda (bucket),y
pha
@ -292,12 +374,13 @@ init_buckets: {
sta bucket
lda dist_5
sec
sbc #<SCREEN_DIST
sbc screen
sta _10
lda dist_5+1
sbc #>SCREEN_DIST
sbc screen+1
sta _10+1
lda BUCKET_IDX,x
ldy distance
lda (BUCKET_IDX),y
asl
tay
lda _10
@ -305,7 +388,11 @@ init_buckets: {
iny
lda _10+1
sta (bucket),y
inc BUCKET_IDX,x
ldy distance
lda (BUCKET_IDX),y
clc
adc #1
sta (BUCKET_IDX),y
inc dist_3
bne !+
inc dist_3+1
@ -316,10 +403,10 @@ init_buckets: {
!:
lda i4+1
cmp #>$3e8
bne b5
bne b7
lda i4
cmp #<$3e8
bne b5
bne b7
rts
}
// Allocates a block of size bytes of memory, returning a pointer to the beginning of the block.
@ -343,24 +430,32 @@ malloc: {
}
// Populates 1000 bytes (a screen) with values representing the angle to the center.
// Utilizes symmetry around the center
// init_angle_screen(byte* zeropage($17) screen)
init_angle_screen: {
.label _10 = $21
.label xw = $41
.label yw = $43
.label angle_w = $21
.label ang_w = $45
.label x = $1b
.label xb = $1c
.label screen = $17
.label screen_topline = $19
.label screen_bottomline = $17
.label xw = $4c
.label yw = $4e
.label angle_w = $21
.label ang_w = $50
.label x = $1b
.label xb = $1c
.label y = $16
lda #<SCREEN_ANGLE+$28*$c
lda screen
clc
adc #<$28*$c
sta screen_topline
lda #>SCREEN_ANGLE+$28*$c
lda screen+1
adc #>$28*$c
sta screen_topline+1
lda #<SCREEN_ANGLE+$28*$c
clc
lda screen_bottomline
adc #<$28*$c
sta screen_bottomline
lda #>SCREEN_ANGLE+$28*$c
lda screen_bottomline+1
adc #>$28*$c
sta screen_bottomline+1
lda #0
sta y
@ -435,7 +530,7 @@ 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($41) x, signed word zeropage($43) y)
// atan2_16(signed word zeropage($4c) x, signed word zeropage($4e) y)
atan2_16: {
.label _2 = $1d
.label _7 = $1f
@ -445,8 +540,8 @@ atan2_16: {
.label xd = $25
.label yd = $23
.label return = $21
.label x = $41
.label y = $43
.label x = $4c
.label y = $4e
lda y+1
bmi !b1+
jmp b1
@ -624,24 +719,25 @@ 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
// Utilizes symmetry around the center
// init_dist_screen(byte* zeropage($28) screen)
init_dist_screen: {
.label yds = $46
.label xds = $48
.label ds = $48
.label screen = $28
.label screen_bottomline = $2a
.label yds = $51
.label xds = $53
.label ds = $53
.label x = $2c
.label xb = $2d
.label screen_topline = $28
.label screen_bottomline = $2a
.label y = $27
jsr init_squares
lda #<SCREEN_DIST+$28*$18
lda screen
clc
adc #<$28*$18
sta screen_bottomline
lda #>SCREEN_DIST+$28*$18
lda screen+1
adc #>$28*$18
sta screen_bottomline+1
lda #<SCREEN_DIST
sta screen_topline
lda #>SCREEN_DIST
sta screen_topline+1
lda #0
sta y
b1:
@ -722,12 +818,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($48) val)
// sqrt(word zeropage($53) val)
sqrt: {
.label _1 = $2e
.label _3 = $2e
.label found = $2e
.label val = $48
.label val = $53
lda SQUARES
sta bsearch16u.items
lda SQUARES+1
@ -750,14 +846,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($48) key, word* zeropage($2e) items, byte register(X) num)
// bsearch16u(word zeropage($53) key, word* zeropage($2e) items, byte register(X) num)
bsearch16u: {
.label _2 = $2e
.label pivot = $4a
.label result = $4c
.label pivot = $55
.label result = $57
.label return = $2e
.label items = $2e
.label key = $48
.label key = $53
ldx #NUM_SQUARES
b3:
cpx #0
@ -833,8 +929,8 @@ bsearch16u: {
// Uses a table of squares that must be initialized by calling init_squares()
// sqr(byte register(A) val)
sqr: {
.label return = $48
.label return_2 = $46
.label return = $53
.label return_2 = $51
asl
tay
lda (SQUARES),y
@ -853,10 +949,6 @@ init_squares: {
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
@ -895,21 +987,8 @@ init_squares: {
bne b1
rts
}
// Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ...
// 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,450 +3,487 @@
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
[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
[9] call malloc
to:@7
@7: scope:[] from @6
[10] (void*) BUCKETS#0 ← (void*)(byte*) malloc::mem#0
[11] call malloc
to:@8
@8: scope:[] from @7
[12] (void*) BUCKET_IDX#0 ← (void*)(byte*) malloc::mem#0
to:@3
@3: scope:[] from @8
[13] phi()
[14] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
@end: scope:[] from @3
[15] phi()
main: scope:[main] from @3
asm { sei }
[5] call init_dist_screen
[17] (byte*) init_dist_screen::screen#0 ← (byte*)(void*) SCREEN_DIST#0
[18] call init_dist_screen
to:main::@14
main::@14: scope:[main] from main
[6] phi()
[7] call init_angle_screen
[19] (byte*) init_angle_screen::screen#0 ← (byte*)(void*) SCREEN_ANGLE#0
[20] call init_angle_screen
to:main::@15
main::@15: scope:[main] from main::@14
[8] phi()
[9] call init_buckets
[21] (byte*) init_buckets::screen#0 ← (byte*)(void*) SCREEN_DIST#0
[22] call init_buckets
to:main::@1
main::@1: scope:[main] from main::@10 main::@11 main::@15
[10] (byte) main::bucket_idx#6 ← phi( main::@11/(byte) main::bucket_idx#1 main::@15/(byte) 0 )
[23] (byte) main::bucket_idx#6 ← phi( main::@11/(byte) main::bucket_idx#1 main::@15/(byte) 0 )
to:main::@2
main::@2: scope:[main] from main::@1 main::@2
[11] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2
[24] if(*((const byte*) RASTER#0)!=(byte) $ff) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[12] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
[13] (byte~) main::$21 ← (byte) main::bucket_idx#6 << (byte) 1
[14] (word[]) main::bucket#0 ← *((const word*[NUM_BUCKETS#0]) BUCKETS#0 + (byte~) main::$21)
[15] (byte) main::bucket_size#0 ← *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (byte) main::bucket_idx#6)
[16] if((byte) main::bucket_size#0<=(byte) 0) goto main::@4
[25] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0)
[26] (byte~) main::$21 ← (byte) main::bucket_idx#6 << (byte) 1
[27] (word[]) main::bucket#0 ← *((word**)(void*) BUCKETS#0 + (byte~) main::$21)
[28] (byte) main::bucket_size#0 ← *((byte*)(void*) BUCKET_SIZES#0 + (byte) main::bucket_idx#6)
[29] if((byte) main::bucket_size#0<=(byte) 0) goto main::@4
to:main::@5
main::@5: scope:[main] from main::@16 main::@3
[17] (word) main::min_offset#5 ← phi( main::@3/(word) $ffff main::@16/(word~) main::min_offset#7 )
[17] (byte) main::min_angle#2 ← phi( main::@3/(byte) $ff main::@16/(byte) main::min_angle#4 )
[17] (byte) main::i#2 ← phi( main::@3/(byte) 0 main::@16/(byte) main::i#1 )
[18] (byte~) main::$22 ← (byte) main::i#2 << (byte) 1
[19] (word) main::offset#0 ← *((word[]) main::bucket#0 + (byte~) main::$22)
[20] (byte*) main::fill#0 ← (const byte*) SCREEN_FILL#0 + (word) main::offset#0
[21] if(*((byte*) main::fill#0)==(const byte) FILL_CHAR#0) goto main::@18
[30] (word) main::min_offset#5 ← phi( main::@3/(word) $ffff main::@16/(word~) main::min_offset#7 )
[30] (byte) main::min_angle#2 ← phi( main::@3/(byte) $ff main::@16/(byte) main::min_angle#4 )
[30] (byte) main::i#2 ← phi( main::@3/(byte) 0 main::@16/(byte) main::i#1 )
[31] (byte~) main::$22 ← (byte) main::i#2 << (byte) 1
[32] (word) main::offset#0 ← *((word[]) main::bucket#0 + (byte~) main::$22)
[33] (byte*) main::fill#0 ← (const byte*) SCREEN_FILL#0 + (word) main::offset#0
[34] if(*((byte*) main::fill#0)==(const byte) FILL_CHAR#0) goto main::@18
to:main::@7
main::@7: scope:[main] from main::@5
[22] (byte*) main::angle#0 ← (const byte[$3e8]) SCREEN_ANGLE#0 + (word) main::offset#0
[23] if(*((byte*) main::angle#0)>(byte) main::min_angle#2) goto main::@17
[35] (byte*) main::angle#0 ← (byte*)(void*) SCREEN_ANGLE#0 + (word) main::offset#0
[36] if(*((byte*) main::angle#0)>(byte) main::min_angle#2) goto main::@17
to:main::@8
main::@8: scope:[main] from main::@7
[24] (byte) main::min_angle#1 ← *((byte*) main::angle#0)
[37] (byte) main::min_angle#1 ← *((byte*) main::angle#0)
to:main::@6
main::@6: scope:[main] from main::@17 main::@18 main::@8
[25] (byte) main::min_angle#4 ← phi( main::@17/(byte) main::min_angle#2 main::@8/(byte) main::min_angle#1 main::@18/(byte) main::min_angle#2 )
[25] (word) main::min_offset#2 ← phi( main::@17/(word~) main::min_offset#8 main::@8/(word) main::offset#0 main::@18/(word~) main::min_offset#10 )
[26] (byte) main::i#1 ← ++ (byte) main::i#2
[27] if((byte) main::i#1<(byte) main::bucket_size#0) goto main::@16
[38] (byte) main::min_angle#4 ← phi( main::@17/(byte) main::min_angle#2 main::@8/(byte) main::min_angle#1 main::@18/(byte) main::min_angle#2 )
[38] (word) main::min_offset#2 ← phi( main::@17/(word~) main::min_offset#8 main::@8/(word) main::offset#0 main::@18/(word~) main::min_offset#10 )
[39] (byte) main::i#1 ← ++ (byte) main::i#2
[40] if((byte) main::i#1<(byte) main::bucket_size#0) goto main::@16
to:main::@9
main::@9: scope:[main] from main::@6
[28] if((word) main::min_offset#2==(word) $ffff) goto main::@4
[41] if((word) main::min_offset#2==(word) $ffff) goto main::@4
to:main::@10
main::@10: scope:[main] from main::@9
[29] (byte*) main::fill1#0 ← (const byte*) SCREEN_FILL#0 + (word) main::min_offset#2
[30] *((byte*) main::fill1#0) ← (const byte) FILL_CHAR#0
[31] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
[42] (byte*) main::fill1#0 ← (const byte*) SCREEN_FILL#0 + (word) main::min_offset#2
[43] *((byte*) main::fill1#0) ← (const byte) FILL_CHAR#0
[44] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
to:main::@1
main::@4: scope:[main] from main::@3 main::@9
[32] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#6
[33] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS#0) goto main::@11
[45] (byte) main::bucket_idx#1 ← ++ (byte) main::bucket_idx#6
[46] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS#0) goto main::@11
to:main::@12
main::@12: scope:[main] from main::@4
[34] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
[47] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
to:main::@13
main::@13: scope:[main] from main::@12 main::@13
[35] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7)
[48] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7)
to:main::@13
main::@11: scope:[main] from main::@4
[36] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
[49] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0)
to:main::@1
main::@16: scope:[main] from main::@6
[37] (word~) main::min_offset#7 ← (word) main::min_offset#2
[50] (word~) main::min_offset#7 ← (word) main::min_offset#2
to:main::@5
main::@17: scope:[main] from main::@7
[38] (word~) main::min_offset#8 ← (word) main::min_offset#5
[51] (word~) main::min_offset#8 ← (word) main::min_offset#5
to:main::@6
main::@18: scope:[main] from main::@5
[39] (word~) main::min_offset#10 ← (word) main::min_offset#5
[52] (word~) main::min_offset#10 ← (word) main::min_offset#5
to:main::@6
init_buckets: scope:[init_buckets] from main::@15
[40] phi()
[53] phi()
to:init_buckets::@1
init_buckets::@1: scope:[init_buckets] from init_buckets init_buckets::@1
[41] (byte) init_buckets::i#2 ← phi( init_buckets/(byte) 0 init_buckets::@1/(byte) init_buckets::i#1 )
[42] *((const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (byte) init_buckets::i#2) ← (byte) 0
[43] (byte) init_buckets::i#1 ← ++ (byte) init_buckets::i#2
[44] if((byte) init_buckets::i#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@1
[54] (byte) init_buckets::i#2 ← phi( init_buckets/(byte) 0 init_buckets::@1/(byte) init_buckets::i#1 )
[55] *((byte*)(void*) BUCKET_SIZES#0 + (byte) init_buckets::i#2) ← (byte) 0
[56] (byte) init_buckets::i#1 ← ++ (byte) init_buckets::i#2
[57] 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 init_buckets::@2
[45] (word) init_buckets::i1#2 ← phi( init_buckets::@1/(word) 0 init_buckets::@2/(word) init_buckets::i1#1 )
[45] (byte*) init_buckets::dist#4 ← phi( init_buckets::@1/(const byte[$3e8]) SCREEN_DIST#0 init_buckets::@2/(byte*) init_buckets::dist#1 )
[46] *((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))
[47] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#4
[48] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2
[49] if((word) init_buckets::i1#1!=(word) $3e8) goto init_buckets::@2
init_buckets::@2: scope:[init_buckets] from init_buckets::@1
[58] (byte*~) init_buckets::dist#6 ← (byte*) init_buckets::screen#0
to:init_buckets::@3
init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@6
[50] (word) init_buckets::i2#2 ← phi( init_buckets::@6/(word) init_buckets::i2#1 init_buckets::@2/(word) 0 )
[51] (byte*~) init_buckets::$15 ← (const byte[NUM_BUCKETS#0]) BUCKET_SIZES#0 + (word) init_buckets::i2#2
[52] (word) malloc::size#1 ← *((byte*~) init_buckets::$15) << (byte) 1
[53] call malloc
to:init_buckets::@6
init_buckets::@6: scope:[init_buckets] from init_buckets::@3
[54] (void*~) init_buckets::$5 ← (void*)(byte*) malloc::mem#0
[55] (word~) init_buckets::$12 ← (word) init_buckets::i2#2 << (byte) 1
[56] (word**~) init_buckets::$16 ← (const word*[NUM_BUCKETS#0]) BUCKETS#0 + (word~) init_buckets::$12
[57] *((word**~) init_buckets::$16) ← (word*)(void*~) init_buckets::$5
[58] (word) init_buckets::i2#1 ← ++ (word) init_buckets::i2#2
[59] if((word) init_buckets::i2#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@3
init_buckets::@3: scope:[init_buckets] from init_buckets::@2 init_buckets::@3
[59] (word) init_buckets::i1#2 ← phi( init_buckets::@2/(word) 0 init_buckets::@3/(word) init_buckets::i1#1 )
[59] (byte*) init_buckets::dist#4 ← phi( init_buckets::@2/(byte*~) init_buckets::dist#6 init_buckets::@3/(byte*) init_buckets::dist#1 )
[60] *((byte*)(void*) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4)) ← ++ *((byte*)(void*) BUCKET_SIZES#0 + *((byte*) init_buckets::dist#4))
[61] (byte*) init_buckets::dist#1 ← ++ (byte*) init_buckets::dist#4
[62] (word) init_buckets::i1#1 ← ++ (word) init_buckets::i1#2
[63] if((word) init_buckets::i1#1!=(word) $3e8) goto init_buckets::@3
to:init_buckets::@4
init_buckets::@4: scope:[init_buckets] from init_buckets::@4 init_buckets::@6
[60] (byte) init_buckets::i3#2 ← phi( init_buckets::@6/(byte) 0 init_buckets::@4/(byte) init_buckets::i3#1 )
[61] *((const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 + (byte) init_buckets::i3#2) ← (byte) 0
[62] (byte) init_buckets::i3#1 ← ++ (byte) init_buckets::i3#2
[63] if((byte) init_buckets::i3#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@4
init_buckets::@4: scope:[init_buckets] from init_buckets::@3 init_buckets::@8
[64] (word) init_buckets::i2#2 ← phi( init_buckets::@8/(word) init_buckets::i2#1 init_buckets::@3/(word) 0 )
[65] (byte*~) init_buckets::$15 ← (byte*)(void*) BUCKET_SIZES#0 + (word) init_buckets::i2#2
[66] (word) malloc::size#6 ← *((byte*~) init_buckets::$15) << (byte) 1
[67] call malloc
to:init_buckets::@8
init_buckets::@8: scope:[init_buckets] from init_buckets::@4
[68] (void*~) init_buckets::$5 ← (void*)(byte*) malloc::mem#0
[69] (word~) init_buckets::$12 ← (word) init_buckets::i2#2 << (byte) 1
[70] (word**~) init_buckets::$16 ← (word**)(void*) BUCKETS#0 + (word~) init_buckets::$12
[71] *((word**~) init_buckets::$16) ← (word*)(void*~) init_buckets::$5
[72] (word) init_buckets::i2#1 ← ++ (word) init_buckets::i2#2
[73] if((word) init_buckets::i2#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
[64] (word) init_buckets::i4#2 ← phi( init_buckets::@4/(word) 0 init_buckets::@5/(word) init_buckets::i4#1 )
[64] (byte*) init_buckets::dist#5 ← phi( init_buckets::@4/(const byte[$3e8]) SCREEN_DIST#0 init_buckets::@5/(byte*) init_buckets::dist#3 )
[65] (byte) init_buckets::distance#0 ← *((byte*) init_buckets::dist#5)
[66] (word~) init_buckets::$9 ← (word)(byte) init_buckets::distance#0
[67] (word~) init_buckets::$13 ← (word~) init_buckets::$9 << (byte) 1
[68] (word**~) init_buckets::$17 ← (const word*[NUM_BUCKETS#0]) BUCKETS#0 + (word~) init_buckets::$13
[69] (word*) init_buckets::bucket#0 ← *((word**~) init_buckets::$17)
[70] (word~) init_buckets::$10 ← (byte*) init_buckets::dist#5 - (const byte[$3e8]) SCREEN_DIST#0
[71] (byte~) init_buckets::$14 ← *((const byte[NUM_BUCKETS#0]) BUCKET_IDX#0 + (byte) init_buckets::distance#0) << (byte) 1
[72] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10
[73] *((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)
[74] (byte*) init_buckets::dist#3 ← ++ (byte*) init_buckets::dist#5
[75] (word) init_buckets::i4#1 ← ++ (word) init_buckets::i4#2
[76] if((word) init_buckets::i4#1!=(word) $3e8) goto init_buckets::@5
init_buckets::@5: scope:[init_buckets] from init_buckets::@5 init_buckets::@8
[74] (byte) init_buckets::i3#2 ← phi( init_buckets::@8/(byte) 0 init_buckets::@5/(byte) init_buckets::i3#1 )
[75] *((byte*)(void*) BUCKET_IDX#0 + (byte) init_buckets::i3#2) ← (byte) 0
[76] (byte) init_buckets::i3#1 ← ++ (byte) init_buckets::i3#2
[77] if((byte) init_buckets::i3#1!=(const byte) NUM_BUCKETS#0-(byte) 1+(byte) 1) goto init_buckets::@5
to:init_buckets::@6
init_buckets::@6: scope:[init_buckets] from init_buckets::@5
[78] (byte*~) init_buckets::dist#8 ← (byte*) init_buckets::screen#0
to:init_buckets::@7
init_buckets::@7: scope:[init_buckets] from init_buckets::@6 init_buckets::@7
[79] (word) init_buckets::i4#2 ← phi( init_buckets::@6/(word) 0 init_buckets::@7/(word) init_buckets::i4#1 )
[79] (byte*) init_buckets::dist#5 ← phi( init_buckets::@6/(byte*~) init_buckets::dist#8 init_buckets::@7/(byte*) init_buckets::dist#3 )
[80] (byte) init_buckets::distance#0 ← *((byte*) init_buckets::dist#5)
[81] (word~) init_buckets::$9 ← (word)(byte) init_buckets::distance#0
[82] (word~) init_buckets::$13 ← (word~) init_buckets::$9 << (byte) 1
[83] (word**~) init_buckets::$17 ← (word**)(void*) BUCKETS#0 + (word~) init_buckets::$13
[84] (word*) init_buckets::bucket#0 ← *((word**~) init_buckets::$17)
[85] (word~) init_buckets::$10 ← (byte*) init_buckets::dist#5 - (byte*) init_buckets::screen#0
[86] (byte~) init_buckets::$14 ← *((byte*)(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) << (byte) 1
[87] *((word*) init_buckets::bucket#0 + (byte~) init_buckets::$14) ← (word~) init_buckets::$10
[88] *((byte*)(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0) ← ++ *((byte*)(void*) BUCKET_IDX#0 + (byte) init_buckets::distance#0)
[89] (byte*) init_buckets::dist#3 ← ++ (byte*) init_buckets::dist#5
[90] (word) init_buckets::i4#1 ← ++ (word) init_buckets::i4#2
[91] if((word) init_buckets::i4#1!=(word) $3e8) goto init_buckets::@7
to:init_buckets::@return
init_buckets::@return: scope:[init_buckets] from init_buckets::@5
[77] return
init_buckets::@return: scope:[init_buckets] from init_buckets::@7
[92] return
to:@return
malloc: scope:[malloc] from init_buckets::@3 init_squares
[78] (word) malloc::size#2 ← phi( init_buckets::@3/(word) malloc::size#1 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[78] (byte*) heap_head#13 ← phi( init_buckets::@3/(byte*) heap_head#1 init_squares/(const byte*) HEAP_TOP#0 )
[79] (byte*) malloc::mem#0 ← (byte*) heap_head#13 - (word) malloc::size#2
[80] (byte*) heap_head#1 ← (byte*) malloc::mem#0
malloc: scope:[malloc] from @1 @2 @4 @6 @7 init_buckets::@4 init_squares
[93] (word) malloc::size#7 ← phi( @1/(word) $3e8 @2/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE @4/(word) $3e8 @6/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_POINTER @7/(const byte) NUM_BUCKETS#0*(const byte) SIZEOF_BYTE init_buckets::@4/(word) malloc::size#6 init_squares/(const byte) NUM_SQUARES#3*(const byte) SIZEOF_WORD )
[93] (byte*) heap_head#18 ← phi( @1/(const byte*) HEAP_TOP#0 @2/(byte*) heap_head#1 @4/(byte*) heap_head#1 @6/(byte*) heap_head#1 @7/(byte*) heap_head#1 init_buckets::@4/(byte*) heap_head#1 init_squares/(byte*) heap_head#1 )
[94] (byte*) malloc::mem#0 ← (byte*) heap_head#18 - (word) malloc::size#7
[95] (byte*) heap_head#1 ← (byte*) malloc::mem#0
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[81] return
[96] return
to:@return
init_angle_screen: scope:[init_angle_screen] from main::@14
[82] phi()
[97] (byte*) init_angle_screen::screen_topline#0 ← (byte*) init_angle_screen::screen#0 + (word)(number) $28*(number) $c
[98] (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
[83] (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 )
[83] (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 )
[83] (byte) init_angle_screen::y#4 ← phi( init_angle_screen/(byte) 0 init_angle_screen::@3/(byte) init_angle_screen::y#1 )
[99] (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 )
[99] (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 )
[99] (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
[84] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 )
[84] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 )
[85] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1
[86] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2
[87] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0
[88] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1
[89] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0
[90] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[91] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[92] call atan2_16
[93] (word) atan2_16::return#2 ← (word) atan2_16::return#0
[100] (byte) init_angle_screen::xb#2 ← phi( init_angle_screen::@1/(byte) $27 init_angle_screen::@4/(byte) init_angle_screen::xb#1 )
[100] (byte) init_angle_screen::x#2 ← phi( init_angle_screen::@1/(byte) 0 init_angle_screen::@4/(byte) init_angle_screen::x#1 )
[101] (byte~) init_angle_screen::$2 ← (byte) init_angle_screen::x#2 << (byte) 1
[102] (byte~) init_angle_screen::$3 ← (byte) $27 - (byte~) init_angle_screen::$2
[103] (word) init_angle_screen::xw#0 ← (byte~) init_angle_screen::$3 w= (byte) 0
[104] (byte~) init_angle_screen::$6 ← (byte) init_angle_screen::y#4 << (byte) 1
[105] (word) init_angle_screen::yw#0 ← (byte~) init_angle_screen::$6 w= (byte) 0
[106] (signed word) atan2_16::x#0 ← (signed word)(word) init_angle_screen::xw#0
[107] (signed word) atan2_16::y#0 ← (signed word)(word) init_angle_screen::yw#0
[108] call atan2_16
[109] (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
[94] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[95] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[96] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10
[97] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[98] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0
[99] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12
[100] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[101] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13
[102] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[103] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14
[104] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[105] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
[106] if((byte) init_angle_screen::x#1<(byte) $13+(byte) 1) goto init_angle_screen::@2
[110] (word) init_angle_screen::angle_w#0 ← (word) atan2_16::return#2
[111] (word~) init_angle_screen::$10 ← (word) init_angle_screen::angle_w#0 + (byte) $80
[112] (byte) init_angle_screen::ang_w#0 ← > (word~) init_angle_screen::$10
[113] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::xb#2) ← (byte) init_angle_screen::ang_w#0
[114] (byte~) init_angle_screen::$12 ← - (byte) init_angle_screen::ang_w#0
[115] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::xb#2) ← (byte~) init_angle_screen::$12
[116] (byte~) init_angle_screen::$13 ← (byte) $80 + (byte) init_angle_screen::ang_w#0
[117] *((byte*) init_angle_screen::screen_topline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$13
[118] (byte~) init_angle_screen::$14 ← (byte) $80 - (byte) init_angle_screen::ang_w#0
[119] *((byte*) init_angle_screen::screen_bottomline#5 + (byte) init_angle_screen::x#2) ← (byte~) init_angle_screen::$14
[120] (byte) init_angle_screen::x#1 ← ++ (byte) init_angle_screen::x#2
[121] (byte) init_angle_screen::xb#1 ← -- (byte) init_angle_screen::xb#2
[122] 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
[107] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28
[108] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28
[109] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4
[110] if((byte) init_angle_screen::y#1!=(byte) $d) goto init_angle_screen::@1
[123] (byte*) init_angle_screen::screen_topline#1 ← (byte*) init_angle_screen::screen_topline#5 - (byte) $28
[124] (byte*) init_angle_screen::screen_bottomline#1 ← (byte*) init_angle_screen::screen_bottomline#5 + (byte) $28
[125] (byte) init_angle_screen::y#1 ← ++ (byte) init_angle_screen::y#4
[126] 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
[111] return
[127] return
to:@return
atan2_16: scope:[atan2_16] from init_angle_screen::@2
[112] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1
[128] 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
[113] (signed word~) atan2_16::$2 ← - (signed word) atan2_16::y#0
[129] (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
[114] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[115] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4
[130] (signed word) atan2_16::yi#0 ← phi( atan2_16::@1/(signed word~) atan2_16::yi#16 atan2_16::@2/(signed word~) atan2_16::$2 )
[131] 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
[116] (signed word~) atan2_16::$7 ← - (signed word) atan2_16::x#0
[132] (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
[117] (signed word) atan2_16::xi#0 ← phi( atan2_16::@4/(signed word~) atan2_16::xi#13 atan2_16::@5/(signed word~) atan2_16::$7 )
[133] (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
[118] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
[118] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[118] (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 )
[118] (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 )
[119] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@11
[134] (word) atan2_16::angle#12 ← phi( atan2_16::@19/(word) atan2_16::angle#13 atan2_16::@6/(byte) 0 )
[134] (byte) atan2_16::i#2 ← phi( atan2_16::@19/(byte) atan2_16::i#1 atan2_16::@6/(byte) 0 )
[134] (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 )
[134] (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 )
[135] 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
[120] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[121] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[122] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7
[136] (word) atan2_16::angle#6 ← phi( atan2_16::@10/(word) atan2_16::angle#12 atan2_16::@19/(word) atan2_16::angle#13 )
[137] (word) atan2_16::angle#1 ← (word) atan2_16::angle#6 >> (byte) 1
[138] 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
[123] (word) atan2_16::angle#4 ← (word) $8000 - (word) atan2_16::angle#1
[139] (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
[124] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[125] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8
[140] (word) atan2_16::angle#11 ← phi( atan2_16::@12/(word) atan2_16::angle#1 atan2_16::@21/(word) atan2_16::angle#4 )
[141] 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
[126] (word) atan2_16::angle#5 ← - (word) atan2_16::angle#11
[142] (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
[127] (word) atan2_16::return#0 ← phi( atan2_16::@9/(word) atan2_16::angle#5 atan2_16::@7/(word) atan2_16::angle#11 )
[143] (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
[128] return
[144] return
to:@return
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
[129] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
[130] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[131] (signed word~) atan2_16::yd#10 ← (signed word) atan2_16::yi#3
[145] (byte~) atan2_16::shift#5 ← (byte) atan2_16::i#2
[146] (signed word~) atan2_16::xd#10 ← (signed word) atan2_16::xi#3
[147] (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
[132] (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 )
[132] (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 )
[132] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[133] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@14
[148] (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 )
[148] (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 )
[148] (byte) atan2_16::shift#2 ← phi( atan2_16::@11/(byte~) atan2_16::shift#5 atan2_16::@14/(byte) atan2_16::shift#1 )
[149] 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
[134] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@17
[150] 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
[135] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[136] (signed word) atan2_16::yd#2 ← (signed word) atan2_16::yd#3 >> (signed byte) 1
[151] (signed word) atan2_16::xd#2 ← (signed word) atan2_16::xd#3 >> (signed byte) 1
[152] (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
[137] (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 )
[137] (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 )
[138] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@18
[153] (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 )
[153] (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 )
[154] 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
[139] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[140] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[141] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
[142] (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)
[155] (signed word) atan2_16::xi#2 ← (signed word) atan2_16::xi#3 - (signed word) atan2_16::yd#5
[156] (signed word) atan2_16::yi#2 ← (signed word) atan2_16::yi#3 + (signed word) atan2_16::xd#5
[157] (byte~) atan2_16::$24 ← (byte) atan2_16::i#2 << (byte) 1
[158] (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
[143] (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 )
[143] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[143] (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 )
[144] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[145] if((byte) atan2_16::i#1==(const byte) CORDIC_ITERATIONS_16#0-(byte) 1+(byte) 1) goto atan2_16::@12
[159] (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 )
[159] (word) atan2_16::angle#13 ← phi( atan2_16::@18/(word) atan2_16::angle#2 atan2_16::@20/(word) atan2_16::angle#3 )
[159] (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 )
[160] (byte) atan2_16::i#1 ← ++ (byte) atan2_16::i#2
[161] 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
[146] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[147] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[148] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[149] (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)
[162] (signed word) atan2_16::xi#1 ← (signed word) atan2_16::xi#3 + (signed word) atan2_16::yd#5
[163] (signed word) atan2_16::yi#1 ← (signed word) atan2_16::yi#3 - (signed word) atan2_16::xd#5
[164] (byte~) atan2_16::$23 ← (byte) atan2_16::i#2 << (byte) 1
[165] (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
[150] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[151] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[152] (byte) atan2_16::shift#1 ← (byte) atan2_16::shift#2 - (byte) 2
[166] (signed word) atan2_16::xd#1 ← (signed word) atan2_16::xd#3 >> (signed byte) 2
[167] (signed word) atan2_16::yd#1 ← (signed word) atan2_16::yd#3 >> (signed byte) 2
[168] (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
[153] (signed word~) atan2_16::xi#13 ← (signed word) atan2_16::x#0
[169] (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
[154] (signed word~) atan2_16::yi#16 ← (signed word) atan2_16::y#0
[170] (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
[155] phi()
[156] call init_squares
[171] phi()
[172] call init_squares
to:init_dist_screen::@10
init_dist_screen::@10: scope:[init_dist_screen] from init_dist_screen
[173] (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 init_dist_screen::@9
[157] (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 )
[157] (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 )
[157] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 )
[158] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[159] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen::@10 init_dist_screen::@9
[174] (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 )
[174] (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 )
[174] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen::@10/(byte) 0 )
[175] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[176] 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
[160] (byte~) init_dist_screen::$5 ← (byte) $18 - (byte) init_dist_screen::y2#0
[177] (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
[161] (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 )
[162] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[163] call sqr
[164] (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
[165] (word) init_dist_screen::yds#0 ← (word) sqr::return#2
[178] (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 )
[179] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[180] call sqr
[181] (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
[182] (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
[166] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 )
[166] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 )
[167] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[168] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@6
init_dist_screen::@5: scope:[init_dist_screen] from init_dist_screen::@11 init_dist_screen::@13
[183] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@11/(byte) $27 init_dist_screen::@13/(byte) init_dist_screen::xb#1 )
[183] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@11/(byte) 0 init_dist_screen::@13/(byte) init_dist_screen::x#1 )
[184] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[185] 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
[169] (byte~) init_dist_screen::$13 ← (byte) $27 - (byte) init_dist_screen::x2#0
[186] (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
[170] (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 )
[171] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[172] call sqr
[173] (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
[174] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[175] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[176] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[177] call sqrt
[178] (byte) sqrt::return#2 ← (byte) sqrt::return#0
[187] (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 )
[188] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[189] call sqr
[190] (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::@11
[179] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[180] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[181] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[182] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[183] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[184] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[185] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[186] if((byte) init_dist_screen::x#1<(byte) $13+(byte) 1) goto init_dist_screen::@5
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@8
[191] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[192] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[193] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[194] call sqrt
[195] (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
[196] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[197] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[198] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[199] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[200] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[201] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[202] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[203] 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
[187] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[188] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[189] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[190] if((byte) init_dist_screen::y#1!=(byte) $d) goto init_dist_screen::@1
init_dist_screen::@9: scope:[init_dist_screen] from init_dist_screen::@13
[204] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[205] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[206] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[207] 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
[191] return
[208] return
to:@return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[192] (byte~) init_dist_screen::$15 ← (byte) init_dist_screen::x2#0 - (byte) $27
[209] (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
[193] (byte~) init_dist_screen::$7 ← (byte) init_dist_screen::y2#0 - (byte) $18
[210] (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
[194] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[195] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[196] call bsearch16u
[197] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
sqrt: scope:[sqrt] from init_dist_screen::@12
[211] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[212] (word*) bsearch16u::items#1 ← (word*)(void*) SQUARES#1
[213] call bsearch16u
[214] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[198] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[199] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[200] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[201] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
[215] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[216] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (word*)(void*) SQUARES#1
[217] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[218] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[202] return
[219] return
to:@return
bsearch16u: scope:[bsearch16u] from sqrt
[203] phi()
[220] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[204] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[204] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[205] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
[221] (word*) bsearch16u::items#2 ← phi( bsearch16u/(word*) bsearch16u::items#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[221] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[222] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[206] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
[223] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[207] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
[224] (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
[208] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
[225] (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
[209] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[210] return
[226] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[227] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[211] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[212] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[213] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[214] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[215] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
[228] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[229] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[230] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[231] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[232] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[216] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
[233] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[217] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
[234] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[218] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[219] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
[235] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[236] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[220] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[220] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[221] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
[237] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[237] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[238] (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
[222] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[223] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[224] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
[239] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[240] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[241] (word) sqr::return#0 ← *((word*)(void*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[225] return
[242] return
to:@return
init_squares: scope:[init_squares] from init_dist_screen
[226] phi()
[227] call malloc
[243] phi()
[244] call malloc
to:init_squares::@2
init_squares::@2: scope:[init_squares] from init_squares
[228] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[229] (word*) init_squares::squares#0 ← (word*)(void*) SQUARES#1
[245] (void*) SQUARES#1 ← (void*)(byte*) malloc::mem#0
[246] (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
[230] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 )
[230] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 )
[230] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 )
[231] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[232] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[233] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[234] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[235] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[236] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[237] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#3-(byte) 1+(byte) 1) goto init_squares::@1
[247] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares::@2/(byte) 0 )
[247] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares::@2/(word*) init_squares::squares#0 )
[247] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares::@2/(byte) 0 )
[248] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[249] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[250] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[251] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[252] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[253] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[254] 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
[238] return
[255] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,21 @@
(label) @1
(label) @2
(label) @3
(label) @4
(label) @5
(label) @6
(label) @7
(label) @8
(label) @begin
(label) @end
(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*[]) BUCKETS
(void*) BUCKETS#0 BUCKETS zp ZP_WORD:58 0.02531645569620253
(byte[]) BUCKET_IDX
(void*) BUCKET_IDX#0 BUCKET_IDX zp ZP_WORD:60 0.0425531914893617
(byte[]) BUCKET_SIZES
(void*) BUCKET_SIZES#0 BUCKET_SIZES zp ZP_WORD:56 0.024691358024691357
(byte*) COLS
(const byte*) COLS#0 COLS = (byte*) 55296
(word[CORDIC_ITERATIONS_16#0]) CORDIC_ATAN2_ANGLES_16
@ -27,15 +34,17 @@
(const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30
(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_ANGLE
(void*) SCREEN_ANGLE#0 SCREEN_ANGLE zp ZP_WORD:54 0.045454545454545456
(byte[]) SCREEN_DIST
(void*) SCREEN_DIST#0 SCREEN_DIST zp ZP_WORD:52 0.125
(byte*) SCREEN_FILL
(const byte*) SCREEN_FILL#0 SCREEN_FILL = (byte*) 1024
(const byte) SIZEOF_BYTE SIZEOF_BYTE = (byte) 1
(const byte) SIZEOF_POINTER SIZEOF_POINTER = (byte) 2
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
(word*) SQUARES
(void*) SQUARES#1 SQUARES zp ZP_WORD:20 0.03278688524590164
(void*) SQUARES#1 SQUARES zp ZP_WORD:20 0.03225806451612903
(word()) atan2_16((signed word) atan2_16::x , (signed word) atan2_16::y)
(signed word~) atan2_16::$2 $2 zp ZP_WORD:29 4.0
(byte~) atan2_16::$23 reg byte a 2002.0
@ -84,7 +93,7 @@
(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:65 2.8684210526315796
(signed word) atan2_16::x#0 x zp ZP_WORD:76 2.8684210526315796
(signed word) atan2_16::xd
(signed word) atan2_16::xd#1 xd zp ZP_WORD:37 6667.333333333333
(signed word~) atan2_16::xd#10 xd zp ZP_WORD:37 1001.0
@ -99,7 +108,7 @@
(signed word) atan2_16::xi#3 xi zp ZP_WORD:31 267.0666666666667
(signed word) atan2_16::xi#8 xi zp ZP_WORD:31 1001.0
(signed word) atan2_16::y
(signed word) atan2_16::y#0 y zp ZP_WORD:67 2.724999999999999
(signed word) atan2_16::y#0 y zp ZP_WORD:78 2.724999999999999
(signed word) atan2_16::yd
(signed word) atan2_16::yd#1 yd zp ZP_WORD:35 10001.0
(signed word~) atan2_16::yd#10 yd zp ZP_WORD:35 2002.0
@ -133,24 +142,24 @@
(word*) bsearch16u::items#2 items zp ZP_WORD:46 334.5555555555556
(word*) bsearch16u::items#8 items zp ZP_WORD:46 1501.5
(word) bsearch16u::key
(word) bsearch16u::key#0 key zp ZP_WORD:72 0.26666666666666666
(word) bsearch16u::key#0 key zp ZP_WORD:83 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:74 501.0
(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:85 501.0
(signed word) bsearch16u::result
(signed word) bsearch16u::result#0 result zp ZP_WORD:76 1501.5
(signed word) bsearch16u::result#0 result zp ZP_WORD:87 1501.5
(word*) bsearch16u::return
(word*) bsearch16u::return#1 return zp ZP_WORD:46 2.0
(word*) bsearch16u::return#2 return zp ZP_WORD:46 6.0
(word*) bsearch16u::return#3 return zp ZP_WORD:46 4.0
(word*~) bsearch16u::return#6 return zp ZP_WORD:46 4.0
(byte*) heap_head
(byte*) heap_head#1 heap_head zp ZP_WORD:18 0.17105263157894737
(byte*) heap_head#13 heap_head zp ZP_WORD:18 13.0
(byte*) heap_head#1 heap_head zp ZP_WORD:18 0.2446808510638298
(byte*) heap_head#18 heap_head zp ZP_WORD:18 23.0
(void()) init_angle_screen((byte*) init_angle_screen::screen)
(word~) init_angle_screen::$10 $10 zp ZP_WORD:33 202.0
(byte~) init_angle_screen::$12 reg byte a 202.0
@ -165,16 +174,19 @@
(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:69 84.16666666666666
(byte) init_angle_screen::ang_w#0 ang_w zp ZP_BYTE:80 84.16666666666666
(word) init_angle_screen::angle_w
(word) init_angle_screen::angle_w#0 angle_w zp ZP_WORD:33 202.0
(byte*) init_angle_screen::screen
(byte*) init_angle_screen::screen#0 screen zp ZP_WORD:23 3.0
(byte*) init_angle_screen::screen_bottomline
(byte*) init_angle_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:23 4.0
(byte*) init_angle_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:23 7.333333333333333
(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:23 8.959999999999999
(byte*) init_angle_screen::screen_bottomline#5 screen_bottomline zp ZP_WORD:23 9.040000000000001
(byte*) init_angle_screen::screen_topline
(byte*) init_angle_screen::screen_topline#0 screen_topline zp ZP_WORD:25 2.0
(byte*) init_angle_screen::screen_topline#1 screen_topline zp ZP_WORD:25 5.5
(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:25 9.333333333333334
(byte*) init_angle_screen::screen_topline#5 screen_topline zp ZP_WORD:25 9.416666666666666
(byte) init_angle_screen::x
(byte) init_angle_screen::x#1 x zp ZP_BYTE:27 101.0
(byte) init_angle_screen::x#2 x zp ZP_BYTE:27 25.25
@ -182,41 +194,45 @@
(byte) init_angle_screen::xb#1 xb zp ZP_BYTE:28 101.0
(byte) init_angle_screen::xb#2 xb zp ZP_BYTE:28 19.238095238095237
(signed word) init_angle_screen::xw
(word) init_angle_screen::xw#0 xw zp ZP_WORD:65 33.666666666666664
(word) init_angle_screen::xw#0 xw zp ZP_WORD:76 33.666666666666664
(byte) init_angle_screen::y
(byte) init_angle_screen::y#1 y zp ZP_BYTE:22 16.5
(byte) init_angle_screen::y#4 y zp ZP_BYTE:22 4.730769230769231
(signed word) init_angle_screen::yw
(word) init_angle_screen::yw#0 yw zp ZP_WORD:67 50.5
(word) init_angle_screen::yw#0 yw zp ZP_WORD:78 50.5
(void()) init_buckets((byte*) init_buckets::screen)
(word~) init_buckets::$10 $10 zp ZP_WORD:63 11.0
(word~) init_buckets::$12 $12 zp ZP_WORD:59 22.0
(word~) init_buckets::$13 $13 zp ZP_WORD:61 22.0
(word~) init_buckets::$10 $10 zp ZP_WORD:74 11.0
(word~) init_buckets::$12 $12 zp ZP_WORD:69 22.0
(word~) init_buckets::$13 $13 zp ZP_WORD:72 22.0
(byte~) init_buckets::$14 reg byte a 22.0
(byte*~) init_buckets::$15 $15 zp ZP_WORD:20 22.0
(word**~) init_buckets::$16 $16 zp ZP_WORD:59 22.0
(word**~) init_buckets::$17 $17 zp ZP_WORD:61 22.0
(word**~) init_buckets::$16 $16 zp ZP_WORD:69 22.0
(word**~) init_buckets::$17 $17 zp ZP_WORD:72 22.0
(void*~) init_buckets::$5 $5 zp ZP_WORD:20 3.6666666666666665
(word~) init_buckets::$9 $9 zp ZP_WORD:61 22.0
(word~) init_buckets::$9 $9 zp ZP_WORD:72 22.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::@7
(label) init_buckets::@8
(label) init_buckets::@return
(word*) init_buckets::bucket
(word*) init_buckets::bucket#0 bucket zp ZP_WORD:61 7.333333333333333
(word*) init_buckets::bucket#0 bucket zp ZP_WORD:72 7.333333333333333
(byte*) init_buckets::dist
(byte*) init_buckets::dist#1 dist zp ZP_WORD:8 7.333333333333333
(byte*) init_buckets::dist#3 dist#3 zp ZP_WORD:14 7.333333333333333
(byte*) init_buckets::dist#4 dist zp ZP_WORD:8 22.0
(byte*) init_buckets::dist#5 dist#5 zp ZP_WORD:14 4.4
(byte*) init_buckets::dist#4 dist zp ZP_WORD:8 23.0
(byte*) init_buckets::dist#5 dist#5 zp ZP_WORD:14 4.6000000000000005
(byte*~) init_buckets::dist#6 dist zp ZP_WORD:8 4.0
(byte*~) init_buckets::dist#8 dist#8 zp ZP_WORD:14 4.0
(byte) init_buckets::distance
(byte) init_buckets::distance#0 reg byte x 5.5
(byte) init_buckets::distance#0 distance zp ZP_BYTE:71 5.5
(byte) init_buckets::i
(byte) init_buckets::i#1 reg byte x 16.5
(byte) init_buckets::i#2 reg byte x 16.5
(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:10 16.5
(word) init_buckets::i1#2 i1 zp ZP_WORD:10 7.333333333333333
@ -224,12 +240,13 @@
(word) init_buckets::i2#1 i2 zp ZP_WORD:12 16.5
(word) init_buckets::i2#2 i2 zp ZP_WORD:12 5.5
(byte) init_buckets::i3
(byte) init_buckets::i3#1 reg byte x 16.5
(byte) init_buckets::i3#2 reg byte x 16.5
(byte) init_buckets::i3#1 reg byte y 16.5
(byte) init_buckets::i3#2 reg byte y 16.5
(word) init_buckets::i4
(word) init_buckets::i4#1 i4 zp ZP_WORD:16 16.5
(word) init_buckets::i4#2 i4 zp ZP_WORD:16 2.0
(byte*) init_buckets::screen
(byte*) init_buckets::screen#0 screen zp ZP_WORD:52 0.42500000000000004
(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
@ -239,6 +256,7 @@
(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
@ -251,14 +269,16 @@
(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:72 202.0
(word) init_dist_screen::ds#0 ds zp ZP_WORD:83 202.0
(byte*) init_dist_screen::screen
(byte*) init_dist_screen::screen#0 screen zp ZP_WORD:40 1.5
(byte*) init_dist_screen::screen_bottomline
(byte*) init_dist_screen::screen_bottomline#0 screen_bottomline zp ZP_WORD:42 4.0
(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:42 7.333333333333333
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:42 6.787878787878788
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:42 6.848484848484849
(byte*) init_dist_screen::screen_topline
(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:40 5.5
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:40 7.0
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:40 7.0625
(byte) init_dist_screen::x
(byte) init_dist_screen::x#1 x zp ZP_BYTE:44 101.0
(byte) init_dist_screen::x#2 x zp ZP_BYTE:44 26.578947368421055
@ -270,7 +290,7 @@
(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:72 202.0
(word) init_dist_screen::xds#0 xds zp ZP_WORD:83 202.0
(byte) init_dist_screen::y
(byte) init_dist_screen::y#1 y zp ZP_BYTE:39 16.5
(byte) init_dist_screen::y#10 y zp ZP_BYTE:39 0.9705882352941178
@ -279,7 +299,7 @@
(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:70 4.869565217391305
(word) init_dist_screen::yds#0 yds zp ZP_WORD:81 4.869565217391305
(void()) init_squares()
(byte~) init_squares::$3 reg byte a 22.0
(byte~) init_squares::$4 reg byte a 22.0
@ -318,16 +338,16 @@
(label) main::@8
(label) main::@9
(byte*) main::angle
(byte*) main::angle#0 angle zp ZP_WORD:57 151.5
(byte*) main::angle#0 angle zp ZP_WORD:67 151.5
(word[]) main::bucket
(word[]) main::bucket#0 bucket zp ZP_WORD:52 6.588235294117648
(word[]) main::bucket#0 bucket zp ZP_WORD:62 6.588235294117648
(byte) main::bucket_idx
(byte) main::bucket_idx#1 bucket_idx zp ZP_BYTE:2 11.0
(byte) main::bucket_idx#6 bucket_idx zp ZP_BYTE:2 2.0
(byte) main::bucket_size
(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:54 7.6875
(byte) main::bucket_size#0 bucket_size zp ZP_BYTE:64 7.6875
(byte*) main::fill
(byte*) main::fill#0 fill zp ZP_WORD:55 202.0
(byte*) main::fill#0 fill zp ZP_WORD:65 202.0
(byte*) main::fill1
(byte*) main::fill1#0 fill1 zp ZP_WORD:6 22.0
(byte) main::i
@ -348,18 +368,18 @@
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
(byte*) malloc::mem#0 mem zp ZP_WORD:20 0.8
(byte*) malloc::mem#0 mem zp ZP_WORD:20 0.4
(void*) malloc::return
(word) malloc::size
(word) malloc::size#1 size zp ZP_WORD:20 22.0
(word) malloc::size#2 size zp ZP_WORD:20 13.0
(word) malloc::size#6 size zp ZP_WORD:20 22.0
(word) malloc::size#7 size zp ZP_WORD:20 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:72 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:70 22.0
(word) sqr::return#3 return zp ZP_WORD:72 202.0
(word) sqr::return#0 return zp ZP_WORD:83 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:81 22.0
(word) sqr::return#3 return zp ZP_WORD:83 202.0
(byte) sqr::val
(byte) sqr::val#0 reg byte a 22.0
(byte) sqr::val#1 reg byte a 202.0
@ -376,25 +396,25 @@
(byte) sqrt::return#2 reg byte a 202.0
(byte) sqrt::sq
(word) sqrt::val
(word) sqrt::val#0 val zp ZP_WORD:72 103.0
(word) sqrt::val#0 val zp ZP_WORD:83 103.0
zp ZP_BYTE:2 [ main::bucket_idx#6 main::bucket_idx#1 ]
reg byte x [ main::i#2 main::i#1 ]
zp ZP_BYTE:3 [ main::min_angle#2 main::min_angle#4 main::min_angle#1 ]
zp ZP_WORD:4 [ main::min_offset#5 main::min_offset#7 ]
zp ZP_WORD:6 [ main::min_offset#2 main::min_offset#8 main::offset#0 main::min_offset#10 main::fill1#0 ]
reg byte x [ init_buckets::i#2 init_buckets::i#1 ]
zp ZP_WORD:8 [ init_buckets::dist#4 init_buckets::dist#1 ]
reg byte y [ init_buckets::i#2 init_buckets::i#1 ]
zp ZP_WORD:8 [ init_buckets::dist#4 init_buckets::dist#6 init_buckets::dist#1 ]
zp ZP_WORD:10 [ init_buckets::i1#2 init_buckets::i1#1 ]
zp ZP_WORD:12 [ init_buckets::i2#2 init_buckets::i2#1 ]
reg byte x [ init_buckets::i3#2 init_buckets::i3#1 ]
zp ZP_WORD:14 [ init_buckets::dist#5 init_buckets::dist#3 ]
reg byte y [ init_buckets::i3#2 init_buckets::i3#1 ]
zp ZP_WORD:14 [ init_buckets::dist#5 init_buckets::dist#8 init_buckets::dist#3 ]
zp ZP_WORD:16 [ init_buckets::i4#2 init_buckets::i4#1 ]
zp ZP_WORD:18 [ heap_head#13 heap_head#1 ]
zp ZP_WORD:20 [ malloc::size#2 malloc::size#1 init_buckets::$15 malloc::mem#0 init_buckets::$5 SQUARES#1 ]
zp ZP_WORD:18 [ heap_head#18 heap_head#1 ]
zp ZP_WORD:20 [ malloc::size#7 malloc::size#6 init_buckets::$15 malloc::mem#0 init_buckets::$5 SQUARES#1 ]
zp ZP_BYTE:22 [ init_angle_screen::y#4 init_angle_screen::y#1 ]
zp ZP_WORD:23 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#1 ]
zp ZP_WORD:25 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#1 ]
zp ZP_WORD:23 [ init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#0 init_angle_screen::screen_bottomline#1 init_angle_screen::screen#0 ]
zp ZP_WORD:25 [ init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#0 init_angle_screen::screen_topline#1 ]
zp ZP_BYTE:27 [ init_angle_screen::x#2 init_angle_screen::x#1 ]
zp ZP_BYTE:28 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ]
zp ZP_WORD:29 [ 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 ]
@ -405,8 +425,8 @@ reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ]
zp ZP_WORD:35 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ]
zp ZP_WORD:37 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ]
zp ZP_BYTE:39 [ init_dist_screen::y#10 init_dist_screen::y#1 ]
zp ZP_WORD:40 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ]
zp ZP_WORD:42 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ]
zp ZP_WORD:40 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 init_dist_screen::screen#0 ]
zp ZP_WORD:42 [ 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:44 [ init_dist_screen::x#2 init_dist_screen::x#1 ]
zp ZP_BYTE:45 [ init_dist_screen::xb#2 init_dist_screen::xb#1 ]
@ -417,39 +437,44 @@ reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ]
zp ZP_WORD:48 [ init_squares::sqr#2 init_squares::sqr#1 ]
zp ZP_WORD:50 [ 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:52 [ SCREEN_DIST#0 init_buckets::screen#0 ]
zp ZP_WORD:54 [ SCREEN_ANGLE#0 ]
zp ZP_WORD:56 [ BUCKET_SIZES#0 ]
zp ZP_WORD:58 [ BUCKETS#0 ]
zp ZP_WORD:60 [ BUCKET_IDX#0 ]
reg byte a [ main::$21 ]
zp ZP_WORD:52 [ main::bucket#0 ]
zp ZP_BYTE:54 [ main::bucket_size#0 ]
zp ZP_WORD:62 [ main::bucket#0 ]
zp ZP_BYTE:64 [ main::bucket_size#0 ]
reg byte a [ main::$22 ]
zp ZP_WORD:55 [ main::fill#0 ]
zp ZP_WORD:57 [ main::angle#0 ]
zp ZP_WORD:59 [ init_buckets::$12 init_buckets::$16 ]
reg byte x [ init_buckets::distance#0 ]
zp ZP_WORD:61 [ init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ]
zp ZP_WORD:63 [ init_buckets::$10 ]
zp ZP_WORD:65 [ main::fill#0 ]
zp ZP_WORD:67 [ main::angle#0 ]
zp ZP_WORD:69 [ init_buckets::$12 init_buckets::$16 ]
zp ZP_BYTE:71 [ init_buckets::distance#0 ]
zp ZP_WORD:72 [ init_buckets::$9 init_buckets::$13 init_buckets::$17 init_buckets::bucket#0 ]
zp ZP_WORD:74 [ init_buckets::$10 ]
reg byte a [ init_buckets::$14 ]
reg byte a [ init_angle_screen::$2 ]
reg byte a [ init_angle_screen::$3 ]
zp ZP_WORD:65 [ init_angle_screen::xw#0 atan2_16::x#0 ]
zp ZP_WORD:76 [ init_angle_screen::xw#0 atan2_16::x#0 ]
reg byte a [ init_angle_screen::$6 ]
zp ZP_WORD:67 [ init_angle_screen::yw#0 atan2_16::y#0 ]
zp ZP_BYTE:69 [ init_angle_screen::ang_w#0 ]
zp ZP_WORD:78 [ init_angle_screen::yw#0 atan2_16::y#0 ]
zp ZP_BYTE:80 [ 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:70 [ sqr::return#2 init_dist_screen::yds#0 ]
zp ZP_WORD:81 [ sqr::return#2 init_dist_screen::yds#0 ]
reg byte a [ init_dist_screen::x2#0 ]
zp ZP_WORD:72 [ 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:83 [ 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:74 [ bsearch16u::pivot#0 ]
zp ZP_WORD:76 [ bsearch16u::result#0 ]
zp ZP_WORD:85 [ bsearch16u::pivot#0 ]
zp ZP_WORD:87 [ bsearch16u::result#0 ]
reg byte a [ sqr::$0 ]
reg byte a [ init_squares::$3 ]
reg byte a [ init_squares::$4 ]