1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-17 10:30:43 +00:00

Optimized finding char to process by using table with distance to center.

This commit is contained in:
jespergravgaard 2019-06-25 00:38:08 +02:00
parent 77b75cb045
commit 7574ed744c
10 changed files with 9043 additions and 6194 deletions

View File

@ -1,6 +1,8 @@
// Clears start screen throwing around the letters (by turning them into sprites)
import "c64"
import "stdlib"
import "sqr"
import "multiply"
import "c64"
// Generate debug code (raster time usage etc.)
const bool DEBUG = false;
@ -15,7 +17,10 @@ const word* VXSIN = 0x2200;
const word* VYSIN = 0x2280;
// Copy of the screen used for finding chars to process
byte[1000] SCREEN_COPY;
align(0x100) byte[1000] SCREEN_COPY;
// Screen containing bytes representing the distance to the center
align(0x100) byte[1000] SCREEN_DIST;
// Max number of chars processed at once
const byte NUM_PROCESSING = 8;
@ -27,11 +32,11 @@ struct ProcessingChar {
// y-position (0-24)
byte y;
// squared distance to center (0-569)
word dist;
byte dist;
};
// Distance value meaning not found
const word NOT_FOUND = 0xffff;
const byte NOT_FOUND = 0xff;
// Struct holding sprite being processed
struct ProcessingSprite {
@ -61,8 +66,8 @@ struct ProcessingSprite {
struct ProcessingSprite[NUM_PROCESSING] PROCESSING;
void main() {
// Init squares table
initSquareTables();
// Initialize the screen containing distance to the center
init_dist_screen(SCREEN_DIST);
// Copy screen to screen copy
for( byte* src=SCREEN, dst=SCREEN_COPY; src!=SCREEN+1000; src++, dst++) *dst = *src;
// Init processing array
@ -90,10 +95,11 @@ void main() {
struct ProcessingChar getCharToProcess() {
struct ProcessingChar closest = { 0, 0, NOT_FOUND };
byte* screen_line = SCREEN_COPY;
byte* dist_line = SCREEN_DIST;
for( byte y: 0..24) {
for( byte x: 0..39) {
if(screen_line[x]!=' ') {
word dist = SQUARES_X[x]+SQUARES_Y[y];
byte dist = dist_line[x];
if(dist<closest.dist) {
// Update closest char
closest = { x, y, dist };
@ -101,6 +107,7 @@ struct ProcessingChar getCharToProcess() {
}
}
screen_line += 40;
dist_line += 40;
}
if(closest.dist != NOT_FOUND) {
// clear the found char on the screen copy
@ -215,20 +222,30 @@ void processChars() {
}
}
// SQUARES_X[i] = (i-20)*(i-20)
word[40] SQUARES_X;
// SQUARES_Y[i] = (i-12)*(i-12)
word[25] SQUARES_Y;
// initialize SQUARES table
void initSquareTables() {
for(byte x: 0..39) {
byte x_dist = (x<20)?20-x:x-20;
SQUARES_X[x] = mul8u(x_dist, x_dist);
}
for(byte y: 0..24) {
byte y_dist = (y<12)?12-y:y-12;
SQUARES_Y[y] = mul8u(y_dist, y_dist);
// 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;
byte *screen_bottomline = screen+40*24;
for(byte y: 0..12) {
byte y2 = y*2;
byte yd = (y2>=24)?(y2-24):(24-y2);
word yds = sqr(yd);
for( byte x=0,xb=39; x<=19; x++, xb--) {
byte x2 = x*2;
byte xd = (x2>=39)?(x2-39):(39-x2);
word xds = sqr(xd);
word ds = xds+yds;
byte d = sqrt(ds);
screen_topline[x] = d;
screen_bottomline[x] = d;
screen_topline[xb] = d;
screen_bottomline[xb] = d;
}
screen_topline += 40;
screen_bottomline -= 40;
}
}

View File

@ -13,10 +13,16 @@ const byte* SCREEN = 0x2800;
void main() {
init_font_hex(CHARSET);
*D018 = toD018(SCREEN, CHARSET);
init_dist_screen(SCREEN);
}
// 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;
byte *screen_bottomline = SCREEN+40*24;
byte* screen_topline = screen;
byte *screen_bottomline = screen+40*24;
for(byte y: 0..12) {
byte y2 = y*2;
byte yd = (y2>=24)?(y2-24):(24-y2);

View File

@ -2,6 +2,7 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.const SIZEOF_WORD = 2
.const STATUS_FREE = 0
.const STATUS_NEW = 1
.const STATUS_PROCESSING = 2
@ -13,6 +14,8 @@
.const OFFSET_STRUCT_PROCESSINGSPRITE_COL = $a
.const OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = $b
.const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = $c
// Start of the heap used by malloc()
.label HEAP_START = $c000
// Processor port data direction register
.label PROCPORT_DDR = 0
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
@ -68,10 +71,12 @@
// Max number of chars processed at once
.const NUM_PROCESSING = 8
// Distance value meaning not found
.const NOT_FOUND = $ffff
.const NOT_FOUND = $ff
.const NUM_SQUARES = $30
.const RASTER_IRQ_TOP = $30
.const RASTER_IRQ_MIDDLE = $ff
.const XPOS_RIGHTMOST = BORDER_XPOS_RIGHT<<4
.label SQUARES = malloc.return
.const YPOS_BOTTOMMOST = BORDER_YPOS_BOTTOM<<4
.const XPOS_LEFTMOST = BORDER_XPOS_LEFT-8<<4
.const YPOS_TOPMOST = BORDER_YPOS_TOP-8<<4
@ -79,8 +84,8 @@ main: {
.label src = 2
.label dst = 4
.label i = 6
.label center_dist = $14
jsr initSquareTables
.label center_y = $25
jsr init_dist_screen
lda #<SCREEN_COPY
sta dst
lda #>SCREEN_COPY
@ -147,13 +152,11 @@ main: {
b3:
// Main loop
jsr getCharToProcess
ldx getCharToProcess.return_x
ldy getCharToProcess.return_y
lda center_dist+1
cmp #>NOT_FOUND
bne b5
lda center_dist
cmp #<NOT_FOUND
ldy getCharToProcess.return_x
lda getCharToProcess.return_y
sta center_y
txa
cmp #NOT_FOUND
bne b5
lda #'.'
sta SCREEN+$3e7
@ -161,42 +164,41 @@ main: {
inc COLS+$3e7
jmp b7
b5:
stx startProcessing.center_x
sty startProcessing.center_y
sty startProcessing.center_x
jsr startProcessing
jmp b3
}
// Start processing a char - by inserting it into the PROCESSING array
// startProcessing(byte zeropage($20) center_x, byte zeropage($21) center_y)
// startProcessing(byte zeropage($26) center_x, byte zeropage($25) center_y)
startProcessing: {
.label _0 = $22
.label _1 = $22
.label _0 = $27
.label _1 = $27
.label _5 = $a
.label _6 = $a
.label _8 = 8
.label _9 = 8
.label _11 = $29
.label _12 = $29
.label _13 = $29
.label _15 = $2b
.label _16 = $2b
.label _17 = $2b
.label _23 = $2e
.label center_x = $20
.label center_y = $21
.label _11 = $2e
.label _12 = $2e
.label _13 = $2e
.label _15 = $30
.label _16 = $30
.label _17 = $30
.label _23 = $33
.label center_x = $26
.label center_y = $25
.label i = 7
.label offset = $22
.label colPtr = $26
.label spriteCol = $28
.label screenPtr = $22
.label offset = $27
.label colPtr = $2b
.label spriteCol = $2d
.label screenPtr = $27
.label spriteData = $a
.label chargenData = 8
.label spriteX = $29
.label spriteY = $2b
.label spritePtr = $2d
.label spriteX = $2e
.label spriteY = $30
.label spritePtr = $32
.label freeIdx = 7
.label _47 = $24
.label _48 = $22
.label _47 = $29
.label _48 = $27
ldx #$ff
b1:
lda #0
@ -450,156 +452,121 @@ startProcessing: {
// Find the non-space char closest to the center of the screen
// If no non-space char is found the distance will be 0xffff
getCharToProcess: {
.label _9 = $30
.label _10 = $30
.label _11 = $30
.label return_dist = $14
.label x = $f
.label dist = $14
.label _8 = $35
.label _9 = $35
.label _10 = $35
.label screen_line = $c
.label y = $e
.label dist_line = $e
.label y = $10
.label return_x = $12
.label return_y = $13
.label closest_dist = $10
.label closest_dist = $11
.label closest_x = $12
.label closest_y = $13
.label _15 = $32
.label _16 = $30
.label _12 = $37
.label _13 = $35
lda #0
sta closest_y
sta closest_x
lda #<NOT_FOUND
sta closest_dist
lda #>NOT_FOUND
sta closest_dist+1
lda #0
sta y
lda #NOT_FOUND
sta closest_dist
lda #<SCREEN_DIST
sta dist_line
lda #>SCREEN_DIST
sta dist_line+1
lda #<SCREEN_COPY
sta screen_line
lda #>SCREEN_COPY
sta screen_line+1
b1:
lda #0
sta x
ldy #0
b2:
ldy x
lda (screen_line),y
cmp #' '
bne !b11+
jmp b11
!b11:
tya
asl
lda (dist_line),y
tax
lda y
asl
tay
lda SQUARES_X,x
clc
adc SQUARES_Y,y
sta dist
lda SQUARES_X+1,x
adc SQUARES_Y+1,y
sta dist+1
lda closest_dist+1
cmp dist+1
bne !+
lda closest_dist
cmp dist
bne !b12+
jmp b12
!b12:
!:
bcs !b12+
jmp b12
!b12:
lda x
sta return_x
cpx closest_dist
bcs b12
sty return_x
lda y
sta return_y
b3:
inc x
lda #$28
cmp x
iny
cpy #$28
bne b10
lda #$28
clc
adc screen_line
sta screen_line
bcc !+
inc screen_line+1
!:
lda #$28
clc
adc dist_line
sta dist_line
bcc !+
inc dist_line+1
!:
inc y
lda #$19
cmp y
bne b9
lda return_dist
cmp #<NOT_FOUND
bne !+
lda return_dist+1
cmp #>NOT_FOUND
cpx #NOT_FOUND
beq breturn
!:
lda return_y
sta _9
sta _8
lda #0
sta _9+1
lda _9
sta _8+1
lda _8
asl
sta _15
lda _9+1
sta _12
lda _8+1
rol
sta _15+1
asl _15
rol _15+1
lda _16
sta _12+1
asl _12
rol _12+1
lda _13
clc
adc _15
sta _16
lda _16+1
adc _15+1
sta _16+1
asl _10
rol _10+1
asl _10
rol _10+1
asl _10
rol _10+1
adc _12
sta _13
lda _13+1
adc _12+1
sta _13+1
asl _9
rol _9+1
asl _9
rol _9+1
asl _9
rol _9+1
clc
lda _11
lda _10
adc #<SCREEN_COPY
sta _11
lda _11+1
sta _10
lda _10+1
adc #>SCREEN_COPY
sta _11+1
sta _10+1
// clear the found char on the screen copy
lda #' '
ldy return_x
sta (_11),y
sta (_10),y
breturn:
rts
b9:
lda return_dist
sta closest_dist
lda return_dist+1
sta closest_dist+1
stx closest_dist
jmp b1
b10:
lda return_dist
sta closest_dist
lda return_dist+1
sta closest_dist+1
stx closest_dist
jmp b2
b12:
lda closest_dist
sta return_dist
lda closest_dist+1
sta return_dist+1
ldx closest_dist
jmp b3
b11:
lda closest_dist
sta return_dist
lda closest_dist+1
sta return_dist+1
ldx closest_dist
jmp b3
}
// Setup Raster IRQ
@ -632,7 +599,7 @@ setupRasterIrq: {
}
// Initialize sprites
initSprites: {
.label sp = $16
.label sp = $14
lda #<SPRITE_DATA
sta sp
lda #>SPRITE_DATA
@ -668,106 +635,275 @@ initSprites: {
sta SPRITES_EXPAND_Y
rts
}
// initialize SQUARES table
initSquareTables: {
.label _6 = $1a
.label _14 = $1a
.label x = $18
.label y = $19
lda #0
sta x
b1:
lda x
cmp #$14
bcc b2
sec
sbc #$14
b4:
tax
sta mul8u.mb
lda #0
sta mul8u.mb+1
jsr mul8u
lda x
asl
tay
lda _6
sta SQUARES_X,y
lda _6+1
sta SQUARES_X+1,y
inc x
lda #$28
cmp x
bne b1
// 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: {
.label yds = $39
.label xds = $3b
.label ds = $3b
.label x = $1b
.label xb = $1c
.label screen_topline = $17
.label screen_bottomline = $19
.label y = $16
jsr init_squares
lda #<SCREEN_DIST+$28*$18
sta screen_bottomline
lda #>SCREEN_DIST+$28*$18
sta screen_bottomline+1
lda #<SCREEN_DIST
sta screen_topline
lda #>SCREEN_DIST
sta screen_topline+1
lda #0
sta y
b5:
lda y
cmp #$c
bcc b6
sec
sbc #$c
b8:
tax
sta mul8u.mb
lda #0
sta mul8u.mb+1
jsr mul8u
b1:
lda y
asl
tay
lda _14
sta SQUARES_Y,y
lda _14+1
sta SQUARES_Y+1,y
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 #$19
lda #$d
cmp y
bne b5
bne b1
rts
b6:
lda #$c
sec
sbc y
sbc #$27
jmp b8
b2:
lda #$14
sec
sbc x
sbc #$18
jmp b4
}
// Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word
// mul8u(byte register(X) a, byte register(A) b)
mul8u: {
.label mb = $1c
.label res = $1a
.label return = $1a
lda #0
sta res
sta res+1
b1:
cpx #0
bne b2
// 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($3b) val)
sqrt: {
.label _1 = $1d
.label _3 = $1d
.label found = $1d
.label val = $3b
jsr bsearch16u
lda _3
sec
sbc #<SQUARES
sta _3
lda _3+1
sbc #>SQUARES
sta _3+1
lsr _1+1
ror _1
lda _1
rts
b2:
txa
and #1
cmp #0
beq b3
lda res
clc
adc mb
sta res
lda res+1
adc mb+1
sta res+1
}
// 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($3b) key, word* zeropage($1d) items, byte register(X) num)
bsearch16u: {
.label _2 = $1d
.label pivot = $3d
.label result = $3f
.label return = $1d
.label items = $1d
.label key = $3b
lda #<SQUARES
sta items
lda #>SQUARES
sta items+1
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
asl mb
rol mb+1
jmp b1
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 = $3b
.label return_2 = $39
asl
tay
lda SQUARES,y
sta return
lda SQUARES+1,y
sta return+1
rts
}
// Initialize squares table
// Uses iterative formula (x+1)^2 = x^2 + 2*x + 1
init_squares: {
.label squares = $21
.label sqr = $1f
jsr malloc
ldx #0
lda #<SQUARES
sta squares
lda #>SQUARES
sta squares+1
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: {
.label return = HEAP_START
rts
}
// Raster Interrupt at the bottom of the screen
irqBottom: {
@ -795,14 +931,14 @@ irqBottom: {
}
// Process any chars in the PROCESSING array
processChars: {
.label _15 = $39
.label _25 = $37
.label processing = $34
.label bitmask = $36
.label i = $1e
.label xpos = $37
.label ypos = $3b
.label numActive = $1f
.label _15 = $46
.label _25 = $44
.label processing = $41
.label bitmask = $43
.label i = $23
.label xpos = $44
.label ypos = $48
.label numActive = $24
lda #0
sta numActive
sta i
@ -1096,11 +1232,11 @@ irqTop: {
rti
}
// Copy of the screen used for finding chars to process
.align $100
SCREEN_COPY: .fill $3e8, 0
// SQUARES_X[i] = (i-20)*(i-20)
SQUARES_X: .fill 2*$28, 0
// SQUARES_Y[i] = (i-12)*(i-12)
SQUARES_Y: .fill 2*$19, 0
// Screen containing bytes representing the distance to the center
.align $100
SCREEN_DIST: .fill $3e8, 0
// Sprites currently being processed in the interrupt
PROCESSING: .fill $e*NUM_PROCESSING, 0
.pc = VXSIN "VXSIN"

View File

@ -19,7 +19,7 @@
[5] phi()
main: scope:[main] from @2
[6] phi()
[7] call initSquareTables
[7] call init_dist_screen
to:main::@1
main::@1: scope:[main] from main main::@1
[8] (byte*) main::dst#2 ← phi( main::@1/(byte*) main::dst#1 main/(const byte[$3e8]) SCREEN_COPY#0 )
@ -61,13 +61,13 @@ main::@4: scope:[main] from main::@5 main::@8
[35] call getCharToProcess
[36] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
[37] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
[38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
[38] (byte) getCharToProcess::return_dist#0 ← (byte) getCharToProcess::return_dist#1
to:main::@9
main::@9: scope:[main] from main::@4
[39] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
[40] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
[41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
[42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5
[41] (byte) main::center_dist#0 ← (byte) getCharToProcess::return_dist#0
[42] if((byte) main::center_dist#0!=(const byte) NOT_FOUND#0) goto main::@5
to:main::@6
main::@6: scope:[main] from main::@9
[43] *((const byte*) SCREEN#0+(word) $3e7) ← (byte) '.'
@ -176,292 +176,373 @@ getCharToProcess: scope:[getCharToProcess] from main::@4
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
[115] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
[115] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
[115] (word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const word) NOT_FOUND#0 getCharToProcess::@9/(word~) getCharToProcess::closest_dist#10 )
[115] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
[115] (byte) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const byte) NOT_FOUND#0 getCharToProcess::@9/(byte~) getCharToProcess::closest_dist#10 )
[115] (byte*) getCharToProcess::dist_line#6 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_DIST#0 getCharToProcess::@9/(byte*) getCharToProcess::dist_line#1 )
[115] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
to:getCharToProcess::@2
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
[116] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
[116] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
[116] (word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(word) getCharToProcess::closest_dist#8 getCharToProcess::@10/(word~) getCharToProcess::closest_dist#12 )
[116] (byte) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_dist#8 getCharToProcess::@10/(byte~) getCharToProcess::closest_dist#12 )
[116] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
[117] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
to:getCharToProcess::@4
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
[118] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1
[119] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1
[120] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
[121] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
[118] (byte) getCharToProcess::dist#0 ← *((byte*) getCharToProcess::dist_line#6 + (byte) getCharToProcess::x#2)
[119] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
to:getCharToProcess::@5
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
[122] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[123] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
[120] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[121] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
to:getCharToProcess::@3
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
[124] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
[124] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
[124] (word) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(word~) getCharToProcess::return_dist#5 getCharToProcess::@12/(word~) getCharToProcess::return_dist#6 getCharToProcess::@5/(word) getCharToProcess::dist#0 )
[125] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[126] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
[122] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
[122] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
[122] (byte) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(byte~) getCharToProcess::return_dist#5 getCharToProcess::@12/(byte~) getCharToProcess::return_dist#6 getCharToProcess::@5/(byte) getCharToProcess::dist#0 )
[123] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[124] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
to:getCharToProcess::@6
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
[127] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[128] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[129] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
[125] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[126] (byte*) getCharToProcess::dist_line#1 ← (byte*) getCharToProcess::dist_line#6 + (byte) $28
[127] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[128] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
to:getCharToProcess::@7
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
[130] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return
[129] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND#0) goto getCharToProcess::@return
to:getCharToProcess::@8
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
[131] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1
[132] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2
[133] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9
[134] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3
[135] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10
[136] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
[130] (word~) getCharToProcess::$8 ← (word)(byte) getCharToProcess::return_y#1
[131] (word) getCharToProcess::$12 ← (word~) getCharToProcess::$8 << (byte) 2
[132] (word) getCharToProcess::$13 ← (word) getCharToProcess::$12 + (word~) getCharToProcess::$8
[133] (word~) getCharToProcess::$9 ← (word) getCharToProcess::$13 << (byte) 3
[134] (byte*~) getCharToProcess::$10 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$9
[135] *((byte*~) getCharToProcess::$10 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
to:getCharToProcess::@return
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
[137] return
[136] return
to:@return
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
[138] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1
[137] (byte~) getCharToProcess::closest_dist#10 ← (byte) getCharToProcess::return_dist#1
to:getCharToProcess::@1
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
[139] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1
[138] (byte~) getCharToProcess::closest_dist#12 ← (byte) getCharToProcess::return_dist#1
to:getCharToProcess::@2
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
[140] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2
[139] (byte~) getCharToProcess::return_dist#6 ← (byte) getCharToProcess::closest_dist#2
to:getCharToProcess::@3
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
[141] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2
[140] (byte~) getCharToProcess::return_dist#5 ← (byte) getCharToProcess::closest_dist#2
to:getCharToProcess::@3
setupRasterIrq: scope:[setupRasterIrq] from main::@8
asm { sei }
[143] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
[144] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[145] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
[142] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
[143] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[144] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
to:setupRasterIrq::@1
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
[146] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
[145] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
to:setupRasterIrq::@2
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
[147] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
[148] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
[149] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
[146] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
[147] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
[148] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
asm { cli }
to:setupRasterIrq::@return
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
[151] return
[150] return
to:@return
initSprites: scope:[initSprites] from main::@3
[152] phi()
[151] phi()
to:initSprites::@1
initSprites::@1: scope:[initSprites] from initSprites initSprites::@1
[153] (byte*) initSprites::sp#2 ← phi( initSprites/(const byte*) SPRITE_DATA#0 initSprites::@1/(byte*) initSprites::sp#1 )
[154] *((byte*) initSprites::sp#2) ← (byte) 0
[155] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
[156] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1
[152] (byte*) initSprites::sp#2 ← phi( initSprites/(const byte*) SPRITE_DATA#0 initSprites::@1/(byte*) initSprites::sp#1 )
[153] *((byte*) initSprites::sp#2) ← (byte) 0
[154] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
[155] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1
to:initSprites::@2
initSprites::@2: scope:[initSprites] from initSprites::@1 initSprites::@2
[157] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@2/(byte) initSprites::i#1 )
[158] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0
[159] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
[160] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2
[156] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@2/(byte) initSprites::i#1 )
[157] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0
[158] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
[159] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2
to:initSprites::@3
initSprites::@3: scope:[initSprites] from initSprites::@2
[161] *((const byte*) SPRITES_MC#0) ← (byte) 0
[162] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0
[163] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0
[160] *((const byte*) SPRITES_MC#0) ← (byte) 0
[161] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0
[162] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0
to:initSprites::@return
initSprites::@return: scope:[initSprites] from initSprites::@3
[164] return
[163] return
to:@return
initSquareTables: scope:[initSquareTables] from main
[165] phi()
to:initSquareTables::@1
initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@9
[166] (byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) 0 initSquareTables::@9/(byte) initSquareTables::x#1 )
[167] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
to:initSquareTables::@3
initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1
[168] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14
to:initSquareTables::@4
initSquareTables::@4: scope:[initSquareTables] from initSquareTables::@2 initSquareTables::@3
[169] (byte) initSquareTables::x_dist#0 ← phi( initSquareTables::@2/(byte~) initSquareTables::$4 initSquareTables::@3/(byte~) initSquareTables::$2 )
[170] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0
[171] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
[172] call mul8u
[173] (word) mul8u::return#2 ← (word) mul8u::res#2
to:initSquareTables::@9
initSquareTables::@9: scope:[initSquareTables] from initSquareTables::@4
[174] (word~) initSquareTables::$6 ← (word) mul8u::return#2
[175] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1
[176] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6
[177] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2
[178] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1
to:initSquareTables::@5
initSquareTables::@5: scope:[initSquareTables] from initSquareTables::@10 initSquareTables::@9
[179] (byte) initSquareTables::y#2 ← phi( initSquareTables::@10/(byte) initSquareTables::y#1 initSquareTables::@9/(byte) 0 )
[180] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6
to:initSquareTables::@7
initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@5
[181] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c
to:initSquareTables::@8
initSquareTables::@8: scope:[initSquareTables] from initSquareTables::@6 initSquareTables::@7
[182] (byte) initSquareTables::y_dist#0 ← phi( initSquareTables::@6/(byte~) initSquareTables::$12 initSquareTables::@7/(byte~) initSquareTables::$10 )
[183] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0
[184] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
[185] call mul8u
[186] (word) mul8u::return#3 ← (word) mul8u::res#2
to:initSquareTables::@10
initSquareTables::@10: scope:[initSquareTables] from initSquareTables::@8
[187] (word~) initSquareTables::$14 ← (word) mul8u::return#3
[188] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1
[189] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14
[190] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2
[191] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5
to:initSquareTables::@return
initSquareTables::@return: scope:[initSquareTables] from initSquareTables::@10
[192] return
init_dist_screen: scope:[init_dist_screen] from main
[164] phi()
[165] call init_squares
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9
[166] (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 )
[166] (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 )
[166] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 )
[167] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[168] 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
[169] (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
[170] (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 )
[171] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[172] call sqr
[173] (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
[174] (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
[175] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 )
[175] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 )
[176] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[177] 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
[178] (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
[179] (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 )
[180] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[181] call sqr
[182] (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
[183] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[184] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[185] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[186] call sqrt
[187] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:init_dist_screen::@12
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11
[188] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[189] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[190] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[191] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[192] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[193] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[194] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[195] 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
[196] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[197] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[198] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[199] 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
[200] return
to:@return
initSquareTables::@6: scope:[initSquareTables] from initSquareTables::@5
[193] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2
to:initSquareTables::@8
initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1
[194] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2
to:initSquareTables::@4
mul8u: scope:[mul8u] from initSquareTables::@4 initSquareTables::@8
[195] (byte) mul8u::a#6 ← phi( initSquareTables::@8/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 )
[195] (word) mul8u::mb#0 ← phi( initSquareTables::@8/(byte) mul8u::b#1 initSquareTables::@4/(byte) mul8u::b#0 )
to:mul8u::@1
mul8u::@1: scope:[mul8u] from mul8u mul8u::@3
[196] (word) mul8u::mb#2 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@3/(word) mul8u::mb#1 )
[196] (word) mul8u::res#2 ← phi( mul8u/(byte) 0 mul8u::@3/(word) mul8u::res#6 )
[196] (byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@3/(byte) mul8u::a#0 )
[197] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
to:mul8u::@return
mul8u::@return: scope:[mul8u] from mul8u::@1
[198] return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[201] (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
[202] (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
[203] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[204] call bsearch16u
[205] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[206] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[207] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1
[208] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[209] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[210] return
to:@return
bsearch16u: scope:[bsearch16u] from sqrt
[211] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[212] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[212] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[213] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[214] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[215] (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
[216] (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
[217] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[218] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[219] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[220] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[221] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[222] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[223] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[224] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[225] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[226] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[227] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[228] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[228] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[229] (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
[230] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[231] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[232] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[233] return
to:@return
init_squares: scope:[init_squares] from init_dist_screen
[234] phi()
[235] call malloc
to:init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares init_squares::@1
[236] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 )
[236] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 )
[236] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 )
[237] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[238] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[239] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[240] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[241] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[242] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[243] 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
[244] return
to:@return
malloc: scope:[malloc] from init_squares
[245] phi()
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[246] return
to:@return
mul8u::@2: scope:[mul8u] from mul8u::@1
[199] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1
[200] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3
to:mul8u::@4
mul8u::@4: scope:[mul8u] from mul8u::@2
[201] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2
to:mul8u::@3
mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4
[202] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 )
[203] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1
[204] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1
to:mul8u::@1
irqBottom: scope:[irqBottom] from
[205] phi()
[247] phi()
to:irqBottom::@1
irqBottom::@1: scope:[irqBottom] from irqBottom
[206] phi()
[207] call processChars
[248] phi()
[249] call processChars
to:irqBottom::@2
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
[208] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[209] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[210] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[250] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[251] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[252] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
to:irqBottom::@return
irqBottom::@return: scope:[irqBottom] from irqBottom::@2
[211] return
[253] return
to:@return
processChars: scope:[processChars] from irqBottom::@1
[212] phi()
[254] phi()
to:processChars::@1
processChars::@1: scope:[processChars] from processChars processChars::@2
[213] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[213] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[214] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1
[215] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10
[216] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1
[217] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10
[218] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1
[219] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37
[220] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[221] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2
[255] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[255] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[256] (byte) processChars::$67 ← (byte) processChars::i#10 << (byte) 1
[257] (byte) processChars::$68 ← (byte) processChars::$67 + (byte) processChars::i#10
[258] (byte) processChars::$69 ← (byte) processChars::$68 << (byte) 1
[259] (byte) processChars::$70 ← (byte) processChars::$69 + (byte) processChars::i#10
[260] (byte~) processChars::$37 ← (byte) processChars::$70 << (byte) 1
[261] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37
[262] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[263] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE) goto processChars::@2
to:processChars::@10
processChars::@10: scope:[processChars] from processChars::@1
[222] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3
[264] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW) goto processChars::@3
to:processChars::@11
processChars::@11: scope:[processChars] from processChars::@10
[223] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[224] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[225] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL)
[226] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
[227] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING
[265] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[266] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[267] *((const byte*) SPRITES_COLS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL)
[268] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
[269] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING
to:processChars::@3
processChars::@3: scope:[processChars] from processChars::@10 processChars::@11
[228] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
[229] (byte~) processChars::$11 ← > (word) processChars::xpos#0
[230] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4
[270] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
[271] (byte~) processChars::$11 ← > (word) processChars::xpos#0
[272] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4
to:processChars::@8
processChars::@8: scope:[processChars] from processChars::@3
[231] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0
[232] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12
[273] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0
[274] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12
to:processChars::@5
processChars::@5: scope:[processChars] from processChars::@4 processChars::@8
[233] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1
[234] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0
[235] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14
[236] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[237] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15
[238] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0
[239] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
[275] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1
[276] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0
[277] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14
[278] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[279] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15
[280] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0
[281] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
to:processChars::@14
processChars::@14: scope:[processChars] from processChars::@5
[240] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6
[282] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6
to:processChars::@13
processChars::@13: scope:[processChars] from processChars::@14
[241] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6
[283] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6
to:processChars::@12
processChars::@12: scope:[processChars] from processChars::@13
[242] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6
[284] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6
to:processChars::@9
processChars::@9: scope:[processChars] from processChars::@12
[243] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3
[244] (byte~) processChars::$26 ← (byte)(word~) processChars::$25
[245] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8
[246] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1
[247] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38)
[248] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[249] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3
[250] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8
[251] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1
[252] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39)
[253] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
[285] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3
[286] (byte~) processChars::$26 ← (byte)(word~) processChars::$25
[287] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8
[288] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1
[289] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38)
[290] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[291] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3
[292] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8
[293] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1
[294] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39)
[295] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
to:processChars::@7
processChars::@7: scope:[processChars] from processChars::@6 processChars::@9
[254] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
[296] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
to:processChars::@2
processChars::@2: scope:[processChars] from processChars::@1 processChars::@7
[255] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[256] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[257] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
[297] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[298] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[299] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
to:processChars::@return
processChars::@return: scope:[processChars] from processChars::@2
[258] return
[300] return
to:@return
processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5
[259] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE
[260] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0
[261] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33
[301] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE
[302] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0
[303] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33
to:processChars::@7
processChars::@4: scope:[processChars] from processChars::@3
[262] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
[304] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
to:processChars::@5
irqTop: scope:[irqTop] from
[263] phi()
[305] phi()
to:irqTop::@1
irqTop::@1: scope:[irqTop] from irqTop
[264] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[265] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[266] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[306] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[307] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[308] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
to:irqTop::@return
irqTop::@return: scope:[irqTop] from irqTop::@1
[267] return
[309] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,8 @@
(bool) DEBUG
(void()**) HARDWARE_IRQ
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534
(byte*) HEAP_START
(const byte*) HEAP_START#0 HEAP_START = (byte*) 49152
(byte*) IRQ_ENABLE
(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274
(byte) IRQ_RASTER
@ -32,10 +34,12 @@
(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273
(byte) LIGHT_BLUE
(const byte) LIGHT_BLUE#0 LIGHT_BLUE = (byte) $e
(word) NOT_FOUND
(const word) NOT_FOUND#0 NOT_FOUND = (word) $ffff
(byte) NOT_FOUND
(const byte) NOT_FOUND#0 NOT_FOUND = (byte) $ff
(byte) NUM_PROCESSING
(const byte) NUM_PROCESSING#0 NUM_PROCESSING = (byte) 8
(byte) NUM_SQUARES
(const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL OFFSET_STRUCT_PROCESSINGSPRITE_COL = (byte) $a
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 8
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 9
@ -56,7 +60,7 @@
(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte) $31
(byte) PROCPORT_RAM_IO
(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35
(word) ProcessingChar::dist
(byte) ProcessingChar::dist
(byte) ProcessingChar::x
(byte) ProcessingChar::y
(byte) ProcessingSprite::col
@ -78,6 +82,9 @@
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte[$3e8]) SCREEN_COPY
(const byte[$3e8]) SCREEN_COPY#0 SCREEN_COPY = { fill( $3e8, 0) }
(byte[$3e8]) SCREEN_DIST
(const byte[$3e8]) SCREEN_DIST#0 SCREEN_DIST = { fill( $3e8, 0) }
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
(byte*) SPRITES_COLS
(const byte*) SPRITES_COLS#0 SPRITES_COLS = (byte*) 53287
(byte*) SPRITES_ENABLE
@ -98,10 +105,8 @@
(const byte*) SPRITE_DATA#0 SPRITE_DATA = (byte*) 8192
(word) SPRITE_PTRS
(const word) SPRITE_PTRS#0 SPRITE_PTRS = (word) $3f8
(word[$28]) SQUARES_X
(const word[$28]) SQUARES_X#0 SQUARES_X = { fill( $28, 0) }
(word[$19]) SQUARES_Y
(const word[$19]) SQUARES_Y#0 SQUARES_Y = { fill( $19, 0) }
(word*) SQUARES
(const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0
(const byte) STATUS_FREE STATUS_FREE = (byte) 0
(const byte) STATUS_NEW STATUS_NEW = (byte) 1
(const byte) STATUS_PROCESSING STATUS_PROCESSING = (byte) 2
@ -120,14 +125,46 @@
(const word) YPOS_BOTTOMMOST#0 YPOS_BOTTOMMOST = (word)(const byte) BORDER_YPOS_BOTTOM#0<<(byte) 4
(word) YPOS_TOPMOST
(const word) YPOS_TOPMOST#0 YPOS_TOPMOST = (word)(const byte) BORDER_YPOS_TOP#0-(byte) 8<<(byte) 4
(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:29 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:29 1001.0
(word*) bsearch16u::items#2 items zp ZP_WORD:29 334.33333333333337
(word*) bsearch16u::items#8 items zp ZP_WORD:29 1501.5
(word) bsearch16u::key
(word) bsearch16u::key#0 key zp ZP_WORD:59 0.2857142857142857
(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:61 501.0
(signed word) bsearch16u::result
(signed word) bsearch16u::result#0 result zp ZP_WORD:63 1501.5
(word*) bsearch16u::return
(word*) bsearch16u::return#1 return zp ZP_WORD:29 2.0
(word*) bsearch16u::return#2 return zp ZP_WORD:29 6.0
(word*) bsearch16u::return#3 return zp ZP_WORD:29 4.0
(word*~) bsearch16u::return#6 return zp ZP_WORD:29 4.0
(struct ProcessingChar()) getCharToProcess()
(word~) getCharToProcess::$10 $10 zp ZP_WORD:48 4.0
(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:48 4.0
(byte~) getCharToProcess::$13 reg byte x 1001.0
(byte~) getCharToProcess::$14 reg byte a 2002.0
(word) getCharToProcess::$15 $15 zp ZP_WORD:50 4.0
(word) getCharToProcess::$16 $16 zp ZP_WORD:48 4.0
(word~) getCharToProcess::$9 $9 zp ZP_WORD:48 3.0
(byte*~) getCharToProcess::$10 $10 zp ZP_WORD:53 4.0
(word) getCharToProcess::$12 $12 zp ZP_WORD:55 4.0
(word) getCharToProcess::$13 $13 zp ZP_WORD:53 4.0
(word~) getCharToProcess::$8 $8 zp ZP_WORD:53 3.0
(word~) getCharToProcess::$9 $9 zp ZP_WORD:53 4.0
(label) getCharToProcess::@1
(label) getCharToProcess::@10
(label) getCharToProcess::@11
@ -141,42 +178,46 @@
(label) getCharToProcess::@8
(label) getCharToProcess::@9
(label) getCharToProcess::@return
(word) getCharToProcess::closest_dist
(word~) getCharToProcess::closest_dist#10 closest_dist zp ZP_WORD:16 202.0
(word~) getCharToProcess::closest_dist#12 closest_dist zp ZP_WORD:16 2002.0
(word) getCharToProcess::closest_dist#2 closest_dist zp ZP_WORD:16 684.1666666666667
(word) getCharToProcess::closest_dist#8 closest_dist zp ZP_WORD:16 202.0
(byte) getCharToProcess::closest_dist
(byte~) getCharToProcess::closest_dist#10 closest_dist zp ZP_BYTE:17 202.0
(byte~) getCharToProcess::closest_dist#12 closest_dist zp ZP_BYTE:17 2002.0
(byte) getCharToProcess::closest_dist#2 closest_dist zp ZP_BYTE:17 1026.25
(byte) getCharToProcess::closest_dist#8 closest_dist zp ZP_BYTE:17 202.0
(byte) getCharToProcess::closest_x
(byte) getCharToProcess::closest_x#7 closest_x zp ZP_BYTE:18 388.0
(byte) getCharToProcess::closest_x#7 closest_x zp ZP_BYTE:18 517.3333333333334
(byte) getCharToProcess::closest_x#9 closest_x zp ZP_BYTE:18 202.0
(byte) getCharToProcess::closest_y
(byte) getCharToProcess::closest_y#7 closest_y zp ZP_BYTE:19 388.0
(byte) getCharToProcess::closest_y#7 closest_y zp ZP_BYTE:19 517.3333333333334
(byte) getCharToProcess::closest_y#9 closest_y zp ZP_BYTE:19 202.0
(word) getCharToProcess::dist
(word) getCharToProcess::dist#0 dist zp ZP_WORD:20 750.75
(byte) getCharToProcess::dist
(byte) getCharToProcess::dist#0 reg byte x 750.75
(byte*) getCharToProcess::dist_line
(byte*) getCharToProcess::dist_line#1 dist_line zp ZP_WORD:14 50.5
(byte*) getCharToProcess::dist_line#6 dist_line zp ZP_WORD:14 85.92857142857142
(struct ProcessingChar) getCharToProcess::return
(word) getCharToProcess::return_dist
(word) getCharToProcess::return_dist#0 return_dist zp ZP_WORD:20 7.333333333333333
(word) getCharToProcess::return_dist#1 return_dist zp ZP_WORD:20 242.23529411764704
(word~) getCharToProcess::return_dist#5 return_dist zp ZP_WORD:20 2002.0
(word~) getCharToProcess::return_dist#6 return_dist zp ZP_WORD:20 2002.0
(byte) getCharToProcess::return_dist
(byte) getCharToProcess::return_dist#0 reg byte x 7.333333333333333
(byte) getCharToProcess::return_dist#1 reg byte x 228.7777777777778
(byte~) getCharToProcess::return_dist#5 reg byte x 2002.0
(byte~) getCharToProcess::return_dist#6 reg byte x 2002.0
(byte) getCharToProcess::return_x
(byte) getCharToProcess::return_x#0 reg byte x 7.333333333333333
(byte) getCharToProcess::return_x#1 return_x zp ZP_BYTE:18 242.23529411764704
(byte) getCharToProcess::return_x#0 reg byte y 7.333333333333333
(byte) getCharToProcess::return_x#1 return_x zp ZP_BYTE:18 228.7777777777778
(byte~) getCharToProcess::return_x#7 return_x zp ZP_BYTE:18 1001.0
(byte) getCharToProcess::return_y
(byte) getCharToProcess::return_y#0 reg byte y 7.333333333333333
(byte) getCharToProcess::return_y#1 return_y zp ZP_BYTE:19 228.66666666666669
(byte) getCharToProcess::return_y#0 reg byte a 7.333333333333333
(byte) getCharToProcess::return_y#1 return_y zp ZP_BYTE:19 216.6315789473684
(byte~) getCharToProcess::return_y#7 return_y zp ZP_BYTE:19 2002.0
(byte*) getCharToProcess::screen_line
(byte*) getCharToProcess::screen_line#1 screen_line zp ZP_WORD:12 50.5
(byte*) getCharToProcess::screen_line#4 screen_line zp ZP_WORD:12 80.2
(byte*) getCharToProcess::screen_line#1 screen_line zp ZP_WORD:12 40.4
(byte*) getCharToProcess::screen_line#4 screen_line zp ZP_WORD:12 92.53846153846155
(byte) getCharToProcess::x
(byte) getCharToProcess::x#1 x zp ZP_BYTE:15 1001.0
(byte) getCharToProcess::x#2 x zp ZP_BYTE:15 455.0
(byte) getCharToProcess::x#1 reg byte y 1001.0
(byte) getCharToProcess::x#2 reg byte y 556.1111111111111
(byte) getCharToProcess::y
(byte) getCharToProcess::y#1 y zp ZP_BYTE:14 101.0
(byte) getCharToProcess::y#7 y zp ZP_BYTE:14 137.75
(byte) getCharToProcess::y#1 y zp ZP_BYTE:16 101.0
(byte) getCharToProcess::y#7 y zp ZP_BYTE:16 80.2
(byte*) heap_head
(void()) initSprites()
(label) initSprites::@1
(label) initSprites::@2
@ -186,38 +227,72 @@
(byte) initSprites::i#1 reg byte x 16.5
(byte) initSprites::i#2 reg byte x 16.5
(byte*) initSprites::sp
(byte*) initSprites::sp#1 sp zp ZP_WORD:22 16.5
(byte*) initSprites::sp#2 sp zp ZP_WORD:22 16.5
(void()) initSquareTables()
(byte~) initSquareTables::$10 reg byte a 22.0
(byte~) initSquareTables::$12 reg byte a 22.0
(word~) initSquareTables::$14 $14 zp ZP_WORD:26 11.0
(byte~) initSquareTables::$16 reg byte a 22.0
(byte~) initSquareTables::$17 reg byte a 22.0
(byte~) initSquareTables::$2 reg byte a 22.0
(byte~) initSquareTables::$4 reg byte a 22.0
(word~) initSquareTables::$6 $6 zp ZP_WORD:26 11.0
(label) initSquareTables::@1
(label) initSquareTables::@10
(label) initSquareTables::@2
(label) initSquareTables::@3
(label) initSquareTables::@4
(label) initSquareTables::@5
(label) initSquareTables::@6
(label) initSquareTables::@7
(label) initSquareTables::@8
(label) initSquareTables::@9
(label) initSquareTables::@return
(byte) initSquareTables::x
(byte) initSquareTables::x#1 x zp ZP_BYTE:24 16.5
(byte) initSquareTables::x#2 x zp ZP_BYTE:24 5.5
(byte) initSquareTables::x_dist
(byte) initSquareTables::x_dist#0 reg byte a 22.0
(byte) initSquareTables::y
(byte) initSquareTables::y#1 y zp ZP_BYTE:25 16.5
(byte) initSquareTables::y#2 y zp ZP_BYTE:25 5.5
(byte) initSquareTables::y_dist
(byte) initSquareTables::y_dist#0 reg byte a 22.0
(byte*) initSprites::sp#1 sp zp ZP_WORD:20 16.5
(byte*) initSprites::sp#2 sp zp ZP_WORD:20 16.5
(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::@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:59 202.0
(byte*) init_dist_screen::screen
(byte*) init_dist_screen::screen_bottomline
(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:25 7.333333333333333
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:25 6.787878787878788
(byte*) init_dist_screen::screen_topline
(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:23 5.5
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:23 7.0
(byte) init_dist_screen::x
(byte) init_dist_screen::x#1 x zp ZP_BYTE:27 101.0
(byte) init_dist_screen::x#2 x zp ZP_BYTE:27 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:28 101.0
(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:28 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:59 202.0
(byte) init_dist_screen::y
(byte) init_dist_screen::y#1 y zp ZP_BYTE:22 16.5
(byte) init_dist_screen::y#10 y zp ZP_BYTE:22 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:57 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::@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:31 7.333333333333333
(word) init_squares::sqr#2 sqr zp ZP_WORD:31 6.6000000000000005
(word*) init_squares::squares
(word*) init_squares::squares#1 squares zp ZP_WORD:33 3.6666666666666665
(word*) init_squares::squares#2 squares zp ZP_WORD:33 16.5
interrupt(HARDWARE_ALL)(void()) irqBottom()
(label) irqBottom::@1
(label) irqBottom::@2
@ -244,12 +319,12 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) main::@7
(label) main::@8
(label) main::@9
(word) main::center_dist
(word) main::center_dist#0 center_dist zp ZP_WORD:20 22.0
(byte) main::center_dist
(byte) main::center_dist#0 reg byte a 22.0
(byte) main::center_x
(byte) main::center_x#0 reg byte x 5.5
(byte) main::center_x#0 reg byte y 5.5
(byte) main::center_y
(byte) main::center_y#0 reg byte y 5.5
(byte) main::center_y#0 center_y zp ZP_BYTE:37 5.5
(byte*) main::dst
(byte*) main::dst#1 dst zp ZP_WORD:4 11.0
(byte*) main::dst#2 dst zp ZP_WORD:4 11.0
@ -259,40 +334,19 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte*) main::src
(byte*) main::src#1 src zp ZP_WORD:2 11.0
(byte*) main::src#2 src zp ZP_WORD:2 16.5
(word()) mul8u((byte) mul8u::a , (byte) mul8u::b)
(byte~) mul8u::$1 reg byte a 202.0
(label) mul8u::@1
(label) mul8u::@2
(label) mul8u::@3
(label) mul8u::@4
(label) mul8u::@return
(byte) mul8u::a
(byte) mul8u::a#0 reg byte x 101.0
(byte) mul8u::a#1 reg byte x 11.0
(byte) mul8u::a#2 reg byte x 11.0
(byte) mul8u::a#3 reg byte x 67.66666666666666
(byte) mul8u::a#6 reg byte x 24.0
(byte) mul8u::b
(byte) mul8u::b#0 reg byte a 22.0
(byte) mul8u::b#1 reg byte a 22.0
(word) mul8u::mb
(word) mul8u::mb#0 mb zp ZP_WORD:28 24.0
(word) mul8u::mb#1 mb zp ZP_WORD:28 202.0
(word) mul8u::mb#2 mb zp ZP_WORD:28 43.57142857142858
(word) mul8u::res
(word) mul8u::res#1 res zp ZP_WORD:26 202.0
(word) mul8u::res#2 res zp ZP_WORD:26 46.42857142857143
(word) mul8u::res#6 res zp ZP_WORD:26 101.0
(word) mul8u::return
(word) mul8u::return#2 return zp ZP_WORD:26 22.0
(word) mul8u::return#3 return zp ZP_WORD:26 22.0
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
(void*) malloc::return
(const void*) malloc::return#0 return = (void*)(const byte*) HEAP_START#0
(word) malloc::size
(void()) processChars()
(byte~) processChars::$11 reg byte a 22.0
(byte~) processChars::$12 reg byte a 22.0
(byte~) processChars::$14 reg byte a 22.0
(word~) processChars::$15 $15 zp ZP_WORD:57 11.0
(word~) processChars::$15 $15 zp ZP_WORD:70 11.0
(byte~) processChars::$17 reg byte x 6.6000000000000005
(word~) processChars::$25 $25 zp ZP_WORD:55 11.0
(word~) processChars::$25 $25 zp ZP_WORD:68 11.0
(byte~) processChars::$26 reg byte a 22.0
(byte~) processChars::$30 reg byte a 22.0
(byte~) processChars::$33 reg byte a 22.0
@ -319,24 +373,24 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) processChars::@9
(label) processChars::@return
(byte) processChars::bitmask
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:54 2.2
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:67 2.2
(byte) processChars::i
(byte) processChars::i#1 i zp ZP_BYTE:30 16.5
(byte) processChars::i#10 i zp ZP_BYTE:30 1.4042553191489362
(byte) processChars::i#1 i zp ZP_BYTE:35 16.5
(byte) processChars::i#10 i zp ZP_BYTE:35 1.4042553191489362
(byte) processChars::numActive
(byte) processChars::numActive#1 numActive zp ZP_BYTE:31 22.0
(byte) processChars::numActive#10 numActive zp ZP_BYTE:31 0.7333333333333333
(byte) processChars::numActive#3 numActive zp ZP_BYTE:31 11.0
(byte) processChars::numActive#1 numActive zp ZP_BYTE:36 22.0
(byte) processChars::numActive#10 numActive zp ZP_BYTE:36 0.7333333333333333
(byte) processChars::numActive#3 numActive zp ZP_BYTE:36 11.0
(struct ProcessingSprite*) processChars::processing
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:52 0.3142857142857143
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:65 0.3142857142857143
(byte) processChars::xchar
(byte) processChars::xchar#0 reg byte a 22.0
(word) processChars::xpos
(word) processChars::xpos#0 xpos zp ZP_WORD:55 2.0625
(word) processChars::xpos#0 xpos zp ZP_WORD:68 2.0625
(byte) processChars::ychar
(byte) processChars::ychar#0 reg byte a 22.0
(byte) processChars::ypos
(byte) processChars::ypos#0 ypos zp ZP_BYTE:59 2.75
(byte) processChars::ypos#0 ypos zp ZP_BYTE:72 2.75
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
(label) setupRasterIrq::@1
(label) setupRasterIrq::@2
@ -344,25 +398,49 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(void()*) setupRasterIrq::irqRoutine
(const void()*) setupRasterIrq::irqRoutine#0 irqRoutine = &interrupt(HARDWARE_ALL)(void()) irqTop()
(word) setupRasterIrq::raster
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist)
(word~) startProcessing::$0 $0 zp ZP_WORD:34 3.0
(word~) startProcessing::$1 $1 zp ZP_WORD:34 4.0
(word~) startProcessing::$11 $11 zp ZP_WORD:41 4.0
(word~) startProcessing::$12 $12 zp ZP_WORD:41 4.0
(word~) startProcessing::$13 $13 zp ZP_WORD:41 4.0
(word~) startProcessing::$15 $15 zp ZP_WORD:43 4.0
(word~) startProcessing::$16 $16 zp ZP_WORD:43 4.0
(word~) startProcessing::$17 $17 zp ZP_WORD:43 4.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:59 28.5
(word) sqr::return#2 return#2 zp ZP_WORD:57 22.0
(word) sqr::return#3 return zp ZP_WORD:59 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:29 2.0
(word~) sqrt::$3 $3 zp ZP_WORD:29 4.0
(label) sqrt::@1
(label) sqrt::@return
(word*) sqrt::found
(word*) sqrt::found#0 found zp ZP_WORD:29 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:59 103.0
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (byte) startProcessing::center_dist)
(word~) startProcessing::$0 $0 zp ZP_WORD:39 3.0
(word~) startProcessing::$1 $1 zp ZP_WORD:39 4.0
(word~) startProcessing::$11 $11 zp ZP_WORD:46 4.0
(word~) startProcessing::$12 $12 zp ZP_WORD:46 4.0
(word~) startProcessing::$13 $13 zp ZP_WORD:46 4.0
(word~) startProcessing::$15 $15 zp ZP_WORD:48 4.0
(word~) startProcessing::$16 $16 zp ZP_WORD:48 4.0
(word~) startProcessing::$17 $17 zp ZP_WORD:48 4.0
(byte~) startProcessing::$22 reg byte a 2.0
(word~) startProcessing::$23 $23 zp ZP_WORD:46 0.5
(word~) startProcessing::$23 $23 zp ZP_WORD:51 0.5
(byte~) startProcessing::$30 reg byte a 2002.0
(byte~) startProcessing::$31 reg byte x 2.2222222222222228
(byte) startProcessing::$42 reg byte a 2002.0
(byte) startProcessing::$43 reg byte a 2002.0
(byte) startProcessing::$44 reg byte a 2002.0
(byte) startProcessing::$45 reg byte a 2002.0
(word) startProcessing::$47 $47 zp ZP_WORD:36 4.0
(word) startProcessing::$48 $48 zp ZP_WORD:34 4.0
(word) startProcessing::$47 $47 zp ZP_WORD:41 4.0
(word) startProcessing::$48 $48 zp ZP_WORD:39 4.0
(word~) startProcessing::$5 $5 zp ZP_WORD:10 4.0
(byte) startProcessing::$50 reg byte a 4.0
(byte) startProcessing::$51 reg byte a 4.0
@ -382,11 +460,11 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(label) startProcessing::@9
(label) startProcessing::@return
(struct ProcessingChar) startProcessing::center
(word) startProcessing::center_dist
(byte) startProcessing::center_dist
(byte) startProcessing::center_x
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:32 0.30952380952380953
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:38 0.30952380952380953
(byte) startProcessing::center_y
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:33 0.24444444444444444
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:37 0.24444444444444444
(byte) startProcessing::ch
(byte) startProcessing::ch#0 reg byte a 2.0
(byte*) startProcessing::chargenData
@ -394,7 +472,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte*) startProcessing::chargenData#1 chargenData zp ZP_WORD:8 67.33333333333333
(byte*) startProcessing::chargenData#2 chargenData zp ZP_WORD:8 101.66666666666666
(byte*) startProcessing::colPtr
(byte*) startProcessing::colPtr#0 colPtr zp ZP_WORD:38 4.0
(byte*) startProcessing::colPtr#0 colPtr zp ZP_WORD:43 4.0
(byte) startProcessing::freeIdx
(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:7 28.0
(byte) startProcessing::freeIdx#6 reg byte x 20.2
@ -407,22 +485,22 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) startProcessing::i1#1 reg byte x 151.5
(byte) startProcessing::i1#2 reg byte x 50.5
(word) startProcessing::offset
(word) startProcessing::offset#0 offset zp ZP_WORD:34 2.0
(word) startProcessing::offset#0 offset zp ZP_WORD:39 2.0
(byte*) startProcessing::screenPtr
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:34 0.14285714285714285
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:39 0.14285714285714285
(byte) startProcessing::spriteCol
(byte) startProcessing::spriteCol#0 spriteCol zp ZP_BYTE:40 0.0975609756097561
(byte) startProcessing::spriteCol#0 spriteCol zp ZP_BYTE:45 0.0975609756097561
(byte*) startProcessing::spriteData
(byte*) startProcessing::spriteData#0 spriteData zp ZP_WORD:10 0.5714285714285714
(byte*) startProcessing::spriteData#1 spriteData zp ZP_WORD:10 50.5
(byte*) startProcessing::spriteData#2 spriteData zp ZP_WORD:10 152.5
(byte) startProcessing::spriteIdx
(byte) startProcessing::spritePtr
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:45 0.3076923076923077
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:50 0.3076923076923077
(word) startProcessing::spriteX
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:41 0.3076923076923077
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:46 0.3076923076923077
(word) startProcessing::spriteY
(word) startProcessing::spriteY#0 spriteY zp ZP_WORD:43 0.4
(word) startProcessing::spriteY#0 spriteY zp ZP_WORD:48 0.4
zp ZP_WORD:2 [ main::src#2 main::src#1 ]
zp ZP_WORD:4 [ main::dst#2 main::dst#1 ]
@ -433,77 +511,92 @@ zp ZP_WORD:8 [ startProcessing::chargenData#2 startProcessing::chargenData#0 sta
zp ZP_WORD:10 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$6 startProcessing::$5 ]
reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ]
zp ZP_WORD:12 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ]
zp ZP_BYTE:14 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
zp ZP_BYTE:15 [ getCharToProcess::x#2 getCharToProcess::x#1 ]
zp ZP_WORD:16 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
zp ZP_WORD:14 [ getCharToProcess::dist_line#6 getCharToProcess::dist_line#1 ]
zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ]
reg byte y [ getCharToProcess::x#2 getCharToProcess::x#1 ]
zp ZP_BYTE:17 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ]
zp ZP_BYTE:18 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ]
zp ZP_BYTE:19 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ]
zp ZP_WORD:20 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ]
zp ZP_WORD:22 [ initSprites::sp#2 initSprites::sp#1 ]
reg byte x [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ]
zp ZP_WORD:20 [ initSprites::sp#2 initSprites::sp#1 ]
reg byte x [ initSprites::i#2 initSprites::i#1 ]
zp ZP_BYTE:24 [ initSquareTables::x#2 initSquareTables::x#1 ]
reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ]
zp ZP_BYTE:25 [ initSquareTables::y#2 initSquareTables::y#1 ]
reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ]
reg byte a [ mul8u::b#1 ]
reg byte a [ mul8u::b#0 ]
reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ]
zp ZP_WORD:26 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ]
zp ZP_WORD:28 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
zp ZP_BYTE:30 [ processChars::i#10 processChars::i#1 ]
zp ZP_BYTE:31 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ]
zp ZP_BYTE:22 [ init_dist_screen::y#10 init_dist_screen::y#1 ]
zp ZP_WORD:23 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ]
zp ZP_WORD:25 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ]
reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ]
zp ZP_BYTE:27 [ init_dist_screen::x#2 init_dist_screen::x#1 ]
zp ZP_BYTE:28 [ 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:29 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 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:31 [ init_squares::sqr#2 init_squares::sqr#1 ]
zp ZP_WORD:33 [ init_squares::squares#2 init_squares::squares#1 ]
reg byte x [ init_squares::i#2 init_squares::i#1 ]
zp ZP_BYTE:35 [ processChars::i#10 processChars::i#1 ]
zp ZP_BYTE:36 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ]
reg byte a [ main::$26 ]
reg byte a [ main::$27 ]
reg byte a [ main::$28 ]
reg byte a [ main::$29 ]
reg byte x [ main::$16 ]
reg byte x [ getCharToProcess::return_x#0 ]
reg byte y [ getCharToProcess::return_y#0 ]
reg byte x [ main::center_x#0 ]
reg byte y [ main::center_y#0 ]
zp ZP_BYTE:32 [ startProcessing::center_x#0 ]
zp ZP_BYTE:33 [ startProcessing::center_y#0 ]
reg byte y [ getCharToProcess::return_x#0 ]
reg byte a [ getCharToProcess::return_y#0 ]
reg byte x [ getCharToProcess::return_dist#0 ]
reg byte y [ main::center_x#0 ]
zp ZP_BYTE:37 [ main::center_y#0 startProcessing::center_y#0 ]
reg byte a [ main::center_dist#0 ]
zp ZP_BYTE:38 [ startProcessing::center_x#0 ]
reg byte a [ startProcessing::$42 ]
reg byte a [ startProcessing::$43 ]
reg byte a [ startProcessing::$44 ]
reg byte a [ startProcessing::$45 ]
reg byte a [ startProcessing::$30 ]
zp ZP_WORD:34 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ]
zp ZP_WORD:36 [ startProcessing::$47 ]
zp ZP_WORD:38 [ startProcessing::colPtr#0 ]
zp ZP_BYTE:40 [ startProcessing::spriteCol#0 ]
zp ZP_WORD:39 [ startProcessing::$0 startProcessing::$48 startProcessing::$1 startProcessing::offset#0 startProcessing::screenPtr#0 ]
zp ZP_WORD:41 [ startProcessing::$47 ]
zp ZP_WORD:43 [ startProcessing::colPtr#0 ]
zp ZP_BYTE:45 [ startProcessing::spriteCol#0 ]
reg byte a [ startProcessing::ch#0 ]
zp ZP_WORD:41 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ]
zp ZP_WORD:43 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ]
zp ZP_BYTE:45 [ startProcessing::spritePtr#0 ]
zp ZP_WORD:46 [ startProcessing::$11 startProcessing::$12 startProcessing::$13 startProcessing::spriteX#0 ]
zp ZP_WORD:48 [ startProcessing::$15 startProcessing::$16 startProcessing::$17 startProcessing::spriteY#0 ]
zp ZP_BYTE:50 [ startProcessing::spritePtr#0 ]
reg byte a [ startProcessing::$22 ]
zp ZP_WORD:46 [ startProcessing::$23 ]
zp ZP_WORD:51 [ startProcessing::$23 ]
reg byte a [ startProcessing::$50 ]
reg byte a [ startProcessing::$51 ]
reg byte a [ startProcessing::$52 ]
reg byte a [ startProcessing::$53 ]
reg byte x [ startProcessing::$31 ]
reg byte x [ getCharToProcess::$13 ]
reg byte a [ getCharToProcess::$14 ]
zp ZP_WORD:48 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ]
zp ZP_WORD:50 [ getCharToProcess::$15 ]
reg byte a [ initSquareTables::$16 ]
reg byte a [ initSquareTables::$17 ]
reg byte a [ mul8u::$1 ]
zp ZP_WORD:53 [ getCharToProcess::$8 getCharToProcess::$13 getCharToProcess::$9 getCharToProcess::$10 ]
zp ZP_WORD:55 [ getCharToProcess::$12 ]
reg byte a [ init_dist_screen::y2#0 ]
zp ZP_WORD:57 [ sqr::return#2 init_dist_screen::yds#0 ]
reg byte a [ init_dist_screen::x2#0 ]
zp ZP_WORD:59 [ 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:61 [ bsearch16u::pivot#0 ]
zp ZP_WORD:63 [ bsearch16u::result#0 ]
reg byte a [ sqr::$0 ]
reg byte a [ init_squares::$3 ]
reg byte a [ init_squares::$4 ]
reg byte a [ processChars::$67 ]
reg byte a [ processChars::$68 ]
reg byte a [ processChars::$69 ]
reg byte a [ processChars::$70 ]
reg byte a [ processChars::$37 ]
zp ZP_WORD:52 [ processChars::processing#0 ]
zp ZP_BYTE:54 [ processChars::bitmask#0 ]
zp ZP_WORD:55 [ processChars::xpos#0 processChars::$25 ]
zp ZP_WORD:65 [ processChars::processing#0 ]
zp ZP_BYTE:67 [ processChars::bitmask#0 ]
zp ZP_WORD:68 [ processChars::xpos#0 processChars::$25 ]
reg byte a [ processChars::$11 ]
reg byte a [ processChars::$12 ]
reg byte x [ processChars::$17 ]
reg byte a [ processChars::$14 ]
zp ZP_WORD:57 [ processChars::$15 ]
zp ZP_BYTE:59 [ processChars::ypos#0 ]
zp ZP_WORD:70 [ processChars::$15 ]
zp ZP_BYTE:72 [ processChars::ypos#0 ]
reg byte a [ processChars::$26 ]
reg byte a [ processChars::xchar#0 ]
reg byte a [ processChars::$38 ]

View File

@ -12,6 +12,15 @@
.label SQUARES = malloc.return
main: {
.const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f
jsr init_font_hex
lda #toD0181_return
sta D018
jsr init_dist_screen
rts
}
// 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: {
.label yds = $19
.label xds = $1b
.label ds = $1b
@ -20,9 +29,6 @@ main: {
.label screen_topline = 3
.label screen_bottomline = 5
.label y = 2
jsr init_font_hex
lda #toD0181_return
sta D018
jsr init_squares
lda #<SCREEN+$28*$18
sta screen_bottomline

View File

@ -13,206 +13,213 @@ main: scope:[main] from @1
to:main::toD0181
main::toD0181: scope:[main] from main
[6] phi()
to:main::@10
main::@10: scope:[main] from main::toD0181
[7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
[8] call init_squares
to:main::@1
main::@1: scope:[main] from main::@10 main::@9
[9] (byte*) main::screen_bottomline#10 ← phi( main::@9/(byte*) main::screen_bottomline#1 main::@10/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 )
[9] (byte*) main::screen_topline#10 ← phi( main::@9/(byte*) main::screen_topline#1 main::@10/(const byte*) SCREEN#0 )
[9] (byte) main::y#10 ← phi( main::@9/(byte) main::y#1 main::@10/(byte) 0 )
[10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1
[11] if((byte) main::y2#0>=(byte) $18) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@1
[12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0
to:main::@4
main::@4: scope:[main] from main::@2 main::@3
[13] (byte) main::yd#0 ← phi( main::@2/(byte~) main::$9 main::@3/(byte~) main::$7 )
[14] (byte) sqr::val#0 ← (byte) main::yd#0
[15] call sqr
[16] (word) sqr::return#2 ← (word) sqr::return#0
to:main::@11
main::@11: scope:[main] from main::@4
[17] (word) main::yds#0 ← (word) sqr::return#2
to:main::@5
main::@5: scope:[main] from main::@11 main::@13
[18] (byte) main::xb#2 ← phi( main::@11/(byte) $27 main::@13/(byte) main::xb#1 )
[18] (byte) main::x#2 ← phi( main::@11/(byte) 0 main::@13/(byte) main::x#1 )
[19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1
[20] if((byte) main::x2#0>=(byte) $27) goto main::@6
to:main::@7
main::@7: scope:[main] from main::@5
[21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0
to:main::@8
main::@8: scope:[main] from main::@6 main::@7
[22] (byte) main::xd#0 ← phi( main::@6/(byte~) main::$17 main::@7/(byte~) main::$15 )
[23] (byte) sqr::val#1 ← (byte) main::xd#0
[24] call sqr
[25] (word) sqr::return#3 ← (word) sqr::return#0
to:main::@12
main::@12: scope:[main] from main::@8
[26] (word) main::xds#0 ← (word) sqr::return#3
[27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0
[28] (word) sqrt::val#0 ← (word) main::ds#0
[29] call sqrt
[30] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:main::@13
main::@13: scope:[main] from main::@12
[31] (byte) main::d#0 ← (byte) sqrt::return#2
[32] *((byte*) main::screen_topline#10 + (byte) main::x#2) ← (byte) main::d#0
[33] *((byte*) main::screen_bottomline#10 + (byte) main::x#2) ← (byte) main::d#0
[34] *((byte*) main::screen_topline#10 + (byte) main::xb#2) ← (byte) main::d#0
[35] *((byte*) main::screen_bottomline#10 + (byte) main::xb#2) ← (byte) main::d#0
[36] (byte) main::x#1 ← ++ (byte) main::x#2
[37] (byte) main::xb#1 ← -- (byte) main::xb#2
[38] if((byte) main::x#1<(byte) $13+(byte) 1) goto main::@5
to:main::@9
main::@9: scope:[main] from main::@13
[39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28
[40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28
[41] (byte) main::y#1 ← ++ (byte) main::y#10
[42] if((byte) main::y#1!=(byte) $d) goto main::@1
main::@1: scope:[main] from main::toD0181
[7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
[8] call init_dist_screen
to:main::@return
main::@return: scope:[main] from main::@9
[43] return
main::@return: scope:[main] from main::@1
[9] return
to:@return
main::@6: scope:[main] from main::@5
[44] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27
to:main::@8
main::@2: scope:[main] from main::@1
[45] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18
to:main::@4
sqrt: scope:[sqrt] from main::@12
[46] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[47] call bsearch16u
[48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
init_dist_screen: scope:[init_dist_screen] from main::@1
[10] phi()
[11] call init_squares
to:init_dist_screen::@1
init_dist_screen::@1: scope:[init_dist_screen] from init_dist_screen init_dist_screen::@9
[12] (byte*) init_dist_screen::screen_bottomline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_bottomline#1 init_dist_screen/(const byte*) SCREEN#0+(word)(number) $28*(number) $18 )
[12] (byte*) init_dist_screen::screen_topline#10 ← phi( init_dist_screen::@9/(byte*) init_dist_screen::screen_topline#1 init_dist_screen/(const byte*) SCREEN#0 )
[12] (byte) init_dist_screen::y#10 ← phi( init_dist_screen::@9/(byte) init_dist_screen::y#1 init_dist_screen/(byte) 0 )
[13] (byte) init_dist_screen::y2#0 ← (byte) init_dist_screen::y#10 << (byte) 1
[14] 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
[15] (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
[16] (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 )
[17] (byte) sqr::val#0 ← (byte) init_dist_screen::yd#0
[18] call sqr
[19] (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
[20] (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
[21] (byte) init_dist_screen::xb#2 ← phi( init_dist_screen::@10/(byte) $27 init_dist_screen::@12/(byte) init_dist_screen::xb#1 )
[21] (byte) init_dist_screen::x#2 ← phi( init_dist_screen::@10/(byte) 0 init_dist_screen::@12/(byte) init_dist_screen::x#1 )
[22] (byte) init_dist_screen::x2#0 ← (byte) init_dist_screen::x#2 << (byte) 1
[23] 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
[24] (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
[25] (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 )
[26] (byte) sqr::val#1 ← (byte) init_dist_screen::xd#0
[27] call sqr
[28] (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
[29] (word) init_dist_screen::xds#0 ← (word) sqr::return#3
[30] (word) init_dist_screen::ds#0 ← (word) init_dist_screen::xds#0 + (word) init_dist_screen::yds#0
[31] (word) sqrt::val#0 ← (word) init_dist_screen::ds#0
[32] call sqrt
[33] (byte) sqrt::return#2 ← (byte) sqrt::return#0
to:init_dist_screen::@12
init_dist_screen::@12: scope:[init_dist_screen] from init_dist_screen::@11
[34] (byte) init_dist_screen::d#0 ← (byte) sqrt::return#2
[35] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[36] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::x#2) ← (byte) init_dist_screen::d#0
[37] *((byte*) init_dist_screen::screen_topline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[38] *((byte*) init_dist_screen::screen_bottomline#10 + (byte) init_dist_screen::xb#2) ← (byte) init_dist_screen::d#0
[39] (byte) init_dist_screen::x#1 ← ++ (byte) init_dist_screen::x#2
[40] (byte) init_dist_screen::xb#1 ← -- (byte) init_dist_screen::xb#2
[41] 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
[42] (byte*) init_dist_screen::screen_topline#1 ← (byte*) init_dist_screen::screen_topline#10 + (byte) $28
[43] (byte*) init_dist_screen::screen_bottomline#1 ← (byte*) init_dist_screen::screen_bottomline#10 - (byte) $28
[44] (byte) init_dist_screen::y#1 ← ++ (byte) init_dist_screen::y#10
[45] 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
[46] return
to:@return
init_dist_screen::@6: scope:[init_dist_screen] from init_dist_screen::@5
[47] (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
[48] (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
[49] (word) bsearch16u::key#0 ← (word) sqrt::val#0
[50] call bsearch16u
[51] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1
to:sqrt::@1
sqrt::@1: scope:[sqrt] from sqrt
[49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1
[51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
[52] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3
[53] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1
[54] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1
[55] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1
to:sqrt::@return
sqrt::@return: scope:[sqrt] from sqrt::@1
[53] return
[56] return
to:@return
bsearch16u: scope:[bsearch16u] from sqrt
[54] phi()
[57] phi()
to:bsearch16u::@3
bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7
[55] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[55] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#1 bsearch16u::@7/(byte) bsearch16u::num#0 )
[56] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
[58] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 )
[58] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#3 bsearch16u::@7/(byte) bsearch16u::num#0 )
[59] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4
to:bsearch16u::@5
bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3
[57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
[60] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2
to:bsearch16u::@1
bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5
[58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD
[61] (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
[59] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 )
[62] (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
[60] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[61] return
[63] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 )
[64] return
to:@return
bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3
[62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
[65] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1
[66] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1
[67] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16
[68] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0)
[69] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6
to:bsearch16u::@8
bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4
[67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
[70] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0
to:bsearch16u::@return
bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4
[68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
[71] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7
to:bsearch16u::@9
bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6
[69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[70] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
[72] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD
[73] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3
to:bsearch16u::@7
bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9
[71] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[71] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[72] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
[74] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 )
[74] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 )
[75] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1
to:bsearch16u::@3
sqr: scope:[sqr] from main::@4 main::@8
[73] (byte) sqr::val#2 ← phi( main::@4/(byte) sqr::val#0 main::@8/(byte) sqr::val#1 )
[74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0)
sqr: scope:[sqr] from init_dist_screen::@4 init_dist_screen::@8
[76] (byte) sqr::val#2 ← phi( init_dist_screen::@4/(byte) sqr::val#0 init_dist_screen::@8/(byte) sqr::val#1 )
[77] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1
[78] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0)
to:sqr::@return
sqr::@return: scope:[sqr] from sqr
[76] return
[79] return
to:@return
init_squares: scope:[init_squares] from main::@10
[77] phi()
[78] call malloc
init_squares: scope:[init_squares] from init_dist_screen
[80] phi()
[81] call malloc
to:init_squares::@1
init_squares::@1: scope:[init_squares] from init_squares init_squares::@1
[79] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 )
[79] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 )
[79] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 )
[80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[83] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[85] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[86] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1
[82] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 )
[82] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 )
[82] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 )
[83] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2
[84] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD
[85] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1
[86] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1
[87] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4
[88] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2
[89] 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
[87] return
[90] return
to:@return
malloc: scope:[malloc] from init_squares
[88] phi()
[91] phi()
to:malloc::@return
malloc::@return: scope:[malloc] from malloc
[89] return
[92] return
to:@return
init_font_hex: scope:[init_font_hex] from main
[90] phi()
[93] phi()
to:init_font_hex::@1
init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5
[91] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
[91] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
[91] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
[94] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 )
[94] (byte*) init_font_hex::proto_hi#6 ← phi( init_font_hex/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@5/(byte*) init_font_hex::proto_hi#1 )
[94] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 )
to:init_font_hex::@2
init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4
[92] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
[92] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
[92] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
[93] *((byte*) init_font_hex::charset#2) ← (byte) 0
[95] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 )
[95] (byte*) init_font_hex::proto_lo#4 ← phi( init_font_hex::@1/(const byte[]) FONT_HEX_PROTO#0 init_font_hex::@4/(byte*) init_font_hex::proto_lo#1 )
[95] (byte*) init_font_hex::charset#2 ← phi( init_font_hex::@1/(byte*) init_font_hex::charset#5 init_font_hex::@4/(byte*) init_font_hex::charset#0 )
[96] *((byte*) init_font_hex::charset#2) ← (byte) 0
to:init_font_hex::@3
init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3
[94] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
[94] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
[95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
[96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
[97] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
[98] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
[99] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
[100] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
[101] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
[97] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 )
[97] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 )
[98] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4
[99] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1
[100] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1
[101] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2
[102] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5
[103] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2
[104] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3
to:init_font_hex::@4
init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3
[102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
[103] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
[104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
[105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
[106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
[107] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
[108] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
[105] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0
[106] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2
[107] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0
[108] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5
[109] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8
[110] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4
[111] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2
to:init_font_hex::@5
init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4
[109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
[110] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
[111] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
[112] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5
[113] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6
[114] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1
to:init_font_hex::@return
init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5
[112] return
[115] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@
(byte*) HEAP_START
(const byte*) HEAP_START#0 HEAP_START = (byte*) 49152
(byte) NUM_SQUARES
(const byte) NUM_SQUARES#1 NUM_SQUARES = (byte) $30
(const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 10240
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
@ -51,6 +51,56 @@
(word*) bsearch16u::return#3 return zp ZP_WORD:10 4.0
(word*~) bsearch16u::return#6 return zp ZP_WORD:10 4.0
(byte*) heap_head
(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::@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:27 202.0
(byte*) init_dist_screen::screen
(byte*) init_dist_screen::screen_bottomline
(byte*) init_dist_screen::screen_bottomline#1 screen_bottomline zp ZP_WORD:5 7.333333333333333
(byte*) init_dist_screen::screen_bottomline#10 screen_bottomline zp ZP_WORD:5 6.787878787878788
(byte*) init_dist_screen::screen_topline
(byte*) init_dist_screen::screen_topline#1 screen_topline zp ZP_WORD:3 5.5
(byte*) init_dist_screen::screen_topline#10 screen_topline zp ZP_WORD:3 7.0
(byte) init_dist_screen::x
(byte) init_dist_screen::x#1 x zp ZP_BYTE:7 101.0
(byte) init_dist_screen::x#2 x zp ZP_BYTE:7 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:9 101.0
(byte) init_dist_screen::xb#2 xb zp ZP_BYTE:9 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:27 202.0
(byte) init_dist_screen::y
(byte) init_dist_screen::y#1 y zp ZP_BYTE:2 16.5
(byte) init_dist_screen::y#10 y zp ZP_BYTE:2 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:25 4.869565217391305
(void()) init_font_hex((byte*) init_font_hex::charset)
(byte~) init_font_hex::$0 $0 zp ZP_BYTE:33 1001.0
(byte~) init_font_hex::$1 reg byte a 2002.0
@ -99,34 +149,8 @@
(word*) init_squares::squares#1 squares zp ZP_WORD:14 3.6666666666666665
(word*) init_squares::squares#2 squares zp ZP_WORD:14 16.5
(void()) main()
(byte~) main::$15 reg byte a 202.0
(byte~) main::$17 reg byte a 202.0
(byte~) main::$7 reg byte a 22.0
(byte~) main::$9 reg byte a 22.0
(label) main::@1
(label) main::@10
(label) main::@11
(label) main::@12
(label) main::@13
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@9
(label) main::@return
(byte) main::d
(byte) main::d#0 reg byte a 126.25
(word) main::ds
(word) main::ds#0 ds zp ZP_WORD:27 202.0
(byte*) main::screen_bottomline
(byte*) main::screen_bottomline#1 screen_bottomline zp ZP_WORD:5 7.333333333333333
(byte*) main::screen_bottomline#10 screen_bottomline zp ZP_WORD:5 6.787878787878788
(byte*) main::screen_topline
(byte*) main::screen_topline#1 screen_topline zp ZP_WORD:3 5.5
(byte*) main::screen_topline#10 screen_topline zp ZP_WORD:3 7.0
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
@ -141,27 +165,6 @@
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) CHARSET#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(byte) main::x
(byte) main::x#1 x zp ZP_BYTE:7 101.0
(byte) main::x#2 x zp ZP_BYTE:7 26.578947368421055
(byte) main::x2
(byte) main::x2#0 reg byte a 202.0
(byte) main::xb
(byte) main::xb#1 xb zp ZP_BYTE:9 101.0
(byte) main::xb#2 xb zp ZP_BYTE:9 20.2
(byte) main::xd
(byte) main::xd#0 reg byte a 303.0
(word) main::xds
(word) main::xds#0 xds zp ZP_WORD:27 202.0
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:2 16.5
(byte) main::y#10 y zp ZP_BYTE:2 0.9705882352941178
(byte) main::y2
(byte) main::y2#0 reg byte a 22.0
(byte) main::yd
(byte) main::yd#0 reg byte a 33.0
(word) main::yds
(word) main::yds#0 yds zp ZP_WORD:25 4.869565217391305
(void*()) malloc((word) malloc::size)
(label) malloc::@return
(byte*) malloc::mem
@ -193,13 +196,13 @@
(word) sqrt::val
(word) sqrt::val#0 val zp ZP_WORD:27 103.0
zp ZP_BYTE:2 [ main::y#10 main::y#1 ]
zp ZP_WORD:3 [ main::screen_topline#10 main::screen_topline#1 ]
zp ZP_WORD:5 [ main::screen_bottomline#10 main::screen_bottomline#1 ]
reg byte a [ main::yd#0 main::$9 main::$7 ]
zp ZP_BYTE:7 [ main::x#2 main::x#1 ]
zp ZP_BYTE:9 [ main::xb#2 main::xb#1 ]
reg byte a [ main::xd#0 main::$17 main::$15 ]
zp ZP_BYTE:2 [ init_dist_screen::y#10 init_dist_screen::y#1 ]
zp ZP_WORD:3 [ init_dist_screen::screen_topline#10 init_dist_screen::screen_topline#1 ]
zp ZP_WORD:5 [ init_dist_screen::screen_bottomline#10 init_dist_screen::screen_bottomline#1 ]
reg byte a [ init_dist_screen::yd#0 init_dist_screen::$7 init_dist_screen::$5 ]
zp ZP_BYTE:7 [ init_dist_screen::x#2 init_dist_screen::x#1 ]
zp ZP_BYTE:9 [ 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:10 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 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 ]
@ -213,12 +216,12 @@ zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ]
zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ]
reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ]
zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ]
reg byte a [ main::y2#0 ]
zp ZP_WORD:25 [ sqr::return#2 main::yds#0 ]
reg byte a [ main::x2#0 ]
zp ZP_WORD:27 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 bsearch16u::key#0 ]
reg byte a [ init_dist_screen::y2#0 ]
zp ZP_WORD:25 [ sqr::return#2 init_dist_screen::yds#0 ]
reg byte a [ init_dist_screen::x2#0 ]
zp ZP_WORD:27 [ 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 [ main::d#0 ]
reg byte a [ init_dist_screen::d#0 ]
reg byte a [ sqrt::return#0 ]
reg byte a [ bsearch16u::$6 ]
reg byte a [ bsearch16u::$16 ]