diff --git a/src/test/kc/screen-center-distance.kc b/src/test/kc/screen-center-distance.kc index 2d2fa9bd1..15bbe8f4e 100644 --- a/src/test/kc/screen-center-distance.kc +++ b/src/test/kc/screen-center-distance.kc @@ -15,30 +15,24 @@ void main() { *D018 = toD018(SCREEN, CHARSET); NUM_SQUARES = 0x30; init_squares(); - byte* screen = SCREEN; + 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..19) { + 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++ = d; - } - // Mirror x-axis - byte *screen_mirror = screen; - for(byte x: 0..19) { - *screen++ = *--screen_mirror; - } - } - // Mirror y-axis - byte *screen_mirror = screen-40; - for(byte y: 0..11) { - for(byte x: 0..39) { - *screen++ = *--screen_mirror; + screen_topline[x] = d; + screen_bottomline[x] = d; + screen_topline[xb] = d; + screen_bottomline[xb] = d; } + screen_topline += 40; + screen_bottomline -= 40; } } \ No newline at end of file diff --git a/src/test/ref/screen-center-distance.asm b/src/test/ref/screen-center-distance.asm index 679c543e1..7bee06347 100644 --- a/src/test/ref/screen-center-distance.asm +++ b/src/test/ref/screen-center-distance.asm @@ -12,32 +12,33 @@ .label SQUARES = malloc.return main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f - .label yds = $1c - .label xds = $1e - .label ds = $1e - .label screen = $b - .label x = 3 - .label screen_mirror1 = 4 + .label yds = $19 + .label xds = $1b + .label ds = $1b + .label x = 7 + .label xb = 9 + .label screen_topline = 3 + .label screen_bottomline = 5 .label y = 2 - .label screen_mirror = 9 - .label y1 = 6 jsr init_font_hex lda #toD0181_return sta D018 jsr init_squares + lda #SCREEN+$28*$18 + sta screen_bottomline+1 lda #SCREEN - sta screen+1 + sta screen_topline+1 lda #0 sta y b1: lda y asl cmp #$18 - bcc !b2+ - jmp b2 - !b2: + bcs b2 eor #$ff clc adc #$18+1 @@ -47,15 +48,15 @@ main: { 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 - bcc !b6+ - jmp b6 - !b6: + bcs b6 eor #$ff clc adc #$27+1 @@ -69,74 +70,35 @@ main: { adc yds+1 sta ds+1 jsr sqrt - ldy #0 - sta (screen),y - inc screen - bne !+ - inc screen+1 - !: + ldy x + sta (screen_topline),y + sta (screen_bottomline),y + ldy xb + sta (screen_topline),y + sta (screen_bottomline),y inc x - lda #$14 - cmp x - bne b5 - lda screen - sta screen_mirror1 - lda screen+1 - sta screen_mirror1+1 - ldx #0 - b10: - lda screen_mirror1 - bne !+ - dec screen_mirror1+1 + dec xb + lda x + cmp #$13+1 + bcc b5 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 !: - dec screen_mirror1 - ldy #0 - lda (screen_mirror1),y - sta (screen),y - inc screen - bne !+ - inc screen+1 - !: - inx - cpx #$14 - bne b10 + lda screen_bottomline + sec + sbc #<$28 + sta screen_bottomline + lda screen_bottomline+1 + sbc #>$28 + sta screen_bottomline+1 inc y lda #$d cmp y - beq !b1+ - jmp b1 - !b1: - lda screen - sec - sbc #<$28 - sta screen_mirror - lda screen+1 - sbc #>$28 - sta screen_mirror+1 - lda #0 - sta y1 - b13: - ldx #0 - b14: - lda screen_mirror - bne !+ - dec screen_mirror+1 - !: - dec screen_mirror - ldy #0 - lda (screen_mirror),y - sta (screen),y - inc screen - bne !+ - inc screen+1 - !: - inx - cpx #$28 - bne b14 - inc y1 - lda #$c - cmp y1 - bne b13 + bne b1 rts b6: sec @@ -150,12 +112,12 @@ main: { // 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($1e) val) +// sqrt(word zeropage($1b) val) sqrt: { - .label _1 = $d - .label _3 = $d - .label found = $d - .label val = $1e + .label _1 = $a + .label _3 = $a + .label found = $a + .label val = $1b jsr bsearch16u lda _3 sec @@ -174,14 +136,14 @@ sqrt: { // - items - Pointer to the start of the array to search in // - num - The number of items in the array // Returns pointer to an entry in the array that matches the search key -// bsearch16u(word zeropage($1e) key, word* zeropage($d) items, byte register(X) num) +// bsearch16u(word zeropage($1b) key, word* zeropage($a) items, byte register(X) num) bsearch16u: { - .label _2 = $d - .label pivot = $20 - .label result = $22 - .label return = $d - .label items = $d - .label key = $1e + .label _2 = $a + .label pivot = $1d + .label result = $1f + .label return = $a + .label items = $a + .label key = $1b lda #SQUARES @@ -261,8 +223,8 @@ bsearch16u: { // Uses a table of squares that must be initialized by calling init_squares() // sqr(byte register(A) val) sqr: { - .label return = $1e - .label return_2 = $1c + .label return = $1b + .label return_2 = $19 asl tay lda SQUARES,y @@ -274,8 +236,8 @@ sqr: { // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $11 - .label sqr = $f + .label squares = $e + .label sqr = $c jsr malloc ldx #0 lda #=(byte) $18) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@1 @@ -32,13 +33,13 @@ main::@4: scope:[main] from main::@2 main::@3 [14] (byte) sqr::val#0 ← (byte) main::yd#0 [15] call sqr [16] (word) sqr::return#2 ← (word) sqr::return#0 - to:main::@17 -main::@17: scope:[main] from main::@4 + 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::@17 main::@19 - [18] (byte*) main::screen#12 ← phi( main::@17/(byte*) main::screen#17 main::@19/(byte*) main::screen#1 ) - [18] (byte) main::x#2 ← phi( main::@17/(byte) 0 main::@19/(byte) main::x#1 ) +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 @@ -50,198 +51,168 @@ main::@8: scope:[main] from main::@6 main::@7 [23] (byte) sqr::val#1 ← (byte) main::xd#0 [24] call sqr [25] (word) sqr::return#3 ← (word) sqr::return#0 - to:main::@18 -main::@18: scope:[main] from main::@8 + 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::@19 -main::@19: scope:[main] from main::@18 - [31] (byte) main::d#0 ← (byte) sqrt::return#2 - [32] *((byte*) main::screen#12) ← (byte) main::d#0 - [33] (byte*) main::screen#1 ← ++ (byte*) main::screen#12 - [34] (byte) main::x#1 ← ++ (byte) main::x#2 - [35] if((byte) main::x#1!=(byte) $14) goto main::@5 - to:main::@9 -main::@9: scope:[main] from main::@19 - [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 - to:main::@10 -main::@10: scope:[main] from main::@10 main::@9 - [37] (byte) main::x1#2 ← phi( main::@9/(byte) 0 main::@10/(byte) main::x1#1 ) - [37] (byte*) main::screen#6 ← phi( main::@9/(byte*) main::screen#1 main::@10/(byte*) main::screen#10 ) - [37] (byte*) main::screen_mirror1#2 ← phi( main::@9/(byte*~) main::screen_mirror1#3 main::@10/(byte*) main::screen_mirror1#1 ) - [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 - [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) - [40] (byte*) main::screen#10 ← ++ (byte*) main::screen#6 - [41] (byte) main::x1#1 ← ++ (byte) main::x1#2 - [42] if((byte) main::x1#1!=(byte) $14) goto main::@10 - to:main::@11 -main::@11: scope:[main] from main::@10 - [43] (byte) main::y#1 ← ++ (byte) main::y#12 - [44] if((byte) main::y#1!=(byte) $d) goto main::@1 - to:main::@12 -main::@12: scope:[main] from main::@11 - [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 to:main::@13 -main::@13: scope:[main] from main::@12 main::@15 - [46] (byte) main::y1#4 ← phi( main::@12/(byte) 0 main::@15/(byte) main::y1#1 ) - [46] (byte*) main::screen#11 ← phi( main::@12/(byte*) main::screen#10 main::@15/(byte*) main::screen#13 ) - [46] (byte*) main::screen_mirror#3 ← phi( main::@12/(byte*) main::screen_mirror#0 main::@15/(byte*) main::screen_mirror#1 ) - to:main::@14 -main::@14: scope:[main] from main::@13 main::@14 - [47] (byte) main::x3#2 ← phi( main::@13/(byte) 0 main::@14/(byte) main::x3#1 ) - [47] (byte*) main::screen#8 ← phi( main::@13/(byte*) main::screen#11 main::@14/(byte*) main::screen#13 ) - [47] (byte*) main::screen_mirror#2 ← phi( main::@13/(byte*) main::screen_mirror#3 main::@14/(byte*) main::screen_mirror#1 ) - [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 - [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) - [50] (byte*) main::screen#13 ← ++ (byte*) main::screen#8 - [51] (byte) main::x3#1 ← ++ (byte) main::x3#2 - [52] if((byte) main::x3#1!=(byte) $28) goto main::@14 - to:main::@15 -main::@15: scope:[main] from main::@14 - [53] (byte) main::y1#1 ← ++ (byte) main::y1#4 - [54] if((byte) main::y1#1!=(byte) $c) goto 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 to:main::@return -main::@return: scope:[main] from main::@15 - [55] return +main::@return: scope:[main] from main::@9 + [43] return to:@return main::@6: scope:[main] from main::@5 - [56] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 + [44] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 to:main::@8 main::@2: scope:[main] from main::@1 - [57] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 + [45] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 to:main::@4 -sqrt: scope:[sqrt] from main::@18 - [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - [59] call bsearch16u - [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 +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 to:sqrt::@1 sqrt::@1: scope:[sqrt] from sqrt - [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 - [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 - [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + [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 to:sqrt::@return sqrt::@return: scope:[sqrt] from sqrt::@1 - [65] return + [53] return to:@return bsearch16u: scope:[bsearch16u] from sqrt - [66] phi() + [54] phi() to:bsearch16u::@3 bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [67] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [67] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#1 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [68] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 + [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 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [58] (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 - [71] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [59] (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 - [72] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [73] return + [60] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [61] return to:@return bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + [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 to:bsearch16u::@8 bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 + [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 to:bsearch16u::@return bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 + [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 to:bsearch16u::@9 bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [82] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 + [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [70] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 to:bsearch16u::@7 bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [83] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [83] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [84] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + [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 to:bsearch16u::@3 sqr: scope:[sqr] from main::@4 main::@8 - [85] (byte) sqr::val#2 ← phi( main::@4/(byte) sqr::val#0 main::@8/(byte) sqr::val#1 ) - [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) + [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) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [88] return + [76] return to:@return -init_squares: scope:[init_squares] from main::@16 - [89] phi() - [90] call malloc +init_squares: scope:[init_squares] from main::@10 + [77] phi() + [78] call malloc to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [91] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [91] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [91] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) - [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [95] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [97] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [98] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto 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 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [99] return + [87] return to:@return malloc: scope:[malloc] from init_squares - [100] phi() + [88] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc - [101] return + [89] return to:@return init_font_hex: scope:[init_font_hex] from main - [102] phi() + [90] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [103] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [103] (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 ) - [103] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [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 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [104] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [104] (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 ) - [104] (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 ) - [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [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 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [106] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [106] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [109] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [110] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [111] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [112] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [113] if((byte) init_font_hex::i#1!=(byte) 5) goto 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 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [115] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [119] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [120] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [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 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [122] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [123] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [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 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [124] return + [112] return to:@return diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index a3a0475fd..30006124c 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -79,11 +79,11 @@ Culled Empty Block (label) @9 Culled Empty Block (label) @10 Culled Empty Block (label) init_font_hex::@6 Culled Empty Block (label) main::toD0181_@1 -Culled Empty Block (label) main::@15 -Culled Empty Block (label) main::@16 +Culled Empty Block (label) main::@13 +Culled Empty Block (label) main::@14 Culled Empty Block (label) main::@9 Culled Empty Block (label) main::@10 -Culled Empty Block (label) main::@20 +Culled Empty Block (label) main::@12 CONTROL FLOW GRAPH SSA @begin: scope:[] from @@ -191,9 +191,9 @@ bsearch16u::@3: scope:[bsearch16u] from bsearch16u::@1 bsearch16u::@2 (byte) NUM_SQUARES#0 ← (number) $ff (word*) SQUARES#0 ← (word*) 0 to:@6 -init_squares: scope:[init_squares] from main::@21 - (byte*) heap_head#15 ← phi( main::@21/(byte*) heap_head#17 ) - (byte) NUM_SQUARES#4 ← phi( main::@21/(byte) NUM_SQUARES#1 ) +init_squares: scope:[init_squares] from main::@15 + (byte*) heap_head#15 ← phi( main::@15/(byte*) heap_head#17 ) + (byte) NUM_SQUARES#4 ← phi( main::@15/(byte) NUM_SQUARES#1 ) (byte~) init_squares::$0 ← (byte) NUM_SQUARES#4 * (const byte) SIZEOF_WORD (word) malloc::size#0 ← (byte~) init_squares::$0 call malloc @@ -244,10 +244,10 @@ sqr::@return: scope:[sqr] from sqr (word) sqr::return#1 ← (word) sqr::return#4 return to:@return -sqrt: scope:[sqrt] from main::@25 - (byte) NUM_SQUARES#6 ← phi( main::@25/(byte) NUM_SQUARES#9 ) - (word*) SQUARES#8 ← phi( main::@25/(word*) SQUARES#16 ) - (word) sqrt::val#1 ← phi( main::@25/(word) sqrt::val#0 ) +sqrt: scope:[sqrt] from main::@19 + (byte) NUM_SQUARES#6 ← phi( main::@19/(byte) NUM_SQUARES#9 ) + (word*) SQUARES#8 ← phi( main::@19/(word*) SQUARES#16 ) + (word) sqrt::val#1 ← phi( main::@19/(word) sqrt::val#0 ) (word) bsearch16u::key#0 ← (word) sqrt::val#1 (word*) bsearch16u::items#1 ← (word*) SQUARES#8 (byte) bsearch16u::num#2 ← (byte) NUM_SQUARES#6 @@ -354,22 +354,22 @@ init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 (byte*) SCREEN#0 ← ((byte*)) (number) $2800 to:@12 main: scope:[main] from @12 - (word*) SQUARES#37 ← phi( @12/(word*) SQUARES#19 ) + (word*) SQUARES#33 ← phi( @12/(word*) SQUARES#19 ) (byte*) heap_head#29 ← phi( @12/(byte*) heap_head#19 ) (byte*) init_font_hex::charset#1 ← (byte*) CHARSET#0 call init_font_hex - to:main::@22 -main::@22: scope:[main] from main - (word*) SQUARES#32 ← phi( main/(word*) SQUARES#37 ) + to:main::@16 +main::@16: scope:[main] from main + (word*) SQUARES#31 ← phi( main/(word*) SQUARES#33 ) (byte*) heap_head#27 ← phi( main/(byte*) heap_head#29 ) (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0 (byte*) main::toD0181_gfx#0 ← (byte*) CHARSET#0 to:main::toD0181 -main::toD0181: scope:[main] from main::@22 - (word*) SQUARES#28 ← phi( main::@22/(word*) SQUARES#32 ) - (byte*) heap_head#24 ← phi( main::@22/(byte*) heap_head#27 ) - (byte*) main::toD0181_gfx#1 ← phi( main::@22/(byte*) main::toD0181_gfx#0 ) - (byte*) main::toD0181_screen#1 ← phi( main::@22/(byte*) main::toD0181_screen#0 ) +main::toD0181: scope:[main] from main::@16 + (word*) SQUARES#28 ← phi( main::@16/(word*) SQUARES#31 ) + (byte*) heap_head#24 ← phi( main::@16/(byte*) heap_head#27 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@16/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@16/(byte*) main::toD0181_screen#0 ) (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4 @@ -386,8 +386,8 @@ main::toD0181_@return: scope:[main] from main::toD0181 (byte*) heap_head#20 ← phi( main::toD0181/(byte*) heap_head#24 ) (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 - to:main::@21 -main::@21: scope:[main] from main::toD0181_@return + to:main::@15 +main::@15: scope:[main] from main::toD0181_@return (word*) SQUARES#17 ← phi( main::toD0181_@return/(word*) SQUARES#20 ) (byte*) heap_head#17 ← phi( main::toD0181_@return/(byte*) heap_head#20 ) (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) @@ -395,89 +395,101 @@ main::@21: scope:[main] from main::toD0181_@return *((byte*) D018#0) ← (byte~) main::$1 (byte) NUM_SQUARES#1 ← (number) $30 call init_squares - to:main::@23 -main::@23: scope:[main] from main::@21 - (byte) NUM_SQUARES#30 ← phi( main::@21/(byte) NUM_SQUARES#1 ) - (word*) SQUARES#10 ← phi( main::@21/(word*) SQUARES#2 ) - (byte*) heap_head#12 ← phi( main::@21/(byte*) heap_head#4 ) + to:main::@17 +main::@17: scope:[main] from main::@15 + (byte) NUM_SQUARES#24 ← phi( main::@15/(byte) NUM_SQUARES#1 ) + (word*) SQUARES#10 ← phi( main::@15/(word*) SQUARES#2 ) + (byte*) heap_head#12 ← phi( main::@15/(byte*) heap_head#4 ) (byte*) heap_head#5 ← (byte*) heap_head#12 (word*) SQUARES#3 ← (word*) SQUARES#10 - (byte*) main::screen#0 ← (byte*) SCREEN#0 + (byte*) main::screen_topline#0 ← (byte*) SCREEN#0 + (byte*~) main::$3 ← (byte*) SCREEN#0 + (number) $28*(number) $18 + (byte*) main::screen_bottomline#0 ← (byte*~) main::$3 (byte) main::y#0 ← (byte) 0 to:main::@1 -main::@1: scope:[main] from main::@13 main::@23 - (byte*) heap_head#43 ← phi( main::@13/(byte*) heap_head#30 main::@23/(byte*) heap_head#5 ) - (byte*) main::screen#21 ← phi( main::@13/(byte*) main::screen#10 main::@23/(byte*) main::screen#0 ) - (byte) NUM_SQUARES#29 ← phi( main::@13/(byte) NUM_SQUARES#23 main::@23/(byte) NUM_SQUARES#30 ) - (word*) SQUARES#29 ← phi( main::@13/(word*) SQUARES#33 main::@23/(word*) SQUARES#3 ) - (byte) main::y#2 ← phi( main::@13/(byte) main::y#1 main::@23/(byte) main::y#0 ) +main::@1: scope:[main] from main::@11 main::@17 + (byte*) heap_head#37 ← phi( main::@11/(byte*) heap_head#18 main::@17/(byte*) heap_head#5 ) + (byte*) main::screen_bottomline#13 ← phi( main::@11/(byte*) main::screen_bottomline#1 main::@17/(byte*) main::screen_bottomline#0 ) + (byte*) main::screen_topline#13 ← phi( main::@11/(byte*) main::screen_topline#1 main::@17/(byte*) main::screen_topline#0 ) + (byte) NUM_SQUARES#23 ← phi( main::@11/(byte) NUM_SQUARES#10 main::@17/(byte) NUM_SQUARES#24 ) + (word*) SQUARES#29 ← phi( main::@11/(word*) SQUARES#18 main::@17/(word*) SQUARES#3 ) + (byte) main::y#2 ← phi( main::@11/(byte) main::y#1 main::@17/(byte) main::y#0 ) (number~) main::$4 ← (byte) main::y#2 * (number) 2 (byte) main::y2#0 ← (number~) main::$4 (bool~) main::$5 ← (byte) main::y2#0 >= (number) $18 if((bool~) main::$5) goto main::@2 to:main::@3 main::@2: scope:[main] from main::@1 - (byte*) heap_head#41 ← phi( main::@1/(byte*) heap_head#43 ) - (byte) main::y#14 ← phi( main::@1/(byte) main::y#2 ) - (byte*) main::screen#19 ← phi( main::@1/(byte*) main::screen#21 ) - (byte) NUM_SQUARES#26 ← phi( main::@1/(byte) NUM_SQUARES#29 ) + (byte*) heap_head#35 ← phi( main::@1/(byte*) heap_head#37 ) + (byte) main::y#12 ← phi( main::@1/(byte) main::y#2 ) + (byte*) main::screen_bottomline#11 ← phi( main::@1/(byte*) main::screen_bottomline#13 ) + (byte*) main::screen_topline#11 ← phi( main::@1/(byte*) main::screen_topline#13 ) + (byte) NUM_SQUARES#21 ← phi( main::@1/(byte) NUM_SQUARES#23 ) (word*) SQUARES#21 ← phi( main::@1/(word*) SQUARES#29 ) (byte) main::y2#1 ← phi( main::@1/(byte) main::y2#0 ) (number~) main::$8 ← (byte) main::y2#1 - (number) $18 (number~) main::$9 ← (number~) main::$8 to:main::@4 main::@3: scope:[main] from main::@1 - (byte*) heap_head#42 ← phi( main::@1/(byte*) heap_head#43 ) - (byte) main::y#15 ← phi( main::@1/(byte) main::y#2 ) - (byte*) main::screen#20 ← phi( main::@1/(byte*) main::screen#21 ) - (byte) NUM_SQUARES#27 ← phi( main::@1/(byte) NUM_SQUARES#29 ) + (byte*) heap_head#36 ← phi( main::@1/(byte*) heap_head#37 ) + (byte) main::y#13 ← phi( main::@1/(byte) main::y#2 ) + (byte*) main::screen_bottomline#12 ← phi( main::@1/(byte*) main::screen_bottomline#13 ) + (byte*) main::screen_topline#12 ← phi( main::@1/(byte*) main::screen_topline#13 ) + (byte) NUM_SQUARES#22 ← phi( main::@1/(byte) NUM_SQUARES#23 ) (word*) SQUARES#22 ← phi( main::@1/(word*) SQUARES#29 ) (byte) main::y2#2 ← phi( main::@1/(byte) main::y2#0 ) (number~) main::$6 ← (number) $18 - (byte) main::y2#2 (number~) main::$7 ← (number~) main::$6 to:main::@4 main::@4: scope:[main] from main::@2 main::@3 - (byte*) heap_head#40 ← phi( main::@2/(byte*) heap_head#41 main::@3/(byte*) heap_head#42 ) - (byte) main::y#13 ← phi( main::@2/(byte) main::y#14 main::@3/(byte) main::y#15 ) - (byte*) main::screen#18 ← phi( main::@2/(byte*) main::screen#19 main::@3/(byte*) main::screen#20 ) - (byte) NUM_SQUARES#24 ← phi( main::@2/(byte) NUM_SQUARES#26 main::@3/(byte) NUM_SQUARES#27 ) + (byte*) heap_head#34 ← phi( main::@2/(byte*) heap_head#35 main::@3/(byte*) heap_head#36 ) + (byte) main::y#11 ← phi( main::@2/(byte) main::y#12 main::@3/(byte) main::y#13 ) + (byte*) main::screen_bottomline#10 ← phi( main::@2/(byte*) main::screen_bottomline#11 main::@3/(byte*) main::screen_bottomline#12 ) + (byte*) main::screen_topline#10 ← phi( main::@2/(byte*) main::screen_topline#11 main::@3/(byte*) main::screen_topline#12 ) + (byte) NUM_SQUARES#20 ← phi( main::@2/(byte) NUM_SQUARES#21 main::@3/(byte) NUM_SQUARES#22 ) (word*) SQUARES#14 ← phi( main::@2/(word*) SQUARES#21 main::@3/(word*) SQUARES#22 ) (number~) main::$10 ← phi( main::@2/(number~) main::$9 main::@3/(number~) main::$7 ) (byte) main::yd#0 ← (number~) main::$10 (byte) sqr::val#0 ← (byte) main::yd#0 call sqr (word) sqr::return#2 ← (word) sqr::return#1 - to:main::@24 -main::@24: scope:[main] from main::@4 - (byte*) heap_head#39 ← phi( main::@4/(byte*) heap_head#40 ) - (byte) main::y#12 ← phi( main::@4/(byte) main::y#13 ) - (byte*) main::screen#17 ← phi( main::@4/(byte*) main::screen#18 ) - (byte) NUM_SQUARES#21 ← phi( main::@4/(byte) NUM_SQUARES#24 ) - (word*) SQUARES#34 ← phi( main::@4/(word*) SQUARES#14 ) + to:main::@18 +main::@18: scope:[main] from main::@4 + (byte*) heap_head#33 ← phi( main::@4/(byte*) heap_head#34 ) + (byte) main::y#10 ← phi( main::@4/(byte) main::y#11 ) + (byte*) main::screen_bottomline#9 ← phi( main::@4/(byte*) main::screen_bottomline#10 ) + (byte*) main::screen_topline#9 ← phi( main::@4/(byte*) main::screen_topline#10 ) + (byte) NUM_SQUARES#19 ← phi( main::@4/(byte) NUM_SQUARES#20 ) + (word*) SQUARES#32 ← phi( main::@4/(word*) SQUARES#14 ) (word) sqr::return#5 ← phi( main::@4/(word) sqr::return#2 ) (word~) main::$11 ← (word) sqr::return#5 (word) main::yds#0 ← (word~) main::$11 - (byte) main::x#0 ← (byte) 0 + (byte) main::x#0 ← (number) 0 + (byte) main::xb#0 ← (number) $27 to:main::@5 -main::@5: scope:[main] from main::@24 main::@26 - (byte*) heap_head#38 ← phi( main::@24/(byte*) heap_head#39 main::@26/(byte*) heap_head#33 ) - (byte) main::y#11 ← phi( main::@24/(byte) main::y#12 main::@26/(byte) main::y#6 ) - (byte*) main::screen#16 ← phi( main::@24/(byte*) main::screen#17 main::@26/(byte*) main::screen#1 ) - (byte) NUM_SQUARES#19 ← phi( main::@24/(byte) NUM_SQUARES#21 main::@26/(byte) NUM_SQUARES#22 ) - (word) main::yds#5 ← phi( main::@24/(word) main::yds#0 main::@26/(word) main::yds#6 ) - (word*) SQUARES#30 ← phi( main::@24/(word*) SQUARES#34 main::@26/(word*) SQUARES#35 ) - (byte) main::x#2 ← phi( main::@24/(byte) main::x#0 main::@26/(byte) main::x#1 ) +main::@5: scope:[main] from main::@18 main::@20 + (byte*) heap_head#32 ← phi( main::@18/(byte*) heap_head#33 main::@20/(byte*) heap_head#21 ) + (byte) main::y#9 ← phi( main::@18/(byte) main::y#10 main::@20/(byte) main::y#4 ) + (byte) main::xb#7 ← phi( main::@18/(byte) main::xb#0 main::@20/(byte) main::xb#1 ) + (byte*) main::screen_bottomline#8 ← phi( main::@18/(byte*) main::screen_bottomline#9 main::@20/(byte*) main::screen_bottomline#2 ) + (byte*) main::screen_topline#8 ← phi( main::@18/(byte*) main::screen_topline#9 main::@20/(byte*) main::screen_topline#2 ) + (byte) NUM_SQUARES#18 ← phi( main::@18/(byte) NUM_SQUARES#19 main::@20/(byte) NUM_SQUARES#13 ) + (word) main::yds#5 ← phi( main::@18/(word) main::yds#0 main::@20/(word) main::yds#6 ) + (word*) SQUARES#30 ← phi( main::@18/(word*) SQUARES#32 main::@20/(word*) SQUARES#25 ) + (byte) main::x#2 ← phi( main::@18/(byte) main::x#0 main::@20/(byte) main::x#1 ) (number~) main::$12 ← (byte) main::x#2 * (number) 2 (byte) main::x2#0 ← (number~) main::$12 (bool~) main::$13 ← (byte) main::x2#0 >= (number) $27 if((bool~) main::$13) goto main::@6 to:main::@7 main::@6: scope:[main] from main::@5 - (byte*) heap_head#36 ← phi( main::@5/(byte*) heap_head#38 ) - (byte) main::y#9 ← phi( main::@5/(byte) main::y#11 ) + (byte*) heap_head#30 ← phi( main::@5/(byte*) heap_head#32 ) + (byte) main::y#7 ← phi( main::@5/(byte) main::y#9 ) + (byte) main::xb#5 ← phi( main::@5/(byte) main::xb#7 ) + (byte*) main::screen_bottomline#6 ← phi( main::@5/(byte*) main::screen_bottomline#8 ) (byte) main::x#6 ← phi( main::@5/(byte) main::x#2 ) - (byte*) main::screen#14 ← phi( main::@5/(byte*) main::screen#16 ) - (byte) NUM_SQUARES#16 ← phi( main::@5/(byte) NUM_SQUARES#19 ) + (byte*) main::screen_topline#6 ← phi( main::@5/(byte*) main::screen_topline#8 ) + (byte) NUM_SQUARES#16 ← phi( main::@5/(byte) NUM_SQUARES#18 ) (word) main::yds#3 ← phi( main::@5/(word) main::yds#5 ) (word*) SQUARES#23 ← phi( main::@5/(word*) SQUARES#30 ) (byte) main::x2#1 ← phi( main::@5/(byte) main::x2#0 ) @@ -485,11 +497,13 @@ main::@6: scope:[main] from main::@5 (number~) main::$17 ← (number~) main::$16 to:main::@8 main::@7: scope:[main] from main::@5 - (byte*) heap_head#37 ← phi( main::@5/(byte*) heap_head#38 ) - (byte) main::y#10 ← phi( main::@5/(byte) main::y#11 ) + (byte*) heap_head#31 ← phi( main::@5/(byte*) heap_head#32 ) + (byte) main::y#8 ← phi( main::@5/(byte) main::y#9 ) + (byte) main::xb#6 ← phi( main::@5/(byte) main::xb#7 ) + (byte*) main::screen_bottomline#7 ← phi( main::@5/(byte*) main::screen_bottomline#8 ) (byte) main::x#7 ← phi( main::@5/(byte) main::x#2 ) - (byte*) main::screen#15 ← phi( main::@5/(byte*) main::screen#16 ) - (byte) NUM_SQUARES#17 ← phi( main::@5/(byte) NUM_SQUARES#19 ) + (byte*) main::screen_topline#7 ← phi( main::@5/(byte*) main::screen_topline#8 ) + (byte) NUM_SQUARES#17 ← phi( main::@5/(byte) NUM_SQUARES#18 ) (word) main::yds#4 ← phi( main::@5/(word) main::yds#5 ) (word*) SQUARES#24 ← phi( main::@5/(word*) SQUARES#30 ) (byte) main::x2#2 ← phi( main::@5/(byte) main::x2#0 ) @@ -497,10 +511,12 @@ main::@7: scope:[main] from main::@5 (number~) main::$15 ← (number~) main::$14 to:main::@8 main::@8: scope:[main] from main::@6 main::@7 - (byte*) heap_head#35 ← phi( main::@6/(byte*) heap_head#36 main::@7/(byte*) heap_head#37 ) - (byte) main::y#8 ← phi( main::@6/(byte) main::y#9 main::@7/(byte) main::y#10 ) + (byte*) heap_head#28 ← phi( main::@6/(byte*) heap_head#30 main::@7/(byte*) heap_head#31 ) + (byte) main::y#6 ← phi( main::@6/(byte) main::y#7 main::@7/(byte) main::y#8 ) + (byte) main::xb#4 ← phi( main::@6/(byte) main::xb#5 main::@7/(byte) main::xb#6 ) + (byte*) main::screen_bottomline#5 ← phi( main::@6/(byte*) main::screen_bottomline#6 main::@7/(byte*) main::screen_bottomline#7 ) (byte) main::x#5 ← phi( main::@6/(byte) main::x#6 main::@7/(byte) main::x#7 ) - (byte*) main::screen#12 ← phi( main::@6/(byte*) main::screen#14 main::@7/(byte*) main::screen#15 ) + (byte*) main::screen_topline#5 ← phi( main::@6/(byte*) main::screen_topline#6 main::@7/(byte*) main::screen_topline#7 ) (byte) NUM_SQUARES#12 ← phi( main::@6/(byte) NUM_SQUARES#16 main::@7/(byte) NUM_SQUARES#17 ) (word) main::yds#2 ← phi( main::@6/(word) main::yds#3 main::@7/(word) main::yds#4 ) (word*) SQUARES#15 ← phi( main::@6/(word*) SQUARES#23 main::@7/(word*) SQUARES#24 ) @@ -509,12 +525,14 @@ main::@8: scope:[main] from main::@6 main::@7 (byte) sqr::val#1 ← (byte) main::xd#0 call sqr (word) sqr::return#3 ← (word) sqr::return#1 - to:main::@25 -main::@25: scope:[main] from main::@8 - (byte*) heap_head#34 ← phi( main::@8/(byte*) heap_head#35 ) - (byte) main::y#7 ← phi( main::@8/(byte) main::y#8 ) + to:main::@19 +main::@19: scope:[main] from main::@8 + (byte*) heap_head#25 ← phi( main::@8/(byte*) heap_head#28 ) + (byte) main::y#5 ← phi( main::@8/(byte) main::y#6 ) + (byte) main::xb#3 ← phi( main::@8/(byte) main::xb#4 ) + (byte*) main::screen_bottomline#4 ← phi( main::@8/(byte*) main::screen_bottomline#5 ) (byte) main::x#4 ← phi( main::@8/(byte) main::x#5 ) - (byte*) main::screen#9 ← phi( main::@8/(byte*) main::screen#12 ) + (byte*) main::screen_topline#4 ← phi( main::@8/(byte*) main::screen_topline#5 ) (byte) NUM_SQUARES#9 ← phi( main::@8/(byte) NUM_SQUARES#12 ) (word*) SQUARES#16 ← phi( main::@8/(word*) SQUARES#15 ) (word) main::yds#1 ← phi( main::@8/(word) main::yds#2 ) @@ -526,106 +544,46 @@ main::@25: scope:[main] from main::@8 (word) sqrt::val#0 ← (word) main::ds#0 call sqrt (byte) sqrt::return#2 ← (byte) sqrt::return#1 - to:main::@26 -main::@26: scope:[main] from main::@25 - (byte*) heap_head#33 ← phi( main::@25/(byte*) heap_head#34 ) - (byte) NUM_SQUARES#22 ← phi( main::@25/(byte) NUM_SQUARES#9 ) - (word) main::yds#6 ← phi( main::@25/(word) main::yds#1 ) - (word*) SQUARES#35 ← phi( main::@25/(word*) SQUARES#16 ) - (byte) main::y#6 ← phi( main::@25/(byte) main::y#7 ) - (byte) main::x#3 ← phi( main::@25/(byte) main::x#4 ) - (byte*) main::screen#4 ← phi( main::@25/(byte*) main::screen#9 ) - (byte) sqrt::return#4 ← phi( main::@25/(byte) sqrt::return#2 ) + to:main::@20 +main::@20: scope:[main] from main::@19 + (word) main::yds#6 ← phi( main::@19/(word) main::yds#1 ) + (word*) SQUARES#25 ← phi( main::@19/(word*) SQUARES#16 ) + (byte*) heap_head#21 ← phi( main::@19/(byte*) heap_head#25 ) + (byte) NUM_SQUARES#13 ← phi( main::@19/(byte) NUM_SQUARES#9 ) + (byte) main::y#4 ← phi( main::@19/(byte) main::y#5 ) + (byte) main::xb#2 ← phi( main::@19/(byte) main::xb#3 ) + (byte*) main::screen_bottomline#2 ← phi( main::@19/(byte*) main::screen_bottomline#4 ) + (byte) main::x#3 ← phi( main::@19/(byte) main::x#4 ) + (byte*) main::screen_topline#2 ← phi( main::@19/(byte*) main::screen_topline#4 ) + (byte) sqrt::return#4 ← phi( main::@19/(byte) sqrt::return#2 ) (byte~) main::$21 ← (byte) sqrt::return#4 (byte) main::d#0 ← (byte~) main::$21 - *((byte*) main::screen#4) ← (byte) main::d#0 - (byte*) main::screen#1 ← ++ (byte*) main::screen#4 - (byte) main::x#1 ← (byte) main::x#3 + rangenext(0,$13) - (bool~) main::$22 ← (byte) main::x#1 != rangelast(0,$13) + *((byte*) main::screen_topline#2 + (byte) main::x#3) ← (byte) main::d#0 + *((byte*) main::screen_bottomline#2 + (byte) main::x#3) ← (byte) main::d#0 + *((byte*) main::screen_topline#2 + (byte) main::xb#2) ← (byte) main::d#0 + *((byte*) main::screen_bottomline#2 + (byte) main::xb#2) ← (byte) main::d#0 + (byte) main::x#1 ← ++ (byte) main::x#3 + (byte) main::xb#1 ← -- (byte) main::xb#2 + (bool~) main::$22 ← (byte) main::x#1 <= (number) $13 if((bool~) main::$22) goto main::@5 to:main::@11 -main::@11: scope:[main] from main::@26 - (byte*) heap_head#32 ← phi( main::@26/(byte*) heap_head#33 ) - (byte) NUM_SQUARES#28 ← phi( main::@26/(byte) NUM_SQUARES#22 ) - (word*) SQUARES#39 ← phi( main::@26/(word*) SQUARES#35 ) - (byte) main::y#5 ← phi( main::@26/(byte) main::y#6 ) - (byte*) main::screen#5 ← phi( main::@26/(byte*) main::screen#1 ) - (byte*) main::screen_mirror1#0 ← (byte*) main::screen#5 - (byte) main::x1#0 ← (byte) 0 - to:main::@12 -main::@12: scope:[main] from main::@11 main::@12 - (byte*) heap_head#31 ← phi( main::@11/(byte*) heap_head#32 main::@12/(byte*) heap_head#31 ) - (byte) NUM_SQUARES#25 ← phi( main::@11/(byte) NUM_SQUARES#28 main::@12/(byte) NUM_SQUARES#25 ) - (word*) SQUARES#38 ← phi( main::@11/(word*) SQUARES#39 main::@12/(word*) SQUARES#38 ) - (byte) main::y#4 ← phi( main::@11/(byte) main::y#5 main::@12/(byte) main::y#4 ) - (byte) main::x1#2 ← phi( main::@11/(byte) main::x1#0 main::@12/(byte) main::x1#1 ) - (byte*) main::screen#6 ← phi( main::@11/(byte*) main::screen#5 main::@12/(byte*) main::screen#2 ) - (byte*) main::screen_mirror1#2 ← phi( main::@11/(byte*) main::screen_mirror1#0 main::@12/(byte*) main::screen_mirror1#1 ) - (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 - *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) - (byte*) main::screen#2 ← ++ (byte*) main::screen#6 - (byte) main::x1#1 ← (byte) main::x1#2 + rangenext(0,$13) - (bool~) main::$23 ← (byte) main::x1#1 != rangelast(0,$13) - if((bool~) main::$23) goto main::@12 - to:main::@13 -main::@13: scope:[main] from main::@12 - (byte*) heap_head#30 ← phi( main::@12/(byte*) heap_head#31 ) - (byte) NUM_SQUARES#23 ← phi( main::@12/(byte) NUM_SQUARES#25 ) - (word*) SQUARES#33 ← phi( main::@12/(word*) SQUARES#38 ) - (byte*) main::screen#10 ← phi( main::@12/(byte*) main::screen#2 ) - (byte) main::y#3 ← phi( main::@12/(byte) main::y#4 ) +main::@11: scope:[main] from main::@20 + (word*) SQUARES#18 ← phi( main::@20/(word*) SQUARES#25 ) + (byte*) heap_head#18 ← phi( main::@20/(byte*) heap_head#21 ) + (byte) NUM_SQUARES#10 ← phi( main::@20/(byte) NUM_SQUARES#13 ) + (byte) main::y#3 ← phi( main::@20/(byte) main::y#4 ) + (byte*) main::screen_bottomline#3 ← phi( main::@20/(byte*) main::screen_bottomline#2 ) + (byte*) main::screen_topline#3 ← phi( main::@20/(byte*) main::screen_topline#2 ) + (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#3 + (number) $28 + (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#3 - (number) $28 (byte) main::y#1 ← (byte) main::y#3 + rangenext(0,$c) - (bool~) main::$24 ← (byte) main::y#1 != rangelast(0,$c) - if((bool~) main::$24) goto main::@1 - to:main::@14 -main::@14: scope:[main] from main::@13 - (word*) SQUARES#36 ← phi( main::@13/(word*) SQUARES#33 ) - (byte*) heap_head#28 ← phi( main::@13/(byte*) heap_head#30 ) - (byte) NUM_SQUARES#20 ← phi( main::@13/(byte) NUM_SQUARES#23 ) - (byte*) main::screen#7 ← phi( main::@13/(byte*) main::screen#10 ) - (byte*~) main::$3 ← (byte*) main::screen#7 - (number) $28 - (byte*) main::screen_mirror#0 ← (byte*~) main::$3 - (byte) main::y1#0 ← (byte) 0 - to:main::@17 -main::@17: scope:[main] from main::@14 main::@19 - (word*) SQUARES#31 ← phi( main::@14/(word*) SQUARES#36 main::@19/(word*) SQUARES#18 ) - (byte*) heap_head#25 ← phi( main::@14/(byte*) heap_head#28 main::@19/(byte*) heap_head#18 ) - (byte) NUM_SQUARES#18 ← phi( main::@14/(byte) NUM_SQUARES#20 main::@19/(byte) NUM_SQUARES#10 ) - (byte) main::y1#4 ← phi( main::@14/(byte) main::y1#0 main::@19/(byte) main::y1#1 ) - (byte*) main::screen#11 ← phi( main::@14/(byte*) main::screen#7 main::@19/(byte*) main::screen#13 ) - (byte*) main::screen_mirror#3 ← phi( main::@14/(byte*) main::screen_mirror#0 main::@19/(byte*) main::screen_mirror#4 ) - (byte) main::x3#0 ← (byte) 0 - to:main::@18 -main::@18: scope:[main] from main::@17 main::@18 - (word*) SQUARES#25 ← phi( main::@17/(word*) SQUARES#31 main::@18/(word*) SQUARES#25 ) - (byte*) heap_head#21 ← phi( main::@17/(byte*) heap_head#25 main::@18/(byte*) heap_head#21 ) - (byte) NUM_SQUARES#13 ← phi( main::@17/(byte) NUM_SQUARES#18 main::@18/(byte) NUM_SQUARES#13 ) - (byte) main::y1#3 ← phi( main::@17/(byte) main::y1#4 main::@18/(byte) main::y1#3 ) - (byte) main::x3#2 ← phi( main::@17/(byte) main::x3#0 main::@18/(byte) main::x3#1 ) - (byte*) main::screen#8 ← phi( main::@17/(byte*) main::screen#11 main::@18/(byte*) main::screen#3 ) - (byte*) main::screen_mirror#2 ← phi( main::@17/(byte*) main::screen_mirror#3 main::@18/(byte*) main::screen_mirror#1 ) - (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 - *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) - (byte*) main::screen#3 ← ++ (byte*) main::screen#8 - (byte) main::x3#1 ← (byte) main::x3#2 + rangenext(0,$27) - (bool~) main::$25 ← (byte) main::x3#1 != rangelast(0,$27) - if((bool~) main::$25) goto main::@18 - to:main::@19 -main::@19: scope:[main] from main::@18 - (byte*) main::screen#13 ← phi( main::@18/(byte*) main::screen#3 ) - (byte*) main::screen_mirror#4 ← phi( main::@18/(byte*) main::screen_mirror#1 ) - (word*) SQUARES#18 ← phi( main::@18/(word*) SQUARES#25 ) - (byte*) heap_head#18 ← phi( main::@18/(byte*) heap_head#21 ) - (byte) NUM_SQUARES#10 ← phi( main::@18/(byte) NUM_SQUARES#13 ) - (byte) main::y1#2 ← phi( main::@18/(byte) main::y1#3 ) - (byte) main::y1#1 ← (byte) main::y1#2 + rangenext(0,$b) - (bool~) main::$26 ← (byte) main::y1#1 != rangelast(0,$b) - if((bool~) main::$26) goto main::@17 + (bool~) main::$23 ← (byte) main::y#1 != rangelast(0,$c) + if((bool~) main::$23) goto main::@1 to:main::@return -main::@return: scope:[main] from main::@19 - (word*) SQUARES#11 ← phi( main::@19/(word*) SQUARES#18 ) - (byte*) heap_head#13 ← phi( main::@19/(byte*) heap_head#18 ) - (byte) NUM_SQUARES#7 ← phi( main::@19/(byte) NUM_SQUARES#10 ) +main::@return: scope:[main] from main::@11 + (word*) SQUARES#11 ← phi( main::@11/(word*) SQUARES#18 ) + (byte*) heap_head#13 ← phi( main::@11/(byte*) heap_head#18 ) + (byte) NUM_SQUARES#7 ← phi( main::@11/(byte) NUM_SQUARES#10 ) (byte) NUM_SQUARES#2 ← (byte) NUM_SQUARES#7 (byte*) heap_head#6 ← (byte*) heap_head#13 (word*) SQUARES#4 ← (word*) SQUARES#11 @@ -682,13 +640,7 @@ SYMBOL TABLE SSA (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#24 -(byte) NUM_SQUARES#25 -(byte) NUM_SQUARES#26 -(byte) NUM_SQUARES#27 -(byte) NUM_SQUARES#28 -(byte) NUM_SQUARES#29 (byte) NUM_SQUARES#3 -(byte) NUM_SQUARES#30 (byte) NUM_SQUARES#4 (byte) NUM_SQUARES#5 (byte) NUM_SQUARES#6 @@ -727,12 +679,6 @@ SYMBOL TABLE SSA (word*) SQUARES#31 (word*) SQUARES#32 (word*) SQUARES#33 -(word*) SQUARES#34 -(word*) SQUARES#35 -(word*) SQUARES#36 -(word*) SQUARES#37 -(word*) SQUARES#38 -(word*) SQUARES#39 (word*) SQUARES#4 (word*) SQUARES#5 (word*) SQUARES#6 @@ -848,13 +794,7 @@ SYMBOL TABLE SSA (byte*) heap_head#35 (byte*) heap_head#36 (byte*) heap_head#37 -(byte*) heap_head#38 -(byte*) heap_head#39 (byte*) heap_head#4 -(byte*) heap_head#40 -(byte*) heap_head#41 -(byte*) heap_head#42 -(byte*) heap_head#43 (byte*) heap_head#5 (byte*) heap_head#6 (byte*) heap_head#7 @@ -960,9 +900,6 @@ SYMBOL TABLE SSA (byte~) main::$21 (bool~) main::$22 (bool~) main::$23 -(bool~) main::$24 -(bool~) main::$25 -(bool~) main::$26 (byte*~) main::$3 (number~) main::$4 (bool~) main::$5 @@ -972,19 +909,13 @@ SYMBOL TABLE SSA (number~) main::$9 (label) main::@1 (label) main::@11 -(label) main::@12 -(label) main::@13 -(label) main::@14 +(label) main::@15 +(label) main::@16 (label) main::@17 (label) main::@18 (label) main::@19 (label) main::@2 -(label) main::@21 -(label) main::@22 -(label) main::@23 -(label) main::@24 -(label) main::@25 -(label) main::@26 +(label) main::@20 (label) main::@3 (label) main::@4 (label) main::@5 @@ -996,39 +927,36 @@ SYMBOL TABLE SSA (byte) main::d#0 (word) main::ds (word) main::ds#0 -(byte*) main::screen -(byte*) main::screen#0 -(byte*) main::screen#1 -(byte*) main::screen#10 -(byte*) main::screen#11 -(byte*) main::screen#12 -(byte*) main::screen#13 -(byte*) main::screen#14 -(byte*) main::screen#15 -(byte*) main::screen#16 -(byte*) main::screen#17 -(byte*) main::screen#18 -(byte*) main::screen#19 -(byte*) main::screen#2 -(byte*) main::screen#20 -(byte*) main::screen#21 -(byte*) main::screen#3 -(byte*) main::screen#4 -(byte*) main::screen#5 -(byte*) main::screen#6 -(byte*) main::screen#7 -(byte*) main::screen#8 -(byte*) main::screen#9 -(byte*) main::screen_mirror -(byte*) main::screen_mirror#0 -(byte*) main::screen_mirror#1 -(byte*) main::screen_mirror#2 -(byte*) main::screen_mirror#3 -(byte*) main::screen_mirror#4 -(byte*) main::screen_mirror1 -(byte*) main::screen_mirror1#0 -(byte*) main::screen_mirror1#1 -(byte*) main::screen_mirror1#2 +(byte*) main::screen_bottomline +(byte*) main::screen_bottomline#0 +(byte*) main::screen_bottomline#1 +(byte*) main::screen_bottomline#10 +(byte*) main::screen_bottomline#11 +(byte*) main::screen_bottomline#12 +(byte*) main::screen_bottomline#13 +(byte*) main::screen_bottomline#2 +(byte*) main::screen_bottomline#3 +(byte*) main::screen_bottomline#4 +(byte*) main::screen_bottomline#5 +(byte*) main::screen_bottomline#6 +(byte*) main::screen_bottomline#7 +(byte*) main::screen_bottomline#8 +(byte*) main::screen_bottomline#9 +(byte*) main::screen_topline +(byte*) main::screen_topline#0 +(byte*) main::screen_topline#1 +(byte*) main::screen_topline#10 +(byte*) main::screen_topline#11 +(byte*) main::screen_topline#12 +(byte*) main::screen_topline#13 +(byte*) main::screen_topline#2 +(byte*) main::screen_topline#3 +(byte*) main::screen_topline#4 +(byte*) main::screen_topline#5 +(byte*) main::screen_topline#6 +(byte*) main::screen_topline#7 +(byte*) main::screen_topline#8 +(byte*) main::screen_topline#9 (label) main::toD0181 (word~) main::toD0181_$0 (word~) main::toD0181_$0#0 @@ -1069,18 +997,19 @@ SYMBOL TABLE SSA (byte) main::x#5 (byte) main::x#6 (byte) main::x#7 -(byte) main::x1 -(byte) main::x1#0 -(byte) main::x1#1 -(byte) main::x1#2 (byte) main::x2 (byte) main::x2#0 (byte) main::x2#1 (byte) main::x2#2 -(byte) main::x3 -(byte) main::x3#0 -(byte) main::x3#1 -(byte) main::x3#2 +(byte) main::xb +(byte) main::xb#0 +(byte) main::xb#1 +(byte) main::xb#2 +(byte) main::xb#3 +(byte) main::xb#4 +(byte) main::xb#5 +(byte) main::xb#6 +(byte) main::xb#7 (byte) main::xd (byte) main::xd#0 (word) main::xds @@ -1092,8 +1021,6 @@ SYMBOL TABLE SSA (byte) main::y#11 (byte) main::y#12 (byte) main::y#13 -(byte) main::y#14 -(byte) main::y#15 (byte) main::y#2 (byte) main::y#3 (byte) main::y#4 @@ -1102,12 +1029,6 @@ SYMBOL TABLE SSA (byte) main::y#7 (byte) main::y#8 (byte) main::y#9 -(byte) main::y1 -(byte) main::y1#0 -(byte) main::y1#1 -(byte) main::y1#2 -(byte) main::y1#3 -(byte) main::y1#4 (byte) main::y2 (byte) main::y2#0 (byte) main::y2#1 @@ -1208,6 +1129,7 @@ Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← ( Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0 Adding number conversion cast (unumber) $30 in (byte) NUM_SQUARES#1 ← (number) $30 +Adding number conversion cast (unumber) $28*$18 in (byte*~) main::$3 ← (byte*) SCREEN#0 + (number) $28*(number) $18 Adding number conversion cast (unumber) 2 in (number~) main::$4 ← (byte) main::y#2 * (number) 2 Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (byte) main::y#2 * (unumber)(number) 2 Adding number conversion cast (unumber) $18 in (bool~) main::$5 ← (byte) main::y2#0 >= (number) $18 @@ -1217,12 +1139,15 @@ Adding number conversion cast (unumber) main::$9 in (number~) main::$9 ← (unum Adding number conversion cast (unumber) $18 in (number~) main::$6 ← (number) $18 - (byte) main::y2#2 Adding number conversion cast (unumber) main::$6 in (number~) main::$6 ← (unumber)(number) $18 - (byte) main::y2#2 Adding number conversion cast (unumber) main::$7 in (number~) main::$7 ← (unumber~) main::$6 -Adding number conversion cast (unumber) main::$10 in (byte*) heap_head#40 ← phi( main::@2/(byte*) heap_head#41 main::@3/(byte*) heap_head#42 ) - (byte) main::y#13 ← phi( main::@2/(byte) main::y#14 main::@3/(byte) main::y#15 ) - (byte*) main::screen#18 ← phi( main::@2/(byte*) main::screen#19 main::@3/(byte*) main::screen#20 ) - (byte) NUM_SQUARES#24 ← phi( main::@2/(byte) NUM_SQUARES#26 main::@3/(byte) NUM_SQUARES#27 ) +Adding number conversion cast (unumber) main::$10 in (byte*) heap_head#34 ← phi( main::@2/(byte*) heap_head#35 main::@3/(byte*) heap_head#36 ) + (byte) main::y#11 ← phi( main::@2/(byte) main::y#12 main::@3/(byte) main::y#13 ) + (byte*) main::screen_bottomline#10 ← phi( main::@2/(byte*) main::screen_bottomline#11 main::@3/(byte*) main::screen_bottomline#12 ) + (byte*) main::screen_topline#10 ← phi( main::@2/(byte*) main::screen_topline#11 main::@3/(byte*) main::screen_topline#12 ) + (byte) NUM_SQUARES#20 ← phi( main::@2/(byte) NUM_SQUARES#21 main::@3/(byte) NUM_SQUARES#22 ) (word*) SQUARES#14 ← phi( main::@2/(word*) SQUARES#21 main::@3/(word*) SQUARES#22 ) (number~) main::$10 ← phi( main::@2/(unumber~) main::$9 main::@3/(unumber~) main::$7 ) +Adding number conversion cast (unumber) 0 in (byte) main::x#0 ← (number) 0 +Adding number conversion cast (unumber) $27 in (byte) main::xb#0 ← (number) $27 Adding number conversion cast (unumber) 2 in (number~) main::$12 ← (byte) main::x#2 * (number) 2 Adding number conversion cast (unumber) main::$12 in (number~) main::$12 ← (byte) main::x#2 * (unumber)(number) 2 Adding number conversion cast (unumber) $27 in (bool~) main::$13 ← (byte) main::x2#0 >= (number) $27 @@ -1232,15 +1157,19 @@ Adding number conversion cast (unumber) main::$17 in (number~) main::$17 ← (un Adding number conversion cast (unumber) $27 in (number~) main::$14 ← (number) $27 - (byte) main::x2#2 Adding number conversion cast (unumber) main::$14 in (number~) main::$14 ← (unumber)(number) $27 - (byte) main::x2#2 Adding number conversion cast (unumber) main::$15 in (number~) main::$15 ← (unumber~) main::$14 -Adding number conversion cast (unumber) main::$18 in (byte*) heap_head#35 ← phi( main::@6/(byte*) heap_head#36 main::@7/(byte*) heap_head#37 ) - (byte) main::y#8 ← phi( main::@6/(byte) main::y#9 main::@7/(byte) main::y#10 ) +Adding number conversion cast (unumber) main::$18 in (byte*) heap_head#28 ← phi( main::@6/(byte*) heap_head#30 main::@7/(byte*) heap_head#31 ) + (byte) main::y#6 ← phi( main::@6/(byte) main::y#7 main::@7/(byte) main::y#8 ) + (byte) main::xb#4 ← phi( main::@6/(byte) main::xb#5 main::@7/(byte) main::xb#6 ) + (byte*) main::screen_bottomline#5 ← phi( main::@6/(byte*) main::screen_bottomline#6 main::@7/(byte*) main::screen_bottomline#7 ) (byte) main::x#5 ← phi( main::@6/(byte) main::x#6 main::@7/(byte) main::x#7 ) - (byte*) main::screen#12 ← phi( main::@6/(byte*) main::screen#14 main::@7/(byte*) main::screen#15 ) + (byte*) main::screen_topline#5 ← phi( main::@6/(byte*) main::screen_topline#6 main::@7/(byte*) main::screen_topline#7 ) (byte) NUM_SQUARES#12 ← phi( main::@6/(byte) NUM_SQUARES#16 main::@7/(byte) NUM_SQUARES#17 ) (word) main::yds#2 ← phi( main::@6/(word) main::yds#3 main::@7/(word) main::yds#4 ) (word*) SQUARES#15 ← phi( main::@6/(word*) SQUARES#23 main::@7/(word*) SQUARES#24 ) (number~) main::$18 ← phi( main::@6/(unumber~) main::$17 main::@7/(unumber~) main::$15 ) -Adding number conversion cast (unumber) $28 in (byte*~) main::$3 ← (byte*) main::screen#7 - (number) $28 +Adding number conversion cast (unumber) $13 in (bool~) main::$22 ← (byte) main::x#1 <= (number) $13 +Adding number conversion cast (unumber) $28 in (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#3 + (number) $28 +Adding number conversion cast (unumber) $28 in (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#3 - (number) $28 Successful SSA optimization PassNAddNumberTypeConversions Adding number conversion cast (byte) to elements in (byte[]) FONT_HEX_PROTO#0 ← { (byte)(number) 2, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 2, (byte)(number) 2, (byte)(number) 2, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 4, (byte)(number) 7, (byte)(number) 6, (byte)(number) 1, (byte)(number) 2, (byte)(number) 1, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 1, (byte)(number) 6, (byte)(number) 3, (byte)(number) 4, (byte)(number) 6, (byte)(number) 5, (byte)(number) 2, (byte)(number) 7, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 5, (byte)(number) 2, (byte)(number) 2, (byte)(number) 5, (byte)(number) 3, (byte)(number) 1, (byte)(number) 1, (byte)(number) 2, (byte)(number) 5, (byte)(number) 7, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 5, (byte)(number) 6, (byte)(number) 2, (byte)(number) 5, (byte)(number) 4, (byte)(number) 5, (byte)(number) 2, (byte)(number) 6, (byte)(number) 5, (byte)(number) 5, (byte)(number) 5, (byte)(number) 6, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 7, (byte)(number) 7, (byte)(number) 4, (byte)(number) 6, (byte)(number) 4, (byte)(number) 4 } Successful SSA optimization PassNAddArrayNumberTypeConversions @@ -1262,6 +1191,8 @@ Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $2800 Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 Inlining cast (byte) NUM_SQUARES#1 ← (unumber)(number) $30 +Inlining cast (byte) main::x#0 ← (unumber)(number) 0 +Inlining cast (byte) main::xb#0 ← (unumber)(number) $27 Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 49152 Simplifying constant integer cast 0 @@ -1377,10 +1308,14 @@ Simplifying constant integer cast 2 Simplifying constant integer cast $18 Simplifying constant integer cast $18 Simplifying constant integer cast $18 +Simplifying constant integer cast 0 +Simplifying constant integer cast $27 Simplifying constant integer cast 2 Simplifying constant integer cast $27 Simplifying constant integer cast $27 Simplifying constant integer cast $27 +Simplifying constant integer cast $13 +Simplifying constant integer cast $28 Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 0 @@ -1413,10 +1348,14 @@ Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $18 Finalized unsigned number type (byte) $18 Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $27 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $27 Finalized unsigned number type (byte) $27 Finalized unsigned number type (byte) $27 +Finalized unsigned number type (byte) $13 +Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD @@ -1478,82 +1417,79 @@ Alias (byte*) init_font_hex::proto_hi#2 = (byte*) init_font_hex::proto_hi#5 (byt Alias (byte) init_font_hex::c#2 = (byte) init_font_hex::c#3 (byte) init_font_hex::c#4 Alias (byte*) init_font_hex::charset#0 = (byte*) init_font_hex::charset#7 Alias (byte*) heap_head#17 = (byte*) heap_head#27 (byte*) heap_head#29 (byte*) heap_head#24 (byte*) heap_head#20 -Alias (word*) SQUARES#17 = (word*) SQUARES#32 (word*) SQUARES#37 (word*) SQUARES#28 (word*) SQUARES#20 +Alias (word*) SQUARES#17 = (word*) SQUARES#31 (word*) SQUARES#33 (word*) SQUARES#28 (word*) SQUARES#20 Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$1 -Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#30 +Alias (byte) NUM_SQUARES#1 = (byte) NUM_SQUARES#24 Alias (byte*) heap_head#12 = (byte*) heap_head#5 Alias (word*) SQUARES#10 = (word*) SQUARES#3 +Alias (byte*) main::screen_bottomline#0 = (byte*~) main::$3 Alias (byte) main::y2#0 = (byte~) main::$4 (byte) main::y2#1 (byte) main::y2#2 Alias (word*) SQUARES#21 = (word*) SQUARES#29 (word*) SQUARES#22 -Alias (byte) NUM_SQUARES#26 = (byte) NUM_SQUARES#29 (byte) NUM_SQUARES#27 -Alias (byte*) main::screen#19 = (byte*) main::screen#21 (byte*) main::screen#20 -Alias (byte) main::y#14 = (byte) main::y#2 (byte) main::y#15 -Alias (byte*) heap_head#41 = (byte*) heap_head#43 (byte*) heap_head#42 +Alias (byte) NUM_SQUARES#21 = (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#22 +Alias (byte*) main::screen_topline#11 = (byte*) main::screen_topline#13 (byte*) main::screen_topline#12 +Alias (byte*) main::screen_bottomline#11 = (byte*) main::screen_bottomline#13 (byte*) main::screen_bottomline#12 +Alias (byte) main::y#12 = (byte) main::y#2 (byte) main::y#13 +Alias (byte*) heap_head#35 = (byte*) heap_head#37 (byte*) heap_head#36 Alias (byte~) main::$9 = (byte~) main::$8 Alias (byte~) main::$7 = (byte~) main::$6 Alias (byte) main::yd#0 = (byte~) main::$10 Alias (word) sqr::return#2 = (word) sqr::return#5 -Alias (word*) SQUARES#14 = (word*) SQUARES#34 -Alias (byte) NUM_SQUARES#21 = (byte) NUM_SQUARES#24 -Alias (byte*) main::screen#17 = (byte*) main::screen#18 -Alias (byte) main::y#12 = (byte) main::y#13 -Alias (byte*) heap_head#39 = (byte*) heap_head#40 +Alias (word*) SQUARES#14 = (word*) SQUARES#32 +Alias (byte) NUM_SQUARES#19 = (byte) NUM_SQUARES#20 +Alias (byte*) main::screen_topline#10 = (byte*) main::screen_topline#9 +Alias (byte*) main::screen_bottomline#10 = (byte*) main::screen_bottomline#9 +Alias (byte) main::y#10 = (byte) main::y#11 +Alias (byte*) heap_head#33 = (byte*) heap_head#34 Alias (word) main::yds#0 = (word~) main::$11 Alias (byte) main::x2#0 = (byte~) main::$12 (byte) main::x2#1 (byte) main::x2#2 Alias (word*) SQUARES#23 = (word*) SQUARES#30 (word*) SQUARES#24 Alias (word) main::yds#3 = (word) main::yds#5 (word) main::yds#4 -Alias (byte) NUM_SQUARES#16 = (byte) NUM_SQUARES#19 (byte) NUM_SQUARES#17 -Alias (byte*) main::screen#14 = (byte*) main::screen#16 (byte*) main::screen#15 +Alias (byte) NUM_SQUARES#16 = (byte) NUM_SQUARES#18 (byte) NUM_SQUARES#17 +Alias (byte*) main::screen_topline#6 = (byte*) main::screen_topline#8 (byte*) main::screen_topline#7 Alias (byte) main::x#2 = (byte) main::x#6 (byte) main::x#7 -Alias (byte) main::y#10 = (byte) main::y#9 (byte) main::y#11 -Alias (byte*) heap_head#36 = (byte*) heap_head#38 (byte*) heap_head#37 +Alias (byte*) main::screen_bottomline#6 = (byte*) main::screen_bottomline#8 (byte*) main::screen_bottomline#7 +Alias (byte) main::xb#5 = (byte) main::xb#7 (byte) main::xb#6 +Alias (byte) main::y#7 = (byte) main::y#9 (byte) main::y#8 +Alias (byte*) heap_head#30 = (byte*) heap_head#32 (byte*) heap_head#31 Alias (byte~) main::$17 = (byte~) main::$16 Alias (byte~) main::$15 = (byte~) main::$14 Alias (byte) main::xd#0 = (byte~) main::$18 Alias (word) sqr::return#3 = (word) sqr::return#6 Alias (word) main::yds#1 = (word) main::yds#2 (word) main::yds#6 -Alias (word*) SQUARES#15 = (word*) SQUARES#16 (word*) SQUARES#35 (word*) SQUARES#39 -Alias (byte) NUM_SQUARES#12 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#22 (byte) NUM_SQUARES#28 -Alias (byte*) main::screen#12 = (byte*) main::screen#9 (byte*) main::screen#4 +Alias (word*) SQUARES#11 = (word*) SQUARES#16 (word*) SQUARES#15 (word*) SQUARES#25 (word*) SQUARES#18 (word*) SQUARES#4 +Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#9 (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#7 (byte) NUM_SQUARES#2 +Alias (byte*) main::screen_topline#2 = (byte*) main::screen_topline#4 (byte*) main::screen_topline#5 (byte*) main::screen_topline#3 Alias (byte) main::x#3 = (byte) main::x#4 (byte) main::x#5 -Alias (byte) main::y#5 = (byte) main::y#7 (byte) main::y#8 (byte) main::y#6 -Alias (byte*) heap_head#32 = (byte*) heap_head#34 (byte*) heap_head#35 (byte*) heap_head#33 +Alias (byte*) main::screen_bottomline#2 = (byte*) main::screen_bottomline#4 (byte*) main::screen_bottomline#5 (byte*) main::screen_bottomline#3 +Alias (byte) main::xb#2 = (byte) main::xb#3 (byte) main::xb#4 +Alias (byte) main::y#3 = (byte) main::y#5 (byte) main::y#6 (byte) main::y#4 +Alias (byte*) heap_head#13 = (byte*) heap_head#25 (byte*) heap_head#28 (byte*) heap_head#21 (byte*) heap_head#18 (byte*) heap_head#6 Alias (word) main::xds#0 = (word~) main::$19 Alias (word) main::ds#0 = (word~) main::$20 Alias (byte) sqrt::return#2 = (byte) sqrt::return#4 Alias (byte) main::d#0 = (byte~) main::$21 -Alias (byte*) main::screen#1 = (byte*) main::screen#5 (byte*) main::screen_mirror1#0 -Alias (byte) main::y#3 = (byte) main::y#4 -Alias (byte*) main::screen#10 = (byte*) main::screen#2 (byte*) main::screen#7 -Alias (word*) SQUARES#33 = (word*) SQUARES#38 (word*) SQUARES#36 -Alias (byte) NUM_SQUARES#20 = (byte) NUM_SQUARES#23 (byte) NUM_SQUARES#25 -Alias (byte*) heap_head#28 = (byte*) heap_head#30 (byte*) heap_head#31 -Alias (byte*) main::screen_mirror#0 = (byte*~) main::$3 -Alias (byte) main::y1#2 = (byte) main::y1#3 -Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#13 (byte) NUM_SQUARES#7 (byte) NUM_SQUARES#2 -Alias (byte*) heap_head#13 = (byte*) heap_head#18 (byte*) heap_head#21 (byte*) heap_head#6 -Alias (word*) SQUARES#11 = (word*) SQUARES#18 (word*) SQUARES#25 (word*) SQUARES#4 -Alias (byte*) main::screen_mirror#1 = (byte*) main::screen_mirror#4 -Alias (byte*) main::screen#13 = (byte*) main::screen#3 Alias (byte) NUM_SQUARES#3 = (byte) NUM_SQUARES#8 Alias (byte*) heap_head#14 = (byte*) heap_head#7 Alias (word*) SQUARES#12 = (word*) SQUARES#5 Successful SSA optimization Pass2AliasElimination Alias (word) bsearch16u::key#1 = (word) bsearch16u::key#5 Alias (word*) SQUARES#14 = (word*) SQUARES#21 -Alias (byte) NUM_SQUARES#21 = (byte) NUM_SQUARES#26 -Alias (byte*) main::screen#17 = (byte*) main::screen#19 -Alias (byte) main::y#12 = (byte) main::y#14 -Alias (byte*) heap_head#39 = (byte*) heap_head#41 -Alias (word*) SQUARES#15 = (word*) SQUARES#23 +Alias (byte) NUM_SQUARES#19 = (byte) NUM_SQUARES#21 +Alias (byte*) main::screen_topline#10 = (byte*) main::screen_topline#11 +Alias (byte*) main::screen_bottomline#10 = (byte*) main::screen_bottomline#11 +Alias (byte) main::y#10 = (byte) main::y#12 +Alias (byte*) heap_head#33 = (byte*) heap_head#35 +Alias (word*) SQUARES#11 = (word*) SQUARES#23 Alias (word) main::yds#1 = (word) main::yds#3 -Alias (byte) NUM_SQUARES#12 = (byte) NUM_SQUARES#16 -Alias (byte*) main::screen#12 = (byte*) main::screen#14 +Alias (byte) NUM_SQUARES#10 = (byte) NUM_SQUARES#16 +Alias (byte*) main::screen_topline#2 = (byte*) main::screen_topline#6 Alias (byte) main::x#2 = (byte) main::x#3 -Alias (byte) main::y#10 = (byte) main::y#5 -Alias (byte*) heap_head#32 = (byte*) heap_head#36 +Alias (byte*) main::screen_bottomline#2 = (byte*) main::screen_bottomline#6 +Alias (byte) main::xb#2 = (byte) main::xb#5 +Alias (byte) main::y#3 = (byte) main::y#7 +Alias (byte*) heap_head#13 = (byte*) heap_head#30 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (word) bsearch16u::key#1 Self Phi Eliminated (byte*) heap_head#11 @@ -1563,19 +1499,13 @@ Self Phi Eliminated (byte*) init_font_hex::proto_lo#2 Self Phi Eliminated (byte*) init_font_hex::charset#3 Self Phi Eliminated (byte) init_font_hex::c1#2 Self Phi Eliminated (byte) init_font_hex::c#2 -Self Phi Eliminated (word*) SQUARES#15 -Self Phi Eliminated (word) main::yds#1 -Self Phi Eliminated (byte) NUM_SQUARES#12 -Self Phi Eliminated (byte) main::y#10 -Self Phi Eliminated (byte*) heap_head#32 -Self Phi Eliminated (byte) main::y#3 -Self Phi Eliminated (word*) SQUARES#33 -Self Phi Eliminated (byte) NUM_SQUARES#20 -Self Phi Eliminated (byte*) heap_head#28 -Self Phi Eliminated (byte) main::y1#2 -Self Phi Eliminated (byte) NUM_SQUARES#10 -Self Phi Eliminated (byte*) heap_head#13 Self Phi Eliminated (word*) SQUARES#11 +Self Phi Eliminated (word) main::yds#1 +Self Phi Eliminated (byte) NUM_SQUARES#10 +Self Phi Eliminated (byte*) main::screen_topline#2 +Self Phi Eliminated (byte*) main::screen_bottomline#2 +Self Phi Eliminated (byte) main::y#3 +Self Phi Eliminated (byte*) heap_head#13 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte*) heap_head#8 (byte*) heap_head#15 Identical Phi Values (word) malloc::size#1 (word) malloc::size#0 @@ -1589,8 +1519,8 @@ Identical Phi Values (byte*) heap_head#10 (byte*) heap_head#1 Identical Phi Values (byte*) heap_head#11 (byte*) heap_head#10 Identical Phi Values (word*) SQUARES#13 (word*) SQUARES#1 Identical Phi Values (word) sqrt::val#1 (word) sqrt::val#0 -Identical Phi Values (word*) SQUARES#8 (word*) SQUARES#15 -Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#12 +Identical Phi Values (word*) SQUARES#8 (word*) SQUARES#11 +Identical Phi Values (byte) NUM_SQUARES#6 (byte) NUM_SQUARES#10 Identical Phi Values (byte*) init_font_hex::charset#6 (byte*) init_font_hex::charset#1 Identical Phi Values (byte*) init_font_hex::proto_hi#2 (byte*) init_font_hex::proto_hi#4 Identical Phi Values (byte*) init_font_hex::proto_lo#2 (byte*) init_font_hex::proto_lo#4 @@ -1601,19 +1531,13 @@ Identical Phi Values (byte*) heap_head#17 (byte*) HEAP_START#0 Identical Phi Values (word*) SQUARES#17 (word*) SQUARES#0 Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#11 Identical Phi Values (word*) SQUARES#10 (word*) SQUARES#13 -Identical Phi Values (word*) SQUARES#15 (word*) SQUARES#14 +Identical Phi Values (word*) SQUARES#11 (word*) SQUARES#14 Identical Phi Values (word) main::yds#1 (word) main::yds#0 -Identical Phi Values (byte) NUM_SQUARES#12 (byte) NUM_SQUARES#21 -Identical Phi Values (byte) main::y#10 (byte) main::y#12 -Identical Phi Values (byte*) heap_head#32 (byte*) heap_head#39 +Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#19 +Identical Phi Values (byte*) main::screen_topline#2 (byte*) main::screen_topline#10 +Identical Phi Values (byte*) main::screen_bottomline#2 (byte*) main::screen_bottomline#10 Identical Phi Values (byte) main::y#3 (byte) main::y#10 -Identical Phi Values (word*) SQUARES#33 (word*) SQUARES#15 -Identical Phi Values (byte) NUM_SQUARES#20 (byte) NUM_SQUARES#12 -Identical Phi Values (byte*) heap_head#28 (byte*) heap_head#32 -Identical Phi Values (byte) main::y1#2 (byte) main::y1#4 -Identical Phi Values (byte) NUM_SQUARES#10 (byte) NUM_SQUARES#18 -Identical Phi Values (byte*) heap_head#13 (byte*) heap_head#25 -Identical Phi Values (word*) SQUARES#11 (word*) SQUARES#31 +Identical Phi Values (byte*) heap_head#13 (byte*) heap_head#33 Identical Phi Values (byte) NUM_SQUARES#3 (byte) NUM_SQUARES#10 Identical Phi Values (byte*) heap_head#14 (byte*) heap_head#13 Identical Phi Values (word*) SQUARES#12 (word*) SQUARES#11 @@ -1628,13 +1552,10 @@ Simple Condition (bool~) init_squares::$5 [77] if((byte) init_squares::i#1!=rang Simple Condition (bool~) init_font_hex::$3 [126] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition (bool~) init_font_hex::$4 [136] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 Simple Condition (bool~) init_font_hex::$5 [141] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) main::$5 [180] if((byte) main::y2#0>=(byte) $18) goto main::@2 -Simple Condition (bool~) main::$13 [200] if((byte) main::x2#0>=(byte) $27) goto main::@6 -Simple Condition (bool~) main::$22 [227] if((byte) main::x#1!=rangelast(0,$13)) goto main::@5 -Simple Condition (bool~) main::$23 [237] if((byte) main::x1#1!=rangelast(0,$13)) goto main::@12 -Simple Condition (bool~) main::$24 [241] if((byte) main::y#1!=rangelast(0,$c)) goto main::@1 -Simple Condition (bool~) main::$25 [254] if((byte) main::x3#1!=rangelast(0,$27)) goto main::@18 -Simple Condition (bool~) main::$26 [258] if((byte) main::y1#1!=rangelast(0,$b)) goto main::@17 +Simple Condition (bool~) main::$5 [182] if((byte) main::y2#0>=(byte) $18) goto main::@2 +Simple Condition (bool~) main::$13 [203] if((byte) main::x2#0>=(byte) $27) goto main::@6 +Simple Condition (bool~) main::$22 [233] if((byte) main::x#1<=(byte) $13) goto main::@5 +Simple Condition (bool~) main::$23 [239] if((byte) main::y#1!=rangelast(0,$c)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD @@ -1658,9 +1579,7 @@ Constant (const byte*) SCREEN#0 = (byte*) 10240 Constant (const byte) NUM_SQUARES#1 = $30 Constant (const byte) main::y#0 = 0 Constant (const byte) main::x#0 = 0 -Constant (const byte) main::x1#0 = 0 -Constant (const byte) main::y1#0 = 0 -Constant (const byte) main::x3#0 = 0 +Constant (const byte) main::xb#0 = $27 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) malloc::mem#0 = HEAP_START#0 Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO#0 @@ -1668,7 +1587,7 @@ Constant (const byte*) init_font_hex::proto_lo#0 = FONT_HEX_PROTO#0 Constant (const byte*) init_font_hex::charset#1 = CHARSET#0 Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 Constant (const byte*) main::toD0181_gfx#0 = CHARSET#0 -Constant (const byte*) main::screen#0 = SCREEN#0 +Constant (const byte*) main::screen_topline#0 = SCREEN#0 Successful SSA optimization Pass2ConstantIdentification Constant value identified (void*)malloc::mem#0 in [5] (void*) malloc::return#0 ← (void*)(const byte*) malloc::mem#0 Constant value identified (word)main::toD0181_screen#0 in [154] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 @@ -1680,27 +1599,16 @@ Resolved ranged next value [134] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 Resolved ranged comparison value [136] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 Resolved ranged next value [139] init_font_hex::c#1 ← ++ init_font_hex::c#5 to ++ Resolved ranged comparison value [141] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [225] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [227] if(main::x#1!=rangelast(0,$13)) goto main::@5 to (number) $14 -Resolved ranged next value [235] main::x1#1 ← ++ main::x1#2 to ++ -Resolved ranged comparison value [237] if(main::x1#1!=rangelast(0,$13)) goto main::@12 to (number) $14 -Resolved ranged next value [239] main::y#1 ← ++ main::y#12 to ++ -Resolved ranged comparison value [241] if(main::y#1!=rangelast(0,$c)) goto main::@1 to (number) $d -Resolved ranged next value [252] main::x3#1 ← ++ main::x3#2 to ++ -Resolved ranged comparison value [254] if(main::x3#1!=rangelast(0,$27)) goto main::@18 to (number) $28 -Resolved ranged next value [256] main::y1#1 ← ++ main::y1#4 to ++ -Resolved ranged comparison value [258] if(main::y1#1!=rangelast(0,$b)) goto main::@17 to (number) $c +Resolved ranged next value [237] main::y#1 ← ++ main::y#10 to ++ +Resolved ranged comparison value [239] if(main::y#1!=rangelast(0,$c)) goto main::@1 to (number) $d +Rewriting conditional comparison [233] if((byte) main::x#1<=(byte) $13) goto main::@5 Simplifying expression containing zero init_font_hex::charset#2 in [115] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [67] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 -Eliminating unused variable - keeping the phi block (byte) NUM_SQUARES#18 -Eliminating unused variable - keeping the phi block (byte*) heap_head#25 -Eliminating unused variable - keeping the phi block (word*) SQUARES#31 +Eliminating unused variable - keeping the phi block (byte*) heap_head#33 Eliminating unused constant (const byte) NUM_SQUARES#0 Eliminating unused constant (const word*) SQUARES#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused variable - keeping the phi block (byte*) heap_head#39 -Successful SSA optimization PassNEliminateUnusedVars Eliminating unused variable (byte*) heap_head#1 and assignment [0] (byte*) heap_head#1 ← (const byte*) HEAP_START#0 + (word) malloc::size#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused variable (word) malloc::size#0 and assignment [21] (word) malloc::size#0 ← (const byte) NUM_SQUARES#1 * (const byte) SIZEOF_WORD @@ -1708,42 +1616,36 @@ Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) 5 in if((byte) init_font_hex::i#1!=(number) 5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c1#1!=(number) $10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in if((byte) init_font_hex::c#1!=(number) $10) goto init_font_hex::@1 -Adding number conversion cast (unumber) $14 in if((byte) main::x#1!=(number) $14) goto main::@5 -Adding number conversion cast (unumber) $14 in if((byte) main::x1#1!=(number) $14) goto main::@12 +Adding number conversion cast (unumber) $13+1 in if((byte) main::x#1<(byte) $13+(number) 1) goto main::@5 +Adding number conversion cast (unumber) 1 in if((byte) main::x#1<(unumber)(byte) $13+(number) 1) goto main::@5 Adding number conversion cast (unumber) $d in if((byte) main::y#1!=(number) $d) goto main::@1 -Adding number conversion cast (unumber) $28 in if((byte) main::x3#1!=(number) $28) goto main::@18 -Adding number conversion cast (unumber) $c in if((byte) main::y1#1!=(number) $c) goto main::@17 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 -Simplifying constant integer cast $14 -Simplifying constant integer cast $14 +Simplifying constant integer cast (byte) $13+(unumber)(number) 1 +Simplifying constant integer cast 1 Simplifying constant integer cast $d -Simplifying constant integer cast $28 -Simplifying constant integer cast $c Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 -Finalized unsigned number type (byte) $14 -Finalized unsigned number type (byte) $14 +Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d -Finalized unsigned number type (byte) $28 -Finalized unsigned number type (byte) $c Successful SSA optimization PassNFinalizeNumberTypeConversions Self Phi Eliminated (byte*) init_font_hex::proto_hi#4 Self Phi Eliminated (byte) init_font_hex::c#5 Self Phi Eliminated (word*) SQUARES#14 -Self Phi Eliminated (byte) NUM_SQUARES#21 +Self Phi Eliminated (byte) NUM_SQUARES#19 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::proto_hi#6 Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6 Identical Phi Values (word*) SQUARES#14 (word*) SQUARES#1 -Identical Phi Values (byte) NUM_SQUARES#21 (const byte) NUM_SQUARES#1 +Identical Phi Values (byte) NUM_SQUARES#19 (const byte) NUM_SQUARES#1 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [26] (byte~) init_squares::$2 ← (const byte) NUM_SQUARES#1 - (byte) 1 Constant right-side identified [53] (byte) init_font_hex::idx#1 ← ++ (const byte) init_font_hex::idx#0 +Constant right-side identified [85] (byte*) main::screen_bottomline#0 ← (const byte*) SCREEN#0 + (word)(number) $28*(number) $18 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const void*) malloc::return#0 = (void*)malloc::mem#0 Constant (const byte) init_squares::$2 = NUM_SQUARES#1-1 @@ -1751,6 +1653,7 @@ Constant (const byte) bsearch16u::num#2 = NUM_SQUARES#1 Constant (const byte) init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant (const word) main::toD0181_$0#0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4#0 = (word)main::toD0181_gfx#0 +Constant (const byte*) main::screen_bottomline#0 = SCREEN#0+(word)$28*$18 Successful SSA optimization Pass2ConstantIdentification Constant (const void*) malloc::return#2 = malloc::return#0 Successful SSA optimization Pass2ConstantIdentification @@ -1801,7 +1704,7 @@ Rewriting multiplication to use shift [4] (byte~) bsearch16u::$16 ← (byte~) bs Rewriting multiplication to use shift [24] (byte~) init_squares::$3 ← (byte) init_squares::i#2 * (byte) 2 Rewriting multiplication to use shift [31] (byte~) sqr::$0 ← (byte) sqr::val#2 * (const byte) SIZEOF_WORD Rewriting division to use shift [39] (word~) sqrt::$1 ← (word~) sqrt::$3 / (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [68] (byte) main::y2#0 ← (byte) main::y#12 * (byte) 2 +Rewriting multiplication to use shift [68] (byte) main::y2#0 ← (byte) main::y#10 * (byte) 2 Rewriting multiplication to use shift [78] (byte) main::x2#0 ← (byte) main::x#2 * (byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with different constant siblings (const void*) malloc::return#2 @@ -1820,22 +1723,21 @@ Inlining constant with var siblings (const byte*) init_font_hex::charset#1 Inlining constant with var siblings (const byte) init_font_hex::idx#1 Inlining constant with var siblings (const byte) main::y#0 Inlining constant with var siblings (const byte) main::x#0 -Inlining constant with var siblings (const byte) main::x1#0 -Inlining constant with var siblings (const byte) main::y1#0 -Inlining constant with var siblings (const byte) main::x3#0 -Inlining constant with var siblings (const byte*) main::screen#0 -Constant inlined main::screen#0 = (const byte*) SCREEN#0 +Inlining constant with var siblings (const byte) main::xb#0 +Inlining constant with var siblings (const byte*) main::screen_topline#0 +Inlining constant with var siblings (const byte*) main::screen_bottomline#0 Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 Constant inlined main::toD0181_gfx#0 = (const byte*) CHARSET#0 -Constant inlined main::x1#0 = (byte) 0 +Constant inlined main::screen_topline#0 = (const byte*) SCREEN#0 Constant inlined init_squares::sqr#0 = (byte) 0 Constant inlined init_squares::squares#0 = (const word*) SQUARES#1 Constant inlined init_font_hex::proto_hi#0 = (const byte[]) FONT_HEX_PROTO#0 +Constant inlined main::xb#0 = (byte) $27 Constant inlined init_font_hex::charset#1 = (const byte*) CHARSET#0 Constant inlined init_font_hex::c1#0 = (byte) 0 -Constant inlined main::y1#0 = (byte) 0 Constant inlined malloc::return#2 = (const void*) malloc::return#0 Constant inlined bsearch16u::num#2 = (const byte) NUM_SQUARES#1 +Constant inlined main::screen_bottomline#0 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0 Constant inlined main::x#0 = (byte) 0 Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff @@ -1857,7 +1759,6 @@ Constant inlined malloc::mem#0 = (const byte*) HEAP_START#0 Constant inlined init_font_hex::c#0 = (byte) 0 Constant inlined init_squares::$1 = (const void*) malloc::return#0 Constant inlined init_squares::$2 = (const byte) NUM_SQUARES#1-(byte) 1 -Constant inlined main::x3#0 = (byte) 0 Constant inlined bsearch16u::items#1 = (const word*) SQUARES#1 Successful SSA optimization Pass2ConstantInlining Simplifying constant integer increment ++0 @@ -1867,11 +1768,8 @@ Added new block during phi lifting init_squares::@4(between init_squares::@1 and Added new block during phi lifting init_font_hex::@7(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@9(between init_font_hex::@3 and init_font_hex::@3) -Added new block during phi lifting main::@27(between main::@13 and main::@1) -Added new block during phi lifting main::@28(between main::@26 and main::@5) -Added new block during phi lifting main::@29(between main::@12 and main::@12) -Added new block during phi lifting main::@30(between main::@19 and main::@17) -Added new block during phi lifting main::@31(between main::@18 and main::@18) +Added new block during phi lifting main::@21(between main::@11 and main::@1) +Added new block during phi lifting main::@22(between main::@20 and main::@5) Adding NOP phi() at start of @begin Adding NOP phi() at start of @3 Adding NOP phi() at start of @6 @@ -1880,10 +1778,10 @@ Adding NOP phi() at start of @12 Adding NOP phi() at start of @13 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@22 +Adding NOP phi() at start of main::@16 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0181_@return -Adding NOP phi() at start of main::@23 +Adding NOP phi() at start of main::@17 Adding NOP phi() at start of bsearch16u Adding NOP phi() at start of init_squares Adding NOP phi() at start of init_squares::@3 @@ -1891,72 +1789,54 @@ Adding NOP phi() at start of malloc Adding NOP phi() at start of init_font_hex CALL GRAPH Calls in [] to main:5 -Calls in [main] to init_font_hex:9 init_squares:14 sqr:24 sqr:36 sqrt:41 -Calls in [sqrt] to bsearch16u:91 -Calls in [init_squares] to malloc:131 +Calls in [main] to init_font_hex:9 init_squares:14 sqr:24 sqr:35 sqrt:40 +Calls in [sqrt] to bsearch16u:65 +Calls in [init_squares] to malloc:105 -Created 33 initial phi equivalence classes +Created 25 initial phi equivalence classes Coalesced [20] main::yd#2 ← main::$7 Coalesced [23] sqr::val#3 ← sqr::val#0 -Coalesced [27] main::screen#23 ← main::screen#17 -Coalesced [32] main::xd#2 ← main::$15 -Coalesced [35] sqr::val#4 ← sqr::val#1 -Not coalescing [48] main::screen_mirror1#3 ← main::screen#1 -Coalesced [49] main::screen#25 ← main::screen#1 -Coalesced [59] main::screen_mirror#5 ← main::screen_mirror#0 -Coalesced [60] main::screen#27 ← main::screen#10 -Coalesced [62] main::screen_mirror#7 ← main::screen_mirror#3 -Coalesced [63] main::screen#29 ← main::screen#11 -Coalesced [73] main::screen_mirror#6 ← main::screen_mirror#1 -Coalesced [74] main::screen#28 ← main::screen#13 -Coalesced [75] main::y1#5 ← main::y1#1 -Coalesced (already) [76] main::screen_mirror#8 ← main::screen_mirror#1 -Coalesced (already) [77] main::screen#30 ← main::screen#13 -Coalesced [78] main::x3#3 ← main::x3#1 -Coalesced [79] main::y#16 ← main::y#1 -Coalesced [80] main::screen#22 ← main::screen#10 -Coalesced [81] main::screen_mirror1#4 ← main::screen_mirror1#1 -Coalesced [82] main::screen#26 ← main::screen#10 -Coalesced [83] main::x1#3 ← main::x1#1 -Coalesced [84] main::x#8 ← main::x#1 -Coalesced (already) [85] main::screen#24 ← main::screen#1 -Coalesced [87] main::xd#1 ← main::$17 -Coalesced [89] main::yd#1 ← main::$9 -Coalesced [103] bsearch16u::return#9 ← bsearch16u::$2 -Coalesced [105] bsearch16u::return#7 ← bsearch16u::return#2 -Coalesced [108] bsearch16u::return#8 ← bsearch16u::items#2 -Not coalescing [114] bsearch16u::return#6 ← bsearch16u::pivot#0 -Coalesced [118] bsearch16u::num#10 ← bsearch16u::num#1 -Coalesced [119] bsearch16u::items#11 ← bsearch16u::items#0 -Coalesced [122] bsearch16u::num#9 ← bsearch16u::num#0 -Coalesced [123] bsearch16u::items#10 ← bsearch16u::items#8 -Coalesced [124] bsearch16u::num#11 ← bsearch16u::num#3 -Coalesced (already) [125] bsearch16u::items#12 ← bsearch16u::items#2 -Coalesced [142] init_squares::sqr#3 ← init_squares::sqr#1 -Coalesced [143] init_squares::squares#3 ← init_squares::squares#1 -Coalesced [144] init_squares::i#3 ← init_squares::i#1 -Coalesced [149] init_font_hex::charset#9 ← init_font_hex::charset#5 -Coalesced [171] init_font_hex::charset#8 ← init_font_hex::charset#0 -Coalesced [172] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 -Coalesced [173] init_font_hex::c#7 ← init_font_hex::c#1 -Coalesced (already) [174] init_font_hex::charset#10 ← init_font_hex::charset#0 -Coalesced [175] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 -Coalesced [176] init_font_hex::c1#5 ← init_font_hex::c1#1 -Coalesced [177] init_font_hex::i#3 ← init_font_hex::i#1 -Coalesced [178] init_font_hex::idx#7 ← init_font_hex::idx#2 -Coalesced down to 24 phi equivalence classes +Coalesced [31] main::xd#2 ← main::$15 +Coalesced [34] sqr::val#4 ← sqr::val#1 +Coalesced [55] main::y#14 ← main::y#1 +Coalesced [56] main::screen_topline#14 ← main::screen_topline#1 +Coalesced [57] main::screen_bottomline#14 ← main::screen_bottomline#1 +Coalesced [58] main::x#8 ← main::x#1 +Coalesced [59] main::xb#8 ← main::xb#1 +Coalesced [61] main::xd#1 ← main::$17 +Coalesced [63] main::yd#1 ← main::$9 +Coalesced [77] bsearch16u::return#9 ← bsearch16u::$2 +Coalesced [79] bsearch16u::return#7 ← bsearch16u::return#2 +Coalesced [82] bsearch16u::return#8 ← bsearch16u::items#2 +Not coalescing [88] bsearch16u::return#6 ← bsearch16u::pivot#0 +Coalesced [92] bsearch16u::num#10 ← bsearch16u::num#1 +Coalesced [93] bsearch16u::items#11 ← bsearch16u::items#0 +Coalesced [96] bsearch16u::num#9 ← bsearch16u::num#0 +Coalesced [97] bsearch16u::items#10 ← bsearch16u::items#8 +Coalesced [98] bsearch16u::num#11 ← bsearch16u::num#3 +Coalesced (already) [99] bsearch16u::items#12 ← bsearch16u::items#2 +Coalesced [116] init_squares::sqr#3 ← init_squares::sqr#1 +Coalesced [117] init_squares::squares#3 ← init_squares::squares#1 +Coalesced [118] init_squares::i#3 ← init_squares::i#1 +Coalesced [123] init_font_hex::charset#9 ← init_font_hex::charset#5 +Coalesced [145] init_font_hex::charset#8 ← init_font_hex::charset#0 +Coalesced [146] init_font_hex::proto_hi#7 ← init_font_hex::proto_hi#1 +Coalesced [147] init_font_hex::c#7 ← init_font_hex::c#1 +Coalesced (already) [148] init_font_hex::charset#10 ← init_font_hex::charset#0 +Coalesced [149] init_font_hex::proto_lo#5 ← init_font_hex::proto_lo#1 +Coalesced [150] init_font_hex::c1#5 ← init_font_hex::c1#1 +Coalesced [151] init_font_hex::i#3 ← init_font_hex::i#1 +Coalesced [152] init_font_hex::idx#7 ← init_font_hex::idx#2 +Coalesced down to 21 phi equivalence classes Culled Empty Block (label) @3 Culled Empty Block (label) @6 Culled Empty Block (label) @11 Culled Empty Block (label) @13 -Culled Empty Block (label) main::@22 +Culled Empty Block (label) main::@16 Culled Empty Block (label) main::toD0181_@return -Culled Empty Block (label) main::@23 -Culled Empty Block (label) main::@30 -Culled Empty Block (label) main::@31 -Culled Empty Block (label) main::@27 -Culled Empty Block (label) main::@29 -Culled Empty Block (label) main::@28 +Culled Empty Block (label) main::@17 +Culled Empty Block (label) main::@21 +Culled Empty Block (label) main::@22 Culled Empty Block (label) bsearch16u::@1 Culled Empty Block (label) bsearch16u::@18 Culled Empty Block (label) init_squares::@3 @@ -1976,16 +1856,10 @@ Renumbering block bsearch16u::@13 to bsearch16u::@8 Renumbering block bsearch16u::@15 to bsearch16u::@9 Renumbering block sqrt::@2 to sqrt::@1 Renumbering block main::@11 to main::@9 -Renumbering block main::@12 to main::@10 -Renumbering block main::@13 to main::@11 -Renumbering block main::@14 to main::@12 -Renumbering block main::@17 to main::@13 -Renumbering block main::@18 to main::@14 -Renumbering block main::@19 to main::@15 -Renumbering block main::@21 to main::@16 -Renumbering block main::@24 to main::@17 -Renumbering block main::@25 to main::@18 -Renumbering block main::@26 to main::@19 +Renumbering block main::@15 to main::@10 +Renumbering block main::@18 to main::@11 +Renumbering block main::@19 to main::@12 +Renumbering block main::@20 to main::@13 Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 Adding NOP phi() at start of @end @@ -2012,15 +1886,16 @@ main: scope:[main] from @1 to:main::toD0181 main::toD0181: scope:[main] from main [6] phi() - to:main::@16 -main::@16: scope:[main] from main::toD0181 + 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::@11 main::@16 - [9] (byte*) main::screen#17 ← phi( main::@11/(byte*) main::screen#10 main::@16/(const byte*) SCREEN#0 ) - [9] (byte) main::y#12 ← phi( main::@11/(byte) main::y#1 main::@16/(byte) 0 ) - [10] (byte) main::y2#0 ← (byte) main::y#12 << (byte) 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 @@ -2031,13 +1906,13 @@ main::@4: scope:[main] from main::@2 main::@3 [14] (byte) sqr::val#0 ← (byte) main::yd#0 [15] call sqr [16] (word) sqr::return#2 ← (word) sqr::return#0 - to:main::@17 -main::@17: scope:[main] from main::@4 + 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::@17 main::@19 - [18] (byte*) main::screen#12 ← phi( main::@17/(byte*) main::screen#17 main::@19/(byte*) main::screen#1 ) - [18] (byte) main::x#2 ← phi( main::@17/(byte) 0 main::@19/(byte) main::x#1 ) +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 @@ -2049,200 +1924,170 @@ main::@8: scope:[main] from main::@6 main::@7 [23] (byte) sqr::val#1 ← (byte) main::xd#0 [24] call sqr [25] (word) sqr::return#3 ← (word) sqr::return#0 - to:main::@18 -main::@18: scope:[main] from main::@8 + 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::@19 -main::@19: scope:[main] from main::@18 - [31] (byte) main::d#0 ← (byte) sqrt::return#2 - [32] *((byte*) main::screen#12) ← (byte) main::d#0 - [33] (byte*) main::screen#1 ← ++ (byte*) main::screen#12 - [34] (byte) main::x#1 ← ++ (byte) main::x#2 - [35] if((byte) main::x#1!=(byte) $14) goto main::@5 - to:main::@9 -main::@9: scope:[main] from main::@19 - [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 - to:main::@10 -main::@10: scope:[main] from main::@10 main::@9 - [37] (byte) main::x1#2 ← phi( main::@9/(byte) 0 main::@10/(byte) main::x1#1 ) - [37] (byte*) main::screen#6 ← phi( main::@9/(byte*) main::screen#1 main::@10/(byte*) main::screen#10 ) - [37] (byte*) main::screen_mirror1#2 ← phi( main::@9/(byte*~) main::screen_mirror1#3 main::@10/(byte*) main::screen_mirror1#1 ) - [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 - [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) - [40] (byte*) main::screen#10 ← ++ (byte*) main::screen#6 - [41] (byte) main::x1#1 ← ++ (byte) main::x1#2 - [42] if((byte) main::x1#1!=(byte) $14) goto main::@10 - to:main::@11 -main::@11: scope:[main] from main::@10 - [43] (byte) main::y#1 ← ++ (byte) main::y#12 - [44] if((byte) main::y#1!=(byte) $d) goto main::@1 - to:main::@12 -main::@12: scope:[main] from main::@11 - [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 to:main::@13 -main::@13: scope:[main] from main::@12 main::@15 - [46] (byte) main::y1#4 ← phi( main::@12/(byte) 0 main::@15/(byte) main::y1#1 ) - [46] (byte*) main::screen#11 ← phi( main::@12/(byte*) main::screen#10 main::@15/(byte*) main::screen#13 ) - [46] (byte*) main::screen_mirror#3 ← phi( main::@12/(byte*) main::screen_mirror#0 main::@15/(byte*) main::screen_mirror#1 ) - to:main::@14 -main::@14: scope:[main] from main::@13 main::@14 - [47] (byte) main::x3#2 ← phi( main::@13/(byte) 0 main::@14/(byte) main::x3#1 ) - [47] (byte*) main::screen#8 ← phi( main::@13/(byte*) main::screen#11 main::@14/(byte*) main::screen#13 ) - [47] (byte*) main::screen_mirror#2 ← phi( main::@13/(byte*) main::screen_mirror#3 main::@14/(byte*) main::screen_mirror#1 ) - [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 - [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) - [50] (byte*) main::screen#13 ← ++ (byte*) main::screen#8 - [51] (byte) main::x3#1 ← ++ (byte) main::x3#2 - [52] if((byte) main::x3#1!=(byte) $28) goto main::@14 - to:main::@15 -main::@15: scope:[main] from main::@14 - [53] (byte) main::y1#1 ← ++ (byte) main::y1#4 - [54] if((byte) main::y1#1!=(byte) $c) goto 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 to:main::@return -main::@return: scope:[main] from main::@15 - [55] return +main::@return: scope:[main] from main::@9 + [43] return to:@return main::@6: scope:[main] from main::@5 - [56] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 + [44] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 to:main::@8 main::@2: scope:[main] from main::@1 - [57] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 + [45] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 to:main::@4 -sqrt: scope:[sqrt] from main::@18 - [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - [59] call bsearch16u - [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 +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 to:sqrt::@1 sqrt::@1: scope:[sqrt] from sqrt - [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 - [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 - [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 + [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 to:sqrt::@return sqrt::@return: scope:[sqrt] from sqrt::@1 - [65] return + [53] return to:@return bsearch16u: scope:[bsearch16u] from sqrt - [66] phi() + [54] phi() to:bsearch16u::@3 bsearch16u::@3: scope:[bsearch16u] from bsearch16u bsearch16u::@7 - [67] (word*) bsearch16u::items#2 ← phi( bsearch16u/(const word*) SQUARES#1 bsearch16u::@7/(word*) bsearch16u::items#8 ) - [67] (byte) bsearch16u::num#3 ← phi( bsearch16u/(const byte) NUM_SQUARES#1 bsearch16u::@7/(byte) bsearch16u::num#0 ) - [68] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 + [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 to:bsearch16u::@5 bsearch16u::@5: scope:[bsearch16u] from bsearch16u::@3 - [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 + [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 to:bsearch16u::@1 bsearch16u::@1: scope:[bsearch16u] from bsearch16u::@5 - [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD + [58] (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 - [71] (word*) bsearch16u::return#2 ← phi( bsearch16u::@5/(word*) bsearch16u::items#2 bsearch16u::@1/(word*~) bsearch16u::$2 ) + [59] (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 - [72] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) - [73] return + [60] (word*) bsearch16u::return#1 ← phi( bsearch16u::@8/(word*~) bsearch16u::return#6 bsearch16u::@2/(word*) bsearch16u::return#2 ) + [61] return to:@return bsearch16u::@4: scope:[bsearch16u] from bsearch16u::@3 - [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 - [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 - [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 - [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) - [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 + [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 to:bsearch16u::@8 bsearch16u::@8: scope:[bsearch16u] from bsearch16u::@4 - [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 + [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 to:bsearch16u::@return bsearch16u::@6: scope:[bsearch16u] from bsearch16u::@4 - [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 + [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 to:bsearch16u::@9 bsearch16u::@9: scope:[bsearch16u] from bsearch16u::@6 - [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD - [82] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 + [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD + [70] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 to:bsearch16u::@7 bsearch16u::@7: scope:[bsearch16u] from bsearch16u::@6 bsearch16u::@9 - [83] (word*) bsearch16u::items#8 ← phi( bsearch16u::@9/(word*) bsearch16u::items#0 bsearch16u::@6/(word*) bsearch16u::items#2 ) - [83] (byte) bsearch16u::num#5 ← phi( bsearch16u::@9/(byte) bsearch16u::num#1 bsearch16u::@6/(byte) bsearch16u::num#3 ) - [84] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 + [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 to:bsearch16u::@3 sqr: scope:[sqr] from main::@4 main::@8 - [85] (byte) sqr::val#2 ← phi( main::@4/(byte) sqr::val#0 main::@8/(byte) sqr::val#1 ) - [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 - [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) + [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) to:sqr::@return sqr::@return: scope:[sqr] from sqr - [88] return + [76] return to:@return -init_squares: scope:[init_squares] from main::@16 - [89] phi() - [90] call malloc +init_squares: scope:[init_squares] from main::@10 + [77] phi() + [78] call malloc to:init_squares::@1 init_squares::@1: scope:[init_squares] from init_squares init_squares::@1 - [91] (byte) init_squares::i#2 ← phi( init_squares::@1/(byte) init_squares::i#1 init_squares/(byte) 0 ) - [91] (word*) init_squares::squares#2 ← phi( init_squares::@1/(word*) init_squares::squares#1 init_squares/(const word*) SQUARES#1 ) - [91] (word) init_squares::sqr#2 ← phi( init_squares::@1/(word) init_squares::sqr#1 init_squares/(byte) 0 ) - [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 - [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD - [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 - [95] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 - [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 - [97] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 - [98] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto 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 to:init_squares::@return init_squares::@return: scope:[init_squares] from init_squares::@1 - [99] return + [87] return to:@return malloc: scope:[malloc] from init_squares - [100] phi() + [88] phi() to:malloc::@return malloc::@return: scope:[malloc] from malloc - [101] return + [89] return to:@return init_font_hex: scope:[init_font_hex] from main - [102] phi() + [90] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 - [103] (byte) init_font_hex::c#6 ← phi( init_font_hex/(byte) 0 init_font_hex::@5/(byte) init_font_hex::c#1 ) - [103] (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 ) - [103] (byte*) init_font_hex::charset#5 ← phi( init_font_hex/(const byte*) CHARSET#0 init_font_hex::@5/(byte*) init_font_hex::charset#0 ) + [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 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 - [104] (byte) init_font_hex::c1#4 ← phi( init_font_hex::@1/(byte) 0 init_font_hex::@4/(byte) init_font_hex::c1#1 ) - [104] (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 ) - [104] (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 ) - [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 + [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 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 - [106] (byte) init_font_hex::idx#5 ← phi( init_font_hex::@2/(byte) 1 init_font_hex::@3/(byte) init_font_hex::idx#2 ) - [106] (byte) init_font_hex::i#2 ← phi( init_font_hex::@2/(byte) 0 init_font_hex::@3/(byte) init_font_hex::i#1 ) - [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 - [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 - [109] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 - [110] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 - [111] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 - [112] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 - [113] if((byte) init_font_hex::i#1!=(byte) 5) goto 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 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 - [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 - [115] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 - [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 - [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 - [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 - [119] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 - [120] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 + [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 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 - [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 - [122] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 - [123] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 + [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 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 - [124] return + [112] return to:@return @@ -2324,27 +2169,15 @@ VARIABLE REGISTER WEIGHTS (byte~) main::$7 22.0 (byte~) main::$9 22.0 (byte) main::d -(byte) main::d#0 202.0 +(byte) main::d#0 126.25 (word) main::ds (word) main::ds#0 202.0 -(byte*) main::screen -(byte*) main::screen#1 56.0 -(byte*) main::screen#10 36.16666666666667 -(byte*) main::screen#11 24.0 -(byte*) main::screen#12 19.625 -(byte*) main::screen#13 42.599999999999994 -(byte*) main::screen#17 2.2 -(byte*) main::screen#6 104.66666666666666 -(byte*) main::screen#8 104.66666666666666 -(byte*) main::screen_mirror -(byte*) main::screen_mirror#0 4.0 -(byte*) main::screen_mirror#1 44.85714285714286 -(byte*) main::screen_mirror#2 213.0 -(byte*) main::screen_mirror#3 24.0 -(byte*) main::screen_mirror1 -(byte*) main::screen_mirror1#1 60.599999999999994 -(byte*) main::screen_mirror1#2 213.0 -(byte*~) main::screen_mirror1#3 22.0 +(byte*) main::screen_bottomline +(byte*) main::screen_bottomline#1 7.333333333333333 +(byte*) main::screen_bottomline#10 6.787878787878788 +(byte*) main::screen_topline +(byte*) main::screen_topline#1 5.5 +(byte*) main::screen_topline#10 7.0 (word~) main::toD0181_$0 (number~) main::toD0181_$1 (number~) main::toD0181_$2 @@ -2358,32 +2191,26 @@ VARIABLE REGISTER WEIGHTS (byte) main::toD0181_return (byte*) main::toD0181_screen (byte) main::x -(byte) main::x#1 151.5 -(byte) main::x#2 17.823529411764707 -(byte) main::x1 -(byte) main::x1#1 151.5 -(byte) main::x1#2 50.5 +(byte) main::x#1 101.0 +(byte) main::x#2 26.578947368421055 (byte) main::x2 (byte) main::x2#0 202.0 -(byte) main::x3 -(byte) main::x3#1 151.5 -(byte) main::x3#2 50.5 +(byte) main::xb +(byte) main::xb#1 101.0 +(byte) main::xb#2 20.2 (byte) main::xd (byte) main::xd#0 303.0 (word) main::xds (word) main::xds#0 202.0 (byte) main::y (byte) main::y#1 16.5 -(byte) main::y#12 0.9166666666666667 -(byte) main::y1 -(byte) main::y1#1 16.5 -(byte) main::y1#4 3.142857142857143 +(byte) main::y#10 0.9705882352941178 (byte) main::y2 (byte) main::y2#0 22.0 (byte) main::yd (byte) main::yd#0 33.0 (word) main::yds -(word) main::yds#0 5.6 +(word) main::yds#0 4.869565217391305 (void*()) malloc((word) malloc::size) (byte*) malloc::mem (void*) malloc::return @@ -2411,16 +2238,13 @@ VARIABLE REGISTER WEIGHTS (word) sqrt::val#0 103.0 Initial phi equivalence classes -[ main::y#12 main::y#1 ] +[ main::y#10 main::y#1 ] +[ main::screen_topline#10 main::screen_topline#1 ] +[ main::screen_bottomline#10 main::screen_bottomline#1 ] [ main::yd#0 main::$9 main::$7 ] [ main::x#2 main::x#1 ] +[ main::xb#2 main::xb#1 ] [ main::xd#0 main::$17 main::$15 ] -[ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] -[ main::x1#2 main::x1#1 ] -[ main::y1#4 main::y1#1 ] -[ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] -[ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] -[ main::x3#2 main::x3#1 ] [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] @@ -2463,16 +2287,13 @@ Added variable init_font_hex::$1 to zero page equivalence class [ init_font_hex: Added variable init_font_hex::$2 to zero page equivalence class [ init_font_hex::$2 ] Added variable init_font_hex::idx#3 to zero page equivalence class [ init_font_hex::idx#3 ] Complete equivalence classes -[ main::y#12 main::y#1 ] +[ main::y#10 main::y#1 ] +[ main::screen_topline#10 main::screen_topline#1 ] +[ main::screen_bottomline#10 main::screen_bottomline#1 ] [ main::yd#0 main::$9 main::$7 ] [ main::x#2 main::x#1 ] +[ main::xb#2 main::xb#1 ] [ main::xd#0 main::$17 main::$15 ] -[ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] -[ main::x1#2 main::x1#1 ] -[ main::y1#4 main::y1#1 ] -[ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] -[ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] -[ main::x3#2 main::x3#1 ] [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] [ sqr::val#2 sqr::val#0 sqr::val#1 ] @@ -2514,57 +2335,54 @@ Complete equivalence classes [ init_font_hex::$1 ] [ init_font_hex::$2 ] [ init_font_hex::idx#3 ] -Allocated zp ZP_BYTE:2 [ main::y#12 main::y#1 ] -Allocated zp ZP_BYTE:3 [ main::yd#0 main::$9 main::$7 ] -Allocated zp ZP_BYTE:4 [ main::x#2 main::x#1 ] -Allocated zp ZP_BYTE:5 [ main::xd#0 main::$17 main::$15 ] -Allocated zp ZP_WORD:6 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] -Allocated zp ZP_BYTE:9 [ main::x1#2 main::x1#1 ] -Allocated zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] -Allocated zp ZP_WORD:11 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] -Allocated zp ZP_WORD:13 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] -Allocated zp ZP_BYTE:15 [ main::x3#2 main::x3#1 ] -Allocated zp ZP_WORD:16 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] -Allocated zp ZP_BYTE:18 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Allocated zp ZP_BYTE:19 [ sqr::val#2 sqr::val#0 sqr::val#1 ] -Allocated zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] -Allocated zp ZP_BYTE:24 [ init_squares::i#2 init_squares::i#1 ] -Allocated zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] -Allocated zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated zp ZP_BYTE:35 [ main::y2#0 ] -Allocated zp ZP_WORD:36 [ sqr::return#2 ] -Allocated zp ZP_WORD:38 [ main::yds#0 ] -Allocated zp ZP_BYTE:40 [ main::x2#0 ] -Allocated zp ZP_WORD:41 [ sqr::return#3 ] -Allocated zp ZP_WORD:43 [ main::xds#0 ] -Allocated zp ZP_WORD:45 [ main::ds#0 ] -Allocated zp ZP_WORD:47 [ sqrt::val#0 ] -Allocated zp ZP_BYTE:49 [ sqrt::return#2 ] -Allocated zp ZP_BYTE:50 [ main::d#0 ] -Allocated zp ZP_WORD:51 [ bsearch16u::key#0 ] -Allocated zp ZP_WORD:53 [ bsearch16u::return#3 ] -Allocated zp ZP_WORD:55 [ sqrt::found#0 ] -Allocated zp ZP_WORD:57 [ sqrt::$3 ] -Allocated zp ZP_WORD:59 [ sqrt::$1 ] -Allocated zp ZP_BYTE:61 [ sqrt::return#0 ] -Allocated zp ZP_BYTE:62 [ bsearch16u::$6 ] -Allocated zp ZP_BYTE:63 [ bsearch16u::$16 ] -Allocated zp ZP_WORD:64 [ bsearch16u::pivot#0 ] -Allocated zp ZP_WORD:66 [ bsearch16u::result#0 ] -Allocated zp ZP_BYTE:68 [ sqr::$0 ] -Allocated zp ZP_WORD:69 [ sqr::return#0 ] -Allocated zp ZP_BYTE:71 [ init_squares::$3 ] -Allocated zp ZP_BYTE:72 [ init_squares::$4 ] -Allocated zp ZP_BYTE:73 [ init_font_hex::$0 ] -Allocated zp ZP_BYTE:74 [ init_font_hex::$1 ] -Allocated zp ZP_BYTE:75 [ init_font_hex::$2 ] -Allocated zp ZP_BYTE:76 [ init_font_hex::idx#3 ] +Allocated zp ZP_BYTE:2 [ main::y#10 main::y#1 ] +Allocated zp ZP_WORD:3 [ main::screen_topline#10 main::screen_topline#1 ] +Allocated zp ZP_WORD:5 [ main::screen_bottomline#10 main::screen_bottomline#1 ] +Allocated zp ZP_BYTE:7 [ main::yd#0 main::$9 main::$7 ] +Allocated zp ZP_BYTE:9 [ main::x#2 main::x#1 ] +Allocated zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] +Allocated zp ZP_BYTE:11 [ main::xd#0 main::$17 main::$15 ] +Allocated zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] +Allocated zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Allocated zp ZP_BYTE:15 [ sqr::val#2 sqr::val#0 sqr::val#1 ] +Allocated zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] +Allocated zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] +Allocated zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] +Allocated zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated zp ZP_BYTE:31 [ main::y2#0 ] +Allocated zp ZP_WORD:32 [ sqr::return#2 ] +Allocated zp ZP_WORD:34 [ main::yds#0 ] +Allocated zp ZP_BYTE:36 [ main::x2#0 ] +Allocated zp ZP_WORD:37 [ sqr::return#3 ] +Allocated zp ZP_WORD:39 [ main::xds#0 ] +Allocated zp ZP_WORD:41 [ main::ds#0 ] +Allocated zp ZP_WORD:43 [ sqrt::val#0 ] +Allocated zp ZP_BYTE:45 [ sqrt::return#2 ] +Allocated zp ZP_BYTE:46 [ main::d#0 ] +Allocated zp ZP_WORD:47 [ bsearch16u::key#0 ] +Allocated zp ZP_WORD:49 [ bsearch16u::return#3 ] +Allocated zp ZP_WORD:51 [ sqrt::found#0 ] +Allocated zp ZP_WORD:53 [ sqrt::$3 ] +Allocated zp ZP_WORD:55 [ sqrt::$1 ] +Allocated zp ZP_BYTE:57 [ sqrt::return#0 ] +Allocated zp ZP_BYTE:58 [ bsearch16u::$6 ] +Allocated zp ZP_BYTE:59 [ bsearch16u::$16 ] +Allocated zp ZP_WORD:60 [ bsearch16u::pivot#0 ] +Allocated zp ZP_WORD:62 [ bsearch16u::result#0 ] +Allocated zp ZP_BYTE:64 [ sqr::$0 ] +Allocated zp ZP_WORD:65 [ sqr::return#0 ] +Allocated zp ZP_BYTE:67 [ init_squares::$3 ] +Allocated zp ZP_BYTE:68 [ init_squares::$4 ] +Allocated zp ZP_BYTE:69 [ init_font_hex::$0 ] +Allocated zp ZP_BYTE:70 [ init_font_hex::$1 ] +Allocated zp ZP_BYTE:71 [ init_font_hex::$2 ] +Allocated zp ZP_BYTE:72 [ init_font_hex::idx#3 ] INITIAL ASM //SEG0 File Comments @@ -2601,28 +2419,25 @@ bend: //SEG10 main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f - .label _7 = 3 - .label _9 = 3 - .label _15 = 5 - .label _17 = 5 - .label y2 = $23 - .label yd = 3 - .label yds = $26 - .label x2 = $28 - .label xd = 5 - .label xds = $2b - .label ds = $2d - .label d = $32 - .label screen = $d - .label x = 4 - .label screen_mirror1 = 6 - .label x1 = 9 + .label _7 = 7 + .label _9 = 7 + .label _15 = $b + .label _17 = $b + .label y2 = $1f + .label yd = 7 + .label yds = $22 + .label x2 = $24 + .label xd = $b + .label xds = $27 + .label ds = $29 + .label d = $2e + .label x = 9 + .label xb = $a + .label screen_topline = 3 + .label screen_bottomline = 5 .label y = 2 - .label screen_mirror = $b - .label x3 = $f - .label y1 = $a //SEG11 [5] call init_font_hex - //SEG12 [102] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [90] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex //SEG13 [6] phi from main to main::toD0181 [phi:main->main::toD0181] @@ -2630,137 +2445,145 @@ main: { jmp toD0181 //SEG14 main::toD0181 toD0181: - jmp b16 - //SEG15 main::@16 - b16: + jmp b10 + //SEG15 main::@10 + b10: //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 //SEG17 [8] call init_squares - //SEG18 [89] phi from main::@16 to init_squares [phi:main::@16->init_squares] - init_squares_from_b16: + //SEG18 [77] phi from main::@10 to init_squares [phi:main::@10->init_squares] + init_squares_from_b10: jsr init_squares - //SEG19 [9] phi from main::@16 to main::@1 [phi:main::@16->main::@1] - b1_from_b16: - //SEG20 [9] phi (byte*) main::screen#17 = (const byte*) SCREEN#0 [phi:main::@16->main::@1#0] -- pbuz1=pbuc1 + //SEG19 [9] phi from main::@10 to main::@1 [phi:main::@10->main::@1] + b1_from_b10: + //SEG20 [9] phi (byte*) main::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:main::@10->main::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$18 + sta screen_bottomline+1 + //SEG21 [9] phi (byte*) main::screen_topline#10 = (const byte*) SCREEN#0 [phi:main::@10->main::@1#1] -- pbuz1=pbuc1 lda #SCREEN - sta screen+1 - //SEG21 [9] phi (byte) main::y#12 = (byte) 0 [phi:main::@16->main::@1#1] -- vbuz1=vbuc1 + sta screen_topline+1 + //SEG22 [9] phi (byte) main::y#10 = (byte) 0 [phi:main::@10->main::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 - //SEG22 [9] phi from main::@11 to main::@1 [phi:main::@11->main::@1] - b1_from_b11: - //SEG23 [9] phi (byte*) main::screen#17 = (byte*) main::screen#10 [phi:main::@11->main::@1#0] -- register_copy - //SEG24 [9] phi (byte) main::y#12 = (byte) main::y#1 [phi:main::@11->main::@1#1] -- register_copy + //SEG23 [9] phi from main::@9 to main::@1 [phi:main::@9->main::@1] + b1_from_b9: + //SEG24 [9] phi (byte*) main::screen_bottomline#10 = (byte*) main::screen_bottomline#1 [phi:main::@9->main::@1#0] -- register_copy + //SEG25 [9] phi (byte*) main::screen_topline#10 = (byte*) main::screen_topline#1 [phi:main::@9->main::@1#1] -- register_copy + //SEG26 [9] phi (byte) main::y#10 = (byte) main::y#1 [phi:main::@9->main::@1#2] -- register_copy jmp b1 - //SEG25 main::@1 + //SEG27 main::@1 b1: - //SEG26 [10] (byte) main::y2#0 ← (byte) main::y#12 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG28 [10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda y asl sta y2 - //SEG27 [11] if((byte) main::y2#0>=(byte) $18) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 + //SEG29 [11] if((byte) main::y2#0>=(byte) $18) goto main::@2 -- vbuz1_ge_vbuc1_then_la1 lda y2 cmp #$18 bcs b2 jmp b3 - //SEG28 main::@3 + //SEG30 main::@3 b3: - //SEG29 [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 -- vbuz1=vbuc1_minus_vbuz2 + //SEG31 [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 -- vbuz1=vbuc1_minus_vbuz2 lda #$18 sec sbc y2 sta _7 - //SEG30 [13] phi from main::@2 main::@3 to main::@4 [phi:main::@2/main::@3->main::@4] + //SEG32 [13] phi from main::@2 main::@3 to main::@4 [phi:main::@2/main::@3->main::@4] b4_from_b2: b4_from_b3: - //SEG31 [13] phi (byte) main::yd#0 = (byte~) main::$9 [phi:main::@2/main::@3->main::@4#0] -- register_copy + //SEG33 [13] phi (byte) main::yd#0 = (byte~) main::$9 [phi:main::@2/main::@3->main::@4#0] -- register_copy jmp b4 - //SEG32 main::@4 + //SEG34 main::@4 b4: - //SEG33 [14] (byte) sqr::val#0 ← (byte) main::yd#0 -- vbuz1=vbuz2 + //SEG35 [14] (byte) sqr::val#0 ← (byte) main::yd#0 -- vbuz1=vbuz2 lda yd sta sqr.val - //SEG34 [15] call sqr - //SEG35 [85] phi from main::@4 to sqr [phi:main::@4->sqr] + //SEG36 [15] call sqr + //SEG37 [73] phi from main::@4 to sqr [phi:main::@4->sqr] sqr_from_b4: - //SEG36 [85] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:main::@4->sqr#0] -- register_copy + //SEG38 [73] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:main::@4->sqr#0] -- register_copy jsr sqr - //SEG37 [16] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG39 [16] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_2 lda sqr.return+1 sta sqr.return_2+1 - jmp b17 - //SEG38 main::@17 - b17: - //SEG39 [17] (word) main::yds#0 ← (word) sqr::return#2 -- vwuz1=vwuz2 + jmp b11 + //SEG40 main::@11 + b11: + //SEG41 [17] (word) main::yds#0 ← (word) sqr::return#2 -- vwuz1=vwuz2 lda sqr.return_2 sta yds lda sqr.return_2+1 sta yds+1 - //SEG40 [18] phi from main::@17 to main::@5 [phi:main::@17->main::@5] - b5_from_b17: - //SEG41 [18] phi (byte*) main::screen#12 = (byte*) main::screen#17 [phi:main::@17->main::@5#0] -- register_copy - //SEG42 [18] phi (byte) main::x#2 = (byte) 0 [phi:main::@17->main::@5#1] -- vbuz1=vbuc1 + //SEG42 [18] phi from main::@11 to main::@5 [phi:main::@11->main::@5] + b5_from_b11: + //SEG43 [18] phi (byte) main::xb#2 = (byte) $27 [phi:main::@11->main::@5#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG44 [18] phi (byte) main::x#2 = (byte) 0 [phi:main::@11->main::@5#1] -- vbuz1=vbuc1 lda #0 sta x jmp b5 - //SEG43 [18] phi from main::@19 to main::@5 [phi:main::@19->main::@5] - b5_from_b19: - //SEG44 [18] phi (byte*) main::screen#12 = (byte*) main::screen#1 [phi:main::@19->main::@5#0] -- register_copy - //SEG45 [18] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@19->main::@5#1] -- register_copy + //SEG45 [18] phi from main::@13 to main::@5 [phi:main::@13->main::@5] + b5_from_b13: + //SEG46 [18] phi (byte) main::xb#2 = (byte) main::xb#1 [phi:main::@13->main::@5#0] -- register_copy + //SEG47 [18] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@13->main::@5#1] -- register_copy jmp b5 - //SEG46 main::@5 + //SEG48 main::@5 b5: - //SEG47 [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG49 [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x asl sta x2 - //SEG48 [20] if((byte) main::x2#0>=(byte) $27) goto main::@6 -- vbuz1_ge_vbuc1_then_la1 + //SEG50 [20] if((byte) main::x2#0>=(byte) $27) goto main::@6 -- vbuz1_ge_vbuc1_then_la1 lda x2 cmp #$27 bcs b6 jmp b7 - //SEG49 main::@7 + //SEG51 main::@7 b7: - //SEG50 [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 -- vbuz1=vbuc1_minus_vbuz2 + //SEG52 [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 -- vbuz1=vbuc1_minus_vbuz2 lda #$27 sec sbc x2 sta _15 - //SEG51 [22] phi from main::@6 main::@7 to main::@8 [phi:main::@6/main::@7->main::@8] + //SEG53 [22] phi from main::@6 main::@7 to main::@8 [phi:main::@6/main::@7->main::@8] b8_from_b6: b8_from_b7: - //SEG52 [22] phi (byte) main::xd#0 = (byte~) main::$17 [phi:main::@6/main::@7->main::@8#0] -- register_copy + //SEG54 [22] phi (byte) main::xd#0 = (byte~) main::$17 [phi:main::@6/main::@7->main::@8#0] -- register_copy jmp b8 - //SEG53 main::@8 + //SEG55 main::@8 b8: - //SEG54 [23] (byte) sqr::val#1 ← (byte) main::xd#0 -- vbuz1=vbuz2 + //SEG56 [23] (byte) sqr::val#1 ← (byte) main::xd#0 -- vbuz1=vbuz2 lda xd sta sqr.val - //SEG55 [24] call sqr - //SEG56 [85] phi from main::@8 to sqr [phi:main::@8->sqr] + //SEG57 [24] call sqr + //SEG58 [73] phi from main::@8 to sqr [phi:main::@8->sqr] sqr_from_b8: - //SEG57 [85] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:main::@8->sqr#0] -- register_copy + //SEG59 [73] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:main::@8->sqr#0] -- register_copy jsr sqr - //SEG58 [25] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG60 [25] (word) sqr::return#3 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_3 lda sqr.return+1 sta sqr.return_3+1 - jmp b18 - //SEG59 main::@18 - b18: - //SEG60 [26] (word) main::xds#0 ← (word) sqr::return#3 -- vwuz1=vwuz2 + jmp b12 + //SEG61 main::@12 + b12: + //SEG62 [26] (word) main::xds#0 ← (word) sqr::return#3 -- vwuz1=vwuz2 lda sqr.return_3 sta xds lda sqr.return_3+1 sta xds+1 - //SEG61 [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 -- vwuz1=vwuz2_plus_vwuz3 + //SEG63 [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 -- vwuz1=vwuz2_plus_vwuz3 lda xds clc adc yds @@ -2768,221 +2591,126 @@ main: { lda xds+1 adc yds+1 sta ds+1 - //SEG62 [28] (word) sqrt::val#0 ← (word) main::ds#0 -- vwuz1=vwuz2 + //SEG64 [28] (word) sqrt::val#0 ← (word) main::ds#0 -- vwuz1=vwuz2 lda ds sta sqrt.val lda ds+1 sta sqrt.val+1 - //SEG63 [29] call sqrt + //SEG65 [29] call sqrt jsr sqrt - //SEG64 [30] (byte) sqrt::return#2 ← (byte) sqrt::return#0 -- vbuz1=vbuz2 + //SEG66 [30] (byte) sqrt::return#2 ← (byte) sqrt::return#0 -- vbuz1=vbuz2 lda sqrt.return sta sqrt.return_2 - jmp b19 - //SEG65 main::@19 - b19: - //SEG66 [31] (byte) main::d#0 ← (byte) sqrt::return#2 -- vbuz1=vbuz2 + jmp b13 + //SEG67 main::@13 + b13: + //SEG68 [31] (byte) main::d#0 ← (byte) sqrt::return#2 -- vbuz1=vbuz2 lda sqrt.return_2 sta d - //SEG67 [32] *((byte*) main::screen#12) ← (byte) main::d#0 -- _deref_pbuz1=vbuz2 + //SEG69 [32] *((byte*) main::screen_topline#10 + (byte) main::x#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 lda d - ldy #0 - sta (screen),y - //SEG68 [33] (byte*) main::screen#1 ← ++ (byte*) main::screen#12 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG69 [34] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 + ldy x + sta (screen_topline),y + //SEG70 [33] *((byte*) main::screen_bottomline#10 + (byte) main::x#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy x + sta (screen_bottomline),y + //SEG71 [34] *((byte*) main::screen_topline#10 + (byte) main::xb#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy xb + sta (screen_topline),y + //SEG72 [35] *((byte*) main::screen_bottomline#10 + (byte) main::xb#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda d + ldy xb + sta (screen_bottomline),y + //SEG73 [36] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG70 [35] if((byte) main::x#1!=(byte) $14) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 - lda #$14 - cmp x - bne b5_from_b19 + //SEG74 [37] (byte) main::xb#1 ← -- (byte) main::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG75 [38] if((byte) main::x#1<(byte) $13+(byte) 1) goto main::@5 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b5_from_b13 jmp b9 - //SEG71 main::@9 + //SEG76 main::@9 b9: - //SEG72 [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 -- pbuz1=pbuz2 - lda screen - sta screen_mirror1 - lda screen+1 - sta screen_mirror1+1 - //SEG73 [37] phi from main::@9 to main::@10 [phi:main::@9->main::@10] - b10_from_b9: - //SEG74 [37] phi (byte) main::x1#2 = (byte) 0 [phi:main::@9->main::@10#0] -- vbuz1=vbuc1 - lda #0 - sta x1 - //SEG75 [37] phi (byte*) main::screen#6 = (byte*) main::screen#1 [phi:main::@9->main::@10#1] -- register_copy - //SEG76 [37] phi (byte*) main::screen_mirror1#2 = (byte*~) main::screen_mirror1#3 [phi:main::@9->main::@10#2] -- register_copy - jmp b10 - //SEG77 [37] phi from main::@10 to main::@10 [phi:main::@10->main::@10] - b10_from_b10: - //SEG78 [37] phi (byte) main::x1#2 = (byte) main::x1#1 [phi:main::@10->main::@10#0] -- register_copy - //SEG79 [37] phi (byte*) main::screen#6 = (byte*) main::screen#10 [phi:main::@10->main::@10#1] -- register_copy - //SEG80 [37] phi (byte*) main::screen_mirror1#2 = (byte*) main::screen_mirror1#1 [phi:main::@10->main::@10#2] -- register_copy - jmp b10 - //SEG81 main::@10 - b10: - //SEG82 [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 -- pbuz1=_dec_pbuz1 - lda screen_mirror1 - bne !+ - dec screen_mirror1+1 + //SEG77 [39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 !: - dec screen_mirror1 - //SEG83 [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (screen_mirror1),y - ldy #0 - sta (screen),y - //SEG84 [40] (byte*) main::screen#10 ← ++ (byte*) main::screen#6 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG85 [41] (byte) main::x1#1 ← ++ (byte) main::x1#2 -- vbuz1=_inc_vbuz1 - inc x1 - //SEG86 [42] if((byte) main::x1#1!=(byte) $14) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 - lda #$14 - cmp x1 - bne b10_from_b10 - jmp b11 - //SEG87 main::@11 - b11: - //SEG88 [43] (byte) main::y#1 ← ++ (byte) main::y#12 -- vbuz1=_inc_vbuz1 - inc y - //SEG89 [44] if((byte) main::y#1!=(byte) $d) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$d - cmp y - bne b1_from_b11 - jmp b12 - //SEG90 main::@12 - b12: - //SEG91 [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 -- pbuz1=pbuz2_minus_vwuc1 - lda screen + //SEG78 [40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_bottomline sec sbc #<$28 - sta screen_mirror - lda screen+1 + sta screen_bottomline + lda screen_bottomline+1 sbc #>$28 - sta screen_mirror+1 - //SEG92 [46] phi from main::@12 to main::@13 [phi:main::@12->main::@13] - b13_from_b12: - //SEG93 [46] phi (byte) main::y1#4 = (byte) 0 [phi:main::@12->main::@13#0] -- vbuz1=vbuc1 - lda #0 - sta y1 - //SEG94 [46] phi (byte*) main::screen#11 = (byte*) main::screen#10 [phi:main::@12->main::@13#1] -- register_copy - //SEG95 [46] phi (byte*) main::screen_mirror#3 = (byte*) main::screen_mirror#0 [phi:main::@12->main::@13#2] -- register_copy - jmp b13 - //SEG96 [46] phi from main::@15 to main::@13 [phi:main::@15->main::@13] - b13_from_b15: - //SEG97 [46] phi (byte) main::y1#4 = (byte) main::y1#1 [phi:main::@15->main::@13#0] -- register_copy - //SEG98 [46] phi (byte*) main::screen#11 = (byte*) main::screen#13 [phi:main::@15->main::@13#1] -- register_copy - //SEG99 [46] phi (byte*) main::screen_mirror#3 = (byte*) main::screen_mirror#1 [phi:main::@15->main::@13#2] -- register_copy - jmp b13 - //SEG100 main::@13 - b13: - //SEG101 [47] phi from main::@13 to main::@14 [phi:main::@13->main::@14] - b14_from_b13: - //SEG102 [47] phi (byte) main::x3#2 = (byte) 0 [phi:main::@13->main::@14#0] -- vbuz1=vbuc1 - lda #0 - sta x3 - //SEG103 [47] phi (byte*) main::screen#8 = (byte*) main::screen#11 [phi:main::@13->main::@14#1] -- register_copy - //SEG104 [47] phi (byte*) main::screen_mirror#2 = (byte*) main::screen_mirror#3 [phi:main::@13->main::@14#2] -- register_copy - jmp b14 - //SEG105 [47] phi from main::@14 to main::@14 [phi:main::@14->main::@14] - b14_from_b14: - //SEG106 [47] phi (byte) main::x3#2 = (byte) main::x3#1 [phi:main::@14->main::@14#0] -- register_copy - //SEG107 [47] phi (byte*) main::screen#8 = (byte*) main::screen#13 [phi:main::@14->main::@14#1] -- register_copy - //SEG108 [47] phi (byte*) main::screen_mirror#2 = (byte*) main::screen_mirror#1 [phi:main::@14->main::@14#2] -- register_copy - jmp b14 - //SEG109 main::@14 - b14: - //SEG110 [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 -- pbuz1=_dec_pbuz1 - lda screen_mirror - bne !+ - dec screen_mirror+1 - !: - dec screen_mirror - //SEG111 [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (screen_mirror),y - ldy #0 - sta (screen),y - //SEG112 [50] (byte*) main::screen#13 ← ++ (byte*) main::screen#8 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG113 [51] (byte) main::x3#1 ← ++ (byte) main::x3#2 -- vbuz1=_inc_vbuz1 - inc x3 - //SEG114 [52] if((byte) main::x3#1!=(byte) $28) goto main::@14 -- vbuz1_neq_vbuc1_then_la1 - lda #$28 - cmp x3 - bne b14_from_b14 - jmp b15 - //SEG115 main::@15 - b15: - //SEG116 [53] (byte) main::y1#1 ← ++ (byte) main::y1#4 -- vbuz1=_inc_vbuz1 - inc y1 - //SEG117 [54] if((byte) main::y1#1!=(byte) $c) goto main::@13 -- vbuz1_neq_vbuc1_then_la1 - lda #$c - cmp y1 - bne b13_from_b15 + sta screen_bottomline+1 + //SEG79 [41] (byte) main::y#1 ← ++ (byte) main::y#10 -- vbuz1=_inc_vbuz1 + inc y + //SEG80 [42] if((byte) main::y#1!=(byte) $d) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b9 jmp breturn - //SEG118 main::@return + //SEG81 main::@return breturn: - //SEG119 [55] return + //SEG82 [43] return rts - //SEG120 main::@6 + //SEG83 main::@6 b6: - //SEG121 [56] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 -- vbuz1=vbuz2_minus_vbuc1 + //SEG84 [44] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 -- vbuz1=vbuz2_minus_vbuc1 lax x2 axs #$27 stx _17 jmp b8_from_b6 - //SEG122 main::@2 + //SEG85 main::@2 b2: - //SEG123 [57] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 -- vbuz1=vbuz2_minus_vbuc1 + //SEG86 [45] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 -- vbuz1=vbuz2_minus_vbuc1 lax y2 axs #$18 stx _9 jmp b4_from_b2 } -//SEG124 sqrt +//SEG87 sqrt // 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($2f) val) +// sqrt(word zeropage($2b) val) sqrt: { - .label _1 = $3b - .label _3 = $39 - .label found = $37 - .label return = $3d - .label val = $2f - .label return_2 = $31 - //SEG125 [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 + .label _1 = $37 + .label _3 = $35 + .label found = $33 + .label return = $39 + .label val = $2b + .label return_2 = $2d + //SEG88 [46] (word) bsearch16u::key#0 ← (word) sqrt::val#0 -- vwuz1=vwuz2 lda val sta bsearch16u.key lda val+1 sta bsearch16u.key+1 - //SEG126 [59] call bsearch16u - //SEG127 [66] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + //SEG89 [47] call bsearch16u + //SEG90 [54] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: jsr bsearch16u - //SEG128 [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 -- pwuz1=pwuz2 + //SEG91 [48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 -- pwuz1=pwuz2 lda bsearch16u.return sta bsearch16u.return_3 lda bsearch16u.return+1 sta bsearch16u.return_3+1 jmp b1 - //SEG129 sqrt::@1 + //SEG92 sqrt::@1 b1: - //SEG130 [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 -- pwuz1=pwuz2 + //SEG93 [49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 -- pwuz1=pwuz2 lda bsearch16u.return_3 sta found lda bsearch16u.return_3+1 sta found+1 - //SEG131 [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz2_minus_pwuc1 + //SEG94 [50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz2_minus_pwuc1 lda found sec sbc #SQUARES sta _3+1 - //SEG132 [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz2_ror_1 + //SEG95 [51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz2_ror_1 lda _3+1 lsr sta _1+1 lda _3 ror sta _1 - //SEG133 [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuz1=_byte_vwuz2 + //SEG96 [52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuz1=_byte_vwuz2 lda _1 sta return jmp breturn - //SEG134 sqrt::@return + //SEG97 sqrt::@return breturn: - //SEG135 [65] return + //SEG98 [53] return rts } -//SEG136 bsearch16u +//SEG99 bsearch16u // 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($33) key, word* zeropage($10) items, byte zeropage($12) num) +// bsearch16u(word zeropage($2f) key, word* zeropage($c) items, byte zeropage($e) num) bsearch16u: { - .label _2 = $10 - .label _6 = $3e - .label _16 = $3f - .label pivot = $40 - .label result = $42 - .label return = $10 - .label num = $12 - .label items = $10 - .label key = $33 - .label return_3 = $35 - //SEG137 [67] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + .label _2 = $c + .label _6 = $3a + .label _16 = $3b + .label pivot = $3c + .label result = $3e + .label return = $c + .label num = $e + .label items = $c + .label key = $2f + .label return_3 = $31 + //SEG100 [55] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] b3_from_bsearch16u: - //SEG138 [67] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + //SEG101 [55] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 lda #SQUARES sta items+1 - //SEG139 [67] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#1 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 + //SEG102 [55] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#1 [phi:bsearch16u->bsearch16u::@3#1] -- vbuz1=vbuc1 lda #NUM_SQUARES sta num jmp b3 - //SEG140 bsearch16u::@3 + //SEG103 bsearch16u::@3 b3: - //SEG141 [68] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 + //SEG104 [56] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuz1_gt_0_then_la1 lda num bne b4 jmp b5 - //SEG142 bsearch16u::@5 + //SEG105 bsearch16u::@5 b5: - //SEG143 [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + //SEG106 [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -3055,9 +2783,9 @@ bsearch16u: { !: bcc b2_from_b5 jmp b1 - //SEG144 bsearch16u::@1 + //SEG107 bsearch16u::@1 b1: - //SEG145 [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + //SEG108 [58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -3065,33 +2793,33 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - //SEG146 [71] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG109 [59] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - //SEG147 [71] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG110 [59] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 - //SEG148 bsearch16u::@2 + //SEG111 bsearch16u::@2 b2: - //SEG149 [72] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG112 [60] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] breturn_from_b2: breturn_from_b8: - //SEG150 [72] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG113 [60] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy jmp breturn - //SEG151 bsearch16u::@return + //SEG114 bsearch16u::@return breturn: - //SEG152 [73] return + //SEG115 [61] return rts - //SEG153 bsearch16u::@4 + //SEG116 bsearch16u::@4 b4: - //SEG154 [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + //SEG117 [62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda num lsr sta _6 - //SEG155 [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG118 [63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda _6 asl sta _16 - //SEG156 [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 + //SEG119 [64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuz3 lda _16 clc adc items @@ -3099,7 +2827,7 @@ bsearch16u: { lda #0 adc items+1 sta pivot+1 - //SEG157 [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG120 [65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -3109,23 +2837,23 @@ bsearch16u: { iny sbc (pivot),y sta result+1 - //SEG158 [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + //SEG121 [66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 lda result+1 bne b6 lda result bne b6 jmp b8 - //SEG159 bsearch16u::@8 + //SEG122 bsearch16u::@8 b8: - //SEG160 [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + //SEG123 [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 lda pivot sta return lda pivot+1 sta return+1 jmp breturn_from_b8 - //SEG161 bsearch16u::@6 + //SEG124 bsearch16u::@6 b6: - //SEG162 [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + //SEG125 [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 lda result+1 bmi b7_from_b6 bne !+ @@ -3133,9 +2861,9 @@ bsearch16u: { beq b7_from_b6 !: jmp b9 - //SEG163 bsearch16u::@9 + //SEG126 bsearch16u::@9 b9: - //SEG164 [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + //SEG127 [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 lda #1*SIZEOF_WORD clc adc pivot @@ -3143,95 +2871,95 @@ bsearch16u: { lda #0 adc pivot+1 sta items+1 - //SEG165 [82] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 + //SEG128 [70] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuz1=_dec_vbuz1 dec num - //SEG166 [83] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG129 [71] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] b7_from_b6: b7_from_b9: - //SEG167 [83] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG168 [83] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG130 [71] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG131 [71] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy jmp b7 - //SEG169 bsearch16u::@7 + //SEG132 bsearch16u::@7 b7: - //SEG170 [84] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + //SEG133 [72] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr num - //SEG171 [67] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG134 [55] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] b3_from_b7: - //SEG172 [67] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG173 [67] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG135 [55] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG136 [55] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy jmp b3 } -//SEG174 sqr +//SEG137 sqr // Find the square of a byte value // Uses a table of squares that must be initialized by calling init_squares() -// sqr(byte zeropage($13) val) +// sqr(byte zeropage($f) val) sqr: { - .label _0 = $44 - .label return = $45 - .label val = $13 - .label return_2 = $24 - .label return_3 = $29 - //SEG175 [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label _0 = $40 + .label return = $41 + .label val = $f + .label return_2 = $20 + .label return_3 = $25 + //SEG138 [74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda val asl sta _0 - //SEG176 [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuz2 + //SEG139 [75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuz2 ldy _0 lda SQUARES,y sta return lda SQUARES+1,y sta return+1 jmp breturn - //SEG177 sqr::@return + //SEG140 sqr::@return breturn: - //SEG178 [88] return + //SEG141 [76] return rts } -//SEG179 init_squares +//SEG142 init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label _3 = $47 - .label _4 = $48 - .label squares = $16 - .label sqr = $14 - .label i = $18 - //SEG180 [90] call malloc - //SEG181 [100] phi from init_squares to malloc [phi:init_squares->malloc] + .label _3 = $43 + .label _4 = $44 + .label squares = $12 + .label sqr = $10 + .label i = $14 + //SEG143 [78] call malloc + //SEG144 [88] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc - //SEG182 [91] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + //SEG145 [79] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] b1_from_init_squares: - //SEG183 [91] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 + //SEG146 [79] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG184 [91] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + //SEG147 [79] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #SQUARES sta squares+1 - //SEG185 [91] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG148 [79] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 lda #0 sta sqr lda #0 sta sqr+1 jmp b1 - //SEG186 [91] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG149 [79] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - //SEG187 [91] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG188 [91] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG189 [91] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG150 [79] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG151 [79] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG152 [79] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 - //SEG190 init_squares::@1 + //SEG153 init_squares::@1 b1: - //SEG191 [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + //SEG154 [80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - //SEG192 [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + //SEG155 [81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -3239,15 +2967,15 @@ init_squares: { bcc !+ inc squares+1 !: - //SEG193 [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG156 [82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _3 - //SEG194 [95] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 + //SEG157 [83] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy _3 iny sty _4 - //SEG195 [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 + //SEG158 [84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuz2 lda _4 clc adc sqr @@ -3255,109 +2983,109 @@ init_squares: { bcc !+ inc sqr+1 !: - //SEG196 [97] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 + //SEG159 [85] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG197 [98] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG160 [86] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_SQUARES-1+1 cmp i bne b1_from_b1 jmp breturn - //SEG198 init_squares::@return + //SEG161 init_squares::@return breturn: - //SEG199 [99] return + //SEG162 [87] return rts } -//SEG200 malloc +//SEG163 malloc // 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 jmp breturn - //SEG201 malloc::@return + //SEG164 malloc::@return breturn: - //SEG202 [101] return + //SEG165 [89] return rts } -//SEG203 init_font_hex +//SEG166 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($1c) charset) +// init_font_hex(byte* zeropage($18) charset) init_font_hex: { - .label _0 = $49 - .label _1 = $4a - .label _2 = $4b - .label idx = $22 - .label i = $21 - .label idx_3 = $4c - .label proto_lo = $1e - .label charset = $1c - .label c1 = $20 - .label proto_hi = $19 - .label c = $1b - //SEG204 [103] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $45 + .label _1 = $46 + .label _2 = $47 + .label idx = $1e + .label i = $1d + .label idx_3 = $48 + .label proto_lo = $1a + .label charset = $18 + .label c1 = $1c + .label proto_hi = $15 + .label c = $17 + //SEG167 [91] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG205 [103] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG168 [91] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG206 [103] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + //SEG169 [91] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG207 [103] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG170 [91] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta charset+1 jmp b1 - //SEG208 [103] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG171 [91] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG209 [103] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - //SEG210 [103] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - //SEG211 [103] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + //SEG172 [91] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + //SEG173 [91] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + //SEG174 [91] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp b1 - //SEG212 init_font_hex::@1 + //SEG175 init_font_hex::@1 b1: - //SEG213 [104] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG176 [92] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG214 [104] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG177 [92] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - //SEG215 [104] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + //SEG178 [92] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG216 [104] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + //SEG179 [92] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG217 [104] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG180 [92] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG218 [104] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - //SEG219 [104] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - //SEG220 [104] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + //SEG181 [92] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + //SEG182 [92] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + //SEG183 [92] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG221 init_font_hex::@2 + //SEG184 init_font_hex::@2 b2: - //SEG222 [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG185 [93] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG223 [106] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG186 [94] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG224 [106] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG187 [94] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - //SEG225 [106] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 + //SEG188 [94] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuz1=vbuc1 lda #0 sta i jmp b3 - //SEG226 [106] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG189 [94] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG227 [106] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - //SEG228 [106] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + //SEG190 [94] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + //SEG191 [94] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp b3 - //SEG229 init_font_hex::@3 + //SEG192 init_font_hex::@3 b3: - //SEG230 [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 + //SEG193 [95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuz3_rol_4 ldy i lda (proto_hi),y asl @@ -3365,43 +3093,43 @@ init_font_hex: { asl asl sta _0 - //SEG231 [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 + //SEG194 [96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuz1=pbuz2_derefidx_vbuz3_rol_1 ldy i lda (proto_lo),y asl sta _1 - //SEG232 [109] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 + //SEG195 [97] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuz1=vbuz2_bor_vbuz3 lda _0 ora _1 sta _2 - //SEG233 [110] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 + //SEG196 [98] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuz3 lda _2 ldy idx sta (charset),y - //SEG234 [111] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG197 [99] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG235 [112] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 + //SEG198 [100] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG236 [113] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG199 [101] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp i bne b3_from_b3 jmp b4 - //SEG237 init_font_hex::@4 + //SEG200 init_font_hex::@4 b4: - //SEG238 [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG201 [102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - //SEG239 [115] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 + //SEG202 [103] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuz1=_inc_vbuz2 ldy idx iny sty idx_3 - //SEG240 [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG203 [104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx_3 sta (charset),y - //SEG241 [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG204 [105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -3409,7 +3137,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG242 [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG205 [106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -3417,16 +3145,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG243 [119] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG206 [107] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG244 [120] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG207 [108] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2_from_b4 jmp b5 - //SEG245 init_font_hex::@5 + //SEG208 init_font_hex::@5 b5: - //SEG246 [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG209 [109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -3434,261 +3162,293 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG247 [122] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG210 [110] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG248 [123] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG211 [111] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1_from_b5 jmp breturn - //SEG249 init_font_hex::@return + //SEG212 init_font_hex::@return breturn: - //SEG250 [124] return + //SEG213 [112] return rts } -//SEG251 File Data +//SEG214 File Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 REGISTER UPLIFT POTENTIAL REGISTERS Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [10] (byte) main::y2#0 ← (byte) main::y#12 << (byte) 1 [ main::y#12 main::screen#17 main::y2#0 ] ( main:2 [ main::y#12 main::screen#17 main::y2#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::y#12 main::y#1 ] -Statement [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 [ main::y#12 main::screen#17 main::$7 ] ( main:2 [ main::y#12 main::screen#17 main::$7 ] ) always clobbers reg byte a -Statement [16] (word) sqr::return#2 ← (word) sqr::return#0 [ main::y#12 main::screen#17 sqr::return#2 ] ( main:2 [ main::y#12 main::screen#17 sqr::return#2 ] ) always clobbers reg byte a -Statement [17] (word) main::yds#0 ← (word) sqr::return#2 [ main::y#12 main::screen#17 main::yds#0 ] ( main:2 [ main::y#12 main::screen#17 main::yds#0 ] ) always clobbers reg byte a -Statement [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::x2#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::x2#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ] -Statement [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::$15 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::$15 ] ) always clobbers reg byte a -Statement [25] (word) sqr::return#3 ← (word) sqr::return#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::return#3 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::return#3 ] ) always clobbers reg byte a -Statement [26] (word) main::xds#0 ← (word) sqr::return#3 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::xds#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::xds#0 ] ) always clobbers reg byte a -Statement [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::ds#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::ds#0 ] ) always clobbers reg byte a -Statement [28] (word) sqrt::val#0 ← (word) main::ds#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::val#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::val#0 ] ) always clobbers reg byte a -Statement [32] *((byte*) main::screen#12) ← (byte) main::d#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::y#12 main::y#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ main::x#2 main::x#1 ] -Statement [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 [ main::y#12 main::screen#1 main::screen_mirror1#3 ] ( main:2 [ main::y#12 main::screen#1 main::screen_mirror1#3 ] ) always clobbers reg byte a -Statement [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ( main:2 [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ main::x1#2 main::x1#1 ] -Statement [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ( main:2 [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:9 [ main::x1#2 main::x1#1 ] -Statement [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 [ main::screen#10 main::screen_mirror#0 ] ( main:2 [ main::screen#10 main::screen_mirror#0 ] ) always clobbers reg byte a -Statement [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ( main:2 [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ main::x3#2 main::x3#1 ] -Statement [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ( main:2 [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ main::x3#2 main::x3#1 ] -Statement [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 ] ) always clobbers reg byte a -Statement [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::found#0 ] ) always clobbers reg byte a -Statement [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::$3 ] ) always clobbers reg byte a -Statement [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::$1 ] ) always clobbers reg byte a -Statement [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::return#0 ] ) always clobbers reg byte a -Statement [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] -Statement [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::sqr:15 [ main::y#12 main::screen#17 sqr::$0 ] main:2::sqr:24 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::$0 ] ) always clobbers reg byte a -Statement [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::sqr:15 [ main::y#12 main::screen#17 sqr::return#0 ] main:2::sqr:24 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::return#0 ] ) always clobbers reg byte a -Statement [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ init_squares::i#2 init_squares::i#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:24 [ init_squares::i#2 init_squares::i#1 ] -Statement [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Statement [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Statement [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:73 [ init_font_hex::$0 ] -Statement [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::y2#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::y2#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::y#10 main::y#1 ] +Statement [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::$7 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::$7 ] ) always clobbers reg byte a +Statement [16] (word) sqr::return#2 ← (word) sqr::return#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#2 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a +Statement [17] (word) main::yds#0 ← (word) sqr::return#2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 ] ) always clobbers reg byte a +Statement [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::x2#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::x2#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ main::x#2 main::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] +Statement [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::$15 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::$15 ] ) always clobbers reg byte a +Statement [25] (word) sqr::return#3 ← (word) sqr::return#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#3 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#3 ] ) always clobbers reg byte a +Statement [26] (word) main::xds#0 ← (word) sqr::return#3 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::xds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::xds#0 ] ) always clobbers reg byte a +Statement [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::ds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::ds#0 ] ) always clobbers reg byte a +Statement [28] (word) sqrt::val#0 ← (word) main::ds#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::val#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::val#0 ] ) always clobbers reg byte a +Statement [39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28 [ main::y#10 main::screen_bottomline#10 main::screen_topline#1 ] ( main:2 [ main::y#10 main::screen_bottomline#10 main::screen_topline#1 ] ) always clobbers reg byte a +Statement [40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28 [ main::y#10 main::screen_topline#1 main::screen_bottomline#1 ] ( main:2 [ main::y#10 main::screen_topline#1 main::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [46] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a +Statement [48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::found#0 ] ) always clobbers reg byte a +Statement [50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::$3 ] ) always clobbers reg byte a +Statement [51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::$1 ] ) always clobbers reg byte a +Statement [52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::return#0 ] ) always clobbers reg byte a +Statement [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::y#10 main::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:9 [ main::x#2 main::x#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] +Statement [58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Statement [63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] +Statement [66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::sqr:15 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::$0 ] main:2::sqr:24 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::sqr:15 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#0 ] main:2::sqr:24 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] +Statement [81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [93] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Statement [95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Statement [96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:69 [ init_font_hex::$0 ] +Statement [102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [10] (byte) main::y2#0 ← (byte) main::y#12 << (byte) 1 [ main::y#12 main::screen#17 main::y2#0 ] ( main:2 [ main::y#12 main::screen#17 main::y2#0 ] ) always clobbers reg byte a -Statement [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 [ main::y#12 main::screen#17 main::$7 ] ( main:2 [ main::y#12 main::screen#17 main::$7 ] ) always clobbers reg byte a -Statement [16] (word) sqr::return#2 ← (word) sqr::return#0 [ main::y#12 main::screen#17 sqr::return#2 ] ( main:2 [ main::y#12 main::screen#17 sqr::return#2 ] ) always clobbers reg byte a -Statement [17] (word) main::yds#0 ← (word) sqr::return#2 [ main::y#12 main::screen#17 main::yds#0 ] ( main:2 [ main::y#12 main::screen#17 main::yds#0 ] ) always clobbers reg byte a -Statement [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::x2#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::x2#0 ] ) always clobbers reg byte a -Statement [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::$15 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::$15 ] ) always clobbers reg byte a -Statement [25] (word) sqr::return#3 ← (word) sqr::return#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::return#3 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::return#3 ] ) always clobbers reg byte a -Statement [26] (word) main::xds#0 ← (word) sqr::return#3 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::xds#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::xds#0 ] ) always clobbers reg byte a -Statement [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::ds#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 main::ds#0 ] ) always clobbers reg byte a -Statement [28] (word) sqrt::val#0 ← (word) main::ds#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::val#0 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::val#0 ] ) always clobbers reg byte a -Statement [32] *((byte*) main::screen#12) ← (byte) main::d#0 [ main::y#12 main::yds#0 main::x#2 main::screen#12 ] ( main:2 [ main::y#12 main::yds#0 main::x#2 main::screen#12 ] ) always clobbers reg byte y -Statement [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 [ main::y#12 main::screen#1 main::screen_mirror1#3 ] ( main:2 [ main::y#12 main::screen#1 main::screen_mirror1#3 ] ) always clobbers reg byte a -Statement [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ( main:2 [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ) always clobbers reg byte a -Statement [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ( main:2 [ main::y#12 main::screen#6 main::x1#2 main::screen_mirror1#1 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 [ main::screen#10 main::screen_mirror#0 ] ( main:2 [ main::screen#10 main::screen_mirror#0 ] ) always clobbers reg byte a -Statement [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ( main:2 [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ) always clobbers reg byte a -Statement [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ( main:2 [ main::y1#4 main::screen_mirror#1 main::screen#8 main::x3#2 ] ) always clobbers reg byte a reg byte y -Statement [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 ] ) always clobbers reg byte a -Statement [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::return#3 ] ) always clobbers reg byte a -Statement [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::found#0 ] ) always clobbers reg byte a -Statement [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::$3 ] ) always clobbers reg byte a -Statement [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::$1 ] ) always clobbers reg byte a -Statement [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::sqrt:29 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqrt::return#0 ] ) always clobbers reg byte a -Statement [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y -Statement [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::$2 ] ) always clobbers reg byte a -Statement [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a -Statement [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a -Statement [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y -Statement [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a -Statement [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::return#6 ] ) always clobbers reg byte a -Statement [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a -Statement [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::sqrt:29::bsearch16u:59 [ main::y#12 main::yds#0 main::x#2 main::screen#12 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a -Statement [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::sqr:15 [ main::y#12 main::screen#17 sqr::$0 ] main:2::sqr:24 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::$0 ] ) always clobbers reg byte a -Statement [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::sqr:15 [ main::y#12 main::screen#17 sqr::return#0 ] main:2::sqr:24 [ main::y#12 main::yds#0 main::x#2 main::screen#12 sqr::return#0 ] ) always clobbers reg byte a -Statement [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y -Statement [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a -Statement [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a -Statement [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y -Statement [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a -Statement [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a -Statement [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a -Statement [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a -Statement [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a -Statement [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ main::y#12 main::y#1 ] : zp ZP_BYTE:2 , reg byte x , -Potential registers zp ZP_BYTE:3 [ main::yd#0 main::$9 main::$7 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:4 [ main::x#2 main::x#1 ] : zp ZP_BYTE:4 , reg byte x , -Potential registers zp ZP_BYTE:5 [ main::xd#0 main::$17 main::$15 ] : zp ZP_BYTE:5 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:6 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] : zp ZP_WORD:6 , -Potential registers zp ZP_BYTE:9 [ main::x1#2 main::x1#1 ] : zp ZP_BYTE:9 , reg byte x , -Potential registers zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] : zp ZP_BYTE:10 , reg byte x , -Potential registers zp ZP_WORD:11 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] : zp ZP_WORD:11 , -Potential registers zp ZP_WORD:13 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] : zp ZP_WORD:13 , -Potential registers zp ZP_BYTE:15 [ main::x3#2 main::x3#1 ] : zp ZP_BYTE:15 , reg byte x , -Potential registers zp ZP_WORD:16 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:16 , -Potential registers zp ZP_BYTE:18 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:18 , reg byte x , -Potential registers zp ZP_BYTE:19 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:20 , -Potential registers zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] : zp ZP_WORD:22 , -Potential registers zp ZP_BYTE:24 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:24 , reg byte x , -Potential registers zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:25 , -Potential registers zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:27 , reg byte x , -Potential registers zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:28 , -Potential registers zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:30 , -Potential registers zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:32 , reg byte x , -Potential registers zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:33 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:34 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:35 [ main::y2#0 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:36 [ sqr::return#2 ] : zp ZP_WORD:36 , -Potential registers zp ZP_WORD:38 [ main::yds#0 ] : zp ZP_WORD:38 , -Potential registers zp ZP_BYTE:40 [ main::x2#0 ] : zp ZP_BYTE:40 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:41 [ sqr::return#3 ] : zp ZP_WORD:41 , -Potential registers zp ZP_WORD:43 [ main::xds#0 ] : zp ZP_WORD:43 , -Potential registers zp ZP_WORD:45 [ main::ds#0 ] : zp ZP_WORD:45 , -Potential registers zp ZP_WORD:47 [ sqrt::val#0 ] : zp ZP_WORD:47 , -Potential registers zp ZP_BYTE:49 [ sqrt::return#2 ] : zp ZP_BYTE:49 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:50 [ main::d#0 ] : zp ZP_BYTE:50 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:51 [ bsearch16u::key#0 ] : zp ZP_WORD:51 , -Potential registers zp ZP_WORD:53 [ bsearch16u::return#3 ] : zp ZP_WORD:53 , -Potential registers zp ZP_WORD:55 [ sqrt::found#0 ] : zp ZP_WORD:55 , -Potential registers zp ZP_WORD:57 [ sqrt::$3 ] : zp ZP_WORD:57 , -Potential registers zp ZP_WORD:59 [ sqrt::$1 ] : zp ZP_WORD:59 , -Potential registers zp ZP_BYTE:61 [ sqrt::return#0 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:62 [ bsearch16u::$6 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:63 [ bsearch16u::$16 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:64 [ bsearch16u::pivot#0 ] : zp ZP_WORD:64 , -Potential registers zp ZP_WORD:66 [ bsearch16u::result#0 ] : zp ZP_WORD:66 , -Potential registers zp ZP_BYTE:68 [ sqr::$0 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:69 [ sqr::return#0 ] : zp ZP_WORD:69 , -Potential registers zp ZP_BYTE:71 [ init_squares::$3 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:72 [ init_squares::$4 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:73 [ init_font_hex::$0 ] : zp ZP_BYTE:73 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:74 [ init_font_hex::$1 ] : zp ZP_BYTE:74 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:75 [ init_font_hex::$2 ] : zp ZP_BYTE:75 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:76 [ init_font_hex::idx#3 ] : zp ZP_BYTE:76 , reg byte a , reg byte x , reg byte y , +Statement [10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::y2#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::y2#0 ] ) always clobbers reg byte a +Statement [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::$7 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::$7 ] ) always clobbers reg byte a +Statement [16] (word) sqr::return#2 ← (word) sqr::return#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#2 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a +Statement [17] (word) main::yds#0 ← (word) sqr::return#2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 ] ) always clobbers reg byte a +Statement [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::x2#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::x2#0 ] ) always clobbers reg byte a +Statement [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::$15 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::$15 ] ) always clobbers reg byte a +Statement [25] (word) sqr::return#3 ← (word) sqr::return#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#3 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#3 ] ) always clobbers reg byte a +Statement [26] (word) main::xds#0 ← (word) sqr::return#3 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::xds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::xds#0 ] ) always clobbers reg byte a +Statement [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::ds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::ds#0 ] ) always clobbers reg byte a +Statement [28] (word) sqrt::val#0 ← (word) main::ds#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::val#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::val#0 ] ) always clobbers reg byte a +Statement [32] *((byte*) main::screen_topline#10 + (byte) main::x#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:46 [ main::d#0 ] +Statement [33] *((byte*) main::screen_bottomline#10 + (byte) main::x#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ) always clobbers reg byte y +Statement [34] *((byte*) main::screen_topline#10 + (byte) main::xb#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ) always clobbers reg byte y +Statement [35] *((byte*) main::screen_bottomline#10 + (byte) main::xb#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 ] ) always clobbers reg byte y +Statement [39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28 [ main::y#10 main::screen_bottomline#10 main::screen_topline#1 ] ( main:2 [ main::y#10 main::screen_bottomline#10 main::screen_topline#1 ] ) always clobbers reg byte a +Statement [40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28 [ main::y#10 main::screen_topline#1 main::screen_bottomline#1 ] ( main:2 [ main::y#10 main::screen_topline#1 main::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [46] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a +Statement [48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::found#0 ] ) always clobbers reg byte a +Statement [50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::$3 ] ) always clobbers reg byte a +Statement [51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::$1 ] ) always clobbers reg byte a +Statement [52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::return#0 ] ) always clobbers reg byte a +Statement [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::sqr:15 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::$0 ] main:2::sqr:24 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::sqr:15 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#0 ] main:2::sqr:24 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [93] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Statement [95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Statement [96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Statement [102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Statement [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::y2#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::y2#0 ] ) always clobbers reg byte a +Statement [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::$7 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::$7 ] ) always clobbers reg byte a +Statement [16] (word) sqr::return#2 ← (word) sqr::return#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#2 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#2 ] ) always clobbers reg byte a +Statement [17] (word) main::yds#0 ← (word) sqr::return#2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 ] ) always clobbers reg byte a +Statement [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::x2#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::x2#0 ] ) always clobbers reg byte a +Statement [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::$15 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::$15 ] ) always clobbers reg byte a +Statement [25] (word) sqr::return#3 ← (word) sqr::return#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#3 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#3 ] ) always clobbers reg byte a +Statement [26] (word) main::xds#0 ← (word) sqr::return#3 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::xds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::xds#0 ] ) always clobbers reg byte a +Statement [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::ds#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::ds#0 ] ) always clobbers reg byte a +Statement [28] (word) sqrt::val#0 ← (word) main::ds#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::val#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::val#0 ] ) always clobbers reg byte a +Statement [32] *((byte*) main::screen_topline#10 + (byte) main::x#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ) always clobbers reg byte y +Statement [33] *((byte*) main::screen_bottomline#10 + (byte) main::x#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ) always clobbers reg byte y +Statement [34] *((byte*) main::screen_topline#10 + (byte) main::xb#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 main::d#0 ] ) always clobbers reg byte y +Statement [35] *((byte*) main::screen_bottomline#10 + (byte) main::xb#2) ← (byte) main::d#0 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 ] ( main:2 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 ] ) always clobbers reg byte y +Statement [39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28 [ main::y#10 main::screen_bottomline#10 main::screen_topline#1 ] ( main:2 [ main::y#10 main::screen_bottomline#10 main::screen_topline#1 ] ) always clobbers reg byte a +Statement [40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28 [ main::y#10 main::screen_topline#1 main::screen_bottomline#1 ] ( main:2 [ main::y#10 main::screen_topline#1 main::screen_bottomline#1 ] ) always clobbers reg byte a +Statement [46] (word) bsearch16u::key#0 ← (word) sqrt::val#0 [ bsearch16u::key#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 ] ) always clobbers reg byte a +Statement [48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 [ bsearch16u::return#3 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::return#3 ] ) always clobbers reg byte a +Statement [49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 [ sqrt::found#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::found#0 ] ) always clobbers reg byte a +Statement [50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 [ sqrt::$3 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::$3 ] ) always clobbers reg byte a +Statement [51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 [ sqrt::$1 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::$1 ] ) always clobbers reg byte a +Statement [52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 [ sqrt::return#0 ] ( main:2::sqrt:29 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqrt::return#0 ] ) always clobbers reg byte a +Statement [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 [ bsearch16u::items#2 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::items#2 ] ) always clobbers reg byte a reg byte y +Statement [58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::$2 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::$2 ] ) always clobbers reg byte a +Statement [62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$6 ] ) always clobbers reg byte a +Statement [63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::$16 ] ) always clobbers reg byte a +Statement [64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a reg byte y +Statement [66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 bsearch16u::result#0 ] ) always clobbers reg byte a +Statement [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 [ bsearch16u::return#6 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::return#6 ] ) always clobbers reg byte a +Statement [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#2 bsearch16u::pivot#0 ] ) always clobbers reg byte a +Statement [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD [ bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ( main:2::sqrt:29::bsearch16u:47 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 bsearch16u::key#0 bsearch16u::num#3 bsearch16u::items#0 ] ) always clobbers reg byte a +Statement [74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 [ sqr::$0 ] ( main:2::sqr:15 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::$0 ] main:2::sqr:24 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::$0 ] ) always clobbers reg byte a +Statement [75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) [ sqr::return#0 ] ( main:2::sqr:15 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 sqr::return#0 ] main:2::sqr:24 [ main::y#10 main::screen_topline#10 main::screen_bottomline#10 main::yds#0 main::x#2 main::xb#2 sqr::return#0 ] ) always clobbers reg byte a +Statement [80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::squares#2 init_squares::i#2 ] ) always clobbers reg byte a reg byte y +Statement [81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ( main:2::init_squares:8 [ init_squares::sqr#2 init_squares::i#2 init_squares::squares#1 init_squares::$3 ] ) always clobbers reg byte a +Statement [84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ( main:2::init_squares:8 [ init_squares::i#2 init_squares::sqr#1 init_squares::squares#1 ] ) always clobbers reg byte a +Statement [93] *((byte*) init_font_hex::charset#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a reg byte y +Statement [95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ) always clobbers reg byte a +Statement [96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ) always clobbers reg byte a +Statement [102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ) always clobbers reg byte a +Statement [104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ) always clobbers reg byte a +Statement [105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( main:2::init_font_hex:5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ) always clobbers reg byte a +Statement [109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( main:2::init_font_hex:5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::y#10 main::y#1 ] : zp ZP_BYTE:2 , reg byte x , +Potential registers zp ZP_WORD:3 [ main::screen_topline#10 main::screen_topline#1 ] : zp ZP_WORD:3 , +Potential registers zp ZP_WORD:5 [ main::screen_bottomline#10 main::screen_bottomline#1 ] : zp ZP_WORD:5 , +Potential registers zp ZP_BYTE:7 [ main::yd#0 main::$9 main::$7 ] : zp ZP_BYTE:7 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:9 [ main::x#2 main::x#1 ] : zp ZP_BYTE:9 , reg byte x , +Potential registers zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] : zp ZP_BYTE:10 , reg byte x , +Potential registers zp ZP_BYTE:11 [ main::xd#0 main::$17 main::$15 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] : zp ZP_WORD:12 , +Potential registers zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] : zp ZP_BYTE:14 , reg byte x , +Potential registers zp ZP_BYTE:15 [ sqr::val#2 sqr::val#0 sqr::val#1 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] : zp ZP_WORD:16 , +Potential registers zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] : zp ZP_WORD:18 , +Potential registers zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] : zp ZP_BYTE:20 , reg byte x , +Potential registers zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp ZP_WORD:21 , +Potential registers zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp ZP_BYTE:23 , reg byte x , +Potential registers zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp ZP_WORD:24 , +Potential registers zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp ZP_WORD:26 , +Potential registers zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp ZP_BYTE:28 , reg byte x , +Potential registers zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp ZP_BYTE:29 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp ZP_BYTE:30 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:31 [ main::y2#0 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:32 [ sqr::return#2 ] : zp ZP_WORD:32 , +Potential registers zp ZP_WORD:34 [ main::yds#0 ] : zp ZP_WORD:34 , +Potential registers zp ZP_BYTE:36 [ main::x2#0 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:37 [ sqr::return#3 ] : zp ZP_WORD:37 , +Potential registers zp ZP_WORD:39 [ main::xds#0 ] : zp ZP_WORD:39 , +Potential registers zp ZP_WORD:41 [ main::ds#0 ] : zp ZP_WORD:41 , +Potential registers zp ZP_WORD:43 [ sqrt::val#0 ] : zp ZP_WORD:43 , +Potential registers zp ZP_BYTE:45 [ sqrt::return#2 ] : zp ZP_BYTE:45 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:46 [ main::d#0 ] : zp ZP_BYTE:46 , reg byte a , reg byte x , +Potential registers zp ZP_WORD:47 [ bsearch16u::key#0 ] : zp ZP_WORD:47 , +Potential registers zp ZP_WORD:49 [ bsearch16u::return#3 ] : zp ZP_WORD:49 , +Potential registers zp ZP_WORD:51 [ sqrt::found#0 ] : zp ZP_WORD:51 , +Potential registers zp ZP_WORD:53 [ sqrt::$3 ] : zp ZP_WORD:53 , +Potential registers zp ZP_WORD:55 [ sqrt::$1 ] : zp ZP_WORD:55 , +Potential registers zp ZP_BYTE:57 [ sqrt::return#0 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:58 [ bsearch16u::$6 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:59 [ bsearch16u::$16 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:60 [ bsearch16u::pivot#0 ] : zp ZP_WORD:60 , +Potential registers zp ZP_WORD:62 [ bsearch16u::result#0 ] : zp ZP_WORD:62 , +Potential registers zp ZP_BYTE:64 [ sqr::$0 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:65 [ sqr::return#0 ] : zp ZP_WORD:65 , +Potential registers zp ZP_BYTE:67 [ init_squares::$3 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:68 [ init_squares::$4 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:69 [ init_font_hex::$0 ] : zp ZP_BYTE:69 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:70 [ init_font_hex::$1 ] : zp ZP_BYTE:70 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:71 [ init_font_hex::$2 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:72 [ init_font_hex::idx#3 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:18 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,852.83: zp ZP_WORD:16 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:62 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:63 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:66 [ bsearch16u::result#0 ] 501: zp ZP_WORD:64 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:53 [ bsearch16u::return#3 ] 0.29: zp ZP_WORD:51 [ bsearch16u::key#0 ] -Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:33 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:74 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:75 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:73 [ init_font_hex::$0 ] 202: zp ZP_BYTE:76 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplift Scope [main] 707: zp ZP_BYTE:5 [ main::xd#0 main::$17 main::$15 ] 389.92: zp ZP_WORD:13 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] 295.6: zp ZP_WORD:6 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] 285.86: zp ZP_WORD:11 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] 202: zp ZP_BYTE:9 [ main::x1#2 main::x1#1 ] 202: zp ZP_BYTE:15 [ main::x3#2 main::x3#1 ] 202: zp ZP_BYTE:40 [ main::x2#0 ] 202: zp ZP_WORD:43 [ main::xds#0 ] 202: zp ZP_WORD:45 [ main::ds#0 ] 202: zp ZP_BYTE:50 [ main::d#0 ] 169.32: zp ZP_BYTE:4 [ main::x#2 main::x#1 ] 77: zp ZP_BYTE:3 [ main::yd#0 main::$9 main::$7 ] 22: zp ZP_BYTE:35 [ main::y2#0 ] 19.64: zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] 17.42: zp ZP_BYTE:2 [ main::y#12 main::y#1 ] 5.6: zp ZP_WORD:38 [ main::yds#0 ] -Uplift Scope [sqr] 338: zp ZP_BYTE:19 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:41 [ sqr::return#3 ] 28.5: zp ZP_WORD:69 [ sqr::return#0 ] 22: zp ZP_WORD:36 [ sqr::return#2 ] 4: zp ZP_BYTE:68 [ sqr::$0 ] -Uplift Scope [sqrt] 202: zp ZP_BYTE:49 [ sqrt::return#2 ] 103: zp ZP_WORD:47 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:61 [ sqrt::return#0 ] 4: zp ZP_WORD:55 [ sqrt::found#0 ] 4: zp ZP_WORD:57 [ sqrt::$3 ] 2: zp ZP_WORD:59 [ sqrt::$1 ] -Uplift Scope [init_squares] 22: zp ZP_BYTE:24 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:71 [ init_squares::$3 ] 22: zp ZP_BYTE:72 [ init_squares::$4 ] 20.17: zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplift Scope [bsearch16u] 7,563.11: zp ZP_BYTE:14 [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] 2,852.83: zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] 2,002: zp ZP_BYTE:58 [ bsearch16u::$6 ] 2,002: zp ZP_BYTE:59 [ bsearch16u::$16 ] 1,501.5: zp ZP_WORD:62 [ bsearch16u::result#0 ] 501: zp ZP_WORD:60 [ bsearch16u::pivot#0 ] 4: zp ZP_WORD:49 [ bsearch16u::return#3 ] 0.29: zp ZP_WORD:47 [ bsearch16u::key#0 ] +Uplift Scope [init_font_hex] 2,168.83: zp ZP_BYTE:29 [ init_font_hex::i#2 init_font_hex::i#1 ] 2,002: zp ZP_BYTE:70 [ init_font_hex::$1 ] 2,002: zp ZP_BYTE:71 [ init_font_hex::$2 ] 1,151.6: zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 1,001: zp ZP_BYTE:69 [ init_font_hex::$0 ] 202: zp ZP_BYTE:72 [ init_font_hex::idx#3 ] 165.86: zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 164.97: zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 143.04: zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 64.17: zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 17.66: zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplift Scope [main] 707: zp ZP_BYTE:11 [ main::xd#0 main::$17 main::$15 ] 202: zp ZP_BYTE:36 [ main::x2#0 ] 202: zp ZP_WORD:39 [ main::xds#0 ] 202: zp ZP_WORD:41 [ main::ds#0 ] 127.58: zp ZP_BYTE:9 [ main::x#2 main::x#1 ] 126.25: zp ZP_BYTE:46 [ main::d#0 ] 121.2: zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] 77: zp ZP_BYTE:7 [ main::yd#0 main::$9 main::$7 ] 22: zp ZP_BYTE:31 [ main::y2#0 ] 17.47: zp ZP_BYTE:2 [ main::y#10 main::y#1 ] 14.12: zp ZP_WORD:5 [ main::screen_bottomline#10 main::screen_bottomline#1 ] 12.5: zp ZP_WORD:3 [ main::screen_topline#10 main::screen_topline#1 ] 4.87: zp ZP_WORD:34 [ main::yds#0 ] +Uplift Scope [sqr] 338: zp ZP_BYTE:15 [ sqr::val#2 sqr::val#0 sqr::val#1 ] 202: zp ZP_WORD:37 [ sqr::return#3 ] 28.5: zp ZP_WORD:65 [ sqr::return#0 ] 22: zp ZP_WORD:32 [ sqr::return#2 ] 4: zp ZP_BYTE:64 [ sqr::$0 ] +Uplift Scope [sqrt] 202: zp ZP_BYTE:45 [ sqrt::return#2 ] 103: zp ZP_WORD:43 [ sqrt::val#0 ] 34.33: zp ZP_BYTE:57 [ sqrt::return#0 ] 4: zp ZP_WORD:51 [ sqrt::found#0 ] 4: zp ZP_WORD:53 [ sqrt::$3 ] 2: zp ZP_WORD:55 [ sqrt::$1 ] +Uplift Scope [init_squares] 22: zp ZP_BYTE:20 [ init_squares::i#2 init_squares::i#1 ] 22: zp ZP_BYTE:67 [ init_squares::$3 ] 22: zp ZP_BYTE:68 [ init_squares::$4 ] 20.17: zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] 13.93: zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] Uplift Scope [malloc] Uplift Scope [] -Uplifting [bsearch16u] best 273208 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:16 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:66 [ bsearch16u::result#0 ] zp ZP_WORD:64 [ bsearch16u::pivot#0 ] zp ZP_WORD:53 [ bsearch16u::return#3 ] zp ZP_WORD:51 [ bsearch16u::key#0 ] -Uplifting [init_font_hex] best 254208 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:73 [ init_font_hex::$0 ] zp ZP_BYTE:76 [ init_font_hex::idx#3 ] zp ZP_WORD:28 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:30 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:25 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [bsearch16u] best 262710 combination reg byte x [ bsearch16u::num#5 bsearch16u::num#1 bsearch16u::num#3 bsearch16u::num#0 ] zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] zp ZP_WORD:62 [ bsearch16u::result#0 ] zp ZP_WORD:60 [ bsearch16u::pivot#0 ] zp ZP_WORD:49 [ bsearch16u::return#3 ] zp ZP_WORD:47 [ bsearch16u::key#0 ] +Uplifting [init_font_hex] best 243710 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp ZP_BYTE:69 [ init_font_hex::$0 ] zp ZP_BYTE:72 [ init_font_hex::idx#3 ] zp ZP_WORD:24 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp ZP_WORD:26 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp ZP_WORD:21 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. -Uplifting [main] best 250108 combination reg byte a [ main::xd#0 main::$17 main::$15 ] zp ZP_WORD:13 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] zp ZP_WORD:6 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] zp ZP_WORD:11 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] reg byte x [ main::x1#2 main::x1#1 ] reg byte x [ main::x3#2 main::x3#1 ] reg byte a [ main::x2#0 ] zp ZP_WORD:43 [ main::xds#0 ] zp ZP_WORD:45 [ main::ds#0 ] reg byte a [ main::d#0 ] zp ZP_BYTE:4 [ main::x#2 main::x#1 ] zp ZP_BYTE:3 [ main::yd#0 main::$9 main::$7 ] zp ZP_BYTE:35 [ main::y2#0 ] zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] zp ZP_BYTE:2 [ main::y#12 main::y#1 ] zp ZP_WORD:38 [ main::yds#0 ] -Limited combination testing to 100 combinations of 32768 possible. -Uplifting [sqr] best 249771 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:41 [ sqr::return#3 ] zp ZP_WORD:69 [ sqr::return#0 ] zp ZP_WORD:36 [ sqr::return#2 ] reg byte a [ sqr::$0 ] -Uplifting [sqrt] best 248868 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:47 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:55 [ sqrt::found#0 ] zp ZP_WORD:57 [ sqrt::$3 ] zp ZP_WORD:59 [ sqrt::$1 ] -Uplifting [init_squares] best 248668 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:22 [ init_squares::squares#2 init_squares::squares#1 ] zp ZP_WORD:20 [ init_squares::sqr#2 init_squares::sqr#1 ] -Uplifting [malloc] best 248668 combination -Uplifting [] best 248668 combination -Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Uplifting [init_font_hex] best 248668 combination zp ZP_BYTE:34 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Attempting to uplift remaining variables inzp ZP_BYTE:73 [ init_font_hex::$0 ] -Uplifting [init_font_hex] best 248668 combination zp ZP_BYTE:73 [ init_font_hex::$0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:76 [ init_font_hex::idx#3 ] -Uplifting [init_font_hex] best 248068 combination reg byte y [ init_font_hex::idx#3 ] -Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::x#2 main::x#1 ] -Uplifting [main] best 248068 combination zp ZP_BYTE:4 [ main::x#2 main::x#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Uplifting [init_font_hex] best 248068 combination zp ZP_BYTE:32 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::yd#0 main::$9 main::$7 ] -Uplifting [main] best 247998 combination reg byte a [ main::yd#0 main::$9 main::$7 ] -Attempting to uplift remaining variables inzp ZP_BYTE:35 [ main::y2#0 ] -Uplifting [main] best 247898 combination reg byte a [ main::y2#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] -Uplifting [main] best 247898 combination zp ZP_BYTE:10 [ main::y1#4 main::y1#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] -Uplifting [init_font_hex] best 247898 combination zp ZP_BYTE:27 [ init_font_hex::c#6 init_font_hex::c#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::y#12 main::y#1 ] -Uplifting [main] best 247898 combination zp ZP_BYTE:2 [ main::y#12 main::y#1 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:53 [ bsearch16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:36 [ sqr::return#2 ] ] with [ zp ZP_WORD:38 [ main::yds#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ sqr::return#3 ] ] with [ zp ZP_WORD:43 [ main::xds#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ sqr::return#3 main::xds#0 ] ] with [ zp ZP_WORD:69 [ sqr::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:45 [ main::ds#0 ] ] with [ zp ZP_WORD:47 [ sqrt::val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ sqrt::found#0 ] ] with [ zp ZP_WORD:57 [ sqrt::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:55 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ sqr::return#3 main::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:45 [ main::ds#0 sqrt::val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ 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 ] ] with [ zp ZP_WORD:59 [ sqrt::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:51 [ bsearch16u::key#0 ] ] - score: 1 -Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:3 [ main::x#2 main::x#1 ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] -Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:6 [ main::y1#4 main::y1#1 ] -Allocated (was zp ZP_WORD:11) zp ZP_WORD:9 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] -Allocated (was zp ZP_WORD:13) zp ZP_WORD:11 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] -Allocated (was zp ZP_WORD:16) zp ZP_WORD:13 [ 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 ] -Allocated (was zp ZP_WORD:20) zp ZP_WORD:15 [ init_squares::sqr#2 init_squares::sqr#1 ] -Allocated (was zp ZP_WORD:22) zp ZP_WORD:17 [ init_squares::squares#2 init_squares::squares#1 ] -Allocated (was zp ZP_WORD:25) zp ZP_WORD:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:21 [ init_font_hex::c#6 init_font_hex::c#1 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:22 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -Allocated (was zp ZP_WORD:30) zp ZP_WORD:24 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -Allocated (was zp ZP_BYTE:32) zp ZP_BYTE:26 [ init_font_hex::c1#4 init_font_hex::c1#1 ] -Allocated (was zp ZP_BYTE:34) zp ZP_BYTE:27 [ init_font_hex::idx#5 init_font_hex::idx#2 ] -Allocated (was zp ZP_WORD:36) zp ZP_WORD:28 [ sqr::return#2 main::yds#0 ] -Allocated (was zp ZP_WORD:41) zp ZP_WORD:30 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 bsearch16u::key#0 ] -Allocated (was zp ZP_WORD:64) zp ZP_WORD:32 [ bsearch16u::pivot#0 ] -Allocated (was zp ZP_WORD:66) zp ZP_WORD:34 [ bsearch16u::result#0 ] -Allocated (was zp ZP_BYTE:73) zp ZP_BYTE:36 [ init_font_hex::$0 ] +Uplifting [main] best 240510 combination reg byte a [ main::xd#0 main::$17 main::$15 ] reg byte a [ main::x2#0 ] zp ZP_WORD:39 [ main::xds#0 ] zp ZP_WORD:41 [ main::ds#0 ] zp ZP_BYTE:9 [ main::x#2 main::x#1 ] reg byte a [ main::d#0 ] zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] zp ZP_BYTE:7 [ main::yd#0 main::$9 main::$7 ] zp ZP_BYTE:31 [ main::y2#0 ] zp ZP_BYTE:2 [ main::y#10 main::y#1 ] zp ZP_WORD:5 [ main::screen_bottomline#10 main::screen_bottomline#1 ] zp ZP_WORD:3 [ main::screen_topline#10 main::screen_topline#1 ] zp ZP_WORD:34 [ main::yds#0 ] +Limited combination testing to 100 combinations of 6144 possible. +Uplifting [sqr] best 240173 combination reg byte a [ sqr::val#2 sqr::val#0 sqr::val#1 ] zp ZP_WORD:37 [ sqr::return#3 ] zp ZP_WORD:65 [ sqr::return#0 ] zp ZP_WORD:32 [ sqr::return#2 ] reg byte a [ sqr::$0 ] +Uplifting [sqrt] best 239270 combination reg byte a [ sqrt::return#2 ] zp ZP_WORD:43 [ sqrt::val#0 ] reg byte a [ sqrt::return#0 ] zp ZP_WORD:51 [ sqrt::found#0 ] zp ZP_WORD:53 [ sqrt::$3 ] zp ZP_WORD:55 [ sqrt::$1 ] +Uplifting [init_squares] best 239070 combination reg byte x [ init_squares::i#2 init_squares::i#1 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] zp ZP_WORD:18 [ init_squares::squares#2 init_squares::squares#1 ] zp ZP_WORD:16 [ init_squares::sqr#2 init_squares::sqr#1 ] +Uplifting [malloc] best 239070 combination +Uplifting [] best 239070 combination +Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Uplifting [init_font_hex] best 239070 combination zp ZP_BYTE:30 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:69 [ init_font_hex::$0 ] +Uplifting [init_font_hex] best 239070 combination zp ZP_BYTE:69 [ init_font_hex::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:72 [ init_font_hex::idx#3 ] +Uplifting [init_font_hex] best 238470 combination reg byte y [ init_font_hex::idx#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Uplifting [init_font_hex] best 238470 combination zp ZP_BYTE:28 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:9 [ main::x#2 main::x#1 ] +Uplifting [main] best 238470 combination zp ZP_BYTE:9 [ main::x#2 main::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] +Uplifting [main] best 238470 combination zp ZP_BYTE:10 [ main::xb#2 main::xb#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::yd#0 main::$9 main::$7 ] +Uplifting [main] best 238400 combination reg byte a [ main::yd#0 main::$9 main::$7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:31 [ main::y2#0 ] +Uplifting [main] best 238300 combination reg byte a [ main::y2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Uplifting [init_font_hex] best 238300 combination zp ZP_BYTE:23 [ init_font_hex::c#6 init_font_hex::c#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::y#10 main::y#1 ] +Uplifting [main] best 238300 combination zp ZP_BYTE:2 [ main::y#10 main::y#1 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 ] ] with [ zp ZP_WORD:49 [ bsearch16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ sqr::return#2 ] ] with [ zp ZP_WORD:34 [ main::yds#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 ] ] with [ zp ZP_WORD:39 [ main::xds#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 main::xds#0 ] ] with [ zp ZP_WORD:65 [ sqr::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:41 [ main::ds#0 ] ] with [ zp ZP_WORD:43 [ sqrt::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ sqrt::found#0 ] ] with [ zp ZP_WORD:53 [ sqrt::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ bsearch16u::return#1 bsearch16u::return#6 bsearch16u::return#2 bsearch16u::items#2 bsearch16u::items#8 bsearch16u::$2 bsearch16u::items#0 bsearch16u::return#3 ] ] with [ zp ZP_WORD:51 [ sqrt::found#0 sqrt::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 main::xds#0 sqr::return#0 ] ] with [ zp ZP_WORD:41 [ main::ds#0 sqrt::val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ 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 ] ] with [ zp ZP_WORD:55 [ sqrt::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:37 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 ] ] with [ zp ZP_WORD:47 [ bsearch16u::key#0 ] ] - score: 1 +Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:7 [ main::x#2 main::x#1 ] +Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ main::xb#2 main::xb#1 ] +Allocated (was zp ZP_WORD:12) 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 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:12 [ init_squares::sqr#2 init_squares::sqr#1 ] +Allocated (was zp ZP_WORD:18) zp ZP_WORD:14 [ init_squares::squares#2 init_squares::squares#1 ] +Allocated (was zp ZP_WORD:21) zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +Allocated (was zp ZP_BYTE:23) zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] +Allocated (was zp ZP_WORD:24) zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +Allocated (was zp ZP_WORD:26) zp ZP_WORD:21 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] +Allocated (was zp ZP_BYTE:28) zp ZP_BYTE:23 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +Allocated (was zp ZP_BYTE:30) zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:25 [ sqr::return#2 main::yds#0 ] +Allocated (was zp ZP_WORD:37) zp ZP_WORD:27 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 bsearch16u::key#0 ] +Allocated (was zp ZP_WORD:60) zp ZP_WORD:29 [ bsearch16u::pivot#0 ] +Allocated (was zp ZP_WORD:62) zp ZP_WORD:31 [ bsearch16u::result#0 ] +Allocated (was zp ZP_BYTE:69) zp ZP_BYTE:33 [ init_font_hex::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -3725,17 +3485,16 @@ bend: //SEG10 main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f - .label yds = $1c - .label xds = $1e - .label ds = $1e - .label screen = $b - .label x = 3 - .label screen_mirror1 = 4 + .label yds = $19 + .label xds = $1b + .label ds = $1b + .label x = 7 + .label xb = 9 + .label screen_topline = 3 + .label screen_bottomline = 5 .label y = 2 - .label screen_mirror = 9 - .label y1 = 6 //SEG11 [5] call init_font_hex - //SEG12 [102] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [90] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex //SEG13 [6] phi from main to main::toD0181 [phi:main->main::toD0181] @@ -3743,115 +3502,123 @@ main: { jmp toD0181 //SEG14 main::toD0181 toD0181: - jmp b16 - //SEG15 main::@16 - b16: + jmp b10 + //SEG15 main::@10 + b10: //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 //SEG17 [8] call init_squares - //SEG18 [89] phi from main::@16 to init_squares [phi:main::@16->init_squares] - init_squares_from_b16: + //SEG18 [77] phi from main::@10 to init_squares [phi:main::@10->init_squares] + init_squares_from_b10: jsr init_squares - //SEG19 [9] phi from main::@16 to main::@1 [phi:main::@16->main::@1] - b1_from_b16: - //SEG20 [9] phi (byte*) main::screen#17 = (const byte*) SCREEN#0 [phi:main::@16->main::@1#0] -- pbuz1=pbuc1 + //SEG19 [9] phi from main::@10 to main::@1 [phi:main::@10->main::@1] + b1_from_b10: + //SEG20 [9] phi (byte*) main::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:main::@10->main::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$18 + sta screen_bottomline+1 + //SEG21 [9] phi (byte*) main::screen_topline#10 = (const byte*) SCREEN#0 [phi:main::@10->main::@1#1] -- pbuz1=pbuc1 lda #SCREEN - sta screen+1 - //SEG21 [9] phi (byte) main::y#12 = (byte) 0 [phi:main::@16->main::@1#1] -- vbuz1=vbuc1 + sta screen_topline+1 + //SEG22 [9] phi (byte) main::y#10 = (byte) 0 [phi:main::@10->main::@1#2] -- vbuz1=vbuc1 lda #0 sta y jmp b1 - //SEG22 [9] phi from main::@11 to main::@1 [phi:main::@11->main::@1] - b1_from_b11: - //SEG23 [9] phi (byte*) main::screen#17 = (byte*) main::screen#10 [phi:main::@11->main::@1#0] -- register_copy - //SEG24 [9] phi (byte) main::y#12 = (byte) main::y#1 [phi:main::@11->main::@1#1] -- register_copy + //SEG23 [9] phi from main::@9 to main::@1 [phi:main::@9->main::@1] + b1_from_b9: + //SEG24 [9] phi (byte*) main::screen_bottomline#10 = (byte*) main::screen_bottomline#1 [phi:main::@9->main::@1#0] -- register_copy + //SEG25 [9] phi (byte*) main::screen_topline#10 = (byte*) main::screen_topline#1 [phi:main::@9->main::@1#1] -- register_copy + //SEG26 [9] phi (byte) main::y#10 = (byte) main::y#1 [phi:main::@9->main::@1#2] -- register_copy jmp b1 - //SEG25 main::@1 + //SEG27 main::@1 b1: - //SEG26 [10] (byte) main::y2#0 ← (byte) main::y#12 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG28 [10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG27 [11] if((byte) main::y2#0>=(byte) $18) goto main::@2 -- vbuaa_ge_vbuc1_then_la1 + //SEG29 [11] if((byte) main::y2#0>=(byte) $18) goto main::@2 -- vbuaa_ge_vbuc1_then_la1 cmp #$18 bcs b2 jmp b3 - //SEG28 main::@3 + //SEG30 main::@3 b3: - //SEG29 [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG31 [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$18+1 - //SEG30 [13] phi from main::@2 main::@3 to main::@4 [phi:main::@2/main::@3->main::@4] + //SEG32 [13] phi from main::@2 main::@3 to main::@4 [phi:main::@2/main::@3->main::@4] b4_from_b2: b4_from_b3: - //SEG31 [13] phi (byte) main::yd#0 = (byte~) main::$9 [phi:main::@2/main::@3->main::@4#0] -- register_copy + //SEG33 [13] phi (byte) main::yd#0 = (byte~) main::$9 [phi:main::@2/main::@3->main::@4#0] -- register_copy jmp b4 - //SEG32 main::@4 + //SEG34 main::@4 b4: - //SEG33 [14] (byte) sqr::val#0 ← (byte) main::yd#0 - //SEG34 [15] call sqr - //SEG35 [85] phi from main::@4 to sqr [phi:main::@4->sqr] + //SEG35 [14] (byte) sqr::val#0 ← (byte) main::yd#0 + //SEG36 [15] call sqr + //SEG37 [73] phi from main::@4 to sqr [phi:main::@4->sqr] sqr_from_b4: - //SEG36 [85] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:main::@4->sqr#0] -- register_copy + //SEG38 [73] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:main::@4->sqr#0] -- register_copy jsr sqr - //SEG37 [16] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG39 [16] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_2 lda sqr.return+1 sta sqr.return_2+1 - jmp b17 - //SEG38 main::@17 - b17: - //SEG39 [17] (word) main::yds#0 ← (word) sqr::return#2 - //SEG40 [18] phi from main::@17 to main::@5 [phi:main::@17->main::@5] - b5_from_b17: - //SEG41 [18] phi (byte*) main::screen#12 = (byte*) main::screen#17 [phi:main::@17->main::@5#0] -- register_copy - //SEG42 [18] phi (byte) main::x#2 = (byte) 0 [phi:main::@17->main::@5#1] -- vbuz1=vbuc1 + jmp b11 + //SEG40 main::@11 + b11: + //SEG41 [17] (word) main::yds#0 ← (word) sqr::return#2 + //SEG42 [18] phi from main::@11 to main::@5 [phi:main::@11->main::@5] + b5_from_b11: + //SEG43 [18] phi (byte) main::xb#2 = (byte) $27 [phi:main::@11->main::@5#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG44 [18] phi (byte) main::x#2 = (byte) 0 [phi:main::@11->main::@5#1] -- vbuz1=vbuc1 lda #0 sta x jmp b5 - //SEG43 [18] phi from main::@19 to main::@5 [phi:main::@19->main::@5] - b5_from_b19: - //SEG44 [18] phi (byte*) main::screen#12 = (byte*) main::screen#1 [phi:main::@19->main::@5#0] -- register_copy - //SEG45 [18] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@19->main::@5#1] -- register_copy + //SEG45 [18] phi from main::@13 to main::@5 [phi:main::@13->main::@5] + b5_from_b13: + //SEG46 [18] phi (byte) main::xb#2 = (byte) main::xb#1 [phi:main::@13->main::@5#0] -- register_copy + //SEG47 [18] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@13->main::@5#1] -- register_copy jmp b5 - //SEG46 main::@5 + //SEG48 main::@5 b5: - //SEG47 [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG49 [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG48 [20] if((byte) main::x2#0>=(byte) $27) goto main::@6 -- vbuaa_ge_vbuc1_then_la1 + //SEG50 [20] if((byte) main::x2#0>=(byte) $27) goto main::@6 -- vbuaa_ge_vbuc1_then_la1 cmp #$27 bcs b6 jmp b7 - //SEG49 main::@7 + //SEG51 main::@7 b7: - //SEG50 [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 -- vbuaa=vbuc1_minus_vbuaa + //SEG52 [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$27+1 - //SEG51 [22] phi from main::@6 main::@7 to main::@8 [phi:main::@6/main::@7->main::@8] + //SEG53 [22] phi from main::@6 main::@7 to main::@8 [phi:main::@6/main::@7->main::@8] b8_from_b6: b8_from_b7: - //SEG52 [22] phi (byte) main::xd#0 = (byte~) main::$17 [phi:main::@6/main::@7->main::@8#0] -- register_copy + //SEG54 [22] phi (byte) main::xd#0 = (byte~) main::$17 [phi:main::@6/main::@7->main::@8#0] -- register_copy jmp b8 - //SEG53 main::@8 + //SEG55 main::@8 b8: - //SEG54 [23] (byte) sqr::val#1 ← (byte) main::xd#0 - //SEG55 [24] call sqr - //SEG56 [85] phi from main::@8 to sqr [phi:main::@8->sqr] + //SEG56 [23] (byte) sqr::val#1 ← (byte) main::xd#0 + //SEG57 [24] call sqr + //SEG58 [73] phi from main::@8 to sqr [phi:main::@8->sqr] sqr_from_b8: - //SEG57 [85] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:main::@8->sqr#0] -- register_copy + //SEG59 [73] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:main::@8->sqr#0] -- register_copy jsr sqr - //SEG58 [25] (word) sqr::return#3 ← (word) sqr::return#0 - jmp b18 - //SEG59 main::@18 - b18: - //SEG60 [26] (word) main::xds#0 ← (word) sqr::return#3 - //SEG61 [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG60 [25] (word) sqr::return#3 ← (word) sqr::return#0 + jmp b12 + //SEG61 main::@12 + b12: + //SEG62 [26] (word) main::xds#0 ← (word) sqr::return#3 + //SEG63 [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 -- vwuz1=vwuz1_plus_vwuz2 lda ds clc adc yds @@ -3859,192 +3626,98 @@ main: { lda ds+1 adc yds+1 sta ds+1 - //SEG62 [28] (word) sqrt::val#0 ← (word) main::ds#0 - //SEG63 [29] call sqrt + //SEG64 [28] (word) sqrt::val#0 ← (word) main::ds#0 + //SEG65 [29] call sqrt jsr sqrt - //SEG64 [30] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - jmp b19 - //SEG65 main::@19 - b19: - //SEG66 [31] (byte) main::d#0 ← (byte) sqrt::return#2 - //SEG67 [32] *((byte*) main::screen#12) ← (byte) main::d#0 -- _deref_pbuz1=vbuaa - ldy #0 - sta (screen),y - //SEG68 [33] (byte*) main::screen#1 ← ++ (byte*) main::screen#12 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG69 [34] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 + //SEG66 [30] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + jmp b13 + //SEG67 main::@13 + b13: + //SEG68 [31] (byte) main::d#0 ← (byte) sqrt::return#2 + //SEG69 [32] *((byte*) main::screen_topline#10 + (byte) main::x#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG70 [33] *((byte*) main::screen_bottomline#10 + (byte) main::x#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_bottomline),y + //SEG71 [34] *((byte*) main::screen_topline#10 + (byte) main::xb#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG72 [35] *((byte*) main::screen_bottomline#10 + (byte) main::xb#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_bottomline),y + //SEG73 [36] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG70 [35] if((byte) main::x#1!=(byte) $14) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 - lda #$14 - cmp x - bne b5_from_b19 + //SEG74 [37] (byte) main::xb#1 ← -- (byte) main::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG75 [38] if((byte) main::x#1<(byte) $13+(byte) 1) goto main::@5 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b5_from_b13 jmp b9 - //SEG71 main::@9 + //SEG76 main::@9 b9: - //SEG72 [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 -- pbuz1=pbuz2 - lda screen - sta screen_mirror1 - lda screen+1 - sta screen_mirror1+1 - //SEG73 [37] phi from main::@9 to main::@10 [phi:main::@9->main::@10] - b10_from_b9: - //SEG74 [37] phi (byte) main::x1#2 = (byte) 0 [phi:main::@9->main::@10#0] -- vbuxx=vbuc1 - ldx #0 - //SEG75 [37] phi (byte*) main::screen#6 = (byte*) main::screen#1 [phi:main::@9->main::@10#1] -- register_copy - //SEG76 [37] phi (byte*) main::screen_mirror1#2 = (byte*~) main::screen_mirror1#3 [phi:main::@9->main::@10#2] -- register_copy - jmp b10 - //SEG77 [37] phi from main::@10 to main::@10 [phi:main::@10->main::@10] - b10_from_b10: - //SEG78 [37] phi (byte) main::x1#2 = (byte) main::x1#1 [phi:main::@10->main::@10#0] -- register_copy - //SEG79 [37] phi (byte*) main::screen#6 = (byte*) main::screen#10 [phi:main::@10->main::@10#1] -- register_copy - //SEG80 [37] phi (byte*) main::screen_mirror1#2 = (byte*) main::screen_mirror1#1 [phi:main::@10->main::@10#2] -- register_copy - jmp b10 - //SEG81 main::@10 - b10: - //SEG82 [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 -- pbuz1=_dec_pbuz1 - lda screen_mirror1 - bne !+ - dec screen_mirror1+1 + //SEG77 [39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 !: - dec screen_mirror1 - //SEG83 [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (screen_mirror1),y - ldy #0 - sta (screen),y - //SEG84 [40] (byte*) main::screen#10 ← ++ (byte*) main::screen#6 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG85 [41] (byte) main::x1#1 ← ++ (byte) main::x1#2 -- vbuxx=_inc_vbuxx - inx - //SEG86 [42] if((byte) main::x1#1!=(byte) $14) goto main::@10 -- vbuxx_neq_vbuc1_then_la1 - cpx #$14 - bne b10_from_b10 - jmp b11 - //SEG87 main::@11 - b11: - //SEG88 [43] (byte) main::y#1 ← ++ (byte) main::y#12 -- vbuz1=_inc_vbuz1 - inc y - //SEG89 [44] if((byte) main::y#1!=(byte) $d) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$d - cmp y - bne b1_from_b11 - jmp b12 - //SEG90 main::@12 - b12: - //SEG91 [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 -- pbuz1=pbuz2_minus_vwuc1 - lda screen + //SEG78 [40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_bottomline sec sbc #<$28 - sta screen_mirror - lda screen+1 + sta screen_bottomline + lda screen_bottomline+1 sbc #>$28 - sta screen_mirror+1 - //SEG92 [46] phi from main::@12 to main::@13 [phi:main::@12->main::@13] - b13_from_b12: - //SEG93 [46] phi (byte) main::y1#4 = (byte) 0 [phi:main::@12->main::@13#0] -- vbuz1=vbuc1 - lda #0 - sta y1 - //SEG94 [46] phi (byte*) main::screen#11 = (byte*) main::screen#10 [phi:main::@12->main::@13#1] -- register_copy - //SEG95 [46] phi (byte*) main::screen_mirror#3 = (byte*) main::screen_mirror#0 [phi:main::@12->main::@13#2] -- register_copy - jmp b13 - //SEG96 [46] phi from main::@15 to main::@13 [phi:main::@15->main::@13] - b13_from_b15: - //SEG97 [46] phi (byte) main::y1#4 = (byte) main::y1#1 [phi:main::@15->main::@13#0] -- register_copy - //SEG98 [46] phi (byte*) main::screen#11 = (byte*) main::screen#13 [phi:main::@15->main::@13#1] -- register_copy - //SEG99 [46] phi (byte*) main::screen_mirror#3 = (byte*) main::screen_mirror#1 [phi:main::@15->main::@13#2] -- register_copy - jmp b13 - //SEG100 main::@13 - b13: - //SEG101 [47] phi from main::@13 to main::@14 [phi:main::@13->main::@14] - b14_from_b13: - //SEG102 [47] phi (byte) main::x3#2 = (byte) 0 [phi:main::@13->main::@14#0] -- vbuxx=vbuc1 - ldx #0 - //SEG103 [47] phi (byte*) main::screen#8 = (byte*) main::screen#11 [phi:main::@13->main::@14#1] -- register_copy - //SEG104 [47] phi (byte*) main::screen_mirror#2 = (byte*) main::screen_mirror#3 [phi:main::@13->main::@14#2] -- register_copy - jmp b14 - //SEG105 [47] phi from main::@14 to main::@14 [phi:main::@14->main::@14] - b14_from_b14: - //SEG106 [47] phi (byte) main::x3#2 = (byte) main::x3#1 [phi:main::@14->main::@14#0] -- register_copy - //SEG107 [47] phi (byte*) main::screen#8 = (byte*) main::screen#13 [phi:main::@14->main::@14#1] -- register_copy - //SEG108 [47] phi (byte*) main::screen_mirror#2 = (byte*) main::screen_mirror#1 [phi:main::@14->main::@14#2] -- register_copy - jmp b14 - //SEG109 main::@14 - b14: - //SEG110 [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 -- pbuz1=_dec_pbuz1 - lda screen_mirror - bne !+ - dec screen_mirror+1 - !: - dec screen_mirror - //SEG111 [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (screen_mirror),y - ldy #0 - sta (screen),y - //SEG112 [50] (byte*) main::screen#13 ← ++ (byte*) main::screen#8 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG113 [51] (byte) main::x3#1 ← ++ (byte) main::x3#2 -- vbuxx=_inc_vbuxx - inx - //SEG114 [52] if((byte) main::x3#1!=(byte) $28) goto main::@14 -- vbuxx_neq_vbuc1_then_la1 - cpx #$28 - bne b14_from_b14 - jmp b15 - //SEG115 main::@15 - b15: - //SEG116 [53] (byte) main::y1#1 ← ++ (byte) main::y1#4 -- vbuz1=_inc_vbuz1 - inc y1 - //SEG117 [54] if((byte) main::y1#1!=(byte) $c) goto main::@13 -- vbuz1_neq_vbuc1_then_la1 - lda #$c - cmp y1 - bne b13_from_b15 + sta screen_bottomline+1 + //SEG79 [41] (byte) main::y#1 ← ++ (byte) main::y#10 -- vbuz1=_inc_vbuz1 + inc y + //SEG80 [42] if((byte) main::y#1!=(byte) $d) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1_from_b9 jmp breturn - //SEG118 main::@return + //SEG81 main::@return breturn: - //SEG119 [55] return + //SEG82 [43] return rts - //SEG120 main::@6 + //SEG83 main::@6 b6: - //SEG121 [56] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 + //SEG84 [44] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$27 jmp b8_from_b6 - //SEG122 main::@2 + //SEG85 main::@2 b2: - //SEG123 [57] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 + //SEG86 [45] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$18 jmp b4_from_b2 } -//SEG124 sqrt +//SEG87 sqrt // 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($1e) val) +// sqrt(word zeropage($1b) val) sqrt: { - .label _1 = $d - .label _3 = $d - .label found = $d - .label val = $1e - //SEG125 [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - //SEG126 [59] call bsearch16u - //SEG127 [66] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + .label _1 = $a + .label _3 = $a + .label found = $a + .label val = $1b + //SEG88 [46] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + //SEG89 [47] call bsearch16u + //SEG90 [54] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] bsearch16u_from_sqrt: jsr bsearch16u - //SEG128 [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + //SEG91 [48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 jmp b1 - //SEG129 sqrt::@1 + //SEG92 sqrt::@1 b1: - //SEG130 [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - //SEG131 [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 + //SEG93 [49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + //SEG94 [50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 lda _3 sec sbc #SQUARES sta _3+1 - //SEG132 [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG95 [51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr _1+1 ror _1 - //SEG133 [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 + //SEG96 [52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 lda _1 jmp breturn - //SEG134 sqrt::@return + //SEG97 sqrt::@return breturn: - //SEG135 [65] return + //SEG98 [53] return rts } -//SEG136 bsearch16u +//SEG99 bsearch16u // 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($1e) key, word* zeropage($d) items, byte register(X) num) +// bsearch16u(word zeropage($1b) key, word* zeropage($a) items, byte register(X) num) bsearch16u: { - .label _2 = $d - .label pivot = $20 - .label result = $22 - .label return = $d - .label items = $d - .label key = $1e - //SEG137 [67] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + .label _2 = $a + .label pivot = $1d + .label result = $1f + .label return = $a + .label items = $a + .label key = $1b + //SEG100 [55] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] b3_from_bsearch16u: - //SEG138 [67] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + //SEG101 [55] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 lda #SQUARES sta items+1 - //SEG139 [67] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#1 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + //SEG102 [55] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#1 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES jmp b3 - //SEG140 bsearch16u::@3 + //SEG103 bsearch16u::@3 b3: - //SEG141 [68] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + //SEG104 [56] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 cpx #0 bne b4 jmp b5 - //SEG142 bsearch16u::@5 + //SEG105 bsearch16u::@5 b5: - //SEG143 [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + //SEG106 [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -4107,9 +3780,9 @@ bsearch16u: { !: bcc b2_from_b5 jmp b1 - //SEG144 bsearch16u::@1 + //SEG107 bsearch16u::@1 b1: - //SEG145 [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + //SEG108 [58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -4117,37 +3790,37 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - //SEG146 [71] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG109 [59] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] b2_from_b1: b2_from_b5: - //SEG147 [71] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG110 [59] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy jmp b2 - //SEG148 bsearch16u::@2 + //SEG111 bsearch16u::@2 b2: - //SEG149 [72] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG112 [60] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] breturn_from_b2: breturn_from_b8: - //SEG150 [72] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG113 [60] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy jmp breturn - //SEG151 bsearch16u::@return + //SEG114 bsearch16u::@return breturn: - //SEG152 [73] return + //SEG115 [61] return rts - //SEG153 bsearch16u::@4 + //SEG116 bsearch16u::@4 b4: - //SEG154 [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + //SEG117 [62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr - //SEG155 [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG118 [63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG156 [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + //SEG119 [64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc adc items sta pivot lda #0 adc items+1 sta pivot+1 - //SEG157 [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG120 [65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -4157,23 +3830,23 @@ bsearch16u: { iny sbc (pivot),y sta result+1 - //SEG158 [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + //SEG121 [66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 lda result+1 bne b6 lda result bne b6 jmp b8 - //SEG159 bsearch16u::@8 + //SEG122 bsearch16u::@8 b8: - //SEG160 [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + //SEG123 [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 lda pivot sta return lda pivot+1 sta return+1 jmp breturn_from_b8 - //SEG161 bsearch16u::@6 + //SEG124 bsearch16u::@6 b6: - //SEG162 [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + //SEG125 [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 lda result+1 bmi b7_from_b6 bne !+ @@ -4181,9 +3854,9 @@ bsearch16u: { beq b7_from_b6 !: jmp b9 - //SEG163 bsearch16u::@9 + //SEG126 bsearch16u::@9 b9: - //SEG164 [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + //SEG127 [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 lda #1*SIZEOF_WORD clc adc pivot @@ -4191,88 +3864,88 @@ bsearch16u: { lda #0 adc pivot+1 sta items+1 - //SEG165 [82] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + //SEG128 [70] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx dex - //SEG166 [83] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG129 [71] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] b7_from_b6: b7_from_b9: - //SEG167 [83] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG168 [83] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG130 [71] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG131 [71] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy jmp b7 - //SEG169 bsearch16u::@7 + //SEG132 bsearch16u::@7 b7: - //SEG170 [84] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + //SEG133 [72] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - //SEG171 [67] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG134 [55] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] b3_from_b7: - //SEG172 [67] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG173 [67] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG135 [55] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG136 [55] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy jmp b3 } -//SEG174 sqr +//SEG137 sqr // 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 = $1e - .label return_2 = $1c - //SEG175 [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $1b + .label return_2 = $19 + //SEG138 [74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG176 [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa + //SEG139 [75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa tay lda SQUARES,y sta return lda SQUARES+1,y sta return+1 jmp breturn - //SEG177 sqr::@return + //SEG140 sqr::@return breturn: - //SEG178 [88] return + //SEG141 [76] return rts } -//SEG179 init_squares +//SEG142 init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $11 - .label sqr = $f - //SEG180 [90] call malloc - //SEG181 [100] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $e + .label sqr = $c + //SEG143 [78] call malloc + //SEG144 [88] phi from init_squares to malloc [phi:init_squares->malloc] malloc_from_init_squares: jsr malloc - //SEG182 [91] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + //SEG145 [79] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] b1_from_init_squares: - //SEG183 [91] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 + //SEG146 [79] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG184 [91] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + //SEG147 [79] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #SQUARES sta squares+1 - //SEG185 [91] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG148 [79] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 lda #0 sta sqr lda #0 sta sqr+1 jmp b1 - //SEG186 [91] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG149 [79] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] b1_from_b1: - //SEG187 [91] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG188 [91] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG189 [91] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG150 [79] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG151 [79] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG152 [79] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy jmp b1 - //SEG190 init_squares::@1 + //SEG153 init_squares::@1 b1: - //SEG191 [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + //SEG154 [80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - //SEG192 [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + //SEG155 [81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -4280,116 +3953,116 @@ init_squares: { bcc !+ inc squares+1 !: - //SEG193 [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + //SEG156 [82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - //SEG194 [95] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + //SEG157 [83] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - //SEG195 [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + //SEG158 [84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - //SEG196 [97] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + //SEG159 [85] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - //SEG197 [98] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG160 [86] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1_from_b1 jmp breturn - //SEG198 init_squares::@return + //SEG161 init_squares::@return breturn: - //SEG199 [99] return + //SEG162 [87] return rts } -//SEG200 malloc +//SEG163 malloc // 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 jmp breturn - //SEG201 malloc::@return + //SEG164 malloc::@return breturn: - //SEG202 [101] return + //SEG165 [89] return rts } -//SEG203 init_font_hex +//SEG166 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($16) charset) +// init_font_hex(byte* zeropage($13) charset) init_font_hex: { - .label _0 = $24 - .label idx = $1b - .label proto_lo = $18 - .label charset = $16 - .label c1 = $1a - .label proto_hi = $13 - .label c = $15 - //SEG204 [103] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + .label _0 = $21 + .label idx = $18 + .label proto_lo = $15 + .label charset = $13 + .label c1 = $17 + .label proto_hi = $10 + .label c = $12 + //SEG167 [91] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] b1_from_init_font_hex: - //SEG205 [103] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + //SEG168 [91] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG206 [103] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + //SEG169 [91] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG207 [103] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG170 [91] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta charset+1 jmp b1 - //SEG208 [103] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG171 [91] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] b1_from_b5: - //SEG209 [103] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - //SEG210 [103] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - //SEG211 [103] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + //SEG172 [91] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + //SEG173 [91] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + //SEG174 [91] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp b1 - //SEG212 init_font_hex::@1 + //SEG175 init_font_hex::@1 b1: - //SEG213 [104] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG176 [92] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] b2_from_b1: - //SEG214 [104] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG177 [92] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - //SEG215 [104] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + //SEG178 [92] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG216 [104] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + //SEG179 [92] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG217 [104] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG180 [92] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] b2_from_b4: - //SEG218 [104] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - //SEG219 [104] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - //SEG220 [104] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + //SEG181 [92] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + //SEG182 [92] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + //SEG183 [92] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp b2 - //SEG221 init_font_hex::@2 + //SEG184 init_font_hex::@2 b2: - //SEG222 [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG185 [93] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y - //SEG223 [106] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG186 [94] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] b3_from_b2: - //SEG224 [106] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG187 [94] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - //SEG225 [106] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG188 [94] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - //SEG226 [106] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG189 [94] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] b3_from_b3: - //SEG227 [106] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - //SEG228 [106] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + //SEG190 [94] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + //SEG191 [94] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp b3 - //SEG229 init_font_hex::@3 + //SEG192 init_font_hex::@3 b3: - //SEG230 [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 + //SEG193 [95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y @@ -4398,37 +4071,37 @@ init_font_hex: { asl asl sta _0 - //SEG231 [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 + //SEG194 [96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl - //SEG232 [109] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG195 [97] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG233 [110] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG196 [98] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy idx sta (charset),y - //SEG234 [111] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG197 [99] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG235 [112] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG198 [100] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG236 [113] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG199 [101] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3_from_b3 jmp b4 - //SEG237 init_font_hex::@4 + //SEG200 init_font_hex::@4 b4: - //SEG238 [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG201 [102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - //SEG239 [115] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG202 [103] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy idx iny - //SEG240 [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG203 [104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y - //SEG241 [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG204 [105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -4436,7 +4109,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG242 [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG205 [106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -4444,16 +4117,16 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG243 [119] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG206 [107] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG244 [120] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG207 [108] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2_from_b4 jmp b5 - //SEG245 init_font_hex::@5 + //SEG208 init_font_hex::@5 b5: - //SEG246 [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG209 [109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -4461,19 +4134,19 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG247 [122] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG210 [110] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG248 [123] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG211 [111] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1_from_b5 jmp breturn - //SEG249 init_font_hex::@return + //SEG212 init_font_hex::@return breturn: - //SEG250 [124] return + //SEG213 [112] return rts } -//SEG251 File Data +//SEG214 File Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 @@ -4481,23 +4154,17 @@ ASSEMBLER OPTIMIZATIONS Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp toD0181 -Removing instruction jmp b16 +Removing instruction jmp b10 Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b4 -Removing instruction jmp b17 +Removing instruction jmp b11 Removing instruction jmp b5 Removing instruction jmp b7 Removing instruction jmp b8 -Removing instruction jmp b18 -Removing instruction jmp b19 -Removing instruction jmp b9 -Removing instruction jmp b10 -Removing instruction jmp b11 Removing instruction jmp b12 Removing instruction jmp b13 -Removing instruction jmp b14 -Removing instruction jmp b15 +Removing instruction jmp b9 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn @@ -4520,8 +4187,8 @@ Removing instruction jmp b4 Removing instruction jmp b5 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination -Removing instruction ldy #0 -Removing instruction ldy #0 +Removing instruction ldy x +Removing instruction ldy xb Removing instruction lda result+1 Replacing instruction lda #0 with TXA Removing instruction lda #0 @@ -4529,11 +4196,8 @@ Replacing instruction ldy #0 with TAY Removing instruction ldy idx Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination -Replacing label b5_from_b19 with b5 -Replacing label b10_from_b10 with b10 -Replacing label b1_from_b11 with b1 -Replacing label b14_from_b14 with b14 -Replacing label b13_from_b15 with b13 +Replacing label b5_from_b13 with b5 +Replacing label b1_from_b9 with b1 Replacing label b8_from_b6 with b8 Replacing label b4_from_b2 with b4 Replacing label b2_from_b5 with b2 @@ -4551,19 +4215,15 @@ Removing instruction main_from_b1: Removing instruction bend_from_b1: Removing instruction toD0181_from_main: Removing instruction toD0181: -Removing instruction b1_from_b11: +Removing instruction b1_from_b9: Removing instruction b4_from_b2: Removing instruction b4_from_b3: Removing instruction sqr_from_b4: -Removing instruction b5_from_b17: -Removing instruction b5_from_b19: +Removing instruction b5_from_b11: +Removing instruction b5_from_b13: Removing instruction b8_from_b6: Removing instruction b8_from_b7: Removing instruction sqr_from_b8: -Removing instruction b10_from_b10: -Removing instruction b13_from_b15: -Removing instruction b14_from_b13: -Removing instruction b14_from_b14: Removing instruction b2_from_b1: Removing instruction b2_from_b5: Removing instruction breturn_from_b2: @@ -4579,20 +4239,15 @@ Removing instruction b3_from_b3: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: Removing instruction init_font_hex_from_main: -Removing instruction b16: -Removing instruction init_squares_from_b16: -Removing instruction b1_from_b16: +Removing instruction b10: +Removing instruction init_squares_from_b10: +Removing instruction b1_from_b10: Removing instruction b3: -Removing instruction b17: -Removing instruction b7: -Removing instruction b18: -Removing instruction b19: -Removing instruction b9: -Removing instruction b10_from_b9: Removing instruction b11: +Removing instruction b7: Removing instruction b12: -Removing instruction b13_from_b12: -Removing instruction b15: +Removing instruction b13: +Removing instruction b9: Removing instruction breturn: Removing instruction bsearch16u_from_sqrt: Removing instruction b1: @@ -4621,9 +4276,6 @@ Replacing jump to rts with rts in jmp b2 Succesful ASM optimization Pass5DoubleJumpElimination Removing instruction jmp b1 Removing instruction jmp b5 -Removing instruction jmp b10 -Removing instruction jmp b13 -Removing instruction jmp b14 Removing instruction jmp b1 Removing instruction jmp b1 Removing instruction jmp b2 @@ -4631,9 +4283,6 @@ Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [37] bcs b2 to bcc -Fixing long branch [55] bcs b6 to bcc -Fixing long branch [105] bne b1 to beq FINAL SYMBOL TABLE (label) @1 @@ -4656,7 +4305,7 @@ FINAL SYMBOL TABLE (const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:13 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:10 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 (label) bsearch16u::@2 @@ -4669,28 +4318,28 @@ FINAL SYMBOL TABLE (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:13 1001.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:13 334.33333333333337 -(word*) bsearch16u::items#8 items zp ZP_WORD:13 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:10 1001.0 +(word*) bsearch16u::items#2 items zp ZP_WORD:10 334.33333333333337 +(word*) bsearch16u::items#8 items zp ZP_WORD:10 1501.5 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:30 0.2857142857142857 +(word) bsearch16u::key#0 key zp ZP_WORD:27 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:32 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:29 501.0 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:34 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:31 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:13 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:13 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:13 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:13 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:10 2.0 +(word*) bsearch16u::return#2 return zp ZP_WORD:10 6.0 +(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_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:36 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:33 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 (byte~) init_font_hex::$2 reg byte a 2002.0 (label) init_font_hex::@1 @@ -4700,28 +4349,28 @@ FINAL SYMBOL TABLE (label) init_font_hex::@5 (label) init_font_hex::@return (byte) init_font_hex::c -(byte) init_font_hex::c#1 c zp ZP_BYTE:21 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:21 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:18 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:18 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:26 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:26 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:23 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:23 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:22 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:22 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:22 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:19 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:19 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:19 22.0 (byte) init_font_hex::i (byte) init_font_hex::i#1 reg byte x 1501.5 (byte) init_font_hex::i#2 reg byte x 667.3333333333334 (byte) init_font_hex::idx -(byte) init_font_hex::idx#2 idx zp ZP_BYTE:27 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:27 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:19 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:19 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:16 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:16 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:24 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:24 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:21 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:21 92.53846153846155 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -4731,11 +4380,11 @@ FINAL SYMBOL TABLE (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:15 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:15 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:12 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:12 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#1 squares zp ZP_WORD:17 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:17 16.5 +(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 @@ -4746,12 +4395,6 @@ FINAL SYMBOL TABLE (label) main::@11 (label) main::@12 (label) main::@13 -(label) main::@14 -(label) main::@15 -(label) main::@16 -(label) main::@17 -(label) main::@18 -(label) main::@19 (label) main::@2 (label) main::@3 (label) main::@4 @@ -4762,27 +4405,15 @@ FINAL SYMBOL TABLE (label) main::@9 (label) main::@return (byte) main::d -(byte) main::d#0 reg byte a 202.0 +(byte) main::d#0 reg byte a 126.25 (word) main::ds -(word) main::ds#0 ds zp ZP_WORD:30 202.0 -(byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:11 56.0 -(byte*) main::screen#10 screen zp ZP_WORD:11 36.16666666666667 -(byte*) main::screen#11 screen zp ZP_WORD:11 24.0 -(byte*) main::screen#12 screen zp ZP_WORD:11 19.625 -(byte*) main::screen#13 screen zp ZP_WORD:11 42.599999999999994 -(byte*) main::screen#17 screen zp ZP_WORD:11 2.2 -(byte*) main::screen#6 screen zp ZP_WORD:11 104.66666666666666 -(byte*) main::screen#8 screen zp ZP_WORD:11 104.66666666666666 -(byte*) main::screen_mirror -(byte*) main::screen_mirror#0 screen_mirror zp ZP_WORD:9 4.0 -(byte*) main::screen_mirror#1 screen_mirror zp ZP_WORD:9 44.85714285714286 -(byte*) main::screen_mirror#2 screen_mirror zp ZP_WORD:9 213.0 -(byte*) main::screen_mirror#3 screen_mirror zp ZP_WORD:9 24.0 -(byte*) main::screen_mirror1 -(byte*) main::screen_mirror1#1 screen_mirror1 zp ZP_WORD:4 60.599999999999994 -(byte*) main::screen_mirror1#2 screen_mirror1 zp ZP_WORD:4 213.0 -(byte*~) main::screen_mirror1#3 screen_mirror1 zp ZP_WORD:4 22.0 +(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 @@ -4798,32 +4429,26 @@ FINAL SYMBOL TABLE (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:3 151.5 -(byte) main::x#2 x zp ZP_BYTE:3 17.823529411764707 -(byte) main::x1 -(byte) main::x1#1 reg byte x 151.5 -(byte) main::x1#2 reg byte x 50.5 +(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::x3 -(byte) main::x3#1 reg byte x 151.5 -(byte) main::x3#2 reg byte x 50.5 +(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:30 202.0 +(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#12 y zp ZP_BYTE:2 0.9166666666666667 -(byte) main::y1 -(byte) main::y1#1 y1 zp ZP_BYTE:6 16.5 -(byte) main::y1#4 y1 zp ZP_BYTE:6 3.142857142857143 +(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:28 5.6 +(word) main::yds#0 yds zp ZP_WORD:25 4.869565217391305 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem @@ -4834,72 +4459,69 @@ FINAL SYMBOL TABLE (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:30 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:28 22.0 -(word) sqr::return#3 return zp ZP_WORD:30 202.0 +(word) sqr::return#0 return zp ZP_WORD:27 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:25 22.0 +(word) sqr::return#3 return zp ZP_WORD:27 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:13 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:13 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:10 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:10 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:13 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:10 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:30 103.0 +(word) sqrt::val#0 val zp ZP_WORD:27 103.0 -zp ZP_BYTE:2 [ main::y#12 main::y#1 ] +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:3 [ main::x#2 main::x#1 ] +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_WORD:4 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] -reg byte x [ main::x1#2 main::x1#1 ] -zp ZP_BYTE:6 [ main::y1#4 main::y1#1 ] -zp ZP_WORD:9 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] -zp ZP_WORD:11 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] -reg byte x [ main::x3#2 main::x3#1 ] -zp ZP_WORD:13 [ 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 ] +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 ] -zp ZP_WORD:15 [ init_squares::sqr#2 init_squares::sqr#1 ] -zp ZP_WORD:17 [ init_squares::squares#2 init_squares::squares#1 ] +zp ZP_WORD:12 [ init_squares::sqr#2 init_squares::sqr#1 ] +zp ZP_WORD:14 [ init_squares::squares#2 init_squares::squares#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:21 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:22 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:24 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:26 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +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:27 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] reg byte a [ main::y2#0 ] -zp ZP_WORD:28 [ sqr::return#2 main::yds#0 ] +zp ZP_WORD:25 [ sqr::return#2 main::yds#0 ] reg byte a [ main::x2#0 ] -zp ZP_WORD:30 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 bsearch16u::key#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 [ sqrt::return#2 ] reg byte a [ main::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:32 [ bsearch16u::pivot#0 ] -zp ZP_WORD:34 [ bsearch16u::result#0 ] +zp ZP_WORD:29 [ bsearch16u::pivot#0 ] +zp ZP_WORD:31 [ bsearch16u::result#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] -zp ZP_BYTE:36 [ init_font_hex::$0 ] +zp ZP_BYTE:33 [ init_font_hex::$0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ] FINAL ASSEMBLER -Score: 211236 +Score: 202968 //SEG0 File Comments // Calculate the distance to the center of the screen - and show it using font-hex @@ -4926,106 +4548,109 @@ Score: 211236 //SEG10 main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f - .label yds = $1c - .label xds = $1e - .label ds = $1e - .label screen = $b - .label x = 3 - .label screen_mirror1 = 4 + .label yds = $19 + .label xds = $1b + .label ds = $1b + .label x = 7 + .label xb = 9 + .label screen_topline = 3 + .label screen_bottomline = 5 .label y = 2 - .label screen_mirror = 9 - .label y1 = 6 //SEG11 [5] call init_font_hex - //SEG12 [102] phi from main to init_font_hex [phi:main->init_font_hex] + //SEG12 [90] phi from main to init_font_hex [phi:main->init_font_hex] jsr init_font_hex //SEG13 [6] phi from main to main::toD0181 [phi:main->main::toD0181] //SEG14 main::toD0181 - //SEG15 main::@16 + //SEG15 main::@10 //SEG16 [7] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 //SEG17 [8] call init_squares - //SEG18 [89] phi from main::@16 to init_squares [phi:main::@16->init_squares] + //SEG18 [77] phi from main::@10 to init_squares [phi:main::@10->init_squares] jsr init_squares - //SEG19 [9] phi from main::@16 to main::@1 [phi:main::@16->main::@1] - //SEG20 [9] phi (byte*) main::screen#17 = (const byte*) SCREEN#0 [phi:main::@16->main::@1#0] -- pbuz1=pbuc1 + //SEG19 [9] phi from main::@10 to main::@1 [phi:main::@10->main::@1] + //SEG20 [9] phi (byte*) main::screen_bottomline#10 = (const byte*) SCREEN#0+(word)(number) $28*(number) $18 [phi:main::@10->main::@1#0] -- pbuz1=pbuc1 + lda #SCREEN+$28*$18 + sta screen_bottomline+1 + //SEG21 [9] phi (byte*) main::screen_topline#10 = (const byte*) SCREEN#0 [phi:main::@10->main::@1#1] -- pbuz1=pbuc1 lda #SCREEN - sta screen+1 - //SEG21 [9] phi (byte) main::y#12 = (byte) 0 [phi:main::@16->main::@1#1] -- vbuz1=vbuc1 + sta screen_topline+1 + //SEG22 [9] phi (byte) main::y#10 = (byte) 0 [phi:main::@10->main::@1#2] -- vbuz1=vbuc1 lda #0 sta y - //SEG22 [9] phi from main::@11 to main::@1 [phi:main::@11->main::@1] - //SEG23 [9] phi (byte*) main::screen#17 = (byte*) main::screen#10 [phi:main::@11->main::@1#0] -- register_copy - //SEG24 [9] phi (byte) main::y#12 = (byte) main::y#1 [phi:main::@11->main::@1#1] -- register_copy - //SEG25 main::@1 + //SEG23 [9] phi from main::@9 to main::@1 [phi:main::@9->main::@1] + //SEG24 [9] phi (byte*) main::screen_bottomline#10 = (byte*) main::screen_bottomline#1 [phi:main::@9->main::@1#0] -- register_copy + //SEG25 [9] phi (byte*) main::screen_topline#10 = (byte*) main::screen_topline#1 [phi:main::@9->main::@1#1] -- register_copy + //SEG26 [9] phi (byte) main::y#10 = (byte) main::y#1 [phi:main::@9->main::@1#2] -- register_copy + //SEG27 main::@1 b1: - //SEG26 [10] (byte) main::y2#0 ← (byte) main::y#12 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG28 [10] (byte) main::y2#0 ← (byte) main::y#10 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG27 [11] if((byte) main::y2#0>=(byte) $18) goto main::@2 -- vbuaa_ge_vbuc1_then_la1 + //SEG29 [11] if((byte) main::y2#0>=(byte) $18) goto main::@2 -- vbuaa_ge_vbuc1_then_la1 cmp #$18 - bcc !b2+ - jmp b2 - !b2: - //SEG28 main::@3 - //SEG29 [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 -- vbuaa=vbuc1_minus_vbuaa + bcs b2 + //SEG30 main::@3 + //SEG31 [12] (byte~) main::$7 ← (byte) $18 - (byte) main::y2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$18+1 - //SEG30 [13] phi from main::@2 main::@3 to main::@4 [phi:main::@2/main::@3->main::@4] - //SEG31 [13] phi (byte) main::yd#0 = (byte~) main::$9 [phi:main::@2/main::@3->main::@4#0] -- register_copy - //SEG32 main::@4 + //SEG32 [13] phi from main::@2 main::@3 to main::@4 [phi:main::@2/main::@3->main::@4] + //SEG33 [13] phi (byte) main::yd#0 = (byte~) main::$9 [phi:main::@2/main::@3->main::@4#0] -- register_copy + //SEG34 main::@4 b4: - //SEG33 [14] (byte) sqr::val#0 ← (byte) main::yd#0 - //SEG34 [15] call sqr - //SEG35 [85] phi from main::@4 to sqr [phi:main::@4->sqr] - //SEG36 [85] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:main::@4->sqr#0] -- register_copy + //SEG35 [14] (byte) sqr::val#0 ← (byte) main::yd#0 + //SEG36 [15] call sqr + //SEG37 [73] phi from main::@4 to sqr [phi:main::@4->sqr] + //SEG38 [73] phi (byte) sqr::val#2 = (byte) sqr::val#0 [phi:main::@4->sqr#0] -- register_copy jsr sqr - //SEG37 [16] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 + //SEG39 [16] (word) sqr::return#2 ← (word) sqr::return#0 -- vwuz1=vwuz2 lda sqr.return sta sqr.return_2 lda sqr.return+1 sta sqr.return_2+1 - //SEG38 main::@17 - //SEG39 [17] (word) main::yds#0 ← (word) sqr::return#2 - //SEG40 [18] phi from main::@17 to main::@5 [phi:main::@17->main::@5] - //SEG41 [18] phi (byte*) main::screen#12 = (byte*) main::screen#17 [phi:main::@17->main::@5#0] -- register_copy - //SEG42 [18] phi (byte) main::x#2 = (byte) 0 [phi:main::@17->main::@5#1] -- vbuz1=vbuc1 + //SEG40 main::@11 + //SEG41 [17] (word) main::yds#0 ← (word) sqr::return#2 + //SEG42 [18] phi from main::@11 to main::@5 [phi:main::@11->main::@5] + //SEG43 [18] phi (byte) main::xb#2 = (byte) $27 [phi:main::@11->main::@5#0] -- vbuz1=vbuc1 + lda #$27 + sta xb + //SEG44 [18] phi (byte) main::x#2 = (byte) 0 [phi:main::@11->main::@5#1] -- vbuz1=vbuc1 lda #0 sta x - //SEG43 [18] phi from main::@19 to main::@5 [phi:main::@19->main::@5] - //SEG44 [18] phi (byte*) main::screen#12 = (byte*) main::screen#1 [phi:main::@19->main::@5#0] -- register_copy - //SEG45 [18] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@19->main::@5#1] -- register_copy - //SEG46 main::@5 + //SEG45 [18] phi from main::@13 to main::@5 [phi:main::@13->main::@5] + //SEG46 [18] phi (byte) main::xb#2 = (byte) main::xb#1 [phi:main::@13->main::@5#0] -- register_copy + //SEG47 [18] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@13->main::@5#1] -- register_copy + //SEG48 main::@5 b5: - //SEG47 [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG49 [19] (byte) main::x2#0 ← (byte) main::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG48 [20] if((byte) main::x2#0>=(byte) $27) goto main::@6 -- vbuaa_ge_vbuc1_then_la1 + //SEG50 [20] if((byte) main::x2#0>=(byte) $27) goto main::@6 -- vbuaa_ge_vbuc1_then_la1 cmp #$27 - bcc !b6+ - jmp b6 - !b6: - //SEG49 main::@7 - //SEG50 [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 -- vbuaa=vbuc1_minus_vbuaa + bcs b6 + //SEG51 main::@7 + //SEG52 [21] (byte~) main::$15 ← (byte) $27 - (byte) main::x2#0 -- vbuaa=vbuc1_minus_vbuaa eor #$ff clc adc #$27+1 - //SEG51 [22] phi from main::@6 main::@7 to main::@8 [phi:main::@6/main::@7->main::@8] - //SEG52 [22] phi (byte) main::xd#0 = (byte~) main::$17 [phi:main::@6/main::@7->main::@8#0] -- register_copy - //SEG53 main::@8 + //SEG53 [22] phi from main::@6 main::@7 to main::@8 [phi:main::@6/main::@7->main::@8] + //SEG54 [22] phi (byte) main::xd#0 = (byte~) main::$17 [phi:main::@6/main::@7->main::@8#0] -- register_copy + //SEG55 main::@8 b8: - //SEG54 [23] (byte) sqr::val#1 ← (byte) main::xd#0 - //SEG55 [24] call sqr - //SEG56 [85] phi from main::@8 to sqr [phi:main::@8->sqr] - //SEG57 [85] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:main::@8->sqr#0] -- register_copy + //SEG56 [23] (byte) sqr::val#1 ← (byte) main::xd#0 + //SEG57 [24] call sqr + //SEG58 [73] phi from main::@8 to sqr [phi:main::@8->sqr] + //SEG59 [73] phi (byte) sqr::val#2 = (byte) sqr::val#1 [phi:main::@8->sqr#0] -- register_copy jsr sqr - //SEG58 [25] (word) sqr::return#3 ← (word) sqr::return#0 - //SEG59 main::@18 - //SEG60 [26] (word) main::xds#0 ← (word) sqr::return#3 - //SEG61 [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG60 [25] (word) sqr::return#3 ← (word) sqr::return#0 + //SEG61 main::@12 + //SEG62 [26] (word) main::xds#0 ← (word) sqr::return#3 + //SEG63 [27] (word) main::ds#0 ← (word) main::xds#0 + (word) main::yds#0 -- vwuz1=vwuz1_plus_vwuz2 lda ds clc adc yds @@ -5033,165 +4658,87 @@ main: { lda ds+1 adc yds+1 sta ds+1 - //SEG62 [28] (word) sqrt::val#0 ← (word) main::ds#0 - //SEG63 [29] call sqrt + //SEG64 [28] (word) sqrt::val#0 ← (word) main::ds#0 + //SEG65 [29] call sqrt jsr sqrt - //SEG64 [30] (byte) sqrt::return#2 ← (byte) sqrt::return#0 - //SEG65 main::@19 - //SEG66 [31] (byte) main::d#0 ← (byte) sqrt::return#2 - //SEG67 [32] *((byte*) main::screen#12) ← (byte) main::d#0 -- _deref_pbuz1=vbuaa - ldy #0 - sta (screen),y - //SEG68 [33] (byte*) main::screen#1 ← ++ (byte*) main::screen#12 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG69 [34] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 + //SEG66 [30] (byte) sqrt::return#2 ← (byte) sqrt::return#0 + //SEG67 main::@13 + //SEG68 [31] (byte) main::d#0 ← (byte) sqrt::return#2 + //SEG69 [32] *((byte*) main::screen_topline#10 + (byte) main::x#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy x + sta (screen_topline),y + //SEG70 [33] *((byte*) main::screen_bottomline#10 + (byte) main::x#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_bottomline),y + //SEG71 [34] *((byte*) main::screen_topline#10 + (byte) main::xb#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + ldy xb + sta (screen_topline),y + //SEG72 [35] *((byte*) main::screen_bottomline#10 + (byte) main::xb#2) ← (byte) main::d#0 -- pbuz1_derefidx_vbuz2=vbuaa + sta (screen_bottomline),y + //SEG73 [36] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG70 [35] if((byte) main::x#1!=(byte) $14) goto main::@5 -- vbuz1_neq_vbuc1_then_la1 - lda #$14 - cmp x - bne b5 - //SEG71 main::@9 - //SEG72 [36] (byte*~) main::screen_mirror1#3 ← (byte*) main::screen#1 -- pbuz1=pbuz2 - lda screen - sta screen_mirror1 - lda screen+1 - sta screen_mirror1+1 - //SEG73 [37] phi from main::@9 to main::@10 [phi:main::@9->main::@10] - //SEG74 [37] phi (byte) main::x1#2 = (byte) 0 [phi:main::@9->main::@10#0] -- vbuxx=vbuc1 - ldx #0 - //SEG75 [37] phi (byte*) main::screen#6 = (byte*) main::screen#1 [phi:main::@9->main::@10#1] -- register_copy - //SEG76 [37] phi (byte*) main::screen_mirror1#2 = (byte*~) main::screen_mirror1#3 [phi:main::@9->main::@10#2] -- register_copy - //SEG77 [37] phi from main::@10 to main::@10 [phi:main::@10->main::@10] - //SEG78 [37] phi (byte) main::x1#2 = (byte) main::x1#1 [phi:main::@10->main::@10#0] -- register_copy - //SEG79 [37] phi (byte*) main::screen#6 = (byte*) main::screen#10 [phi:main::@10->main::@10#1] -- register_copy - //SEG80 [37] phi (byte*) main::screen_mirror1#2 = (byte*) main::screen_mirror1#1 [phi:main::@10->main::@10#2] -- register_copy - //SEG81 main::@10 - b10: - //SEG82 [38] (byte*) main::screen_mirror1#1 ← -- (byte*) main::screen_mirror1#2 -- pbuz1=_dec_pbuz1 - lda screen_mirror1 - bne !+ - dec screen_mirror1+1 + //SEG74 [37] (byte) main::xb#1 ← -- (byte) main::xb#2 -- vbuz1=_dec_vbuz1 + dec xb + //SEG75 [38] if((byte) main::x#1<(byte) $13+(byte) 1) goto main::@5 -- vbuz1_lt_vbuc1_then_la1 + lda x + cmp #$13+1 + bcc b5 + //SEG76 main::@9 + //SEG77 [39] (byte*) main::screen_topline#1 ← (byte*) main::screen_topline#10 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + lda #$28 + clc + adc screen_topline + sta screen_topline + bcc !+ + inc screen_topline+1 !: - dec screen_mirror1 - //SEG83 [39] *((byte*) main::screen#6) ← *((byte*) main::screen_mirror1#1) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (screen_mirror1),y - sta (screen),y - //SEG84 [40] (byte*) main::screen#10 ← ++ (byte*) main::screen#6 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG85 [41] (byte) main::x1#1 ← ++ (byte) main::x1#2 -- vbuxx=_inc_vbuxx - inx - //SEG86 [42] if((byte) main::x1#1!=(byte) $14) goto main::@10 -- vbuxx_neq_vbuc1_then_la1 - cpx #$14 - bne b10 - //SEG87 main::@11 - //SEG88 [43] (byte) main::y#1 ← ++ (byte) main::y#12 -- vbuz1=_inc_vbuz1 - inc y - //SEG89 [44] if((byte) main::y#1!=(byte) $d) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$d - cmp y - beq !b1+ - jmp b1 - !b1: - //SEG90 main::@12 - //SEG91 [45] (byte*) main::screen_mirror#0 ← (byte*) main::screen#10 - (byte) $28 -- pbuz1=pbuz2_minus_vwuc1 - lda screen + //SEG78 [40] (byte*) main::screen_bottomline#1 ← (byte*) main::screen_bottomline#10 - (byte) $28 -- pbuz1=pbuz1_minus_vwuc1 + lda screen_bottomline sec sbc #<$28 - sta screen_mirror - lda screen+1 + sta screen_bottomline + lda screen_bottomline+1 sbc #>$28 - sta screen_mirror+1 - //SEG92 [46] phi from main::@12 to main::@13 [phi:main::@12->main::@13] - //SEG93 [46] phi (byte) main::y1#4 = (byte) 0 [phi:main::@12->main::@13#0] -- vbuz1=vbuc1 - lda #0 - sta y1 - //SEG94 [46] phi (byte*) main::screen#11 = (byte*) main::screen#10 [phi:main::@12->main::@13#1] -- register_copy - //SEG95 [46] phi (byte*) main::screen_mirror#3 = (byte*) main::screen_mirror#0 [phi:main::@12->main::@13#2] -- register_copy - //SEG96 [46] phi from main::@15 to main::@13 [phi:main::@15->main::@13] - //SEG97 [46] phi (byte) main::y1#4 = (byte) main::y1#1 [phi:main::@15->main::@13#0] -- register_copy - //SEG98 [46] phi (byte*) main::screen#11 = (byte*) main::screen#13 [phi:main::@15->main::@13#1] -- register_copy - //SEG99 [46] phi (byte*) main::screen_mirror#3 = (byte*) main::screen_mirror#1 [phi:main::@15->main::@13#2] -- register_copy - //SEG100 main::@13 - b13: - //SEG101 [47] phi from main::@13 to main::@14 [phi:main::@13->main::@14] - //SEG102 [47] phi (byte) main::x3#2 = (byte) 0 [phi:main::@13->main::@14#0] -- vbuxx=vbuc1 - ldx #0 - //SEG103 [47] phi (byte*) main::screen#8 = (byte*) main::screen#11 [phi:main::@13->main::@14#1] -- register_copy - //SEG104 [47] phi (byte*) main::screen_mirror#2 = (byte*) main::screen_mirror#3 [phi:main::@13->main::@14#2] -- register_copy - //SEG105 [47] phi from main::@14 to main::@14 [phi:main::@14->main::@14] - //SEG106 [47] phi (byte) main::x3#2 = (byte) main::x3#1 [phi:main::@14->main::@14#0] -- register_copy - //SEG107 [47] phi (byte*) main::screen#8 = (byte*) main::screen#13 [phi:main::@14->main::@14#1] -- register_copy - //SEG108 [47] phi (byte*) main::screen_mirror#2 = (byte*) main::screen_mirror#1 [phi:main::@14->main::@14#2] -- register_copy - //SEG109 main::@14 - b14: - //SEG110 [48] (byte*) main::screen_mirror#1 ← -- (byte*) main::screen_mirror#2 -- pbuz1=_dec_pbuz1 - lda screen_mirror - bne !+ - dec screen_mirror+1 - !: - dec screen_mirror - //SEG111 [49] *((byte*) main::screen#8) ← *((byte*) main::screen_mirror#1) -- _deref_pbuz1=_deref_pbuz2 - ldy #0 - lda (screen_mirror),y - sta (screen),y - //SEG112 [50] (byte*) main::screen#13 ← ++ (byte*) main::screen#8 -- pbuz1=_inc_pbuz1 - inc screen - bne !+ - inc screen+1 - !: - //SEG113 [51] (byte) main::x3#1 ← ++ (byte) main::x3#2 -- vbuxx=_inc_vbuxx - inx - //SEG114 [52] if((byte) main::x3#1!=(byte) $28) goto main::@14 -- vbuxx_neq_vbuc1_then_la1 - cpx #$28 - bne b14 - //SEG115 main::@15 - //SEG116 [53] (byte) main::y1#1 ← ++ (byte) main::y1#4 -- vbuz1=_inc_vbuz1 - inc y1 - //SEG117 [54] if((byte) main::y1#1!=(byte) $c) goto main::@13 -- vbuz1_neq_vbuc1_then_la1 - lda #$c - cmp y1 - bne b13 - //SEG118 main::@return - //SEG119 [55] return + sta screen_bottomline+1 + //SEG79 [41] (byte) main::y#1 ← ++ (byte) main::y#10 -- vbuz1=_inc_vbuz1 + inc y + //SEG80 [42] if((byte) main::y#1!=(byte) $d) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$d + cmp y + bne b1 + //SEG81 main::@return + //SEG82 [43] return rts - //SEG120 main::@6 + //SEG83 main::@6 b6: - //SEG121 [56] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 + //SEG84 [44] (byte~) main::$17 ← (byte) main::x2#0 - (byte) $27 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$27 jmp b8 - //SEG122 main::@2 + //SEG85 main::@2 b2: - //SEG123 [57] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 + //SEG86 [45] (byte~) main::$9 ← (byte) main::y2#0 - (byte) $18 -- vbuaa=vbuaa_minus_vbuc1 sec sbc #$18 jmp b4 } -//SEG124 sqrt +//SEG87 sqrt // 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($1e) val) +// sqrt(word zeropage($1b) val) sqrt: { - .label _1 = $d - .label _3 = $d - .label found = $d - .label val = $1e - //SEG125 [58] (word) bsearch16u::key#0 ← (word) sqrt::val#0 - //SEG126 [59] call bsearch16u - //SEG127 [66] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] + .label _1 = $a + .label _3 = $a + .label found = $a + .label val = $1b + //SEG88 [46] (word) bsearch16u::key#0 ← (word) sqrt::val#0 + //SEG89 [47] call bsearch16u + //SEG90 [54] phi from sqrt to bsearch16u [phi:sqrt->bsearch16u] jsr bsearch16u - //SEG128 [60] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 - //SEG129 sqrt::@1 - //SEG130 [61] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 - //SEG131 [62] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 + //SEG91 [48] (word*) bsearch16u::return#3 ← (word*) bsearch16u::return#1 + //SEG92 sqrt::@1 + //SEG93 [49] (word*) sqrt::found#0 ← (word*) bsearch16u::return#3 + //SEG94 [50] (word~) sqrt::$3 ← (word*) sqrt::found#0 - (const word*) SQUARES#1 -- vwuz1=pwuz1_minus_pwuc1 lda _3 sec sbc #SQUARES sta _3+1 - //SEG132 [63] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG95 [51] (word~) sqrt::$1 ← (word~) sqrt::$3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr _1+1 ror _1 - //SEG133 [64] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 + //SEG96 [52] (byte) sqrt::return#0 ← (byte)(word~) sqrt::$1 -- vbuaa=_byte_vwuz1 lda _1 - //SEG134 sqrt::@return - //SEG135 [65] return + //SEG97 sqrt::@return + //SEG98 [53] return rts } -//SEG136 bsearch16u +//SEG99 bsearch16u // 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($1e) key, word* zeropage($d) items, byte register(X) num) +// bsearch16u(word zeropage($1b) key, word* zeropage($a) items, byte register(X) num) bsearch16u: { - .label _2 = $d - .label pivot = $20 - .label result = $22 - .label return = $d - .label items = $d - .label key = $1e - //SEG137 [67] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] - //SEG138 [67] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 + .label _2 = $a + .label pivot = $1d + .label result = $1f + .label return = $a + .label items = $a + .label key = $1b + //SEG100 [55] phi from bsearch16u to bsearch16u::@3 [phi:bsearch16u->bsearch16u::@3] + //SEG101 [55] phi (word*) bsearch16u::items#2 = (const word*) SQUARES#1 [phi:bsearch16u->bsearch16u::@3#0] -- pwuz1=pwuc1 lda #SQUARES sta items+1 - //SEG139 [67] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#1 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 + //SEG102 [55] phi (byte) bsearch16u::num#3 = (const byte) NUM_SQUARES#1 [phi:bsearch16u->bsearch16u::@3#1] -- vbuxx=vbuc1 ldx #NUM_SQUARES - //SEG140 bsearch16u::@3 + //SEG103 bsearch16u::@3 b3: - //SEG141 [68] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 + //SEG104 [56] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@4 -- vbuxx_gt_0_then_la1 cpx #0 bne b4 - //SEG142 bsearch16u::@5 - //SEG143 [69] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 + //SEG105 bsearch16u::@5 + //SEG106 [57] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@2 -- _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda (items),y cmp key+1 @@ -5247,8 +4794,8 @@ bsearch16u: { beq b2 !: bcc b2 - //SEG144 bsearch16u::@1 - //SEG145 [70] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 + //SEG107 bsearch16u::@1 + //SEG108 [58] (word*~) bsearch16u::$2 ← (word*) bsearch16u::items#2 - (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz1_minus_vwuc1 lda _2 sec sbc #<1*SIZEOF_WORD @@ -5256,30 +4803,30 @@ bsearch16u: { lda _2+1 sbc #>1*SIZEOF_WORD sta _2+1 - //SEG146 [71] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] - //SEG147 [71] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy - //SEG148 bsearch16u::@2 + //SEG109 [59] phi from bsearch16u::@1 bsearch16u::@5 to bsearch16u::@2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2] + //SEG110 [59] phi (word*) bsearch16u::return#2 = (word*~) bsearch16u::$2 [phi:bsearch16u::@1/bsearch16u::@5->bsearch16u::@2#0] -- register_copy + //SEG111 bsearch16u::@2 b2: - //SEG149 [72] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] - //SEG150 [72] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy - //SEG151 bsearch16u::@return - //SEG152 [73] return + //SEG112 [60] phi from bsearch16u::@2 bsearch16u::@8 to bsearch16u::@return [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return] + //SEG113 [60] phi (word*) bsearch16u::return#1 = (word*) bsearch16u::return#2 [phi:bsearch16u::@2/bsearch16u::@8->bsearch16u::@return#0] -- register_copy + //SEG114 bsearch16u::@return + //SEG115 [61] return rts - //SEG153 bsearch16u::@4 + //SEG116 bsearch16u::@4 b4: - //SEG154 [74] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 + //SEG117 [62] (byte~) bsearch16u::$6 ← (byte) bsearch16u::num#3 >> (byte) 1 -- vbuaa=vbuxx_ror_1 txa lsr - //SEG155 [75] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 + //SEG118 [63] (byte~) bsearch16u::$16 ← (byte~) bsearch16u::$6 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG156 [76] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa + //SEG119 [64] (word*) bsearch16u::pivot#0 ← (word*) bsearch16u::items#2 + (byte~) bsearch16u::$16 -- pwuz1=pwuz2_plus_vbuaa clc adc items sta pivot lda #0 adc items+1 sta pivot+1 - //SEG157 [77] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 + //SEG120 [65] (signed word) bsearch16u::result#0 ← (signed word)(word) bsearch16u::key#0 - (signed word)*((word*) bsearch16u::pivot#0) -- vwsz1=vwsz2_minus__deref_pwsz3 sec lda key ldy #0 @@ -5289,28 +4836,28 @@ bsearch16u: { iny sbc (pivot),y sta result+1 - //SEG158 [78] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 + //SEG121 [66] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@6 -- vwsz1_neq_0_then_la1 bne b6 lda result bne b6 - //SEG159 bsearch16u::@8 - //SEG160 [79] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 + //SEG122 bsearch16u::@8 + //SEG123 [67] (word*~) bsearch16u::return#6 ← (word*) bsearch16u::pivot#0 -- pwuz1=pwuz2 lda pivot sta return lda pivot+1 sta return+1 rts - //SEG161 bsearch16u::@6 + //SEG124 bsearch16u::@6 b6: - //SEG162 [80] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 + //SEG125 [68] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@7 -- vwsz1_le_0_then_la1 lda result+1 bmi b7 bne !+ lda result beq b7 !: - //SEG163 bsearch16u::@9 - //SEG164 [81] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 + //SEG126 bsearch16u::@9 + //SEG127 [69] (word*) bsearch16u::items#0 ← (word*) bsearch16u::pivot#0 + (byte) 1*(const byte) SIZEOF_WORD -- pwuz1=pwuz2_plus_vbuc1 lda #1*SIZEOF_WORD clc adc pivot @@ -5318,76 +4865,76 @@ bsearch16u: { lda #0 adc pivot+1 sta items+1 - //SEG165 [82] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx + //SEG128 [70] (byte) bsearch16u::num#1 ← -- (byte) bsearch16u::num#3 -- vbuxx=_dec_vbuxx dex - //SEG166 [83] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] - //SEG167 [83] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy - //SEG168 [83] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy - //SEG169 bsearch16u::@7 + //SEG129 [71] phi from bsearch16u::@6 bsearch16u::@9 to bsearch16u::@7 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7] + //SEG130 [71] phi (word*) bsearch16u::items#8 = (word*) bsearch16u::items#2 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#0] -- register_copy + //SEG131 [71] phi (byte) bsearch16u::num#5 = (byte) bsearch16u::num#3 [phi:bsearch16u::@6/bsearch16u::@9->bsearch16u::@7#1] -- register_copy + //SEG132 bsearch16u::@7 b7: - //SEG170 [84] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + //SEG133 [72] (byte) bsearch16u::num#0 ← (byte) bsearch16u::num#5 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - //SEG171 [67] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] - //SEG172 [67] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy - //SEG173 [67] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy + //SEG134 [55] phi from bsearch16u::@7 to bsearch16u::@3 [phi:bsearch16u::@7->bsearch16u::@3] + //SEG135 [55] phi (word*) bsearch16u::items#2 = (word*) bsearch16u::items#8 [phi:bsearch16u::@7->bsearch16u::@3#0] -- register_copy + //SEG136 [55] phi (byte) bsearch16u::num#3 = (byte) bsearch16u::num#0 [phi:bsearch16u::@7->bsearch16u::@3#1] -- register_copy jmp b3 } -//SEG174 sqr +//SEG137 sqr // 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 = $1e - .label return_2 = $1c - //SEG175 [86] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 + .label return = $1b + .label return_2 = $19 + //SEG138 [74] (byte~) sqr::$0 ← (byte) sqr::val#2 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - //SEG176 [87] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa + //SEG139 [75] (word) sqr::return#0 ← *((const word*) SQUARES#1 + (byte~) sqr::$0) -- vwuz1=pwuc1_derefidx_vbuaa tay lda SQUARES,y sta return lda SQUARES+1,y sta return+1 - //SEG177 sqr::@return - //SEG178 [88] return + //SEG140 sqr::@return + //SEG141 [76] return rts } -//SEG179 init_squares +//SEG142 init_squares // Initialize squares table // Uses iterative formula (x+1)^2 = x^2 + 2*x + 1 init_squares: { - .label squares = $11 - .label sqr = $f - //SEG180 [90] call malloc - //SEG181 [100] phi from init_squares to malloc [phi:init_squares->malloc] + .label squares = $e + .label sqr = $c + //SEG143 [78] call malloc + //SEG144 [88] phi from init_squares to malloc [phi:init_squares->malloc] jsr malloc - //SEG182 [91] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] - //SEG183 [91] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 + //SEG145 [79] phi from init_squares to init_squares::@1 [phi:init_squares->init_squares::@1] + //SEG146 [79] phi (byte) init_squares::i#2 = (byte) 0 [phi:init_squares->init_squares::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG184 [91] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 + //SEG147 [79] phi (word*) init_squares::squares#2 = (const word*) SQUARES#1 [phi:init_squares->init_squares::@1#1] -- pwuz1=pwuc1 lda #SQUARES sta squares+1 - //SEG185 [91] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 + //SEG148 [79] phi (word) init_squares::sqr#2 = (byte) 0 [phi:init_squares->init_squares::@1#2] -- vwuz1=vbuc1 txa sta sqr sta sqr+1 - //SEG186 [91] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] - //SEG187 [91] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy - //SEG188 [91] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy - //SEG189 [91] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy - //SEG190 init_squares::@1 + //SEG149 [79] phi from init_squares::@1 to init_squares::@1 [phi:init_squares::@1->init_squares::@1] + //SEG150 [79] phi (byte) init_squares::i#2 = (byte) init_squares::i#1 [phi:init_squares::@1->init_squares::@1#0] -- register_copy + //SEG151 [79] phi (word*) init_squares::squares#2 = (word*) init_squares::squares#1 [phi:init_squares::@1->init_squares::@1#1] -- register_copy + //SEG152 [79] phi (word) init_squares::sqr#2 = (word) init_squares::sqr#1 [phi:init_squares::@1->init_squares::@1#2] -- register_copy + //SEG153 init_squares::@1 b1: - //SEG191 [92] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 + //SEG154 [80] *((word*) init_squares::squares#2) ← (word) init_squares::sqr#2 -- _deref_pwuz1=vwuz2 ldy #0 lda sqr sta (squares),y iny lda sqr+1 sta (squares),y - //SEG192 [93] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 + //SEG155 [81] (word*) init_squares::squares#1 ← (word*) init_squares::squares#2 + (const byte) SIZEOF_WORD -- pwuz1=pwuz1_plus_vbuc1 lda #SIZEOF_WORD clc adc squares @@ -5395,100 +4942,100 @@ init_squares: { bcc !+ inc squares+1 !: - //SEG193 [94] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + //SEG156 [82] (byte~) init_squares::$3 ← (byte) init_squares::i#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - //SEG194 [95] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 + //SEG157 [83] (byte~) init_squares::$4 ← (byte~) init_squares::$3 + (byte) 1 -- vbuaa=vbuaa_plus_1 clc adc #1 - //SEG195 [96] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa + //SEG158 [84] (word) init_squares::sqr#1 ← (word) init_squares::sqr#2 + (byte~) init_squares::$4 -- vwuz1=vwuz1_plus_vbuaa clc adc sqr sta sqr bcc !+ inc sqr+1 !: - //SEG196 [97] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx + //SEG159 [85] (byte) init_squares::i#1 ← ++ (byte) init_squares::i#2 -- vbuxx=_inc_vbuxx inx - //SEG197 [98] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG160 [86] if((byte) init_squares::i#1!=(const byte) NUM_SQUARES#1-(byte) 1+(byte) 1) goto init_squares::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #NUM_SQUARES-1+1 bne b1 - //SEG198 init_squares::@return - //SEG199 [99] return + //SEG161 init_squares::@return + //SEG162 [87] return rts } -//SEG200 malloc +//SEG163 malloc // 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 - //SEG201 malloc::@return - //SEG202 [101] return + //SEG164 malloc::@return + //SEG165 [89] return rts } -//SEG203 init_font_hex +//SEG166 init_font_hex // Make charset from proto chars -// init_font_hex(byte* zeropage($16) charset) +// init_font_hex(byte* zeropage($13) charset) init_font_hex: { - .label _0 = $24 - .label idx = $1b - .label proto_lo = $18 - .label charset = $16 - .label c1 = $1a - .label proto_hi = $13 - .label c = $15 - //SEG204 [103] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] - //SEG205 [103] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 + .label _0 = $21 + .label idx = $18 + .label proto_lo = $15 + .label charset = $13 + .label c1 = $17 + .label proto_hi = $10 + .label c = $12 + //SEG167 [91] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] + //SEG168 [91] phi (byte) init_font_hex::c#6 = (byte) 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta c - //SEG206 [103] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 + //SEG169 [91] phi (byte*) init_font_hex::proto_hi#6 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_hi+1 - //SEG207 [103] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 + //SEG170 [91] phi (byte*) init_font_hex::charset#5 = (const byte*) CHARSET#0 [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta charset+1 - //SEG208 [103] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] - //SEG209 [103] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy - //SEG210 [103] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy - //SEG211 [103] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy - //SEG212 init_font_hex::@1 + //SEG171 [91] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] + //SEG172 [91] phi (byte) init_font_hex::c#6 = (byte) init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy + //SEG173 [91] phi (byte*) init_font_hex::proto_hi#6 = (byte*) init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy + //SEG174 [91] phi (byte*) init_font_hex::charset#5 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy + //SEG175 init_font_hex::@1 b1: - //SEG213 [104] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] - //SEG214 [104] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 + //SEG176 [92] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] + //SEG177 [92] phi (byte) init_font_hex::c1#4 = (byte) 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta c1 - //SEG215 [104] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 + //SEG178 [92] phi (byte*) init_font_hex::proto_lo#4 = (const byte[]) FONT_HEX_PROTO#0 [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta proto_lo+1 - //SEG216 [104] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy - //SEG217 [104] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] - //SEG218 [104] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy - //SEG219 [104] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy - //SEG220 [104] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy - //SEG221 init_font_hex::@2 + //SEG179 [92] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy + //SEG180 [92] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] + //SEG181 [92] phi (byte) init_font_hex::c1#4 = (byte) init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy + //SEG182 [92] phi (byte*) init_font_hex::proto_lo#4 = (byte*) init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy + //SEG183 [92] phi (byte*) init_font_hex::charset#2 = (byte*) init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy + //SEG184 init_font_hex::@2 b2: - //SEG222 [105] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + //SEG185 [93] *((byte*) init_font_hex::charset#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y - //SEG223 [106] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] - //SEG224 [106] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 + //SEG186 [94] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] + //SEG187 [94] phi (byte) init_font_hex::idx#5 = (byte) 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta idx - //SEG225 [106] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 + //SEG188 [94] phi (byte) init_font_hex::i#2 = (byte) 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG226 [106] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] - //SEG227 [106] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy - //SEG228 [106] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy - //SEG229 init_font_hex::@3 + //SEG189 [94] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] + //SEG190 [94] phi (byte) init_font_hex::idx#5 = (byte) init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy + //SEG191 [94] phi (byte) init_font_hex::i#2 = (byte) init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy + //SEG192 init_font_hex::@3 b3: - //SEG230 [107] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 + //SEG193 [95] (byte~) init_font_hex::$0 ← *((byte*) init_font_hex::proto_hi#6 + (byte) init_font_hex::i#2) << (byte) 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y @@ -5497,33 +5044,33 @@ init_font_hex: { asl asl sta _0 - //SEG231 [108] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 + //SEG194 [96] (byte~) init_font_hex::$1 ← *((byte*) init_font_hex::proto_lo#4 + (byte) init_font_hex::i#2) << (byte) 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl - //SEG232 [109] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa + //SEG195 [97] (byte~) init_font_hex::$2 ← (byte~) init_font_hex::$0 | (byte~) init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora _0 - //SEG233 [110] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa + //SEG196 [98] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#5) ← (byte~) init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy idx sta (charset),y - //SEG234 [111] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 + //SEG197 [99] (byte) init_font_hex::idx#2 ← ++ (byte) init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc idx - //SEG235 [112] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx + //SEG198 [100] (byte) init_font_hex::i#1 ← ++ (byte) init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx - //SEG236 [113] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG199 [101] if((byte) init_font_hex::i#1!=(byte) 5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b3 - //SEG237 init_font_hex::@4 - //SEG238 [114] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG200 init_font_hex::@4 + //SEG201 [102] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#2) ← (byte) 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy idx sta (charset),y - //SEG239 [115] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 + //SEG202 [103] (byte) init_font_hex::idx#3 ← ++ (byte) init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny - //SEG240 [116] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 + //SEG203 [104] *((byte*) init_font_hex::charset#2 + (byte) init_font_hex::idx#3) ← (byte) 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y - //SEG241 [117] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG204 [105] (byte*) init_font_hex::proto_lo#1 ← (byte*) init_font_hex::proto_lo#4 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_lo @@ -5531,7 +5078,7 @@ init_font_hex: { bcc !+ inc proto_lo+1 !: - //SEG242 [118] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + //SEG205 [106] (byte*) init_font_hex::charset#0 ← (byte*) init_font_hex::charset#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc charset @@ -5539,14 +5086,14 @@ init_font_hex: { bcc !+ inc charset+1 !: - //SEG243 [119] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 + //SEG206 [107] (byte) init_font_hex::c1#1 ← ++ (byte) init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc c1 - //SEG244 [120] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG207 [108] if((byte) init_font_hex::c1#1!=(byte) $10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c1 bne b2 - //SEG245 init_font_hex::@5 - //SEG246 [121] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 + //SEG208 init_font_hex::@5 + //SEG209 [109] (byte*) init_font_hex::proto_hi#1 ← (byte*) init_font_hex::proto_hi#6 + (byte) 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc proto_hi @@ -5554,17 +5101,17 @@ init_font_hex: { bcc !+ inc proto_hi+1 !: - //SEG247 [122] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 + //SEG210 [110] (byte) init_font_hex::c#1 ← ++ (byte) init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc c - //SEG248 [123] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG211 [111] if((byte) init_font_hex::c#1!=(byte) $10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp c bne b1 - //SEG249 init_font_hex::@return - //SEG250 [124] return + //SEG212 init_font_hex::@return + //SEG213 [112] return rts } -//SEG251 File Data +//SEG214 File Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 diff --git a/src/test/ref/screen-center-distance.sym b/src/test/ref/screen-center-distance.sym index 239f7e19e..e717ad67c 100644 --- a/src/test/ref/screen-center-distance.sym +++ b/src/test/ref/screen-center-distance.sym @@ -18,7 +18,7 @@ (const word*) SQUARES#1 SQUARES = (word*)(const void*) malloc::return#0 (word*()) bsearch16u((word) bsearch16u::key , (word*) bsearch16u::items , (byte) bsearch16u::num) (byte~) bsearch16u::$16 reg byte a 2002.0 -(word*~) bsearch16u::$2 $2 zp ZP_WORD:13 4.0 +(word*~) bsearch16u::$2 $2 zp ZP_WORD:10 4.0 (byte~) bsearch16u::$6 reg byte a 2002.0 (label) bsearch16u::@1 (label) bsearch16u::@2 @@ -31,28 +31,28 @@ (label) bsearch16u::@9 (label) bsearch16u::@return (word*) bsearch16u::items -(word*) bsearch16u::items#0 items zp ZP_WORD:13 1001.0 -(word*) bsearch16u::items#2 items zp ZP_WORD:13 334.33333333333337 -(word*) bsearch16u::items#8 items zp ZP_WORD:13 1501.5 +(word*) bsearch16u::items#0 items zp ZP_WORD:10 1001.0 +(word*) bsearch16u::items#2 items zp ZP_WORD:10 334.33333333333337 +(word*) bsearch16u::items#8 items zp ZP_WORD:10 1501.5 (word) bsearch16u::key -(word) bsearch16u::key#0 key zp ZP_WORD:30 0.2857142857142857 +(word) bsearch16u::key#0 key zp ZP_WORD:27 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:32 501.0 +(word*) bsearch16u::pivot#0 pivot zp ZP_WORD:29 501.0 (signed word) bsearch16u::result -(signed word) bsearch16u::result#0 result zp ZP_WORD:34 1501.5 +(signed word) bsearch16u::result#0 result zp ZP_WORD:31 1501.5 (word*) bsearch16u::return -(word*) bsearch16u::return#1 return zp ZP_WORD:13 2.0 -(word*) bsearch16u::return#2 return zp ZP_WORD:13 6.0 -(word*) bsearch16u::return#3 return zp ZP_WORD:13 4.0 -(word*~) bsearch16u::return#6 return zp ZP_WORD:13 4.0 +(word*) bsearch16u::return#1 return zp ZP_WORD:10 2.0 +(word*) bsearch16u::return#2 return zp ZP_WORD:10 6.0 +(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_font_hex((byte*) init_font_hex::charset) -(byte~) init_font_hex::$0 $0 zp ZP_BYTE:36 1001.0 +(byte~) init_font_hex::$0 $0 zp ZP_BYTE:33 1001.0 (byte~) init_font_hex::$1 reg byte a 2002.0 (byte~) init_font_hex::$2 reg byte a 2002.0 (label) init_font_hex::@1 @@ -62,28 +62,28 @@ (label) init_font_hex::@5 (label) init_font_hex::@return (byte) init_font_hex::c -(byte) init_font_hex::c#1 c zp ZP_BYTE:21 16.5 -(byte) init_font_hex::c#6 c zp ZP_BYTE:21 1.1578947368421053 +(byte) init_font_hex::c#1 c zp ZP_BYTE:18 16.5 +(byte) init_font_hex::c#6 c zp ZP_BYTE:18 1.1578947368421053 (byte) init_font_hex::c1 -(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:26 151.5 -(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:26 13.466666666666667 +(byte) init_font_hex::c1#1 c1 zp ZP_BYTE:23 151.5 +(byte) init_font_hex::c1#4 c1 zp ZP_BYTE:23 13.466666666666667 (byte*) init_font_hex::charset -(byte*) init_font_hex::charset#0 charset zp ZP_WORD:22 35.5 -(byte*) init_font_hex::charset#2 charset zp ZP_WORD:22 108.35714285714285 -(byte*) init_font_hex::charset#5 charset zp ZP_WORD:22 22.0 +(byte*) init_font_hex::charset#0 charset zp ZP_WORD:19 35.5 +(byte*) init_font_hex::charset#2 charset zp ZP_WORD:19 108.35714285714285 +(byte*) init_font_hex::charset#5 charset zp ZP_WORD:19 22.0 (byte) init_font_hex::i (byte) init_font_hex::i#1 reg byte x 1501.5 (byte) init_font_hex::i#2 reg byte x 667.3333333333334 (byte) init_font_hex::idx -(byte) init_font_hex::idx#2 idx zp ZP_BYTE:27 551.0 +(byte) init_font_hex::idx#2 idx zp ZP_BYTE:24 551.0 (byte) init_font_hex::idx#3 reg byte y 202.0 -(byte) init_font_hex::idx#5 idx zp ZP_BYTE:27 600.5999999999999 +(byte) init_font_hex::idx#5 idx zp ZP_BYTE:24 600.5999999999999 (byte*) init_font_hex::proto_hi -(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:19 7.333333333333333 -(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:19 56.83333333333334 +(byte*) init_font_hex::proto_hi#1 proto_hi zp ZP_WORD:16 7.333333333333333 +(byte*) init_font_hex::proto_hi#6 proto_hi zp ZP_WORD:16 56.83333333333334 (byte*) init_font_hex::proto_lo -(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:24 50.5 -(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:24 92.53846153846155 +(byte*) init_font_hex::proto_lo#1 proto_lo zp ZP_WORD:21 50.5 +(byte*) init_font_hex::proto_lo#4 proto_lo zp ZP_WORD:21 92.53846153846155 (void()) init_squares() (byte~) init_squares::$3 reg byte a 22.0 (byte~) init_squares::$4 reg byte a 22.0 @@ -93,11 +93,11 @@ (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:15 7.333333333333333 -(word) init_squares::sqr#2 sqr zp ZP_WORD:15 6.6000000000000005 +(word) init_squares::sqr#1 sqr zp ZP_WORD:12 7.333333333333333 +(word) init_squares::sqr#2 sqr zp ZP_WORD:12 6.6000000000000005 (word*) init_squares::squares -(word*) init_squares::squares#1 squares zp ZP_WORD:17 3.6666666666666665 -(word*) init_squares::squares#2 squares zp ZP_WORD:17 16.5 +(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 @@ -108,12 +108,6 @@ (label) main::@11 (label) main::@12 (label) main::@13 -(label) main::@14 -(label) main::@15 -(label) main::@16 -(label) main::@17 -(label) main::@18 -(label) main::@19 (label) main::@2 (label) main::@3 (label) main::@4 @@ -124,27 +118,15 @@ (label) main::@9 (label) main::@return (byte) main::d -(byte) main::d#0 reg byte a 202.0 +(byte) main::d#0 reg byte a 126.25 (word) main::ds -(word) main::ds#0 ds zp ZP_WORD:30 202.0 -(byte*) main::screen -(byte*) main::screen#1 screen zp ZP_WORD:11 56.0 -(byte*) main::screen#10 screen zp ZP_WORD:11 36.16666666666667 -(byte*) main::screen#11 screen zp ZP_WORD:11 24.0 -(byte*) main::screen#12 screen zp ZP_WORD:11 19.625 -(byte*) main::screen#13 screen zp ZP_WORD:11 42.599999999999994 -(byte*) main::screen#17 screen zp ZP_WORD:11 2.2 -(byte*) main::screen#6 screen zp ZP_WORD:11 104.66666666666666 -(byte*) main::screen#8 screen zp ZP_WORD:11 104.66666666666666 -(byte*) main::screen_mirror -(byte*) main::screen_mirror#0 screen_mirror zp ZP_WORD:9 4.0 -(byte*) main::screen_mirror#1 screen_mirror zp ZP_WORD:9 44.85714285714286 -(byte*) main::screen_mirror#2 screen_mirror zp ZP_WORD:9 213.0 -(byte*) main::screen_mirror#3 screen_mirror zp ZP_WORD:9 24.0 -(byte*) main::screen_mirror1 -(byte*) main::screen_mirror1#1 screen_mirror1 zp ZP_WORD:4 60.599999999999994 -(byte*) main::screen_mirror1#2 screen_mirror1 zp ZP_WORD:4 213.0 -(byte*~) main::screen_mirror1#3 screen_mirror1 zp ZP_WORD:4 22.0 +(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 @@ -160,32 +142,26 @@ (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:3 151.5 -(byte) main::x#2 x zp ZP_BYTE:3 17.823529411764707 -(byte) main::x1 -(byte) main::x1#1 reg byte x 151.5 -(byte) main::x1#2 reg byte x 50.5 +(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::x3 -(byte) main::x3#1 reg byte x 151.5 -(byte) main::x3#2 reg byte x 50.5 +(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:30 202.0 +(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#12 y zp ZP_BYTE:2 0.9166666666666667 -(byte) main::y1 -(byte) main::y1#1 y1 zp ZP_BYTE:6 16.5 -(byte) main::y1#4 y1 zp ZP_BYTE:6 3.142857142857143 +(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:28 5.6 +(word) main::yds#0 yds zp ZP_WORD:25 4.869565217391305 (void*()) malloc((word) malloc::size) (label) malloc::@return (byte*) malloc::mem @@ -196,65 +172,62 @@ (byte~) sqr::$0 reg byte a 4.0 (label) sqr::@return (word) sqr::return -(word) sqr::return#0 return zp ZP_WORD:30 28.5 -(word) sqr::return#2 return#2 zp ZP_WORD:28 22.0 -(word) sqr::return#3 return zp ZP_WORD:30 202.0 +(word) sqr::return#0 return zp ZP_WORD:27 28.5 +(word) sqr::return#2 return#2 zp ZP_WORD:25 22.0 +(word) sqr::return#3 return zp ZP_WORD:27 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:13 2.0 -(word~) sqrt::$3 $3 zp ZP_WORD:13 4.0 +(word~) sqrt::$1 $1 zp ZP_WORD:10 2.0 +(word~) sqrt::$3 $3 zp ZP_WORD:10 4.0 (label) sqrt::@1 (label) sqrt::@return (word*) sqrt::found -(word*) sqrt::found#0 found zp ZP_WORD:13 4.0 +(word*) sqrt::found#0 found zp ZP_WORD:10 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:30 103.0 +(word) sqrt::val#0 val zp ZP_WORD:27 103.0 -zp ZP_BYTE:2 [ main::y#12 main::y#1 ] +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:3 [ main::x#2 main::x#1 ] +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_WORD:4 [ main::screen_mirror1#2 main::screen_mirror1#3 main::screen_mirror1#1 ] -reg byte x [ main::x1#2 main::x1#1 ] -zp ZP_BYTE:6 [ main::y1#4 main::y1#1 ] -zp ZP_WORD:9 [ main::screen_mirror#2 main::screen_mirror#3 main::screen_mirror#0 main::screen_mirror#1 ] -zp ZP_WORD:11 [ main::screen#8 main::screen#11 main::screen#6 main::screen#12 main::screen#17 main::screen#10 main::screen#1 main::screen#13 ] -reg byte x [ main::x3#2 main::x3#1 ] -zp ZP_WORD:13 [ 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 ] +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 ] -zp ZP_WORD:15 [ init_squares::sqr#2 init_squares::sqr#1 ] -zp ZP_WORD:17 [ init_squares::squares#2 init_squares::squares#1 ] +zp ZP_WORD:12 [ init_squares::sqr#2 init_squares::sqr#1 ] +zp ZP_WORD:14 [ init_squares::squares#2 init_squares::squares#1 ] reg byte x [ init_squares::i#2 init_squares::i#1 ] -zp ZP_WORD:19 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] -zp ZP_BYTE:21 [ init_font_hex::c#6 init_font_hex::c#1 ] -zp ZP_WORD:22 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] -zp ZP_WORD:24 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] -zp ZP_BYTE:26 [ init_font_hex::c1#4 init_font_hex::c1#1 ] +zp ZP_WORD:16 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] +zp ZP_BYTE:18 [ init_font_hex::c#6 init_font_hex::c#1 ] +zp ZP_WORD:19 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] +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:27 [ init_font_hex::idx#5 init_font_hex::idx#2 ] +zp ZP_BYTE:24 [ init_font_hex::idx#5 init_font_hex::idx#2 ] reg byte a [ main::y2#0 ] -zp ZP_WORD:28 [ sqr::return#2 main::yds#0 ] +zp ZP_WORD:25 [ sqr::return#2 main::yds#0 ] reg byte a [ main::x2#0 ] -zp ZP_WORD:30 [ sqr::return#3 main::xds#0 sqr::return#0 main::ds#0 sqrt::val#0 bsearch16u::key#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 [ sqrt::return#2 ] reg byte a [ main::d#0 ] reg byte a [ sqrt::return#0 ] reg byte a [ bsearch16u::$6 ] reg byte a [ bsearch16u::$16 ] -zp ZP_WORD:32 [ bsearch16u::pivot#0 ] -zp ZP_WORD:34 [ bsearch16u::result#0 ] +zp ZP_WORD:29 [ bsearch16u::pivot#0 ] +zp ZP_WORD:31 [ bsearch16u::result#0 ] reg byte a [ sqr::$0 ] reg byte a [ init_squares::$3 ] reg byte a [ init_squares::$4 ] -zp ZP_BYTE:36 [ init_font_hex::$0 ] +zp ZP_BYTE:33 [ init_font_hex::$0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ]