diff --git a/src/main/kc/stdlib/multiplexer.kc b/src/main/kc/stdlib/multiplexer.kc index 879009195..e3ddcf196 100644 --- a/src/main/kc/stdlib/multiplexer.kc +++ b/src/main/kc/stdlib/multiplexer.kc @@ -17,7 +17,7 @@ import "c64" // The number of sprites in the multiplexer const char PLEX_COUNT = 32; -// The x-positions of the multiplexer sprites ($000-$1ff) +// The x-positions of the multiplexer sprites (0x000-0x1ff) unsigned int PLEX_XPOS[PLEX_COUNT]; // The y-positions of the multiplexer sprites. @@ -26,8 +26,8 @@ char PLEX_YPOS[PLEX_COUNT]; // The sprite pointers for the multiplexed sprites char PLEX_PTR[PLEX_COUNT]; -// The address of the sprite pointers on the current screen (screen+$3f8). -char* PLEX_SCREEN_PTR = $400+$3f8; +// The address of the sprite pointers on the current screen (screen+0x3f8). +char* PLEX_SCREEN_PTR = 0x400+0x3f8; // Indexes of the plex-sprites sorted by sprite y-position. Each call to plexSort() will fix the sorting if changes to the Y-positions have ruined it. char PLEX_SORTED_IDX[PLEX_COUNT]; @@ -35,11 +35,11 @@ char PLEX_SORTED_IDX[PLEX_COUNT]; // Variables controlling the showing of sprites // The index in the PLEX tables of the next sprite to show -char plex_show_idx=0; +volatile char plex_show_idx=0; // The index the next sprite to use for showing (sprites are used round-robin) -char plex_sprite_idx=0; +volatile char plex_sprite_idx=0; // The MSB bit of the next sprite to use for showing -char plex_sprite_msb=1; +volatile char plex_sprite_msb=1; // Initialize the multiplexer data structures void plexInit(char* screen) { @@ -49,9 +49,9 @@ void plexInit(char* screen) { } } -// Set the address of the current screen used for setting sprite pointers (at screen+$3f8) +// Set the address of the current screen used for setting sprite pointers (at screen+0x3f8) inline void plexSetScreen(char* screen) { - PLEX_SCREEN_PTR = screen+$3f8; + PLEX_SCREEN_PTR = screen+0x3f8; } // Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS @@ -73,7 +73,7 @@ void plexSort() { do { PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s]; s--; - } while((s!=$ff) && (nxt_yPLEX_XPOS[xpos_idx]!=0) { *SPRITES_XMSB |= plex_sprite_msb; } else { - *SPRITES_XMSB &= ($ff^plex_sprite_msb); + *SPRITES_XMSB &= (0xff^plex_sprite_msb); } plex_sprite_idx = (plex_sprite_idx+1)&7; plex_show_idx++; - plex_sprite_msb *=2; + plex_sprite_msb <<=1; if(plex_sprite_msb==0) { plex_sprite_msb = 1; } @@ -118,7 +118,7 @@ inline char plexShowNextYpos() { char PLEX_FREE_YPOS[8]; // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. -char plex_free_next = 0; +volatile char plex_free_next = 0; // Prepare for a new frame. Initialize free to zero for all sprites. inline void plexFreePrepare() { diff --git a/src/test/kc/complex/spritescroller/multiplexer-irq.kc b/src/test/kc/complex/spritescroller/multiplexer-irq.kc deleted file mode 100644 index e3ddcf196..000000000 --- a/src/test/kc/complex/spritescroller/multiplexer-irq.kc +++ /dev/null @@ -1,140 +0,0 @@ -// A flexible sprite multiplexer routine for 32 sprites. -// Usage: -// - Once: -// - plexInit(screen): Initialize the data structures and set the screen address -// Each frame: -// - Set x-pos, y-pos and pointer in PLEX_XPOS[id], PLEX_YPOS[id], PLEX_PTR[id] -// - plexSort() Sorts the sprites according to y-positions and prepares for showing them. This uses an insertion sort that is quite fast when the relative order of the sprites does not change very much. -// - plexShowSprite() Shows the next sprite by copying values from PLEX_XXX[] to an actual sprite. Actual sprites are used round-robin. This should be called once for each of the 24 virtual sprites. -// - plexFreeNextYpos() Returns the Y-position where the next sprite is available to be shown (ie. the next pos where the next sprite is no longer in use showing something else). -// - plexShowNextYpos() Returns the Y-position of the next sprite to show. -// -// In practice a good method is to wait until the raster is beyond plexFreeNextYpos() and then call plexShowSprite(). Repeat until all 32 sprites have been shown. -// TODO: Let the caller specify the number of sprites to use (or add PLEX_ENABLE[PLEX_COUNT]) - -import "c64" - -// The number of sprites in the multiplexer -const char PLEX_COUNT = 32; - -// The x-positions of the multiplexer sprites (0x000-0x1ff) -unsigned int PLEX_XPOS[PLEX_COUNT]; - -// The y-positions of the multiplexer sprites. -char PLEX_YPOS[PLEX_COUNT]; - -// The sprite pointers for the multiplexed sprites -char PLEX_PTR[PLEX_COUNT]; - -// The address of the sprite pointers on the current screen (screen+0x3f8). -char* PLEX_SCREEN_PTR = 0x400+0x3f8; - -// Indexes of the plex-sprites sorted by sprite y-position. Each call to plexSort() will fix the sorting if changes to the Y-positions have ruined it. -char PLEX_SORTED_IDX[PLEX_COUNT]; - -// Variables controlling the showing of sprites - -// The index in the PLEX tables of the next sprite to show -volatile char plex_show_idx=0; -// The index the next sprite to use for showing (sprites are used round-robin) -volatile char plex_sprite_idx=0; -// The MSB bit of the next sprite to use for showing -volatile char plex_sprite_msb=1; - -// Initialize the multiplexer data structures -void plexInit(char* screen) { - plexSetScreen(screen); - for(char i: 0..PLEX_COUNT-1) { - PLEX_SORTED_IDX[i] = i; - } -} - -// Set the address of the current screen used for setting sprite pointers (at screen+0x3f8) -inline void plexSetScreen(char* screen) { - PLEX_SCREEN_PTR = screen+0x3f8; -} - -// Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS -// Assumes that the positions are nearly sorted already (as each sprite just moves a bit) -// Uses an insertion sort: -// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly. -// 2a. If the next element after the marker is larger that the current element -// the marker can be moved forwards (as the sorting is correct). -// 2b. If the next element after the marker is smaller than the current element: -// elements before the marker are shifted right one at a time until encountering one smaller than the current one. -// It is then inserted at the spot. Now the marker can move forward. -void plexSort() { - for(char m: 0..PLEX_COUNT-2) { - char nxt_idx = PLEX_SORTED_IDX[m+1]; - char nxt_y = PLEX_YPOS[nxt_idx]; - if(nxt_yPLEX_XPOS[xpos_idx]!=0) { - *SPRITES_XMSB |= plex_sprite_msb; - } else { - *SPRITES_XMSB &= (0xff^plex_sprite_msb); - } - plex_sprite_idx = (plex_sprite_idx+1)&7; - plex_show_idx++; - plex_sprite_msb <<=1; - if(plex_sprite_msb==0) { - plex_sprite_msb = 1; - } -} - -// Get the y-position of the next sprite to show -inline char plexShowNextYpos() { - return PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]]; -} - -// Contains the Y-position where each sprite is free again. PLEX_FREE_YPOS[s] holds the Y-position where sprite s is free to use again. -char PLEX_FREE_YPOS[8]; - -// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. -volatile char plex_free_next = 0; - -// Prepare for a new frame. Initialize free to zero for all sprites. -inline void plexFreePrepare() { - for( char s: 0..7) { - PLEX_FREE_YPOS[s] = 0; - } - plex_free_next = 0; -} - -// Get the Y-position where the next sprite to be shown is free to use. -inline char plexFreeNextYpos() { - return PLEX_FREE_YPOS[plex_free_next]; -} - -// Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines. -inline void plexFreeAdd(char ypos) { - PLEX_FREE_YPOS[plex_free_next] = ypos+21; - plex_free_next = (plex_free_next+1)&7; -} \ No newline at end of file diff --git a/src/test/kc/complex/spritescroller/spritescroller.kc b/src/test/kc/complex/spritescroller/spritescroller.kc index a00dc51fb..34092bae0 100644 --- a/src/test/kc/complex/spritescroller/spritescroller.kc +++ b/src/test/kc/complex/spritescroller/spritescroller.kc @@ -1,6 +1,6 @@ // Put a 2x2 font into sprites and show it on screen import "c64" -import "multiplexer-irq" +import "multiplexer" char * const CHARSET_DEFAULT = 0x1000; char * const FONT = 0x2000; diff --git a/src/test/kc/multiplexer-irq/multiplexer-irq.kc b/src/test/kc/multiplexer-irq/multiplexer-irq.kc deleted file mode 100644 index e3ddcf196..000000000 --- a/src/test/kc/multiplexer-irq/multiplexer-irq.kc +++ /dev/null @@ -1,140 +0,0 @@ -// A flexible sprite multiplexer routine for 32 sprites. -// Usage: -// - Once: -// - plexInit(screen): Initialize the data structures and set the screen address -// Each frame: -// - Set x-pos, y-pos and pointer in PLEX_XPOS[id], PLEX_YPOS[id], PLEX_PTR[id] -// - plexSort() Sorts the sprites according to y-positions and prepares for showing them. This uses an insertion sort that is quite fast when the relative order of the sprites does not change very much. -// - plexShowSprite() Shows the next sprite by copying values from PLEX_XXX[] to an actual sprite. Actual sprites are used round-robin. This should be called once for each of the 24 virtual sprites. -// - plexFreeNextYpos() Returns the Y-position where the next sprite is available to be shown (ie. the next pos where the next sprite is no longer in use showing something else). -// - plexShowNextYpos() Returns the Y-position of the next sprite to show. -// -// In practice a good method is to wait until the raster is beyond plexFreeNextYpos() and then call plexShowSprite(). Repeat until all 32 sprites have been shown. -// TODO: Let the caller specify the number of sprites to use (or add PLEX_ENABLE[PLEX_COUNT]) - -import "c64" - -// The number of sprites in the multiplexer -const char PLEX_COUNT = 32; - -// The x-positions of the multiplexer sprites (0x000-0x1ff) -unsigned int PLEX_XPOS[PLEX_COUNT]; - -// The y-positions of the multiplexer sprites. -char PLEX_YPOS[PLEX_COUNT]; - -// The sprite pointers for the multiplexed sprites -char PLEX_PTR[PLEX_COUNT]; - -// The address of the sprite pointers on the current screen (screen+0x3f8). -char* PLEX_SCREEN_PTR = 0x400+0x3f8; - -// Indexes of the plex-sprites sorted by sprite y-position. Each call to plexSort() will fix the sorting if changes to the Y-positions have ruined it. -char PLEX_SORTED_IDX[PLEX_COUNT]; - -// Variables controlling the showing of sprites - -// The index in the PLEX tables of the next sprite to show -volatile char plex_show_idx=0; -// The index the next sprite to use for showing (sprites are used round-robin) -volatile char plex_sprite_idx=0; -// The MSB bit of the next sprite to use for showing -volatile char plex_sprite_msb=1; - -// Initialize the multiplexer data structures -void plexInit(char* screen) { - plexSetScreen(screen); - for(char i: 0..PLEX_COUNT-1) { - PLEX_SORTED_IDX[i] = i; - } -} - -// Set the address of the current screen used for setting sprite pointers (at screen+0x3f8) -inline void plexSetScreen(char* screen) { - PLEX_SCREEN_PTR = screen+0x3f8; -} - -// Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS -// Assumes that the positions are nearly sorted already (as each sprite just moves a bit) -// Uses an insertion sort: -// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly. -// 2a. If the next element after the marker is larger that the current element -// the marker can be moved forwards (as the sorting is correct). -// 2b. If the next element after the marker is smaller than the current element: -// elements before the marker are shifted right one at a time until encountering one smaller than the current one. -// It is then inserted at the spot. Now the marker can move forward. -void plexSort() { - for(char m: 0..PLEX_COUNT-2) { - char nxt_idx = PLEX_SORTED_IDX[m+1]; - char nxt_y = PLEX_YPOS[nxt_idx]; - if(nxt_yPLEX_XPOS[xpos_idx]!=0) { - *SPRITES_XMSB |= plex_sprite_msb; - } else { - *SPRITES_XMSB &= (0xff^plex_sprite_msb); - } - plex_sprite_idx = (plex_sprite_idx+1)&7; - plex_show_idx++; - plex_sprite_msb <<=1; - if(plex_sprite_msb==0) { - plex_sprite_msb = 1; - } -} - -// Get the y-position of the next sprite to show -inline char plexShowNextYpos() { - return PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]]; -} - -// Contains the Y-position where each sprite is free again. PLEX_FREE_YPOS[s] holds the Y-position where sprite s is free to use again. -char PLEX_FREE_YPOS[8]; - -// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. -volatile char plex_free_next = 0; - -// Prepare for a new frame. Initialize free to zero for all sprites. -inline void plexFreePrepare() { - for( char s: 0..7) { - PLEX_FREE_YPOS[s] = 0; - } - plex_free_next = 0; -} - -// Get the Y-position where the next sprite to be shown is free to use. -inline char plexFreeNextYpos() { - return PLEX_FREE_YPOS[plex_free_next]; -} - -// Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines. -inline void plexFreeAdd(char ypos) { - PLEX_FREE_YPOS[plex_free_next] = ypos+21; - plex_free_next = (plex_free_next+1)&7; -} \ No newline at end of file diff --git a/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc b/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc index 6655ba2f3..44eaac69e 100644 --- a/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc +++ b/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc @@ -1,6 +1,6 @@ // A simple usage of the flexible sprite multiplexer routine import "c64" -import "multiplexer-irq" +import "multiplexer" // Location of screen & sprites char* SCREEN = 0x0400; @@ -44,7 +44,7 @@ void init() { *IRQ_ENABLE = IRQ_RASTER; *IRQ_STATUS = IRQ_RASTER; *KERNEL_IRQ = &plex_irq; - *VIC_CONTROL &=0x7f; + *VIC_CONTROL &= 0x7f; *RASTER = 0x0; asm { cli } } @@ -63,7 +63,7 @@ interrupt(kernel_min) void plex_irq() { if (plex_show_idxPLEX_XPOS[xpos_idx]!=0) cmp #0 bne __b1 - // $ff^plex_sprite_msb + // 0xff^plex_sprite_msb lda #$ff eor.z plex_sprite_msb - // *SPRITES_XMSB &= ($ff^plex_sprite_msb) + // *SPRITES_XMSB &= (0xff^plex_sprite_msb) and SPRITES_XMSB sta SPRITES_XMSB __b2: // plex_sprite_idx+1 ldx.z plex_sprite_idx inx + // (plex_sprite_idx+1)&7 + txa + and #7 // plex_sprite_idx = (plex_sprite_idx+1)&7 - lda #7 - sax.z plex_sprite_idx + sta.z plex_sprite_idx // plex_show_idx++; inc.z plex_show_idx - // plex_sprite_msb *=2 + // plex_sprite_msb <<=1 asl.z plex_sprite_msb // if(plex_sprite_msb==0) lda.z plex_sprite_msb cmp #0 - bne __b5 + bne __breturn + // plex_sprite_msb = 1 lda #1 sta.z plex_sprite_msb - rts - __b5: + __breturn: // } rts __b1: @@ -347,9 +357,9 @@ plexShowSprite: { // elements before the marker are shifted right one at a time until encountering one smaller than the current one. // It is then inserted at the spot. Now the marker can move forward. plexSort: { - .label nxt_idx = $13 - .label nxt_y = $14 - .label m = $12 + .label nxt_idx = $16 + .label nxt_y = $17 + .label m = $15 lda #0 sta.z m __b1: @@ -372,7 +382,7 @@ plexSort: { sta PLEX_SORTED_IDX+1,x // s--; dex - // while((s!=$ff) && (nxt_ystr @@ -601,17 +622,17 @@ memset: { // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) mulf_init: { // x/2 - .label c = 9 + .label c = 7 // Counter used for determining x%2==0 - .label sqr1_hi = $a + .label sqr1_hi = 8 // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4 - .label sqr = $10 - .label sqr1_lo = 7 + .label sqr = $f + .label sqr1_lo = 5 // Decrease or increase x_255 - initially we decrease - .label sqr2_hi = $e - .label sqr2_lo = $c + .label sqr2_hi = $c + .label sqr2_lo = $a //Start with g(0)=f(255) - .label dir = $12 + .label dir = $e ldx #0 lda # (signed word) loop::x#0 - [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 - [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 - [45] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 - [46] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) - [47] call mulf8s - [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 + [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 + [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 + [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 + [46] (byte~) loop::$4 ← > (signed word) loop::x#0 + [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 + [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 + [49] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 + [50] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) + [51] call mulf8s + [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 to:loop::@12 loop::@12: scope:[loop] from loop::@11 - [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 - [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 - [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 - [52] (byte~) loop::$8 ← > (signed word) loop::y#0 - [53] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 - [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 - [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 - [56] (byte) loop::i#1 ← ++ (byte) loop::i#2 - [57] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 + [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 + [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 + [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 + [56] (byte~) loop::$8 ← > (signed word) loop::y#0 + [57] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 + [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 + [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 + [60] (byte) loop::i#1 ← ++ (byte) loop::i#2 + [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@12 - [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 - [59] call plexSort + [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 + [63] call plexSort to:loop::@13 loop::@13: scope:[loop] from loop::@5 - [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 - [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 + [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@6 loop::@6: scope:[loop] from loop::@13 loop::@6 - [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 - [63] if((byte~) loop::$11!=(byte) 0) goto loop::@6 + [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 + [67] if((byte~) loop::$11!=(byte) 0) goto loop::@6 to:loop::@7 loop::@7: scope:[loop] from loop::@14 loop::@6 - [64] (byte) loop::i1#5 ← phi( loop::@6/(byte) 0 loop::@14/(byte) loop::i1#1 ) - [64] (byte) plex_sprite_msb#43 ← phi( loop::@6/(byte) 1 loop::@14/(byte) plex_sprite_msb#16 ) - [64] (byte) plex_show_idx#43 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_show_idx#15 ) - [64] (byte) plex_sprite_idx#43 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_sprite_idx#15 ) - [64] (byte) plex_free_next#17 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_free_next#13 ) - [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [68] (byte) loop::i1#5 ← phi( loop::@6/(byte) 0 loop::@14/(byte) loop::i1#1 ) + [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@7 - [66] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) + [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) to:loop::@8 loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1 - [67] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 + [71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 to:loop::@9 loop::@9: scope:[loop] from loop::@8 - [68] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) - [69] call plexShowSprite + [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [73] call plexShowSprite to:loop::@14 loop::@14: scope:[loop] from loop::@9 - [70] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 - [71] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 + [74] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 + [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 to:loop::@10 loop::@10: scope:[loop] from loop::@14 - [72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK - [73] call keyboard_key_pressed - [74] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 + [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [77] call keyboard_key_pressed + [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 to:loop::@15 loop::@15: scope:[loop] from loop::@10 - [75] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 - [76] if((byte) 0!=(byte~) loop::$18) goto loop::@return + [79] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 + [80] if((byte) 0!=(byte~) loop::$18) goto loop::@return to:loop::@1 loop::@return: scope:[loop] from loop::@15 - [77] return + [81] return to:@return (void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@9 - [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 - [79] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) - [80] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 + [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 to:plexShowSprite::plexFreeAdd1 plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite - [81] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 - [82] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 - [83] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 - [84] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 - to:plexShowSprite::@4 -plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 - [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) - [86] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43) - [87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 - [88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [89] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 - [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [91] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 + [85] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 + [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 + [87] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 + [88] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 + [89] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 + to:plexShowSprite::@5 +plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 + [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) + [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 + [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 + [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [96] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 to:plexShowSprite::@3 -plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@4 - [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 - [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 +plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@5 + [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb + [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 to:plexShowSprite::@2 plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@3 - [94] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#43 + (byte) 1 - [95] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 - [96] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#43 - [97] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 << (byte) 1 - [98] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 + [99] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 + [100] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 + [101] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 + [102] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx + [103] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 + [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return + to:plexShowSprite::@4 +plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@2 + [105] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexShowSprite::@return -plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::@2 - [99] phi() - to:plexShowSprite::@return -plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@5 - [100] (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@5/(byte) plex_sprite_msb#3 plexShowSprite::@2/(byte) 1 ) - [101] return +plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@4 + [106] return to:@return -plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4 - [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 +plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@5 + [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb to:plexShowSprite::@2 (void()) plexSort() plexSort: scope:[plexSort] from loop::@5 - [103] phi() + [108] phi() to:plexSort::@1 plexSort::@1: scope:[plexSort] from plexSort plexSort::@2 - [104] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) - [105] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) - [106] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) - [107] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 + [109] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) + [110] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) + [111] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) + [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 to:plexSort::@5 plexSort::@5: scope:[plexSort] from plexSort::@1 - [108] (byte) plexSort::s#6 ← (byte) plexSort::m#2 + [113] (byte) plexSort::s#6 ← (byte) plexSort::m#2 to:plexSort::@3 -plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@6 - [109] (byte) plexSort::s#3 ← phi( plexSort::@6/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) - [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) - [111] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 - [112] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 - to:plexSort::@6 -plexSort::@6: scope:[plexSort] from plexSort::@3 - [113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7 + [114] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) + [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) + [116] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 + [117] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 + to:plexSort::@7 +plexSort::@7: scope:[plexSort] from plexSort::@3 + [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 to:plexSort::@4 -plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@6 - [114] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 - [115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 +plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7 + [119] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 + [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 to:plexSort::@2 plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4 - [116] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 - [117] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + [121] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 + [122] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + to:plexSort::@6 +plexSort::@6: scope:[plexSort] from plexSort::@2 + [123] (volatile byte) plex_show_idx ← (byte) 0 + [124] (volatile byte) plex_sprite_idx ← (byte) 0 + [125] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexSort::plexFreePrepare1 -plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@2 - [118] phi() +plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6 + [126] phi() to:plexSort::plexFreePrepare1_@1 plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1 - [119] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) - [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 - [121] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 - [122] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + [127] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) + [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 + [129] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 + [130] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + to:plexSort::plexFreePrepare1_@2 +plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1 + [131] (volatile byte) plex_free_next ← (byte) 0 to:plexSort::@return -plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1 - [123] return +plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 + [132] return to:@return (signed word()) mulf8s((signed byte) mulf8s::a , (signed byte) mulf8s::b) mulf8s: scope:[mulf8s] from loop::@11 loop::@4 - [124] (signed byte) mulf8s::b#2 ← phi( loop::@11/(signed byte) mulf8s::b#1 loop::@4/(signed byte) mulf8s::b#0 ) - [124] (signed byte) mulf8s::mulf8s_prepare1_a#0 ← phi( loop::@11/(signed byte) mulf8s::a#1 loop::@4/(signed byte) mulf8s::a#0 ) + [133] (signed byte) mulf8s::b#2 ← phi( loop::@11/(signed byte) mulf8s::b#1 loop::@4/(signed byte) mulf8s::b#0 ) + [133] (signed byte) mulf8s::mulf8s_prepare1_a#0 ← phi( loop::@11/(signed byte) mulf8s::a#1 loop::@4/(signed byte) mulf8s::a#0 ) to:mulf8s::mulf8s_prepare1 mulf8s::mulf8s_prepare1: scope:[mulf8s] from mulf8s - [125] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 - [126] call mulf8u_prepare + [134] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 + [135] call mulf8u_prepare to:mulf8s::@1 mulf8s::@1: scope:[mulf8s] from mulf8s::mulf8s_prepare1 - [127] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 - [128] call mulf8s_prepared + [136] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 + [137] call mulf8s_prepared to:mulf8s::@2 mulf8s::@2: scope:[mulf8s] from mulf8s::@1 - [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 + [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 to:mulf8s::@return mulf8s::@return: scope:[mulf8s] from mulf8s::@2 - [130] return + [139] return to:@return (signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from mulf8s::@1 - [131] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 - [132] call mulf8u_prepared - [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 + [140] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 + [141] call mulf8u_prepared + [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 to:mulf8s_prepared::@5 mulf8s_prepared::@5: scope:[mulf8s_prepared] from mulf8s_prepared - [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 - [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 + [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 + [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 to:mulf8s_prepared::@3 mulf8s_prepared::@3: scope:[mulf8s_prepared] from mulf8s_prepared::@5 - [136] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 - [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 - [138] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 + [145] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 + [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 + [147] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 to:mulf8s_prepared::@1 mulf8s_prepared::@1: scope:[mulf8s_prepared] from mulf8s_prepared::@3 mulf8s_prepared::@5 - [139] (word) mulf8s_prepared::m#5 ← phi( mulf8s_prepared::@3/(word) mulf8s_prepared::m#1 mulf8s_prepared::@5/(word) mulf8s_prepared::m#0 ) - [140] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 + [148] (word) mulf8s_prepared::m#5 ← phi( mulf8s_prepared::@3/(word) mulf8s_prepared::m#1 mulf8s_prepared::@5/(word) mulf8s_prepared::m#0 ) + [149] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 to:mulf8s_prepared::@4 mulf8s_prepared::@4: scope:[mulf8s_prepared] from mulf8s_prepared::@1 - [141] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 - [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) - [143] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 + [150] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 + [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) + [152] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 to:mulf8s_prepared::@2 mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_prepared::@4 - [144] (word) mulf8s_prepared::m#4 ← phi( mulf8s_prepared::@1/(word) mulf8s_prepared::m#5 mulf8s_prepared::@4/(word) mulf8s_prepared::m#2 ) + [153] (word) mulf8s_prepared::m#4 ← phi( mulf8s_prepared::@1/(word) mulf8s_prepared::m#5 mulf8s_prepared::@4/(word) mulf8s_prepared::m#2 ) to:mulf8s_prepared::@return mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 - [145] return + [154] return to:@return (word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared - [146] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 + [155] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } - [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) + [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) to:mulf8u_prepared::@return mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared - [149] return + [158] return to:@return (void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 - [150] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 + [159] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } to:mulf8u_prepare::@return mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare - [152] return + [161] return to:@return (void()) init() init: scope:[init] from main - [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 - [154] call plexInit + [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 + [163] call plexInit to:init::@1 init::@1: scope:[init] from init init::@1 - [155] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init/(byte) 0 ) - [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 - [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 - [159] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 - [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 - [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 - [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 - [163] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 - [164] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 - [165] (byte) init::i#1 ← ++ (byte) init::i#2 - [166] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 + [164] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init/(byte) 0 ) + [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 + [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 + [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 + [168] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 + [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 + [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 + [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 + [172] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 + [173] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 + [174] (byte) init::i#1 ← ++ (byte) init::i#2 + [175] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 to:init::@2 init::@2: scope:[init] from init::@1 - [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff + [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff to:init::@3 init::@3: scope:[init] from init::@2 init::@3 - [168] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 ) - [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN - [170] (byte) init::i1#1 ← ++ (byte) init::i1#2 - [171] if((byte) init::i1#1!=(byte) 8) goto init::@3 + [177] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 ) + [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN + [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 + [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 to:init::@4 init::@4: scope:[init] from init::@3 - [172] phi() - [173] call mulf_init + [181] phi() + [182] call mulf_init to:init::@5 init::@5: scope:[init] from init::@4 - [174] phi() - [175] call memset + [183] phi() + [184] call memset to:init::@return init::@return: scope:[init] from init::@5 - [176] return + [185] return to:@return (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from init::@5 - [177] phi() + [186] phi() to:memset::@1 memset::@1: scope:[memset] from memset memset::@2 - [178] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) - [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 + [187] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) + [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 to:memset::@return memset::@return: scope:[memset] from memset::@1 - [180] return + [189] return to:@return memset::@2: scope:[memset] from memset::@1 - [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 - [182] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 + [191] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 (void()) mulf_init() mulf_init: scope:[mulf_init] from init::@4 - [183] phi() + [192] phi() to:mulf_init::@1 mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@3 - [184] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 ) - [184] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 ) - [184] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 ) - [184] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 ) - [184] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 ) - [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 + [193] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 ) + [193] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 ) + [193] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 ) + [193] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 ) + [193] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 ) + [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 to:mulf_init::@5 mulf_init::@5: scope:[mulf_init] from mulf_init::@1 mulf_init::@8 - [186] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff ) - [186] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi ) - [186] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 ) - [186] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo ) - [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 + [195] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff ) + [195] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi ) + [195] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 ) + [195] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo ) + [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 to:mulf_init::@7 mulf_init::@7: scope:[mulf_init] from mulf_init::@5 - [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) - [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) + [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) + [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) to:mulf_init::@return mulf_init::@return: scope:[mulf_init] from mulf_init::@7 - [190] return + [199] return to:@return mulf_init::@6: scope:[mulf_init] from mulf_init::@5 - [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) - [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) - [193] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 - [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 - [195] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 + [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) + [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) + [202] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 + [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 + [204] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 to:mulf_init::@8 mulf_init::@9: scope:[mulf_init] from mulf_init::@6 - [196] phi() + [205] phi() to:mulf_init::@8 mulf_init::@8: scope:[mulf_init] from mulf_init::@6 mulf_init::@9 - [197] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 ) - [198] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 + [206] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 ) + [207] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 to:mulf_init::@5 mulf_init::@2: scope:[mulf_init] from mulf_init::@1 - [199] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 - [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 - [201] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 + [208] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 + [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 + [210] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 to:mulf_init::@4 mulf_init::@4: scope:[mulf_init] from mulf_init::@2 - [202] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 - [203] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 + [211] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 + [212] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 to:mulf_init::@3 mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4 - [204] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 ) - [204] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 ) - [205] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 - [206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 - [207] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 - [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 - [209] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 - [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 - [211] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 + [213] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 ) + [213] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 ) + [214] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 + [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 + [216] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 + [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 + [218] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 + [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 + [220] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 to:mulf_init::@1 (void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init - [212] phi() + [221] phi() to:plexInit::plexSetScreen1 plexInit::plexSetScreen1: scope:[plexInit] from plexInit - [213] phi() + [222] phi() to:plexInit::@1 plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1 - [214] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) - [215] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 - [216] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 - [217] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 + [223] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) + [224] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 + [225] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 + [226] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 to:plexInit::@return plexInit::@return: scope:[plexInit] from plexInit::@1 - [218] return + [227] return to:@return diff --git a/src/test/ref/complex/prebob/vogel-sprites.log b/src/test/ref/complex/prebob/vogel-sprites.log index 962c36f24..7be90f864 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.log +++ b/src/test/ref/complex/prebob/vogel-sprites.log @@ -100,9 +100,9 @@ CONTROL FLOW GRAPH SSA to:@4 @4: scope:[] from @begin (byte*) PLEX_SCREEN_PTR#0 ← (byte*)(number) $400+(number) $3f8 - (byte) plex_show_idx#0 ← (byte) 0 - (byte) plex_sprite_idx#0 ← (byte) 0 - (byte) plex_sprite_msb#0 ← (byte) 1 + (volatile byte) plex_show_idx ← (byte) 0 + (volatile byte) plex_sprite_idx ← (byte) 0 + (volatile byte) plex_sprite_msb ← (byte) 1 to:@9 (void()) plexInit((byte*) plexInit::screen) @@ -179,20 +179,14 @@ plexSort::@4: scope:[plexSort] from plexSort::@3 *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#1 to:plexSort::@2 plexSort::@6: scope:[plexSort] from plexSort::@2 - (byte) plex_show_idx#1 ← (number) 0 - (byte) plex_sprite_idx#1 ← (number) 0 - (byte) plex_sprite_msb#1 ← (number) 1 + (volatile byte) plex_show_idx ← (number) 0 + (volatile byte) plex_sprite_idx ← (number) 0 + (volatile byte) plex_sprite_msb ← (number) 1 to:plexSort::plexFreePrepare1 plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6 - (byte) plex_sprite_msb#40 ← phi( plexSort::@6/(byte) plex_sprite_msb#1 ) - (byte) plex_sprite_idx#41 ← phi( plexSort::@6/(byte) plex_sprite_idx#1 ) - (byte) plex_show_idx#41 ← phi( plexSort::@6/(byte) plex_show_idx#1 ) (byte) plexSort::plexFreePrepare1_s#0 ← (byte) 0 to:plexSort::plexFreePrepare1_@1 plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1 - (byte) plex_sprite_msb#32 ← phi( plexSort::plexFreePrepare1/(byte) plex_sprite_msb#40 plexSort::plexFreePrepare1_@1/(byte) plex_sprite_msb#32 ) - (byte) plex_sprite_idx#34 ← phi( plexSort::plexFreePrepare1/(byte) plex_sprite_idx#41 plexSort::plexFreePrepare1_@1/(byte) plex_sprite_idx#34 ) - (byte) plex_show_idx#34 ← phi( plexSort::plexFreePrepare1/(byte) plex_show_idx#41 plexSort::plexFreePrepare1_@1/(byte) plex_show_idx#34 ) (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) plexSort::plexFreePrepare1_s#0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (number) 0 (byte) plexSort::plexFreePrepare1_s#1 ← (byte) plexSort::plexFreePrepare1_s#2 + rangenext(0,7) @@ -200,59 +194,36 @@ plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 if((bool~) plexSort::plexFreePrepare1_$0) goto plexSort::plexFreePrepare1_@1 to:plexSort::plexFreePrepare1_@2 plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1 - (byte) plex_sprite_msb#23 ← phi( plexSort::plexFreePrepare1_@1/(byte) plex_sprite_msb#32 ) - (byte) plex_sprite_idx#22 ← phi( plexSort::plexFreePrepare1_@1/(byte) plex_sprite_idx#34 ) - (byte) plex_show_idx#22 ← phi( plexSort::plexFreePrepare1_@1/(byte) plex_show_idx#34 ) - (byte) plex_free_next#0 ← (number) 0 + (volatile byte) plex_free_next ← (number) 0 to:plexSort::@return plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 - (byte) plex_free_next#11 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_free_next#0 ) - (byte) plex_sprite_msb#12 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_sprite_msb#23 ) - (byte) plex_sprite_idx#11 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_sprite_idx#22 ) - (byte) plex_show_idx#11 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_show_idx#22 ) - (byte) plex_show_idx#2 ← (byte) plex_show_idx#11 - (byte) plex_sprite_idx#2 ← (byte) plex_sprite_idx#11 - (byte) plex_sprite_msb#2 ← (byte) plex_sprite_msb#12 - (byte) plex_free_next#1 ← (byte) plex_free_next#11 return to:@return (void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@17 - (byte) plex_sprite_msb#41 ← phi( loop::@17/(byte) plex_sprite_msb#28 ) (byte*) PLEX_SCREEN_PTR#23 ← phi( loop::@17/(byte*) PLEX_SCREEN_PTR#27 ) - (byte) plex_free_next#21 ← phi( loop::@17/(byte) plex_free_next#28 ) - (byte) plex_show_idx#12 ← phi( loop::@17/(byte) plex_show_idx#23 ) - (byte) plex_sprite_idx#12 ← phi( loop::@17/(byte) plex_sprite_idx#23 ) - (number~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (number) 2 + (number~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (number) 2 (byte) plexShowSprite::plex_sprite_idx2#0 ← (number~) plexShowSprite::$0 - (byte) plexShowSprite::ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#12)) + (byte) plexShowSprite::ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::ypos#0 (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← (byte) plexShowSprite::ypos#0 to:plexShowSprite::plexFreeAdd1 plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite - (byte) plex_sprite_msb#33 ← phi( plexShowSprite/(byte) plex_sprite_msb#41 ) (byte) plexShowSprite::plex_sprite_idx2#2 ← phi( plexShowSprite/(byte) plexShowSprite::plex_sprite_idx2#0 ) - (byte) plex_sprite_idx#24 ← phi( plexShowSprite/(byte) plex_sprite_idx#12 ) (byte*) PLEX_SCREEN_PTR#16 ← phi( plexShowSprite/(byte*) PLEX_SCREEN_PTR#23 ) - (byte) plex_show_idx#24 ← phi( plexShowSprite/(byte) plex_show_idx#12 ) - (byte) plex_free_next#12 ← phi( plexShowSprite/(byte) plex_free_next#21 ) (byte) plexShowSprite::plexFreeAdd1_ypos#1 ← phi( plexShowSprite/(byte) plexShowSprite::plexFreeAdd1_ypos#0 ) (number~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (number) $15 - *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#12) ← (number~) plexShowSprite::plexFreeAdd1_$0 - (number~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (number) 1 + *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (number~) plexShowSprite::plexFreeAdd1_$0 + (number~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (number) 1 (number~) plexShowSprite::plexFreeAdd1_$2 ← (number~) plexShowSprite::plexFreeAdd1_$1 & (number) 7 - (byte) plex_free_next#2 ← (number~) plexShowSprite::plexFreeAdd1_$2 + (volatile byte) plex_free_next ← (number~) plexShowSprite::plexFreeAdd1_$2 to:plexShowSprite::@7 plexShowSprite::@7: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 - (byte) plex_free_next#40 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_free_next#2 ) - (byte) plex_sprite_msb#24 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_sprite_msb#33 ) (byte) plexShowSprite::plex_sprite_idx2#1 ← phi( plexShowSprite::plexFreeAdd1/(byte) plexShowSprite::plex_sprite_idx2#2 ) - (byte) plex_sprite_idx#13 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_sprite_idx#24 ) (byte*) PLEX_SCREEN_PTR#9 ← phi( plexShowSprite::plexFreeAdd1/(byte*) PLEX_SCREEN_PTR#16 ) - (byte) plex_show_idx#13 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_show_idx#24 ) - *((byte*) PLEX_SCREEN_PTR#9 + (byte) plex_sprite_idx#13) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#13)) - (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#13) + *((byte*) PLEX_SCREEN_PTR#9 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) (byte~) plexShowSprite::$10 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$10) *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#1) ← (byte~) plexShowSprite::$2 @@ -262,57 +233,31 @@ plexShowSprite::@7: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 if((bool~) plexShowSprite::$4) goto plexShowSprite::@1 to:plexShowSprite::@4 plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@7 - (byte) plex_free_next#32 ← phi( plexShowSprite::@7/(byte) plex_free_next#40 ) - (byte) plex_show_idx#25 ← phi( plexShowSprite::@7/(byte) plex_show_idx#13 ) - (byte) plex_sprite_idx#25 ← phi( plexShowSprite::@7/(byte) plex_sprite_idx#13 ) - (byte) plex_sprite_msb#13 ← phi( plexShowSprite::@7/(byte) plex_sprite_msb#24 ) - *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#13 + *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb to:plexShowSprite::@2 plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@7 - (byte) plex_free_next#33 ← phi( plexShowSprite::@7/(byte) plex_free_next#40 ) - (byte) plex_show_idx#26 ← phi( plexShowSprite::@7/(byte) plex_show_idx#13 ) - (byte) plex_sprite_idx#26 ← phi( plexShowSprite::@7/(byte) plex_sprite_idx#13 ) - (byte) plex_sprite_msb#14 ← phi( plexShowSprite::@7/(byte) plex_sprite_msb#24 ) - (number~) plexShowSprite::$9 ← (number) $ff ^ (byte) plex_sprite_msb#14 + (number~) plexShowSprite::$9 ← (number) $ff ^ (volatile byte) plex_sprite_msb *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (number~) plexShowSprite::$9 to:plexShowSprite::@2 plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@4 - (byte) plex_free_next#22 ← phi( plexShowSprite::@1/(byte) plex_free_next#32 plexShowSprite::@4/(byte) plex_free_next#33 ) - (byte) plex_sprite_msb#15 ← phi( plexShowSprite::@1/(byte) plex_sprite_msb#13 plexShowSprite::@4/(byte) plex_sprite_msb#14 ) - (byte) plex_show_idx#14 ← phi( plexShowSprite::@1/(byte) plex_show_idx#25 plexShowSprite::@4/(byte) plex_show_idx#26 ) - (byte) plex_sprite_idx#14 ← phi( plexShowSprite::@1/(byte) plex_sprite_idx#25 plexShowSprite::@4/(byte) plex_sprite_idx#26 ) - (number~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (number) 1 + (number~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (number) 1 (number~) plexShowSprite::$6 ← (number~) plexShowSprite::$5 & (number) 7 - (byte) plex_sprite_idx#3 ← (number~) plexShowSprite::$6 - (byte) plex_show_idx#3 ← ++ (byte) plex_show_idx#14 - (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#15 * (number) 2 - (bool~) plexShowSprite::$7 ← (byte) plex_sprite_msb#3 == (number) 0 + (volatile byte) plex_sprite_idx ← (number~) plexShowSprite::$6 + (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx + (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (number) 1 + (bool~) plexShowSprite::$7 ← (volatile byte) plex_sprite_msb == (number) 0 (bool~) plexShowSprite::$8 ← ! (bool~) plexShowSprite::$7 if((bool~) plexShowSprite::$8) goto plexShowSprite::@return to:plexShowSprite::@6 plexShowSprite::@6: scope:[plexShowSprite] from plexShowSprite::@2 - (byte) plex_show_idx#27 ← phi( plexShowSprite::@2/(byte) plex_show_idx#3 ) - (byte) plex_sprite_idx#27 ← phi( plexShowSprite::@2/(byte) plex_sprite_idx#3 ) - (byte) plex_free_next#23 ← phi( plexShowSprite::@2/(byte) plex_free_next#22 ) - (byte) plex_sprite_msb#4 ← (number) 1 + (volatile byte) plex_sprite_msb ← (number) 1 to:plexShowSprite::@return plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@6 - (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@2/(byte) plex_sprite_msb#3 plexShowSprite::@6/(byte) plex_sprite_msb#4 ) - (byte) plex_show_idx#15 ← phi( plexShowSprite::@2/(byte) plex_show_idx#3 plexShowSprite::@6/(byte) plex_show_idx#27 ) - (byte) plex_sprite_idx#15 ← phi( plexShowSprite::@2/(byte) plex_sprite_idx#3 plexShowSprite::@6/(byte) plex_sprite_idx#27 ) - (byte) plex_free_next#13 ← phi( plexShowSprite::@2/(byte) plex_free_next#22 plexShowSprite::@6/(byte) plex_free_next#23 ) - (byte) plex_free_next#3 ← (byte) plex_free_next#13 - (byte) plex_sprite_idx#4 ← (byte) plex_sprite_idx#15 - (byte) plex_show_idx#4 ← (byte) plex_show_idx#15 - (byte) plex_sprite_msb#5 ← (byte) plex_sprite_msb#16 return to:@return @9: scope:[] from @4 - (byte) plex_sprite_msb#39 ← phi( @4/(byte) plex_sprite_msb#0 ) - (byte) plex_sprite_idx#40 ← phi( @4/(byte) plex_sprite_idx#0 ) - (byte) plex_show_idx#40 ← phi( @4/(byte) plex_show_idx#0 ) (byte*) PLEX_SCREEN_PTR#26 ← phi( @4/(byte*) PLEX_SCREEN_PTR#0 ) - (byte) plex_free_next#4 ← (byte) 0 + (volatile byte) plex_free_next ← (byte) 0 to:@37 (void()) mulf_init() @@ -609,54 +554,26 @@ keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_p (void()) main() main: scope:[main] from @37 - (byte) plex_free_next#34 ← phi( @37/(byte) plex_free_next#31 ) - (byte) plex_sprite_msb#34 ← phi( @37/(byte) plex_sprite_msb#31 ) - (byte) plex_sprite_idx#35 ← phi( @37/(byte) plex_sprite_idx#33 ) - (byte) plex_show_idx#35 ← phi( @37/(byte) plex_show_idx#33 ) (byte*) PLEX_SCREEN_PTR#17 ← phi( @37/(byte*) PLEX_SCREEN_PTR#21 ) asm { sei } call init to:main::@1 main::@1: scope:[main] from main - (byte) plex_free_next#24 ← phi( main/(byte) plex_free_next#34 ) - (byte) plex_sprite_msb#25 ← phi( main/(byte) plex_sprite_msb#34 ) - (byte) plex_sprite_idx#28 ← phi( main/(byte) plex_sprite_idx#35 ) - (byte) plex_show_idx#28 ← phi( main/(byte) plex_show_idx#35 ) (byte*) PLEX_SCREEN_PTR#10 ← phi( main/(byte*) PLEX_SCREEN_PTR#6 ) (byte*) PLEX_SCREEN_PTR#3 ← (byte*) PLEX_SCREEN_PTR#10 call loop to:main::@2 main::@2: scope:[main] from main::@1 (byte*) PLEX_SCREEN_PTR#24 ← phi( main::@1/(byte*) PLEX_SCREEN_PTR#3 ) - (byte) plex_free_next#14 ← phi( main::@1/(byte) plex_free_next#9 ) - (byte) plex_sprite_msb#17 ← phi( main::@1/(byte) plex_sprite_msb#10 ) - (byte) plex_sprite_idx#16 ← phi( main::@1/(byte) plex_sprite_idx#9 ) - (byte) plex_show_idx#16 ← phi( main::@1/(byte) plex_show_idx#9 ) - (byte) plex_show_idx#5 ← (byte) plex_show_idx#16 - (byte) plex_sprite_idx#5 ← (byte) plex_sprite_idx#16 - (byte) plex_sprite_msb#6 ← (byte) plex_sprite_msb#17 - (byte) plex_free_next#5 ← (byte) plex_free_next#14 call exit to:main::@3 main::@3: scope:[main] from main::@2 - (byte) plex_free_next#25 ← phi( main::@2/(byte) plex_free_next#5 ) - (byte) plex_sprite_msb#26 ← phi( main::@2/(byte) plex_sprite_msb#6 ) - (byte) plex_sprite_idx#29 ← phi( main::@2/(byte) plex_sprite_idx#5 ) - (byte) plex_show_idx#29 ← phi( main::@2/(byte) plex_show_idx#5 ) (byte*) PLEX_SCREEN_PTR#18 ← phi( main::@2/(byte*) PLEX_SCREEN_PTR#24 ) asm { cli } to:main::@return main::@return: scope:[main] from main::@3 - (byte) plex_free_next#15 ← phi( main::@3/(byte) plex_free_next#25 ) - (byte) plex_sprite_msb#18 ← phi( main::@3/(byte) plex_sprite_msb#26 ) - (byte) plex_sprite_idx#17 ← phi( main::@3/(byte) plex_sprite_idx#29 ) - (byte) plex_show_idx#17 ← phi( main::@3/(byte) plex_show_idx#29 ) (byte*) PLEX_SCREEN_PTR#11 ← phi( main::@3/(byte*) PLEX_SCREEN_PTR#18 ) (byte*) PLEX_SCREEN_PTR#4 ← (byte*) PLEX_SCREEN_PTR#11 - (byte) plex_show_idx#6 ← (byte) plex_show_idx#17 - (byte) plex_sprite_idx#6 ← (byte) plex_sprite_idx#17 - (byte) plex_sprite_msb#7 ← (byte) plex_sprite_msb#18 - (byte) plex_free_next#6 ← (byte) plex_free_next#15 return to:@return @@ -742,37 +659,21 @@ exit::@return: scope:[exit] from exit::@7 (void()) loop() loop: scope:[loop] from main::@1 (byte*) PLEX_SCREEN_PTR#48 ← phi( main::@1/(byte*) PLEX_SCREEN_PTR#3 ) - (byte) plex_free_next#35 ← phi( main::@1/(byte) plex_free_next#24 ) - (byte) plex_sprite_msb#35 ← phi( main::@1/(byte) plex_sprite_msb#25 ) - (byte) plex_sprite_idx#36 ← phi( main::@1/(byte) plex_sprite_idx#28 ) - (byte) plex_show_idx#36 ← phi( main::@1/(byte) plex_show_idx#28 ) (byte) loop::angle#0 ← (byte) 0 to:loop::@1 loop::@1: scope:[loop] from loop loop::@34 (byte*) PLEX_SCREEN_PTR#47 ← phi( loop/(byte*) PLEX_SCREEN_PTR#48 loop::@34/(byte*) PLEX_SCREEN_PTR#49 ) (byte) loop::angle#6 ← phi( loop/(byte) loop::angle#0 loop::@34/(byte) loop::angle#8 ) - (byte) plex_free_next#29 ← phi( loop/(byte) plex_free_next#35 loop::@34/(byte) plex_free_next#30 ) - (byte) plex_sprite_msb#29 ← phi( loop/(byte) plex_sprite_msb#35 loop::@34/(byte) plex_sprite_msb#30 ) - (byte) plex_sprite_idx#31 ← phi( loop/(byte) plex_sprite_idx#36 loop::@34/(byte) plex_sprite_idx#32 ) - (byte) plex_show_idx#31 ← phi( loop/(byte) plex_show_idx#36 loop::@34/(byte) plex_show_idx#32 ) if(true) goto loop::@4 to:loop::@return loop::@4: scope:[loop] from loop::@1 loop::@4 (byte*) PLEX_SCREEN_PTR#46 ← phi( loop::@1/(byte*) PLEX_SCREEN_PTR#47 loop::@4/(byte*) PLEX_SCREEN_PTR#46 ) - (byte) plex_free_next#47 ← phi( loop::@1/(byte) plex_free_next#29 loop::@4/(byte) plex_free_next#47 ) - (byte) plex_sprite_msb#48 ← phi( loop::@1/(byte) plex_sprite_msb#29 loop::@4/(byte) plex_sprite_msb#48 ) - (byte) plex_sprite_idx#48 ← phi( loop::@1/(byte) plex_sprite_idx#31 loop::@4/(byte) plex_sprite_idx#48 ) - (byte) plex_show_idx#48 ← phi( loop::@1/(byte) plex_show_idx#31 loop::@4/(byte) plex_show_idx#48 ) (byte) loop::angle#4 ← phi( loop::@1/(byte) loop::angle#6 loop::@4/(byte) loop::angle#4 ) (bool~) loop::$0 ← *((const nomodify byte*) RASTER) < (number) $d8 if((bool~) loop::$0) goto loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@4 (byte*) PLEX_SCREEN_PTR#45 ← phi( loop::@4/(byte*) PLEX_SCREEN_PTR#46 ) - (byte) plex_free_next#46 ← phi( loop::@4/(byte) plex_free_next#47 ) - (byte) plex_sprite_msb#46 ← phi( loop::@4/(byte) plex_sprite_msb#48 ) - (byte) plex_sprite_idx#46 ← phi( loop::@4/(byte) plex_sprite_idx#48 ) - (byte) plex_show_idx#46 ← phi( loop::@4/(byte) plex_show_idx#48 ) (byte) loop::angle#2 ← phi( loop::@4/(byte) loop::angle#4 ) *((const nomodify byte*) BORDERCOL) ← (number) $f (signed byte) loop::r#0 ← (signed byte) $1e @@ -782,10 +683,6 @@ loop::@5: scope:[loop] from loop::@4 loop::@6: scope:[loop] from loop::@31 loop::@5 (byte*) PLEX_SCREEN_PTR#44 ← phi( loop::@31/(byte*) PLEX_SCREEN_PTR#42 loop::@5/(byte*) PLEX_SCREEN_PTR#45 ) (byte) loop::angle#10 ← phi( loop::@31/(byte) loop::angle#7 loop::@5/(byte) loop::angle#2 ) - (byte) plex_free_next#44 ← phi( loop::@31/(byte) plex_free_next#36 loop::@5/(byte) plex_free_next#46 ) - (byte) plex_sprite_msb#44 ← phi( loop::@31/(byte) plex_sprite_msb#36 loop::@5/(byte) plex_sprite_msb#46 ) - (byte) plex_sprite_idx#44 ← phi( loop::@31/(byte) plex_sprite_idx#37 loop::@5/(byte) plex_sprite_idx#46 ) - (byte) plex_show_idx#44 ← phi( loop::@31/(byte) plex_show_idx#37 loop::@5/(byte) plex_show_idx#46 ) (byte) loop::i#4 ← phi( loop::@31/(byte) loop::i#1 loop::@5/(byte) loop::i#0 ) (byte) loop::a#2 ← phi( loop::@31/(byte) loop::a#1 loop::@5/(byte) loop::a#0 ) (signed byte) loop::r#2 ← phi( loop::@31/(signed byte) loop::r#1 loop::@5/(signed byte) loop::r#0 ) @@ -798,10 +695,6 @@ loop::@6: scope:[loop] from loop::@31 loop::@5 loop::@30: scope:[loop] from loop::@6 (byte*) PLEX_SCREEN_PTR#43 ← phi( loop::@6/(byte*) PLEX_SCREEN_PTR#44 ) (byte) loop::angle#9 ← phi( loop::@6/(byte) loop::angle#10 ) - (byte) plex_free_next#41 ← phi( loop::@6/(byte) plex_free_next#44 ) - (byte) plex_sprite_msb#42 ← phi( loop::@6/(byte) plex_sprite_msb#44 ) - (byte) plex_sprite_idx#42 ← phi( loop::@6/(byte) plex_sprite_idx#44 ) - (byte) plex_show_idx#42 ← phi( loop::@6/(byte) plex_show_idx#44 ) (byte) loop::a#3 ← phi( loop::@6/(byte) loop::a#2 ) (signed byte) loop::r#3 ← phi( loop::@6/(signed byte) loop::r#2 ) (byte) loop::i#2 ← phi( loop::@6/(byte) loop::i#4 ) @@ -821,10 +714,6 @@ loop::@30: scope:[loop] from loop::@6 loop::@31: scope:[loop] from loop::@30 (byte*) PLEX_SCREEN_PTR#42 ← phi( loop::@30/(byte*) PLEX_SCREEN_PTR#43 ) (byte) loop::angle#7 ← phi( loop::@30/(byte) loop::angle#9 ) - (byte) plex_free_next#36 ← phi( loop::@30/(byte) plex_free_next#41 ) - (byte) plex_sprite_msb#36 ← phi( loop::@30/(byte) plex_sprite_msb#42 ) - (byte) plex_sprite_idx#37 ← phi( loop::@30/(byte) plex_sprite_idx#42 ) - (byte) plex_show_idx#37 ← phi( loop::@30/(byte) plex_show_idx#42 ) (signed byte) loop::r#4 ← phi( loop::@30/(signed byte) loop::r#3 ) (byte) loop::a#4 ← phi( loop::@30/(byte) loop::a#3 ) (byte) loop::i#3 ← phi( loop::@30/(byte) loop::i#2 ) @@ -844,34 +733,18 @@ loop::@31: scope:[loop] from loop::@30 loop::@7: scope:[loop] from loop::@31 (byte*) PLEX_SCREEN_PTR#41 ← phi( loop::@31/(byte*) PLEX_SCREEN_PTR#42 ) (byte) loop::angle#5 ← phi( loop::@31/(byte) loop::angle#7 ) - (byte) plex_free_next#26 ← phi( loop::@31/(byte) plex_free_next#36 ) - (byte) plex_sprite_msb#27 ← phi( loop::@31/(byte) plex_sprite_msb#36 ) - (byte) plex_sprite_idx#30 ← phi( loop::@31/(byte) plex_sprite_idx#37 ) - (byte) plex_show_idx#30 ← phi( loop::@31/(byte) plex_show_idx#37 ) *((const nomodify byte*) BORDERCOL) ← (number) 3 call plexSort to:loop::@32 loop::@32: scope:[loop] from loop::@7 (byte*) PLEX_SCREEN_PTR#40 ← phi( loop::@7/(byte*) PLEX_SCREEN_PTR#41 ) (byte) loop::angle#3 ← phi( loop::@7/(byte) loop::angle#5 ) - (byte) plex_free_next#16 ← phi( loop::@7/(byte) plex_free_next#1 ) - (byte) plex_sprite_msb#19 ← phi( loop::@7/(byte) plex_sprite_msb#2 ) - (byte) plex_sprite_idx#18 ← phi( loop::@7/(byte) plex_sprite_idx#2 ) - (byte) plex_show_idx#18 ← phi( loop::@7/(byte) plex_show_idx#2 ) - (byte) plex_show_idx#7 ← (byte) plex_show_idx#18 - (byte) plex_sprite_idx#7 ← (byte) plex_sprite_idx#18 - (byte) plex_sprite_msb#8 ← (byte) plex_sprite_msb#19 - (byte) plex_free_next#7 ← (byte) plex_free_next#16 (byte) loop::angle#1 ← (byte) loop::angle#3 + (number) 3 *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@8 loop::@8: scope:[loop] from loop::@32 loop::@8 (byte) loop::angle#20 ← phi( loop::@32/(byte) loop::angle#1 loop::@8/(byte) loop::angle#20 ) (byte*) PLEX_SCREEN_PTR#39 ← phi( loop::@32/(byte*) PLEX_SCREEN_PTR#40 loop::@8/(byte*) PLEX_SCREEN_PTR#39 ) - (byte) plex_sprite_msb#51 ← phi( loop::@32/(byte) plex_sprite_msb#8 loop::@8/(byte) plex_sprite_msb#51 ) - (byte) plex_show_idx#51 ← phi( loop::@32/(byte) plex_show_idx#7 loop::@8/(byte) plex_show_idx#51 ) - (byte) plex_sprite_idx#51 ← phi( loop::@32/(byte) plex_sprite_idx#7 loop::@8/(byte) plex_sprite_idx#51 ) - (byte) plex_free_next#42 ← phi( loop::@32/(byte) plex_free_next#7 loop::@8/(byte) plex_free_next#42 ) (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 (bool~) loop::$12 ← (byte~) loop::$11 != (number) 0 if((bool~) loop::$12) goto loop::@8 @@ -879,40 +752,24 @@ loop::@8: scope:[loop] from loop::@32 loop::@8 loop::@10: scope:[loop] from loop::@8 (byte) loop::angle#19 ← phi( loop::@8/(byte) loop::angle#20 ) (byte*) PLEX_SCREEN_PTR#37 ← phi( loop::@8/(byte*) PLEX_SCREEN_PTR#39 ) - (byte) plex_sprite_msb#50 ← phi( loop::@8/(byte) plex_sprite_msb#51 ) - (byte) plex_show_idx#50 ← phi( loop::@8/(byte) plex_show_idx#51 ) - (byte) plex_sprite_idx#50 ← phi( loop::@8/(byte) plex_sprite_idx#51 ) - (byte) plex_free_next#37 ← phi( loop::@8/(byte) plex_free_next#42 ) (byte) loop::i1#0 ← (byte) 0 to:loop::@14 loop::@14: scope:[loop] from loop::@10 loop::@33 (byte) loop::angle#18 ← phi( loop::@10/(byte) loop::angle#19 loop::@33/(byte) loop::angle#12 ) (byte*) PLEX_SCREEN_PTR#36 ← phi( loop::@10/(byte*) PLEX_SCREEN_PTR#37 loop::@33/(byte*) PLEX_SCREEN_PTR#38 ) (byte) loop::i1#8 ← phi( loop::@10/(byte) loop::i1#0 loop::@33/(byte) loop::i1#1 ) - (byte) plex_sprite_msb#49 ← phi( loop::@10/(byte) plex_sprite_msb#50 loop::@33/(byte) plex_sprite_msb#9 ) - (byte) plex_show_idx#49 ← phi( loop::@10/(byte) plex_show_idx#50 loop::@33/(byte) plex_show_idx#8 ) - (byte) plex_sprite_idx#49 ← phi( loop::@10/(byte) plex_sprite_idx#50 loop::@33/(byte) plex_sprite_idx#8 ) - (byte) plex_free_next#27 ← phi( loop::@10/(byte) plex_free_next#37 loop::@33/(byte) plex_free_next#8 ) *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@14 (byte) loop::angle#17 ← phi( loop::@14/(byte) loop::angle#18 ) (byte*) PLEX_SCREEN_PTR#35 ← phi( loop::@14/(byte*) PLEX_SCREEN_PTR#36 ) (byte) loop::i1#7 ← phi( loop::@14/(byte) loop::i1#8 ) - (byte) plex_sprite_msb#47 ← phi( loop::@14/(byte) plex_sprite_msb#49 ) - (byte) plex_show_idx#47 ← phi( loop::@14/(byte) plex_show_idx#49 ) - (byte) plex_sprite_idx#47 ← phi( loop::@14/(byte) plex_sprite_idx#49 ) - (byte) plex_free_next#17 ← phi( loop::@14/(byte) plex_free_next#27 ) - (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) + (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) to:loop::plexFreeNextYpos1_@return loop::plexFreeNextYpos1_@return: scope:[loop] from loop::plexFreeNextYpos1 (byte) loop::angle#16 ← phi( loop::plexFreeNextYpos1/(byte) loop::angle#17 ) (byte*) PLEX_SCREEN_PTR#34 ← phi( loop::plexFreeNextYpos1/(byte*) PLEX_SCREEN_PTR#35 ) (byte) loop::i1#6 ← phi( loop::plexFreeNextYpos1/(byte) loop::i1#7 ) - (byte) plex_sprite_msb#45 ← phi( loop::plexFreeNextYpos1/(byte) plex_sprite_msb#47 ) - (byte) plex_free_next#45 ← phi( loop::plexFreeNextYpos1/(byte) plex_free_next#17 ) - (byte) plex_show_idx#45 ← phi( loop::plexFreeNextYpos1/(byte) plex_show_idx#47 ) - (byte) plex_sprite_idx#45 ← phi( loop::plexFreeNextYpos1/(byte) plex_sprite_idx#47 ) (byte) loop::plexFreeNextYpos1_return#2 ← phi( loop::plexFreeNextYpos1/(byte) loop::plexFreeNextYpos1_return#0 ) (byte) loop::plexFreeNextYpos1_return#1 ← (byte) loop::plexFreeNextYpos1_return#2 to:loop::@29 @@ -920,10 +777,6 @@ loop::@29: scope:[loop] from loop::plexFreeNextYpos1_@return (byte) loop::angle#15 ← phi( loop::plexFreeNextYpos1_@return/(byte) loop::angle#16 ) (byte*) PLEX_SCREEN_PTR#32 ← phi( loop::plexFreeNextYpos1_@return/(byte*) PLEX_SCREEN_PTR#34 ) (byte) loop::i1#5 ← phi( loop::plexFreeNextYpos1_@return/(byte) loop::i1#6 ) - (byte) plex_sprite_msb#43 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_sprite_msb#45 ) - (byte) plex_free_next#43 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_free_next#45 ) - (byte) plex_show_idx#43 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_show_idx#45 ) - (byte) plex_sprite_idx#43 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_sprite_idx#45 ) (byte) loop::plexFreeNextYpos1_return#3 ← phi( loop::plexFreeNextYpos1_@return/(byte) loop::plexFreeNextYpos1_return#1 ) (byte~) loop::$13 ← (byte) loop::plexFreeNextYpos1_return#3 (byte) loop::rasterY#0 ← (byte~) loop::$13 @@ -932,10 +785,6 @@ loop::@15: scope:[loop] from loop::@15 loop::@29 (byte) loop::angle#14 ← phi( loop::@15/(byte) loop::angle#14 loop::@29/(byte) loop::angle#15 ) (byte*) PLEX_SCREEN_PTR#30 ← phi( loop::@15/(byte*) PLEX_SCREEN_PTR#30 loop::@29/(byte*) PLEX_SCREEN_PTR#32 ) (byte) loop::i1#4 ← phi( loop::@15/(byte) loop::i1#4 loop::@29/(byte) loop::i1#5 ) - (byte) plex_sprite_msb#37 ← phi( loop::@15/(byte) plex_sprite_msb#37 loop::@29/(byte) plex_sprite_msb#43 ) - (byte) plex_free_next#38 ← phi( loop::@15/(byte) plex_free_next#38 loop::@29/(byte) plex_free_next#43 ) - (byte) plex_show_idx#38 ← phi( loop::@15/(byte) plex_show_idx#38 loop::@29/(byte) plex_show_idx#43 ) - (byte) plex_sprite_idx#38 ← phi( loop::@15/(byte) plex_sprite_idx#38 loop::@29/(byte) plex_sprite_idx#43 ) (byte) loop::rasterY#1 ← phi( loop::@15/(byte) loop::rasterY#1 loop::@29/(byte) loop::rasterY#0 ) (bool~) loop::$14 ← *((const nomodify byte*) RASTER) < (byte) loop::rasterY#1 if((bool~) loop::$14) goto loop::@15 @@ -944,10 +793,6 @@ loop::@17: scope:[loop] from loop::@15 (byte) loop::angle#13 ← phi( loop::@15/(byte) loop::angle#14 ) (byte*) PLEX_SCREEN_PTR#27 ← phi( loop::@15/(byte*) PLEX_SCREEN_PTR#30 ) (byte) loop::i1#3 ← phi( loop::@15/(byte) loop::i1#4 ) - (byte) plex_sprite_msb#28 ← phi( loop::@15/(byte) plex_sprite_msb#37 ) - (byte) plex_free_next#28 ← phi( loop::@15/(byte) plex_free_next#38 ) - (byte) plex_show_idx#23 ← phi( loop::@15/(byte) plex_show_idx#38 ) - (byte) plex_sprite_idx#23 ← phi( loop::@15/(byte) plex_sprite_idx#38 ) *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) call plexShowSprite to:loop::@33 @@ -955,14 +800,6 @@ loop::@33: scope:[loop] from loop::@17 (byte*) PLEX_SCREEN_PTR#38 ← phi( loop::@17/(byte*) PLEX_SCREEN_PTR#27 ) (byte) loop::angle#12 ← phi( loop::@17/(byte) loop::angle#13 ) (byte) loop::i1#2 ← phi( loop::@17/(byte) loop::i1#3 ) - (byte) plex_sprite_msb#20 ← phi( loop::@17/(byte) plex_sprite_msb#5 ) - (byte) plex_show_idx#19 ← phi( loop::@17/(byte) plex_show_idx#4 ) - (byte) plex_sprite_idx#19 ← phi( loop::@17/(byte) plex_sprite_idx#4 ) - (byte) plex_free_next#18 ← phi( loop::@17/(byte) plex_free_next#3 ) - (byte) plex_free_next#8 ← (byte) plex_free_next#18 - (byte) plex_sprite_idx#8 ← (byte) plex_sprite_idx#19 - (byte) plex_show_idx#8 ← (byte) plex_show_idx#19 - (byte) plex_sprite_msb#9 ← (byte) plex_sprite_msb#20 (byte) loop::i1#1 ← (byte) loop::i1#2 + rangenext(0,PLEX_COUNT-1) (bool~) loop::$17 ← (byte) loop::i1#1 != rangelast(0,PLEX_COUNT-1) if((bool~) loop::$17) goto loop::@14 @@ -970,10 +807,6 @@ loop::@33: scope:[loop] from loop::@17 loop::@21: scope:[loop] from loop::@33 (byte*) PLEX_SCREEN_PTR#50 ← phi( loop::@33/(byte*) PLEX_SCREEN_PTR#38 ) (byte) loop::angle#11 ← phi( loop::@33/(byte) loop::angle#12 ) - (byte) plex_free_next#39 ← phi( loop::@33/(byte) plex_free_next#8 ) - (byte) plex_sprite_msb#38 ← phi( loop::@33/(byte) plex_sprite_msb#9 ) - (byte) plex_sprite_idx#39 ← phi( loop::@33/(byte) plex_sprite_idx#8 ) - (byte) plex_show_idx#39 ← phi( loop::@33/(byte) plex_show_idx#8 ) *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK (byte) keyboard_key_pressed::key#1 ← (const nomodify byte) KEY_SPACE call keyboard_key_pressed @@ -982,10 +815,6 @@ loop::@21: scope:[loop] from loop::@33 loop::@34: scope:[loop] from loop::@21 (byte*) PLEX_SCREEN_PTR#49 ← phi( loop::@21/(byte*) PLEX_SCREEN_PTR#50 ) (byte) loop::angle#8 ← phi( loop::@21/(byte) loop::angle#11 ) - (byte) plex_free_next#30 ← phi( loop::@21/(byte) plex_free_next#39 ) - (byte) plex_sprite_msb#30 ← phi( loop::@21/(byte) plex_sprite_msb#38 ) - (byte) plex_sprite_idx#32 ← phi( loop::@21/(byte) plex_sprite_idx#39 ) - (byte) plex_show_idx#32 ← phi( loop::@21/(byte) plex_show_idx#39 ) (byte) keyboard_key_pressed::return#6 ← phi( loop::@21/(byte) keyboard_key_pressed::return#3 ) (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#6 (bool~) loop::$21 ← (number) 0 != (byte~) loop::$18 @@ -993,35 +822,15 @@ loop::@34: scope:[loop] from loop::@21 if((bool~) loop::$19) goto loop::@1 to:loop::@return loop::@return: scope:[loop] from loop::@1 loop::@34 - (byte) plex_free_next#19 ← phi( loop::@1/(byte) plex_free_next#29 loop::@34/(byte) plex_free_next#30 ) - (byte) plex_sprite_msb#21 ← phi( loop::@1/(byte) plex_sprite_msb#29 loop::@34/(byte) plex_sprite_msb#30 ) - (byte) plex_sprite_idx#20 ← phi( loop::@1/(byte) plex_sprite_idx#31 loop::@34/(byte) plex_sprite_idx#32 ) - (byte) plex_show_idx#20 ← phi( loop::@1/(byte) plex_show_idx#31 loop::@34/(byte) plex_show_idx#32 ) - (byte) plex_show_idx#9 ← (byte) plex_show_idx#20 - (byte) plex_sprite_idx#9 ← (byte) plex_sprite_idx#20 - (byte) plex_sprite_msb#10 ← (byte) plex_sprite_msb#21 - (byte) plex_free_next#9 ← (byte) plex_free_next#19 return to:@return @37: scope:[] from @9 - (byte) plex_free_next#31 ← phi( @9/(byte) plex_free_next#4 ) - (byte) plex_sprite_msb#31 ← phi( @9/(byte) plex_sprite_msb#39 ) - (byte) plex_sprite_idx#33 ← phi( @9/(byte) plex_sprite_idx#40 ) - (byte) plex_show_idx#33 ← phi( @9/(byte) plex_show_idx#40 ) (byte*) PLEX_SCREEN_PTR#21 ← phi( @9/(byte*) PLEX_SCREEN_PTR#26 ) call main to:@38 @38: scope:[] from @37 - (byte) plex_free_next#20 ← phi( @37/(byte) plex_free_next#6 ) - (byte) plex_sprite_msb#22 ← phi( @37/(byte) plex_sprite_msb#7 ) - (byte) plex_sprite_idx#21 ← phi( @37/(byte) plex_sprite_idx#6 ) - (byte) plex_show_idx#21 ← phi( @37/(byte) plex_show_idx#6 ) (byte*) PLEX_SCREEN_PTR#14 ← phi( @37/(byte*) PLEX_SCREEN_PTR#4 ) (byte*) PLEX_SCREEN_PTR#7 ← (byte*) PLEX_SCREEN_PTR#14 - (byte) plex_show_idx#10 ← (byte) plex_show_idx#21 - (byte) plex_sprite_idx#10 ← (byte) plex_sprite_idx#21 - (byte) plex_sprite_msb#11 ← (byte) plex_sprite_msb#22 - (byte) plex_free_next#10 ← (byte) plex_free_next#20 to:@end @end: scope:[] from @38 @@ -1616,214 +1425,10 @@ SYMBOL TABLE SSA (byte) plexSort::s#2 (byte) plexSort::s#3 (byte) plexSort::s#4 -(byte) plex_free_next -(byte) plex_free_next#0 -(byte) plex_free_next#1 -(byte) plex_free_next#10 -(byte) plex_free_next#11 -(byte) plex_free_next#12 -(byte) plex_free_next#13 -(byte) plex_free_next#14 -(byte) plex_free_next#15 -(byte) plex_free_next#16 -(byte) plex_free_next#17 -(byte) plex_free_next#18 -(byte) plex_free_next#19 -(byte) plex_free_next#2 -(byte) plex_free_next#20 -(byte) plex_free_next#21 -(byte) plex_free_next#22 -(byte) plex_free_next#23 -(byte) plex_free_next#24 -(byte) plex_free_next#25 -(byte) plex_free_next#26 -(byte) plex_free_next#27 -(byte) plex_free_next#28 -(byte) plex_free_next#29 -(byte) plex_free_next#3 -(byte) plex_free_next#30 -(byte) plex_free_next#31 -(byte) plex_free_next#32 -(byte) plex_free_next#33 -(byte) plex_free_next#34 -(byte) plex_free_next#35 -(byte) plex_free_next#36 -(byte) plex_free_next#37 -(byte) plex_free_next#38 -(byte) plex_free_next#39 -(byte) plex_free_next#4 -(byte) plex_free_next#40 -(byte) plex_free_next#41 -(byte) plex_free_next#42 -(byte) plex_free_next#43 -(byte) plex_free_next#44 -(byte) plex_free_next#45 -(byte) plex_free_next#46 -(byte) plex_free_next#47 -(byte) plex_free_next#5 -(byte) plex_free_next#6 -(byte) plex_free_next#7 -(byte) plex_free_next#8 -(byte) plex_free_next#9 -(byte) plex_show_idx -(byte) plex_show_idx#0 -(byte) plex_show_idx#1 -(byte) plex_show_idx#10 -(byte) plex_show_idx#11 -(byte) plex_show_idx#12 -(byte) plex_show_idx#13 -(byte) plex_show_idx#14 -(byte) plex_show_idx#15 -(byte) plex_show_idx#16 -(byte) plex_show_idx#17 -(byte) plex_show_idx#18 -(byte) plex_show_idx#19 -(byte) plex_show_idx#2 -(byte) plex_show_idx#20 -(byte) plex_show_idx#21 -(byte) plex_show_idx#22 -(byte) plex_show_idx#23 -(byte) plex_show_idx#24 -(byte) plex_show_idx#25 -(byte) plex_show_idx#26 -(byte) plex_show_idx#27 -(byte) plex_show_idx#28 -(byte) plex_show_idx#29 -(byte) plex_show_idx#3 -(byte) plex_show_idx#30 -(byte) plex_show_idx#31 -(byte) plex_show_idx#32 -(byte) plex_show_idx#33 -(byte) plex_show_idx#34 -(byte) plex_show_idx#35 -(byte) plex_show_idx#36 -(byte) plex_show_idx#37 -(byte) plex_show_idx#38 -(byte) plex_show_idx#39 -(byte) plex_show_idx#4 -(byte) plex_show_idx#40 -(byte) plex_show_idx#41 -(byte) plex_show_idx#42 -(byte) plex_show_idx#43 -(byte) plex_show_idx#44 -(byte) plex_show_idx#45 -(byte) plex_show_idx#46 -(byte) plex_show_idx#47 -(byte) plex_show_idx#48 -(byte) plex_show_idx#49 -(byte) plex_show_idx#5 -(byte) plex_show_idx#50 -(byte) plex_show_idx#51 -(byte) plex_show_idx#6 -(byte) plex_show_idx#7 -(byte) plex_show_idx#8 -(byte) plex_show_idx#9 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#0 -(byte) plex_sprite_idx#1 -(byte) plex_sprite_idx#10 -(byte) plex_sprite_idx#11 -(byte) plex_sprite_idx#12 -(byte) plex_sprite_idx#13 -(byte) plex_sprite_idx#14 -(byte) plex_sprite_idx#15 -(byte) plex_sprite_idx#16 -(byte) plex_sprite_idx#17 -(byte) plex_sprite_idx#18 -(byte) plex_sprite_idx#19 -(byte) plex_sprite_idx#2 -(byte) plex_sprite_idx#20 -(byte) plex_sprite_idx#21 -(byte) plex_sprite_idx#22 -(byte) plex_sprite_idx#23 -(byte) plex_sprite_idx#24 -(byte) plex_sprite_idx#25 -(byte) plex_sprite_idx#26 -(byte) plex_sprite_idx#27 -(byte) plex_sprite_idx#28 -(byte) plex_sprite_idx#29 -(byte) plex_sprite_idx#3 -(byte) plex_sprite_idx#30 -(byte) plex_sprite_idx#31 -(byte) plex_sprite_idx#32 -(byte) plex_sprite_idx#33 -(byte) plex_sprite_idx#34 -(byte) plex_sprite_idx#35 -(byte) plex_sprite_idx#36 -(byte) plex_sprite_idx#37 -(byte) plex_sprite_idx#38 -(byte) plex_sprite_idx#39 -(byte) plex_sprite_idx#4 -(byte) plex_sprite_idx#40 -(byte) plex_sprite_idx#41 -(byte) plex_sprite_idx#42 -(byte) plex_sprite_idx#43 -(byte) plex_sprite_idx#44 -(byte) plex_sprite_idx#45 -(byte) plex_sprite_idx#46 -(byte) plex_sprite_idx#47 -(byte) plex_sprite_idx#48 -(byte) plex_sprite_idx#49 -(byte) plex_sprite_idx#5 -(byte) plex_sprite_idx#50 -(byte) plex_sprite_idx#51 -(byte) plex_sprite_idx#6 -(byte) plex_sprite_idx#7 -(byte) plex_sprite_idx#8 -(byte) plex_sprite_idx#9 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#0 -(byte) plex_sprite_msb#1 -(byte) plex_sprite_msb#10 -(byte) plex_sprite_msb#11 -(byte) plex_sprite_msb#12 -(byte) plex_sprite_msb#13 -(byte) plex_sprite_msb#14 -(byte) plex_sprite_msb#15 -(byte) plex_sprite_msb#16 -(byte) plex_sprite_msb#17 -(byte) plex_sprite_msb#18 -(byte) plex_sprite_msb#19 -(byte) plex_sprite_msb#2 -(byte) plex_sprite_msb#20 -(byte) plex_sprite_msb#21 -(byte) plex_sprite_msb#22 -(byte) plex_sprite_msb#23 -(byte) plex_sprite_msb#24 -(byte) plex_sprite_msb#25 -(byte) plex_sprite_msb#26 -(byte) plex_sprite_msb#27 -(byte) plex_sprite_msb#28 -(byte) plex_sprite_msb#29 -(byte) plex_sprite_msb#3 -(byte) plex_sprite_msb#30 -(byte) plex_sprite_msb#31 -(byte) plex_sprite_msb#32 -(byte) plex_sprite_msb#33 -(byte) plex_sprite_msb#34 -(byte) plex_sprite_msb#35 -(byte) plex_sprite_msb#36 -(byte) plex_sprite_msb#37 -(byte) plex_sprite_msb#38 -(byte) plex_sprite_msb#39 -(byte) plex_sprite_msb#4 -(byte) plex_sprite_msb#40 -(byte) plex_sprite_msb#41 -(byte) plex_sprite_msb#42 -(byte) plex_sprite_msb#43 -(byte) plex_sprite_msb#44 -(byte) plex_sprite_msb#45 -(byte) plex_sprite_msb#46 -(byte) plex_sprite_msb#47 -(byte) plex_sprite_msb#48 -(byte) plex_sprite_msb#49 -(byte) plex_sprite_msb#5 -(byte) plex_sprite_msb#50 -(byte) plex_sprite_msb#51 -(byte) plex_sprite_msb#6 -(byte) plex_sprite_msb#7 -(byte) plex_sprite_msb#8 -(byte) plex_sprite_msb#9 +(volatile byte) plex_free_next loadstore +(volatile byte) plex_show_idx loadstore +(volatile byte) plex_sprite_idx loadstore +(volatile byte) plex_sprite_msb loadstore Fixing inline constructor with mulf8u_prepared::$0 ← (byte)*(mulf8u_prepared::memB) w= (byte)*(mulf8u_prepared::resL) Successful SSA optimization Pass2FixInlineConstructors @@ -1836,29 +1441,29 @@ Adding number conversion cast (unumber) 2 in (byte) plexSort::m#1 ← (byte) ple Adding number conversion cast (unumber) 1 in (number~) plexSort::$4 ← (byte) plexSort::s#3 + (number) 1 Adding number conversion cast (unumber) plexSort::$4 in (number~) plexSort::$4 ← (byte) plexSort::s#3 + (unumber)(number) 1 Adding number conversion cast (unumber) $ff in (bool~) plexSort::$5 ← (byte) plexSort::s#1 != (number) $ff -Adding number conversion cast (unumber) 0 in (byte) plex_show_idx#1 ← (number) 0 -Adding number conversion cast (unumber) 0 in (byte) plex_sprite_idx#1 ← (number) 0 -Adding number conversion cast (unumber) 1 in (byte) plex_sprite_msb#1 ← (number) 1 +Adding number conversion cast (unumber) 0 in (volatile byte) plex_show_idx ← (number) 0 +Adding number conversion cast (unumber) 0 in (volatile byte) plex_sprite_idx ← (number) 0 +Adding number conversion cast (unumber) 1 in (volatile byte) plex_sprite_msb ← (number) 1 Adding number conversion cast (unumber) 0 in *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (number) 0 -Adding number conversion cast (unumber) 0 in (byte) plex_free_next#0 ← (number) 0 -Adding number conversion cast (unumber) 2 in (number~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (number) 2 -Adding number conversion cast (unumber) plexShowSprite::$0 in (number~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (unumber)(number) 2 +Adding number conversion cast (unumber) 0 in (volatile byte) plex_free_next ← (number) 0 +Adding number conversion cast (unumber) 2 in (number~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (number) 2 +Adding number conversion cast (unumber) plexShowSprite::$0 in (number~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (unumber)(number) 2 Adding number conversion cast (unumber) $15 in (number~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (number) $15 Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$0 in (number~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (unumber)(number) $15 -Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (number) 1 -Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (unumber)(number) 1 +Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (number) 1 +Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (unumber)(number) 1 Adding number conversion cast (unumber) 7 in (number~) plexShowSprite::plexFreeAdd1_$2 ← (unumber~) plexShowSprite::plexFreeAdd1_$1 & (number) 7 Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$2 in (number~) plexShowSprite::plexFreeAdd1_$2 ← (unumber~) plexShowSprite::plexFreeAdd1_$1 & (unumber)(number) 7 Adding number conversion cast (unumber) 0 in (bool~) plexShowSprite::$4 ← (byte~) plexShowSprite::$3 != (number) 0 -Adding number conversion cast (unumber) $ff in (number~) plexShowSprite::$9 ← (number) $ff ^ (byte) plex_sprite_msb#14 -Adding number conversion cast (unumber) plexShowSprite::$9 in (number~) plexShowSprite::$9 ← (unumber)(number) $ff ^ (byte) plex_sprite_msb#14 -Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (number) 1 -Adding number conversion cast (unumber) plexShowSprite::$5 in (number~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (unumber)(number) 1 +Adding number conversion cast (unumber) $ff in (number~) plexShowSprite::$9 ← (number) $ff ^ (volatile byte) plex_sprite_msb +Adding number conversion cast (unumber) plexShowSprite::$9 in (number~) plexShowSprite::$9 ← (unumber)(number) $ff ^ (volatile byte) plex_sprite_msb +Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (number) 1 +Adding number conversion cast (unumber) plexShowSprite::$5 in (number~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (unumber)(number) 1 Adding number conversion cast (unumber) 7 in (number~) plexShowSprite::$6 ← (unumber~) plexShowSprite::$5 & (number) 7 Adding number conversion cast (unumber) plexShowSprite::$6 in (number~) plexShowSprite::$6 ← (unumber~) plexShowSprite::$5 & (unumber)(number) 7 -Adding number conversion cast (unumber) 2 in (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#15 * (number) 2 -Adding number conversion cast (unumber) 0 in (bool~) plexShowSprite::$7 ← (byte) plex_sprite_msb#3 == (number) 0 -Adding number conversion cast (unumber) 1 in (byte) plex_sprite_msb#4 ← (number) 1 +Adding number conversion cast (unumber) 1 in (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (number) 1 +Adding number conversion cast (unumber) 0 in (bool~) plexShowSprite::$7 ← (volatile byte) plex_sprite_msb == (number) 0 +Adding number conversion cast (unumber) 1 in (volatile byte) plex_sprite_msb ← (number) 1 Adding number conversion cast (unumber) 1 in (byte*) mulf_init::sqr1_hi#0 ← (const byte*) mulf_sqr1_hi+(number) 1 Adding number conversion cast (unumber) 1 in (byte*) mulf_init::sqr1_lo#0 ← (const byte*) mulf_sqr1_lo+(number) 1 Adding number conversion cast (unumber) $200 in (bool~) mulf_init::$0 ← (byte*) mulf_init::sqr1_lo#2 != (const byte*) mulf_sqr1_lo+(number) $200 @@ -1913,12 +1518,12 @@ Adding number conversion cast (unumber) 0 in (bool~) loop::$12 ← (byte~) loop: Adding number conversion cast (unumber) 1 in (byte) loop::i1#1 ← (byte) loop::i1#2 + rangenext(0,PLEX_COUNT-1) Adding number conversion cast (unumber) 0 in (bool~) loop::$21 ← (number) 0 != (byte~) loop::$18 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast (byte) plex_show_idx#1 ← (unumber)(number) 0 -Inlining cast (byte) plex_sprite_idx#1 ← (unumber)(number) 0 -Inlining cast (byte) plex_sprite_msb#1 ← (unumber)(number) 1 +Inlining cast (volatile byte) plex_show_idx ← (unumber)(number) 0 +Inlining cast (volatile byte) plex_sprite_idx ← (unumber)(number) 0 +Inlining cast (volatile byte) plex_sprite_msb ← (unumber)(number) 1 Inlining cast *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (unumber)(number) 0 -Inlining cast (byte) plex_free_next#0 ← (unumber)(number) 0 -Inlining cast (byte) plex_sprite_msb#4 ← (unumber)(number) 1 +Inlining cast (volatile byte) plex_free_next ← (unumber)(number) 0 +Inlining cast (volatile byte) plex_sprite_msb ← (unumber)(number) 1 Inlining cast (byte) mulf_init::dir#1 ← (unumber)(number) 1 Inlining cast (byte~) mulf8s_prepared::$0 ← (byte)(signed byte) mulf8s_prepared::b#1 Inlining cast (byte~) mulf8s_prepared::$9 ← (byte)(signed byte) mulf8s_prepared::b#3 @@ -1969,7 +1574,7 @@ Simplifying constant integer cast 0 Simplifying constant integer cast $ff Simplifying constant integer cast 1 Simplifying constant integer cast 7 -Simplifying constant integer cast 2 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 1 @@ -2037,7 +1642,7 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $ff Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 7 -Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 @@ -2083,12 +1688,12 @@ Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) plexSort::$1 ← (byte) plexSort::m#2 + (byte) 1 Inferred type updated to byte in (unumber~) plexSort::$4 ← (byte) plexSort::s#3 + (byte) 1 -Inferred type updated to byte in (unumber~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (byte) 2 +Inferred type updated to byte in (unumber~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (byte) 2 Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (byte) $15 -Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (byte) 1 +Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -Inferred type updated to byte in (unumber~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#14 -Inferred type updated to byte in (unumber~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (byte) 1 +Inferred type updated to byte in (unumber~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb +Inferred type updated to byte in (unumber~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 Inferred type updated to byte in (unumber~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 Inferred type updated to byte in (unumber~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 Inferred type updated to byte in (unumber~) keyboard_key_pressed::$0 ← (byte) keyboard_key_pressed::key#2 & (byte) 7 @@ -2101,14 +1706,16 @@ Inferred type updated to signed word in (snumber~) loop::$3 ← (signed word~) l Inferred type updated to signed word in (snumber~) loop::$6 ← (signed word~) loop::$5 * (signed byte) 2 Inferred type updated to signed word in (snumber~) loop::$7 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 Inversing boolean not [25] (bool~) plexSort::$3 ← (byte) plexSort::nxt_y#0 >= *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2)) from [24] (bool~) plexSort::$2 ← (byte) plexSort::nxt_y#0 < *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2)) -Inversing boolean not [96] (bool~) plexShowSprite::$8 ← (byte) plex_sprite_msb#3 != (byte) 0 from [95] (bool~) plexShowSprite::$7 ← (byte) plex_sprite_msb#3 == (byte) 0 -Inversing boolean not [120] (bool~) mulf_init::$3 ← (byte~) mulf_init::$1 != (byte) 0 from [119] (bool~) mulf_init::$2 ← (byte~) mulf_init::$1 == (byte) 0 -Inversing boolean not [148] (bool~) mulf_init::$10 ← (byte) mulf_init::x_255#1 != (byte) 0 from [147] (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (byte) 0 -Inversing boolean not [178] (bool~) mulf8s_prepared::$3 ← *((const nomodify signed byte*) mulf8s_prepared::memA) >= (signed byte) 0 from [177] (bool~) mulf8s_prepared::$2 ← *((const nomodify signed byte*) mulf8s_prepared::memA) < (signed byte) 0 -Inversing boolean not [182] (bool~) mulf8s_prepared::$5 ← (signed byte) mulf8s_prepared::b#2 >= (signed byte) 0 from [181] (bool~) mulf8s_prepared::$4 ← (signed byte) mulf8s_prepared::b#2 < (signed byte) 0 -Inversing boolean not [221] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [220] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0 -Inversing boolean not [419] (bool~) loop::$19 ← (byte) 0 == (byte~) loop::$18 from [418] (bool~) loop::$21 ← (byte) 0 != (byte~) loop::$18 +Inversing boolean not [86] (bool~) plexShowSprite::$8 ← (volatile byte) plex_sprite_msb != (byte) 0 from [85] (bool~) plexShowSprite::$7 ← (volatile byte) plex_sprite_msb == (byte) 0 +Inversing boolean not [104] (bool~) mulf_init::$3 ← (byte~) mulf_init::$1 != (byte) 0 from [103] (bool~) mulf_init::$2 ← (byte~) mulf_init::$1 == (byte) 0 +Inversing boolean not [132] (bool~) mulf_init::$10 ← (byte) mulf_init::x_255#1 != (byte) 0 from [131] (bool~) mulf_init::$9 ← (byte) mulf_init::x_255#1 == (byte) 0 +Inversing boolean not [162] (bool~) mulf8s_prepared::$3 ← *((const nomodify signed byte*) mulf8s_prepared::memA) >= (signed byte) 0 from [161] (bool~) mulf8s_prepared::$2 ← *((const nomodify signed byte*) mulf8s_prepared::memA) < (signed byte) 0 +Inversing boolean not [166] (bool~) mulf8s_prepared::$5 ← (signed byte) mulf8s_prepared::b#2 >= (signed byte) 0 from [165] (bool~) mulf8s_prepared::$4 ← (signed byte) mulf8s_prepared::b#2 < (signed byte) 0 +Inversing boolean not [205] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [204] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0 +Inversing boolean not [387] (bool~) loop::$19 ← (byte) 0 == (byte~) loop::$18 from [386] (bool~) loop::$21 ← (byte) 0 != (byte~) loop::$18 Successful SSA optimization Pass2UnaryNotSimplification +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias plexInit::plexSetScreen1_screen#0 = plexInit::screen#1 plexInit::plexSetScreen1_screen#1 Alias PLEX_SCREEN_PTR#1 = plexInit::plexSetScreen1_$0 PLEX_SCREEN_PTR#22 Alias PLEX_SCREEN_PTR#15 = PLEX_SCREEN_PTR#8 PLEX_SCREEN_PTR#2 @@ -2118,32 +1725,10 @@ Alias plexSort::nxt_idx#0 = plexSort::nxt_idx#3 Alias plexSort::s#1 = plexSort::s#4 Alias plexSort::nxt_idx#1 = plexSort::nxt_idx#2 Alias plexSort::m#5 = plexSort::m#6 -Alias plex_show_idx#1 = plex_show_idx#41 -Alias plex_sprite_idx#1 = plex_sprite_idx#41 -Alias plex_sprite_msb#1 = plex_sprite_msb#40 -Alias plex_show_idx#11 = plex_show_idx#22 plex_show_idx#34 plex_show_idx#2 -Alias plex_sprite_idx#11 = plex_sprite_idx#22 plex_sprite_idx#34 plex_sprite_idx#2 -Alias plex_sprite_msb#12 = plex_sprite_msb#23 plex_sprite_msb#32 plex_sprite_msb#2 -Alias plex_free_next#0 = plex_free_next#11 plex_free_next#1 Alias plexShowSprite::plex_sprite_idx2#0 = plexShowSprite::$0 plexShowSprite::plex_sprite_idx2#2 plexShowSprite::plex_sprite_idx2#1 Alias plexShowSprite::plexFreeAdd1_ypos#0 = plexShowSprite::ypos#0 plexShowSprite::plexFreeAdd1_ypos#1 -Alias plex_free_next#12 = plex_free_next#21 -Alias plex_show_idx#12 = plex_show_idx#24 plex_show_idx#13 plex_show_idx#25 plex_show_idx#26 Alias PLEX_SCREEN_PTR#16 = PLEX_SCREEN_PTR#23 PLEX_SCREEN_PTR#9 -Alias plex_sprite_idx#12 = plex_sprite_idx#24 plex_sprite_idx#13 plex_sprite_idx#25 plex_sprite_idx#26 -Alias plex_sprite_msb#13 = plex_sprite_msb#33 plex_sprite_msb#41 plex_sprite_msb#24 plex_sprite_msb#14 -Alias plex_free_next#2 = plexShowSprite::plexFreeAdd1_$2 plex_free_next#40 plex_free_next#32 plex_free_next#33 -Alias plex_sprite_idx#27 = plex_sprite_idx#3 plexShowSprite::$6 -Alias plex_free_next#22 = plex_free_next#23 -Alias plex_show_idx#27 = plex_show_idx#3 -Alias plex_free_next#13 = plex_free_next#3 -Alias plex_sprite_idx#15 = plex_sprite_idx#4 -Alias plex_show_idx#15 = plex_show_idx#4 -Alias plex_sprite_msb#16 = plex_sprite_msb#5 Alias PLEX_SCREEN_PTR#0 = PLEX_SCREEN_PTR#26 PLEX_SCREEN_PTR#21 -Alias plex_show_idx#0 = plex_show_idx#40 plex_show_idx#33 -Alias plex_sprite_idx#0 = plex_sprite_idx#40 plex_sprite_idx#33 -Alias plex_sprite_msb#0 = plex_sprite_msb#39 plex_sprite_msb#31 Alias mulf_init::c#2 = mulf_init::c#3 Alias mulf_init::sqr#4 = mulf_init::sqr#5 mulf_init::sqr#6 Alias mulf_init::sqr1_lo#2 = mulf_init::sqr1_lo#4 mulf_init::sqr1_lo#5 @@ -2185,85 +1770,36 @@ Alias keyboard_key_pressed::colidx#0 = keyboard_key_pressed::$0 keyboard_key_pre Alias keyboard_key_pressed::rowidx#0 = keyboard_key_pressed::$1 Alias keyboard_matrix_read::return#2 = keyboard_matrix_read::return#4 Alias keyboard_key_pressed::return#0 = keyboard_key_pressed::$3 keyboard_key_pressed::return#4 keyboard_key_pressed::return#1 -Alias plex_show_idx#28 = plex_show_idx#35 -Alias plex_sprite_idx#28 = plex_sprite_idx#35 -Alias plex_sprite_msb#25 = plex_sprite_msb#34 -Alias plex_free_next#24 = plex_free_next#34 Alias PLEX_SCREEN_PTR#10 = PLEX_SCREEN_PTR#3 PLEX_SCREEN_PTR#24 PLEX_SCREEN_PTR#18 PLEX_SCREEN_PTR#11 PLEX_SCREEN_PTR#4 -Alias plex_show_idx#16 = plex_show_idx#5 plex_show_idx#29 plex_show_idx#17 plex_show_idx#6 -Alias plex_sprite_idx#16 = plex_sprite_idx#5 plex_sprite_idx#29 plex_sprite_idx#17 plex_sprite_idx#6 -Alias plex_sprite_msb#17 = plex_sprite_msb#6 plex_sprite_msb#26 plex_sprite_msb#18 plex_sprite_msb#7 -Alias plex_free_next#14 = plex_free_next#5 plex_free_next#25 plex_free_next#15 plex_free_next#6 Alias PLEX_SCREEN_PTR#12 = PLEX_SCREEN_PTR#5 Alias PLEX_SCREEN_PTR#31 = PLEX_SCREEN_PTR#33 Alias PLEX_SCREEN_PTR#13 = PLEX_SCREEN_PTR#28 PLEX_SCREEN_PTR#29 PLEX_SCREEN_PTR#25 PLEX_SCREEN_PTR#20 PLEX_SCREEN_PTR#6 Alias keyboard_key_pressed::return#2 = keyboard_key_pressed::return#5 Alias loop::angle#2 = loop::angle#4 loop::a#0 -Alias plex_show_idx#46 = plex_show_idx#48 -Alias plex_sprite_idx#46 = plex_sprite_idx#48 -Alias plex_sprite_msb#46 = plex_sprite_msb#48 -Alias plex_free_next#46 = plex_free_next#47 Alias PLEX_SCREEN_PTR#45 = PLEX_SCREEN_PTR#46 Alias mulf8s::return#2 = mulf8s::return#5 Alias loop::i#2 = loop::i#4 loop::i#3 Alias loop::r#2 = loop::r#3 loop::r#4 Alias loop::a#2 = loop::a#3 loop::a#4 -Alias plex_show_idx#30 = plex_show_idx#42 plex_show_idx#44 plex_show_idx#37 -Alias plex_sprite_idx#30 = plex_sprite_idx#42 plex_sprite_idx#44 plex_sprite_idx#37 -Alias plex_sprite_msb#27 = plex_sprite_msb#42 plex_sprite_msb#44 plex_sprite_msb#36 -Alias plex_free_next#26 = plex_free_next#41 plex_free_next#44 plex_free_next#36 Alias loop::angle#10 = loop::angle#9 loop::angle#7 loop::angle#5 loop::angle#3 Alias PLEX_SCREEN_PTR#40 = PLEX_SCREEN_PTR#43 PLEX_SCREEN_PTR#44 PLEX_SCREEN_PTR#42 PLEX_SCREEN_PTR#41 Alias loop::x#0 = loop::$3 Alias mulf8s::return#3 = mulf8s::return#6 Alias loop::y#0 = loop::$7 -Alias plex_show_idx#18 = plex_show_idx#7 -Alias plex_sprite_idx#18 = plex_sprite_idx#7 -Alias plex_sprite_msb#19 = plex_sprite_msb#8 -Alias plex_free_next#16 = plex_free_next#7 -Alias plex_free_next#37 = plex_free_next#42 -Alias plex_sprite_idx#50 = plex_sprite_idx#51 -Alias plex_show_idx#50 = plex_show_idx#51 -Alias plex_sprite_msb#50 = plex_sprite_msb#51 Alias PLEX_SCREEN_PTR#37 = PLEX_SCREEN_PTR#39 Alias loop::angle#19 = loop::angle#20 -Alias plex_free_next#17 = plex_free_next#27 plex_free_next#45 plex_free_next#43 -Alias plex_sprite_idx#43 = plex_sprite_idx#47 plex_sprite_idx#49 plex_sprite_idx#45 -Alias plex_show_idx#43 = plex_show_idx#47 plex_show_idx#49 plex_show_idx#45 -Alias plex_sprite_msb#43 = plex_sprite_msb#47 plex_sprite_msb#49 plex_sprite_msb#45 Alias loop::i1#5 = loop::i1#7 loop::i1#8 loop::i1#6 Alias PLEX_SCREEN_PTR#32 = PLEX_SCREEN_PTR#35 PLEX_SCREEN_PTR#36 PLEX_SCREEN_PTR#34 Alias loop::angle#15 = loop::angle#17 loop::angle#18 loop::angle#16 Alias loop::plexFreeNextYpos1_return#0 = loop::plexFreeNextYpos1_return#2 loop::plexFreeNextYpos1_return#1 loop::plexFreeNextYpos1_return#3 loop::$13 loop::rasterY#0 -Alias plex_sprite_idx#23 = plex_sprite_idx#38 -Alias plex_show_idx#23 = plex_show_idx#38 -Alias plex_free_next#28 = plex_free_next#38 -Alias plex_sprite_msb#28 = plex_sprite_msb#37 Alias loop::i1#2 = loop::i1#3 loop::i1#4 Alias PLEX_SCREEN_PTR#27 = PLEX_SCREEN_PTR#30 PLEX_SCREEN_PTR#38 PLEX_SCREEN_PTR#50 PLEX_SCREEN_PTR#49 Alias loop::angle#11 = loop::angle#13 loop::angle#14 loop::angle#12 loop::angle#8 -Alias plex_free_next#18 = plex_free_next#8 plex_free_next#39 plex_free_next#30 -Alias plex_sprite_idx#19 = plex_sprite_idx#8 plex_sprite_idx#39 plex_sprite_idx#32 -Alias plex_show_idx#19 = plex_show_idx#8 plex_show_idx#39 plex_show_idx#32 -Alias plex_sprite_msb#20 = plex_sprite_msb#9 plex_sprite_msb#38 plex_sprite_msb#30 Alias keyboard_key_pressed::return#3 = keyboard_key_pressed::return#6 -Alias plex_show_idx#20 = plex_show_idx#9 -Alias plex_sprite_idx#20 = plex_sprite_idx#9 -Alias plex_sprite_msb#10 = plex_sprite_msb#21 -Alias plex_free_next#19 = plex_free_next#9 -Alias plex_free_next#31 = plex_free_next#4 Alias PLEX_SCREEN_PTR#14 = PLEX_SCREEN_PTR#7 -Alias plex_show_idx#10 = plex_show_idx#21 -Alias plex_sprite_idx#10 = plex_sprite_idx#21 -Alias plex_sprite_msb#11 = plex_sprite_msb#22 -Alias plex_free_next#10 = plex_free_next#20 Successful SSA optimization Pass2AliasElimination -Alias plex_sprite_idx#12 = plex_sprite_idx#14 -Alias plex_show_idx#12 = plex_show_idx#14 -Alias plex_sprite_msb#13 = plex_sprite_msb#15 -Alias plex_free_next#13 = plex_free_next#22 plex_free_next#2 -Alias plex_sprite_idx#15 = plex_sprite_idx#27 -Alias plex_show_idx#15 = plex_show_idx#27 +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias mulf_init::sqr1_lo#2 = mulf_init::sqr1_lo#3 Alias mulf_init::sqr1_hi#2 = mulf_init::sqr1_hi#3 Alias mulf_init::c#1 = mulf_init::c#4 @@ -2272,19 +1808,14 @@ Alias mulf_init::x_255#1 = mulf_init::x_255#4 Alias mulf_init::sqr2_hi#1 = mulf_init::sqr2_hi#4 Alias mulf8s_prepared::b#1 = mulf8s_prepared::b#2 Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Identical Phi Values (byte*) plexInit::plexSetScreen1_screen#0 (byte*) plexInit::screen#0 Identical Phi Values (byte*) PLEX_SCREEN_PTR#15 (byte*) PLEX_SCREEN_PTR#1 Identical Phi Values (byte) plexSort::nxt_y#1 (byte) plexSort::nxt_y#0 Identical Phi Values (byte) plexSort::nxt_idx#1 (byte) plexSort::nxt_idx#0 Identical Phi Values (byte) plexSort::m#5 (byte) plexSort::m#2 -Identical Phi Values (byte) plex_show_idx#11 (byte) plex_show_idx#1 -Identical Phi Values (byte) plex_sprite_idx#11 (byte) plex_sprite_idx#1 -Identical Phi Values (byte) plex_sprite_msb#12 (byte) plex_sprite_msb#1 -Identical Phi Values (byte) plex_sprite_idx#12 (byte) plex_sprite_idx#23 -Identical Phi Values (byte) plex_show_idx#12 (byte) plex_show_idx#23 -Identical Phi Values (byte) plex_free_next#12 (byte) plex_free_next#28 Identical Phi Values (byte*) PLEX_SCREEN_PTR#16 (byte*) PLEX_SCREEN_PTR#27 -Identical Phi Values (byte) plex_sprite_msb#13 (byte) plex_sprite_msb#28 Identical Phi Values (byte) mulf8u_prepare::a#1 (byte) mulf8u_prepare::a#0 Identical Phi Values (byte) mulf8u_prepared::b#1 (byte) mulf8u_prepared::b#0 Identical Phi Values (signed byte) mulf8s_prepared::b#1 (signed byte) mulf8s_prepared::b#0 @@ -2296,63 +1827,23 @@ Identical Phi Values (void*) memset::str#4 (void*) memset::str#2 Identical Phi Values (byte) memset::c#1 (byte) memset::c#3 Identical Phi Values (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0 Identical Phi Values (byte*) PLEX_SCREEN_PTR#17 (byte*) PLEX_SCREEN_PTR#0 -Identical Phi Values (byte) plex_show_idx#28 (byte) plex_show_idx#0 -Identical Phi Values (byte) plex_sprite_idx#28 (byte) plex_sprite_idx#0 -Identical Phi Values (byte) plex_sprite_msb#25 (byte) plex_sprite_msb#0 -Identical Phi Values (byte) plex_free_next#24 (byte) plex_free_next#31 Identical Phi Values (byte*) PLEX_SCREEN_PTR#10 (byte*) PLEX_SCREEN_PTR#13 -Identical Phi Values (byte) plex_show_idx#16 (byte) plex_show_idx#20 -Identical Phi Values (byte) plex_sprite_idx#16 (byte) plex_sprite_idx#20 -Identical Phi Values (byte) plex_sprite_msb#17 (byte) plex_sprite_msb#10 -Identical Phi Values (byte) plex_free_next#14 (byte) plex_free_next#19 Identical Phi Values (byte*) PLEX_SCREEN_PTR#19 (byte*) PLEX_SCREEN_PTR#17 Identical Phi Values (byte*) PLEX_SCREEN_PTR#12 (byte*) PLEX_SCREEN_PTR#15 Identical Phi Values (byte*) PLEX_SCREEN_PTR#31 (byte*) PLEX_SCREEN_PTR#12 Identical Phi Values (byte*) PLEX_SCREEN_PTR#13 (byte*) PLEX_SCREEN_PTR#31 -Identical Phi Values (byte) plex_show_idx#36 (byte) plex_show_idx#28 -Identical Phi Values (byte) plex_sprite_idx#36 (byte) plex_sprite_idx#28 -Identical Phi Values (byte) plex_sprite_msb#35 (byte) plex_sprite_msb#25 -Identical Phi Values (byte) plex_free_next#35 (byte) plex_free_next#24 Identical Phi Values (byte*) PLEX_SCREEN_PTR#48 (byte*) PLEX_SCREEN_PTR#10 Identical Phi Values (byte) loop::angle#2 (byte) loop::angle#6 -Identical Phi Values (byte) plex_show_idx#46 (byte) plex_show_idx#31 -Identical Phi Values (byte) plex_sprite_idx#46 (byte) plex_sprite_idx#31 -Identical Phi Values (byte) plex_sprite_msb#46 (byte) plex_sprite_msb#29 -Identical Phi Values (byte) plex_free_next#46 (byte) plex_free_next#29 Identical Phi Values (byte*) PLEX_SCREEN_PTR#45 (byte*) PLEX_SCREEN_PTR#47 -Identical Phi Values (byte) plex_show_idx#30 (byte) plex_show_idx#46 -Identical Phi Values (byte) plex_sprite_idx#30 (byte) plex_sprite_idx#46 -Identical Phi Values (byte) plex_sprite_msb#27 (byte) plex_sprite_msb#46 -Identical Phi Values (byte) plex_free_next#26 (byte) plex_free_next#46 Identical Phi Values (byte) loop::angle#10 (byte) loop::angle#2 Identical Phi Values (byte*) PLEX_SCREEN_PTR#40 (byte*) PLEX_SCREEN_PTR#45 -Identical Phi Values (byte) plex_show_idx#18 (byte) plex_show_idx#11 -Identical Phi Values (byte) plex_sprite_idx#18 (byte) plex_sprite_idx#11 -Identical Phi Values (byte) plex_sprite_msb#19 (byte) plex_sprite_msb#12 -Identical Phi Values (byte) plex_free_next#16 (byte) plex_free_next#0 -Identical Phi Values (byte) plex_free_next#37 (byte) plex_free_next#16 -Identical Phi Values (byte) plex_sprite_idx#50 (byte) plex_sprite_idx#18 -Identical Phi Values (byte) plex_show_idx#50 (byte) plex_show_idx#18 -Identical Phi Values (byte) plex_sprite_msb#50 (byte) plex_sprite_msb#19 Identical Phi Values (byte*) PLEX_SCREEN_PTR#37 (byte*) PLEX_SCREEN_PTR#40 Identical Phi Values (byte) loop::angle#19 (byte) loop::angle#1 Identical Phi Values (byte) loop::rasterY#1 (byte) loop::plexFreeNextYpos1_return#0 -Identical Phi Values (byte) plex_sprite_idx#23 (byte) plex_sprite_idx#43 -Identical Phi Values (byte) plex_show_idx#23 (byte) plex_show_idx#43 -Identical Phi Values (byte) plex_free_next#28 (byte) plex_free_next#17 -Identical Phi Values (byte) plex_sprite_msb#28 (byte) plex_sprite_msb#43 Identical Phi Values (byte) loop::i1#2 (byte) loop::i1#5 Identical Phi Values (byte*) PLEX_SCREEN_PTR#27 (byte*) PLEX_SCREEN_PTR#32 Identical Phi Values (byte) loop::angle#11 (byte) loop::angle#15 -Identical Phi Values (byte) plex_free_next#18 (byte) plex_free_next#13 -Identical Phi Values (byte) plex_sprite_idx#19 (byte) plex_sprite_idx#15 -Identical Phi Values (byte) plex_show_idx#19 (byte) plex_show_idx#15 -Identical Phi Values (byte) plex_sprite_msb#20 (byte) plex_sprite_msb#16 Identical Phi Values (byte*) PLEX_SCREEN_PTR#14 (byte*) PLEX_SCREEN_PTR#10 -Identical Phi Values (byte) plex_show_idx#10 (byte) plex_show_idx#16 -Identical Phi Values (byte) plex_sprite_idx#10 (byte) plex_sprite_idx#16 -Identical Phi Values (byte) plex_sprite_msb#11 (byte) plex_sprite_msb#17 -Identical Phi Values (byte) plex_free_next#10 (byte) plex_free_next#14 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte) plexSort::m#3 (byte) plexSort::m#2 Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 @@ -2361,48 +1852,39 @@ Identical Phi Values (byte) loop::angle#15 (byte) loop::angle#1 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) PLEX_SCREEN_PTR#47 (byte*) PLEX_SCREEN_PTR#1 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [80] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD +Identified duplicate assignment right side [73] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) plexInit::$1 [11] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 Simple Condition (bool~) plexSort::$3 [19] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 Simple Condition (bool~) plexSort::$8 [23] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [42] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 -Simple Condition (bool~) plexShowSprite::$4 [61] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -Simple Condition (bool~) plexShowSprite::$8 [70] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return -Simple Condition (bool~) mulf_init::$0 [82] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [86] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [103] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [109] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf8s_prepared::$3 [131] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$5 [134] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) memset::$1 [156] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [163] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) plexShowSprite::$4 [62] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 +Simple Condition (bool~) plexShowSprite::$8 [72] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return +Simple Condition (bool~) mulf_init::$0 [83] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [87] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [104] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [110] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf8s_prepared::$3 [132] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$5 [135] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) memset::$1 [157] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [164] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 Simple Condition (bool~) init::$7 [206] if((byte) init::i#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 Simple Condition (bool~) init::$8 [213] if((byte) init::i1#1!=rangelast(0,7)) goto init::@3 Simple Condition (bool~) exit::$1 [226] if((byte) 0!=(byte~) exit::$0) goto exit::@1 Simple Condition (bool~) loop::$0 [234] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@4 Simple Condition (bool~) loop::$9 [263] if((byte) loop::i#1!=rangelast(0,NUM_BOBS-1)) goto loop::@6 -Simple Condition (bool~) loop::$12 [272] if((byte~) loop::$11!=(byte) 0) goto loop::@8 -Simple Condition (bool~) loop::$14 [279] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@15 -Simple Condition (bool~) loop::$17 [285] if((byte) loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 -Simple Condition (bool~) loop::$19 [292] if((byte) 0==(byte~) loop::$18) goto loop::@1 +Simple Condition (bool~) loop::$12 [271] if((byte~) loop::$11!=(byte) 0) goto loop::@8 +Simple Condition (bool~) loop::$14 [278] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@15 +Simple Condition (bool~) loop::$17 [283] if((byte) loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 +Simple Condition (bool~) loop::$19 [290] if((byte) 0==(byte~) loop::$18) goto loop::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Rewriting && if()-condition to two if()s [30] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting -Negating conditional jump and destination [292] if((byte) 0!=(byte~) loop::$18) goto loop::@return +Negating conditional jump and destination [290] if((byte) 0!=(byte~) loop::$18) goto loop::@return Constant (const byte*) PLEX_SCREEN_PTR#0 = (byte*)$400+$3f8 -Constant (const byte) plex_show_idx#0 = 0 -Constant (const byte) plex_sprite_idx#0 = 0 -Constant (const byte) plex_sprite_msb#0 = 1 Constant (const byte) plexInit::i#0 = 0 Constant (const byte) plexSort::m#0 = 0 -Constant (const byte) plex_show_idx#1 = 0 -Constant (const byte) plex_sprite_idx#1 = 0 -Constant (const byte) plex_sprite_msb#1 = 1 Constant (const byte) plexSort::plexFreePrepare1_s#0 = 0 -Constant (const byte) plex_free_next#0 = 0 -Constant (const byte) plex_sprite_msb#4 = 1 -Constant (const byte) plex_free_next#31 = 0 Constant (const word) mulf_init::sqr#0 = 0 Constant (const byte) mulf_init::x_2#0 = 0 Constant (const byte) mulf_init::c#0 = 0 @@ -2430,11 +1912,7 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [156] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -Removing PHI-reference to removed block (loop::@1) in block loop::@return -Removing PHI-reference to removed block (loop::@1) in block loop::@return -Removing PHI-reference to removed block (loop::@1) in block loop::@return -Removing PHI-reference to removed block (loop::@1) in block loop::@return +if() condition always false - eliminating [157] if((const word) memset::num#0<=(byte) 0) goto memset::@1 if() condition always true - replacing block destination [231] if(true) goto loop::@4 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [9] plexInit::i#1 ← ++ plexInit::i#2 to ++ @@ -2449,24 +1927,11 @@ Resolved ranged next value [211] init::i1#1 ← ++ init::i1#2 to ++ Resolved ranged comparison value [213] if(init::i1#1!=rangelast(0,7)) goto init::@3 to (number) 8 Resolved ranged next value [261] loop::i#1 ← ++ loop::i#2 to ++ Resolved ranged comparison value [263] if(loop::i#1!=rangelast(0,NUM_BOBS-1)) goto loop::@6 to (const nomodify byte) NUM_BOBS-(byte) 1+(number) 1 -Resolved ranged next value [283] loop::i1#1 ← ++ loop::i1#5 to ++ -Resolved ranged comparison value [285] if(loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 to (const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1 -Eliminating unused variable - keeping the phi block (byte) plex_show_idx#31 -Eliminating unused variable - keeping the phi block (byte) plex_sprite_idx#31 -Eliminating unused variable - keeping the phi block (byte) plex_sprite_msb#29 -Eliminating unused variable - keeping the phi block (byte) plex_free_next#29 -Eliminating unused variable - keeping the phi block (byte) plex_show_idx#20 -Eliminating unused variable - keeping the phi block (byte) plex_sprite_idx#20 -Eliminating unused variable - keeping the phi block (byte) plex_sprite_msb#10 -Eliminating unused variable - keeping the phi block (byte) plex_free_next#19 +Resolved ranged next value [281] loop::i1#1 ← ++ loop::i1#5 to ++ +Resolved ranged comparison value [283] if(loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 to (const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1 Eliminating unused constant (const void*) memset::return#2 Eliminating unused constant (const byte*) PLEX_SCREEN_PTR#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) plex_show_idx#0 -Eliminating unused constant (const byte) plex_sprite_idx#0 -Eliminating unused constant (const byte) plex_sprite_msb#0 -Eliminating unused constant (const byte) plex_free_next#31 -Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) PLEX_COUNT-1+1 in if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1) goto plexInit::@1 Adding number conversion cast (unumber) 1 in if((byte) plexInit::i#1!=(unumber)(const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1) goto plexInit::@1 Adding number conversion cast (unumber) PLEX_COUNT-2+1 in if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(number) 1) goto plexSort::@1 @@ -2501,34 +1966,39 @@ Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias plexShowSprite::$11 = plexShowSprite::$10 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) plexSort::$5 [19] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 -Simple Condition (bool~) plexSort::$6 [210] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 +Simple Condition (bool~) plexSort::$5 [22] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 +Simple Condition (bool~) plexSort::$6 [220] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [19] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 +Negating conditional jump and destination [22] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [0] (byte*) PLEX_SCREEN_PTR#1 ← (const byte*) plexInit::screen#0 + (word) $3f8 -Constant right-side identified [111] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 +Constant right-side identified [3] (byte*) PLEX_SCREEN_PTR#1 ← (const byte*) plexInit::screen#0 + (word) $3f8 +Constant right-side identified [121] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PLEX_SCREEN_PTR#1 = plexInit::screen#0+$3f8 Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Successful SSA optimization Pass2ConstantIdentification -Inlining Noop Cast [90] (byte~) mulf8s_prepared::$9 ← (byte)(signed byte) mulf8s_prepared::b#0 keeping mulf8s_prepared::b#0 -Inlining Noop Cast [94] (signed word) mulf8s_prepared::return#0 ← (signed word)(word) mulf8s_prepared::m#4 keeping mulf8s_prepared::m#4 -Inlining Noop Cast [96] (byte~) mulf8s_prepared::$13 ← (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) keeping *(mulf8s_prepared::memA) +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 +Inlining Noop Cast [100] (byte~) mulf8s_prepared::$9 ← (byte)(signed byte) mulf8s_prepared::b#0 keeping mulf8s_prepared::b#0 +Inlining Noop Cast [104] (signed word) mulf8s_prepared::return#0 ← (signed word)(word) mulf8s_prepared::m#4 keeping mulf8s_prepared::m#4 +Inlining Noop Cast [106] (byte~) mulf8s_prepared::$13 ← (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) keeping *(mulf8s_prepared::memA) Successful SSA optimization Pass2NopCastInlining -Inlining Noop Cast [105] (signed word) mulf8s_prepared::return#2 ← (signed word)(word) mulf8s_prepared::m#4 keeping mulf8s_prepared::m#4 +Inlining Noop Cast [115] (signed word) mulf8s_prepared::return#2 ← (signed word)(word) mulf8s_prepared::m#4 keeping mulf8s_prepared::m#4 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [24] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 * (byte) 2 -Rewriting multiplication to use shift [33] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [44] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 * (byte) 2 -Rewriting multiplication to use shift and addition[135] (byte~) init::$3 ← (byte) init::i#2 * (byte) 5 -Rewriting multiplication to use shift [137] (byte~) init::$9 ← (byte) init::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [139] (byte~) init::$5 ← (byte) init::i#2 * (byte) 8 -Rewriting multiplication to use shift [167] (signed word~) loop::$2 ← (signed word~) loop::$1 * (signed byte) 2 -Rewriting multiplication to use shift [170] (byte~) loop::$20 ← (byte) loop::i#2 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [177] (signed word~) loop::$6 ← (signed word~) loop::$5 * (signed byte) 2 +Rewriting multiplication to use shift [31] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx * (byte) 2 +Rewriting multiplication to use shift [41] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift and addition[145] (byte~) init::$3 ← (byte) init::i#2 * (byte) 5 +Rewriting multiplication to use shift [147] (byte~) init::$9 ← (byte) init::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [149] (byte~) init::$5 ← (byte) init::i#2 * (byte) 8 +Rewriting multiplication to use shift [177] (signed word~) loop::$2 ← (signed word~) loop::$1 * (signed byte) 2 +Rewriting multiplication to use shift [180] (byte~) loop::$20 ← (byte) loop::i#2 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [187] (signed word~) loop::$6 ← (signed word~) loop::$5 * (signed byte) 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) plexInit::i#0 Inlining constant with var siblings (const byte) plexSort::m#0 @@ -2552,52 +2022,46 @@ Inlining constant with var siblings (const byte) loop::angle#0 Inlining constant with var siblings (const signed byte) loop::r#0 Inlining constant with var siblings (const byte) loop::i#0 Inlining constant with var siblings (const byte) loop::i1#0 -Inlining constant with var siblings (const byte) plex_show_idx#1 -Inlining constant with var siblings (const byte) plex_sprite_idx#1 -Inlining constant with var siblings (const byte) plex_sprite_msb#1 -Inlining constant with var siblings (const byte) plex_free_next#0 -Inlining constant with var siblings (const byte) plex_sprite_msb#4 +Constant inlined keyboard_key_pressed::key#0 = (const nomodify byte) KEY_SPACE Constant inlined mulf_init::c#0 = (byte) 0 +Constant inlined keyboard_key_pressed::key#1 = (const nomodify byte) KEY_SPACE Constant inlined mulf_init::sqr2_lo#0 = (const byte*) mulf_sqr2_lo +Constant inlined mulf_init::sqr#0 = (word) 0 Constant inlined init::i#0 = (byte) 0 +Constant inlined loop::i1#0 = (byte) 0 Constant inlined mulf_init::sqr2_hi#0 = (const byte*) mulf_sqr2_hi Constant inlined plexSort::plexFreePrepare1_s#0 = (byte) 0 Constant inlined plexInit::i#0 = (byte) 0 Constant inlined plexSort::m#0 = (byte) 0 +Constant inlined plexInit::screen#0 = (const nomodify byte*) SCREEN Constant inlined mulf_init::dir#1 = (byte) 1 -Constant inlined plex_sprite_msb#4 = (byte) 1 +Constant inlined loop::angle#0 = (byte) 0 Constant inlined memset::$2 = (byte*)(const void*) memset::str#0 Constant inlined mulf_init::dir#0 = (byte) $ff -Constant inlined plex_show_idx#1 = (byte) 0 -Constant inlined plex_sprite_idx#1 = (byte) 0 -Constant inlined plex_sprite_msb#1 = (byte) 1 -Constant inlined plex_free_next#0 = (byte) 0 -Constant inlined mulf_init::x_255#0 = (byte) -1 -Constant inlined mulf_init::x_2#0 = (byte) 0 -Constant inlined keyboard_key_pressed::key#0 = (const nomodify byte) KEY_SPACE -Constant inlined keyboard_key_pressed::key#1 = (const nomodify byte) KEY_SPACE -Constant inlined mulf_init::sqr#0 = (word) 0 -Constant inlined loop::i1#0 = (byte) 0 -Constant inlined plexInit::screen#0 = (const nomodify byte*) SCREEN -Constant inlined loop::angle#0 = (byte) 0 Constant inlined loop::i#0 = (byte) 0 Constant inlined mulf_init::sqr1_hi#0 = (const byte*) mulf_sqr1_hi+(byte) 1 Constant inlined init::i1#0 = (byte) 0 Constant inlined mulf_init::sqr1_lo#0 = (const byte*) mulf_sqr1_lo+(byte) 1 +Constant inlined mulf_init::x_255#0 = (byte) -1 Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0 Constant inlined loop::r#0 = (signed byte) $1e +Constant inlined mulf_init::x_2#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in assignment *(PLEX_SORTED_IDX+1 + plexSort::$1) Consolidated array index constant in assignment *(PLEX_SORTED_IDX+1 + plexSort::$4) Successful SSA optimization Pass2ConstantAdditionElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias plexSort::m#2 = plexSort::$1 Alias plexSort::s#3 = plexSort::$4 Alias init::$3 = init::$11 Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Identical Phi Values (byte) keyboard_key_pressed::key#2 (const nomodify byte) KEY_SPACE Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [111] (byte) keyboard_key_pressed::colidx#0 ← (const nomodify byte) KEY_SPACE & (byte) 7 -Constant right-side identified [112] (byte) keyboard_key_pressed::rowidx#0 ← (const nomodify byte) KEY_SPACE >> (byte) 3 +Constant right-side identified [121] (byte) keyboard_key_pressed::colidx#0 ← (const nomodify byte) KEY_SPACE & (byte) 7 +Constant right-side identified [122] (byte) keyboard_key_pressed::rowidx#0 ← (const nomodify byte) KEY_SPACE >> (byte) 3 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) keyboard_key_pressed::colidx#0 = KEY_SPACE&7 Constant (const byte) keyboard_key_pressed::rowidx#0 = KEY_SPACE>>3 @@ -2611,11 +2075,14 @@ Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *(keyboard_matrix_row_bitmask+keyboard_key_pressed::rowidx#0) Consolidated array index constant in *(keyboard_matrix_col_bitmask+keyboard_key_pressed::colidx#0) Successful SSA optimization Pass2ConstantAdditionElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Added new block during phi lifting plexInit::@4(between plexInit::@1 and plexInit::@1) Added new block during phi lifting plexSort::@9(between plexSort::@2 and plexSort::@1) Added new block during phi lifting plexSort::@10(between plexSort::@8 and plexSort::@3) Added new block during phi lifting plexSort::@11(between plexSort::plexFreePrepare1_@1 and plexSort::plexFreePrepare1_@1) -Added new block during phi lifting plexShowSprite::@8(between plexShowSprite::@2 and plexShowSprite::@return) Added new block during phi lifting mulf_init::@17(between mulf_init::@2 and mulf_init::@4) Added new block during phi lifting mulf_init::@18(between mulf_init::@10 and mulf_init::@12) Added new block during phi lifting mulf8s_prepared::@7(between mulf8s_prepared::@6 and mulf8s_prepared::@1) @@ -2626,8 +2093,6 @@ Added new block during phi lifting loop::@35(between loop::@34 and loop::@1) Added new block during phi lifting loop::@36(between loop::@31 and loop::@6) Added new block during phi lifting loop::@37(between loop::@33 and loop::@14) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @4 -Adding NOP phi() at start of @9 Adding NOP phi() at start of @37 Adding NOP phi() at start of @38 Adding NOP phi() at start of @end @@ -2640,11 +2105,8 @@ Adding NOP phi() at start of loop Adding NOP phi() at start of loop::@10 Adding NOP phi() at start of loop::plexFreeNextYpos1_@return Adding NOP phi() at start of loop::@29 -Adding NOP phi() at start of plexShowSprite::@6 Adding NOP phi() at start of plexSort -Adding NOP phi() at start of plexSort::@6 Adding NOP phi() at start of plexSort::plexFreePrepare1 -Adding NOP phi() at start of plexSort::plexFreePrepare1_@2 Adding NOP phi() at start of mulf8s::@3 Adding NOP phi() at start of init::@5 Adding NOP phi() at start of init::@4 @@ -2660,32 +2122,27 @@ Adding NOP phi() at start of plexInit Adding NOP phi() at start of plexInit::plexSetScreen1 Adding NOP phi() at start of plexInit::@3 CALL GRAPH -Calls in [] to main:4 -Calls in [main] to init:8 loop:10 exit:12 -Calls in [exit] to keyboard_key_pressed:17 -Calls in [keyboard_key_pressed] to keyboard_matrix_read:23 -Calls in [loop] to mulf8s:42 mulf8s:54 plexSort:66 plexShowSprite:79 keyboard_key_pressed:83 +Calls in [] to main:6 +Calls in [main] to init:10 loop:12 exit:14 +Calls in [exit] to keyboard_key_pressed:19 +Calls in [keyboard_key_pressed] to keyboard_matrix_read:25 +Calls in [loop] to mulf8s:44 mulf8s:56 plexSort:68 plexShowSprite:81 keyboard_key_pressed:85 Calls in [mulf8s] to mulf8u_prepare:151 mulf8s_prepared:154 Calls in [mulf8s_prepared] to mulf8u_prepared:158 Calls in [init] to plexInit:184 mulf_init:204 memset:206 -Created 33 initial phi equivalence classes -Not coalescing [35] loop::a#6 ← loop::angle#6 -Coalesced [40] mulf8s::mulf8s_prepare1_a#3 ← mulf8s::a#0 -Coalesced [41] mulf8s::b#7 ← mulf8s::b#0 -Coalesced [52] mulf8s::mulf8s_prepare1_a#2 ← mulf8s::a#1 -Coalesced [53] mulf8s::b#6 ← mulf8s::b#1 -Coalesced [87] loop::angle#21 ← loop::angle#1 -Coalesced [89] plex_free_next#48 ← plex_free_next#13 -Coalesced [90] plex_sprite_idx#52 ← plex_sprite_idx#15 -Coalesced [91] plex_show_idx#52 ← plex_show_idx#15 -Coalesced [92] plex_sprite_msb#53 ← plex_sprite_msb#16 -Coalesced [93] loop::i1#9 ← loop::i1#1 -Coalesced [94] loop::r#5 ← loop::r#1 -Coalesced [95] loop::a#5 ← loop::a#1 -Coalesced [96] loop::i#5 ← loop::i#1 -Coalesced [121] plex_sprite_msb#52 ← plex_sprite_msb#3 -Not coalescing [128] plexSort::s#6 ← plexSort::m#2 +Created 28 initial phi equivalence classes +Not coalescing [37] loop::a#6 ← loop::angle#6 +Coalesced [42] mulf8s::mulf8s_prepare1_a#3 ← mulf8s::a#0 +Coalesced [43] mulf8s::b#7 ← mulf8s::b#0 +Coalesced [54] mulf8s::mulf8s_prepare1_a#2 ← mulf8s::a#1 +Coalesced [55] mulf8s::b#6 ← mulf8s::b#1 +Coalesced [89] loop::angle#21 ← loop::angle#1 +Coalesced [91] loop::i1#9 ← loop::i1#1 +Coalesced [92] loop::r#5 ← loop::r#1 +Coalesced [93] loop::a#5 ← loop::a#1 +Coalesced [94] loop::i#5 ← loop::i#1 +Not coalescing [126] plexSort::s#6 ← plexSort::m#2 Coalesced [146] plexSort::plexFreePrepare1_s#3 ← plexSort::plexFreePrepare1_s#1 Coalesced [147] plexSort::m#7 ← plexSort::m#1 Coalesced [148] plexSort::s#5 ← plexSort::s#1 @@ -2711,9 +2168,7 @@ Coalesced [261] mulf_init::x_2#6 ← mulf_init::x_2#2 Coalesced [262] mulf_init::sqr#8 ← mulf_init::sqr#4 Coalesced (already) [263] mulf_init::x_2#7 ← mulf_init::x_2#3 Coalesced [272] plexInit::i#3 ← plexInit::i#1 -Coalesced down to 28 phi equivalence classes -Culled Empty Block (label) @4 -Culled Empty Block (label) @9 +Coalesced down to 24 phi equivalence classes Culled Empty Block (label) @38 Culled Empty Block (label) loop::@10 Culled Empty Block (label) loop::plexFreeNextYpos1_@return @@ -2721,9 +2176,6 @@ Culled Empty Block (label) loop::@29 Culled Empty Block (label) loop::@35 Culled Empty Block (label) loop::@37 Culled Empty Block (label) loop::@36 -Culled Empty Block (label) plexShowSprite::@6 -Culled Empty Block (label) plexSort::@6 -Culled Empty Block (label) plexSort::plexFreePrepare1_@2 Culled Empty Block (label) plexSort::@11 Culled Empty Block (label) plexSort::@9 Culled Empty Block (label) plexSort::@10 @@ -2741,11 +2193,13 @@ Culled Empty Block (label) mulf_init::@15 Culled Empty Block (label) mulf_init::@17 Culled Empty Block (label) plexInit::@3 Culled Empty Block (label) plexInit::@4 -Renumbering block @37 to @1 -Renumbering block plexSort::@8 to plexSort::@6 +Renumbering block @4 to @1 +Renumbering block @9 to @2 +Renumbering block @37 to @3 +Renumbering block plexSort::@8 to plexSort::@7 Renumbering block plexShowSprite::@4 to plexShowSprite::@3 -Renumbering block plexShowSprite::@7 to plexShowSprite::@4 -Renumbering block plexShowSprite::@8 to plexShowSprite::@5 +Renumbering block plexShowSprite::@6 to plexShowSprite::@4 +Renumbering block plexShowSprite::@7 to plexShowSprite::@5 Renumbering block mulf_init::@4 to mulf_init::@3 Renumbering block mulf_init::@7 to mulf_init::@4 Renumbering block mulf_init::@9 to mulf_init::@5 @@ -2776,7 +2230,7 @@ Renumbering block loop::@32 to loop::@13 Renumbering block loop::@33 to loop::@14 Renumbering block loop::@34 to loop::@15 Adding NOP phi() at start of @begin -Adding NOP phi() at start of @1 +Adding NOP phi() at start of @3 Adding NOP phi() at start of @end Adding NOP phi() at start of main::@1 Adding NOP phi() at start of main::@2 @@ -2784,7 +2238,6 @@ Adding NOP phi() at start of exit Adding NOP phi() at start of exit::@1 Adding NOP phi() at start of keyboard_key_pressed Adding NOP phi() at start of loop -Adding NOP phi() at start of plexShowSprite::@5 Adding NOP phi() at start of plexSort Adding NOP phi() at start of plexSort::plexFreePrepare1 Adding NOP phi() at start of init::@4 @@ -2800,454 +2253,467 @@ FINAL CONTROL FLOW GRAPH [0] phi() to:@1 @1: scope:[] from @begin - [1] phi() - [2] call main + [1] (volatile byte) plex_show_idx ← (byte) 0 + [2] (volatile byte) plex_sprite_idx ← (byte) 0 + [3] (volatile byte) plex_sprite_msb ← (byte) 1 + to:@2 +@2: scope:[] from @1 + [4] (volatile byte) plex_free_next ← (byte) 0 + to:@3 +@3: scope:[] from @2 + [5] phi() + [6] call main to:@end -@end: scope:[] from @1 - [3] phi() +@end: scope:[] from @3 + [7] phi() (void()) main() -main: scope:[main] from @1 +main: scope:[main] from @3 asm { sei } - [5] call init + [9] call init to:main::@1 main::@1: scope:[main] from main - [6] phi() - [7] call loop + [10] phi() + [11] call loop to:main::@2 main::@2: scope:[main] from main::@1 - [8] phi() - [9] call exit + [12] phi() + [13] call exit to:main::@3 main::@3: scope:[main] from main::@2 asm { cli } to:main::@return main::@return: scope:[main] from main::@3 - [11] return + [15] return to:@return (void()) exit() exit: scope:[exit] from main::@2 - [12] phi() + [16] phi() to:exit::@1 exit::@1: scope:[exit] from exit exit::@2 - [13] phi() - [14] call keyboard_key_pressed - [15] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 + [17] phi() + [18] call keyboard_key_pressed + [19] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 to:exit::@2 exit::@2: scope:[exit] from exit::@1 - [16] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 - [17] if((byte) 0!=(byte~) exit::$0) goto exit::@1 + [20] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 + [21] if((byte) 0!=(byte~) exit::$0) goto exit::@1 to:exit::@return exit::@return: scope:[exit] from exit::@2 - [18] return + [22] return to:@return (byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key) keyboard_key_pressed: scope:[keyboard_key_pressed] from exit::@1 loop::@10 - [19] phi() - [20] call keyboard_matrix_read - [21] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + [23] phi() + [24] call keyboard_matrix_read + [25] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 to:keyboard_key_pressed::@1 keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_pressed - [22] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 - [23] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) + [26] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 + [27] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) to:keyboard_key_pressed::@return keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1 - [24] return + [28] return to:@return (byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed - [25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) - [26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) + [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) + [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) to:keyboard_matrix_read::@return keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read - [27] return + [31] return to:@return (void()) loop() loop: scope:[loop] from main::@1 - [28] phi() + [32] phi() to:loop::@1 loop::@1: scope:[loop] from loop loop::@15 - [29] (byte) loop::angle#6 ← phi( loop/(byte) 0 loop::@15/(byte) loop::angle#1 ) + [33] (byte) loop::angle#6 ← phi( loop/(byte) 0 loop::@15/(byte) loop::angle#1 ) to:loop::@2 loop::@2: scope:[loop] from loop::@1 loop::@2 - [30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 + [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 to:loop::@3 loop::@3: scope:[loop] from loop::@2 - [31] *((const nomodify byte*) BORDERCOL) ← (byte) $f - [32] (byte) loop::a#6 ← (byte) loop::angle#6 + [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f + [36] (byte) loop::a#6 ← (byte) loop::angle#6 to:loop::@4 loop::@4: scope:[loop] from loop::@12 loop::@3 - [33] (byte) loop::i#2 ← phi( loop::@12/(byte) loop::i#1 loop::@3/(byte) 0 ) - [33] (byte) loop::a#2 ← phi( loop::@12/(byte) loop::a#1 loop::@3/(byte) loop::a#6 ) - [33] (signed byte) loop::r#2 ← phi( loop::@12/(signed byte) loop::r#1 loop::@3/(signed byte) $1e ) - [34] *((const nomodify byte*) BORDERCOL) ← (byte) 6 - [35] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 - [36] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) - [37] call mulf8s - [38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 + [37] (byte) loop::i#2 ← phi( loop::@12/(byte) loop::i#1 loop::@3/(byte) 0 ) + [37] (byte) loop::a#2 ← phi( loop::@12/(byte) loop::a#1 loop::@3/(byte) loop::a#6 ) + [37] (signed byte) loop::r#2 ← phi( loop::@12/(signed byte) loop::r#1 loop::@3/(signed byte) $1e ) + [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 + [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 + [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) + [41] call mulf8s + [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 to:loop::@11 loop::@11: scope:[loop] from loop::@4 - [39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 - [40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 - [41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 - [42] (byte~) loop::$4 ← > (signed word) loop::x#0 - [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 - [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 - [45] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 - [46] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) - [47] call mulf8s - [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 + [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 + [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 + [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 + [46] (byte~) loop::$4 ← > (signed word) loop::x#0 + [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 + [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 + [49] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 + [50] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) + [51] call mulf8s + [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 to:loop::@12 loop::@12: scope:[loop] from loop::@11 - [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 - [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 - [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 - [52] (byte~) loop::$8 ← > (signed word) loop::y#0 - [53] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 - [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 - [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 - [56] (byte) loop::i#1 ← ++ (byte) loop::i#2 - [57] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 + [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 + [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 + [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 + [56] (byte~) loop::$8 ← > (signed word) loop::y#0 + [57] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 + [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 + [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 + [60] (byte) loop::i#1 ← ++ (byte) loop::i#2 + [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@12 - [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 - [59] call plexSort + [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 + [63] call plexSort to:loop::@13 loop::@13: scope:[loop] from loop::@5 - [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 - [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 + [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@6 loop::@6: scope:[loop] from loop::@13 loop::@6 - [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 - [63] if((byte~) loop::$11!=(byte) 0) goto loop::@6 + [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 + [67] if((byte~) loop::$11!=(byte) 0) goto loop::@6 to:loop::@7 loop::@7: scope:[loop] from loop::@14 loop::@6 - [64] (byte) loop::i1#5 ← phi( loop::@6/(byte) 0 loop::@14/(byte) loop::i1#1 ) - [64] (byte) plex_sprite_msb#43 ← phi( loop::@6/(byte) 1 loop::@14/(byte) plex_sprite_msb#16 ) - [64] (byte) plex_show_idx#43 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_show_idx#15 ) - [64] (byte) plex_sprite_idx#43 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_sprite_idx#15 ) - [64] (byte) plex_free_next#17 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_free_next#13 ) - [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [68] (byte) loop::i1#5 ← phi( loop::@6/(byte) 0 loop::@14/(byte) loop::i1#1 ) + [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@7 - [66] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) + [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) to:loop::@8 loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1 - [67] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 + [71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 to:loop::@9 loop::@9: scope:[loop] from loop::@8 - [68] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) - [69] call plexShowSprite + [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [73] call plexShowSprite to:loop::@14 loop::@14: scope:[loop] from loop::@9 - [70] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 - [71] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 + [74] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 + [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 to:loop::@10 loop::@10: scope:[loop] from loop::@14 - [72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK - [73] call keyboard_key_pressed - [74] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 + [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [77] call keyboard_key_pressed + [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 to:loop::@15 loop::@15: scope:[loop] from loop::@10 - [75] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 - [76] if((byte) 0!=(byte~) loop::$18) goto loop::@return + [79] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 + [80] if((byte) 0!=(byte~) loop::$18) goto loop::@return to:loop::@1 loop::@return: scope:[loop] from loop::@15 - [77] return + [81] return to:@return (void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@9 - [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 - [79] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) - [80] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 + [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 to:plexShowSprite::plexFreeAdd1 plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite - [81] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 - [82] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 - [83] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 - [84] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 - to:plexShowSprite::@4 -plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 - [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) - [86] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43) - [87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 - [88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [89] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 - [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [91] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 + [85] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 + [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 + [87] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 + [88] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 + [89] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 + to:plexShowSprite::@5 +plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 + [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) + [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 + [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 + [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [96] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 to:plexShowSprite::@3 -plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@4 - [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 - [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 +plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@5 + [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb + [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 to:plexShowSprite::@2 plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@3 - [94] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#43 + (byte) 1 - [95] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 - [96] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#43 - [97] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 << (byte) 1 - [98] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 + [99] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 + [100] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 + [101] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 + [102] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx + [103] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 + [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return + to:plexShowSprite::@4 +plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@2 + [105] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexShowSprite::@return -plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::@2 - [99] phi() - to:plexShowSprite::@return -plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@5 - [100] (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@5/(byte) plex_sprite_msb#3 plexShowSprite::@2/(byte) 1 ) - [101] return +plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@4 + [106] return to:@return -plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4 - [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 +plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@5 + [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb to:plexShowSprite::@2 (void()) plexSort() plexSort: scope:[plexSort] from loop::@5 - [103] phi() + [108] phi() to:plexSort::@1 plexSort::@1: scope:[plexSort] from plexSort plexSort::@2 - [104] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) - [105] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) - [106] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) - [107] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 + [109] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) + [110] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) + [111] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) + [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 to:plexSort::@5 plexSort::@5: scope:[plexSort] from plexSort::@1 - [108] (byte) plexSort::s#6 ← (byte) plexSort::m#2 + [113] (byte) plexSort::s#6 ← (byte) plexSort::m#2 to:plexSort::@3 -plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@6 - [109] (byte) plexSort::s#3 ← phi( plexSort::@6/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) - [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) - [111] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 - [112] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 - to:plexSort::@6 -plexSort::@6: scope:[plexSort] from plexSort::@3 - [113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7 + [114] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) + [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) + [116] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 + [117] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 + to:plexSort::@7 +plexSort::@7: scope:[plexSort] from plexSort::@3 + [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 to:plexSort::@4 -plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@6 - [114] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 - [115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 +plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7 + [119] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 + [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 to:plexSort::@2 plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4 - [116] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 - [117] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + [121] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 + [122] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + to:plexSort::@6 +plexSort::@6: scope:[plexSort] from plexSort::@2 + [123] (volatile byte) plex_show_idx ← (byte) 0 + [124] (volatile byte) plex_sprite_idx ← (byte) 0 + [125] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexSort::plexFreePrepare1 -plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@2 - [118] phi() +plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6 + [126] phi() to:plexSort::plexFreePrepare1_@1 plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1 - [119] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) - [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 - [121] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 - [122] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + [127] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) + [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 + [129] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 + [130] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + to:plexSort::plexFreePrepare1_@2 +plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1 + [131] (volatile byte) plex_free_next ← (byte) 0 to:plexSort::@return -plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1 - [123] return +plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 + [132] return to:@return (signed word()) mulf8s((signed byte) mulf8s::a , (signed byte) mulf8s::b) mulf8s: scope:[mulf8s] from loop::@11 loop::@4 - [124] (signed byte) mulf8s::b#2 ← phi( loop::@11/(signed byte) mulf8s::b#1 loop::@4/(signed byte) mulf8s::b#0 ) - [124] (signed byte) mulf8s::mulf8s_prepare1_a#0 ← phi( loop::@11/(signed byte) mulf8s::a#1 loop::@4/(signed byte) mulf8s::a#0 ) + [133] (signed byte) mulf8s::b#2 ← phi( loop::@11/(signed byte) mulf8s::b#1 loop::@4/(signed byte) mulf8s::b#0 ) + [133] (signed byte) mulf8s::mulf8s_prepare1_a#0 ← phi( loop::@11/(signed byte) mulf8s::a#1 loop::@4/(signed byte) mulf8s::a#0 ) to:mulf8s::mulf8s_prepare1 mulf8s::mulf8s_prepare1: scope:[mulf8s] from mulf8s - [125] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 - [126] call mulf8u_prepare + [134] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 + [135] call mulf8u_prepare to:mulf8s::@1 mulf8s::@1: scope:[mulf8s] from mulf8s::mulf8s_prepare1 - [127] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 - [128] call mulf8s_prepared + [136] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 + [137] call mulf8s_prepared to:mulf8s::@2 mulf8s::@2: scope:[mulf8s] from mulf8s::@1 - [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 + [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 to:mulf8s::@return mulf8s::@return: scope:[mulf8s] from mulf8s::@2 - [130] return + [139] return to:@return (signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) mulf8s_prepared: scope:[mulf8s_prepared] from mulf8s::@1 - [131] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 - [132] call mulf8u_prepared - [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 + [140] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 + [141] call mulf8u_prepared + [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 to:mulf8s_prepared::@5 mulf8s_prepared::@5: scope:[mulf8s_prepared] from mulf8s_prepared - [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 - [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 + [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 + [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 to:mulf8s_prepared::@3 mulf8s_prepared::@3: scope:[mulf8s_prepared] from mulf8s_prepared::@5 - [136] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 - [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 - [138] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 + [145] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 + [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 + [147] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 to:mulf8s_prepared::@1 mulf8s_prepared::@1: scope:[mulf8s_prepared] from mulf8s_prepared::@3 mulf8s_prepared::@5 - [139] (word) mulf8s_prepared::m#5 ← phi( mulf8s_prepared::@3/(word) mulf8s_prepared::m#1 mulf8s_prepared::@5/(word) mulf8s_prepared::m#0 ) - [140] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 + [148] (word) mulf8s_prepared::m#5 ← phi( mulf8s_prepared::@3/(word) mulf8s_prepared::m#1 mulf8s_prepared::@5/(word) mulf8s_prepared::m#0 ) + [149] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 to:mulf8s_prepared::@4 mulf8s_prepared::@4: scope:[mulf8s_prepared] from mulf8s_prepared::@1 - [141] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 - [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) - [143] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 + [150] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 + [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) + [152] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 to:mulf8s_prepared::@2 mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_prepared::@4 - [144] (word) mulf8s_prepared::m#4 ← phi( mulf8s_prepared::@1/(word) mulf8s_prepared::m#5 mulf8s_prepared::@4/(word) mulf8s_prepared::m#2 ) + [153] (word) mulf8s_prepared::m#4 ← phi( mulf8s_prepared::@1/(word) mulf8s_prepared::m#5 mulf8s_prepared::@4/(word) mulf8s_prepared::m#2 ) to:mulf8s_prepared::@return mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2 - [145] return + [154] return to:@return (word()) mulf8u_prepared((byte) mulf8u_prepared::b) mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared - [146] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 + [155] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } - [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) + [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) to:mulf8u_prepared::@return mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared - [149] return + [158] return to:@return (void()) mulf8u_prepare((byte) mulf8u_prepare::a) mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1 - [150] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 + [159] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } to:mulf8u_prepare::@return mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare - [152] return + [161] return to:@return (void()) init() init: scope:[init] from main - [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 - [154] call plexInit + [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 + [163] call plexInit to:init::@1 init::@1: scope:[init] from init init::@1 - [155] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init/(byte) 0 ) - [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 - [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 - [159] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 - [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 - [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 - [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 - [163] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 - [164] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 - [165] (byte) init::i#1 ← ++ (byte) init::i#2 - [166] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 + [164] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init/(byte) 0 ) + [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 + [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 + [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 + [168] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 + [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 + [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 + [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 + [172] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 + [173] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 + [174] (byte) init::i#1 ← ++ (byte) init::i#2 + [175] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 to:init::@2 init::@2: scope:[init] from init::@1 - [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff + [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff to:init::@3 init::@3: scope:[init] from init::@2 init::@3 - [168] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 ) - [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN - [170] (byte) init::i1#1 ← ++ (byte) init::i1#2 - [171] if((byte) init::i1#1!=(byte) 8) goto init::@3 + [177] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 ) + [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN + [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 + [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 to:init::@4 init::@4: scope:[init] from init::@3 - [172] phi() - [173] call mulf_init + [181] phi() + [182] call mulf_init to:init::@5 init::@5: scope:[init] from init::@4 - [174] phi() - [175] call memset + [183] phi() + [184] call memset to:init::@return init::@return: scope:[init] from init::@5 - [176] return + [185] return to:@return (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from init::@5 - [177] phi() + [186] phi() to:memset::@1 memset::@1: scope:[memset] from memset memset::@2 - [178] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) - [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 + [187] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) + [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 to:memset::@return memset::@return: scope:[memset] from memset::@1 - [180] return + [189] return to:@return memset::@2: scope:[memset] from memset::@1 - [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 - [182] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 + [191] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@1 (void()) mulf_init() mulf_init: scope:[mulf_init] from init::@4 - [183] phi() + [192] phi() to:mulf_init::@1 mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@3 - [184] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 ) - [184] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 ) - [184] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 ) - [184] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 ) - [184] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 ) - [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 + [193] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 ) + [193] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 ) + [193] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 ) + [193] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 ) + [193] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 ) + [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 to:mulf_init::@5 mulf_init::@5: scope:[mulf_init] from mulf_init::@1 mulf_init::@8 - [186] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff ) - [186] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi ) - [186] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 ) - [186] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo ) - [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 + [195] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff ) + [195] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi ) + [195] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 ) + [195] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo ) + [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 to:mulf_init::@7 mulf_init::@7: scope:[mulf_init] from mulf_init::@5 - [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) - [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) + [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) + [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) to:mulf_init::@return mulf_init::@return: scope:[mulf_init] from mulf_init::@7 - [190] return + [199] return to:@return mulf_init::@6: scope:[mulf_init] from mulf_init::@5 - [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) - [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) - [193] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 - [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 - [195] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 + [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) + [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) + [202] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 + [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 + [204] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 to:mulf_init::@8 mulf_init::@9: scope:[mulf_init] from mulf_init::@6 - [196] phi() + [205] phi() to:mulf_init::@8 mulf_init::@8: scope:[mulf_init] from mulf_init::@6 mulf_init::@9 - [197] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 ) - [198] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 + [206] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 ) + [207] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 to:mulf_init::@5 mulf_init::@2: scope:[mulf_init] from mulf_init::@1 - [199] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 - [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 - [201] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 + [208] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 + [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 + [210] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 to:mulf_init::@4 mulf_init::@4: scope:[mulf_init] from mulf_init::@2 - [202] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 - [203] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 + [211] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 + [212] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 to:mulf_init::@3 mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4 - [204] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 ) - [204] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 ) - [205] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 - [206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 - [207] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 - [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 - [209] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 - [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 - [211] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 + [213] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 ) + [213] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 ) + [214] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 + [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 + [216] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 + [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 + [218] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 + [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 + [220] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 to:mulf_init::@1 (void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init - [212] phi() + [221] phi() to:plexInit::plexSetScreen1 plexInit::plexSetScreen1: scope:[plexInit] from plexInit - [213] phi() + [222] phi() to:plexInit::@1 plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1 - [214] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) - [215] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 - [216] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 - [217] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 + [223] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) + [224] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 + [225] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 + [226] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 to:plexInit::@return plexInit::@return: scope:[plexInit] from plexInit::@1 - [218] return + [227] return to:@return @@ -3408,13 +2874,15 @@ VARIABLE REGISTER WEIGHTS (byte~) plexShowSprite::$2 200002.0 (byte~) plexShowSprite::$3 200002.0 (byte~) plexShowSprite::$5 200002.0 +(byte~) plexShowSprite::$6 200002.0 (byte~) plexShowSprite::$9 200002.0 (byte~) plexShowSprite::plexFreeAdd1_$0 200002.0 (byte~) plexShowSprite::plexFreeAdd1_$1 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$2 200002.0 (byte) plexShowSprite::plexFreeAdd1_ypos (byte) plexShowSprite::plexFreeAdd1_ypos#0 150001.5 (byte) plexShowSprite::plex_sprite_idx2 -(byte) plexShowSprite::plex_sprite_idx2#0 27273.0 +(byte) plexShowSprite::plex_sprite_idx2#0 25000.25 (byte) plexShowSprite::xpos_idx (byte) plexShowSprite::xpos_idx#0 200002.0 (byte) plexShowSprite::ypos @@ -3434,29 +2902,16 @@ VARIABLE REGISTER WEIGHTS (byte) plexSort::s#2 2000002.0 (byte) plexSort::s#3 2.05000025E7 (byte) plexSort::s#6 2000002.0 -(byte) plex_free_next -(byte) plex_free_next#13 5000.090909090909 -(byte) plex_free_next#17 22000.4 -(byte) plex_show_idx -(byte) plex_show_idx#15 12222.444444444445 -(byte) plex_show_idx#43 17083.541666666664 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#15 11000.2 -(byte) plex_sprite_idx#43 14091.090909090908 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#16 22000.4 -(byte) plex_sprite_msb#3 100001.0 -(byte) plex_sprite_msb#43 12400.16 +(volatile byte) plex_free_next loadstore 8205.307692307691 +(volatile byte) plex_show_idx loadstore 10408.326530612245 +(volatile byte) plex_sprite_idx loadstore 8913.195652173912 +(volatile byte) plex_sprite_msb loadstore 12978.914893617019 Initial phi equivalence classes [ loop::angle#6 loop::angle#1 ] [ loop::r#2 loop::r#1 ] [ loop::a#2 loop::a#1 loop::a#6 ] [ loop::i#2 loop::i#1 ] -[ plex_free_next#17 plex_free_next#13 ] -[ plex_sprite_idx#43 plex_sprite_idx#15 ] -[ plex_show_idx#43 plex_show_idx#15 ] -[ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] [ loop::i1#5 loop::i1#1 ] [ plexSort::m#2 plexSort::m#1 ] [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] @@ -3477,6 +2932,10 @@ Initial phi equivalence classes [ mulf_init::dir#2 mulf_init::dir#4 ] [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] [ plexInit::i#2 plexInit::i#1 ] +Added variable plex_show_idx to live range equivalence class [ plex_show_idx ] +Added variable plex_sprite_idx to live range equivalence class [ plex_sprite_idx ] +Added variable plex_sprite_msb to live range equivalence class [ plex_sprite_msb ] +Added variable plex_free_next to live range equivalence class [ plex_free_next ] Added variable keyboard_key_pressed::return#2 to live range equivalence class [ keyboard_key_pressed::return#2 ] Added variable exit::$0 to live range equivalence class [ exit::$0 ] Added variable keyboard_matrix_read::return#2 to live range equivalence class [ keyboard_matrix_read::return#2 ] @@ -3502,12 +2961,14 @@ Added variable plexShowSprite::plex_sprite_idx2#0 to live range equivalence clas Added variable plexShowSprite::plexFreeAdd1_ypos#0 to live range equivalence class [ plexShowSprite::plexFreeAdd1_ypos#0 ] Added variable plexShowSprite::plexFreeAdd1_$0 to live range equivalence class [ plexShowSprite::plexFreeAdd1_$0 ] Added variable plexShowSprite::plexFreeAdd1_$1 to live range equivalence class [ plexShowSprite::plexFreeAdd1_$1 ] +Added variable plexShowSprite::plexFreeAdd1_$2 to live range equivalence class [ plexShowSprite::plexFreeAdd1_$2 ] Added variable plexShowSprite::xpos_idx#0 to live range equivalence class [ plexShowSprite::xpos_idx#0 ] Added variable plexShowSprite::$11 to live range equivalence class [ plexShowSprite::$11 ] Added variable plexShowSprite::$2 to live range equivalence class [ plexShowSprite::$2 ] Added variable plexShowSprite::$3 to live range equivalence class [ plexShowSprite::$3 ] Added variable plexShowSprite::$9 to live range equivalence class [ plexShowSprite::$9 ] Added variable plexShowSprite::$5 to live range equivalence class [ plexShowSprite::$5 ] +Added variable plexShowSprite::$6 to live range equivalence class [ plexShowSprite::$6 ] Added variable plexSort::nxt_idx#0 to live range equivalence class [ plexSort::nxt_idx#0 ] Added variable plexSort::nxt_y#0 to live range equivalence class [ plexSort::nxt_y#0 ] Added variable plexSort::s#2 to live range equivalence class [ plexSort::s#2 ] @@ -3535,10 +2996,6 @@ Complete equivalence classes [ loop::r#2 loop::r#1 ] [ loop::a#2 loop::a#1 loop::a#6 ] [ loop::i#2 loop::i#1 ] -[ plex_free_next#17 plex_free_next#13 ] -[ plex_sprite_idx#43 plex_sprite_idx#15 ] -[ plex_show_idx#43 plex_show_idx#15 ] -[ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] [ loop::i1#5 loop::i1#1 ] [ plexSort::m#2 plexSort::m#1 ] [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] @@ -3559,6 +3016,10 @@ Complete equivalence classes [ mulf_init::dir#2 mulf_init::dir#4 ] [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] [ plexInit::i#2 plexInit::i#1 ] +[ plex_show_idx ] +[ plex_sprite_idx ] +[ plex_sprite_msb ] +[ plex_free_next ] [ keyboard_key_pressed::return#2 ] [ exit::$0 ] [ keyboard_matrix_read::return#2 ] @@ -3584,12 +3045,14 @@ Complete equivalence classes [ plexShowSprite::plexFreeAdd1_ypos#0 ] [ plexShowSprite::plexFreeAdd1_$0 ] [ plexShowSprite::plexFreeAdd1_$1 ] +[ plexShowSprite::plexFreeAdd1_$2 ] [ plexShowSprite::xpos_idx#0 ] [ plexShowSprite::$11 ] [ plexShowSprite::$2 ] [ plexShowSprite::$3 ] [ plexShowSprite::$9 ] [ plexShowSprite::$5 ] +[ plexShowSprite::$6 ] [ plexSort::nxt_idx#0 ] [ plexSort::nxt_y#0 ] [ plexSort::s#2 ] @@ -3616,30 +3079,30 @@ Allocated zp[1]:2 [ loop::angle#6 loop::angle#1 ] Allocated zp[1]:3 [ loop::r#2 loop::r#1 ] Allocated zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] Allocated zp[1]:5 [ loop::i#2 loop::i#1 ] -Allocated zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] -Allocated zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] -Allocated zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] -Allocated zp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] -Allocated zp[1]:10 [ loop::i1#5 loop::i1#1 ] -Allocated zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] -Allocated zp[1]:12 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] -Allocated zp[1]:13 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] -Allocated zp[1]:14 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] -Allocated zp[1]:15 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] -Allocated zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] -Allocated zp[1]:18 [ init::i#2 init::i#1 ] -Allocated zp[1]:19 [ init::i1#2 init::i1#1 ] -Allocated zp[2]:20 [ memset::dst#2 memset::dst#1 ] -Allocated zp[2]:22 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] -Allocated zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] -Allocated zp[2]:25 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -Allocated zp[1]:27 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -Allocated zp[2]:28 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] -Allocated zp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] -Allocated zp[2]:31 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] -Allocated zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] -Allocated zp[2]:34 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] -Allocated zp[1]:36 [ plexInit::i#2 plexInit::i#1 ] +Allocated zp[1]:6 [ loop::i1#5 loop::i1#1 ] +Allocated zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] +Allocated zp[1]:8 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] +Allocated zp[1]:9 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] +Allocated zp[1]:10 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] +Allocated zp[1]:11 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] +Allocated zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] +Allocated zp[1]:14 [ init::i#2 init::i#1 ] +Allocated zp[1]:15 [ init::i1#2 init::i1#1 ] +Allocated zp[2]:16 [ memset::dst#2 memset::dst#1 ] +Allocated zp[2]:18 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] +Allocated zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] +Allocated zp[2]:21 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +Allocated zp[1]:23 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Allocated zp[2]:24 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] +Allocated zp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Allocated zp[2]:27 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] +Allocated zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] +Allocated zp[2]:30 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] +Allocated zp[1]:32 [ plexInit::i#2 plexInit::i#1 ] +Allocated zp[1]:33 [ plex_show_idx ] +Allocated zp[1]:34 [ plex_sprite_idx ] +Allocated zp[1]:35 [ plex_sprite_msb ] +Allocated zp[1]:36 [ plex_free_next ] Allocated zp[1]:37 [ keyboard_key_pressed::return#2 ] Allocated zp[1]:38 [ exit::$0 ] Allocated zp[1]:39 [ keyboard_matrix_read::return#2 ] @@ -3665,34 +3128,36 @@ Allocated zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] Allocated zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] Allocated zp[1]:68 [ plexShowSprite::plexFreeAdd1_$0 ] Allocated zp[1]:69 [ plexShowSprite::plexFreeAdd1_$1 ] -Allocated zp[1]:70 [ plexShowSprite::xpos_idx#0 ] -Allocated zp[1]:71 [ plexShowSprite::$11 ] -Allocated zp[1]:72 [ plexShowSprite::$2 ] -Allocated zp[1]:73 [ plexShowSprite::$3 ] -Allocated zp[1]:74 [ plexShowSprite::$9 ] -Allocated zp[1]:75 [ plexShowSprite::$5 ] -Allocated zp[1]:76 [ plexSort::nxt_idx#0 ] -Allocated zp[1]:77 [ plexSort::nxt_y#0 ] -Allocated zp[1]:78 [ plexSort::s#2 ] -Allocated zp[1]:79 [ mulf8u_prepare::a#0 ] -Allocated zp[1]:80 [ mulf8s_prepared::b#0 ] -Allocated zp[2]:81 [ mulf8s::return#0 ] -Allocated zp[1]:83 [ mulf8u_prepared::b#0 ] -Allocated zp[2]:84 [ mulf8u_prepared::return#2 ] -Allocated zp[1]:86 [ mulf8s_prepared::$8 ] -Allocated zp[1]:87 [ mulf8s_prepared::$15 ] -Allocated zp[1]:88 [ mulf8s_prepared::$12 ] -Allocated zp[1]:89 [ mulf8s_prepared::$16 ] -Allocated zp[2]:90 [ mulf8u_prepared::return#0 ] -Allocated zp[1]:92 [ init::$10 ] -Allocated zp[1]:93 [ init::$3 ] -Allocated zp[1]:94 [ init::$4 ] -Allocated zp[1]:95 [ init::$9 ] -Allocated zp[1]:96 [ init::$5 ] -Allocated zp[1]:97 [ init::$6 ] -Allocated zp[1]:98 [ mulf_init::$1 ] -Allocated zp[1]:99 [ mulf_init::$4 ] -Allocated zp[1]:100 [ mulf_init::$5 ] +Allocated zp[1]:70 [ plexShowSprite::plexFreeAdd1_$2 ] +Allocated zp[1]:71 [ plexShowSprite::xpos_idx#0 ] +Allocated zp[1]:72 [ plexShowSprite::$11 ] +Allocated zp[1]:73 [ plexShowSprite::$2 ] +Allocated zp[1]:74 [ plexShowSprite::$3 ] +Allocated zp[1]:75 [ plexShowSprite::$9 ] +Allocated zp[1]:76 [ plexShowSprite::$5 ] +Allocated zp[1]:77 [ plexShowSprite::$6 ] +Allocated zp[1]:78 [ plexSort::nxt_idx#0 ] +Allocated zp[1]:79 [ plexSort::nxt_y#0 ] +Allocated zp[1]:80 [ plexSort::s#2 ] +Allocated zp[1]:81 [ mulf8u_prepare::a#0 ] +Allocated zp[1]:82 [ mulf8s_prepared::b#0 ] +Allocated zp[2]:83 [ mulf8s::return#0 ] +Allocated zp[1]:85 [ mulf8u_prepared::b#0 ] +Allocated zp[2]:86 [ mulf8u_prepared::return#2 ] +Allocated zp[1]:88 [ mulf8s_prepared::$8 ] +Allocated zp[1]:89 [ mulf8s_prepared::$15 ] +Allocated zp[1]:90 [ mulf8s_prepared::$12 ] +Allocated zp[1]:91 [ mulf8s_prepared::$16 ] +Allocated zp[2]:92 [ mulf8u_prepared::return#0 ] +Allocated zp[1]:94 [ init::$10 ] +Allocated zp[1]:95 [ init::$3 ] +Allocated zp[1]:96 [ init::$4 ] +Allocated zp[1]:97 [ init::$9 ] +Allocated zp[1]:98 [ init::$5 ] +Allocated zp[1]:99 [ init::$6 ] +Allocated zp[1]:100 [ mulf_init::$1 ] +Allocated zp[1]:101 [ mulf_init::$4 ] +Allocated zp[1]:102 [ mulf_init::$5 ] INITIAL ASM Target platform is c64basic / MOS6502X @@ -3729,28 +3194,45 @@ Target platform is c64basic / MOS6502X // The number of BOBs to render .const NUM_BOBS = $10 .label COS = SIN+$40 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 9 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 6 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 7 - // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 8 + .label plex_show_idx = $21 + .label plex_sprite_idx = $22 + .label plex_sprite_msb = $23 + .label plex_free_next = $24 // @begin __bbegin: - // [1] phi from @begin to @1 [phi:@begin->@1] -__b1_from___bbegin: jmp __b1 // @1 __b1: - // [2] call main + // [1] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index in the PLEX tables of the next sprite to show + lda #0 + sta.z plex_show_idx + // [2] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index the next sprite to use for showing (sprites are used round-robin) + lda #0 + sta.z plex_sprite_idx + // [3] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb + jmp __b2 + // @2 +__b2: + // [4] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next + // [5] phi from @2 to @3 [phi:@2->@3] +__b3_from___b2: + jmp __b3 + // @3 +__b3: + // [6] call main jsr main - // [3] phi from @1 to @end [phi:@1->@end] -__bend_from___b1: + // [7] phi from @3 to @end [phi:@3->@end] +__bend_from___b3: jmp __bend // @end __bend: @@ -3758,24 +3240,24 @@ __bend: main: { // asm { sei } sei - // [5] call init + // [9] call init jsr init - // [6] phi from main to main::@1 [phi:main->main::@1] + // [10] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: jmp __b1 // main::@1 __b1: - // [7] call loop - // [28] phi from main::@1 to loop [phi:main::@1->loop] + // [11] call loop + // [32] phi from main::@1 to loop [phi:main::@1->loop] loop_from___b1: jsr loop - // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2] __b2_from___b1: jmp __b2 // main::@2 __b2: - // [9] call exit - // [12] phi from main::@2 to exit [phi:main::@2->exit] + // [13] call exit + // [16] phi from main::@2 to exit [phi:main::@2->exit] exit_from___b2: jsr exit jmp __b3 @@ -3786,41 +3268,41 @@ main: { jmp __breturn // main::@return __breturn: - // [11] return + // [15] return rts } // exit // Exit the program exit: { .label __0 = $26 - // [13] phi from exit exit::@2 to exit::@1 [phi:exit/exit::@2->exit::@1] + // [17] phi from exit exit::@2 to exit::@1 [phi:exit/exit::@2->exit::@1] __b1_from_exit: __b1_from___b2: jmp __b1 // Wait for space release // exit::@1 __b1: - // [14] call keyboard_key_pressed - // [19] phi from exit::@1 to keyboard_key_pressed [phi:exit::@1->keyboard_key_pressed] + // [18] call keyboard_key_pressed + // [23] phi from exit::@1 to keyboard_key_pressed [phi:exit::@1->keyboard_key_pressed] keyboard_key_pressed_from___b1: jsr keyboard_key_pressed - // [15] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 + // [19] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 lda.z keyboard_key_pressed.return sta.z keyboard_key_pressed.return_1 jmp __b2 // exit::@2 __b2: - // [16] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 -- vbuz1=vbuz2 + // [20] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 -- vbuz1=vbuz2 lda.z keyboard_key_pressed.return_1 sta.z __0 - // [17] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -- vbuc1_neq_vbuz1_then_la1 + // [21] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -- vbuc1_neq_vbuz1_then_la1 lda #0 cmp.z __0 bne __b1_from___b2 jmp __breturn // exit::@return __breturn: - // [18] return + // [22] return rts } // keyboard_key_pressed @@ -3835,25 +3317,25 @@ keyboard_key_pressed: { .label return = $29 .label return_1 = $25 .label return_2 = $40 - // [20] call keyboard_matrix_read + // [24] call keyboard_matrix_read jsr keyboard_matrix_read - // [21] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 + // [25] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 lda.z keyboard_matrix_read.return sta.z keyboard_matrix_read.return_1 jmp __b1 // keyboard_key_pressed::@1 __b1: - // [22] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 + // [26] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 lda.z keyboard_matrix_read.return_1 sta.z __2 - // [23] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) -- vbuz1=vbuz2_band__deref_pbuc1 + // [27] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) -- vbuz1=vbuz2_band__deref_pbuc1 lda keyboard_matrix_col_bitmask+colidx and.z __2 sta.z return jmp __breturn // keyboard_key_pressed::@return __breturn: - // [24] return + // [28] return rts } // keyboard_matrix_read @@ -3865,17 +3347,17 @@ keyboard_key_pressed: { keyboard_matrix_read: { .label return = $2a .label return_1 = $27 - // [25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 + // [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A - // [26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) -- vbuz1=_bnot__deref_pbuc1 + // [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) -- vbuz1=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff sta.z return jmp __breturn // keyboard_matrix_read::@return __breturn: - // [27] return + // [31] return rts } // loop @@ -3898,10 +3380,10 @@ loop: { // Render Rotated BOBs .label angle = 2 .label plexFreeNextYpos1_return = $3f - .label i1 = $a - // [29] phi from loop to loop::@1 [phi:loop->loop::@1] + .label i1 = 6 + // [33] phi from loop to loop::@1 [phi:loop->loop::@1] __b1_from_loop: - // [29] phi (byte) loop::angle#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 + // [33] phi (byte) loop::angle#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 lda #0 sta.z angle jmp __b1 @@ -3910,55 +3392,55 @@ loop: { jmp __b2 // loop::@2 __b2: - // [30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 + // [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 lda RASTER cmp #$d8 bcc __b2 jmp __b3 // loop::@3 __b3: - // [31] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f sta BORDERCOL - // [32] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 + // [36] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 lda.z angle sta.z a - // [33] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] + // [37] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] __b4_from___b3: - // [33] phi (byte) loop::i#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 + // [37] phi (byte) loop::i#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 lda #0 sta.z i - // [33] phi (byte) loop::a#2 = (byte) loop::a#6 [phi:loop::@3->loop::@4#1] -- register_copy - // [33] phi (signed byte) loop::r#2 = (signed byte) $1e [phi:loop::@3->loop::@4#2] -- vbsz1=vbsc1 + // [37] phi (byte) loop::a#2 = (byte) loop::a#6 [phi:loop::@3->loop::@4#1] -- register_copy + // [37] phi (signed byte) loop::r#2 = (signed byte) $1e [phi:loop::@3->loop::@4#2] -- vbsz1=vbsc1 lda #$1e sta.z r jmp __b4 - // [33] phi from loop::@12 to loop::@4 [phi:loop::@12->loop::@4] + // [37] phi from loop::@12 to loop::@4 [phi:loop::@12->loop::@4] __b4_from___b12: - // [33] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@12->loop::@4#0] -- register_copy - // [33] phi (byte) loop::a#2 = (byte) loop::a#1 [phi:loop::@12->loop::@4#1] -- register_copy - // [33] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy + // [37] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@12->loop::@4#0] -- register_copy + // [37] phi (byte) loop::a#2 = (byte) loop::a#1 [phi:loop::@12->loop::@4#1] -- register_copy + // [37] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy jmp __b4 // loop::@4 __b4: - // [34] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #6 sta BORDERCOL - // [35] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsz1=vbsz2 + // [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsz1=vbsz2 lda.z r sta.z mulf8s.a - // [36] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsz1=pbsc1_derefidx_vbuz2 + // [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsz1=pbsc1_derefidx_vbuz2 ldy.z a lda COS,y sta.z mulf8s.b - // [37] call mulf8s - // [124] phi from loop::@4 to mulf8s [phi:loop::@4->mulf8s] + // [41] call mulf8s + // [133] phi from loop::@4 to mulf8s [phi:loop::@4->mulf8s] mulf8s_from___b4: - // [124] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#0 [phi:loop::@4->mulf8s#0] -- register_copy - // [124] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#0 [phi:loop::@4->mulf8s#1] -- register_copy + // [133] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#0 [phi:loop::@4->mulf8s#0] -- register_copy + // [133] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#0 [phi:loop::@4->mulf8s#1] -- register_copy jsr mulf8s - // [38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 -- vwsz1=vwsz2 + // [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 -- vwsz1=vwsz2 lda.z mulf8s.return sta.z mulf8s.return_1 lda.z mulf8s.return+1 @@ -3966,19 +3448,19 @@ loop: { jmp __b11 // loop::@11 __b11: - // [39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 -- vwsz1=vwsz2 + // [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 -- vwsz1=vwsz2 lda.z mulf8s.return_1 sta.z __1 lda.z mulf8s.return_1+1 sta.z __1+1 - // [40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 -- vwsz1=vwsz2_rol_1 + // [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 -- vwsz1=vwsz2_rol_1 lda.z __1 asl sta.z __2 lda.z __1+1 rol sta.z __2+1 - // [41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz2_plus_vwsc1 + // [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz2_plus_vwsc1 lda.z __2 clc adc #<$7d*$100 @@ -3986,33 +3468,33 @@ loop: { lda.z __2+1 adc #>$7d*$100 sta.z x+1 - // [42] (byte~) loop::$4 ← > (signed word) loop::x#0 -- vbuz1=_hi_vwsz2 + // [46] (byte~) loop::$4 ← > (signed word) loop::x#0 -- vbuz1=_hi_vwsz2 lda.z x+1 sta.z __4 - // [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __20 - // [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 -- pwuc1_derefidx_vbuz1=vbuz2 + // [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 -- pwuc1_derefidx_vbuz1=vbuz2 lda.z __20 ldx.z __4 tay txa sta PLEX_XPOS,y - // [45] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 -- vbsz1=vbsz2 + // [49] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 -- vbsz1=vbsz2 lda.z r sta.z mulf8s.a - // [46] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) -- vbsz1=pbsc1_derefidx_vbuz2 + // [50] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) -- vbsz1=pbsc1_derefidx_vbuz2 ldy.z a lda SIN,y sta.z mulf8s.b - // [47] call mulf8s - // [124] phi from loop::@11 to mulf8s [phi:loop::@11->mulf8s] + // [51] call mulf8s + // [133] phi from loop::@11 to mulf8s [phi:loop::@11->mulf8s] mulf8s_from___b11: - // [124] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#1 [phi:loop::@11->mulf8s#0] -- register_copy - // [124] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#1 [phi:loop::@11->mulf8s#1] -- register_copy + // [133] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#1 [phi:loop::@11->mulf8s#0] -- register_copy + // [133] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#1 [phi:loop::@11->mulf8s#1] -- register_copy jsr mulf8s - // [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 -- vwsz1=vwsz2 + // [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 -- vwsz1=vwsz2 lda.z mulf8s.return sta.z mulf8s.return_2 lda.z mulf8s.return+1 @@ -4020,19 +3502,19 @@ loop: { jmp __b12 // loop::@12 __b12: - // [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 -- vwsz1=vwsz2 + // [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 -- vwsz1=vwsz2 lda.z mulf8s.return_2 sta.z __5 lda.z mulf8s.return_2+1 sta.z __5+1 - // [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 -- vwsz1=vwsz2_rol_1 + // [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 -- vwsz1=vwsz2_rol_1 lda.z __5 asl sta.z __6 lda.z __5+1 rol sta.z __6+1 - // [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz2_plus_vwsc1 + // [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz2_plus_vwsc1 lda.z __6 clc adc #<$7d*$100 @@ -4040,284 +3522,268 @@ loop: { lda.z __6+1 adc #>$7d*$100 sta.z y+1 - // [52] (byte~) loop::$8 ← > (signed word) loop::y#0 -- vbuz1=_hi_vwsz2 + // [56] (byte~) loop::$8 ← > (signed word) loop::y#0 -- vbuz1=_hi_vwsz2 lda.z y+1 sta.z __8 - // [53] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 -- pbuc1_derefidx_vbuz1=vbuz2 + // [57] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __8 ldy.z i sta PLEX_YPOS,y - // [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 + // [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 lax.z a axs #-[$62] stx.z a - // [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 -- vbsz1=vbsz1_plus_vbsc1 + // [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 -- vbsz1=vbsz1_plus_vbsc1 lax.z r axs #-[3] stx.z r - // [56] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 + // [60] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [57] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 + // [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_BOBS-1+1 cmp.z i bne __b4_from___b12 jmp __b5 // loop::@5 __b5: - // [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta BORDERCOL - // [59] call plexSort - // [103] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] + // [63] call plexSort + // [108] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: jsr plexSort jmp __b13 // loop::@13 __b13: - // [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z angle axs #-[3] stx.z angle - // [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp __b6 // Sort the sprites by y-position // loop::@6 __b6: - // [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuz1=_deref_pbuc1_band_vbuc2 + // [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuz1=_deref_pbuc1_band_vbuc2 lda #VIC_RST8 and D011 sta.z __11 - // [63] if((byte~) loop::$11!=(byte) 0) goto loop::@6 -- vbuz1_neq_0_then_la1 + // [67] if((byte~) loop::$11!=(byte) 0) goto loop::@6 -- vbuz1_neq_0_then_la1 lda.z __11 cmp #0 bne __b6 - // [64] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] + // [68] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] __b7_from___b6: - // [64] phi (byte) loop::i1#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 + // [68] phi (byte) loop::i1#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 lda #0 sta.z i1 - // [64] phi (byte) plex_sprite_msb#43 = (byte) 1 [phi:loop::@6->loop::@7#1] -- vbuz1=vbuc1 - lda #1 - sta.z plex_sprite_msb - // [64] phi (byte) plex_show_idx#43 = (byte) 0 [phi:loop::@6->loop::@7#2] -- vbuz1=vbuc1 - lda #0 - sta.z plex_show_idx - // [64] phi (byte) plex_sprite_idx#43 = (byte) 0 [phi:loop::@6->loop::@7#3] -- vbuz1=vbuc1 - lda #0 - sta.z plex_sprite_idx - // [64] phi (byte) plex_free_next#17 = (byte) 0 [phi:loop::@6->loop::@7#4] -- vbuz1=vbuc1 - lda #0 - sta.z plex_free_next jmp __b7 // Show the sprites - // [64] phi from loop::@14 to loop::@7 [phi:loop::@14->loop::@7] + // [68] phi from loop::@14 to loop::@7 [phi:loop::@14->loop::@7] __b7_from___b14: - // [64] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy - // [64] phi (byte) plex_sprite_msb#43 = (byte) plex_sprite_msb#16 [phi:loop::@14->loop::@7#1] -- register_copy - // [64] phi (byte) plex_show_idx#43 = (byte) plex_show_idx#15 [phi:loop::@14->loop::@7#2] -- register_copy - // [64] phi (byte) plex_sprite_idx#43 = (byte) plex_sprite_idx#15 [phi:loop::@14->loop::@7#3] -- register_copy - // [64] phi (byte) plex_free_next#17 = (byte) plex_free_next#13 [phi:loop::@14->loop::@7#4] -- register_copy + // [68] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy jmp __b7 // loop::@7 __b7: - // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp plexFreeNextYpos1 // loop::plexFreeNextYpos1 plexFreeNextYpos1: - // [66] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) -- vbuz1=pbuc1_derefidx_vbuz2 + // [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return jmp __b8 // loop::@8 __b8: - // [67] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp.z plexFreeNextYpos1_return bcc __b8 jmp __b9 // loop::@9 __b9: - // [68] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [69] call plexShowSprite + // [73] call plexShowSprite jsr plexShowSprite jmp __b14 // loop::@14 __b14: - // [70] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 -- vbuz1=_inc_vbuz1 + // [74] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 -- vbuz1=_inc_vbuz1 inc.z i1 - // [71] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 + // [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i1 bne __b7_from___b14 jmp __b10 // loop::@10 __b10: - // [72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [73] call keyboard_key_pressed - // [19] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] + // [77] call keyboard_key_pressed + // [23] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] keyboard_key_pressed_from___b10: jsr keyboard_key_pressed - // [74] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 + // [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 -- vbuz1=vbuz2 lda.z keyboard_key_pressed.return sta.z keyboard_key_pressed.return_2 jmp __b15 // loop::@15 __b15: - // [75] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 -- vbuz1=vbuz2 + // [79] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 -- vbuz1=vbuz2 lda.z keyboard_key_pressed.return_2 sta.z __18 - // [76] if((byte) 0!=(byte~) loop::$18) goto loop::@return -- vbuc1_neq_vbuz1_then_la1 + // [80] if((byte) 0!=(byte~) loop::$18) goto loop::@return -- vbuc1_neq_vbuz1_then_la1 lda #0 cmp.z __18 bne __breturn - // [29] phi from loop::@15 to loop::@1 [phi:loop::@15->loop::@1] + // [33] phi from loop::@15 to loop::@1 [phi:loop::@15->loop::@1] __b1_from___b15: - // [29] phi (byte) loop::angle#6 = (byte) loop::angle#1 [phi:loop::@15->loop::@1#0] -- register_copy + // [33] phi (byte) loop::angle#6 = (byte) loop::angle#1 [phi:loop::@15->loop::@1#0] -- register_copy jmp __b1 // loop::@return __breturn: - // [77] return + // [81] return rts } // plexShowSprite // Show the next sprite. // plexSort() prepares showing the sprites plexShowSprite: { - .label __2 = $48 - .label __3 = $49 - .label __5 = $4b - .label __9 = $4a - .label __11 = $47 + .label __2 = $49 + .label __3 = $4a + .label __5 = $4c + .label __6 = $4d + .label __9 = $4b + .label __11 = $48 .label plexFreeAdd1___0 = $44 .label plexFreeAdd1___1 = $45 + .label plexFreeAdd1___2 = $46 .label plex_sprite_idx2 = $42 .label plexFreeAdd1_ypos = $43 - .label xpos_idx = $46 - // [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label xpos_idx = $47 + // [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z plex_sprite_idx asl sta.z plex_sprite_idx2 - // [79] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) -- vbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) + // [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- vbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x ldx PLEX_YPOS,y stx.z plexFreeAdd1_ypos - // [80] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z plexFreeAdd1_ypos ldy.z plex_sprite_idx2 sta SPRITES_YPOS,y jmp plexFreeAdd1 // plexShowSprite::plexFreeAdd1 plexFreeAdd1: - // [81] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuz1=vbuz2_plus_vbuc1 + // [85] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuz1=vbuz2_plus_vbuc1 lax.z plexFreeAdd1_ypos axs #-[$15] stx.z plexFreeAdd1___0 - // [82] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z plexFreeAdd1___0 ldy.z plex_free_next sta PLEX_FREE_YPOS,y - // [83] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [87] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z plex_free_next iny sty.z plexFreeAdd1___1 - // [84] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [88] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z plexFreeAdd1___1 + sta.z plexFreeAdd1___2 + // [89] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 -- vbuz1=vbuz2 + lda.z plexFreeAdd1___2 sta.z plex_free_next - jmp __b4 - // plexShowSprite::@4 - __b4: - // [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) + jmp __b5 + // plexShowSprite::@5 + __b5: + // [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_PTR,y ldx.z plex_sprite_idx sta PLEX_SCREEN_PTR,x - // [86] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43) -- vbuz1=pbuc1_derefidx_vbuz2 + // [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_show_idx lda PLEX_SORTED_IDX,y sta.z xpos_idx - // [87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z xpos_idx asl sta.z __11 - // [88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_lo_pwuc1_derefidx_vbuz2 + // [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_lo_pwuc1_derefidx_vbuz2 ldy.z __11 lda PLEX_XPOS,y sta.z __2 - // [89] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __2 ldy.z plex_sprite_idx2 sta SPRITES_XPOS,y - // [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_hi_pwuc1_derefidx_vbuz2 + // [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_hi_pwuc1_derefidx_vbuz2 ldy.z __11 lda PLEX_XPOS+1,y sta.z __3 - // [91] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuz1_neq_0_then_la1 + // [96] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuz1_neq_0_then_la1 lda.z __3 cmp #0 bne __b1 jmp __b3 // plexShowSprite::@3 __b3: - // [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 -- vbuz1=vbuc1_bxor_vbuz2 + // [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb -- vbuz1=vbuc1_bxor_vbuz2 lda #$ff eor.z plex_sprite_msb sta.z __9 - // [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 + // [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 lda SPRITES_XMSB and.z __9 sta SPRITES_XMSB jmp __b2 // plexShowSprite::@2 __b2: - // [94] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#43 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [99] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z plex_sprite_idx iny sty.z __5 - // [95] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [100] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z __5 + sta.z __6 + // [101] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 -- vbuz1=vbuz2 + lda.z __6 sta.z plex_sprite_idx - // [96] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#43 -- vbuz1=_inc_vbuz1 + // [102] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx -- vbuz1=_inc_vbuz1 inc.z plex_show_idx - // [97] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [103] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z plex_sprite_msb - // [98] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 -- vbuz1_neq_0_then_la1 + // [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -- vbuz1_neq_0_then_la1 lda.z plex_sprite_msb cmp #0 - bne __b5_from___b2 - // [100] phi from plexShowSprite::@2 to plexShowSprite::@return [phi:plexShowSprite::@2->plexShowSprite::@return] - __breturn_from___b2: - // [100] phi (byte) plex_sprite_msb#16 = (byte) 1 [phi:plexShowSprite::@2->plexShowSprite::@return#0] -- vbuz1=vbuc1 + bne __breturn + jmp __b4 + // plexShowSprite::@4 + __b4: + // [105] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 lda #1 sta.z plex_sprite_msb jmp __breturn - // [99] phi from plexShowSprite::@2 to plexShowSprite::@5 [phi:plexShowSprite::@2->plexShowSprite::@5] - __b5_from___b2: - jmp __b5 - // plexShowSprite::@5 - __b5: - // [100] phi from plexShowSprite::@5 to plexShowSprite::@return [phi:plexShowSprite::@5->plexShowSprite::@return] - __breturn_from___b5: - // [100] phi (byte) plex_sprite_msb#16 = (byte) plex_sprite_msb#3 [phi:plexShowSprite::@5->plexShowSprite::@return#0] -- register_copy - jmp __breturn // plexShowSprite::@return __breturn: - // [101] return + // [106] return rts // plexShowSprite::@1 __b1: - // [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + // [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -4334,33 +3800,33 @@ plexShowSprite: { // elements before the marker are shifted right one at a time until encountering one smaller than the current one. // It is then inserted at the spot. Now the marker can move forward. plexSort: { - .label nxt_idx = $4c - .label nxt_y = $4d - .label m = $b - .label s = $c - .label s_1 = $4e - .label plexFreePrepare1_s = $d - // [104] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] + .label nxt_idx = $4e + .label nxt_y = $4f + .label m = 7 + .label s = 8 + .label s_1 = $50 + .label plexFreePrepare1_s = 9 + // [109] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] __b1_from_plexSort: - // [104] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 + // [109] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 lda #0 sta.z m jmp __b1 - // [104] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] + // [109] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] __b1_from___b2: - // [104] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy + // [109] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy jmp __b1 // plexSort::@1 __b1: - // [105] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [110] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx - // [106] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [111] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z nxt_idx lda PLEX_YPOS,y sta.z nxt_y - // [107] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + // [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 lda.z nxt_y ldx.z m ldy PLEX_SORTED_IDX,x @@ -4369,118 +3835,137 @@ plexSort: { jmp __b5 // plexSort::@5 __b5: - // [108] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuz1=vbuz2 + // [113] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuz1=vbuz2 lda.z m sta.z s - // [109] phi from plexSort::@5 plexSort::@6 to plexSort::@3 [phi:plexSort::@5/plexSort::@6->plexSort::@3] + // [114] phi from plexSort::@5 plexSort::@7 to plexSort::@3 [phi:plexSort::@5/plexSort::@7->plexSort::@3] __b3_from___b5: - __b3_from___b6: - // [109] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@6->plexSort::@3#0] -- register_copy + __b3_from___b7: + // [114] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@7->plexSort::@3#0] -- register_copy jmp __b3 // plexSort::@3 __b3: - // [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + // [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 ldy.z s lda PLEX_SORTED_IDX,y sta PLEX_SORTED_IDX+1,y - // [111] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuz1=_dec_vbuz1 + // [116] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuz1=_dec_vbuz1 dec.z s - // [112] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuz1_eq_vbuc1_then_la1 + // [117] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp.z s beq __b4 - jmp __b6 - // plexSort::@6 - __b6: - // [113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + jmp __b7 + // plexSort::@7 + __b7: + // [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 lda.z nxt_y ldx.z s ldy PLEX_SORTED_IDX,x cmp PLEX_YPOS,y - bcc __b3_from___b6 + bcc __b3_from___b7 jmp __b4 // plexSort::@4 __b4: - // [114] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuz1=_inc_vbuz2 + // [119] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuz1=_inc_vbuz2 ldy.z s iny sty.z s_1 - // [115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z nxt_idx ldy.z s_1 sta PLEX_SORTED_IDX,y jmp __b2 // plexSort::@2 __b2: - // [116] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 + // [121] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 inc.z m - // [117] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 + // [122] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-2+1 cmp.z m bne __b1_from___b2 - // [118] phi from plexSort::@2 to plexSort::plexFreePrepare1 [phi:plexSort::@2->plexSort::plexFreePrepare1] - plexFreePrepare1_from___b2: + jmp __b6 + // plexSort::@6 + __b6: + // [123] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // Prepare for showing the sprites + lda #0 + sta.z plex_show_idx + // [124] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_sprite_idx + // [125] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + lda #1 + sta.z plex_sprite_msb + // [126] phi from plexSort::@6 to plexSort::plexFreePrepare1 [phi:plexSort::@6->plexSort::plexFreePrepare1] + plexFreePrepare1_from___b6: jmp plexFreePrepare1 // plexSort::plexFreePrepare1 plexFreePrepare1: - // [119] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] + // [127] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1: - // [119] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuz1=vbuc1 + // [127] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuz1=vbuc1 lda #0 sta.z plexFreePrepare1_s jmp plexFreePrepare1___b1 - // [119] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] + // [127] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1___b1: - // [119] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy + // [127] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy jmp plexFreePrepare1___b1 // plexSort::plexFreePrepare1_@1 plexFreePrepare1___b1: - // [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy.z plexFreePrepare1_s sta PLEX_FREE_YPOS,y - // [121] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuz1=_inc_vbuz1 + // [129] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuz1=_inc_vbuz1 inc.z plexFreePrepare1_s - // [122] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuz1_neq_vbuc1_then_la1 + // [130] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z plexFreePrepare1_s bne plexFreePrepare1___b1_from_plexFreePrepare1___b1 + jmp plexFreePrepare1___b2 + // plexSort::plexFreePrepare1_@2 + plexFreePrepare1___b2: + // [131] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_free_next jmp __breturn // plexSort::@return __breturn: - // [123] return + // [132] return rts } // mulf8s // Fast multiply two signed bytes to a word result -// mulf8s(signed byte zp($e) a, signed byte zp($f) b) +// mulf8s(signed byte zp($a) a, signed byte zp($b) b) mulf8s: { - .label mulf8s_prepare1_a = $e - .label return = $51 - .label a = $e - .label b = $f + .label mulf8s_prepare1_a = $a + .label return = $53 + .label a = $a + .label b = $b .label return_1 = $2b .label return_2 = $35 jmp mulf8s_prepare1 // mulf8s::mulf8s_prepare1 mulf8s_prepare1: - // [125] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 -- vbuz1=vbuz2 + // [134] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 -- vbuz1=vbuz2 lda.z mulf8s_prepare1_a sta.z mulf8u_prepare.a - // [126] call mulf8u_prepare + // [135] call mulf8u_prepare jsr mulf8u_prepare jmp __b1 // mulf8s::@1 __b1: - // [127] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 -- vbsz1=vbsz2 + // [136] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 -- vbsz1=vbsz2 lda.z b sta.z mulf8s_prepared.b - // [128] call mulf8s_prepared + // [137] call mulf8s_prepared jsr mulf8s_prepared jmp __b2 // mulf8s::@2 __b2: - // [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 -- vwsz1=vwsz2 + // [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 -- vwsz1=vwsz2 lda.z mulf8s_prepared.m sta.z return lda.z mulf8s_prepared.m+1 @@ -4488,27 +3973,27 @@ mulf8s: { jmp __breturn // mulf8s::@return __breturn: - // [130] return + // [139] return rts } // mulf8s_prepared // Calculate fast multiply with a prepared unsigned byte to a word result // The prepared number is set by calling mulf8s_prepare(byte a) -// mulf8s_prepared(signed byte zp($50) b) +// mulf8s_prepared(signed byte zp($52) b) mulf8s_prepared: { .label memA = $fd - .label __8 = $56 - .label __12 = $58 - .label __15 = $57 - .label __16 = $59 - .label m = $10 - .label b = $50 - // [131] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 -- vbuz1=vbuz2 + .label __8 = $58 + .label __12 = $5a + .label __15 = $59 + .label __16 = $5b + .label m = $c + .label b = $52 + // [140] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 -- vbuz1=vbuz2 lda.z b sta.z mulf8u_prepared.b - // [132] call mulf8u_prepared + // [141] call mulf8u_prepared jsr mulf8u_prepared - // [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 -- vwuz1=vwuz2 + // [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 -- vwuz1=vwuz2 lda.z mulf8u_prepared.return sta.z mulf8u_prepared.return_1 lda.z mulf8u_prepared.return+1 @@ -4516,78 +4001,78 @@ mulf8s_prepared: { jmp __b5 // mulf8s_prepared::@5 __b5: - // [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 -- vwuz1=vwuz2 + // [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 -- vwuz1=vwuz2 lda.z mulf8u_prepared.return_1 sta.z m lda.z mulf8u_prepared.return_1+1 sta.z m+1 - // [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -- _deref_pbsc1_ge_0_then_la1 + // [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -- _deref_pbsc1_ge_0_then_la1 lda memA cmp #0 bpl __b1_from___b5 jmp __b3 // mulf8s_prepared::@3 __b3: - // [136] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 -- vbuz1=_hi_vwuz2 + // [145] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 -- vbuz1=_hi_vwuz2 lda.z m+1 sta.z __8 - // [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 -- vbuz1=vbuz2_minus_vbuz3 + // [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z __8 sec sbc.z b sta.z __15 - // [138] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 -- vwuz1=vwuz1_sethi_vbuz2 + // [147] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 -- vwuz1=vwuz1_sethi_vbuz2 lda.z __15 sta.z m+1 - // [139] phi from mulf8s_prepared::@3 mulf8s_prepared::@5 to mulf8s_prepared::@1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1] + // [148] phi from mulf8s_prepared::@3 mulf8s_prepared::@5 to mulf8s_prepared::@1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1] __b1_from___b3: __b1_from___b5: - // [139] phi (word) mulf8s_prepared::m#5 = (word) mulf8s_prepared::m#1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1#0] -- register_copy + // [148] phi (word) mulf8s_prepared::m#5 = (word) mulf8s_prepared::m#1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1#0] -- register_copy jmp __b1 // mulf8s_prepared::@1 __b1: - // [140] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -- vbsz1_ge_0_then_la1 + // [149] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -- vbsz1_ge_0_then_la1 lda.z b cmp #0 bpl __b2_from___b1 jmp __b4 // mulf8s_prepared::@4 __b4: - // [141] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 -- vbuz1=_hi_vwuz2 + // [150] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 -- vbuz1=_hi_vwuz2 lda.z m+1 sta.z __12 - // [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) -- vbuz1=vbuz2_minus__deref_pbuc1 + // [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) -- vbuz1=vbuz2_minus__deref_pbuc1 lda.z __12 sec sbc memA sta.z __16 - // [143] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 -- vwuz1=vwuz1_sethi_vbuz2 + // [152] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 -- vwuz1=vwuz1_sethi_vbuz2 lda.z __16 sta.z m+1 - // [144] phi from mulf8s_prepared::@1 mulf8s_prepared::@4 to mulf8s_prepared::@2 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2] + // [153] phi from mulf8s_prepared::@1 mulf8s_prepared::@4 to mulf8s_prepared::@2 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2] __b2_from___b1: __b2_from___b4: - // [144] phi (word) mulf8s_prepared::m#4 = (word) mulf8s_prepared::m#5 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2#0] -- register_copy + // [153] phi (word) mulf8s_prepared::m#4 = (word) mulf8s_prepared::m#5 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2#0] -- register_copy jmp __b2 // mulf8s_prepared::@2 __b2: jmp __breturn // mulf8s_prepared::@return __breturn: - // [145] return + // [154] return rts } // mulf8u_prepared // Calculate fast multiply with a prepared unsigned byte to a word result // The prepared number is set by calling mulf8u_prepare(byte a) -// mulf8u_prepared(byte zp($53) b) +// mulf8u_prepared(byte zp($55) b) mulf8u_prepared: { .label resL = $fe .label memB = $ff - .label return = $5a - .label b = $53 - .label return_1 = $54 - // [146] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 -- _deref_pbuc1=vbuz1 + .label return = $5c + .label b = $55 + .label return_1 = $56 + // [155] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 -- _deref_pbuc1=vbuz1 lda.z b sta memB // asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } @@ -4603,7 +4088,7 @@ mulf8u_prepared: { sm4: sbc mulf_sqr2_hi,x sta memB - // [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 + // [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 lda resL sta.z return lda memB @@ -4611,16 +4096,16 @@ mulf8u_prepared: { jmp __breturn // mulf8u_prepared::@return __breturn: - // [149] return + // [158] return rts } // mulf8u_prepare // Prepare for fast multiply with an unsigned byte to a word result -// mulf8u_prepare(byte zp($4f) a) +// mulf8u_prepare(byte zp($51) a) mulf8u_prepare: { .label memA = $fd - .label a = $4f - // [150] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 -- _deref_pbuc1=vbuz1 + .label a = $51 + // [159] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 -- _deref_pbuc1=vbuz1 lda.z a sta memA // asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } @@ -4633,141 +4118,141 @@ mulf8u_prepare: { jmp __breturn // mulf8u_prepare::@return __breturn: - // [152] return + // [161] return rts } // init // Initialize the program init: { - .label __3 = $5d - .label __4 = $5e - .label __5 = $60 - .label __6 = $61 - .label __9 = $5f - .label i = $12 - .label i1 = $13 - .label __10 = $5c - // [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + .label __3 = $5f + .label __4 = $60 + .label __5 = $62 + .label __6 = $63 + .label __9 = $61 + .label i = $e + .label i1 = $f + .label __10 = $5e + // [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_RSEL|3 sta D011 - // [154] call plexInit + // [163] call plexInit // Initialize the multiplexer - // [212] phi from init to plexInit [phi:init->plexInit] + // [221] phi from init to plexInit [phi:init->plexInit] plexInit_from_init: jsr plexInit - // [155] phi from init to init::@1 [phi:init->init::@1] + // [164] phi from init to init::@1 [phi:init->init::@1] __b1_from_init: - // [155] phi (byte) init::i#2 = (byte) 0 [phi:init->init::@1#0] -- vbuz1=vbuc1 + // [164] phi (byte) init::i#2 = (byte) 0 [phi:init->init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b1 // Set the sprite pointers & initial positions - // [155] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + // [164] phi from init::@1 to init::@1 [phi:init::@1->init::@1] __b1_from___b1: - // [155] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#0] -- register_copy + // [164] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#0] -- register_copy jmp __b1 // init::@1 __b1: - // [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 + // [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 lda #$ff&SPRITE/$40 ldy.z i sta PLEX_PTR,y - // [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda.z i asl asl sta.z __10 - // [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 -- vbuz1=vbuz2_plus_vbuz3 + // [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 -- vbuz1=vbuz2_plus_vbuz3 lda.z __10 clc adc.z i sta.z __3 - // [159] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 -- vbuz1=vbuc1_plus_vbuz2 + // [168] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 -- vbuz1=vbuc1_plus_vbuz2 lax.z __3 axs #-[$18] stx.z __4 - // [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __9 - // [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 -- pwuc1_derefidx_vbuz1=vbuz2 + // [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 -- pwuc1_derefidx_vbuz1=vbuz2 lda.z __9 ldx.z __4 tay txa sta PLEX_XPOS,y - // [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 + // [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda.z i asl asl asl sta.z __5 - // [163] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 -- vbuz1=vbuc1_plus_vbuz2 + // [172] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 -- vbuz1=vbuc1_plus_vbuz2 lax.z __5 axs #-[$32] stx.z __6 - // [164] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // [173] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __6 ldy.z i sta PLEX_YPOS,y - // [165] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 + // [174] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [166] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [175] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i bne __b1_from___b1 jmp __b2 // init::@2 __b2: - // [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE - // [168] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + // [177] phi from init::@2 to init::@3 [phi:init::@2->init::@3] __b3_from___b2: - // [168] phi (byte) init::i1#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuz1=vbuc1 + // [177] phi (byte) init::i1#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuz1=vbuc1 lda #0 sta.z i1 jmp __b3 - // [168] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + // [177] phi from init::@3 to init::@3 [phi:init::@3->init::@3] __b3_from___b3: - // [168] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy + // [177] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy jmp __b3 // init::@3 __b3: - // [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z i1 sta SPRITES_COLS,y - // [170] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuz1=_inc_vbuz1 + // [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuz1=_inc_vbuz1 inc.z i1 - // [171] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 + // [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z i1 bne __b3_from___b3 - // [172] phi from init::@3 to init::@4 [phi:init::@3->init::@4] + // [181] phi from init::@3 to init::@4 [phi:init::@3->init::@4] __b4_from___b3: jmp __b4 // init::@4 __b4: - // [173] call mulf_init - // [183] phi from init::@4 to mulf_init [phi:init::@4->mulf_init] + // [182] call mulf_init + // [192] phi from init::@4 to mulf_init [phi:init::@4->mulf_init] mulf_init_from___b4: jsr mulf_init - // [174] phi from init::@4 to init::@5 [phi:init::@4->init::@5] + // [183] phi from init::@4 to init::@5 [phi:init::@4->init::@5] __b5_from___b4: jmp __b5 // init::@5 __b5: - // [175] call memset + // [184] call memset // Clear screen - // [177] phi from init::@5 to memset [phi:init::@5->memset] + // [186] phi from init::@5 to memset [phi:init::@5->memset] memset_from___b5: jsr memset jmp __breturn // init::@return __breturn: - // [176] return + // [185] return rts } // memset @@ -4777,10 +4262,10 @@ memset: { .const c = ' ' .const num = $3e8 .label end = str+num - .label dst = $14 - // [178] phi from memset to memset::@1 [phi:memset->memset::@1] + .label dst = $10 + // [187] phi from memset to memset::@1 [phi:memset->memset::@1] __b1_from_memset: - // [178] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + // [187] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 lda #str @@ -4788,7 +4273,7 @@ memset: { jmp __b1 // memset::@1 __b1: - // [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + // [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 lda.z dst+1 cmp #>end bne __b2 @@ -4798,66 +4283,66 @@ memset: { jmp __breturn // memset::@return __breturn: - // [180] return + // [189] return rts // memset::@2 __b2: - // [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y - // [182] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [191] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 !: - // [178] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] + // [187] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] __b1_from___b2: - // [178] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy + // [187] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy jmp __b1 } // mulf_init // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) mulf_init: { - .label __1 = $62 - .label __4 = $63 - .label __5 = $64 + .label __1 = $64 + .label __4 = $65 + .label __5 = $66 // x/2 - .label c = $18 + .label c = $14 // Counter used for determining x%2==0 - .label sqr1_hi = $19 + .label sqr1_hi = $15 // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4 - .label sqr = $22 - .label sqr1_lo = $16 + .label sqr = $1e + .label sqr1_lo = $12 // sqr = (x*x)/4 - .label x_2 = $1b + .label x_2 = $17 // Decrease or increase x_255 - initially we decrease - .label sqr2_hi = $1f + .label sqr2_hi = $1b // Fill mulf_sqr2 = g(x) = f(x-255) : If x-255<0 then g(x)=f(255-x) (because x*x = -x*-x) // g(0) = f(255), g(1) = f(254), ..., g(254) = f(1), g(255) = f(0), g(256) = f(1), ..., g(510) = f(255), g(511) = f(256) - .label x_255 = $1e - .label sqr2_lo = $1c + .label x_255 = $1a + .label sqr2_lo = $18 //Start with g(0)=f(255) - .label dir = $21 - // [184] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1] + .label dir = $1d + // [193] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1] __b1_from_mulf_init: - // [184] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuz1=vbuc1 + // [193] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z x_2 - // [184] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 + // [193] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 lda #mulf_sqr1_hi+1 sta.z sqr1_hi+1 - // [184] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 + // [193] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - // [184] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 + // [193] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 lda #0 sta.z c - // [184] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 + // [193] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 lda #mulf_sqr1_lo+1 @@ -4865,27 +4350,27 @@ mulf_init: { jmp __b1 // mulf_init::@1 __b1: - // [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 + // [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 lda.z sqr1_lo cmp #mulf_init::@5] + // [195] phi from mulf_init::@1 to mulf_init::@5 [phi:mulf_init::@1->mulf_init::@5] __b5_from___b1: - // [186] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 + // [195] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 lda #$ff sta.z dir - // [186] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 + // [195] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 lda #mulf_sqr2_hi sta.z sqr2_hi+1 - // [186] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuz1=vbuc1 + // [195] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuz1=vbuc1 lda #-1 sta.z x_255 - // [186] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 + // [195] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 lda #mulf_sqr2_lo @@ -4893,7 +4378,7 @@ mulf_init: { jmp __b5 // mulf_init::@5 __b5: - // [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 + // [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 @@ -4903,123 +4388,123 @@ mulf_init: { jmp __b7 // mulf_init::@7 __b7: - // [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 + // [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 // Set the very last value g(511) = f(256) lda mulf_sqr1_lo+$100 sta mulf_sqr2_lo+$1ff - // [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 + // [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 lda mulf_sqr1_hi+$100 sta mulf_sqr2_hi+$1ff jmp __breturn // mulf_init::@return __breturn: - // [190] return + // [199] return rts // mulf_init::@6 __b6: - // [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy.z x_255 lda mulf_sqr1_lo,y ldy #0 sta (sqr2_lo),y - // [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy.z x_255 lda mulf_sqr1_hi,y ldy #0 sta (sqr2_hi),y - // [193] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 + // [202] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 inc.z sqr2_hi bne !+ inc.z sqr2_hi+1 !: - // [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuz1=vbuz1_plus_vbuz2 + // [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z x_255 clc adc.z dir sta.z x_255 - // [195] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuz1_neq_0_then_la1 + // [204] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuz1_neq_0_then_la1 lda.z x_255 cmp #0 bne __b9_from___b6 - // [197] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8] + // [206] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8] __b8_from___b6: - // [197] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 + // [206] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 lda #1 sta.z dir jmp __b8 - // [196] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9] + // [205] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9] __b9_from___b6: jmp __b9 // mulf_init::@9 __b9: - // [197] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8] + // [206] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8] __b8_from___b9: - // [197] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy + // [206] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy jmp __b8 // mulf_init::@8 __b8: - // [198] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 + // [207] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 inc.z sqr2_lo bne !+ inc.z sqr2_lo+1 !: - // [186] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5] + // [195] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5] __b5_from___b8: - // [186] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy - // [186] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy - // [186] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy - // [186] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy + // [195] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy + // [195] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy + // [195] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy + // [195] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy jmp __b5 // mulf_init::@2 __b2: - // [199] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 + // [208] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 + // [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 lda #1 and.z c sta.z __1 - // [201] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuz1_neq_0_then_la1 + // [210] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuz1_neq_0_then_la1 lda.z __1 cmp #0 bne __b3_from___b2 jmp __b4 // mulf_init::@4 __b4: - // [202] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuz1=_inc_vbuz1 + // [211] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuz1=_inc_vbuz1 inc.z x_2 - // [203] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 + // [212] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 inc.z sqr bne !+ inc.z sqr+1 !: - // [204] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3] + // [213] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3] __b3_from___b2: __b3_from___b4: - // [204] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy - // [204] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy + // [213] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy + // [213] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy jmp __b3 // mulf_init::@3 __b3: - // [205] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuz1=_lo_vwuz2 + // [214] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuz1=_lo_vwuz2 lda.z sqr sta.z __4 - // [206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuz2 + // [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuz2 lda.z __4 ldy #0 sta (sqr1_lo),y - // [207] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuz1=_hi_vwuz2 + // [216] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuz1=_hi_vwuz2 lda.z sqr+1 sta.z __5 - // [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuz2 + // [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuz2 lda.z __5 ldy #0 sta (sqr1_hi),y - // [209] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 + // [218] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: - // [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuz2 + // [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuz2 lda.z x_2 clc adc.z sqr @@ -5027,59 +4512,59 @@ mulf_init: { bcc !+ inc.z sqr+1 !: - // [211] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 + // [220] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 !: - // [184] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1] + // [193] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1] __b1_from___b3: - // [184] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy - // [184] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy - // [184] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy - // [184] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy - // [184] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy + // [193] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy + // [193] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy + // [193] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy + // [193] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy + // [193] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy jmp __b1 } // plexInit // Initialize the multiplexer data structures plexInit: { - .label i = $24 - // [213] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] + .label i = $20 + // [222] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] plexSetScreen1_from_plexInit: jmp plexSetScreen1 // plexInit::plexSetScreen1 plexSetScreen1: - // [214] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] + // [223] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] __b1_from_plexSetScreen1: - // [214] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuz1=vbuc1 + // [223] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b1 - // [214] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] + // [223] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] __b1_from___b1: - // [214] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy + // [223] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy jmp __b1 // plexInit::@1 __b1: - // [215] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuz1=vbuz1 + // [224] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuz1=vbuz1 ldy.z i tya sta PLEX_SORTED_IDX,y - // [216] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuz1=_inc_vbuz1 + // [225] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [217] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuz1_neq_vbuc1_then_la1 + // [226] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i bne __b1_from___b1 jmp __breturn // plexInit::@return __breturn: - // [218] return + // [227] return rts } // File Data - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 @@ -5124,202 +4609,321 @@ SIN: REGISTER UPLIFT POTENTIAL REGISTERS -Statement [25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:2::exit:9::keyboard_key_pressed:14::keyboard_matrix_read:20 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::loop:7::keyboard_key_pressed:73::keyboard_matrix_read:20 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a +Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ loop::angle#6 loop::angle#1 ] -Statement [26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::exit:9::keyboard_key_pressed:14::keyboard_matrix_read:20 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::loop:7::keyboard_key_pressed:73::keyboard_matrix_read:20 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a -Statement [30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:2::loop:7 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [31] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:2::loop:7 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [34] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a +Statement [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ loop::r#2 loop::r#1 ] Removing always clobbered register reg byte a as potential for zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] Removing always clobbered register reg byte a as potential for zp[1]:5 [ loop::i#2 loop::i#1 ] -Statement [38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a -Statement [39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:51 [ loop::$4 ] -Statement [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] { } ) always clobbers reg byte a -Statement [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] { } ) always clobbers reg byte a -Statement [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a -Statement [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a -Statement [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:2::loop:7 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a -Statement [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:2::loop:7 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ loop::angle#1 ] ( main:2::loop:7 [ loop::angle#1 ] { } ) always clobbers reg byte a -Statement [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:2::loop:7 [ loop::angle#1 ] { } ) always clobbers reg byte a -Statement [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ loop::angle#1 loop::$11 ] ( main:2::loop:7 [ loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 loop::i1#5 ] ( main:2::loop:7 [ loop::angle#1 plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 loop::i1#5 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] -Removing always clobbered register reg byte a as potential for zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] -Removing always clobbered register reg byte a as potential for zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] -Removing always clobbered register reg byte a as potential for zp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] -Removing always clobbered register reg byte a as potential for zp[1]:10 [ loop::i1#5 loop::i1#1 ] -Statement [72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:2::loop:7 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a -Statement [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 [ plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plexShowSprite::plex_sprite_idx2#0 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Statement [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] -Statement [87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a -Statement [88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:71 [ plexShowSprite::$11 ] -Statement [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$3 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$3 ] { } ) always clobbers reg byte a -Statement [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$9 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$9 ] { } ) always clobbers reg byte a -Statement [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:76 [ plexSort::nxt_idx#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:77 [ plexSort::nxt_y#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:12 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] -Statement [113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a -Statement [115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 ] { } ) always clobbers reg byte a -Statement [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plexSort::plexFreePrepare1_s#2 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:13 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] -Statement [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 [ mulf8s::return#0 ] ( main:2::loop:7::mulf8s:37 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 [ mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:80 [ mulf8s_prepared::b#0 ] -Statement [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) [ mulf8s_prepared::m#5 mulf8s_prepared::$16 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } always clobbers reg byte a reg byte x +Statement [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] { } ) always clobbers reg byte a +Statement [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] { } ) always clobbers reg byte a +Statement [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a +Statement [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a +Statement [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a +Statement [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:6 [ loop::i1#5 loop::i1#1 ] +Statement [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:2 [ loop::angle#6 loop::angle#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:6 [ loop::i1#5 loop::i1#1 ] +Statement [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a +Statement [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y Removing always clobbered register reg byte x as potential for zp[1]:2 [ loop::angle#6 loop::angle#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:6 [ loop::i1#5 loop::i1#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] +Removing always clobbered register reg byte y as potential for zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] +Statement [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte y +Statement [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a reg byte x reg byte y +Removing always clobbered register reg byte a as potential for zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] +Statement [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] { } ) always clobbers reg byte y +Statement [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a +Statement [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:72 [ plexShowSprite::$11 ] +Statement [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:72 [ plexShowSprite::$11 ] +Statement [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] { } ) always clobbers reg byte a +Statement [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] { } ) always clobbers reg byte a +Statement [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [105] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:78 [ plexSort::nxt_idx#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:79 [ plexSort::nxt_y#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:8 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] +Statement [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a +Statement [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 ] { } ) always clobbers reg byte a +Statement [123] (volatile byte) plex_show_idx ← (byte) 0 [ plex_show_idx ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx ] { } ) always clobbers reg byte a +Statement [124] (volatile byte) plex_sprite_idx ← (byte) 0 [ plex_show_idx plex_sprite_idx ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx ] { } ) always clobbers reg byte a +Statement [125] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb ] { } ) always clobbers reg byte a +Statement [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:9 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] +Statement [131] (volatile byte) plex_free_next ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 [ mulf8s::return#0 ] ( main:6::loop:11::mulf8s:41 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 [ mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:82 [ mulf8s_prepared::b#0 ] +Statement [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) [ mulf8s_prepared::m#5 mulf8s_prepared::$16 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } always clobbers reg byte a reg byte x Removing always clobbered register reg byte x as potential for zp[1]:3 [ loop::r#2 loop::r#1 ] Removing always clobbered register reg byte x as potential for zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] Removing always clobbered register reg byte x as potential for zp[1]:5 [ loop::i#2 loop::i#1 ] -Removing always clobbered register reg byte x as potential for zp[1]:80 [ mulf8s_prepared::b#0 ] -Statement [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) [ mulf8u_prepared::return#0 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128::mulf8u_prepared:132 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128::mulf8u_prepared:132 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte x as potential for zp[1]:82 [ mulf8s_prepared::b#0 ] +Statement [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) [ mulf8u_prepared::return#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137::mulf8u_prepared:141 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137::mulf8u_prepared:141 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a Statement asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:15 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] -Statement [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:18 [ init::i#2 init::i#1 ] -Statement [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 [ init::i#2 init::$10 ] ( main:2::init:5 [ init::i#2 init::$10 ] { } ) always clobbers reg byte a -Statement [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 [ init::i#2 init::$3 ] ( main:2::init:5 [ init::i#2 init::$3 ] { } ) always clobbers reg byte a -Statement [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 init::$4 init::$9 ] ( main:2::init:5 [ init::i#2 init::$4 init::$9 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:94 [ init::$4 ] -Statement [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a -Statement [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:2::init:5 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a -Statement [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:2::init:5 [ init::i1#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:19 [ init::i1#2 init::i1#1 ] -Statement [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::init:5::memset:175 [ memset::dst#2 ] { } ) always clobbers reg byte a -Statement [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::init:5::memset:175 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y -Statement [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:27 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -Statement [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] -Statement [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:2::init:5::mulf_init:173 [ ] { } ) always clobbers reg byte a -Statement [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:2::init:5::mulf_init:173 [ ] { } ) always clobbers reg byte a -Statement [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] -Removing always clobbered register reg byte y as potential for zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] -Statement [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y -Statement [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] { } ) always clobbers reg byte a -Statement [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] { } ) always clobbers reg byte a -Statement [206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] -Removing always clobbered register reg byte y as potential for zp[1]:27 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -Statement [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y -Statement [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a -Statement [25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:2::exit:9::keyboard_key_pressed:14::keyboard_matrix_read:20 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::loop:7::keyboard_key_pressed:73::keyboard_matrix_read:20 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a -Statement [26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::exit:9::keyboard_key_pressed:14::keyboard_matrix_read:20 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:2::loop:7::keyboard_key_pressed:73::keyboard_matrix_read:20 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a -Statement [30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:2::loop:7 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [31] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:2::loop:7 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [34] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a -Statement [38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a -Statement [39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] { } ) always clobbers reg byte a -Statement [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] { } ) always clobbers reg byte a -Statement [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a -Statement [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:2::loop:7 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a -Statement [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:2::loop:7 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a -Statement [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:2::loop:7 [ loop::angle#6 ] { } ) always clobbers reg byte a -Statement [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ loop::angle#1 ] ( main:2::loop:7 [ loop::angle#1 ] { } ) always clobbers reg byte a -Statement [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:2::loop:7 [ loop::angle#1 ] { } ) always clobbers reg byte a -Statement [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ loop::angle#1 loop::$11 ] ( main:2::loop:7 [ loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a -Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 loop::i1#5 ] ( main:2::loop:7 [ loop::angle#1 plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 loop::i1#5 ] { } ) always clobbers reg byte a -Statement [72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:2::loop:7 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a -Statement [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 [ plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plexShowSprite::plex_sprite_idx2#0 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_free_next#17 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Statement [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Statement [87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a -Statement [88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a -Statement [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$3 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$3 ] { } ) always clobbers reg byte a -Statement [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$9 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 plexShowSprite::$9 ] { } ) always clobbers reg byte a -Statement [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 [ plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] ( main:2::loop:7::plexShowSprite:69 [ loop::angle#1 loop::i1#5 plex_sprite_idx#43 plex_show_idx#43 plex_sprite_msb#43 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [107] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a -Statement [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a -Statement [113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a -Statement [115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::m#2 ] { } ) always clobbers reg byte a -Statement [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plexSort::plexFreePrepare1_s#2 ] ( main:2::loop:7::plexSort:59 [ loop::angle#6 plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a -Statement [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 [ mulf8s::return#0 ] ( main:2::loop:7::mulf8s:37 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 [ mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a -Statement [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a -Statement [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) [ mulf8s_prepared::m#5 mulf8s_prepared::$16 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:11 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] +Statement [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a +Statement [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:14 [ init::i#2 init::i#1 ] +Statement [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 [ init::i#2 init::$10 ] ( main:6::init:9 [ init::i#2 init::$10 ] { } ) always clobbers reg byte a +Statement [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 [ init::i#2 init::$3 ] ( main:6::init:9 [ init::i#2 init::$3 ] { } ) always clobbers reg byte a +Statement [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 init::$4 init::$9 ] ( main:6::init:9 [ init::i#2 init::$4 init::$9 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:96 [ init::$4 ] +Statement [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:6::init:9 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a +Statement [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a +Statement [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:15 [ init::i1#2 init::i1#1 ] +Statement [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a +Statement [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y +Statement [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:23 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Statement [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] +Statement [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:6::init:9::mulf_init:182 [ ] { } ) always clobbers reg byte a +Statement [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:6::init:9::mulf_init:182 [ ] { } ) always clobbers reg byte a +Statement [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] +Statement [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y +Statement [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] { } ) always clobbers reg byte a +Statement [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] { } ) always clobbers reg byte a +Statement [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:23 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Statement [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y +Statement [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a +Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a +Statement [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a +Statement [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] { } ) always clobbers reg byte a +Statement [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] { } ) always clobbers reg byte a +Statement [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a +Statement [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a +Statement [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a +Statement [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a reg byte x +Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a +Statement [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y +Statement [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] { } ) always clobbers reg byte a +Statement [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a +Statement [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y +Statement [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] +Statement [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte y +Statement [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] { } ) always clobbers reg byte y +Statement [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a +Statement [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a +Statement [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] { } ) always clobbers reg byte y +Statement [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] { } ) always clobbers reg byte a +Statement [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] { } ) always clobbers reg byte a +Statement [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [105] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a +Statement [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a +Statement [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a +Statement [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 ] { } ) always clobbers reg byte a +Statement [123] (volatile byte) plex_show_idx ← (byte) 0 [ plex_show_idx ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx ] { } ) always clobbers reg byte a +Statement [124] (volatile byte) plex_sprite_idx ← (byte) 0 [ plex_show_idx plex_sprite_idx ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx ] { } ) always clobbers reg byte a +Statement [125] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb ] { } ) always clobbers reg byte a +Statement [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a +Statement [131] (volatile byte) plex_free_next ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 [ mulf8s::return#0 ] ( main:6::loop:11::mulf8s:41 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 [ mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a +Statement [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) [ mulf8s_prepared::m#5 mulf8s_prepared::$16 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a Statement asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } always clobbers reg byte a reg byte x -Statement [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) [ mulf8u_prepared::return#0 ] ( main:2::loop:7::mulf8s:37::mulf8s_prepared:128::mulf8u_prepared:132 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:2::loop:7::mulf8s:47::mulf8s_prepared:128::mulf8u_prepared:132 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a +Statement [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) [ mulf8u_prepared::return#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137::mulf8u_prepared:141 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137::mulf8u_prepared:141 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a Statement asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } always clobbers reg byte a -Statement [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a -Statement [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 [ init::i#2 init::$10 ] ( main:2::init:5 [ init::i#2 init::$10 ] { } ) always clobbers reg byte a -Statement [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 [ init::i#2 init::$3 ] ( main:2::init:5 [ init::i#2 init::$3 ] { } ) always clobbers reg byte a -Statement [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 init::$4 init::$9 ] ( main:2::init:5 [ init::i#2 init::$4 init::$9 ] { } ) always clobbers reg byte a -Statement [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:2::init:5 [ init::i#2 ] { } ) always clobbers reg byte a -Statement [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:2::init:5 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a -Statement [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:2::init:5 [ ] { } ) always clobbers reg byte a -Statement [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:2::init:5 [ init::i1#2 ] { } ) always clobbers reg byte a -Statement [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::init:5::memset:175 [ memset::dst#2 ] { } ) always clobbers reg byte a -Statement [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::init:5::memset:175 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y -Statement [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a -Statement [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a -Statement [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:2::init:5::mulf_init:173 [ ] { } ) always clobbers reg byte a -Statement [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:2::init:5::mulf_init:173 [ ] { } ) always clobbers reg byte a -Statement [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y -Statement [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y -Statement [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] { } ) always clobbers reg byte a -Statement [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] { } ) always clobbers reg byte a -Statement [206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y -Statement [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y -Statement [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::init:5::mulf_init:173 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a -Potential registers zp[1]:2 [ loop::angle#6 loop::angle#1 ] : zp[1]:2 , reg byte y , +Statement [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a +Statement [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 [ init::i#2 init::$10 ] ( main:6::init:9 [ init::i#2 init::$10 ] { } ) always clobbers reg byte a +Statement [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 [ init::i#2 init::$3 ] ( main:6::init:9 [ init::i#2 init::$3 ] { } ) always clobbers reg byte a +Statement [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 init::$4 init::$9 ] ( main:6::init:9 [ init::i#2 init::$4 init::$9 ] { } ) always clobbers reg byte a +Statement [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:6::init:9 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a +Statement [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a +Statement [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a +Statement [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a +Statement [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y +Statement [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a +Statement [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a +Statement [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:6::init:9::mulf_init:182 [ ] { } ) always clobbers reg byte a +Statement [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:6::init:9::mulf_init:182 [ ] { } ) always clobbers reg byte a +Statement [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y +Statement [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y +Statement [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] { } ) always clobbers reg byte a +Statement [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] { } ) always clobbers reg byte a +Statement [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y +Statement [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y +Statement [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a +Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) [ ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a +Statement [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:6::exit:13::keyboard_key_pressed:18::keyboard_matrix_read:24 [ keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#2 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } main:6::loop:11::keyboard_key_pressed:77::keyboard_matrix_read:24 [ loop::angle#1 keyboard_matrix_read::return#0 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } { keyboard_matrix_read::return#0 = keyboard_matrix_read::return#2 } } ) always clobbers reg byte a +Statement [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } ) always clobbers reg byte a +Statement [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$1 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::x#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$4 loop::$20 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#3 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$5 ] { } ) always clobbers reg byte a +Statement [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::$6 ] { } ) always clobbers reg byte a +Statement [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 loop::y#0 ] { } ) always clobbers reg byte a +Statement [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::r#2 loop::i#2 loop::a#1 ] { } ) always clobbers reg byte a +Statement [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] ( main:6::loop:11 [ loop::angle#6 loop::i#2 loop::r#1 loop::a#1 ] { } ) always clobbers reg byte a +Statement [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 [ loop::angle#6 ] ( main:6::loop:11 [ loop::angle#6 ] { } ) always clobbers reg byte a +Statement [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a reg byte x +Statement [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 ] { } ) always clobbers reg byte a +Statement [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::$11 ] { } ) always clobbers reg byte a +Statement [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 ] { } ) always clobbers reg byte a +Statement [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y +Statement [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] ( main:6::loop:11 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::angle#1 loop::i1#1 ] { } ) always clobbers reg byte a +Statement [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::angle#1 ] ( main:6::loop:11 [ loop::angle#1 ] { { keyboard_key_pressed::return#0 = keyboard_key_pressed::return#3 } } ) always clobbers reg byte a +Statement [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y +Statement [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y +Statement [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte y +Statement [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] { } ) always clobbers reg byte y +Statement [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a +Statement [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a +Statement [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] { } ) always clobbers reg byte y +Statement [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] { } ) always clobbers reg byte a +Statement [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] { } ) always clobbers reg byte a +Statement [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [105] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexShowSprite:73 [ loop::angle#1 loop::i1#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a +Statement [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a +Statement [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a +Statement [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plexSort::m#2 ] { } ) always clobbers reg byte a +Statement [123] (volatile byte) plex_show_idx ← (byte) 0 [ plex_show_idx ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx ] { } ) always clobbers reg byte a +Statement [124] (volatile byte) plex_sprite_idx ← (byte) 0 [ plex_show_idx plex_sprite_idx ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx ] { } ) always clobbers reg byte a +Statement [125] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb ] { } ) always clobbers reg byte a +Statement [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a +Statement [131] (volatile byte) plex_free_next ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:6::loop:11::plexSort:63 [ loop::angle#6 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 [ mulf8s::return#0 ] ( main:6::loop:11::mulf8s:41 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 [ mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#2 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a +Statement [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 [ mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8s_prepared::m#0 mulf8s_prepared::$15 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) [ mulf8s_prepared::m#5 mulf8s_prepared::$16 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::m#5 mulf8s_prepared::$16 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } } ) always clobbers reg byte a +Statement asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } always clobbers reg byte a reg byte x +Statement [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) [ mulf8u_prepared::return#0 ] ( main:6::loop:11::mulf8s:41::mulf8s_prepared:137::mulf8u_prepared:141 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#0 loop::r#2 } { mulf8s::b#0 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#2 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } main:6::loop:11::mulf8s:51::mulf8s_prepared:137::mulf8u_prepared:141 [ loop::angle#6 loop::r#2 loop::a#2 loop::i#2 mulf8s_prepared::b#0 mulf8u_prepared::return#0 ] { { mulf8s::mulf8s_prepare1_a#0 = mulf8s::a#1 loop::r#2 } { mulf8s::b#1 = mulf8s::b#2 mulf8s_prepared::b#0 } { mulf8s::return#0 = mulf8s::return#3 } { mulf8u_prepared::return#0 = mulf8u_prepared::return#2 } } ) always clobbers reg byte a +Statement asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } always clobbers reg byte a +Statement [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a +Statement [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 [ init::i#2 init::$10 ] ( main:6::init:9 [ init::i#2 init::$10 ] { } ) always clobbers reg byte a +Statement [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 [ init::i#2 init::$3 ] ( main:6::init:9 [ init::i#2 init::$3 ] { } ) always clobbers reg byte a +Statement [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 [ init::i#2 init::$4 init::$9 ] ( main:6::init:9 [ init::i#2 init::$4 init::$9 ] { } ) always clobbers reg byte a +Statement [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 [ init::i#2 ] ( main:6::init:9 [ init::i#2 ] { } ) always clobbers reg byte a +Statement [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 [ init::i#2 init::$5 ] ( main:6::init:9 [ init::i#2 init::$5 ] { } ) always clobbers reg byte a +Statement [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:6::init:9 [ ] { } ) always clobbers reg byte a +Statement [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN [ init::i1#2 ] ( main:6::init:9 [ init::i1#2 ] { } ) always clobbers reg byte a +Statement [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a +Statement [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:6::init:9::memset:184 [ memset::dst#2 ] { } ) always clobbers reg byte a reg byte y +Statement [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] { } ) always clobbers reg byte a +Statement [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a +Statement [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) [ ] ( main:6::init:9::mulf_init:182 [ ] { } ) always clobbers reg byte a +Statement [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) [ ] ( main:6::init:9::mulf_init:182 [ ] { } ) always clobbers reg byte a +Statement [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y +Statement [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::x_255#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] { } ) always clobbers reg byte a reg byte y +Statement [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] { } ) always clobbers reg byte a +Statement [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr#4 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$1 ] { } ) always clobbers reg byte a +Statement [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y +Statement [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] { } ) always clobbers reg byte y +Statement [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:6::init:9::mulf_init:182 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] { } ) always clobbers reg byte a +Potential registers zp[1]:2 [ loop::angle#6 loop::angle#1 ] : zp[1]:2 , Potential registers zp[1]:3 [ loop::r#2 loop::r#1 ] : zp[1]:3 , reg byte y , Potential registers zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] : zp[1]:4 , reg byte y , Potential registers zp[1]:5 [ loop::i#2 loop::i#1 ] : zp[1]:5 , reg byte y , -Potential registers zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] : zp[1]:6 , reg byte x , reg byte y , -Potential registers zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] : zp[1]:7 , reg byte x , reg byte y , -Potential registers zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] : zp[1]:8 , reg byte x , reg byte y , -Potential registers zp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] : zp[1]:9 , reg byte x , reg byte y , -Potential registers zp[1]:10 [ loop::i1#5 loop::i1#1 ] : zp[1]:10 , reg byte x , reg byte y , -Potential registers zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] : zp[1]:11 , reg byte x , reg byte y , -Potential registers zp[1]:12 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] : zp[1]:12 , reg byte x , reg byte y , -Potential registers zp[1]:13 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] : zp[1]:13 , reg byte x , reg byte y , -Potential registers zp[1]:14 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] : zp[1]:14 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:15 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] : zp[1]:15 , reg byte x , reg byte y , -Potential registers zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] : zp[2]:16 , -Potential registers zp[1]:18 [ init::i#2 init::i#1 ] : zp[1]:18 , reg byte x , reg byte y , -Potential registers zp[1]:19 [ init::i1#2 init::i1#1 ] : zp[1]:19 , reg byte x , reg byte y , -Potential registers zp[2]:20 [ memset::dst#2 memset::dst#1 ] : zp[2]:20 , -Potential registers zp[2]:22 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] : zp[2]:22 , -Potential registers zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] : zp[1]:24 , reg byte x , -Potential registers zp[2]:25 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] : zp[2]:25 , -Potential registers zp[1]:27 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] : zp[1]:27 , reg byte x , -Potential registers zp[2]:28 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] : zp[2]:28 , -Potential registers zp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] : zp[1]:30 , reg byte x , -Potential registers zp[2]:31 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] : zp[2]:31 , -Potential registers zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] : zp[1]:33 , reg byte x , -Potential registers zp[2]:34 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] : zp[2]:34 , -Potential registers zp[1]:36 [ plexInit::i#2 plexInit::i#1 ] : zp[1]:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:6 [ loop::i1#5 loop::i1#1 ] : zp[1]:6 , +Potential registers zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] : zp[1]:7 , reg byte x , reg byte y , +Potential registers zp[1]:8 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] : zp[1]:8 , reg byte x , reg byte y , +Potential registers zp[1]:9 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] : zp[1]:9 , reg byte x , reg byte y , +Potential registers zp[1]:10 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:11 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] : zp[1]:11 , reg byte x , reg byte y , +Potential registers zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] : zp[2]:12 , +Potential registers zp[1]:14 [ init::i#2 init::i#1 ] : zp[1]:14 , reg byte x , reg byte y , +Potential registers zp[1]:15 [ init::i1#2 init::i1#1 ] : zp[1]:15 , reg byte x , reg byte y , +Potential registers zp[2]:16 [ memset::dst#2 memset::dst#1 ] : zp[2]:16 , +Potential registers zp[2]:18 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] : zp[2]:18 , +Potential registers zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] : zp[1]:20 , reg byte x , +Potential registers zp[2]:21 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] : zp[2]:21 , +Potential registers zp[1]:23 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] : zp[1]:23 , reg byte x , +Potential registers zp[2]:24 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] : zp[2]:24 , +Potential registers zp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] : zp[1]:26 , reg byte x , +Potential registers zp[2]:27 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] : zp[2]:27 , +Potential registers zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] : zp[1]:29 , reg byte x , +Potential registers zp[2]:30 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] : zp[2]:30 , +Potential registers zp[1]:32 [ plexInit::i#2 plexInit::i#1 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:33 [ plex_show_idx ] : zp[1]:33 , +Potential registers zp[1]:34 [ plex_sprite_idx ] : zp[1]:34 , +Potential registers zp[1]:35 [ plex_sprite_msb ] : zp[1]:35 , +Potential registers zp[1]:36 [ plex_free_next ] : zp[1]:36 , Potential registers zp[1]:37 [ keyboard_key_pressed::return#2 ] : zp[1]:37 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:38 [ exit::$0 ] : zp[1]:38 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:39 [ keyboard_matrix_read::return#2 ] : zp[1]:39 , reg byte a , reg byte x , reg byte y , @@ -5341,176 +4945,182 @@ Potential registers zp[1]:62 [ loop::$11 ] : zp[1]:62 , reg byte a , reg byte x Potential registers zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] : zp[1]:63 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:64 [ keyboard_key_pressed::return#3 ] : zp[1]:64 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:65 [ loop::$18 ] : zp[1]:65 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] : zp[1]:66 , reg byte x , reg byte y , -Potential registers zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] : zp[1]:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] : zp[1]:66 , +Potential registers zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] : zp[1]:67 , reg byte a , reg byte x , Potential registers zp[1]:68 [ plexShowSprite::plexFreeAdd1_$0 ] : zp[1]:68 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:69 [ plexShowSprite::plexFreeAdd1_$1 ] : zp[1]:69 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:70 [ plexShowSprite::xpos_idx#0 ] : zp[1]:70 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:71 [ plexShowSprite::$11 ] : zp[1]:71 , reg byte x , reg byte y , -Potential registers zp[1]:72 [ plexShowSprite::$2 ] : zp[1]:72 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:73 [ plexShowSprite::$3 ] : zp[1]:73 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:74 [ plexShowSprite::$9 ] : zp[1]:74 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:75 [ plexShowSprite::$5 ] : zp[1]:75 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:76 [ plexSort::nxt_idx#0 ] : zp[1]:76 , reg byte x , reg byte y , -Potential registers zp[1]:77 [ plexSort::nxt_y#0 ] : zp[1]:77 , reg byte x , reg byte y , -Potential registers zp[1]:78 [ plexSort::s#2 ] : zp[1]:78 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:79 [ mulf8u_prepare::a#0 ] : zp[1]:79 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:80 [ mulf8s_prepared::b#0 ] : zp[1]:80 , reg byte y , -Potential registers zp[2]:81 [ mulf8s::return#0 ] : zp[2]:81 , -Potential registers zp[1]:83 [ mulf8u_prepared::b#0 ] : zp[1]:83 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:84 [ mulf8u_prepared::return#2 ] : zp[2]:84 , -Potential registers zp[1]:86 [ mulf8s_prepared::$8 ] : zp[1]:86 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:87 [ mulf8s_prepared::$15 ] : zp[1]:87 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:88 [ mulf8s_prepared::$12 ] : zp[1]:88 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:89 [ mulf8s_prepared::$16 ] : zp[1]:89 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:90 [ mulf8u_prepared::return#0 ] : zp[2]:90 , -Potential registers zp[1]:92 [ init::$10 ] : zp[1]:92 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:93 [ init::$3 ] : zp[1]:93 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:94 [ init::$4 ] : zp[1]:94 , reg byte x , reg byte y , -Potential registers zp[1]:95 [ init::$9 ] : zp[1]:95 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:96 [ init::$5 ] : zp[1]:96 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:97 [ init::$6 ] : zp[1]:97 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:98 [ mulf_init::$1 ] : zp[1]:98 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:99 [ mulf_init::$4 ] : zp[1]:99 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:100 [ mulf_init::$5 ] : zp[1]:100 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:70 [ plexShowSprite::plexFreeAdd1_$2 ] : zp[1]:70 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:71 [ plexShowSprite::xpos_idx#0 ] : zp[1]:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:72 [ plexShowSprite::$11 ] : zp[1]:72 , reg byte x , +Potential registers zp[1]:73 [ plexShowSprite::$2 ] : zp[1]:73 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:74 [ plexShowSprite::$3 ] : zp[1]:74 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:75 [ plexShowSprite::$9 ] : zp[1]:75 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:76 [ plexShowSprite::$5 ] : zp[1]:76 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:77 [ plexShowSprite::$6 ] : zp[1]:77 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:78 [ plexSort::nxt_idx#0 ] : zp[1]:78 , reg byte x , reg byte y , +Potential registers zp[1]:79 [ plexSort::nxt_y#0 ] : zp[1]:79 , reg byte x , reg byte y , +Potential registers zp[1]:80 [ plexSort::s#2 ] : zp[1]:80 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:81 [ mulf8u_prepare::a#0 ] : zp[1]:81 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:82 [ mulf8s_prepared::b#0 ] : zp[1]:82 , reg byte y , +Potential registers zp[2]:83 [ mulf8s::return#0 ] : zp[2]:83 , +Potential registers zp[1]:85 [ mulf8u_prepared::b#0 ] : zp[1]:85 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:86 [ mulf8u_prepared::return#2 ] : zp[2]:86 , +Potential registers zp[1]:88 [ mulf8s_prepared::$8 ] : zp[1]:88 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:89 [ mulf8s_prepared::$15 ] : zp[1]:89 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:90 [ mulf8s_prepared::$12 ] : zp[1]:90 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:91 [ mulf8s_prepared::$16 ] : zp[1]:91 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:92 [ mulf8u_prepared::return#0 ] : zp[2]:92 , +Potential registers zp[1]:94 [ init::$10 ] : zp[1]:94 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:95 [ init::$3 ] : zp[1]:95 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:96 [ init::$4 ] : zp[1]:96 , reg byte x , reg byte y , +Potential registers zp[1]:97 [ init::$9 ] : zp[1]:97 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:98 [ init::$5 ] : zp[1]:98 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:99 [ init::$6 ] : zp[1]:99 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:100 [ mulf_init::$1 ] : zp[1]:100 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:101 [ mulf_init::$4 ] : zp[1]:101 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:102 [ mulf_init::$5 ] : zp[1]:102 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [plexSort] 36,166,672.83: zp[1]:12 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] 3,000,003: zp[1]:13 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] 2,000,002: zp[1]:78 [ plexSort::s#2 ] 1,916,668.58: zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] 1,500,000.38: zp[1]:77 [ plexSort::nxt_y#0 ] 300,000.3: zp[1]:76 [ plexSort::nxt_idx#0 ] -Uplift Scope [mulf8u_prepared] 11,000,002: zp[1]:83 [ mulf8u_prepared::b#0 ] 3,666,667.33: zp[2]:90 [ mulf8u_prepared::return#0 ] 2,000,002: zp[2]:84 [ mulf8u_prepared::return#2 ] -Uplift Scope [mulf8s_prepared] 6,916,673.58: zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] 2,000,002: zp[1]:86 [ mulf8s_prepared::$8 ] 2,000,002: zp[1]:87 [ mulf8s_prepared::$15 ] 2,000,002: zp[1]:88 [ mulf8s_prepared::$12 ] 2,000,002: zp[1]:89 [ mulf8s_prepared::$16 ] 110,000.2: zp[1]:80 [ mulf8s_prepared::b#0 ] -Uplift Scope [plexShowSprite] 200,002: zp[1]:68 [ plexShowSprite::plexFreeAdd1_$0 ] 200,002: zp[1]:69 [ plexShowSprite::plexFreeAdd1_$1 ] 200,002: zp[1]:70 [ plexShowSprite::xpos_idx#0 ] 200,002: zp[1]:72 [ plexShowSprite::$2 ] 200,002: zp[1]:73 [ plexShowSprite::$3 ] 200,002: zp[1]:74 [ plexShowSprite::$9 ] 200,002: zp[1]:75 [ plexShowSprite::$5 ] 150,001.5: zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] 100,001: zp[1]:71 [ plexShowSprite::$11 ] 27,273: zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] -Uplift Scope [mulf8u_prepare] 1,100,002: zp[1]:79 [ mulf8u_prepare::a#0 ] -Uplift Scope [loop] 55,001: zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] 20,002: zp[2]:45 [ loop::$1 ] 20,002: zp[2]:47 [ loop::$2 ] 20,002: zp[2]:49 [ loop::x#0 ] 20,002: zp[1]:52 [ loop::$20 ] 20,002: zp[2]:55 [ loop::$5 ] 20,002: zp[2]:57 [ loop::$6 ] 20,002: zp[2]:59 [ loop::y#0 ] 20,002: zp[1]:61 [ loop::$8 ] 20,002: zp[1]:62 [ loop::$11 ] 18,335.17: zp[1]:10 [ loop::i1#5 loop::i1#1 ] 16,740.8: zp[1]:5 [ loop::i#2 loop::i#1 ] 10,001: zp[1]:51 [ loop::$4 ] 8,955.12: zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] 8,485.7: zp[1]:3 [ loop::r#2 loop::r#1 ] 2,002: zp[1]:65 [ loop::$18 ] 214.64: zp[1]:2 [ loop::angle#6 loop::angle#1 ] -Uplift Scope [mulf_init] 43,337.67: zp[2]:34 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] 24,446.89: zp[2]:28 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] 22,859.43: zp[2]:22 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] 21,002.1: zp[1]:27 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] 20,002: zp[1]:98 [ mulf_init::$1 ] 20,002: zp[1]:99 [ mulf_init::$4 ] 20,002: zp[1]:100 [ mulf_init::$5 ] 14,001.4: zp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] 13,751.38: zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] 12,308.92: zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] 10,834.42: zp[2]:31 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] 9,167.58: zp[2]:25 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -Uplift Scope [] 134,401.56: zp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] 29,305.99: zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] 27,000.49: zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] 25,091.29: zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] -Uplift Scope [mulf8s] 80,005: zp[1]:15 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] 40,004: zp[1]:14 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] 30,000.75: zp[2]:81 [ mulf8s::return#0 ] 20,002: zp[2]:43 [ mulf8s::return#2 ] 20,002: zp[2]:53 [ mulf8s::return#3 ] +Uplift Scope [plexSort] 36,166,672.83: zp[1]:8 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] 3,000,003: zp[1]:9 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] 2,000,002: zp[1]:80 [ plexSort::s#2 ] 1,916,668.58: zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] 1,500,000.38: zp[1]:79 [ plexSort::nxt_y#0 ] 300,000.3: zp[1]:78 [ plexSort::nxt_idx#0 ] +Uplift Scope [mulf8u_prepared] 11,000,002: zp[1]:85 [ mulf8u_prepared::b#0 ] 3,666,667.33: zp[2]:92 [ mulf8u_prepared::return#0 ] 2,000,002: zp[2]:86 [ mulf8u_prepared::return#2 ] +Uplift Scope [mulf8s_prepared] 6,916,673.58: zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] 2,000,002: zp[1]:88 [ mulf8s_prepared::$8 ] 2,000,002: zp[1]:89 [ mulf8s_prepared::$15 ] 2,000,002: zp[1]:90 [ mulf8s_prepared::$12 ] 2,000,002: zp[1]:91 [ mulf8s_prepared::$16 ] 110,000.2: zp[1]:82 [ mulf8s_prepared::b#0 ] +Uplift Scope [plexShowSprite] 200,002: zp[1]:68 [ plexShowSprite::plexFreeAdd1_$0 ] 200,002: zp[1]:69 [ plexShowSprite::plexFreeAdd1_$1 ] 200,002: zp[1]:70 [ plexShowSprite::plexFreeAdd1_$2 ] 200,002: zp[1]:71 [ plexShowSprite::xpos_idx#0 ] 200,002: zp[1]:73 [ plexShowSprite::$2 ] 200,002: zp[1]:74 [ plexShowSprite::$3 ] 200,002: zp[1]:75 [ plexShowSprite::$9 ] 200,002: zp[1]:76 [ plexShowSprite::$5 ] 200,002: zp[1]:77 [ plexShowSprite::$6 ] 150,001.5: zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] 100,001: zp[1]:72 [ plexShowSprite::$11 ] 25,000.25: zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] +Uplift Scope [mulf8u_prepare] 1,100,002: zp[1]:81 [ mulf8u_prepare::a#0 ] +Uplift Scope [loop] 55,001: zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] 20,002: zp[2]:45 [ loop::$1 ] 20,002: zp[2]:47 [ loop::$2 ] 20,002: zp[2]:49 [ loop::x#0 ] 20,002: zp[1]:52 [ loop::$20 ] 20,002: zp[2]:55 [ loop::$5 ] 20,002: zp[2]:57 [ loop::$6 ] 20,002: zp[2]:59 [ loop::y#0 ] 20,002: zp[1]:61 [ loop::$8 ] 20,002: zp[1]:62 [ loop::$11 ] 18,335.17: zp[1]:6 [ loop::i1#5 loop::i1#1 ] 16,740.8: zp[1]:5 [ loop::i#2 loop::i#1 ] 10,001: zp[1]:51 [ loop::$4 ] 8,955.12: zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] 8,485.7: zp[1]:3 [ loop::r#2 loop::r#1 ] 2,002: zp[1]:65 [ loop::$18 ] 214.64: zp[1]:2 [ loop::angle#6 loop::angle#1 ] +Uplift Scope [mulf_init] 43,337.67: zp[2]:30 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] 24,446.89: zp[2]:24 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] 22,859.43: zp[2]:18 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] 21,002.1: zp[1]:23 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] 20,002: zp[1]:100 [ mulf_init::$1 ] 20,002: zp[1]:101 [ mulf_init::$4 ] 20,002: zp[1]:102 [ mulf_init::$5 ] 14,001.4: zp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] 13,751.38: zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] 12,308.92: zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] 10,834.42: zp[2]:27 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] 9,167.58: zp[2]:21 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +Uplift Scope [mulf8s] 80,005: zp[1]:11 [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] 40,004: zp[1]:10 [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] 30,000.75: zp[2]:83 [ mulf8s::return#0 ] 20,002: zp[2]:43 [ mulf8s::return#2 ] 20,002: zp[2]:53 [ mulf8s::return#3 ] Uplift Scope [keyboard_matrix_read] 36,667.33: zp[1]:42 [ keyboard_matrix_read::return#0 ] 20,002: zp[1]:39 [ keyboard_matrix_read::return#2 ] -Uplift Scope [plexInit] 35,003.5: zp[1]:36 [ plexInit::i#2 plexInit::i#1 ] -Uplift Scope [memset] 33,336.67: zp[2]:20 [ memset::dst#2 memset::dst#1 ] +Uplift Scope [] 12,978.91: zp[1]:35 [ plex_sprite_msb ] 10,408.33: zp[1]:33 [ plex_show_idx ] 8,913.2: zp[1]:34 [ plex_sprite_idx ] 8,205.31: zp[1]:36 [ plex_free_next ] +Uplift Scope [plexInit] 35,003.5: zp[1]:32 [ plexInit::i#2 plexInit::i#1 ] +Uplift Scope [memset] 33,336.67: zp[2]:16 [ memset::dst#2 memset::dst#1 ] Uplift Scope [keyboard_key_pressed] 20,002: zp[1]:40 [ keyboard_key_pressed::$2 ] 3,000.75: zp[1]:41 [ keyboard_key_pressed::return#0 ] 2,002: zp[1]:37 [ keyboard_key_pressed::return#2 ] 2,002: zp[1]:64 [ keyboard_key_pressed::return#3 ] -Uplift Scope [init] 3,003: zp[1]:19 [ init::i1#2 init::i1#1 ] 2,302.3: zp[1]:18 [ init::i#2 init::i#1 ] 2,002: zp[1]:92 [ init::$10 ] 2,002: zp[1]:93 [ init::$3 ] 2,002: zp[1]:95 [ init::$9 ] 2,002: zp[1]:96 [ init::$5 ] 2,002: zp[1]:97 [ init::$6 ] 1,001: zp[1]:94 [ init::$4 ] +Uplift Scope [init] 3,003: zp[1]:15 [ init::i1#2 init::i1#1 ] 2,302.3: zp[1]:14 [ init::i#2 init::i#1 ] 2,002: zp[1]:94 [ init::$10 ] 2,002: zp[1]:95 [ init::$3 ] 2,002: zp[1]:97 [ init::$9 ] 2,002: zp[1]:98 [ init::$5 ] 2,002: zp[1]:99 [ init::$6 ] 1,001: zp[1]:96 [ init::$4 ] Uplift Scope [exit] 2,002: zp[1]:38 [ exit::$0 ] Uplift Scope [main] -Uplifting [plexSort] best 106800 combination reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] reg byte x [ plexSort::s#2 ] zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] zp[1]:77 [ plexSort::nxt_y#0 ] zp[1]:76 [ plexSort::nxt_idx#0 ] +Uplifting [plexSort] best 105185 combination reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] reg byte x [ plexSort::s#2 ] zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] zp[1]:79 [ plexSort::nxt_y#0 ] zp[1]:78 [ plexSort::nxt_idx#0 ] Limited combination testing to 100 combinations of 972 possible. -Uplifting [mulf8u_prepared] best 106794 combination reg byte a [ mulf8u_prepared::b#0 ] zp[2]:90 [ mulf8u_prepared::return#0 ] zp[2]:84 [ mulf8u_prepared::return#2 ] -Uplifting [mulf8s_prepared] best 106770 combination zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] reg byte a [ mulf8s_prepared::$8 ] reg byte a [ mulf8s_prepared::$15 ] reg byte a [ mulf8s_prepared::$12 ] reg byte a [ mulf8s_prepared::$16 ] zp[1]:80 [ mulf8s_prepared::b#0 ] +Uplifting [mulf8u_prepared] best 105179 combination reg byte a [ mulf8u_prepared::b#0 ] zp[2]:92 [ mulf8u_prepared::return#0 ] zp[2]:86 [ mulf8u_prepared::return#2 ] +Uplifting [mulf8s_prepared] best 105155 combination zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] reg byte a [ mulf8s_prepared::$8 ] reg byte a [ mulf8s_prepared::$15 ] reg byte a [ mulf8s_prepared::$12 ] reg byte a [ mulf8s_prepared::$16 ] zp[1]:82 [ mulf8s_prepared::b#0 ] Limited combination testing to 100 combinations of 512 possible. -Uplifting [plexShowSprite] best 106748 combination reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] reg byte a [ plexShowSprite::xpos_idx#0 ] reg byte a [ plexShowSprite::$2 ] zp[1]:73 [ plexShowSprite::$3 ] zp[1]:74 [ plexShowSprite::$9 ] zp[1]:75 [ plexShowSprite::$5 ] zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] zp[1]:71 [ plexShowSprite::$11 ] zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] -Limited combination testing to 100 combinations of 589824 possible. -Uplifting [mulf8u_prepare] best 106742 combination reg byte a [ mulf8u_prepare::a#0 ] -Uplifting [loop] best 104942 combination zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] zp[2]:45 [ loop::$1 ] zp[2]:47 [ loop::$2 ] zp[2]:49 [ loop::x#0 ] reg byte a [ loop::$20 ] zp[2]:55 [ loop::$5 ] zp[2]:57 [ loop::$6 ] zp[2]:59 [ loop::y#0 ] reg byte a [ loop::$8 ] reg byte a [ loop::$11 ] zp[1]:10 [ loop::i1#5 loop::i1#1 ] zp[1]:5 [ loop::i#2 loop::i#1 ] zp[1]:51 [ loop::$4 ] zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] zp[1]:3 [ loop::r#2 loop::r#1 ] zp[1]:65 [ loop::$18 ] zp[1]:2 [ loop::angle#6 loop::angle#1 ] -Limited combination testing to 100 combinations of 147456 possible. -Uplifting [mulf_init] best 104692 combination zp[2]:34 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:28 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:22 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:31 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:25 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +Uplifting [plexShowSprite] best 105135 combination reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$1 ] reg byte a [ plexShowSprite::plexFreeAdd1_$2 ] reg byte a [ plexShowSprite::xpos_idx#0 ] zp[1]:73 [ plexShowSprite::$2 ] zp[1]:74 [ plexShowSprite::$3 ] zp[1]:75 [ plexShowSprite::$9 ] zp[1]:76 [ plexShowSprite::$5 ] zp[1]:77 [ plexShowSprite::$6 ] zp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] zp[1]:72 [ plexShowSprite::$11 ] zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] +Limited combination testing to 100 combinations of 1572864 possible. +Uplifting [mulf8u_prepare] best 105129 combination reg byte a [ mulf8u_prepare::a#0 ] +Uplifting [loop] best 103329 combination zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] zp[2]:45 [ loop::$1 ] zp[2]:47 [ loop::$2 ] zp[2]:49 [ loop::x#0 ] reg byte a [ loop::$20 ] zp[2]:55 [ loop::$5 ] zp[2]:57 [ loop::$6 ] zp[2]:59 [ loop::y#0 ] reg byte a [ loop::$8 ] reg byte a [ loop::$11 ] zp[1]:6 [ loop::i1#5 loop::i1#1 ] zp[1]:5 [ loop::i#2 loop::i#1 ] zp[1]:51 [ loop::$4 ] zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] zp[1]:3 [ loop::r#2 loop::r#1 ] zp[1]:65 [ loop::$18 ] zp[1]:2 [ loop::angle#6 loop::angle#1 ] +Limited combination testing to 100 combinations of 24576 possible. +Uplifting [mulf_init] best 103079 combination zp[2]:30 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] zp[2]:24 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp[2]:18 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$1 ] reg byte a [ mulf_init::$4 ] reg byte a [ mulf_init::$5 ] zp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] zp[2]:27 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp[2]:21 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] Limited combination testing to 100 combinations of 1024 possible. -Uplifting [] best 104692 combination zp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] -Uplifting [mulf8s] best 103486 combination reg byte x [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] reg byte a [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] zp[2]:81 [ mulf8s::return#0 ] zp[2]:43 [ mulf8s::return#2 ] zp[2]:53 [ mulf8s::return#3 ] -Uplifting [keyboard_matrix_read] best 103474 combination reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ keyboard_matrix_read::return#2 ] -Uplifting [plexInit] best 103354 combination reg byte x [ plexInit::i#2 plexInit::i#1 ] -Uplifting [memset] best 103354 combination zp[2]:20 [ memset::dst#2 memset::dst#1 ] -Uplifting [keyboard_key_pressed] best 103165 combination reg byte a [ keyboard_key_pressed::$2 ] reg byte a [ keyboard_key_pressed::return#0 ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#3 ] +Uplifting [mulf8s] best 101873 combination reg byte x [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] reg byte a [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] zp[2]:83 [ mulf8s::return#0 ] zp[2]:43 [ mulf8s::return#2 ] zp[2]:53 [ mulf8s::return#3 ] +Uplifting [keyboard_matrix_read] best 101861 combination reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ keyboard_matrix_read::return#2 ] +Uplifting [] best 101861 combination zp[1]:35 [ plex_sprite_msb ] zp[1]:33 [ plex_show_idx ] zp[1]:34 [ plex_sprite_idx ] zp[1]:36 [ plex_free_next ] +Uplifting [plexInit] best 101741 combination reg byte x [ plexInit::i#2 plexInit::i#1 ] +Uplifting [memset] best 101741 combination zp[2]:16 [ memset::dst#2 memset::dst#1 ] +Uplifting [keyboard_key_pressed] best 101552 combination reg byte a [ keyboard_key_pressed::$2 ] reg byte a [ keyboard_key_pressed::return#0 ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#3 ] Limited combination testing to 100 combinations of 256 possible. -Uplifting [init] best 102945 combination reg byte x [ init::i1#2 init::i1#1 ] zp[1]:18 [ init::i#2 init::i#1 ] reg byte a [ init::$10 ] reg byte a [ init::$3 ] zp[1]:95 [ init::$9 ] zp[1]:96 [ init::$5 ] zp[1]:97 [ init::$6 ] zp[1]:94 [ init::$4 ] +Uplifting [init] best 101332 combination reg byte x [ init::i1#2 init::i1#1 ] zp[1]:14 [ init::i#2 init::i#1 ] reg byte a [ init::$10 ] reg byte a [ init::$3 ] zp[1]:97 [ init::$9 ] zp[1]:98 [ init::$5 ] zp[1]:99 [ init::$6 ] zp[1]:96 [ init::$4 ] Limited combination testing to 100 combinations of 27648 possible. -Uplifting [exit] best 102885 combination reg byte a [ exit::$0 ] -Uplifting [main] best 102885 combination -Attempting to uplift remaining variables inzp[1]:11 [ plexSort::m#2 plexSort::m#1 ] -Uplifting [plexSort] best 102885 combination zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] -Attempting to uplift remaining variables inzp[1]:77 [ plexSort::nxt_y#0 ] -Uplifting [plexSort] best 102885 combination zp[1]:77 [ plexSort::nxt_y#0 ] -Attempting to uplift remaining variables inzp[1]:76 [ plexSort::nxt_idx#0 ] -Uplifting [plexSort] best 102885 combination zp[1]:76 [ plexSort::nxt_idx#0 ] -Attempting to uplift remaining variables inzp[1]:73 [ plexShowSprite::$3 ] -Uplifting [plexShowSprite] best 102879 combination reg byte a [ plexShowSprite::$3 ] -Attempting to uplift remaining variables inzp[1]:74 [ plexShowSprite::$9 ] -Uplifting [plexShowSprite] best 102873 combination reg byte a [ plexShowSprite::$9 ] -Attempting to uplift remaining variables inzp[1]:75 [ plexShowSprite::$5 ] -Uplifting [plexShowSprite] best 102867 combination reg byte x [ plexShowSprite::$5 ] +Uplifting [exit] best 101272 combination reg byte a [ exit::$0 ] +Uplifting [main] best 101272 combination +Attempting to uplift remaining variables inzp[1]:7 [ plexSort::m#2 plexSort::m#1 ] +Uplifting [plexSort] best 101272 combination zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] +Attempting to uplift remaining variables inzp[1]:79 [ plexSort::nxt_y#0 ] +Uplifting [plexSort] best 101272 combination zp[1]:79 [ plexSort::nxt_y#0 ] +Attempting to uplift remaining variables inzp[1]:78 [ plexSort::nxt_idx#0 ] +Uplifting [plexSort] best 101272 combination zp[1]:78 [ plexSort::nxt_idx#0 ] +Attempting to uplift remaining variables inzp[1]:73 [ plexShowSprite::$2 ] +Uplifting [plexShowSprite] best 101266 combination reg byte a [ plexShowSprite::$2 ] +Attempting to uplift remaining variables inzp[1]:74 [ plexShowSprite::$3 ] +Uplifting [plexShowSprite] best 101260 combination reg byte a [ plexShowSprite::$3 ] +Attempting to uplift remaining variables inzp[1]:75 [ plexShowSprite::$9 ] +Uplifting [plexShowSprite] best 101254 combination reg byte a [ plexShowSprite::$9 ] +Attempting to uplift remaining variables inzp[1]:76 [ plexShowSprite::$5 ] +Uplifting [plexShowSprite] best 101248 combination reg byte x [ plexShowSprite::$5 ] +Attempting to uplift remaining variables inzp[1]:77 [ plexShowSprite::$6 ] +Uplifting [plexShowSprite] best 101244 combination reg byte a [ plexShowSprite::$6 ] Attempting to uplift remaining variables inzp[1]:67 [ plexShowSprite::plexFreeAdd1_ypos#0 ] -Uplifting [plexShowSprite] best 102858 combination reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] -Attempting to uplift remaining variables inzp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] -Uplifting [] best 102858 combination zp[1]:9 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] -Attempting to uplift remaining variables inzp[1]:80 [ mulf8s_prepared::b#0 ] -Uplifting [mulf8s_prepared] best 102858 combination zp[1]:80 [ mulf8s_prepared::b#0 ] -Attempting to uplift remaining variables inzp[1]:71 [ plexShowSprite::$11 ] -Uplifting [plexShowSprite] best 102851 combination reg byte x [ plexShowSprite::$11 ] +Uplifting [plexShowSprite] best 101235 combination reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] +Attempting to uplift remaining variables inzp[1]:82 [ mulf8s_prepared::b#0 ] +Uplifting [mulf8s_prepared] best 101235 combination zp[1]:82 [ mulf8s_prepared::b#0 ] +Attempting to uplift remaining variables inzp[1]:72 [ plexShowSprite::$11 ] +Uplifting [plexShowSprite] best 101228 combination reg byte x [ plexShowSprite::$11 ] Attempting to uplift remaining variables inzp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] -Uplifting [loop] best 102851 combination zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] -Attempting to uplift remaining variables inzp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] -Uplifting [] best 102851 combination zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] +Uplifting [loop] best 101228 combination zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] Attempting to uplift remaining variables inzp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] -Uplifting [plexShowSprite] best 102851 combination zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] -Attempting to uplift remaining variables inzp[1]:6 [ plex_free_next#17 plex_free_next#13 ] -Uplifting [] best 102851 combination zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] -Attempting to uplift remaining variables inzp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] -Uplifting [] best 102851 combination zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] -Attempting to uplift remaining variables inzp[1]:10 [ loop::i1#5 loop::i1#1 ] -Uplifting [loop] best 102851 combination zp[1]:10 [ loop::i1#5 loop::i1#1 ] +Uplifting [plexShowSprite] best 101228 combination zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] +Attempting to uplift remaining variables inzp[1]:6 [ loop::i1#5 loop::i1#1 ] +Uplifting [loop] best 101228 combination zp[1]:6 [ loop::i1#5 loop::i1#1 ] Attempting to uplift remaining variables inzp[1]:5 [ loop::i#2 loop::i#1 ] -Uplifting [loop] best 102851 combination zp[1]:5 [ loop::i#2 loop::i#1 ] -Attempting to uplift remaining variables inzp[1]:30 [ mulf_init::x_255#2 mulf_init::x_255#1 ] -Uplifting [mulf_init] best 102711 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] -Attempting to uplift remaining variables inzp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] -Uplifting [mulf_init] best 102711 combination zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] -Attempting to uplift remaining variables inzp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] -Uplifting [mulf_init] best 102711 combination zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] +Uplifting [loop] best 101228 combination zp[1]:5 [ loop::i#2 loop::i#1 ] +Attempting to uplift remaining variables inzp[1]:26 [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Uplifting [mulf_init] best 101088 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Attempting to uplift remaining variables inzp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] +Uplifting [mulf_init] best 101088 combination zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] +Attempting to uplift remaining variables inzp[1]:35 [ plex_sprite_msb ] +Uplifting [] best 101088 combination zp[1]:35 [ plex_sprite_msb ] +Attempting to uplift remaining variables inzp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] +Uplifting [mulf_init] best 101088 combination zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] +Attempting to uplift remaining variables inzp[1]:33 [ plex_show_idx ] +Uplifting [] best 101088 combination zp[1]:33 [ plex_show_idx ] Attempting to uplift remaining variables inzp[1]:51 [ loop::$4 ] -Uplifting [loop] best 102111 combination reg byte x [ loop::$4 ] +Uplifting [loop] best 100488 combination reg byte x [ loop::$4 ] Attempting to uplift remaining variables inzp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] -Uplifting [loop] best 102111 combination zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] +Uplifting [loop] best 100488 combination zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] +Attempting to uplift remaining variables inzp[1]:34 [ plex_sprite_idx ] +Uplifting [] best 100488 combination zp[1]:34 [ plex_sprite_idx ] Attempting to uplift remaining variables inzp[1]:3 [ loop::r#2 loop::r#1 ] -Uplifting [loop] best 102111 combination zp[1]:3 [ loop::r#2 loop::r#1 ] -Attempting to uplift remaining variables inzp[1]:18 [ init::i#2 init::i#1 ] -Uplifting [init] best 102111 combination zp[1]:18 [ init::i#2 init::i#1 ] +Uplifting [loop] best 100488 combination zp[1]:3 [ loop::r#2 loop::r#1 ] +Attempting to uplift remaining variables inzp[1]:36 [ plex_free_next ] +Uplifting [] best 100488 combination zp[1]:36 [ plex_free_next ] +Attempting to uplift remaining variables inzp[1]:14 [ init::i#2 init::i#1 ] +Uplifting [init] best 100488 combination zp[1]:14 [ init::i#2 init::i#1 ] Attempting to uplift remaining variables inzp[1]:65 [ loop::$18 ] -Uplifting [loop] best 102051 combination reg byte a [ loop::$18 ] -Attempting to uplift remaining variables inzp[1]:95 [ init::$9 ] -Uplifting [init] best 101991 combination reg byte a [ init::$9 ] -Attempting to uplift remaining variables inzp[1]:96 [ init::$5 ] -Uplifting [init] best 101951 combination reg byte a [ init::$5 ] -Attempting to uplift remaining variables inzp[1]:97 [ init::$6 ] -Uplifting [init] best 101891 combination reg byte a [ init::$6 ] -Attempting to uplift remaining variables inzp[1]:94 [ init::$4 ] -Uplifting [init] best 101831 combination reg byte x [ init::$4 ] +Uplifting [loop] best 100428 combination reg byte a [ loop::$18 ] +Attempting to uplift remaining variables inzp[1]:97 [ init::$9 ] +Uplifting [init] best 100368 combination reg byte a [ init::$9 ] +Attempting to uplift remaining variables inzp[1]:98 [ init::$5 ] +Uplifting [init] best 100328 combination reg byte a [ init::$5 ] +Attempting to uplift remaining variables inzp[1]:99 [ init::$6 ] +Uplifting [init] best 100268 combination reg byte a [ init::$6 ] +Attempting to uplift remaining variables inzp[1]:96 [ init::$4 ] +Uplifting [init] best 100208 combination reg byte x [ init::$4 ] Attempting to uplift remaining variables inzp[1]:2 [ loop::angle#6 loop::angle#1 ] -Uplifting [loop] best 101831 combination zp[1]:2 [ loop::angle#6 loop::angle#1 ] -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] ] with [ zp[2]:81 [ mulf8s::return#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 ] ] with [ zp[2]:84 [ mulf8u_prepared::return#2 ] ] - score: 1 +Uplifting [loop] best 100208 combination zp[1]:2 [ loop::angle#6 loop::angle#1 ] +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 ] ] with [ zp[2]:83 [ mulf8s::return#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 ] ] with [ zp[2]:86 [ mulf8u_prepared::return#2 ] ] - score: 1 Coalescing zero page register [ zp[2]:43 [ mulf8s::return#2 ] ] with [ zp[2]:45 [ loop::$1 ] ] - score: 1 Coalescing zero page register [ zp[2]:47 [ loop::$2 ] ] with [ zp[2]:49 [ loop::x#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:53 [ mulf8s::return#3 ] ] with [ zp[2]:55 [ loop::$5 ] ] - score: 1 Coalescing zero page register [ zp[2]:57 [ loop::$6 ] ] with [ zp[2]:59 [ loop::y#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 ] ] with [ zp[2]:43 [ mulf8s::return#2 loop::$1 ] ] - score: 1 -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 ] ] with [ zp[2]:53 [ mulf8s::return#3 loop::$5 ] ] - score: 1 -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 ] ] with [ zp[2]:90 [ mulf8u_prepared::return#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 ] ] with [ zp[2]:47 [ loop::$2 loop::x#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 ] ] with [ zp[2]:57 [ loop::$6 loop::y#0 ] ] - score: 1 -Coalescing zero page register [ zp[1]:6 [ plex_free_next#17 plex_free_next#13 ] ] with [ zp[1]:3 [ loop::r#2 loop::r#1 ] ] -Coalescing zero page register [ zp[1]:7 [ plex_sprite_idx#43 plex_sprite_idx#15 ] ] with [ zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] ] -Coalescing zero page register [ zp[1]:8 [ plex_show_idx#43 plex_show_idx#15 ] ] with [ zp[1]:5 [ loop::i#2 loop::i#1 ] ] -Coalescing zero page register [ zp[1]:18 [ init::i#2 init::i#1 ] ] with [ zp[1]:2 [ loop::angle#6 loop::angle#1 ] ] -Coalescing zero page register [ zp[2]:20 [ memset::dst#2 memset::dst#1 ] ] with [ zp[2]:16 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] ] -Coalescing zero page register [ zp[1]:24 [ mulf_init::c#2 mulf_init::c#1 ] ] with [ zp[1]:10 [ loop::i1#5 loop::i1#1 ] ] -Coalescing zero page register [ zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 ] ] with [ zp[1]:11 [ plexSort::m#2 plexSort::m#1 ] ] -Coalescing zero page register [ zp[1]:76 [ plexSort::nxt_idx#0 ] ] with [ zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] ] -Coalescing zero page register [ zp[1]:80 [ mulf8s_prepared::b#0 ] ] with [ zp[1]:77 [ plexSort::nxt_y#0 ] ] -Coalescing zero page register [ zp[2]:22 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] ] with [ zp[2]:20 [ memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] ] -Coalescing zero page register [ zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] ] with [ zp[1]:33 [ mulf_init::dir#2 mulf_init::dir#4 plexSort::m#2 plexSort::m#1 ] ] -Allocated (was zp[1]:6) zp[1]:2 [ plex_free_next#17 plex_free_next#13 loop::r#2 loop::r#1 ] -Allocated (was zp[1]:7) zp[1]:3 [ plex_sprite_idx#43 plex_sprite_idx#15 loop::a#2 loop::a#1 loop::a#6 ] -Allocated (was zp[1]:8) zp[1]:4 [ plex_show_idx#43 plex_show_idx#15 loop::i#2 loop::i#1 ] -Allocated (was zp[1]:9) zp[1]:5 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] -Allocated (was zp[1]:18) zp[1]:6 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ] -Allocated (was zp[2]:22) zp[2]:7 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] -Allocated (was zp[1]:24) zp[1]:9 [ mulf_init::c#2 mulf_init::c#1 loop::i1#5 loop::i1#1 ] -Allocated (was zp[2]:25) zp[2]:10 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -Allocated (was zp[2]:28) zp[2]:12 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] -Allocated (was zp[2]:31) zp[2]:14 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] -Allocated (was zp[2]:34) zp[2]:16 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] -Allocated (was zp[1]:63) zp[1]:18 [ loop::plexFreeNextYpos1_return#0 mulf_init::dir#2 mulf_init::dir#4 plexSort::m#2 plexSort::m#1 ] -Allocated (was zp[1]:76) zp[1]:19 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] -Allocated (was zp[1]:80) zp[1]:20 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ] +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 ] ] with [ zp[2]:43 [ mulf8s::return#2 loop::$1 ] ] - score: 1 +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 ] ] with [ zp[2]:53 [ mulf8s::return#3 loop::$5 ] ] - score: 1 +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 ] ] with [ zp[2]:92 [ mulf8u_prepared::return#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 ] ] with [ zp[2]:47 [ loop::$2 loop::x#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 ] ] with [ zp[2]:57 [ loop::$6 loop::y#0 ] ] - score: 1 +Coalescing zero page register [ zp[1]:14 [ init::i#2 init::i#1 ] ] with [ zp[1]:2 [ loop::angle#6 loop::angle#1 ] ] +Coalescing zero page register [ zp[2]:16 [ memset::dst#2 memset::dst#1 ] ] with [ zp[2]:12 [ mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] ] +Coalescing zero page register [ zp[1]:20 [ mulf_init::c#2 mulf_init::c#1 ] ] with [ zp[1]:3 [ loop::r#2 loop::r#1 ] ] +Coalescing zero page register [ zp[1]:29 [ mulf_init::dir#2 mulf_init::dir#4 ] ] with [ zp[1]:4 [ loop::a#2 loop::a#1 loop::a#6 ] ] +Coalescing zero page register [ zp[1]:63 [ loop::plexFreeNextYpos1_return#0 ] ] with [ zp[1]:7 [ plexSort::m#2 plexSort::m#1 ] ] +Coalescing zero page register [ zp[1]:78 [ plexSort::nxt_idx#0 ] ] with [ zp[1]:66 [ plexShowSprite::plex_sprite_idx2#0 ] ] +Coalescing zero page register [ zp[1]:82 [ mulf8s_prepared::b#0 ] ] with [ zp[1]:79 [ plexSort::nxt_y#0 ] ] +Coalescing zero page register [ zp[2]:18 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] ] with [ zp[2]:16 [ memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] ] +Allocated (was zp[1]:5) zp[1]:2 [ loop::i#2 loop::i#1 ] +Allocated (was zp[1]:6) zp[1]:3 [ loop::i1#5 loop::i1#1 ] +Allocated (was zp[1]:14) zp[1]:4 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ] +Allocated (was zp[2]:18) zp[2]:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] +Allocated (was zp[1]:20) zp[1]:7 [ mulf_init::c#2 mulf_init::c#1 loop::r#2 loop::r#1 ] +Allocated (was zp[2]:21) zp[2]:8 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +Allocated (was zp[2]:24) zp[2]:10 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] +Allocated (was zp[2]:27) zp[2]:12 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] +Allocated (was zp[1]:29) zp[1]:14 [ mulf_init::dir#2 mulf_init::dir#4 loop::a#2 loop::a#1 loop::a#6 ] +Allocated (was zp[2]:30) zp[2]:15 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] +Allocated (was zp[1]:33) zp[1]:17 [ plex_show_idx ] +Allocated (was zp[1]:34) zp[1]:18 [ plex_sprite_idx ] +Allocated (was zp[1]:35) zp[1]:19 [ plex_sprite_msb ] +Allocated (was zp[1]:36) zp[1]:20 [ plex_free_next ] +Allocated (was zp[1]:63) zp[1]:21 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ] +Allocated (was zp[1]:78) zp[1]:22 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] +Allocated (was zp[1]:82) zp[1]:23 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -5546,28 +5156,45 @@ ASSEMBLER BEFORE OPTIMIZATION // The number of BOBs to render .const NUM_BOBS = $10 .label COS = SIN+$40 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 5 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 2 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 3 - // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 4 + .label plex_show_idx = $11 + .label plex_sprite_idx = $12 + .label plex_sprite_msb = $13 + .label plex_free_next = $14 // @begin __bbegin: - // [1] phi from @begin to @1 [phi:@begin->@1] -__b1_from___bbegin: jmp __b1 // @1 __b1: - // [2] call main + // [1] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index in the PLEX tables of the next sprite to show + lda #0 + sta.z plex_show_idx + // [2] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index the next sprite to use for showing (sprites are used round-robin) + lda #0 + sta.z plex_sprite_idx + // [3] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb + jmp __b2 + // @2 +__b2: + // [4] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next + // [5] phi from @2 to @3 [phi:@2->@3] +__b3_from___b2: + jmp __b3 + // @3 +__b3: + // [6] call main jsr main - // [3] phi from @1 to @end [phi:@1->@end] -__bend_from___b1: + // [7] phi from @3 to @end [phi:@3->@end] +__bend_from___b3: jmp __bend // @end __bend: @@ -5575,24 +5202,24 @@ __bend: main: { // asm { sei } sei - // [5] call init + // [9] call init jsr init - // [6] phi from main to main::@1 [phi:main->main::@1] + // [10] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: jmp __b1 // main::@1 __b1: - // [7] call loop - // [28] phi from main::@1 to loop [phi:main::@1->loop] + // [11] call loop + // [32] phi from main::@1 to loop [phi:main::@1->loop] loop_from___b1: jsr loop - // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2] __b2_from___b1: jmp __b2 // main::@2 __b2: - // [9] call exit - // [12] phi from main::@2 to exit [phi:main::@2->exit] + // [13] call exit + // [16] phi from main::@2 to exit [phi:main::@2->exit] exit_from___b2: jsr exit jmp __b3 @@ -5603,35 +5230,35 @@ main: { jmp __breturn // main::@return __breturn: - // [11] return + // [15] return rts } // exit // Exit the program exit: { - // [13] phi from exit exit::@2 to exit::@1 [phi:exit/exit::@2->exit::@1] + // [17] phi from exit exit::@2 to exit::@1 [phi:exit/exit::@2->exit::@1] __b1_from_exit: __b1_from___b2: jmp __b1 // Wait for space release // exit::@1 __b1: - // [14] call keyboard_key_pressed - // [19] phi from exit::@1 to keyboard_key_pressed [phi:exit::@1->keyboard_key_pressed] + // [18] call keyboard_key_pressed + // [23] phi from exit::@1 to keyboard_key_pressed [phi:exit::@1->keyboard_key_pressed] keyboard_key_pressed_from___b1: jsr keyboard_key_pressed - // [15] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 + // [19] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 jmp __b2 // exit::@2 __b2: - // [16] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 - // [17] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -- vbuc1_neq_vbuaa_then_la1 + // [20] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 + // [21] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -- vbuc1_neq_vbuaa_then_la1 cmp #0 bne __b1_from___b2 jmp __breturn // exit::@return __breturn: - // [18] return + // [22] return rts } // keyboard_key_pressed @@ -5642,19 +5269,19 @@ exit: { keyboard_key_pressed: { .const colidx = KEY_SPACE&7 .label rowidx = KEY_SPACE>>3 - // [20] call keyboard_matrix_read + // [24] call keyboard_matrix_read jsr keyboard_matrix_read - // [21] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // [25] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 jmp __b1 // keyboard_key_pressed::@1 __b1: - // [22] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 - // [23] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) -- vbuaa=vbuaa_band__deref_pbuc1 + // [26] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 + // [27] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) -- vbuaa=vbuaa_band__deref_pbuc1 and keyboard_matrix_col_bitmask+colidx jmp __breturn // keyboard_key_pressed::@return __breturn: - // [24] return + // [28] return rts } // keyboard_matrix_read @@ -5664,37 +5291,37 @@ keyboard_key_pressed: { // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { - // [25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 + // [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A - // [26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 + // [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff jmp __breturn // keyboard_matrix_read::@return __breturn: - // [27] return + // [31] return rts } // loop // The main loop loop: { - .label __1 = 7 - .label __2 = 7 - .label __5 = 7 - .label __6 = 7 - .label x = 7 - .label y = 7 - .label a = 3 - .label r = 2 - .label i = 4 + .label __1 = 5 + .label __2 = 5 + .label __5 = 5 + .label __6 = 5 + .label x = 5 + .label y = 5 + .label a = $e + .label r = 7 + .label i = 2 // Render Rotated BOBs - .label angle = 6 - .label plexFreeNextYpos1_return = $12 - .label i1 = 9 - // [29] phi from loop to loop::@1 [phi:loop->loop::@1] + .label angle = 4 + .label plexFreeNextYpos1_return = $15 + .label i1 = 3 + // [33] phi from loop to loop::@1 [phi:loop->loop::@1] __b1_from_loop: - // [29] phi (byte) loop::angle#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 + // [33] phi (byte) loop::angle#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 lda #0 sta.z angle jmp __b1 @@ -5703,61 +5330,61 @@ loop: { jmp __b2 // loop::@2 __b2: - // [30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 + // [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 lda RASTER cmp #$d8 bcc __b2 jmp __b3 // loop::@3 __b3: - // [31] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f sta BORDERCOL - // [32] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 + // [36] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 lda.z angle sta.z a - // [33] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] + // [37] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] __b4_from___b3: - // [33] phi (byte) loop::i#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 + // [37] phi (byte) loop::i#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 lda #0 sta.z i - // [33] phi (byte) loop::a#2 = (byte) loop::a#6 [phi:loop::@3->loop::@4#1] -- register_copy - // [33] phi (signed byte) loop::r#2 = (signed byte) $1e [phi:loop::@3->loop::@4#2] -- vbsz1=vbsc1 + // [37] phi (byte) loop::a#2 = (byte) loop::a#6 [phi:loop::@3->loop::@4#1] -- register_copy + // [37] phi (signed byte) loop::r#2 = (signed byte) $1e [phi:loop::@3->loop::@4#2] -- vbsz1=vbsc1 lda #$1e sta.z r jmp __b4 - // [33] phi from loop::@12 to loop::@4 [phi:loop::@12->loop::@4] + // [37] phi from loop::@12 to loop::@4 [phi:loop::@12->loop::@4] __b4_from___b12: - // [33] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@12->loop::@4#0] -- register_copy - // [33] phi (byte) loop::a#2 = (byte) loop::a#1 [phi:loop::@12->loop::@4#1] -- register_copy - // [33] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy + // [37] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@12->loop::@4#0] -- register_copy + // [37] phi (byte) loop::a#2 = (byte) loop::a#1 [phi:loop::@12->loop::@4#1] -- register_copy + // [37] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy jmp __b4 // loop::@4 __b4: - // [34] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #6 sta BORDERCOL - // [35] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 + // [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 lda.z r - // [36] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 + // [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 ldy.z a ldx COS,y - // [37] call mulf8s - // [124] phi from loop::@4 to mulf8s [phi:loop::@4->mulf8s] + // [41] call mulf8s + // [133] phi from loop::@4 to mulf8s [phi:loop::@4->mulf8s] mulf8s_from___b4: - // [124] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#0 [phi:loop::@4->mulf8s#0] -- register_copy - // [124] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#0 [phi:loop::@4->mulf8s#1] -- register_copy + // [133] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#0 [phi:loop::@4->mulf8s#0] -- register_copy + // [133] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#0 [phi:loop::@4->mulf8s#1] -- register_copy jsr mulf8s - // [38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 + // [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 jmp __b11 // loop::@11 __b11: - // [39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 - // [40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 -- vwsz1=vwsz1_rol_1 + // [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 + // [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 -- vwsz1=vwsz1_rol_1 asl.z __2 rol.z __2+1 - // [41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 + // [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 clc lda.z x adc #<$7d*$100 @@ -5765,35 +5392,35 @@ loop: { lda.z x+1 adc #>$7d*$100 sta.z x+1 - // [42] (byte~) loop::$4 ← > (signed word) loop::x#0 -- vbuxx=_hi_vwsz1 + // [46] (byte~) loop::$4 ← > (signed word) loop::x#0 -- vbuxx=_hi_vwsz1 ldx.z x+1 - // [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i asl - // [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 -- pwuc1_derefidx_vbuaa=vbuxx + // [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 -- pwuc1_derefidx_vbuaa=vbuxx tay txa sta PLEX_XPOS,y - // [45] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 + // [49] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 lda.z r - // [46] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 + // [50] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 ldy.z a ldx SIN,y - // [47] call mulf8s - // [124] phi from loop::@11 to mulf8s [phi:loop::@11->mulf8s] + // [51] call mulf8s + // [133] phi from loop::@11 to mulf8s [phi:loop::@11->mulf8s] mulf8s_from___b11: - // [124] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#1 [phi:loop::@11->mulf8s#0] -- register_copy - // [124] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#1 [phi:loop::@11->mulf8s#1] -- register_copy + // [133] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#1 [phi:loop::@11->mulf8s#0] -- register_copy + // [133] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#1 [phi:loop::@11->mulf8s#1] -- register_copy jsr mulf8s - // [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 + // [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 jmp __b12 // loop::@12 __b12: - // [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 - // [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 -- vwsz1=vwsz1_rol_1 + // [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 + // [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 -- vwsz1=vwsz1_rol_1 asl.z __6 rol.z __6+1 - // [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 + // [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 clc lda.z y adc #<$7d*$100 @@ -5801,248 +5428,228 @@ loop: { lda.z y+1 adc #>$7d*$100 sta.z y+1 - // [52] (byte~) loop::$8 ← > (signed word) loop::y#0 -- vbuaa=_hi_vwsz1 + // [56] (byte~) loop::$8 ← > (signed word) loop::y#0 -- vbuaa=_hi_vwsz1 lda.z y+1 - // [53] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 -- pbuc1_derefidx_vbuz1=vbuaa + // [57] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z i sta PLEX_YPOS,y - // [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 + // [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 lax.z a axs #-[$62] stx.z a - // [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 -- vbsz1=vbsz1_plus_vbsc1 + // [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 -- vbsz1=vbsz1_plus_vbsc1 lax.z r axs #-[3] stx.z r - // [56] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 + // [60] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [57] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 + // [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_BOBS-1+1 cmp.z i bne __b4_from___b12 jmp __b5 // loop::@5 __b5: - // [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta BORDERCOL - // [59] call plexSort - // [103] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] + // [63] call plexSort + // [108] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: jsr plexSort jmp __b13 // loop::@13 __b13: - // [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z angle axs #-[3] stx.z angle - // [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp __b6 // Sort the sprites by y-position // loop::@6 __b6: - // [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 lda #VIC_RST8 and D011 - // [63] if((byte~) loop::$11!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 + // [67] if((byte~) loop::$11!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne __b6 - // [64] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] + // [68] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] __b7_from___b6: - // [64] phi (byte) loop::i1#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 + // [68] phi (byte) loop::i1#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 lda #0 sta.z i1 - // [64] phi (byte) plex_sprite_msb#43 = (byte) 1 [phi:loop::@6->loop::@7#1] -- vbuz1=vbuc1 - lda #1 - sta.z plex_sprite_msb - // [64] phi (byte) plex_show_idx#43 = (byte) 0 [phi:loop::@6->loop::@7#2] -- vbuz1=vbuc1 - lda #0 - sta.z plex_show_idx - // [64] phi (byte) plex_sprite_idx#43 = (byte) 0 [phi:loop::@6->loop::@7#3] -- vbuz1=vbuc1 - lda #0 - sta.z plex_sprite_idx - // [64] phi (byte) plex_free_next#17 = (byte) 0 [phi:loop::@6->loop::@7#4] -- vbuz1=vbuc1 - lda #0 - sta.z plex_free_next jmp __b7 // Show the sprites - // [64] phi from loop::@14 to loop::@7 [phi:loop::@14->loop::@7] + // [68] phi from loop::@14 to loop::@7 [phi:loop::@14->loop::@7] __b7_from___b14: - // [64] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy - // [64] phi (byte) plex_sprite_msb#43 = (byte) plex_sprite_msb#16 [phi:loop::@14->loop::@7#1] -- register_copy - // [64] phi (byte) plex_show_idx#43 = (byte) plex_show_idx#15 [phi:loop::@14->loop::@7#2] -- register_copy - // [64] phi (byte) plex_sprite_idx#43 = (byte) plex_sprite_idx#15 [phi:loop::@14->loop::@7#3] -- register_copy - // [64] phi (byte) plex_free_next#17 = (byte) plex_free_next#13 [phi:loop::@14->loop::@7#4] -- register_copy + // [68] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy jmp __b7 // loop::@7 __b7: - // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp plexFreeNextYpos1 // loop::plexFreeNextYpos1 plexFreeNextYpos1: - // [66] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) -- vbuz1=pbuc1_derefidx_vbuz2 + // [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return jmp __b8 // loop::@8 __b8: - // [67] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp.z plexFreeNextYpos1_return bcc __b8 jmp __b9 // loop::@9 __b9: - // [68] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [69] call plexShowSprite + // [73] call plexShowSprite jsr plexShowSprite jmp __b14 // loop::@14 __b14: - // [70] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 -- vbuz1=_inc_vbuz1 + // [74] (byte) loop::i1#1 ← ++ (byte) loop::i1#5 -- vbuz1=_inc_vbuz1 inc.z i1 - // [71] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 + // [75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i1 bne __b7_from___b14 jmp __b10 // loop::@10 __b10: - // [72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [73] call keyboard_key_pressed - // [19] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] + // [77] call keyboard_key_pressed + // [23] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] keyboard_key_pressed_from___b10: jsr keyboard_key_pressed - // [74] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 + // [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 jmp __b15 // loop::@15 __b15: - // [75] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 - // [76] if((byte) 0!=(byte~) loop::$18) goto loop::@return -- vbuc1_neq_vbuaa_then_la1 + // [79] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 + // [80] if((byte) 0!=(byte~) loop::$18) goto loop::@return -- vbuc1_neq_vbuaa_then_la1 cmp #0 bne __breturn - // [29] phi from loop::@15 to loop::@1 [phi:loop::@15->loop::@1] + // [33] phi from loop::@15 to loop::@1 [phi:loop::@15->loop::@1] __b1_from___b15: - // [29] phi (byte) loop::angle#6 = (byte) loop::angle#1 [phi:loop::@15->loop::@1#0] -- register_copy + // [33] phi (byte) loop::angle#6 = (byte) loop::angle#1 [phi:loop::@15->loop::@1#0] -- register_copy jmp __b1 // loop::@return __breturn: - // [77] return + // [81] return rts } // plexShowSprite // Show the next sprite. // plexSort() prepares showing the sprites plexShowSprite: { - .label plex_sprite_idx2 = $13 - // [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label plex_sprite_idx2 = $16 + // [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z plex_sprite_idx asl sta.z plex_sprite_idx2 - // [79] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) + // [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_YPOS,y - // [80] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa + // [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_sprite_idx2 sta SPRITES_YPOS,y jmp plexFreeAdd1 // plexShowSprite::plexFreeAdd1 plexFreeAdd1: - // [81] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 + // [85] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 clc adc #$15 - // [82] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa + // [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_free_next sta PLEX_FREE_YPOS,y - // [83] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 -- vbuxx=vbuz1_plus_1 - ldx.z plex_free_next - inx - // [84] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_free_next - jmp __b4 - // plexShowSprite::@4 - __b4: - // [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) + // [87] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 -- vbuaa=vbuz1_plus_1 + lda.z plex_free_next + clc + adc #1 + // [88] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuaa=vbuaa_band_vbuc1 + and #7 + // [89] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 -- vbuz1=vbuaa + sta.z plex_free_next + jmp __b5 + // plexShowSprite::@5 + __b5: + // [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_PTR,y ldx.z plex_sprite_idx sta PLEX_SCREEN_PTR,x - // [86] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43) -- vbuaa=pbuc1_derefidx_vbuz1 + // [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) -- vbuaa=pbuc1_derefidx_vbuz1 ldy.z plex_show_idx lda PLEX_SORTED_IDX,y - // [87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuxx=vbuaa_rol_1 + // [92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax - // [88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_lo_pwuc1_derefidx_vbuxx + // [93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_lo_pwuc1_derefidx_vbuxx lda PLEX_XPOS,x - // [89] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuaa + // [94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_sprite_idx2 sta SPRITES_XPOS,y - // [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx + // [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx lda PLEX_XPOS+1,x - // [91] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 + // [96] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 cmp #0 bne __b1 jmp __b3 // plexShowSprite::@3 __b3: - // [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 -- vbuaa=vbuc1_bxor_vbuz1 + // [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor.z plex_sprite_msb - // [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + // [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB jmp __b2 // plexShowSprite::@2 __b2: - // [94] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#43 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [99] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z plex_sprite_idx inx - // [95] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_sprite_idx - // [96] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#43 -- vbuz1=_inc_vbuz1 + // [100] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + // [101] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 -- vbuz1=vbuaa + sta.z plex_sprite_idx + // [102] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx -- vbuz1=_inc_vbuz1 inc.z plex_show_idx - // [97] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [103] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z plex_sprite_msb - // [98] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 -- vbuz1_neq_0_then_la1 + // [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -- vbuz1_neq_0_then_la1 lda.z plex_sprite_msb cmp #0 - bne __b5_from___b2 - // [100] phi from plexShowSprite::@2 to plexShowSprite::@return [phi:plexShowSprite::@2->plexShowSprite::@return] - __breturn_from___b2: - // [100] phi (byte) plex_sprite_msb#16 = (byte) 1 [phi:plexShowSprite::@2->plexShowSprite::@return#0] -- vbuz1=vbuc1 + bne __breturn + jmp __b4 + // plexShowSprite::@4 + __b4: + // [105] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 lda #1 sta.z plex_sprite_msb jmp __breturn - // [99] phi from plexShowSprite::@2 to plexShowSprite::@5 [phi:plexShowSprite::@2->plexShowSprite::@5] - __b5_from___b2: - jmp __b5 - // plexShowSprite::@5 - __b5: - // [100] phi from plexShowSprite::@5 to plexShowSprite::@return [phi:plexShowSprite::@5->plexShowSprite::@return] - __breturn_from___b5: - // [100] phi (byte) plex_sprite_msb#16 = (byte) plex_sprite_msb#3 [phi:plexShowSprite::@5->plexShowSprite::@return#0] -- register_copy - jmp __breturn // plexShowSprite::@return __breturn: - // [101] return + // [106] return rts // plexShowSprite::@1 __b1: - // [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + // [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -6059,30 +5666,30 @@ plexShowSprite: { // elements before the marker are shifted right one at a time until encountering one smaller than the current one. // It is then inserted at the spot. Now the marker can move forward. plexSort: { - .label nxt_idx = $13 - .label nxt_y = $14 - .label m = $12 - // [104] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] + .label nxt_idx = $16 + .label nxt_y = $17 + .label m = $15 + // [109] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] __b1_from_plexSort: - // [104] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 + // [109] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 lda #0 sta.z m jmp __b1 - // [104] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] + // [109] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] __b1_from___b2: - // [104] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy + // [109] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy jmp __b1 // plexSort::@1 __b1: - // [105] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [110] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx - // [106] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [111] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z nxt_idx lda PLEX_YPOS,y sta.z nxt_y - // [107] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + // [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 lda.z nxt_y ldx.z m ldy PLEX_SORTED_IDX,x @@ -6091,169 +5698,188 @@ plexSort: { jmp __b5 // plexSort::@5 __b5: - // [108] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 + // [113] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 ldx.z m - // [109] phi from plexSort::@5 plexSort::@6 to plexSort::@3 [phi:plexSort::@5/plexSort::@6->plexSort::@3] + // [114] phi from plexSort::@5 plexSort::@7 to plexSort::@3 [phi:plexSort::@5/plexSort::@7->plexSort::@3] __b3_from___b5: - __b3_from___b6: - // [109] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@6->plexSort::@3#0] -- register_copy + __b3_from___b7: + // [114] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@7->plexSort::@3#0] -- register_copy jmp __b3 // plexSort::@3 __b3: - // [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + // [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx lda PLEX_SORTED_IDX,x sta PLEX_SORTED_IDX+1,x - // [111] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx + // [116] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx dex - // [112] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuxx_eq_vbuc1_then_la1 + // [117] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuxx_eq_vbuc1_then_la1 cpx #$ff beq __b4 - jmp __b6 - // plexSort::@6 - __b6: - // [113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 + jmp __b7 + // plexSort::@7 + __b7: + // [118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 lda.z nxt_y ldy PLEX_SORTED_IDX,x cmp PLEX_YPOS,y - bcc __b3_from___b6 + bcc __b3_from___b7 jmp __b4 // plexSort::@4 __b4: - // [114] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuxx=_inc_vbuxx + // [119] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuxx=_inc_vbuxx inx - // [115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuxx=vbuz1 + // [120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z nxt_idx sta PLEX_SORTED_IDX,x jmp __b2 // plexSort::@2 __b2: - // [116] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 + // [121] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 inc.z m - // [117] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 + // [122] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-2+1 cmp.z m bne __b1_from___b2 - // [118] phi from plexSort::@2 to plexSort::plexFreePrepare1 [phi:plexSort::@2->plexSort::plexFreePrepare1] - plexFreePrepare1_from___b2: + jmp __b6 + // plexSort::@6 + __b6: + // [123] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // Prepare for showing the sprites + lda #0 + sta.z plex_show_idx + // [124] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_sprite_idx + // [125] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + lda #1 + sta.z plex_sprite_msb + // [126] phi from plexSort::@6 to plexSort::plexFreePrepare1 [phi:plexSort::@6->plexSort::plexFreePrepare1] + plexFreePrepare1_from___b6: jmp plexFreePrepare1 // plexSort::plexFreePrepare1 plexFreePrepare1: - // [119] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] + // [127] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1: - // [119] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 + // [127] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 ldx #0 jmp plexFreePrepare1___b1 - // [119] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] + // [127] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1___b1: - // [119] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy + // [127] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy jmp plexFreePrepare1___b1 // plexSort::plexFreePrepare1_@1 plexFreePrepare1___b1: - // [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PLEX_FREE_YPOS,x - // [121] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx + // [129] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx inx - // [122] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 + // [130] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne plexFreePrepare1___b1_from_plexFreePrepare1___b1 + jmp plexFreePrepare1___b2 + // plexSort::plexFreePrepare1_@2 + plexFreePrepare1___b2: + // [131] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_free_next jmp __breturn // plexSort::@return __breturn: - // [123] return + // [132] return rts } // mulf8s // Fast multiply two signed bytes to a word result // mulf8s(signed byte register(A) a, signed byte register(X) b) mulf8s: { - .label return = 7 + .label return = 5 jmp mulf8s_prepare1 // mulf8s::mulf8s_prepare1 mulf8s_prepare1: - // [125] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 - // [126] call mulf8u_prepare + // [134] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 + // [135] call mulf8u_prepare jsr mulf8u_prepare jmp __b1 // mulf8s::@1 __b1: - // [127] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 -- vbsz1=vbsxx + // [136] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 -- vbsz1=vbsxx stx.z mulf8s_prepared.b - // [128] call mulf8s_prepared + // [137] call mulf8s_prepared jsr mulf8s_prepared jmp __b2 // mulf8s::@2 __b2: - // [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 + // [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 jmp __breturn // mulf8s::@return __breturn: - // [130] return + // [139] return rts } // mulf8s_prepared // Calculate fast multiply with a prepared unsigned byte to a word result // The prepared number is set by calling mulf8s_prepare(byte a) -// mulf8s_prepared(signed byte zp($14) b) +// mulf8s_prepared(signed byte zp($17) b) mulf8s_prepared: { .label memA = $fd - .label m = 7 - .label b = $14 - // [131] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuz1 + .label m = 5 + .label b = $17 + // [140] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuz1 lda.z b - // [132] call mulf8u_prepared + // [141] call mulf8u_prepared jsr mulf8u_prepared - // [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 + // [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 jmp __b5 // mulf8s_prepared::@5 __b5: - // [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 - // [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -- _deref_pbsc1_ge_0_then_la1 + // [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 + // [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -- _deref_pbsc1_ge_0_then_la1 lda memA cmp #0 bpl __b1_from___b5 jmp __b3 // mulf8s_prepared::@3 __b3: - // [136] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 -- vbuaa=_hi_vwuz1 + // [145] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 -- vbuaa=_hi_vwuz1 lda.z m+1 - // [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuaa_minus_vbuz1 + // [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuaa_minus_vbuz1 sec sbc.z b - // [138] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 -- vwuz1=vwuz1_sethi_vbuaa + // [147] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 -- vwuz1=vwuz1_sethi_vbuaa sta.z m+1 - // [139] phi from mulf8s_prepared::@3 mulf8s_prepared::@5 to mulf8s_prepared::@1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1] + // [148] phi from mulf8s_prepared::@3 mulf8s_prepared::@5 to mulf8s_prepared::@1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1] __b1_from___b3: __b1_from___b5: - // [139] phi (word) mulf8s_prepared::m#5 = (word) mulf8s_prepared::m#1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1#0] -- register_copy + // [148] phi (word) mulf8s_prepared::m#5 = (word) mulf8s_prepared::m#1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1#0] -- register_copy jmp __b1 // mulf8s_prepared::@1 __b1: - // [140] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -- vbsz1_ge_0_then_la1 + // [149] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -- vbsz1_ge_0_then_la1 lda.z b cmp #0 bpl __b2_from___b1 jmp __b4 // mulf8s_prepared::@4 __b4: - // [141] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 -- vbuaa=_hi_vwuz1 + // [150] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 -- vbuaa=_hi_vwuz1 lda.z m+1 - // [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) -- vbuaa=vbuaa_minus__deref_pbuc1 + // [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) -- vbuaa=vbuaa_minus__deref_pbuc1 sec sbc memA - // [143] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 -- vwuz1=vwuz1_sethi_vbuaa + // [152] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 -- vwuz1=vwuz1_sethi_vbuaa sta.z m+1 - // [144] phi from mulf8s_prepared::@1 mulf8s_prepared::@4 to mulf8s_prepared::@2 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2] + // [153] phi from mulf8s_prepared::@1 mulf8s_prepared::@4 to mulf8s_prepared::@2 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2] __b2_from___b1: __b2_from___b4: - // [144] phi (word) mulf8s_prepared::m#4 = (word) mulf8s_prepared::m#5 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2#0] -- register_copy + // [153] phi (word) mulf8s_prepared::m#4 = (word) mulf8s_prepared::m#5 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2#0] -- register_copy jmp __b2 // mulf8s_prepared::@2 __b2: jmp __breturn // mulf8s_prepared::@return __breturn: - // [145] return + // [154] return rts } // mulf8u_prepared @@ -6263,8 +5889,8 @@ mulf8s_prepared: { mulf8u_prepared: { .label resL = $fe .label memB = $ff - .label return = 7 - // [146] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 -- _deref_pbuc1=vbuaa + .label return = 5 + // [155] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 -- _deref_pbuc1=vbuaa sta memB // asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } ldx memB @@ -6279,7 +5905,7 @@ mulf8u_prepared: { sm4: sbc mulf_sqr2_hi,x sta memB - // [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 + // [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 lda resL sta.z return lda memB @@ -6287,7 +5913,7 @@ mulf8u_prepared: { jmp __breturn // mulf8u_prepared::@return __breturn: - // [149] return + // [158] return rts } // mulf8u_prepare @@ -6295,7 +5921,7 @@ mulf8u_prepared: { // mulf8u_prepare(byte register(A) a) mulf8u_prepare: { .label memA = $fd - // [150] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 -- _deref_pbuc1=vbuaa + // [159] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 -- _deref_pbuc1=vbuaa sta memA // asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } lda memA @@ -6307,121 +5933,121 @@ mulf8u_prepare: { jmp __breturn // mulf8u_prepare::@return __breturn: - // [152] return + // [161] return rts } // init // Initialize the program init: { - .label i = 6 - // [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + .label i = 4 + // [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_RSEL|3 sta D011 - // [154] call plexInit + // [163] call plexInit // Initialize the multiplexer - // [212] phi from init to plexInit [phi:init->plexInit] + // [221] phi from init to plexInit [phi:init->plexInit] plexInit_from_init: jsr plexInit - // [155] phi from init to init::@1 [phi:init->init::@1] + // [164] phi from init to init::@1 [phi:init->init::@1] __b1_from_init: - // [155] phi (byte) init::i#2 = (byte) 0 [phi:init->init::@1#0] -- vbuz1=vbuc1 + // [164] phi (byte) init::i#2 = (byte) 0 [phi:init->init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b1 // Set the sprite pointers & initial positions - // [155] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + // [164] phi from init::@1 to init::@1 [phi:init::@1->init::@1] __b1_from___b1: - // [155] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#0] -- register_copy + // [164] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#0] -- register_copy jmp __b1 // init::@1 __b1: - // [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 + // [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 lda #$ff&SPRITE/$40 ldy.z i sta PLEX_PTR,y - // [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 -- vbuaa=vbuz1_rol_2 + // [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 -- vbuaa=vbuz1_rol_2 lda.z i asl asl - // [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 -- vbuaa=vbuaa_plus_vbuz1 + // [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i - // [159] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 -- vbuxx=vbuc1_plus_vbuaa + // [168] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 -- vbuxx=vbuc1_plus_vbuaa tax axs #-[$18] - // [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i asl - // [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 -- pwuc1_derefidx_vbuaa=vbuxx + // [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 -- pwuc1_derefidx_vbuaa=vbuxx tay txa sta PLEX_XPOS,y - // [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl - // [163] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 -- vbuaa=vbuc1_plus_vbuaa + // [172] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 -- vbuaa=vbuc1_plus_vbuaa clc adc #$32 - // [164] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 -- pbuc1_derefidx_vbuz1=vbuaa + // [173] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z i sta PLEX_YPOS,y - // [165] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 + // [174] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [166] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [175] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i bne __b1_from___b1 jmp __b2 // init::@2 __b2: - // [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE - // [168] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + // [177] phi from init::@2 to init::@3 [phi:init::@2->init::@3] __b3_from___b2: - // [168] phi (byte) init::i1#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 + // [177] phi (byte) init::i1#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 ldx #0 jmp __b3 - // [168] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + // [177] phi from init::@3 to init::@3 [phi:init::@3->init::@3] __b3_from___b3: - // [168] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy + // [177] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy jmp __b3 // init::@3 __b3: - // [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN sta SPRITES_COLS,x - // [170] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuxx=_inc_vbuxx + // [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuxx=_inc_vbuxx inx - // [171] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b3_from___b3 - // [172] phi from init::@3 to init::@4 [phi:init::@3->init::@4] + // [181] phi from init::@3 to init::@4 [phi:init::@3->init::@4] __b4_from___b3: jmp __b4 // init::@4 __b4: - // [173] call mulf_init - // [183] phi from init::@4 to mulf_init [phi:init::@4->mulf_init] + // [182] call mulf_init + // [192] phi from init::@4 to mulf_init [phi:init::@4->mulf_init] mulf_init_from___b4: jsr mulf_init - // [174] phi from init::@4 to init::@5 [phi:init::@4->init::@5] + // [183] phi from init::@4 to init::@5 [phi:init::@4->init::@5] __b5_from___b4: jmp __b5 // init::@5 __b5: - // [175] call memset + // [184] call memset // Clear screen - // [177] phi from init::@5 to memset [phi:init::@5->memset] + // [186] phi from init::@5 to memset [phi:init::@5->memset] memset_from___b5: jsr memset jmp __breturn // init::@return __breturn: - // [176] return + // [185] return rts } // memset @@ -6431,10 +6057,10 @@ memset: { .const c = ' ' .const num = $3e8 .label end = str+num - .label dst = 7 - // [178] phi from memset to memset::@1 [phi:memset->memset::@1] + .label dst = 5 + // [187] phi from memset to memset::@1 [phi:memset->memset::@1] __b1_from_memset: - // [178] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + // [187] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 lda #str @@ -6442,7 +6068,7 @@ memset: { jmp __b1 // memset::@1 __b1: - // [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + // [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 lda.z dst+1 cmp #>end bne __b2 @@ -6452,57 +6078,57 @@ memset: { jmp __breturn // memset::@return __breturn: - // [180] return + // [189] return rts // memset::@2 __b2: - // [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y - // [182] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [191] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 !: - // [178] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] + // [187] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] __b1_from___b2: - // [178] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy + // [187] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy jmp __b1 } // mulf_init // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) mulf_init: { // x/2 - .label c = 9 + .label c = 7 // Counter used for determining x%2==0 - .label sqr1_hi = $a + .label sqr1_hi = 8 // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4 - .label sqr = $10 - .label sqr1_lo = 7 + .label sqr = $f + .label sqr1_lo = 5 // Decrease or increase x_255 - initially we decrease - .label sqr2_hi = $e - .label sqr2_lo = $c + .label sqr2_hi = $c + .label sqr2_lo = $a //Start with g(0)=f(255) - .label dir = $12 - // [184] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1] + .label dir = $e + // [193] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1] __b1_from_mulf_init: - // [184] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuxx=vbuc1 + // [193] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [184] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 + // [193] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 lda #mulf_sqr1_hi+1 sta.z sqr1_hi+1 - // [184] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 + // [193] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 lda #<0 sta.z sqr lda #>0 sta.z sqr+1 - // [184] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 + // [193] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 lda #0 sta.z c - // [184] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 + // [193] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 lda #mulf_sqr1_lo+1 @@ -6510,26 +6136,26 @@ mulf_init: { jmp __b1 // mulf_init::@1 __b1: - // [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 + // [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 lda.z sqr1_lo cmp #mulf_init::@5] + // [195] phi from mulf_init::@1 to mulf_init::@5 [phi:mulf_init::@1->mulf_init::@5] __b5_from___b1: - // [186] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 + // [195] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 lda #$ff sta.z dir - // [186] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 + // [195] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 lda #mulf_sqr2_hi sta.z sqr2_hi+1 - // [186] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuxx=vbuc1 + // [195] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuxx=vbuc1 ldx #-1 - // [186] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 + // [195] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 lda #mulf_sqr2_lo @@ -6537,7 +6163,7 @@ mulf_init: { jmp __b5 // mulf_init::@5 __b5: - // [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 + // [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 @@ -6547,114 +6173,114 @@ mulf_init: { jmp __b7 // mulf_init::@7 __b7: - // [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 + // [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 // Set the very last value g(511) = f(256) lda mulf_sqr1_lo+$100 sta mulf_sqr2_lo+$1ff - // [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 + // [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 lda mulf_sqr1_hi+$100 sta mulf_sqr2_hi+$1ff jmp __breturn // mulf_init::@return __breturn: - // [190] return + // [199] return rts // mulf_init::@6 __b6: - // [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda mulf_sqr1_lo,x ldy #0 sta (sqr2_lo),y - // [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda mulf_sqr1_hi,x ldy #0 sta (sqr2_hi),y - // [193] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 + // [202] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 inc.z sqr2_hi bne !+ inc.z sqr2_hi+1 !: - // [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuxx=vbuxx_plus_vbuz1 + // [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuxx=vbuxx_plus_vbuz1 txa clc adc.z dir tax - // [195] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuxx_neq_0_then_la1 + // [204] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuxx_neq_0_then_la1 cpx #0 bne __b9_from___b6 - // [197] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8] + // [206] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8] __b8_from___b6: - // [197] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 + // [206] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 lda #1 sta.z dir jmp __b8 - // [196] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9] + // [205] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9] __b9_from___b6: jmp __b9 // mulf_init::@9 __b9: - // [197] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8] + // [206] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8] __b8_from___b9: - // [197] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy + // [206] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy jmp __b8 // mulf_init::@8 __b8: - // [198] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 + // [207] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 inc.z sqr2_lo bne !+ inc.z sqr2_lo+1 !: - // [186] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5] + // [195] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5] __b5_from___b8: - // [186] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy - // [186] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy - // [186] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy - // [186] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy + // [195] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy + // [195] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy + // [195] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy + // [195] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy jmp __b5 // mulf_init::@2 __b2: - // [199] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 + // [208] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuaa=vbuz1_band_vbuc1 + // [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuaa=vbuz1_band_vbuc1 lda #1 and.z c - // [201] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuaa_neq_0_then_la1 + // [210] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuaa_neq_0_then_la1 cmp #0 bne __b3_from___b2 jmp __b4 // mulf_init::@4 __b4: - // [202] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuxx=_inc_vbuxx + // [211] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuxx=_inc_vbuxx inx - // [203] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 + // [212] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 inc.z sqr bne !+ inc.z sqr+1 !: - // [204] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3] + // [213] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3] __b3_from___b2: __b3_from___b4: - // [204] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy - // [204] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy + // [213] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy + // [213] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy jmp __b3 // mulf_init::@3 __b3: - // [205] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuaa=_lo_vwuz1 + // [214] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3 -- vbuaa=_lo_vwuz1 lda.z sqr - // [206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuaa + // [215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4 -- _deref_pbuz1=vbuaa ldy #0 sta (sqr1_lo),y - // [207] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuaa=_hi_vwuz1 + // [216] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuaa=_hi_vwuz1 lda.z sqr+1 - // [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuaa + // [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuaa ldy #0 sta (sqr1_hi),y - // [209] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 + // [218] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: - // [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuxx + // [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuxx txa clc adc.z sqr @@ -6662,55 +6288,55 @@ mulf_init: { bcc !+ inc.z sqr+1 !: - // [211] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 + // [220] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 !: - // [184] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1] + // [193] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1] __b1_from___b3: - // [184] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy - // [184] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy - // [184] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy - // [184] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy - // [184] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy + // [193] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy + // [193] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy + // [193] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy + // [193] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy + // [193] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy jmp __b1 } // plexInit // Initialize the multiplexer data structures plexInit: { - // [213] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] + // [222] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] plexSetScreen1_from_plexInit: jmp plexSetScreen1 // plexInit::plexSetScreen1 plexSetScreen1: - // [214] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] + // [223] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] __b1_from_plexSetScreen1: - // [214] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 + // [223] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 ldx #0 jmp __b1 - // [214] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] + // [223] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] __b1_from___b1: - // [214] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy + // [223] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy jmp __b1 // plexInit::@1 __b1: - // [215] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx + // [224] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx txa sta PLEX_SORTED_IDX,x - // [216] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx + // [225] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx inx - // [217] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 + // [226] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #PLEX_COUNT-1+1 bne __b1_from___b1 jmp __breturn // plexInit::@return __breturn: - // [218] return + // [227] return rts } // File Data - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 @@ -6756,6 +6382,8 @@ SIN: ASSEMBLER OPTIMIZATIONS Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b3 Removing instruction jmp __bend Removing instruction jmp __b1 Removing instruction jmp __b2 @@ -6784,19 +6412,21 @@ Removing instruction jmp __b14 Removing instruction jmp __b10 Removing instruction jmp __b15 Removing instruction jmp plexFreeAdd1 -Removing instruction jmp __b4 +Removing instruction jmp __b5 Removing instruction jmp __b3 Removing instruction jmp __b2 -Removing instruction jmp __b5 +Removing instruction jmp __b4 Removing instruction jmp __breturn Removing instruction jmp __b1 Removing instruction jmp __b5 Removing instruction jmp __b3 -Removing instruction jmp __b6 +Removing instruction jmp __b7 Removing instruction jmp __b4 Removing instruction jmp __b2 +Removing instruction jmp __b6 Removing instruction jmp plexFreePrepare1 Removing instruction jmp plexFreePrepare1___b1 +Removing instruction jmp plexFreePrepare1___b2 Removing instruction jmp __breturn Removing instruction jmp mulf8s_prepare1 Removing instruction jmp __b1 @@ -6830,12 +6460,13 @@ Removing instruction jmp plexSetScreen1 Removing instruction jmp __b1 Removing instruction jmp __breturn Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 Replacing instruction ldx.z x+1 with TAX Removing instruction lda.z y+1 -Removing instruction lda #0 -Removing instruction lda #0 +Replacing instruction lda.z plex_free_next with TYA Replacing instruction ldy.z nxt_idx with TAY Removing instruction lda.z nxt_y +Removing instruction lda #0 Replacing instruction ldx memB with TAX Removing instruction lda memA Replacing instruction lda.z i with TYA @@ -6849,9 +6480,7 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __b4_from___b12 with __b4 Replacing label __b7_from___b14 with __b7 Replacing label __b1 with __b2 -Replacing label __b5_from___b2 with __b5 -Replacing label __breturn with __b5 -Replacing label __b3_from___b6 with __b3 +Replacing label __b3_from___b7 with __b3 Replacing label __b1_from___b2 with __b1 Replacing label plexFreePrepare1___b1_from_plexFreePrepare1___b1 with plexFreePrepare1___b1 Replacing label __b1_from___b5 with __b1 @@ -6861,9 +6490,9 @@ Replacing label __b3_from___b3 with __b3 Replacing label __b9_from___b6 with __b8 Replacing label __b3_from___b2 with __b3 Replacing label __b1_from___b1 with __b1 -Removing instruction __b1_from___bbegin: Removing instruction __b1: -Removing instruction __bend_from___b1: +Removing instruction __b3_from___b2: +Removing instruction __bend_from___b3: Removing instruction __b1_from_main: Removing instruction loop_from___b1: Removing instruction __b2_from___b1: @@ -6873,13 +6502,10 @@ Removing instruction keyboard_key_pressed_from___b1: Removing instruction __b1: Removing instruction __b4_from___b12: Removing instruction __b7_from___b14: -Removing instruction __b5_from___b2: -Removing instruction __breturn_from___b5: -Removing instruction __breturn: Removing instruction __b1_from___b2: Removing instruction __b3_from___b5: -Removing instruction __b3_from___b6: -Removing instruction plexFreePrepare1_from___b2: +Removing instruction __b3_from___b7: +Removing instruction plexFreePrepare1_from___b6: Removing instruction plexFreePrepare1___b1_from_plexFreePrepare1: Removing instruction plexFreePrepare1___b1_from_plexFreePrepare1___b1: Removing instruction __breturn: @@ -6902,6 +6528,8 @@ Removing instruction plexSetScreen1_from_plexInit: Removing instruction __b1_from_plexSetScreen1: Removing instruction __b1_from___b1: Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __b2: +Removing instruction __b3: Removing instruction __bend: Removing instruction __b1: Removing instruction __b2: @@ -6932,13 +6560,15 @@ Removing instruction keyboard_key_pressed_from___b10: Removing instruction __b15: Removing instruction __b1_from___b15: Removing instruction plexFreeAdd1: -Removing instruction __b4: +Removing instruction __b5: Removing instruction __b3: -Removing instruction __breturn_from___b2: +Removing instruction __b4: Removing instruction __b1_from_plexSort: Removing instruction __b5: +Removing instruction __b7: Removing instruction __b6: Removing instruction plexFreePrepare1: +Removing instruction plexFreePrepare1___b2: Removing instruction __breturn: Removing instruction mulf8s_prepare1: Removing instruction __b1: @@ -6970,13 +6600,10 @@ Removing instruction __b1_from___b3: Removing instruction plexSetScreen1: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination -Updating BasicUpstart to call main directly -Removing instruction jsr main -Succesful ASM optimization Pass5SkipBegin -Replacing jump to rts with rts in jmp __b5 -Succesful ASM optimization Pass5DoubleJumpElimination Relabelling long label __b1_from___b2 to __b1 Succesful ASM optimization Pass5RelabelLongLabels +Adding RTS to root block +Succesful ASM optimization Pass5AddMainRts Removing instruction jmp __b4 Removing instruction jmp __b7 Removing instruction jmp __b1 @@ -6986,13 +6613,15 @@ Removing instruction jmp __b3 Removing instruction jmp __b8 Removing instruction jmp __b1 Succesful ASM optimization Pass5NextJumpElimination +Removing instruction ldx.z plex_show_idx Removing instruction ldx.z m +Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination -Removing instruction __bbegin: -Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE (label) @1 +(label) @2 +(label) @3 (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 @@ -7049,8 +6678,8 @@ FINAL SYMBOL TABLE (label) init::@5 (label) init::@return (byte) init::i -(byte) init::i#1 i zp[1]:6 1501.5 -(byte) init::i#2 i zp[1]:6 800.8000000000001 +(byte) init::i#1 i zp[1]:4 1501.5 +(byte) init::i#2 i zp[1]:4 800.8000000000001 (byte) init::i1 (byte) init::i1#1 reg byte x 1501.5 (byte) init::i1#2 reg byte x 1501.5 @@ -7077,14 +6706,14 @@ FINAL SYMBOL TABLE (byte) keyboard_matrix_read::rowid (const byte*) keyboard_matrix_row_bitmask[(number) 8] = { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f } (void()) loop() -(signed word~) loop::$1 zp[2]:7 20002.0 +(signed word~) loop::$1 zp[2]:5 20002.0 (byte~) loop::$11 reg byte a 20002.0 (byte~) loop::$18 reg byte a 2002.0 -(signed word~) loop::$2 zp[2]:7 20002.0 +(signed word~) loop::$2 zp[2]:5 20002.0 (byte~) loop::$20 reg byte a 20002.0 (byte~) loop::$4 reg byte x 10001.0 -(signed word~) loop::$5 zp[2]:7 20002.0 -(signed word~) loop::$6 zp[2]:7 20002.0 +(signed word~) loop::$5 zp[2]:5 20002.0 +(signed word~) loop::$6 zp[2]:5 20002.0 (byte~) loop::$8 reg byte a 20002.0 (label) loop::@1 (label) loop::@10 @@ -7103,29 +6732,29 @@ FINAL SYMBOL TABLE (label) loop::@9 (label) loop::@return (byte) loop::a -(byte) loop::a#1 a zp[1]:3 5000.5 -(byte) loop::a#2 a zp[1]:3 1952.6190476190475 -(byte) loop::a#6 a zp[1]:3 2002.0 +(byte) loop::a#1 a zp[1]:14 5000.5 +(byte) loop::a#2 a zp[1]:14 1952.6190476190475 +(byte) loop::a#6 a zp[1]:14 2002.0 (byte) loop::angle -(byte) loop::angle#1 angle zp[1]:6 117.76470588235294 -(byte) loop::angle#6 angle zp[1]:6 96.87096774193549 +(byte) loop::angle#1 angle zp[1]:4 117.76470588235294 +(byte) loop::angle#6 angle zp[1]:4 96.87096774193549 (byte) loop::i -(byte) loop::i#1 i zp[1]:4 15001.5 -(byte) loop::i#2 i zp[1]:4 1739.304347826087 +(byte) loop::i#1 i zp[1]:2 15001.5 +(byte) loop::i#2 i zp[1]:2 1739.304347826087 (byte) loop::i1 -(byte) loop::i1#1 i1 zp[1]:9 15001.5 -(byte) loop::i1#5 i1 zp[1]:9 3333.6666666666665 +(byte) loop::i1#1 i1 zp[1]:3 15001.5 +(byte) loop::i1#5 i1 zp[1]:3 3333.6666666666665 (label) loop::plexFreeNextYpos1 (byte) loop::plexFreeNextYpos1_return -(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp[1]:18 55001.0 +(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp[1]:21 55001.0 (signed byte) loop::r -(signed byte) loop::r#1 r zp[1]:2 6667.333333333333 -(signed byte) loop::r#2 r zp[1]:2 1818.3636363636363 +(signed byte) loop::r#1 r zp[1]:7 6667.333333333333 +(signed byte) loop::r#2 r zp[1]:7 1818.3636363636363 (byte) loop::rasterY (signed word) loop::x -(signed word) loop::x#0 x zp[2]:7 20002.0 +(signed word) loop::x#0 x zp[2]:5 20002.0 (signed word) loop::y -(signed word) loop::y#0 y zp[2]:7 20002.0 +(signed word) loop::y#0 y zp[2]:5 20002.0 (void()) main() (label) main::@1 (label) main::@2 @@ -7138,8 +6767,8 @@ FINAL SYMBOL TABLE (byte) memset::c (const byte) memset::c#0 c = (byte) ' ' (byte*) memset::dst -(byte*) memset::dst#1 dst zp[2]:7 20002.0 -(byte*) memset::dst#2 dst zp[2]:7 13334.666666666666 +(byte*) memset::dst#1 dst zp[2]:5 20002.0 +(byte*) memset::dst#2 dst zp[2]:5 13334.666666666666 (byte*) memset::end (const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 (word) memset::num @@ -7162,9 +6791,9 @@ FINAL SYMBOL TABLE (signed byte) mulf8s::mulf8s_prepare1_a (signed byte) mulf8s::mulf8s_prepare1_a#0 reg byte a 20002.0 (signed word) mulf8s::return -(signed word) mulf8s::return#0 return zp[2]:7 30000.75 -(signed word) mulf8s::return#2 return zp[2]:7 20002.0 -(signed word) mulf8s::return#3 return zp[2]:7 20002.0 +(signed word) mulf8s::return#0 return zp[2]:5 30000.75 +(signed word) mulf8s::return#2 return zp[2]:5 20002.0 +(signed word) mulf8s::return#3 return zp[2]:5 20002.0 (signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) (byte~) mulf8s_prepared::$12 reg byte a 2000002.0 (byte~) mulf8s_prepared::$15 reg byte a 2000002.0 @@ -7177,13 +6806,13 @@ FINAL SYMBOL TABLE (label) mulf8s_prepared::@5 (label) mulf8s_prepared::@return (signed byte) mulf8s_prepared::b -(signed byte) mulf8s_prepared::b#0 b zp[1]:20 110000.20000000001 +(signed byte) mulf8s_prepared::b#0 b zp[1]:23 110000.20000000001 (word) mulf8s_prepared::m -(word) mulf8s_prepared::m#0 m zp[2]:7 1000001.0 -(word) mulf8s_prepared::m#1 m zp[2]:7 2000002.0 -(word) mulf8s_prepared::m#2 m zp[2]:7 2000002.0 -(word) mulf8s_prepared::m#4 m zp[2]:7 666667.3333333334 -(word) mulf8s_prepared::m#5 m zp[2]:7 1250001.25 +(word) mulf8s_prepared::m#0 m zp[2]:5 1000001.0 +(word) mulf8s_prepared::m#1 m zp[2]:5 2000002.0 +(word) mulf8s_prepared::m#2 m zp[2]:5 2000002.0 +(word) mulf8s_prepared::m#4 m zp[2]:5 666667.3333333334 +(word) mulf8s_prepared::m#5 m zp[2]:5 1250001.25 (const nomodify signed byte*) mulf8s_prepared::memA = (signed byte*) 253 (signed word) mulf8s_prepared::return (void()) mulf8u_prepare((byte) mulf8u_prepare::a) @@ -7198,8 +6827,8 @@ FINAL SYMBOL TABLE (const nomodify byte*) mulf8u_prepared::memB = (byte*) 255 (const nomodify byte*) mulf8u_prepared::resL = (byte*) 254 (word) mulf8u_prepared::return -(word) mulf8u_prepared::return#0 return zp[2]:7 3666667.333333333 -(word) mulf8u_prepared::return#2 return zp[2]:7 2000002.0 +(word) mulf8u_prepared::return#0 return zp[2]:5 3666667.333333333 +(word) mulf8u_prepared::return#2 return zp[2]:5 2000002.0 (void()) mulf_init() (byte~) mulf_init::$1 reg byte a 20002.0 (byte~) mulf_init::$4 reg byte a 20002.0 @@ -7215,28 +6844,28 @@ FINAL SYMBOL TABLE (label) mulf_init::@9 (label) mulf_init::@return (byte) mulf_init::c -(byte) mulf_init::c#1 c zp[1]:9 2307.9230769230767 -(byte) mulf_init::c#2 c zp[1]:9 10001.0 +(byte) mulf_init::c#1 c zp[1]:7 2307.9230769230767 +(byte) mulf_init::c#2 c zp[1]:7 10001.0 (byte) mulf_init::dir -(byte) mulf_init::dir#2 dir zp[1]:18 3750.375 -(byte) mulf_init::dir#4 dir zp[1]:18 10001.0 +(byte) mulf_init::dir#2 dir zp[1]:14 3750.375 +(byte) mulf_init::dir#4 dir zp[1]:14 10001.0 (word) mulf_init::sqr -(word) mulf_init::sqr#1 sqr zp[2]:16 10001.0 -(word) mulf_init::sqr#2 sqr zp[2]:16 20002.0 -(word) mulf_init::sqr#3 sqr zp[2]:16 8334.166666666666 -(word) mulf_init::sqr#4 sqr zp[2]:16 5000.5 +(word) mulf_init::sqr#1 sqr zp[2]:15 10001.0 +(word) mulf_init::sqr#2 sqr zp[2]:15 20002.0 +(word) mulf_init::sqr#3 sqr zp[2]:15 8334.166666666666 +(word) mulf_init::sqr#4 sqr zp[2]:15 5000.5 (byte*) mulf_init::sqr1_hi -(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:10 6667.333333333333 -(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:10 2500.25 +(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:8 6667.333333333333 +(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:8 2500.25 (byte*) mulf_init::sqr1_lo -(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:7 20002.0 -(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:7 2857.4285714285716 +(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:5 20002.0 +(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:5 2857.4285714285716 (byte*) mulf_init::sqr2_hi -(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:14 3333.6666666666665 -(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:14 7500.75 +(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:12 3333.6666666666665 +(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:12 7500.75 (byte*) mulf_init::sqr2_lo -(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:12 20002.0 -(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:12 4444.888888888889 +(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:10 20002.0 +(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:10 4444.888888888889 (byte) mulf_init::x_2 (byte) mulf_init::x_2#1 reg byte x 10001.0 (byte) mulf_init::x_2#2 reg byte x 5000.5 @@ -7262,6 +6891,7 @@ FINAL SYMBOL TABLE (byte~) plexShowSprite::$2 reg byte a 200002.0 (byte~) plexShowSprite::$3 reg byte a 200002.0 (byte~) plexShowSprite::$5 reg byte x 200002.0 +(byte~) plexShowSprite::$6 reg byte a 200002.0 (byte~) plexShowSprite::$9 reg byte a 200002.0 (label) plexShowSprite::@1 (label) plexShowSprite::@2 @@ -7271,11 +6901,12 @@ FINAL SYMBOL TABLE (label) plexShowSprite::@return (label) plexShowSprite::plexFreeAdd1 (byte~) plexShowSprite::plexFreeAdd1_$0 reg byte a 200002.0 -(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte x 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte a 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$2 reg byte a 200002.0 (byte) plexShowSprite::plexFreeAdd1_ypos (byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 150001.5 (byte) plexShowSprite::plex_sprite_idx2 -(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:19 27273.0 +(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:22 25000.25 (byte) plexShowSprite::xpos_idx (byte) plexShowSprite::xpos_idx#0 reg byte a 200002.0 (byte) plexShowSprite::ypos @@ -7286,16 +6917,18 @@ FINAL SYMBOL TABLE (label) plexSort::@4 (label) plexSort::@5 (label) plexSort::@6 +(label) plexSort::@7 (label) plexSort::@return (byte) plexSort::m -(byte) plexSort::m#1 m zp[1]:18 1500001.5 -(byte) plexSort::m#2 m zp[1]:18 416667.0833333334 +(byte) plexSort::m#1 m zp[1]:21 1500001.5 +(byte) plexSort::m#2 m zp[1]:21 416667.0833333334 (byte) plexSort::nxt_idx -(byte) plexSort::nxt_idx#0 nxt_idx zp[1]:19 300000.30000000005 +(byte) plexSort::nxt_idx#0 nxt_idx zp[1]:22 300000.30000000005 (byte) plexSort::nxt_y -(byte) plexSort::nxt_y#0 nxt_y zp[1]:20 1500000.375 +(byte) plexSort::nxt_y#0 nxt_y zp[1]:23 1500000.375 (label) plexSort::plexFreePrepare1 (label) plexSort::plexFreePrepare1_@1 +(label) plexSort::plexFreePrepare1_@2 (byte) plexSort::plexFreePrepare1_s (byte) plexSort::plexFreePrepare1_s#1 reg byte x 1500001.5 (byte) plexSort::plexFreePrepare1_s#2 reg byte x 1500001.5 @@ -7304,39 +6937,33 @@ FINAL SYMBOL TABLE (byte) plexSort::s#2 reg byte x 2000002.0 (byte) plexSort::s#3 reg byte x 2.05000025E7 (byte) plexSort::s#6 reg byte x 2000002.0 -(byte) plex_free_next -(byte) plex_free_next#13 plex_free_next zp[1]:2 5000.090909090909 -(byte) plex_free_next#17 plex_free_next zp[1]:2 22000.4 -(byte) plex_show_idx -(byte) plex_show_idx#15 plex_show_idx zp[1]:4 12222.444444444445 -(byte) plex_show_idx#43 plex_show_idx zp[1]:4 17083.541666666664 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#15 plex_sprite_idx zp[1]:3 11000.2 -(byte) plex_sprite_idx#43 plex_sprite_idx zp[1]:3 14091.090909090908 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#16 plex_sprite_msb zp[1]:5 22000.4 -(byte) plex_sprite_msb#3 plex_sprite_msb zp[1]:5 100001.0 -(byte) plex_sprite_msb#43 plex_sprite_msb zp[1]:5 12400.16 +(volatile byte) plex_free_next loadstore zp[1]:20 8205.307692307691 +(volatile byte) plex_show_idx loadstore zp[1]:17 10408.326530612245 +(volatile byte) plex_sprite_idx loadstore zp[1]:18 8913.195652173912 +(volatile byte) plex_sprite_msb loadstore zp[1]:19 12978.914893617019 -zp[1]:2 [ plex_free_next#17 plex_free_next#13 loop::r#2 loop::r#1 ] -zp[1]:3 [ plex_sprite_idx#43 plex_sprite_idx#15 loop::a#2 loop::a#1 loop::a#6 ] -zp[1]:4 [ plex_show_idx#43 plex_show_idx#15 loop::i#2 loop::i#1 ] -zp[1]:5 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] +zp[1]:2 [ loop::i#2 loop::i#1 ] +zp[1]:3 [ loop::i1#5 loop::i1#1 ] reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] reg byte a [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] reg byte x [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] -zp[1]:6 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ] +zp[1]:4 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ] reg byte x [ init::i1#2 init::i1#1 ] -zp[2]:7 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] -zp[1]:9 [ mulf_init::c#2 mulf_init::c#1 loop::i1#5 loop::i1#1 ] -zp[2]:10 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +zp[2]:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] +zp[1]:7 [ mulf_init::c#2 mulf_init::c#1 loop::r#2 loop::r#1 ] +zp[2]:8 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -zp[2]:12 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] +zp[2]:10 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] -zp[2]:14 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] -zp[2]:16 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] +zp[2]:12 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] +zp[1]:14 [ mulf_init::dir#2 mulf_init::dir#4 loop::a#2 loop::a#1 loop::a#6 ] +zp[2]:15 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ plexInit::i#2 plexInit::i#1 ] +zp[1]:17 [ plex_show_idx ] +zp[1]:18 [ plex_sprite_idx ] +zp[1]:19 [ plex_sprite_msb ] +zp[1]:20 [ plex_free_next ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ exit::$0 ] reg byte a [ keyboard_matrix_read::return#2 ] @@ -7347,22 +6974,24 @@ reg byte x [ loop::$4 ] reg byte a [ loop::$20 ] reg byte a [ loop::$8 ] reg byte a [ loop::$11 ] -zp[1]:18 [ loop::plexFreeNextYpos1_return#0 mulf_init::dir#2 mulf_init::dir#4 plexSort::m#2 plexSort::m#1 ] +zp[1]:21 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ] reg byte a [ keyboard_key_pressed::return#3 ] reg byte a [ loop::$18 ] reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] -reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] +reg byte a [ plexShowSprite::plexFreeAdd1_$1 ] +reg byte a [ plexShowSprite::plexFreeAdd1_$2 ] reg byte a [ plexShowSprite::xpos_idx#0 ] reg byte x [ plexShowSprite::$11 ] reg byte a [ plexShowSprite::$2 ] reg byte a [ plexShowSprite::$3 ] reg byte a [ plexShowSprite::$9 ] reg byte x [ plexShowSprite::$5 ] -zp[1]:19 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] +reg byte a [ plexShowSprite::$6 ] +zp[1]:22 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] reg byte x [ plexSort::s#2 ] reg byte a [ mulf8u_prepare::a#0 ] -zp[1]:20 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ] +zp[1]:23 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ] reg byte a [ mulf8u_prepared::b#0 ] reg byte a [ mulf8s_prepared::$8 ] reg byte a [ mulf8s_prepared::$15 ] @@ -7380,13 +7009,13 @@ reg byte a [ mulf_init::$5 ] FINAL ASSEMBLER -Score: 75580 +Score: 74020 // File Comments // Same animation using a multiplexer // Upstart .pc = $801 "Basic" -:BasicUpstart(main) +:BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels .label SPRITES_XPOS = $d000 @@ -7415,22 +7044,41 @@ Score: 75580 // The number of BOBs to render .const NUM_BOBS = $10 .label COS = SIN+$40 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 5 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 2 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 3 - // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 4 + .label plex_show_idx = $11 + .label plex_sprite_idx = $12 + .label plex_sprite_msb = $13 + .label plex_free_next = $14 // @begin - // [1] phi from @begin to @1 [phi:@begin->@1] +__bbegin: // @1 - // [2] call main - // [3] phi from @1 to @end [phi:@1->@end] + // plex_show_idx=0 + // [1] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index in the PLEX tables of the next sprite to show + lda #0 + sta.z plex_show_idx + // plex_sprite_idx=0 + // [2] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index the next sprite to use for showing (sprites are used round-robin) + sta.z plex_sprite_idx + // plex_sprite_msb=1 + // [3] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb + // @2 + // plex_free_next = 0 + // [4] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next + // [5] phi from @2 to @3 [phi:@2->@3] + // @3 + // [6] call main + jsr main + rts + // [7] phi from @3 to @end [phi:@3->@end] // @end // main main: { @@ -7438,19 +7086,19 @@ main: { // asm { sei } sei // init() - // [5] call init + // [9] call init jsr init - // [6] phi from main to main::@1 [phi:main->main::@1] + // [10] phi from main to main::@1 [phi:main->main::@1] // main::@1 // loop() - // [7] call loop - // [28] phi from main::@1 to loop [phi:main::@1->loop] + // [11] call loop + // [32] phi from main::@1 to loop [phi:main::@1->loop] jsr loop - // [8] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // [12] phi from main::@1 to main::@2 [phi:main::@1->main::@2] // main::@2 // exit() - // [9] call exit - // [12] phi from main::@2 to exit [phi:main::@2->exit] + // [13] call exit + // [16] phi from main::@2 to exit [phi:main::@2->exit] jsr exit // main::@3 // asm @@ -7458,31 +7106,31 @@ main: { cli // main::@return // } - // [11] return + // [15] return rts } // exit // Exit the program exit: { - // [13] phi from exit exit::@2 to exit::@1 [phi:exit/exit::@2->exit::@1] + // [17] phi from exit exit::@2 to exit::@1 [phi:exit/exit::@2->exit::@1] __b1: // Wait for space release // exit::@1 // keyboard_key_pressed(KEY_SPACE) - // [14] call keyboard_key_pressed - // [19] phi from exit::@1 to keyboard_key_pressed [phi:exit::@1->keyboard_key_pressed] + // [18] call keyboard_key_pressed + // [23] phi from exit::@1 to keyboard_key_pressed [phi:exit::@1->keyboard_key_pressed] jsr keyboard_key_pressed // keyboard_key_pressed(KEY_SPACE) - // [15] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 + // [19] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0 // exit::@2 - // [16] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 + // [20] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2 // while(keyboard_key_pressed(KEY_SPACE)) - // [17] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -- vbuc1_neq_vbuaa_then_la1 + // [21] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -- vbuc1_neq_vbuaa_then_la1 cmp #0 bne __b1 // exit::@return // } - // [18] return + // [22] return rts } // keyboard_key_pressed @@ -7494,17 +7142,17 @@ keyboard_key_pressed: { .const colidx = KEY_SPACE&7 .label rowidx = KEY_SPACE>>3 // keyboard_matrix_read(rowidx) - // [20] call keyboard_matrix_read + // [24] call keyboard_matrix_read jsr keyboard_matrix_read - // [21] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // [25] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 // keyboard_key_pressed::@1 - // [22] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 + // [26] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2 // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] - // [23] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) -- vbuaa=vbuaa_band__deref_pbuc1 + // [27] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0) -- vbuaa=vbuaa_band__deref_pbuc1 and keyboard_matrix_col_bitmask+colidx // keyboard_key_pressed::@return // } - // [24] return + // [28] return rts } // keyboard_matrix_read @@ -7515,94 +7163,94 @@ keyboard_key_pressed: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] - // [25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 + // [29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A // ~*CIA1_PORT_B - // [26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 + // [30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff // keyboard_matrix_read::@return // } - // [27] return + // [31] return rts } // loop // The main loop loop: { - .label __1 = 7 - .label __2 = 7 - .label __5 = 7 - .label __6 = 7 - .label x = 7 - .label y = 7 - .label a = 3 - .label r = 2 - .label i = 4 + .label __1 = 5 + .label __2 = 5 + .label __5 = 5 + .label __6 = 5 + .label x = 5 + .label y = 5 + .label a = $e + .label r = 7 + .label i = 2 // Render Rotated BOBs - .label angle = 6 - .label plexFreeNextYpos1_return = $12 - .label i1 = 9 - // [29] phi from loop to loop::@1 [phi:loop->loop::@1] - // [29] phi (byte) loop::angle#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 + .label angle = 4 + .label plexFreeNextYpos1_return = $15 + .label i1 = 3 + // [33] phi from loop to loop::@1 [phi:loop->loop::@1] + // [33] phi (byte) loop::angle#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 lda #0 sta.z angle // loop::@1 // loop::@2 __b2: // while (*RASTER<0xd8) - // [30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 + // [34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2 -- _deref_pbuc1_lt_vbuc2_then_la1 lda RASTER cmp #$d8 bcc __b2 // loop::@3 // *BORDERCOL = 0xf - // [31] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 + // [35] *((const nomodify byte*) BORDERCOL) ← (byte) $f -- _deref_pbuc1=vbuc2 lda #$f sta BORDERCOL - // [32] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 + // [36] (byte) loop::a#6 ← (byte) loop::angle#6 -- vbuz1=vbuz2 lda.z angle sta.z a - // [33] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] - // [33] phi (byte) loop::i#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 + // [37] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] + // [37] phi (byte) loop::i#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 lda #0 sta.z i - // [33] phi (byte) loop::a#2 = (byte) loop::a#6 [phi:loop::@3->loop::@4#1] -- register_copy - // [33] phi (signed byte) loop::r#2 = (signed byte) $1e [phi:loop::@3->loop::@4#2] -- vbsz1=vbsc1 + // [37] phi (byte) loop::a#2 = (byte) loop::a#6 [phi:loop::@3->loop::@4#1] -- register_copy + // [37] phi (signed byte) loop::r#2 = (signed byte) $1e [phi:loop::@3->loop::@4#2] -- vbsz1=vbsc1 lda #$1e sta.z r - // [33] phi from loop::@12 to loop::@4 [phi:loop::@12->loop::@4] - // [33] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@12->loop::@4#0] -- register_copy - // [33] phi (byte) loop::a#2 = (byte) loop::a#1 [phi:loop::@12->loop::@4#1] -- register_copy - // [33] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy + // [37] phi from loop::@12 to loop::@4 [phi:loop::@12->loop::@4] + // [37] phi (byte) loop::i#2 = (byte) loop::i#1 [phi:loop::@12->loop::@4#0] -- register_copy + // [37] phi (byte) loop::a#2 = (byte) loop::a#1 [phi:loop::@12->loop::@4#1] -- register_copy + // [37] phi (signed byte) loop::r#2 = (signed byte) loop::r#1 [phi:loop::@12->loop::@4#2] -- register_copy // loop::@4 __b4: // *BORDERCOL = 6 - // [34] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDERCOL) ← (byte) 6 -- _deref_pbuc1=vbuc2 //kickasm {{ .break }} lda #6 sta BORDERCOL // mulf8s(r, COS[a]) - // [35] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 + // [39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 lda.z r - // [36] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 + // [40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 ldy.z a ldx COS,y - // [37] call mulf8s - // [124] phi from loop::@4 to mulf8s [phi:loop::@4->mulf8s] - // [124] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#0 [phi:loop::@4->mulf8s#0] -- register_copy - // [124] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#0 [phi:loop::@4->mulf8s#1] -- register_copy + // [41] call mulf8s + // [133] phi from loop::@4 to mulf8s [phi:loop::@4->mulf8s] + // [133] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#0 [phi:loop::@4->mulf8s#0] -- register_copy + // [133] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#0 [phi:loop::@4->mulf8s#1] -- register_copy jsr mulf8s // mulf8s(r, COS[a]) - // [38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 + // [42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0 // loop::@11 - // [39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 + // [43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2 // mulf8s(r, COS[a])*2 - // [40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 -- vwsz1=vwsz1_rol_1 + // [44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1 -- vwsz1=vwsz1_rol_1 asl.z __2 rol.z __2+1 // x = mulf8s(r, COS[a])*2 + 125*0x100 - // [41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 + // [45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 clc lda.z x adc #<$7d*$100 @@ -7611,37 +7259,37 @@ loop: { adc #>$7d*$100 sta.z x+1 // >x - // [42] (byte~) loop::$4 ← > (signed word) loop::x#0 -- vbuxx=_hi_vwsz1 + // [46] (byte~) loop::$4 ← > (signed word) loop::x#0 -- vbuxx=_hi_vwsz1 tax // PLEX_XPOS[i] = >x - // [43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z i asl - // [44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 -- pwuc1_derefidx_vbuaa=vbuxx + // [48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4 -- pwuc1_derefidx_vbuaa=vbuxx tay txa sta PLEX_XPOS,y // mulf8s(r, SIN[a]) - // [45] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 + // [49] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2 -- vbsaa=vbsz1 lda.z r - // [46] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 + // [50] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2) -- vbsxx=pbsc1_derefidx_vbuz1 ldy.z a ldx SIN,y - // [47] call mulf8s - // [124] phi from loop::@11 to mulf8s [phi:loop::@11->mulf8s] - // [124] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#1 [phi:loop::@11->mulf8s#0] -- register_copy - // [124] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#1 [phi:loop::@11->mulf8s#1] -- register_copy + // [51] call mulf8s + // [133] phi from loop::@11 to mulf8s [phi:loop::@11->mulf8s] + // [133] phi (signed byte) mulf8s::b#2 = (signed byte) mulf8s::b#1 [phi:loop::@11->mulf8s#0] -- register_copy + // [133] phi (signed byte) mulf8s::mulf8s_prepare1_a#0 = (signed byte) mulf8s::a#1 [phi:loop::@11->mulf8s#1] -- register_copy jsr mulf8s // mulf8s(r, SIN[a]) - // [48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 + // [52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0 // loop::@12 - // [49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 + // [53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3 // mulf8s(r, SIN[a])*2 - // [50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 -- vwsz1=vwsz1_rol_1 + // [54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1 -- vwsz1=vwsz1_rol_1 asl.z __6 rol.z __6+1 // y = mulf8s(r, SIN[a])*2 + 125*0x100 - // [51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 + // [55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100 -- vwsz1=vwsz1_plus_vwsc1 clc lda.z y adc #<$7d*$100 @@ -7650,252 +7298,239 @@ loop: { adc #>$7d*$100 sta.z y+1 // >y - // [52] (byte~) loop::$8 ← > (signed word) loop::y#0 -- vbuaa=_hi_vwsz1 + // [56] (byte~) loop::$8 ← > (signed word) loop::y#0 -- vbuaa=_hi_vwsz1 // PLEX_YPOS[i] = >y - // [53] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 -- pbuc1_derefidx_vbuz1=vbuaa + // [57] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z i sta PLEX_YPOS,y // a += 98 - // [54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 + // [58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62 -- vbuz1=vbuz1_plus_vbuc1 lax.z a axs #-[$62] stx.z a // r += 3 - // [55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 -- vbsz1=vbsz1_plus_vbsc1 + // [59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3 -- vbsz1=vbsz1_plus_vbsc1 lax.z r axs #-[3] stx.z r // for(char i: 0..NUM_BOBS-1) - // [56] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 + // [60] (byte) loop::i#1 ← ++ (byte) loop::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [57] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 + // [61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_BOBS-1+1 cmp.z i bne __b4 // loop::@5 // *BORDERCOL = 3 - // [58] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [62] *((const nomodify byte*) BORDERCOL) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta BORDERCOL // plexSort() - // [59] call plexSort - // [103] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] + // [63] call plexSort + // [108] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] jsr plexSort // loop::@13 // angle += 3 - // [60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z angle axs #-[3] stx.z angle // *BORDERCOL = BLACK - // [61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL // Sort the sprites by y-position // loop::@6 __b6: // *D011&VIC_RST8 - // [62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 lda #VIC_RST8 and D011 // while((*D011&VIC_RST8)!=0) - // [63] if((byte~) loop::$11!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 + // [67] if((byte~) loop::$11!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne __b6 - // [64] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] - // [64] phi (byte) loop::i1#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 + // [68] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] + // [68] phi (byte) loop::i1#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 lda #0 sta.z i1 - // [64] phi (byte) plex_sprite_msb#43 = (byte) 1 [phi:loop::@6->loop::@7#1] -- vbuz1=vbuc1 - lda #1 - sta.z plex_sprite_msb - // [64] phi (byte) plex_show_idx#43 = (byte) 0 [phi:loop::@6->loop::@7#2] -- vbuz1=vbuc1 - lda #0 - sta.z plex_show_idx - // [64] phi (byte) plex_sprite_idx#43 = (byte) 0 [phi:loop::@6->loop::@7#3] -- vbuz1=vbuc1 - sta.z plex_sprite_idx - // [64] phi (byte) plex_free_next#17 = (byte) 0 [phi:loop::@6->loop::@7#4] -- vbuz1=vbuc1 - sta.z plex_free_next // Show the sprites - // [64] phi from loop::@14 to loop::@7 [phi:loop::@14->loop::@7] - // [64] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy - // [64] phi (byte) plex_sprite_msb#43 = (byte) plex_sprite_msb#16 [phi:loop::@14->loop::@7#1] -- register_copy - // [64] phi (byte) plex_show_idx#43 = (byte) plex_show_idx#15 [phi:loop::@14->loop::@7#2] -- register_copy - // [64] phi (byte) plex_sprite_idx#43 = (byte) plex_sprite_idx#15 [phi:loop::@14->loop::@7#3] -- register_copy - // [64] phi (byte) plex_free_next#17 = (byte) plex_free_next#13 [phi:loop::@14->loop::@7#4] -- register_copy + // [68] phi from loop::@14 to loop::@7 [phi:loop::@14->loop::@7] + // [68] phi (byte) loop::i1#5 = (byte) loop::i1#1 [phi:loop::@14->loop::@7#0] -- register_copy // loop::@7 __b7: // *BORDERCOL = BLACK - // [65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL // loop::plexFreeNextYpos1 // return PLEX_FREE_YPOS[plex_free_next]; - // [66] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) -- vbuz1=pbuc1_derefidx_vbuz2 + // [70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return // loop::@8 __b8: // while(*RASTERkeyboard_key_pressed] + // [77] call keyboard_key_pressed + // [23] phi from loop::@10 to keyboard_key_pressed [phi:loop::@10->keyboard_key_pressed] jsr keyboard_key_pressed // keyboard_key_pressed(KEY_SPACE) - // [74] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 + // [78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0 // loop::@15 - // [75] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 + // [79] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3 // if(keyboard_key_pressed(KEY_SPACE)) - // [76] if((byte) 0!=(byte~) loop::$18) goto loop::@return -- vbuc1_neq_vbuaa_then_la1 + // [80] if((byte) 0!=(byte~) loop::$18) goto loop::@return -- vbuc1_neq_vbuaa_then_la1 cmp #0 bne __breturn - // [29] phi from loop::@15 to loop::@1 [phi:loop::@15->loop::@1] - // [29] phi (byte) loop::angle#6 = (byte) loop::angle#1 [phi:loop::@15->loop::@1#0] -- register_copy + // [33] phi from loop::@15 to loop::@1 [phi:loop::@15->loop::@1] + // [33] phi (byte) loop::angle#6 = (byte) loop::angle#1 [phi:loop::@15->loop::@1#0] -- register_copy jmp __b2 // loop::@return __breturn: // } - // [77] return + // [81] return rts } // plexShowSprite // Show the next sprite. // plexSort() prepares showing the sprites plexShowSprite: { - .label plex_sprite_idx2 = $13 + .label plex_sprite_idx2 = $16 // plex_sprite_idx2 = plex_sprite_idx*2 - // [78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z plex_sprite_idx asl sta.z plex_sprite_idx2 // ypos = PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]] - // [79] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) + // [83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_YPOS,y // SPRITES_YPOS[plex_sprite_idx2] = ypos - // [80] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa + // [84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_sprite_idx2 sta SPRITES_YPOS,y // plexShowSprite::plexFreeAdd1 // ypos+21 - // [81] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 + // [85] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 clc adc #$15 // PLEX_FREE_YPOS[plex_free_next] = ypos+21 - // [82] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa + // [86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_free_next sta PLEX_FREE_YPOS,y // plex_free_next+1 - // [83] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 -- vbuxx=vbuz1_plus_1 - ldx.z plex_free_next - inx + // [87] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 -- vbuaa=vbuz1_plus_1 + tya + clc + adc #1 + // (plex_free_next+1)&7 + // [88] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuaa=vbuaa_band_vbuc1 + and #7 // plex_free_next = (plex_free_next+1)&7 - // [84] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_free_next - // plexShowSprite::@4 + // [89] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 -- vbuz1=vbuaa + sta.z plex_free_next + // plexShowSprite::@5 // PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]] - // [85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) - ldx.z plex_show_idx + // [90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) ldy PLEX_SORTED_IDX,x lda PLEX_PTR,y ldx.z plex_sprite_idx sta PLEX_SCREEN_PTR,x // xpos_idx = PLEX_SORTED_IDX[plex_show_idx] - // [86] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43) -- vbuaa=pbuc1_derefidx_vbuz1 + // [91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) -- vbuaa=pbuc1_derefidx_vbuz1 ldy.z plex_show_idx lda PLEX_SORTED_IDX,y // PLEX_XPOS[xpos_idx] - // [90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx + // [95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx lda PLEX_XPOS+1,x // if(>PLEX_XPOS[xpos_idx]!=0) - // [91] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 + // [96] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 cmp #0 bne __b1 // plexShowSprite::@3 - // $ff^plex_sprite_msb - // [92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43 -- vbuaa=vbuc1_bxor_vbuz1 + // 0xff^plex_sprite_msb + // [97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor.z plex_sprite_msb - // *SPRITES_XMSB &= ($ff^plex_sprite_msb) - // [93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + // *SPRITES_XMSB &= (0xff^plex_sprite_msb) + // [98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB // plexShowSprite::@2 __b2: // plex_sprite_idx+1 - // [94] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#43 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [99] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z plex_sprite_idx inx + // (plex_sprite_idx+1)&7 + // [100] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 // plex_sprite_idx = (plex_sprite_idx+1)&7 - // [95] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_sprite_idx + // [101] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 -- vbuz1=vbuaa + sta.z plex_sprite_idx // plex_show_idx++; - // [96] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#43 -- vbuz1=_inc_vbuz1 + // [102] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx -- vbuz1=_inc_vbuz1 inc.z plex_show_idx - // plex_sprite_msb *=2 - // [97] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // plex_sprite_msb <<=1 + // [103] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z plex_sprite_msb // if(plex_sprite_msb==0) - // [98] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 -- vbuz1_neq_0_then_la1 + // [104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -- vbuz1_neq_0_then_la1 lda.z plex_sprite_msb cmp #0 - bne __b5 - // [100] phi from plexShowSprite::@2 to plexShowSprite::@return [phi:plexShowSprite::@2->plexShowSprite::@return] - // [100] phi (byte) plex_sprite_msb#16 = (byte) 1 [phi:plexShowSprite::@2->plexShowSprite::@return#0] -- vbuz1=vbuc1 + bne __breturn + // plexShowSprite::@4 + // plex_sprite_msb = 1 + // [105] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 lda #1 sta.z plex_sprite_msb - rts - // [99] phi from plexShowSprite::@2 to plexShowSprite::@5 [phi:plexShowSprite::@2->plexShowSprite::@5] - // plexShowSprite::@5 - __b5: - // [100] phi from plexShowSprite::@5 to plexShowSprite::@return [phi:plexShowSprite::@5->plexShowSprite::@return] - // [100] phi (byte) plex_sprite_msb#16 = (byte) plex_sprite_msb#3 [phi:plexShowSprite::@5->plexShowSprite::@return#0] -- register_copy // plexShowSprite::@return + __breturn: // } - // [101] return + // [106] return rts // plexShowSprite::@1 __b1: // *SPRITES_XMSB |= plex_sprite_msb - // [102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + // [107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -7912,52 +7547,52 @@ plexShowSprite: { // elements before the marker are shifted right one at a time until encountering one smaller than the current one. // It is then inserted at the spot. Now the marker can move forward. plexSort: { - .label nxt_idx = $13 - .label nxt_y = $14 - .label m = $12 - // [104] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] - // [104] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 + .label nxt_idx = $16 + .label nxt_y = $17 + .label m = $15 + // [109] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] + // [109] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 lda #0 sta.z m - // [104] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] - // [104] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy + // [109] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] + // [109] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy // plexSort::@1 __b1: // nxt_idx = PLEX_SORTED_IDX[m+1] - // [105] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [110] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx // nxt_y = PLEX_YPOS[nxt_idx] - // [106] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [111] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 tay lda PLEX_YPOS,y sta.z nxt_y // if(nxt_y=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + // [112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 ldx.z m ldy PLEX_SORTED_IDX,x cmp PLEX_YPOS,y bcs __b2 // plexSort::@5 - // [108] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 - // [109] phi from plexSort::@5 plexSort::@6 to plexSort::@3 [phi:plexSort::@5/plexSort::@6->plexSort::@3] - // [109] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@6->plexSort::@3#0] -- register_copy + // [113] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 + // [114] phi from plexSort::@5 plexSort::@7 to plexSort::@3 [phi:plexSort::@5/plexSort::@7->plexSort::@3] + // [114] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@7->plexSort::@3#0] -- register_copy // plexSort::@3 __b3: // PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s] - // [110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + // [115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx lda PLEX_SORTED_IDX,x sta PLEX_SORTED_IDX+1,x // s--; - // [111] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx + // [116] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx dex - // while((s!=$ff) && (nxt_yplexSort::plexFreePrepare1] + // plexSort::@6 + // plex_show_idx = 0 + // [123] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // Prepare for showing the sprites + lda #0 + sta.z plex_show_idx + // plex_sprite_idx = 0 + // [124] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + sta.z plex_sprite_idx + // plex_sprite_msb = 1 + // [125] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + lda #1 + sta.z plex_sprite_msb + // [126] phi from plexSort::@6 to plexSort::plexFreePrepare1 [phi:plexSort::@6->plexSort::plexFreePrepare1] // plexSort::plexFreePrepare1 - // [119] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] - // [119] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 + // [127] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] + // [127] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 ldx #0 - // [119] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] - // [119] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy + // [127] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] + // [127] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy // plexSort::plexFreePrepare1_@1 plexFreePrepare1___b1: // PLEX_FREE_YPOS[s] = 0 - // [120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PLEX_FREE_YPOS,x // for( char s: 0..7) - // [121] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx + // [129] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx inx - // [122] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 + // [130] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne plexFreePrepare1___b1 + // plexSort::plexFreePrepare1_@2 + // plex_free_next = 0 + // [131] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + sta.z plex_free_next // plexSort::@return // } - // [123] return + // [132] return rts } // mulf8s // Fast multiply two signed bytes to a word result // mulf8s(signed byte register(A) a, signed byte register(X) b) mulf8s: { - .label return = 7 + .label return = 5 // mulf8s::mulf8s_prepare1 // mulf8u_prepare((byte)a) - // [125] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 - // [126] call mulf8u_prepare + // [134] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0 + // [135] call mulf8u_prepare jsr mulf8u_prepare // mulf8s::@1 // mulf8s_prepared(b) - // [127] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 -- vbsz1=vbsxx + // [136] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2 -- vbsz1=vbsxx stx.z mulf8s_prepared.b - // [128] call mulf8s_prepared + // [137] call mulf8s_prepared jsr mulf8s_prepared // mulf8s::@2 - // [129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 + // [138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4 // mulf8s::@return // } - // [130] return + // [139] return rts } // mulf8s_prepared // Calculate fast multiply with a prepared unsigned byte to a word result // The prepared number is set by calling mulf8s_prepare(byte a) -// mulf8s_prepared(signed byte zp($14) b) +// mulf8s_prepared(signed byte zp($17) b) mulf8s_prepared: { .label memA = $fd - .label m = 7 - .label b = $14 + .label m = 5 + .label b = $17 // mulf8u_prepared((byte) b) - // [131] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuz1 + // [140] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuz1 lda.z b - // [132] call mulf8u_prepared + // [141] call mulf8u_prepared jsr mulf8u_prepared - // [133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 + // [142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0 // mulf8s_prepared::@5 // m = mulf8u_prepared((byte) b) - // [134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 + // [143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2 // if(*memA<0) - // [135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -- _deref_pbsc1_ge_0_then_la1 + // [144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -- _deref_pbsc1_ge_0_then_la1 lda memA cmp #0 bpl __b1 // mulf8s_prepared::@3 // >m - // [136] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 -- vbuaa=_hi_vwuz1 + // [145] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0 -- vbuaa=_hi_vwuz1 lda.z m+1 // >m = (>m)-(byte)b - // [137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuaa_minus_vbuz1 + // [146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0 -- vbuaa=vbuaa_minus_vbuz1 sec sbc.z b - // [138] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 -- vwuz1=vwuz1_sethi_vbuaa + // [147] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15 -- vwuz1=vwuz1_sethi_vbuaa sta.z m+1 - // [139] phi from mulf8s_prepared::@3 mulf8s_prepared::@5 to mulf8s_prepared::@1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1] - // [139] phi (word) mulf8s_prepared::m#5 = (word) mulf8s_prepared::m#1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1#0] -- register_copy + // [148] phi from mulf8s_prepared::@3 mulf8s_prepared::@5 to mulf8s_prepared::@1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1] + // [148] phi (word) mulf8s_prepared::m#5 = (word) mulf8s_prepared::m#1 [phi:mulf8s_prepared::@3/mulf8s_prepared::@5->mulf8s_prepared::@1#0] -- register_copy // mulf8s_prepared::@1 __b1: // if(b<0) - // [140] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -- vbsz1_ge_0_then_la1 + // [149] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -- vbsz1_ge_0_then_la1 lda.z b cmp #0 bpl __b2 // mulf8s_prepared::@4 // >m - // [141] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 -- vbuaa=_hi_vwuz1 + // [150] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5 -- vbuaa=_hi_vwuz1 lda.z m+1 // >m = (>m)-(byte)*memA - // [142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) -- vbuaa=vbuaa_minus__deref_pbuc1 + // [151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA) -- vbuaa=vbuaa_minus__deref_pbuc1 sec sbc memA - // [143] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 -- vwuz1=vwuz1_sethi_vbuaa + // [152] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16 -- vwuz1=vwuz1_sethi_vbuaa sta.z m+1 - // [144] phi from mulf8s_prepared::@1 mulf8s_prepared::@4 to mulf8s_prepared::@2 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2] - // [144] phi (word) mulf8s_prepared::m#4 = (word) mulf8s_prepared::m#5 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2#0] -- register_copy + // [153] phi from mulf8s_prepared::@1 mulf8s_prepared::@4 to mulf8s_prepared::@2 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2] + // [153] phi (word) mulf8s_prepared::m#4 = (word) mulf8s_prepared::m#5 [phi:mulf8s_prepared::@1/mulf8s_prepared::@4->mulf8s_prepared::@2#0] -- register_copy // mulf8s_prepared::@2 __b2: // mulf8s_prepared::@return // } - // [145] return + // [154] return rts } // mulf8u_prepared @@ -8094,9 +7746,9 @@ mulf8s_prepared: { mulf8u_prepared: { .label resL = $fe .label memB = $ff - .label return = 7 + .label return = 5 // *memB = b - // [146] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 -- _deref_pbuc1=vbuaa + // [155] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0 -- _deref_pbuc1=vbuaa sta memB // asm // asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB } @@ -8113,14 +7765,14 @@ mulf8u_prepared: { sbc mulf_sqr2_hi,x sta memB // return { *memB, *resL }; - // [148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 + // [157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 lda resL sta.z return lda memB sta.z return+1 // mulf8u_prepared::@return // } - // [149] return + // [158] return rts } // mulf8u_prepare @@ -8129,7 +7781,7 @@ mulf8u_prepared: { mulf8u_prepare: { .label memA = $fd // *memA = a - // [150] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 -- _deref_pbuc1=vbuaa + // [159] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0 -- _deref_pbuc1=vbuaa sta memA // asm // asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 } @@ -8140,116 +7792,116 @@ mulf8u_prepare: { sta mulf8u_prepared.sm4+1 // mulf8u_prepare::@return // } - // [152] return + // [161] return rts } // init // Initialize the program init: { - .label i = 6 + .label i = 4 // *D011 = VIC_DEN | VIC_RSEL | 3 - // [153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + // [162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_RSEL|3 sta D011 // plexInit(SCREEN) - // [154] call plexInit + // [163] call plexInit // Initialize the multiplexer - // [212] phi from init to plexInit [phi:init->plexInit] + // [221] phi from init to plexInit [phi:init->plexInit] jsr plexInit - // [155] phi from init to init::@1 [phi:init->init::@1] - // [155] phi (byte) init::i#2 = (byte) 0 [phi:init->init::@1#0] -- vbuz1=vbuc1 + // [164] phi from init to init::@1 [phi:init->init::@1] + // [164] phi (byte) init::i#2 = (byte) 0 [phi:init->init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i // Set the sprite pointers & initial positions - // [155] phi from init::@1 to init::@1 [phi:init::@1->init::@1] - // [155] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#0] -- register_copy + // [164] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + // [164] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#0] -- register_copy // init::@1 __b1: // PLEX_PTR[i] = (char)(SPRITE/0x40) - // [156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 + // [165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 lda #$ff&SPRITE/$40 ldy.z i sta PLEX_PTR,y // i*5 - // [157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 -- vbuaa=vbuz1_rol_2 + // [166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2 -- vbuaa=vbuz1_rol_2 tya asl asl - // [158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 -- vbuaa=vbuaa_plus_vbuz1 + // [167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2 -- vbuaa=vbuaa_plus_vbuz1 clc adc.z i // 24+i*5 - // [159] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 -- vbuxx=vbuc1_plus_vbuaa + // [168] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3 -- vbuxx=vbuc1_plus_vbuaa tax axs #-[$18] // PLEX_XPOS[i] = 24+i*5 - // [160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 tya asl - // [161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 -- pwuc1_derefidx_vbuaa=vbuxx + // [170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4 -- pwuc1_derefidx_vbuaa=vbuxx tay txa sta PLEX_XPOS,y // i*8 - // [162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 + // [171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda.z i asl asl asl // 50+i*8 - // [163] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 -- vbuaa=vbuc1_plus_vbuaa + // [172] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5 -- vbuaa=vbuc1_plus_vbuaa clc adc #$32 // PLEX_YPOS[i] = 50+i*8 - // [164] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 -- pbuc1_derefidx_vbuz1=vbuaa + // [173] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z i sta PLEX_YPOS,y // for(char i: 0..PLEX_COUNT-1) - // [165] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 + // [174] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [166] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [175] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i bne __b1 // init::@2 // *SPRITES_ENABLE = 0xff - // [167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE - // [168] phi from init::@2 to init::@3 [phi:init::@2->init::@3] - // [168] phi (byte) init::i1#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 + // [177] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + // [177] phi (byte) init::i1#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 ldx #0 - // [168] phi from init::@3 to init::@3 [phi:init::@3->init::@3] - // [168] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy + // [177] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + // [177] phi (byte) init::i1#2 = (byte) init::i1#1 [phi:init::@3->init::@3#0] -- register_copy // init::@3 __b3: // SPRITES_COLS[i] = GREEN - // [169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN sta SPRITES_COLS,x // for(char i: 0..7) - // [170] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuxx=_inc_vbuxx + // [179] (byte) init::i1#1 ← ++ (byte) init::i1#2 -- vbuxx=_inc_vbuxx inx - // [171] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [180] if((byte) init::i1#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b3 - // [172] phi from init::@3 to init::@4 [phi:init::@3->init::@4] + // [181] phi from init::@3 to init::@4 [phi:init::@3->init::@4] // init::@4 // mulf_init() - // [173] call mulf_init - // [183] phi from init::@4 to mulf_init [phi:init::@4->mulf_init] + // [182] call mulf_init + // [192] phi from init::@4 to mulf_init [phi:init::@4->mulf_init] jsr mulf_init - // [174] phi from init::@4 to init::@5 [phi:init::@4->init::@5] + // [183] phi from init::@4 to init::@5 [phi:init::@4->init::@5] // init::@5 // memset(SCREEN, ' ', 1000) - // [175] call memset + // [184] call memset // Clear screen - // [177] phi from init::@5 to memset [phi:init::@5->memset] + // [186] phi from init::@5 to memset [phi:init::@5->memset] jsr memset // init::@return // } - // [176] return + // [185] return rts } // memset @@ -8259,9 +7911,9 @@ memset: { .const c = ' ' .const num = $3e8 .label end = str+num - .label dst = 7 - // [178] phi from memset to memset::@1 [phi:memset->memset::@1] - // [178] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + .label dst = 5 + // [187] phi from memset to memset::@1 [phi:memset->memset::@1] + // [187] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 lda #str @@ -8269,7 +7921,7 @@ memset: { // memset::@1 __b1: // for(char* dst = str; dst!=end; dst++) - // [179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + // [188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 lda.z dst+1 cmp #>end bne __b2 @@ -8278,55 +7930,55 @@ memset: { bne __b2 // memset::@return // } - // [180] return + // [189] return rts // memset::@2 __b2: // *dst = c - // [181] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [190] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [182] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [191] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 !: - // [178] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] - // [178] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy + // [187] phi from memset::@2 to memset::@1 [phi:memset::@2->memset::@1] + // [187] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy jmp __b1 } // mulf_init // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) mulf_init: { // x/2 - .label c = 9 + .label c = 7 // Counter used for determining x%2==0 - .label sqr1_hi = $a + .label sqr1_hi = 8 // Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4 - .label sqr = $10 - .label sqr1_lo = 7 + .label sqr = $f + .label sqr1_lo = 5 // Decrease or increase x_255 - initially we decrease - .label sqr2_hi = $e - .label sqr2_lo = $c + .label sqr2_hi = $c + .label sqr2_lo = $a //Start with g(0)=f(255) - .label dir = $12 - // [184] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1] - // [184] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuxx=vbuc1 + .label dir = $e + // [193] phi from mulf_init to mulf_init::@1 [phi:mulf_init->mulf_init::@1] + // [193] phi (byte) mulf_init::x_2#3 = (byte) 0 [phi:mulf_init->mulf_init::@1#0] -- vbuxx=vbuc1 ldx #0 - // [184] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 + // [193] phi (byte*) mulf_init::sqr1_hi#2 = (const byte*) mulf_sqr1_hi+(byte) 1 [phi:mulf_init->mulf_init::@1#1] -- pbuz1=pbuc1 lda #mulf_sqr1_hi+1 sta.z sqr1_hi+1 - // [184] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 + // [193] phi (word) mulf_init::sqr#4 = (word) 0 [phi:mulf_init->mulf_init::@1#2] -- vwuz1=vwuc1 txa sta.z sqr sta.z sqr+1 - // [184] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 + // [193] phi (byte) mulf_init::c#2 = (byte) 0 [phi:mulf_init->mulf_init::@1#3] -- vbuz1=vbuc1 sta.z c - // [184] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 + // [193] phi (byte*) mulf_init::sqr1_lo#2 = (const byte*) mulf_sqr1_lo+(byte) 1 [phi:mulf_init->mulf_init::@1#4] -- pbuz1=pbuc1 lda #mulf_sqr1_lo+1 @@ -8334,25 +7986,25 @@ mulf_init: { // mulf_init::@1 __b1: // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) - // [185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 + // [194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -- pbuz1_neq_pbuc1_then_la1 lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 lda.z sqr1_lo cmp #mulf_init::@5] - // [186] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 + // [195] phi from mulf_init::@1 to mulf_init::@5 [phi:mulf_init::@1->mulf_init::@5] + // [195] phi (byte) mulf_init::dir#2 = (byte) $ff [phi:mulf_init::@1->mulf_init::@5#0] -- vbuz1=vbuc1 lda #$ff sta.z dir - // [186] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 + // [195] phi (byte*) mulf_init::sqr2_hi#2 = (const byte*) mulf_sqr2_hi [phi:mulf_init::@1->mulf_init::@5#1] -- pbuz1=pbuc1 lda #mulf_sqr2_hi sta.z sqr2_hi+1 - // [186] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuxx=vbuc1 + // [195] phi (byte) mulf_init::x_255#2 = (byte) -1 [phi:mulf_init::@1->mulf_init::@5#2] -- vbuxx=vbuc1 ldx #-1 - // [186] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 + // [195] phi (byte*) mulf_init::sqr2_lo#2 = (const byte*) mulf_sqr2_lo [phi:mulf_init::@1->mulf_init::@5#3] -- pbuz1=pbuc1 lda #mulf_sqr2_lo @@ -8360,7 +8012,7 @@ mulf_init: { // mulf_init::@5 __b5: // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) - // [187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 + // [196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6 -- pbuz1_neq_pbuc1_then_la1 lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 @@ -8369,116 +8021,116 @@ mulf_init: { bne __b6 // mulf_init::@7 // *(mulf_sqr2_lo+511) = *(mulf_sqr1_lo+256) - // [188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 + // [197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100) -- _deref_pbuc1=_deref_pbuc2 // Set the very last value g(511) = f(256) lda mulf_sqr1_lo+$100 sta mulf_sqr2_lo+$1ff // *(mulf_sqr2_hi+511) = *(mulf_sqr1_hi+256) - // [189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 + // [198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100) -- _deref_pbuc1=_deref_pbuc2 lda mulf_sqr1_hi+$100 sta mulf_sqr2_hi+$1ff // mulf_init::@return // } - // [190] return + // [199] return rts // mulf_init::@6 __b6: // *sqr2_lo = mulf_sqr1_lo[x_255] - // [191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda mulf_sqr1_lo,x ldy #0 sta (sqr2_lo),y // *sqr2_hi++ = mulf_sqr1_hi[x_255] - // [192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + // [201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx lda mulf_sqr1_hi,x sta (sqr2_hi),y // *sqr2_hi++ = mulf_sqr1_hi[x_255]; - // [193] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 + // [202] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 -- pbuz1=_inc_pbuz1 inc.z sqr2_hi bne !+ inc.z sqr2_hi+1 !: // x_255 = x_255 + dir - // [194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuxx=vbuxx_plus_vbuz1 + // [203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 -- vbuxx=vbuxx_plus_vbuz1 txa clc adc.z dir tax // if(x_255==0) - // [195] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuxx_neq_0_then_la1 + // [204] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9 -- vbuxx_neq_0_then_la1 cpx #0 bne __b8 - // [197] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8] - // [197] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 + // [206] phi from mulf_init::@6 to mulf_init::@8 [phi:mulf_init::@6->mulf_init::@8] + // [206] phi (byte) mulf_init::dir#4 = (byte) 1 [phi:mulf_init::@6->mulf_init::@8#0] -- vbuz1=vbuc1 lda #1 sta.z dir - // [196] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9] + // [205] phi from mulf_init::@6 to mulf_init::@9 [phi:mulf_init::@6->mulf_init::@9] // mulf_init::@9 - // [197] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8] - // [197] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy + // [206] phi from mulf_init::@9 to mulf_init::@8 [phi:mulf_init::@9->mulf_init::@8] + // [206] phi (byte) mulf_init::dir#4 = (byte) mulf_init::dir#2 [phi:mulf_init::@9->mulf_init::@8#0] -- register_copy // mulf_init::@8 __b8: // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) - // [198] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 + // [207] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 -- pbuz1=_inc_pbuz1 inc.z sqr2_lo bne !+ inc.z sqr2_lo+1 !: - // [186] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5] - // [186] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy - // [186] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy - // [186] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy - // [186] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy + // [195] phi from mulf_init::@8 to mulf_init::@5 [phi:mulf_init::@8->mulf_init::@5] + // [195] phi (byte) mulf_init::dir#2 = (byte) mulf_init::dir#4 [phi:mulf_init::@8->mulf_init::@5#0] -- register_copy + // [195] phi (byte*) mulf_init::sqr2_hi#2 = (byte*) mulf_init::sqr2_hi#1 [phi:mulf_init::@8->mulf_init::@5#1] -- register_copy + // [195] phi (byte) mulf_init::x_255#2 = (byte) mulf_init::x_255#1 [phi:mulf_init::@8->mulf_init::@5#2] -- register_copy + // [195] phi (byte*) mulf_init::sqr2_lo#2 = (byte*) mulf_init::sqr2_lo#1 [phi:mulf_init::@8->mulf_init::@5#3] -- register_copy jmp __b5 // mulf_init::@2 __b2: // if((++c&1)==0) - // [199] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 + // [208] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 -- vbuz1=_inc_vbuz1 inc.z c // ++c&1 - // [200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuaa=vbuz1_band_vbuc1 + // [209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1 -- vbuaa=vbuz1_band_vbuc1 lda #1 and.z c // if((++c&1)==0) - // [201] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuaa_neq_0_then_la1 + // [210] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3 -- vbuaa_neq_0_then_la1 cmp #0 bne __b3 // mulf_init::@4 // x_2++; - // [202] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuxx=_inc_vbuxx + // [211] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 -- vbuxx=_inc_vbuxx inx // sqr++; - // [203] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 + // [212] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 -- vwuz1=_inc_vwuz1 inc.z sqr bne !+ inc.z sqr+1 !: - // [204] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3] - // [204] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy - // [204] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy + // [213] phi from mulf_init::@2 mulf_init::@4 to mulf_init::@3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3] + // [213] phi (byte) mulf_init::x_2#2 = (byte) mulf_init::x_2#3 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#0] -- register_copy + // [213] phi (word) mulf_init::sqr#3 = (word) mulf_init::sqr#4 [phi:mulf_init::@2/mulf_init::@4->mulf_init::@3#1] -- register_copy // mulf_init::@3 __b3: // sqr - // [207] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuaa=_hi_vwuz1 + // [216] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3 -- vbuaa=_hi_vwuz1 lda.z sqr+1 // *sqr1_hi++ = >sqr - // [208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuaa + // [217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5 -- _deref_pbuz1=vbuaa sta (sqr1_hi),y // *sqr1_hi++ = >sqr; - // [209] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 + // [218] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 -- pbuz1=_inc_pbuz1 inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: // sqr = sqr + x_2 - // [210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuxx + // [219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 -- vwuz1=vwuz1_plus_vbuxx txa clc adc.z sqr @@ -8487,48 +8139,48 @@ mulf_init: { inc.z sqr+1 !: // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) - // [211] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 + // [220] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 -- pbuz1=_inc_pbuz1 inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 !: - // [184] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1] - // [184] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy - // [184] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy - // [184] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy - // [184] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy - // [184] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy + // [193] phi from mulf_init::@3 to mulf_init::@1 [phi:mulf_init::@3->mulf_init::@1] + // [193] phi (byte) mulf_init::x_2#3 = (byte) mulf_init::x_2#2 [phi:mulf_init::@3->mulf_init::@1#0] -- register_copy + // [193] phi (byte*) mulf_init::sqr1_hi#2 = (byte*) mulf_init::sqr1_hi#1 [phi:mulf_init::@3->mulf_init::@1#1] -- register_copy + // [193] phi (word) mulf_init::sqr#4 = (word) mulf_init::sqr#1 [phi:mulf_init::@3->mulf_init::@1#2] -- register_copy + // [193] phi (byte) mulf_init::c#2 = (byte) mulf_init::c#1 [phi:mulf_init::@3->mulf_init::@1#3] -- register_copy + // [193] phi (byte*) mulf_init::sqr1_lo#2 = (byte*) mulf_init::sqr1_lo#1 [phi:mulf_init::@3->mulf_init::@1#4] -- register_copy jmp __b1 } // plexInit // Initialize the multiplexer data structures plexInit: { - // [213] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] + // [222] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] // plexInit::plexSetScreen1 - // [214] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] - // [214] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 + // [223] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] + // [223] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 ldx #0 - // [214] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] - // [214] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy + // [223] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] + // [223] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy // plexInit::@1 __b1: // PLEX_SORTED_IDX[i] = i - // [215] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx + // [224] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx txa sta PLEX_SORTED_IDX,x // for(char i: 0..PLEX_COUNT-1) - // [216] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx + // [225] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx inx - // [217] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 + // [226] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #PLEX_COUNT-1+1 bne __b1 // plexInit::@return // } - // [218] return + // [227] return rts } // File Data - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 diff --git a/src/test/ref/complex/prebob/vogel-sprites.sym b/src/test/ref/complex/prebob/vogel-sprites.sym index 66c55fdf3..6ac956a00 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.sym +++ b/src/test/ref/complex/prebob/vogel-sprites.sym @@ -1,4 +1,6 @@ (label) @1 +(label) @2 +(label) @3 (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 @@ -55,8 +57,8 @@ (label) init::@5 (label) init::@return (byte) init::i -(byte) init::i#1 i zp[1]:6 1501.5 -(byte) init::i#2 i zp[1]:6 800.8000000000001 +(byte) init::i#1 i zp[1]:4 1501.5 +(byte) init::i#2 i zp[1]:4 800.8000000000001 (byte) init::i1 (byte) init::i1#1 reg byte x 1501.5 (byte) init::i1#2 reg byte x 1501.5 @@ -83,14 +85,14 @@ (byte) keyboard_matrix_read::rowid (const byte*) keyboard_matrix_row_bitmask[(number) 8] = { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f } (void()) loop() -(signed word~) loop::$1 zp[2]:7 20002.0 +(signed word~) loop::$1 zp[2]:5 20002.0 (byte~) loop::$11 reg byte a 20002.0 (byte~) loop::$18 reg byte a 2002.0 -(signed word~) loop::$2 zp[2]:7 20002.0 +(signed word~) loop::$2 zp[2]:5 20002.0 (byte~) loop::$20 reg byte a 20002.0 (byte~) loop::$4 reg byte x 10001.0 -(signed word~) loop::$5 zp[2]:7 20002.0 -(signed word~) loop::$6 zp[2]:7 20002.0 +(signed word~) loop::$5 zp[2]:5 20002.0 +(signed word~) loop::$6 zp[2]:5 20002.0 (byte~) loop::$8 reg byte a 20002.0 (label) loop::@1 (label) loop::@10 @@ -109,29 +111,29 @@ (label) loop::@9 (label) loop::@return (byte) loop::a -(byte) loop::a#1 a zp[1]:3 5000.5 -(byte) loop::a#2 a zp[1]:3 1952.6190476190475 -(byte) loop::a#6 a zp[1]:3 2002.0 +(byte) loop::a#1 a zp[1]:14 5000.5 +(byte) loop::a#2 a zp[1]:14 1952.6190476190475 +(byte) loop::a#6 a zp[1]:14 2002.0 (byte) loop::angle -(byte) loop::angle#1 angle zp[1]:6 117.76470588235294 -(byte) loop::angle#6 angle zp[1]:6 96.87096774193549 +(byte) loop::angle#1 angle zp[1]:4 117.76470588235294 +(byte) loop::angle#6 angle zp[1]:4 96.87096774193549 (byte) loop::i -(byte) loop::i#1 i zp[1]:4 15001.5 -(byte) loop::i#2 i zp[1]:4 1739.304347826087 +(byte) loop::i#1 i zp[1]:2 15001.5 +(byte) loop::i#2 i zp[1]:2 1739.304347826087 (byte) loop::i1 -(byte) loop::i1#1 i1 zp[1]:9 15001.5 -(byte) loop::i1#5 i1 zp[1]:9 3333.6666666666665 +(byte) loop::i1#1 i1 zp[1]:3 15001.5 +(byte) loop::i1#5 i1 zp[1]:3 3333.6666666666665 (label) loop::plexFreeNextYpos1 (byte) loop::plexFreeNextYpos1_return -(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp[1]:18 55001.0 +(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp[1]:21 55001.0 (signed byte) loop::r -(signed byte) loop::r#1 r zp[1]:2 6667.333333333333 -(signed byte) loop::r#2 r zp[1]:2 1818.3636363636363 +(signed byte) loop::r#1 r zp[1]:7 6667.333333333333 +(signed byte) loop::r#2 r zp[1]:7 1818.3636363636363 (byte) loop::rasterY (signed word) loop::x -(signed word) loop::x#0 x zp[2]:7 20002.0 +(signed word) loop::x#0 x zp[2]:5 20002.0 (signed word) loop::y -(signed word) loop::y#0 y zp[2]:7 20002.0 +(signed word) loop::y#0 y zp[2]:5 20002.0 (void()) main() (label) main::@1 (label) main::@2 @@ -144,8 +146,8 @@ (byte) memset::c (const byte) memset::c#0 c = (byte) ' ' (byte*) memset::dst -(byte*) memset::dst#1 dst zp[2]:7 20002.0 -(byte*) memset::dst#2 dst zp[2]:7 13334.666666666666 +(byte*) memset::dst#1 dst zp[2]:5 20002.0 +(byte*) memset::dst#2 dst zp[2]:5 13334.666666666666 (byte*) memset::end (const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 (word) memset::num @@ -168,9 +170,9 @@ (signed byte) mulf8s::mulf8s_prepare1_a (signed byte) mulf8s::mulf8s_prepare1_a#0 reg byte a 20002.0 (signed word) mulf8s::return -(signed word) mulf8s::return#0 return zp[2]:7 30000.75 -(signed word) mulf8s::return#2 return zp[2]:7 20002.0 -(signed word) mulf8s::return#3 return zp[2]:7 20002.0 +(signed word) mulf8s::return#0 return zp[2]:5 30000.75 +(signed word) mulf8s::return#2 return zp[2]:5 20002.0 +(signed word) mulf8s::return#3 return zp[2]:5 20002.0 (signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b) (byte~) mulf8s_prepared::$12 reg byte a 2000002.0 (byte~) mulf8s_prepared::$15 reg byte a 2000002.0 @@ -183,13 +185,13 @@ (label) mulf8s_prepared::@5 (label) mulf8s_prepared::@return (signed byte) mulf8s_prepared::b -(signed byte) mulf8s_prepared::b#0 b zp[1]:20 110000.20000000001 +(signed byte) mulf8s_prepared::b#0 b zp[1]:23 110000.20000000001 (word) mulf8s_prepared::m -(word) mulf8s_prepared::m#0 m zp[2]:7 1000001.0 -(word) mulf8s_prepared::m#1 m zp[2]:7 2000002.0 -(word) mulf8s_prepared::m#2 m zp[2]:7 2000002.0 -(word) mulf8s_prepared::m#4 m zp[2]:7 666667.3333333334 -(word) mulf8s_prepared::m#5 m zp[2]:7 1250001.25 +(word) mulf8s_prepared::m#0 m zp[2]:5 1000001.0 +(word) mulf8s_prepared::m#1 m zp[2]:5 2000002.0 +(word) mulf8s_prepared::m#2 m zp[2]:5 2000002.0 +(word) mulf8s_prepared::m#4 m zp[2]:5 666667.3333333334 +(word) mulf8s_prepared::m#5 m zp[2]:5 1250001.25 (const nomodify signed byte*) mulf8s_prepared::memA = (signed byte*) 253 (signed word) mulf8s_prepared::return (void()) mulf8u_prepare((byte) mulf8u_prepare::a) @@ -204,8 +206,8 @@ (const nomodify byte*) mulf8u_prepared::memB = (byte*) 255 (const nomodify byte*) mulf8u_prepared::resL = (byte*) 254 (word) mulf8u_prepared::return -(word) mulf8u_prepared::return#0 return zp[2]:7 3666667.333333333 -(word) mulf8u_prepared::return#2 return zp[2]:7 2000002.0 +(word) mulf8u_prepared::return#0 return zp[2]:5 3666667.333333333 +(word) mulf8u_prepared::return#2 return zp[2]:5 2000002.0 (void()) mulf_init() (byte~) mulf_init::$1 reg byte a 20002.0 (byte~) mulf_init::$4 reg byte a 20002.0 @@ -221,28 +223,28 @@ (label) mulf_init::@9 (label) mulf_init::@return (byte) mulf_init::c -(byte) mulf_init::c#1 c zp[1]:9 2307.9230769230767 -(byte) mulf_init::c#2 c zp[1]:9 10001.0 +(byte) mulf_init::c#1 c zp[1]:7 2307.9230769230767 +(byte) mulf_init::c#2 c zp[1]:7 10001.0 (byte) mulf_init::dir -(byte) mulf_init::dir#2 dir zp[1]:18 3750.375 -(byte) mulf_init::dir#4 dir zp[1]:18 10001.0 +(byte) mulf_init::dir#2 dir zp[1]:14 3750.375 +(byte) mulf_init::dir#4 dir zp[1]:14 10001.0 (word) mulf_init::sqr -(word) mulf_init::sqr#1 sqr zp[2]:16 10001.0 -(word) mulf_init::sqr#2 sqr zp[2]:16 20002.0 -(word) mulf_init::sqr#3 sqr zp[2]:16 8334.166666666666 -(word) mulf_init::sqr#4 sqr zp[2]:16 5000.5 +(word) mulf_init::sqr#1 sqr zp[2]:15 10001.0 +(word) mulf_init::sqr#2 sqr zp[2]:15 20002.0 +(word) mulf_init::sqr#3 sqr zp[2]:15 8334.166666666666 +(word) mulf_init::sqr#4 sqr zp[2]:15 5000.5 (byte*) mulf_init::sqr1_hi -(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:10 6667.333333333333 -(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:10 2500.25 +(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:8 6667.333333333333 +(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:8 2500.25 (byte*) mulf_init::sqr1_lo -(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:7 20002.0 -(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:7 2857.4285714285716 +(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:5 20002.0 +(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:5 2857.4285714285716 (byte*) mulf_init::sqr2_hi -(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:14 3333.6666666666665 -(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:14 7500.75 +(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:12 3333.6666666666665 +(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:12 7500.75 (byte*) mulf_init::sqr2_lo -(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:12 20002.0 -(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:12 4444.888888888889 +(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:10 20002.0 +(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:10 4444.888888888889 (byte) mulf_init::x_2 (byte) mulf_init::x_2#1 reg byte x 10001.0 (byte) mulf_init::x_2#2 reg byte x 5000.5 @@ -268,6 +270,7 @@ (byte~) plexShowSprite::$2 reg byte a 200002.0 (byte~) plexShowSprite::$3 reg byte a 200002.0 (byte~) plexShowSprite::$5 reg byte x 200002.0 +(byte~) plexShowSprite::$6 reg byte a 200002.0 (byte~) plexShowSprite::$9 reg byte a 200002.0 (label) plexShowSprite::@1 (label) plexShowSprite::@2 @@ -277,11 +280,12 @@ (label) plexShowSprite::@return (label) plexShowSprite::plexFreeAdd1 (byte~) plexShowSprite::plexFreeAdd1_$0 reg byte a 200002.0 -(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte x 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte a 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$2 reg byte a 200002.0 (byte) plexShowSprite::plexFreeAdd1_ypos (byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 150001.5 (byte) plexShowSprite::plex_sprite_idx2 -(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:19 27273.0 +(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:22 25000.25 (byte) plexShowSprite::xpos_idx (byte) plexShowSprite::xpos_idx#0 reg byte a 200002.0 (byte) plexShowSprite::ypos @@ -292,16 +296,18 @@ (label) plexSort::@4 (label) plexSort::@5 (label) plexSort::@6 +(label) plexSort::@7 (label) plexSort::@return (byte) plexSort::m -(byte) plexSort::m#1 m zp[1]:18 1500001.5 -(byte) plexSort::m#2 m zp[1]:18 416667.0833333334 +(byte) plexSort::m#1 m zp[1]:21 1500001.5 +(byte) plexSort::m#2 m zp[1]:21 416667.0833333334 (byte) plexSort::nxt_idx -(byte) plexSort::nxt_idx#0 nxt_idx zp[1]:19 300000.30000000005 +(byte) plexSort::nxt_idx#0 nxt_idx zp[1]:22 300000.30000000005 (byte) plexSort::nxt_y -(byte) plexSort::nxt_y#0 nxt_y zp[1]:20 1500000.375 +(byte) plexSort::nxt_y#0 nxt_y zp[1]:23 1500000.375 (label) plexSort::plexFreePrepare1 (label) plexSort::plexFreePrepare1_@1 +(label) plexSort::plexFreePrepare1_@2 (byte) plexSort::plexFreePrepare1_s (byte) plexSort::plexFreePrepare1_s#1 reg byte x 1500001.5 (byte) plexSort::plexFreePrepare1_s#2 reg byte x 1500001.5 @@ -310,39 +316,33 @@ (byte) plexSort::s#2 reg byte x 2000002.0 (byte) plexSort::s#3 reg byte x 2.05000025E7 (byte) plexSort::s#6 reg byte x 2000002.0 -(byte) plex_free_next -(byte) plex_free_next#13 plex_free_next zp[1]:2 5000.090909090909 -(byte) plex_free_next#17 plex_free_next zp[1]:2 22000.4 -(byte) plex_show_idx -(byte) plex_show_idx#15 plex_show_idx zp[1]:4 12222.444444444445 -(byte) plex_show_idx#43 plex_show_idx zp[1]:4 17083.541666666664 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#15 plex_sprite_idx zp[1]:3 11000.2 -(byte) plex_sprite_idx#43 plex_sprite_idx zp[1]:3 14091.090909090908 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#16 plex_sprite_msb zp[1]:5 22000.4 -(byte) plex_sprite_msb#3 plex_sprite_msb zp[1]:5 100001.0 -(byte) plex_sprite_msb#43 plex_sprite_msb zp[1]:5 12400.16 +(volatile byte) plex_free_next loadstore zp[1]:20 8205.307692307691 +(volatile byte) plex_show_idx loadstore zp[1]:17 10408.326530612245 +(volatile byte) plex_sprite_idx loadstore zp[1]:18 8913.195652173912 +(volatile byte) plex_sprite_msb loadstore zp[1]:19 12978.914893617019 -zp[1]:2 [ plex_free_next#17 plex_free_next#13 loop::r#2 loop::r#1 ] -zp[1]:3 [ plex_sprite_idx#43 plex_sprite_idx#15 loop::a#2 loop::a#1 loop::a#6 ] -zp[1]:4 [ plex_show_idx#43 plex_show_idx#15 loop::i#2 loop::i#1 ] -zp[1]:5 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ] +zp[1]:2 [ loop::i#2 loop::i#1 ] +zp[1]:3 [ loop::i1#5 loop::i1#1 ] reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] reg byte a [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ] reg byte x [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ] -zp[1]:6 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ] +zp[1]:4 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ] reg byte x [ init::i1#2 init::i1#1 ] -zp[2]:7 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] -zp[1]:9 [ mulf_init::c#2 mulf_init::c#1 loop::i1#5 loop::i1#1 ] -zp[2]:10 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +zp[2]:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ] +zp[1]:7 [ mulf_init::c#2 mulf_init::c#1 loop::r#2 loop::r#1 ] +zp[2]:8 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -zp[2]:12 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] +zp[2]:10 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] -zp[2]:14 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] -zp[2]:16 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] +zp[2]:12 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] +zp[1]:14 [ mulf_init::dir#2 mulf_init::dir#4 loop::a#2 loop::a#1 loop::a#6 ] +zp[2]:15 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ plexInit::i#2 plexInit::i#1 ] +zp[1]:17 [ plex_show_idx ] +zp[1]:18 [ plex_sprite_idx ] +zp[1]:19 [ plex_sprite_msb ] +zp[1]:20 [ plex_free_next ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ exit::$0 ] reg byte a [ keyboard_matrix_read::return#2 ] @@ -353,22 +353,24 @@ reg byte x [ loop::$4 ] reg byte a [ loop::$20 ] reg byte a [ loop::$8 ] reg byte a [ loop::$11 ] -zp[1]:18 [ loop::plexFreeNextYpos1_return#0 mulf_init::dir#2 mulf_init::dir#4 plexSort::m#2 plexSort::m#1 ] +zp[1]:21 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ] reg byte a [ keyboard_key_pressed::return#3 ] reg byte a [ loop::$18 ] reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] -reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] +reg byte a [ plexShowSprite::plexFreeAdd1_$1 ] +reg byte a [ plexShowSprite::plexFreeAdd1_$2 ] reg byte a [ plexShowSprite::xpos_idx#0 ] reg byte x [ plexShowSprite::$11 ] reg byte a [ plexShowSprite::$2 ] reg byte a [ plexShowSprite::$3 ] reg byte a [ plexShowSprite::$9 ] reg byte x [ plexShowSprite::$5 ] -zp[1]:19 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] +reg byte a [ plexShowSprite::$6 ] +zp[1]:22 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] reg byte x [ plexSort::s#2 ] reg byte a [ mulf8u_prepare::a#0 ] -zp[1]:20 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ] +zp[1]:23 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ] reg byte a [ mulf8u_prepared::b#0 ] reg byte a [ mulf8s_prepared::$8 ] reg byte a [ mulf8s_prepared::$15 ] diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.asm b/src/test/ref/examples/multiplexer/simple-multiplexer.asm index 3db60e43b..df0aeacaa 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.asm +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.asm @@ -1,6 +1,6 @@ // A simple usage of the flexible sprite multiplexer routine .pc = $801 "Basic" -:BasicUpstart(main) +:BasicUpstart(__bbegin) .pc = $80d "Program" .label SPRITES_XPOS = $d000 .label SPRITES_YPOS = $d001 @@ -21,18 +21,31 @@ // Location of screen & sprites .label SCREEN = $400 .label SPRITE = $2000 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 6 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 3 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 4 + .label plex_show_idx = 6 + .label plex_sprite_idx = 7 + .label plex_sprite_msb = 8 + .label plex_free_next = 9 +__bbegin: + // plex_show_idx=0 // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 5 + lda #0 + sta.z plex_show_idx + // plex_sprite_idx=0 + // The index the next sprite to use for showing (sprites are used round-robin) + sta.z plex_sprite_idx + // plex_sprite_msb=1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb + // plex_free_next = 0 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next // kickasm + jsr main + rts main: { // asm sei @@ -48,7 +61,7 @@ loop: { // The current index into the y-sinus .label sin_idx = 2 .label plexFreeNextYpos1_return = $a - .label ss = 7 + .label ss = 3 lda #0 sta.z sin_idx __b2: @@ -89,12 +102,6 @@ loop: { bne __b6 lda #0 sta.z ss - lda #1 - sta.z plex_sprite_msb - lda #0 - sta.z plex_show_idx - sta.z plex_sprite_idx - sta.z plex_free_next // Show the sprites __b7: // *BORDERCOL = BLACK @@ -147,9 +154,11 @@ plexShowSprite: { // plex_free_next+1 ldx.z plex_free_next inx + // (plex_free_next+1)&7 + txa + and #7 // plex_free_next = (plex_free_next+1)&7 - lda #7 - sax.z plex_free_next + sta.z plex_free_next // PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]] ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x @@ -171,31 +180,33 @@ plexShowSprite: { // if(>PLEX_XPOS[xpos_idx]!=0) cmp #0 bne __b1 - // $ff^plex_sprite_msb + // 0xff^plex_sprite_msb lda #$ff eor.z plex_sprite_msb - // *SPRITES_XMSB &= ($ff^plex_sprite_msb) + // *SPRITES_XMSB &= (0xff^plex_sprite_msb) and SPRITES_XMSB sta SPRITES_XMSB __b2: // plex_sprite_idx+1 ldx.z plex_sprite_idx inx + // (plex_sprite_idx+1)&7 + txa + and #7 // plex_sprite_idx = (plex_sprite_idx+1)&7 - lda #7 - sax.z plex_sprite_idx + sta.z plex_sprite_idx // plex_show_idx++; inc.z plex_show_idx - // plex_sprite_msb *=2 + // plex_sprite_msb <<=1 asl.z plex_sprite_msb // if(plex_sprite_msb==0) lda.z plex_sprite_msb cmp #0 - bne __b5 + bne __breturn + // plex_sprite_msb = 1 lda #1 sta.z plex_sprite_msb - rts - __b5: + __breturn: // } rts __b1: @@ -240,7 +251,7 @@ plexSort: { sta PLEX_SORTED_IDX+1,x // s--; dex - // while((s!=$ff) && (nxt_y *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [48] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 + [42] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 + [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 + [44] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 + [45] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 + [46] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 + to:plexShowSprite::@5 +plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 + [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) + [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 + [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 + [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [53] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 to:plexShowSprite::@3 -plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@4 - [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 - [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 +plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@5 + [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb + [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 to:plexShowSprite::@2 plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@3 - [51] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#42 + (byte) 1 - [52] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 - [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#42 - [54] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 << (byte) 1 - [55] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 + [56] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 + [57] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 + [58] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 + [59] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx + [60] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 + [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return + to:plexShowSprite::@4 +plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@2 + [62] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexShowSprite::@return -plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::@2 - [56] phi() - to:plexShowSprite::@return -plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@5 - [57] (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@5/(byte) plex_sprite_msb#3 plexShowSprite::@2/(byte) 1 ) - [58] return +plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@4 + [63] return to:@return -plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4 - [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 +plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@5 + [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb to:plexShowSprite::@2 (void()) plexSort() plexSort: scope:[plexSort] from loop::@5 - [60] phi() + [65] phi() to:plexSort::@1 plexSort::@1: scope:[plexSort] from plexSort plexSort::@2 - [61] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) - [62] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) - [63] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) - [64] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 + [66] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) + [67] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) + [68] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) + [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 to:plexSort::@5 plexSort::@5: scope:[plexSort] from plexSort::@1 - [65] (byte) plexSort::s#6 ← (byte) plexSort::m#2 + [70] (byte) plexSort::s#6 ← (byte) plexSort::m#2 to:plexSort::@3 -plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@6 - [66] (byte) plexSort::s#3 ← phi( plexSort::@6/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) - [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) - [68] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 - [69] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 - to:plexSort::@6 -plexSort::@6: scope:[plexSort] from plexSort::@3 - [70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7 + [71] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) + [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) + [73] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 + [74] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 + to:plexSort::@7 +plexSort::@7: scope:[plexSort] from plexSort::@3 + [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 to:plexSort::@4 -plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@6 - [71] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 - [72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 +plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7 + [76] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 + [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 to:plexSort::@2 plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4 - [73] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 - [74] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + [78] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 + [79] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + to:plexSort::@6 +plexSort::@6: scope:[plexSort] from plexSort::@2 + [80] (volatile byte) plex_show_idx ← (byte) 0 + [81] (volatile byte) plex_sprite_idx ← (byte) 0 + [82] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexSort::plexFreePrepare1 -plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@2 - [75] phi() +plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6 + [83] phi() to:plexSort::plexFreePrepare1_@1 plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1 - [76] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) - [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 - [78] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 - [79] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + [84] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) + [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 + [86] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 + [87] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + to:plexSort::plexFreePrepare1_@2 +plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1 + [88] (volatile byte) plex_free_next ← (byte) 0 to:plexSort::@return -plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1 - [80] return +plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 + [89] return to:@return (void()) init() init: scope:[init] from main - [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 - [82] call plexInit + [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 + [91] call plexInit to:init::@1 init::@1: scope:[init] from init init::@1 - [83] (word) init::xp#2 ← phi( init::@1/(word) init::xp#1 init/(word) $20 ) - [83] (byte) init::sx#2 ← phi( init::@1/(byte) init::sx#1 init/(byte) 0 ) - [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 - [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 - [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 - [88] (byte) init::sx#1 ← ++ (byte) init::sx#2 - [89] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 + [92] (word) init::xp#2 ← phi( init::@1/(word) init::xp#1 init/(word) $20 ) + [92] (byte) init::sx#2 ← phi( init::@1/(byte) init::sx#1 init/(byte) 0 ) + [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 + [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 + [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 + [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 + [97] (byte) init::sx#1 ← ++ (byte) init::sx#2 + [98] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 to:init::@2 init::@2: scope:[init] from init::@1 - [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff + [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff to:init::@3 init::@3: scope:[init] from init::@2 init::@3 - [91] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) - [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN - [93] (byte) init::ss#1 ← ++ (byte) init::ss#2 - [94] if((byte) init::ss#1!=(byte) 8) goto init::@3 + [100] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) + [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 + [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 to:init::@return init::@return: scope:[init] from init::@3 - [95] return + [104] return to:@return (void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init - [96] phi() + [105] phi() to:plexInit::plexSetScreen1 plexInit::plexSetScreen1: scope:[plexInit] from plexInit - [97] phi() + [106] phi() to:plexInit::@1 plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1 - [98] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) - [99] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 - [100] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 - [101] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 + [107] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) + [108] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 + [109] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 + [110] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 to:plexInit::@return plexInit::@return: scope:[plexInit] from plexInit::@1 - [102] return + [111] return to:@return diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.log b/src/test/ref/examples/multiplexer/simple-multiplexer.log index 8228cd2d5..5f1be8f09 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.log +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.log @@ -51,9 +51,9 @@ CONTROL FLOW GRAPH SSA to:@4 @4: scope:[] from @begin (byte*) PLEX_SCREEN_PTR#0 ← (byte*)(number) $400+(number) $3f8 - (byte) plex_show_idx#0 ← (byte) 0 - (byte) plex_sprite_idx#0 ← (byte) 0 - (byte) plex_sprite_msb#0 ← (byte) 1 + (volatile byte) plex_show_idx ← (byte) 0 + (volatile byte) plex_sprite_idx ← (byte) 0 + (volatile byte) plex_sprite_msb ← (byte) 1 to:@9 (void()) plexInit((byte*) plexInit::screen) @@ -130,20 +130,14 @@ plexSort::@4: scope:[plexSort] from plexSort::@3 *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#1 to:plexSort::@2 plexSort::@6: scope:[plexSort] from plexSort::@2 - (byte) plex_show_idx#1 ← (number) 0 - (byte) plex_sprite_idx#1 ← (number) 0 - (byte) plex_sprite_msb#1 ← (number) 1 + (volatile byte) plex_show_idx ← (number) 0 + (volatile byte) plex_sprite_idx ← (number) 0 + (volatile byte) plex_sprite_msb ← (number) 1 to:plexSort::plexFreePrepare1 plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6 - (byte) plex_sprite_msb#38 ← phi( plexSort::@6/(byte) plex_sprite_msb#1 ) - (byte) plex_sprite_idx#39 ← phi( plexSort::@6/(byte) plex_sprite_idx#1 ) - (byte) plex_show_idx#39 ← phi( plexSort::@6/(byte) plex_show_idx#1 ) (byte) plexSort::plexFreePrepare1_s#0 ← (byte) 0 to:plexSort::plexFreePrepare1_@1 plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1 - (byte) plex_sprite_msb#30 ← phi( plexSort::plexFreePrepare1/(byte) plex_sprite_msb#38 plexSort::plexFreePrepare1_@1/(byte) plex_sprite_msb#30 ) - (byte) plex_sprite_idx#32 ← phi( plexSort::plexFreePrepare1/(byte) plex_sprite_idx#39 plexSort::plexFreePrepare1_@1/(byte) plex_sprite_idx#32 ) - (byte) plex_show_idx#32 ← phi( plexSort::plexFreePrepare1/(byte) plex_show_idx#39 plexSort::plexFreePrepare1_@1/(byte) plex_show_idx#32 ) (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) plexSort::plexFreePrepare1_s#0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (number) 0 (byte) plexSort::plexFreePrepare1_s#1 ← (byte) plexSort::plexFreePrepare1_s#2 + rangenext(0,7) @@ -151,59 +145,36 @@ plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 if((bool~) plexSort::plexFreePrepare1_$0) goto plexSort::plexFreePrepare1_@1 to:plexSort::plexFreePrepare1_@2 plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1 - (byte) plex_sprite_msb#23 ← phi( plexSort::plexFreePrepare1_@1/(byte) plex_sprite_msb#30 ) - (byte) plex_sprite_idx#22 ← phi( plexSort::plexFreePrepare1_@1/(byte) plex_sprite_idx#32 ) - (byte) plex_show_idx#22 ← phi( plexSort::plexFreePrepare1_@1/(byte) plex_show_idx#32 ) - (byte) plex_free_next#0 ← (number) 0 + (volatile byte) plex_free_next ← (number) 0 to:plexSort::@return plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 - (byte) plex_free_next#11 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_free_next#0 ) - (byte) plex_sprite_msb#12 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_sprite_msb#23 ) - (byte) plex_sprite_idx#11 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_sprite_idx#22 ) - (byte) plex_show_idx#11 ← phi( plexSort::plexFreePrepare1_@2/(byte) plex_show_idx#22 ) - (byte) plex_show_idx#2 ← (byte) plex_show_idx#11 - (byte) plex_sprite_idx#2 ← (byte) plex_sprite_idx#11 - (byte) plex_sprite_msb#2 ← (byte) plex_sprite_msb#12 - (byte) plex_free_next#1 ← (byte) plex_free_next#11 return to:@return (void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@21 - (byte) plex_sprite_msb#39 ← phi( loop::@21/(byte) plex_sprite_msb#27 ) (byte*) PLEX_SCREEN_PTR#23 ← phi( loop::@21/(byte*) PLEX_SCREEN_PTR#26 ) - (byte) plex_free_next#21 ← phi( loop::@21/(byte) plex_free_next#27 ) - (byte) plex_show_idx#12 ← phi( loop::@21/(byte) plex_show_idx#23 ) - (byte) plex_sprite_idx#12 ← phi( loop::@21/(byte) plex_sprite_idx#23 ) - (number~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (number) 2 + (number~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (number) 2 (byte) plexShowSprite::plex_sprite_idx2#0 ← (number~) plexShowSprite::$0 - (byte) plexShowSprite::ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#12)) + (byte) plexShowSprite::ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::ypos#0 (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← (byte) plexShowSprite::ypos#0 to:plexShowSprite::plexFreeAdd1 plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite - (byte) plex_sprite_msb#31 ← phi( plexShowSprite/(byte) plex_sprite_msb#39 ) (byte) plexShowSprite::plex_sprite_idx2#2 ← phi( plexShowSprite/(byte) plexShowSprite::plex_sprite_idx2#0 ) - (byte) plex_sprite_idx#24 ← phi( plexShowSprite/(byte) plex_sprite_idx#12 ) (byte*) PLEX_SCREEN_PTR#16 ← phi( plexShowSprite/(byte*) PLEX_SCREEN_PTR#23 ) - (byte) plex_show_idx#24 ← phi( plexShowSprite/(byte) plex_show_idx#12 ) - (byte) plex_free_next#12 ← phi( plexShowSprite/(byte) plex_free_next#21 ) (byte) plexShowSprite::plexFreeAdd1_ypos#1 ← phi( plexShowSprite/(byte) plexShowSprite::plexFreeAdd1_ypos#0 ) (number~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (number) $15 - *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#12) ← (number~) plexShowSprite::plexFreeAdd1_$0 - (number~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (number) 1 + *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (number~) plexShowSprite::plexFreeAdd1_$0 + (number~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (number) 1 (number~) plexShowSprite::plexFreeAdd1_$2 ← (number~) plexShowSprite::plexFreeAdd1_$1 & (number) 7 - (byte) plex_free_next#2 ← (number~) plexShowSprite::plexFreeAdd1_$2 + (volatile byte) plex_free_next ← (number~) plexShowSprite::plexFreeAdd1_$2 to:plexShowSprite::@7 plexShowSprite::@7: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 - (byte) plex_free_next#39 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_free_next#2 ) - (byte) plex_sprite_msb#24 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_sprite_msb#31 ) (byte) plexShowSprite::plex_sprite_idx2#1 ← phi( plexShowSprite::plexFreeAdd1/(byte) plexShowSprite::plex_sprite_idx2#2 ) - (byte) plex_sprite_idx#13 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_sprite_idx#24 ) (byte*) PLEX_SCREEN_PTR#9 ← phi( plexShowSprite::plexFreeAdd1/(byte*) PLEX_SCREEN_PTR#16 ) - (byte) plex_show_idx#13 ← phi( plexShowSprite::plexFreeAdd1/(byte) plex_show_idx#24 ) - *((byte*) PLEX_SCREEN_PTR#9 + (byte) plex_sprite_idx#13) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#13)) - (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#13) + *((byte*) PLEX_SCREEN_PTR#9 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) (byte~) plexShowSprite::$10 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$10) *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#1) ← (byte~) plexShowSprite::$2 @@ -213,63 +184,33 @@ plexShowSprite::@7: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 if((bool~) plexShowSprite::$4) goto plexShowSprite::@1 to:plexShowSprite::@4 plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@7 - (byte) plex_free_next#30 ← phi( plexShowSprite::@7/(byte) plex_free_next#39 ) - (byte) plex_show_idx#25 ← phi( plexShowSprite::@7/(byte) plex_show_idx#13 ) - (byte) plex_sprite_idx#25 ← phi( plexShowSprite::@7/(byte) plex_sprite_idx#13 ) - (byte) plex_sprite_msb#13 ← phi( plexShowSprite::@7/(byte) plex_sprite_msb#24 ) - *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#13 + *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb to:plexShowSprite::@2 plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@7 - (byte) plex_free_next#31 ← phi( plexShowSprite::@7/(byte) plex_free_next#39 ) - (byte) plex_show_idx#26 ← phi( plexShowSprite::@7/(byte) plex_show_idx#13 ) - (byte) plex_sprite_idx#26 ← phi( plexShowSprite::@7/(byte) plex_sprite_idx#13 ) - (byte) plex_sprite_msb#14 ← phi( plexShowSprite::@7/(byte) plex_sprite_msb#24 ) - (number~) plexShowSprite::$9 ← (number) $ff ^ (byte) plex_sprite_msb#14 + (number~) plexShowSprite::$9 ← (number) $ff ^ (volatile byte) plex_sprite_msb *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (number~) plexShowSprite::$9 to:plexShowSprite::@2 plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@4 - (byte) plex_free_next#22 ← phi( plexShowSprite::@1/(byte) plex_free_next#30 plexShowSprite::@4/(byte) plex_free_next#31 ) - (byte) plex_sprite_msb#15 ← phi( plexShowSprite::@1/(byte) plex_sprite_msb#13 plexShowSprite::@4/(byte) plex_sprite_msb#14 ) - (byte) plex_show_idx#14 ← phi( plexShowSprite::@1/(byte) plex_show_idx#25 plexShowSprite::@4/(byte) plex_show_idx#26 ) - (byte) plex_sprite_idx#14 ← phi( plexShowSprite::@1/(byte) plex_sprite_idx#25 plexShowSprite::@4/(byte) plex_sprite_idx#26 ) - (number~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (number) 1 + (number~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (number) 1 (number~) plexShowSprite::$6 ← (number~) plexShowSprite::$5 & (number) 7 - (byte) plex_sprite_idx#3 ← (number~) plexShowSprite::$6 - (byte) plex_show_idx#3 ← ++ (byte) plex_show_idx#14 - (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#15 * (number) 2 - (bool~) plexShowSprite::$7 ← (byte) plex_sprite_msb#3 == (number) 0 + (volatile byte) plex_sprite_idx ← (number~) plexShowSprite::$6 + (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx + (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (number) 1 + (bool~) plexShowSprite::$7 ← (volatile byte) plex_sprite_msb == (number) 0 (bool~) plexShowSprite::$8 ← ! (bool~) plexShowSprite::$7 if((bool~) plexShowSprite::$8) goto plexShowSprite::@return to:plexShowSprite::@6 plexShowSprite::@6: scope:[plexShowSprite] from plexShowSprite::@2 - (byte) plex_show_idx#27 ← phi( plexShowSprite::@2/(byte) plex_show_idx#3 ) - (byte) plex_sprite_idx#27 ← phi( plexShowSprite::@2/(byte) plex_sprite_idx#3 ) - (byte) plex_free_next#23 ← phi( plexShowSprite::@2/(byte) plex_free_next#22 ) - (byte) plex_sprite_msb#4 ← (number) 1 + (volatile byte) plex_sprite_msb ← (number) 1 to:plexShowSprite::@return plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@6 - (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@2/(byte) plex_sprite_msb#3 plexShowSprite::@6/(byte) plex_sprite_msb#4 ) - (byte) plex_show_idx#15 ← phi( plexShowSprite::@2/(byte) plex_show_idx#3 plexShowSprite::@6/(byte) plex_show_idx#27 ) - (byte) plex_sprite_idx#15 ← phi( plexShowSprite::@2/(byte) plex_sprite_idx#3 plexShowSprite::@6/(byte) plex_sprite_idx#27 ) - (byte) plex_free_next#13 ← phi( plexShowSprite::@2/(byte) plex_free_next#22 plexShowSprite::@6/(byte) plex_free_next#23 ) - (byte) plex_free_next#3 ← (byte) plex_free_next#13 - (byte) plex_sprite_idx#4 ← (byte) plex_sprite_idx#15 - (byte) plex_show_idx#4 ← (byte) plex_show_idx#15 - (byte) plex_sprite_msb#5 ← (byte) plex_sprite_msb#16 return to:@return @9: scope:[] from @4 - (byte) plex_sprite_msb#40 ← phi( @4/(byte) plex_sprite_msb#0 ) - (byte) plex_sprite_idx#40 ← phi( @4/(byte) plex_sprite_idx#0 ) - (byte) plex_show_idx#40 ← phi( @4/(byte) plex_show_idx#0 ) (byte*) PLEX_SCREEN_PTR#27 ← phi( @4/(byte*) PLEX_SCREEN_PTR#0 ) - (byte) plex_free_next#4 ← (byte) 0 + (volatile byte) plex_free_next ← (byte) 0 to:@12 @12: scope:[] from @9 - (byte) plex_free_next#38 ← phi( @9/(byte) plex_free_next#4 ) - (byte) plex_sprite_msb#37 ← phi( @9/(byte) plex_sprite_msb#40 ) - (byte) plex_sprite_idx#38 ← phi( @9/(byte) plex_sprite_idx#40 ) - (byte) plex_show_idx#38 ← phi( @9/(byte) plex_show_idx#40 ) (byte*) PLEX_SCREEN_PTR#25 ← phi( @9/(byte*) PLEX_SCREEN_PTR#27 ) kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) @@ -280,45 +221,21 @@ plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexSho (void()) main() main: scope:[main] from @15 - (byte) plex_free_next#32 ← phi( @15/(byte) plex_free_next#29 ) - (byte) plex_sprite_msb#32 ← phi( @15/(byte) plex_sprite_msb#29 ) - (byte) plex_sprite_idx#33 ← phi( @15/(byte) plex_sprite_idx#31 ) - (byte) plex_show_idx#33 ← phi( @15/(byte) plex_show_idx#31 ) (byte*) PLEX_SCREEN_PTR#17 ← phi( @15/(byte*) PLEX_SCREEN_PTR#21 ) asm { sei } call init to:main::@1 main::@1: scope:[main] from main - (byte) plex_free_next#24 ← phi( main/(byte) plex_free_next#32 ) - (byte) plex_sprite_msb#25 ← phi( main/(byte) plex_sprite_msb#32 ) - (byte) plex_sprite_idx#28 ← phi( main/(byte) plex_sprite_idx#33 ) - (byte) plex_show_idx#28 ← phi( main/(byte) plex_show_idx#33 ) (byte*) PLEX_SCREEN_PTR#10 ← phi( main/(byte*) PLEX_SCREEN_PTR#6 ) (byte*) PLEX_SCREEN_PTR#3 ← (byte*) PLEX_SCREEN_PTR#10 call loop to:main::@2 main::@2: scope:[main] from main::@1 (byte*) PLEX_SCREEN_PTR#18 ← phi( main::@1/(byte*) PLEX_SCREEN_PTR#3 ) - (byte) plex_free_next#14 ← phi( main::@1/(byte) plex_free_next#9 ) - (byte) plex_sprite_msb#17 ← phi( main::@1/(byte) plex_sprite_msb#10 ) - (byte) plex_sprite_idx#16 ← phi( main::@1/(byte) plex_sprite_idx#9 ) - (byte) plex_show_idx#16 ← phi( main::@1/(byte) plex_show_idx#9 ) - (byte) plex_show_idx#5 ← (byte) plex_show_idx#16 - (byte) plex_sprite_idx#5 ← (byte) plex_sprite_idx#16 - (byte) plex_sprite_msb#6 ← (byte) plex_sprite_msb#17 - (byte) plex_free_next#5 ← (byte) plex_free_next#14 to:main::@return main::@return: scope:[main] from main::@2 - (byte) plex_free_next#15 ← phi( main::@2/(byte) plex_free_next#5 ) - (byte) plex_sprite_msb#18 ← phi( main::@2/(byte) plex_sprite_msb#6 ) - (byte) plex_sprite_idx#17 ← phi( main::@2/(byte) plex_sprite_idx#5 ) - (byte) plex_show_idx#17 ← phi( main::@2/(byte) plex_show_idx#5 ) (byte*) PLEX_SCREEN_PTR#11 ← phi( main::@2/(byte*) PLEX_SCREEN_PTR#18 ) (byte*) PLEX_SCREEN_PTR#4 ← (byte*) PLEX_SCREEN_PTR#11 - (byte) plex_show_idx#6 ← (byte) plex_show_idx#17 - (byte) plex_sprite_idx#6 ← (byte) plex_sprite_idx#17 - (byte) plex_sprite_msb#7 ← (byte) plex_sprite_msb#18 - (byte) plex_free_next#6 ← (byte) plex_free_next#15 return to:@return @@ -371,37 +288,21 @@ init::@return: scope:[init] from init::@3 (void()) loop() loop: scope:[loop] from main::@1 (byte*) PLEX_SCREEN_PTR#43 ← phi( main::@1/(byte*) PLEX_SCREEN_PTR#3 ) - (byte) plex_free_next#33 ← phi( main::@1/(byte) plex_free_next#24 ) - (byte) plex_sprite_msb#33 ← phi( main::@1/(byte) plex_sprite_msb#25 ) - (byte) plex_sprite_idx#34 ← phi( main::@1/(byte) plex_sprite_idx#28 ) - (byte) plex_show_idx#34 ← phi( main::@1/(byte) plex_show_idx#28 ) (byte) loop::sin_idx#0 ← (byte) 0 to:loop::@1 loop::@1: scope:[loop] from loop loop::@25 (byte*) PLEX_SCREEN_PTR#42 ← phi( loop/(byte*) PLEX_SCREEN_PTR#43 loop::@25/(byte*) PLEX_SCREEN_PTR#44 ) (byte) loop::sin_idx#6 ← phi( loop/(byte) loop::sin_idx#0 loop::@25/(byte) loop::sin_idx#7 ) - (byte) plex_free_next#28 ← phi( loop/(byte) plex_free_next#33 loop::@25/(byte) plex_free_next#34 ) - (byte) plex_sprite_msb#28 ← phi( loop/(byte) plex_sprite_msb#33 loop::@25/(byte) plex_sprite_msb#34 ) - (byte) plex_sprite_idx#30 ← phi( loop/(byte) plex_sprite_idx#34 loop::@25/(byte) plex_sprite_idx#35 ) - (byte) plex_show_idx#30 ← phi( loop/(byte) plex_show_idx#34 loop::@25/(byte) plex_show_idx#35 ) if(true) goto loop::@4 to:loop::@return loop::@4: scope:[loop] from loop::@1 loop::@4 (byte*) PLEX_SCREEN_PTR#41 ← phi( loop::@1/(byte*) PLEX_SCREEN_PTR#42 loop::@4/(byte*) PLEX_SCREEN_PTR#41 ) - (byte) plex_free_next#43 ← phi( loop::@1/(byte) plex_free_next#28 loop::@4/(byte) plex_free_next#43 ) - (byte) plex_sprite_msb#43 ← phi( loop::@1/(byte) plex_sprite_msb#28 loop::@4/(byte) plex_sprite_msb#43 ) - (byte) plex_sprite_idx#43 ← phi( loop::@1/(byte) plex_sprite_idx#30 loop::@4/(byte) plex_sprite_idx#43 ) - (byte) plex_show_idx#43 ← phi( loop::@1/(byte) plex_show_idx#30 loop::@4/(byte) plex_show_idx#43 ) (byte) loop::sin_idx#4 ← phi( loop::@1/(byte) loop::sin_idx#6 loop::@4/(byte) loop::sin_idx#4 ) (bool~) loop::$0 ← *((const nomodify byte*) RASTER) != (number) $ff if((bool~) loop::$0) goto loop::@4 to:loop::@6 loop::@6: scope:[loop] from loop::@4 (byte*) PLEX_SCREEN_PTR#40 ← phi( loop::@4/(byte*) PLEX_SCREEN_PTR#41 ) - (byte) plex_free_next#40 ← phi( loop::@4/(byte) plex_free_next#43 ) - (byte) plex_sprite_msb#41 ← phi( loop::@4/(byte) plex_sprite_msb#43 ) - (byte) plex_sprite_idx#41 ← phi( loop::@4/(byte) plex_sprite_idx#43 ) - (byte) plex_show_idx#41 ← phi( loop::@4/(byte) plex_show_idx#43 ) (byte) loop::sin_idx#2 ← phi( loop::@4/(byte) loop::sin_idx#4 ) *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) (byte) loop::y_idx#0 ← (byte) loop::sin_idx#2 @@ -409,10 +310,6 @@ loop::@6: scope:[loop] from loop::@4 to:loop::@10 loop::@10: scope:[loop] from loop::@10 loop::@6 (byte*) PLEX_SCREEN_PTR#39 ← phi( loop::@10/(byte*) PLEX_SCREEN_PTR#39 loop::@6/(byte*) PLEX_SCREEN_PTR#40 ) - (byte) plex_free_next#35 ← phi( loop::@10/(byte) plex_free_next#35 loop::@6/(byte) plex_free_next#40 ) - (byte) plex_sprite_msb#35 ← phi( loop::@10/(byte) plex_sprite_msb#35 loop::@6/(byte) plex_sprite_msb#41 ) - (byte) plex_sprite_idx#36 ← phi( loop::@10/(byte) plex_sprite_idx#36 loop::@6/(byte) plex_sprite_idx#41 ) - (byte) plex_show_idx#36 ← phi( loop::@10/(byte) plex_show_idx#36 loop::@6/(byte) plex_show_idx#41 ) (byte) loop::sin_idx#5 ← phi( loop::@10/(byte) loop::sin_idx#5 loop::@6/(byte) loop::sin_idx#2 ) (byte) loop::sy#2 ← phi( loop::@10/(byte) loop::sy#1 loop::@6/(byte) loop::sy#0 ) (byte) loop::y_idx#2 ← phi( loop::@10/(byte) loop::y_idx#1 loop::@6/(byte) loop::y_idx#0 ) @@ -424,10 +321,6 @@ loop::@10: scope:[loop] from loop::@10 loop::@6 to:loop::@11 loop::@11: scope:[loop] from loop::@10 (byte*) PLEX_SCREEN_PTR#38 ← phi( loop::@10/(byte*) PLEX_SCREEN_PTR#39 ) - (byte) plex_free_next#25 ← phi( loop::@10/(byte) plex_free_next#35 ) - (byte) plex_sprite_msb#26 ← phi( loop::@10/(byte) plex_sprite_msb#35 ) - (byte) plex_sprite_idx#29 ← phi( loop::@10/(byte) plex_sprite_idx#36 ) - (byte) plex_show_idx#29 ← phi( loop::@10/(byte) plex_show_idx#36 ) (byte) loop::sin_idx#3 ← phi( loop::@10/(byte) loop::sin_idx#5 ) (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#3 + (number) 1 *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) @@ -436,23 +329,11 @@ loop::@11: scope:[loop] from loop::@10 loop::@30: scope:[loop] from loop::@11 (byte) loop::sin_idx#17 ← phi( loop::@11/(byte) loop::sin_idx#1 ) (byte*) PLEX_SCREEN_PTR#37 ← phi( loop::@11/(byte*) PLEX_SCREEN_PTR#38 ) - (byte) plex_free_next#16 ← phi( loop::@11/(byte) plex_free_next#1 ) - (byte) plex_sprite_msb#19 ← phi( loop::@11/(byte) plex_sprite_msb#2 ) - (byte) plex_sprite_idx#18 ← phi( loop::@11/(byte) plex_sprite_idx#2 ) - (byte) plex_show_idx#18 ← phi( loop::@11/(byte) plex_show_idx#2 ) - (byte) plex_show_idx#7 ← (byte) plex_show_idx#18 - (byte) plex_sprite_idx#7 ← (byte) plex_sprite_idx#18 - (byte) plex_sprite_msb#8 ← (byte) plex_sprite_msb#19 - (byte) plex_free_next#7 ← (byte) plex_free_next#16 *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@12 loop::@12: scope:[loop] from loop::@12 loop::@30 (byte) loop::sin_idx#16 ← phi( loop::@12/(byte) loop::sin_idx#16 loop::@30/(byte) loop::sin_idx#17 ) (byte*) PLEX_SCREEN_PTR#36 ← phi( loop::@12/(byte*) PLEX_SCREEN_PTR#36 loop::@30/(byte*) PLEX_SCREEN_PTR#37 ) - (byte) plex_sprite_msb#48 ← phi( loop::@12/(byte) plex_sprite_msb#48 loop::@30/(byte) plex_sprite_msb#8 ) - (byte) plex_show_idx#48 ← phi( loop::@12/(byte) plex_show_idx#48 loop::@30/(byte) plex_show_idx#7 ) - (byte) plex_sprite_idx#48 ← phi( loop::@12/(byte) plex_sprite_idx#48 loop::@30/(byte) plex_sprite_idx#7 ) - (byte) plex_free_next#41 ← phi( loop::@12/(byte) plex_free_next#41 loop::@30/(byte) plex_free_next#7 ) (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 (bool~) loop::$6 ← (byte~) loop::$5 != (number) 0 if((bool~) loop::$6) goto loop::@12 @@ -460,40 +341,24 @@ loop::@12: scope:[loop] from loop::@12 loop::@30 loop::@14: scope:[loop] from loop::@12 (byte) loop::sin_idx#15 ← phi( loop::@12/(byte) loop::sin_idx#16 ) (byte*) PLEX_SCREEN_PTR#34 ← phi( loop::@12/(byte*) PLEX_SCREEN_PTR#36 ) - (byte) plex_sprite_msb#47 ← phi( loop::@12/(byte) plex_sprite_msb#48 ) - (byte) plex_show_idx#47 ← phi( loop::@12/(byte) plex_show_idx#48 ) - (byte) plex_sprite_idx#47 ← phi( loop::@12/(byte) plex_sprite_idx#48 ) - (byte) plex_free_next#36 ← phi( loop::@12/(byte) plex_free_next#41 ) (byte) loop::ss#0 ← (byte) 0 to:loop::@18 loop::@18: scope:[loop] from loop::@14 loop::@31 (byte) loop::sin_idx#14 ← phi( loop::@14/(byte) loop::sin_idx#15 loop::@31/(byte) loop::sin_idx#8 ) (byte*) PLEX_SCREEN_PTR#33 ← phi( loop::@14/(byte*) PLEX_SCREEN_PTR#34 loop::@31/(byte*) PLEX_SCREEN_PTR#35 ) (byte) loop::ss#8 ← phi( loop::@14/(byte) loop::ss#0 loop::@31/(byte) loop::ss#1 ) - (byte) plex_sprite_msb#46 ← phi( loop::@14/(byte) plex_sprite_msb#47 loop::@31/(byte) plex_sprite_msb#9 ) - (byte) plex_show_idx#46 ← phi( loop::@14/(byte) plex_show_idx#47 loop::@31/(byte) plex_show_idx#8 ) - (byte) plex_sprite_idx#46 ← phi( loop::@14/(byte) plex_sprite_idx#47 loop::@31/(byte) plex_sprite_idx#8 ) - (byte) plex_free_next#26 ← phi( loop::@14/(byte) plex_free_next#36 loop::@31/(byte) plex_free_next#8 ) *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@18 (byte) loop::sin_idx#13 ← phi( loop::@18/(byte) loop::sin_idx#14 ) (byte*) PLEX_SCREEN_PTR#32 ← phi( loop::@18/(byte*) PLEX_SCREEN_PTR#33 ) (byte) loop::ss#7 ← phi( loop::@18/(byte) loop::ss#8 ) - (byte) plex_sprite_msb#45 ← phi( loop::@18/(byte) plex_sprite_msb#46 ) - (byte) plex_show_idx#45 ← phi( loop::@18/(byte) plex_show_idx#46 ) - (byte) plex_sprite_idx#45 ← phi( loop::@18/(byte) plex_sprite_idx#46 ) - (byte) plex_free_next#17 ← phi( loop::@18/(byte) plex_free_next#26 ) - (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) + (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) to:loop::plexFreeNextYpos1_@return loop::plexFreeNextYpos1_@return: scope:[loop] from loop::plexFreeNextYpos1 (byte) loop::sin_idx#12 ← phi( loop::plexFreeNextYpos1/(byte) loop::sin_idx#13 ) (byte*) PLEX_SCREEN_PTR#31 ← phi( loop::plexFreeNextYpos1/(byte*) PLEX_SCREEN_PTR#32 ) (byte) loop::ss#6 ← phi( loop::plexFreeNextYpos1/(byte) loop::ss#7 ) - (byte) plex_sprite_msb#44 ← phi( loop::plexFreeNextYpos1/(byte) plex_sprite_msb#45 ) - (byte) plex_free_next#44 ← phi( loop::plexFreeNextYpos1/(byte) plex_free_next#17 ) - (byte) plex_show_idx#44 ← phi( loop::plexFreeNextYpos1/(byte) plex_show_idx#45 ) - (byte) plex_sprite_idx#44 ← phi( loop::plexFreeNextYpos1/(byte) plex_sprite_idx#45 ) (byte) loop::plexFreeNextYpos1_return#2 ← phi( loop::plexFreeNextYpos1/(byte) loop::plexFreeNextYpos1_return#0 ) (byte) loop::plexFreeNextYpos1_return#1 ← (byte) loop::plexFreeNextYpos1_return#2 to:loop::@29 @@ -501,10 +366,6 @@ loop::@29: scope:[loop] from loop::plexFreeNextYpos1_@return (byte) loop::sin_idx#11 ← phi( loop::plexFreeNextYpos1_@return/(byte) loop::sin_idx#12 ) (byte*) PLEX_SCREEN_PTR#30 ← phi( loop::plexFreeNextYpos1_@return/(byte*) PLEX_SCREEN_PTR#31 ) (byte) loop::ss#5 ← phi( loop::plexFreeNextYpos1_@return/(byte) loop::ss#6 ) - (byte) plex_sprite_msb#42 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_sprite_msb#44 ) - (byte) plex_free_next#42 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_free_next#44 ) - (byte) plex_show_idx#42 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_show_idx#44 ) - (byte) plex_sprite_idx#42 ← phi( loop::plexFreeNextYpos1_@return/(byte) plex_sprite_idx#44 ) (byte) loop::plexFreeNextYpos1_return#3 ← phi( loop::plexFreeNextYpos1_@return/(byte) loop::plexFreeNextYpos1_return#1 ) (byte~) loop::$7 ← (byte) loop::plexFreeNextYpos1_return#3 (byte) loop::rasterY#0 ← (byte~) loop::$7 @@ -513,10 +374,6 @@ loop::@19: scope:[loop] from loop::@19 loop::@29 (byte) loop::sin_idx#10 ← phi( loop::@19/(byte) loop::sin_idx#10 loop::@29/(byte) loop::sin_idx#11 ) (byte*) PLEX_SCREEN_PTR#29 ← phi( loop::@19/(byte*) PLEX_SCREEN_PTR#29 loop::@29/(byte*) PLEX_SCREEN_PTR#30 ) (byte) loop::ss#4 ← phi( loop::@19/(byte) loop::ss#4 loop::@29/(byte) loop::ss#5 ) - (byte) plex_sprite_msb#36 ← phi( loop::@19/(byte) plex_sprite_msb#36 loop::@29/(byte) plex_sprite_msb#42 ) - (byte) plex_free_next#37 ← phi( loop::@19/(byte) plex_free_next#37 loop::@29/(byte) plex_free_next#42 ) - (byte) plex_show_idx#37 ← phi( loop::@19/(byte) plex_show_idx#37 loop::@29/(byte) plex_show_idx#42 ) - (byte) plex_sprite_idx#37 ← phi( loop::@19/(byte) plex_sprite_idx#37 loop::@29/(byte) plex_sprite_idx#42 ) (byte) loop::rasterY#1 ← phi( loop::@19/(byte) loop::rasterY#1 loop::@29/(byte) loop::rasterY#0 ) (bool~) loop::$8 ← *((const nomodify byte*) RASTER) < (byte) loop::rasterY#1 if((bool~) loop::$8) goto loop::@19 @@ -525,10 +382,6 @@ loop::@21: scope:[loop] from loop::@19 (byte) loop::sin_idx#9 ← phi( loop::@19/(byte) loop::sin_idx#10 ) (byte*) PLEX_SCREEN_PTR#26 ← phi( loop::@19/(byte*) PLEX_SCREEN_PTR#29 ) (byte) loop::ss#3 ← phi( loop::@19/(byte) loop::ss#4 ) - (byte) plex_sprite_msb#27 ← phi( loop::@19/(byte) plex_sprite_msb#36 ) - (byte) plex_free_next#27 ← phi( loop::@19/(byte) plex_free_next#37 ) - (byte) plex_show_idx#23 ← phi( loop::@19/(byte) plex_show_idx#37 ) - (byte) plex_sprite_idx#23 ← phi( loop::@19/(byte) plex_sprite_idx#37 ) *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) call plexShowSprite to:loop::@31 @@ -536,14 +389,6 @@ loop::@31: scope:[loop] from loop::@21 (byte*) PLEX_SCREEN_PTR#35 ← phi( loop::@21/(byte*) PLEX_SCREEN_PTR#26 ) (byte) loop::sin_idx#8 ← phi( loop::@21/(byte) loop::sin_idx#9 ) (byte) loop::ss#2 ← phi( loop::@21/(byte) loop::ss#3 ) - (byte) plex_sprite_msb#20 ← phi( loop::@21/(byte) plex_sprite_msb#5 ) - (byte) plex_show_idx#19 ← phi( loop::@21/(byte) plex_show_idx#4 ) - (byte) plex_sprite_idx#19 ← phi( loop::@21/(byte) plex_sprite_idx#4 ) - (byte) plex_free_next#18 ← phi( loop::@21/(byte) plex_free_next#3 ) - (byte) plex_free_next#8 ← (byte) plex_free_next#18 - (byte) plex_sprite_idx#8 ← (byte) plex_sprite_idx#19 - (byte) plex_show_idx#8 ← (byte) plex_show_idx#19 - (byte) plex_sprite_msb#9 ← (byte) plex_sprite_msb#20 (byte) loop::ss#1 ← (byte) loop::ss#2 + rangenext(0,PLEX_COUNT-1) (bool~) loop::$11 ← (byte) loop::ss#1 != rangelast(0,PLEX_COUNT-1) if((bool~) loop::$11) goto loop::@18 @@ -551,42 +396,18 @@ loop::@31: scope:[loop] from loop::@21 loop::@25: scope:[loop] from loop::@31 (byte*) PLEX_SCREEN_PTR#44 ← phi( loop::@31/(byte*) PLEX_SCREEN_PTR#35 ) (byte) loop::sin_idx#7 ← phi( loop::@31/(byte) loop::sin_idx#8 ) - (byte) plex_free_next#34 ← phi( loop::@31/(byte) plex_free_next#8 ) - (byte) plex_sprite_msb#34 ← phi( loop::@31/(byte) plex_sprite_msb#9 ) - (byte) plex_sprite_idx#35 ← phi( loop::@31/(byte) plex_sprite_idx#8 ) - (byte) plex_show_idx#35 ← phi( loop::@31/(byte) plex_show_idx#8 ) *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@1 loop::@return: scope:[loop] from loop::@1 - (byte) plex_free_next#19 ← phi( loop::@1/(byte) plex_free_next#28 ) - (byte) plex_sprite_msb#21 ← phi( loop::@1/(byte) plex_sprite_msb#28 ) - (byte) plex_sprite_idx#20 ← phi( loop::@1/(byte) plex_sprite_idx#30 ) - (byte) plex_show_idx#20 ← phi( loop::@1/(byte) plex_show_idx#30 ) - (byte) plex_show_idx#9 ← (byte) plex_show_idx#20 - (byte) plex_sprite_idx#9 ← (byte) plex_sprite_idx#20 - (byte) plex_sprite_msb#10 ← (byte) plex_sprite_msb#21 - (byte) plex_free_next#9 ← (byte) plex_free_next#19 return to:@return @15: scope:[] from @12 - (byte) plex_free_next#29 ← phi( @12/(byte) plex_free_next#38 ) - (byte) plex_sprite_msb#29 ← phi( @12/(byte) plex_sprite_msb#37 ) - (byte) plex_sprite_idx#31 ← phi( @12/(byte) plex_sprite_idx#38 ) - (byte) plex_show_idx#31 ← phi( @12/(byte) plex_show_idx#38 ) (byte*) PLEX_SCREEN_PTR#21 ← phi( @12/(byte*) PLEX_SCREEN_PTR#25 ) call main to:@16 @16: scope:[] from @15 - (byte) plex_free_next#20 ← phi( @15/(byte) plex_free_next#6 ) - (byte) plex_sprite_msb#22 ← phi( @15/(byte) plex_sprite_msb#7 ) - (byte) plex_sprite_idx#21 ← phi( @15/(byte) plex_sprite_idx#6 ) - (byte) plex_show_idx#21 ← phi( @15/(byte) plex_show_idx#6 ) (byte*) PLEX_SCREEN_PTR#14 ← phi( @15/(byte*) PLEX_SCREEN_PTR#4 ) (byte*) PLEX_SCREEN_PTR#7 ← (byte*) PLEX_SCREEN_PTR#14 - (byte) plex_show_idx#10 ← (byte) plex_show_idx#21 - (byte) plex_sprite_idx#10 ← (byte) plex_sprite_idx#21 - (byte) plex_sprite_msb#11 ← (byte) plex_sprite_msb#22 - (byte) plex_free_next#10 ← (byte) plex_free_next#20 to:@end @end: scope:[] from @16 @@ -866,202 +687,10 @@ SYMBOL TABLE SSA (byte) plexSort::s#2 (byte) plexSort::s#3 (byte) plexSort::s#4 -(byte) plex_free_next -(byte) plex_free_next#0 -(byte) plex_free_next#1 -(byte) plex_free_next#10 -(byte) plex_free_next#11 -(byte) plex_free_next#12 -(byte) plex_free_next#13 -(byte) plex_free_next#14 -(byte) plex_free_next#15 -(byte) plex_free_next#16 -(byte) plex_free_next#17 -(byte) plex_free_next#18 -(byte) plex_free_next#19 -(byte) plex_free_next#2 -(byte) plex_free_next#20 -(byte) plex_free_next#21 -(byte) plex_free_next#22 -(byte) plex_free_next#23 -(byte) plex_free_next#24 -(byte) plex_free_next#25 -(byte) plex_free_next#26 -(byte) plex_free_next#27 -(byte) plex_free_next#28 -(byte) plex_free_next#29 -(byte) plex_free_next#3 -(byte) plex_free_next#30 -(byte) plex_free_next#31 -(byte) plex_free_next#32 -(byte) plex_free_next#33 -(byte) plex_free_next#34 -(byte) plex_free_next#35 -(byte) plex_free_next#36 -(byte) plex_free_next#37 -(byte) plex_free_next#38 -(byte) plex_free_next#39 -(byte) plex_free_next#4 -(byte) plex_free_next#40 -(byte) plex_free_next#41 -(byte) plex_free_next#42 -(byte) plex_free_next#43 -(byte) plex_free_next#44 -(byte) plex_free_next#5 -(byte) plex_free_next#6 -(byte) plex_free_next#7 -(byte) plex_free_next#8 -(byte) plex_free_next#9 -(byte) plex_show_idx -(byte) plex_show_idx#0 -(byte) plex_show_idx#1 -(byte) plex_show_idx#10 -(byte) plex_show_idx#11 -(byte) plex_show_idx#12 -(byte) plex_show_idx#13 -(byte) plex_show_idx#14 -(byte) plex_show_idx#15 -(byte) plex_show_idx#16 -(byte) plex_show_idx#17 -(byte) plex_show_idx#18 -(byte) plex_show_idx#19 -(byte) plex_show_idx#2 -(byte) plex_show_idx#20 -(byte) plex_show_idx#21 -(byte) plex_show_idx#22 -(byte) plex_show_idx#23 -(byte) plex_show_idx#24 -(byte) plex_show_idx#25 -(byte) plex_show_idx#26 -(byte) plex_show_idx#27 -(byte) plex_show_idx#28 -(byte) plex_show_idx#29 -(byte) plex_show_idx#3 -(byte) plex_show_idx#30 -(byte) plex_show_idx#31 -(byte) plex_show_idx#32 -(byte) plex_show_idx#33 -(byte) plex_show_idx#34 -(byte) plex_show_idx#35 -(byte) plex_show_idx#36 -(byte) plex_show_idx#37 -(byte) plex_show_idx#38 -(byte) plex_show_idx#39 -(byte) plex_show_idx#4 -(byte) plex_show_idx#40 -(byte) plex_show_idx#41 -(byte) plex_show_idx#42 -(byte) plex_show_idx#43 -(byte) plex_show_idx#44 -(byte) plex_show_idx#45 -(byte) plex_show_idx#46 -(byte) plex_show_idx#47 -(byte) plex_show_idx#48 -(byte) plex_show_idx#5 -(byte) plex_show_idx#6 -(byte) plex_show_idx#7 -(byte) plex_show_idx#8 -(byte) plex_show_idx#9 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#0 -(byte) plex_sprite_idx#1 -(byte) plex_sprite_idx#10 -(byte) plex_sprite_idx#11 -(byte) plex_sprite_idx#12 -(byte) plex_sprite_idx#13 -(byte) plex_sprite_idx#14 -(byte) plex_sprite_idx#15 -(byte) plex_sprite_idx#16 -(byte) plex_sprite_idx#17 -(byte) plex_sprite_idx#18 -(byte) plex_sprite_idx#19 -(byte) plex_sprite_idx#2 -(byte) plex_sprite_idx#20 -(byte) plex_sprite_idx#21 -(byte) plex_sprite_idx#22 -(byte) plex_sprite_idx#23 -(byte) plex_sprite_idx#24 -(byte) plex_sprite_idx#25 -(byte) plex_sprite_idx#26 -(byte) plex_sprite_idx#27 -(byte) plex_sprite_idx#28 -(byte) plex_sprite_idx#29 -(byte) plex_sprite_idx#3 -(byte) plex_sprite_idx#30 -(byte) plex_sprite_idx#31 -(byte) plex_sprite_idx#32 -(byte) plex_sprite_idx#33 -(byte) plex_sprite_idx#34 -(byte) plex_sprite_idx#35 -(byte) plex_sprite_idx#36 -(byte) plex_sprite_idx#37 -(byte) plex_sprite_idx#38 -(byte) plex_sprite_idx#39 -(byte) plex_sprite_idx#4 -(byte) plex_sprite_idx#40 -(byte) plex_sprite_idx#41 -(byte) plex_sprite_idx#42 -(byte) plex_sprite_idx#43 -(byte) plex_sprite_idx#44 -(byte) plex_sprite_idx#45 -(byte) plex_sprite_idx#46 -(byte) plex_sprite_idx#47 -(byte) plex_sprite_idx#48 -(byte) plex_sprite_idx#5 -(byte) plex_sprite_idx#6 -(byte) plex_sprite_idx#7 -(byte) plex_sprite_idx#8 -(byte) plex_sprite_idx#9 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#0 -(byte) plex_sprite_msb#1 -(byte) plex_sprite_msb#10 -(byte) plex_sprite_msb#11 -(byte) plex_sprite_msb#12 -(byte) plex_sprite_msb#13 -(byte) plex_sprite_msb#14 -(byte) plex_sprite_msb#15 -(byte) plex_sprite_msb#16 -(byte) plex_sprite_msb#17 -(byte) plex_sprite_msb#18 -(byte) plex_sprite_msb#19 -(byte) plex_sprite_msb#2 -(byte) plex_sprite_msb#20 -(byte) plex_sprite_msb#21 -(byte) plex_sprite_msb#22 -(byte) plex_sprite_msb#23 -(byte) plex_sprite_msb#24 -(byte) plex_sprite_msb#25 -(byte) plex_sprite_msb#26 -(byte) plex_sprite_msb#27 -(byte) plex_sprite_msb#28 -(byte) plex_sprite_msb#29 -(byte) plex_sprite_msb#3 -(byte) plex_sprite_msb#30 -(byte) plex_sprite_msb#31 -(byte) plex_sprite_msb#32 -(byte) plex_sprite_msb#33 -(byte) plex_sprite_msb#34 -(byte) plex_sprite_msb#35 -(byte) plex_sprite_msb#36 -(byte) plex_sprite_msb#37 -(byte) plex_sprite_msb#38 -(byte) plex_sprite_msb#39 -(byte) plex_sprite_msb#4 -(byte) plex_sprite_msb#40 -(byte) plex_sprite_msb#41 -(byte) plex_sprite_msb#42 -(byte) plex_sprite_msb#43 -(byte) plex_sprite_msb#44 -(byte) plex_sprite_msb#45 -(byte) plex_sprite_msb#46 -(byte) plex_sprite_msb#47 -(byte) plex_sprite_msb#48 -(byte) plex_sprite_msb#5 -(byte) plex_sprite_msb#6 -(byte) plex_sprite_msb#7 -(byte) plex_sprite_msb#8 -(byte) plex_sprite_msb#9 +(volatile byte) plex_free_next loadstore +(volatile byte) plex_show_idx loadstore +(volatile byte) plex_sprite_idx loadstore +(volatile byte) plex_sprite_msb loadstore Adding number conversion cast (unumber) $3f8 in (byte*~) plexInit::plexSetScreen1_$0 ← (byte*) plexInit::plexSetScreen1_screen#1 + (number) $3f8 Adding number conversion cast (unumber) 1 in (byte) plexInit::i#1 ← (byte) plexInit::i#2 + rangenext(0,PLEX_COUNT-1) @@ -1071,29 +700,29 @@ Adding number conversion cast (unumber) 2 in (byte) plexSort::m#1 ← (byte) ple Adding number conversion cast (unumber) 1 in (number~) plexSort::$4 ← (byte) plexSort::s#3 + (number) 1 Adding number conversion cast (unumber) plexSort::$4 in (number~) plexSort::$4 ← (byte) plexSort::s#3 + (unumber)(number) 1 Adding number conversion cast (unumber) $ff in (bool~) plexSort::$5 ← (byte) plexSort::s#1 != (number) $ff -Adding number conversion cast (unumber) 0 in (byte) plex_show_idx#1 ← (number) 0 -Adding number conversion cast (unumber) 0 in (byte) plex_sprite_idx#1 ← (number) 0 -Adding number conversion cast (unumber) 1 in (byte) plex_sprite_msb#1 ← (number) 1 +Adding number conversion cast (unumber) 0 in (volatile byte) plex_show_idx ← (number) 0 +Adding number conversion cast (unumber) 0 in (volatile byte) plex_sprite_idx ← (number) 0 +Adding number conversion cast (unumber) 1 in (volatile byte) plex_sprite_msb ← (number) 1 Adding number conversion cast (unumber) 0 in *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (number) 0 -Adding number conversion cast (unumber) 0 in (byte) plex_free_next#0 ← (number) 0 -Adding number conversion cast (unumber) 2 in (number~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (number) 2 -Adding number conversion cast (unumber) plexShowSprite::$0 in (number~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (unumber)(number) 2 +Adding number conversion cast (unumber) 0 in (volatile byte) plex_free_next ← (number) 0 +Adding number conversion cast (unumber) 2 in (number~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (number) 2 +Adding number conversion cast (unumber) plexShowSprite::$0 in (number~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (unumber)(number) 2 Adding number conversion cast (unumber) $15 in (number~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (number) $15 Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$0 in (number~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (unumber)(number) $15 -Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (number) 1 -Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (unumber)(number) 1 +Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (number) 1 +Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$1 in (number~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (unumber)(number) 1 Adding number conversion cast (unumber) 7 in (number~) plexShowSprite::plexFreeAdd1_$2 ← (unumber~) plexShowSprite::plexFreeAdd1_$1 & (number) 7 Adding number conversion cast (unumber) plexShowSprite::plexFreeAdd1_$2 in (number~) plexShowSprite::plexFreeAdd1_$2 ← (unumber~) plexShowSprite::plexFreeAdd1_$1 & (unumber)(number) 7 Adding number conversion cast (unumber) 0 in (bool~) plexShowSprite::$4 ← (byte~) plexShowSprite::$3 != (number) 0 -Adding number conversion cast (unumber) $ff in (number~) plexShowSprite::$9 ← (number) $ff ^ (byte) plex_sprite_msb#14 -Adding number conversion cast (unumber) plexShowSprite::$9 in (number~) plexShowSprite::$9 ← (unumber)(number) $ff ^ (byte) plex_sprite_msb#14 -Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (number) 1 -Adding number conversion cast (unumber) plexShowSprite::$5 in (number~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (unumber)(number) 1 +Adding number conversion cast (unumber) $ff in (number~) plexShowSprite::$9 ← (number) $ff ^ (volatile byte) plex_sprite_msb +Adding number conversion cast (unumber) plexShowSprite::$9 in (number~) plexShowSprite::$9 ← (unumber)(number) $ff ^ (volatile byte) plex_sprite_msb +Adding number conversion cast (unumber) 1 in (number~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (number) 1 +Adding number conversion cast (unumber) plexShowSprite::$5 in (number~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (unumber)(number) 1 Adding number conversion cast (unumber) 7 in (number~) plexShowSprite::$6 ← (unumber~) plexShowSprite::$5 & (number) 7 Adding number conversion cast (unumber) plexShowSprite::$6 in (number~) plexShowSprite::$6 ← (unumber~) plexShowSprite::$5 & (unumber)(number) 7 -Adding number conversion cast (unumber) 2 in (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#15 * (number) 2 -Adding number conversion cast (unumber) 0 in (bool~) plexShowSprite::$7 ← (byte) plex_sprite_msb#3 == (number) 0 -Adding number conversion cast (unumber) 1 in (byte) plex_sprite_msb#4 ← (number) 1 +Adding number conversion cast (unumber) 1 in (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (number) 1 +Adding number conversion cast (unumber) 0 in (bool~) plexShowSprite::$7 ← (volatile byte) plex_sprite_msb == (number) 0 +Adding number conversion cast (unumber) 1 in (volatile byte) plex_sprite_msb ← (number) 1 Adding number conversion cast (unumber) VIC_DEN|VIC_RSEL|3 in *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) 3 in *((const nomodify byte*) D011) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(number) 3 Adding number conversion cast (unumber) $40 in (byte*~) init::$1 ← (const byte*) SPRITE / (number) $40 @@ -1107,12 +736,12 @@ Adding number conversion cast (unumber) 1 in (byte) loop::sin_idx#1 ← (byte) l Adding number conversion cast (unumber) 0 in (bool~) loop::$6 ← (byte~) loop::$5 != (number) 0 Adding number conversion cast (unumber) 1 in (byte) loop::ss#1 ← (byte) loop::ss#2 + rangenext(0,PLEX_COUNT-1) Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast (byte) plex_show_idx#1 ← (unumber)(number) 0 -Inlining cast (byte) plex_sprite_idx#1 ← (unumber)(number) 0 -Inlining cast (byte) plex_sprite_msb#1 ← (unumber)(number) 1 +Inlining cast (volatile byte) plex_show_idx ← (unumber)(number) 0 +Inlining cast (volatile byte) plex_sprite_idx ← (unumber)(number) 0 +Inlining cast (volatile byte) plex_sprite_msb ← (unumber)(number) 1 Inlining cast *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (unumber)(number) 0 -Inlining cast (byte) plex_free_next#0 ← (unumber)(number) 0 -Inlining cast (byte) plex_sprite_msb#4 ← (unumber)(number) 1 +Inlining cast (volatile byte) plex_free_next ← (unumber)(number) 0 +Inlining cast (volatile byte) plex_sprite_msb ← (unumber)(number) 1 Inlining cast *((const nomodify byte*) D011) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 Inlining cast (byte~) init::$2 ← (byte)(byte*~) init::$1 Inlining cast *((const nomodify byte*) SPRITES_ENABLE) ← (unumber)(number) $ff @@ -1146,7 +775,7 @@ Simplifying constant integer cast 0 Simplifying constant integer cast $ff Simplifying constant integer cast 1 Simplifying constant integer cast 7 -Simplifying constant integer cast 2 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(unumber)(number) 3 @@ -1181,7 +810,7 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $ff Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 7 -Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 3 @@ -1198,16 +827,18 @@ Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) plexSort::$1 ← (byte) plexSort::m#2 + (byte) 1 Inferred type updated to byte in (unumber~) plexSort::$4 ← (byte) plexSort::s#3 + (byte) 1 -Inferred type updated to byte in (unumber~) plexShowSprite::$0 ← (byte) plex_sprite_idx#12 * (byte) 2 +Inferred type updated to byte in (unumber~) plexShowSprite::$0 ← (volatile byte) plex_sprite_idx * (byte) 2 Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#1 + (byte) $15 -Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#12 + (byte) 1 +Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 Inferred type updated to byte in (unumber~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -Inferred type updated to byte in (unumber~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#14 -Inferred type updated to byte in (unumber~) plexShowSprite::$5 ← (byte) plex_sprite_idx#14 + (byte) 1 +Inferred type updated to byte in (unumber~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb +Inferred type updated to byte in (unumber~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 Inferred type updated to byte in (unumber~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 Inversing boolean not [25] (bool~) plexSort::$3 ← (byte) plexSort::nxt_y#0 >= *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2)) from [24] (bool~) plexSort::$2 ← (byte) plexSort::nxt_y#0 < *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2)) -Inversing boolean not [96] (bool~) plexShowSprite::$8 ← (byte) plex_sprite_msb#3 != (byte) 0 from [95] (bool~) plexShowSprite::$7 ← (byte) plex_sprite_msb#3 == (byte) 0 +Inversing boolean not [86] (bool~) plexShowSprite::$8 ← (volatile byte) plex_sprite_msb != (byte) 0 from [85] (bool~) plexShowSprite::$7 ← (volatile byte) plex_sprite_msb == (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias plexInit::plexSetScreen1_screen#0 = plexInit::screen#1 plexInit::plexSetScreen1_screen#1 Alias PLEX_SCREEN_PTR#1 = plexInit::plexSetScreen1_$0 PLEX_SCREEN_PTR#22 Alias PLEX_SCREEN_PTR#15 = PLEX_SCREEN_PTR#8 PLEX_SCREEN_PTR#2 @@ -1217,175 +848,56 @@ Alias plexSort::nxt_idx#0 = plexSort::nxt_idx#3 Alias plexSort::s#1 = plexSort::s#4 Alias plexSort::nxt_idx#1 = plexSort::nxt_idx#2 Alias plexSort::m#5 = plexSort::m#6 -Alias plex_show_idx#1 = plex_show_idx#39 -Alias plex_sprite_idx#1 = plex_sprite_idx#39 -Alias plex_sprite_msb#1 = plex_sprite_msb#38 -Alias plex_show_idx#11 = plex_show_idx#22 plex_show_idx#32 plex_show_idx#2 -Alias plex_sprite_idx#11 = plex_sprite_idx#22 plex_sprite_idx#32 plex_sprite_idx#2 -Alias plex_sprite_msb#12 = plex_sprite_msb#23 plex_sprite_msb#30 plex_sprite_msb#2 -Alias plex_free_next#0 = plex_free_next#11 plex_free_next#1 Alias plexShowSprite::plex_sprite_idx2#0 = plexShowSprite::$0 plexShowSprite::plex_sprite_idx2#2 plexShowSprite::plex_sprite_idx2#1 Alias plexShowSprite::plexFreeAdd1_ypos#0 = plexShowSprite::ypos#0 plexShowSprite::plexFreeAdd1_ypos#1 -Alias plex_free_next#12 = plex_free_next#21 -Alias plex_show_idx#12 = plex_show_idx#24 plex_show_idx#13 plex_show_idx#25 plex_show_idx#26 Alias PLEX_SCREEN_PTR#16 = PLEX_SCREEN_PTR#23 PLEX_SCREEN_PTR#9 -Alias plex_sprite_idx#12 = plex_sprite_idx#24 plex_sprite_idx#13 plex_sprite_idx#25 plex_sprite_idx#26 -Alias plex_sprite_msb#13 = plex_sprite_msb#31 plex_sprite_msb#39 plex_sprite_msb#24 plex_sprite_msb#14 -Alias plex_free_next#2 = plexShowSprite::plexFreeAdd1_$2 plex_free_next#39 plex_free_next#30 plex_free_next#31 -Alias plex_sprite_idx#27 = plex_sprite_idx#3 plexShowSprite::$6 -Alias plex_free_next#22 = plex_free_next#23 -Alias plex_show_idx#27 = plex_show_idx#3 -Alias plex_free_next#13 = plex_free_next#3 -Alias plex_sprite_idx#15 = plex_sprite_idx#4 -Alias plex_show_idx#15 = plex_show_idx#4 -Alias plex_sprite_msb#16 = plex_sprite_msb#5 Alias PLEX_SCREEN_PTR#0 = PLEX_SCREEN_PTR#27 PLEX_SCREEN_PTR#25 PLEX_SCREEN_PTR#21 -Alias plex_show_idx#0 = plex_show_idx#40 plex_show_idx#38 plex_show_idx#31 -Alias plex_sprite_idx#0 = plex_sprite_idx#40 plex_sprite_idx#38 plex_sprite_idx#31 -Alias plex_sprite_msb#0 = plex_sprite_msb#40 plex_sprite_msb#37 plex_sprite_msb#29 -Alias plex_free_next#29 = plex_free_next#38 plex_free_next#4 -Alias plex_show_idx#28 = plex_show_idx#33 -Alias plex_sprite_idx#28 = plex_sprite_idx#33 -Alias plex_sprite_msb#25 = plex_sprite_msb#32 -Alias plex_free_next#24 = plex_free_next#32 Alias PLEX_SCREEN_PTR#10 = PLEX_SCREEN_PTR#3 PLEX_SCREEN_PTR#18 PLEX_SCREEN_PTR#11 PLEX_SCREEN_PTR#4 -Alias plex_show_idx#16 = plex_show_idx#5 plex_show_idx#17 plex_show_idx#6 -Alias plex_sprite_idx#16 = plex_sprite_idx#5 plex_sprite_idx#17 plex_sprite_idx#6 -Alias plex_sprite_msb#17 = plex_sprite_msb#6 plex_sprite_msb#18 plex_sprite_msb#7 -Alias plex_free_next#14 = plex_free_next#5 plex_free_next#15 plex_free_next#6 Alias PLEX_SCREEN_PTR#12 = PLEX_SCREEN_PTR#5 Alias PLEX_SCREEN_PTR#24 = PLEX_SCREEN_PTR#28 Alias PLEX_SCREEN_PTR#13 = PLEX_SCREEN_PTR#20 PLEX_SCREEN_PTR#6 Alias loop::sin_idx#2 = loop::sin_idx#4 loop::y_idx#0 -Alias plex_show_idx#41 = plex_show_idx#43 -Alias plex_sprite_idx#41 = plex_sprite_idx#43 -Alias plex_sprite_msb#41 = plex_sprite_msb#43 -Alias plex_free_next#40 = plex_free_next#43 Alias PLEX_SCREEN_PTR#40 = PLEX_SCREEN_PTR#41 Alias loop::sin_idx#3 = loop::sin_idx#5 -Alias plex_show_idx#29 = plex_show_idx#36 -Alias plex_sprite_idx#29 = plex_sprite_idx#36 -Alias plex_sprite_msb#26 = plex_sprite_msb#35 -Alias plex_free_next#25 = plex_free_next#35 Alias PLEX_SCREEN_PTR#37 = PLEX_SCREEN_PTR#38 PLEX_SCREEN_PTR#39 Alias loop::sin_idx#1 = loop::sin_idx#17 -Alias plex_show_idx#18 = plex_show_idx#7 -Alias plex_sprite_idx#18 = plex_sprite_idx#7 -Alias plex_sprite_msb#19 = plex_sprite_msb#8 -Alias plex_free_next#16 = plex_free_next#7 -Alias plex_free_next#36 = plex_free_next#41 -Alias plex_sprite_idx#47 = plex_sprite_idx#48 -Alias plex_show_idx#47 = plex_show_idx#48 -Alias plex_sprite_msb#47 = plex_sprite_msb#48 Alias PLEX_SCREEN_PTR#34 = PLEX_SCREEN_PTR#36 Alias loop::sin_idx#15 = loop::sin_idx#16 -Alias plex_free_next#17 = plex_free_next#26 plex_free_next#44 plex_free_next#42 -Alias plex_sprite_idx#42 = plex_sprite_idx#45 plex_sprite_idx#46 plex_sprite_idx#44 -Alias plex_show_idx#42 = plex_show_idx#45 plex_show_idx#46 plex_show_idx#44 -Alias plex_sprite_msb#42 = plex_sprite_msb#45 plex_sprite_msb#46 plex_sprite_msb#44 Alias loop::ss#5 = loop::ss#7 loop::ss#8 loop::ss#6 Alias PLEX_SCREEN_PTR#30 = PLEX_SCREEN_PTR#32 PLEX_SCREEN_PTR#33 PLEX_SCREEN_PTR#31 Alias loop::sin_idx#11 = loop::sin_idx#13 loop::sin_idx#14 loop::sin_idx#12 Alias loop::plexFreeNextYpos1_return#0 = loop::plexFreeNextYpos1_return#2 loop::plexFreeNextYpos1_return#1 loop::plexFreeNextYpos1_return#3 loop::$7 loop::rasterY#0 -Alias plex_sprite_idx#23 = plex_sprite_idx#37 -Alias plex_show_idx#23 = plex_show_idx#37 -Alias plex_free_next#27 = plex_free_next#37 -Alias plex_sprite_msb#27 = plex_sprite_msb#36 Alias loop::ss#2 = loop::ss#3 loop::ss#4 Alias PLEX_SCREEN_PTR#26 = PLEX_SCREEN_PTR#29 PLEX_SCREEN_PTR#35 PLEX_SCREEN_PTR#44 Alias loop::sin_idx#10 = loop::sin_idx#9 loop::sin_idx#8 loop::sin_idx#7 -Alias plex_free_next#18 = plex_free_next#8 plex_free_next#34 -Alias plex_sprite_idx#19 = plex_sprite_idx#8 plex_sprite_idx#35 -Alias plex_show_idx#19 = plex_show_idx#8 plex_show_idx#35 -Alias plex_sprite_msb#20 = plex_sprite_msb#9 plex_sprite_msb#34 -Alias plex_show_idx#20 = plex_show_idx#30 plex_show_idx#9 -Alias plex_sprite_idx#20 = plex_sprite_idx#30 plex_sprite_idx#9 -Alias plex_sprite_msb#10 = plex_sprite_msb#21 plex_sprite_msb#28 -Alias plex_free_next#19 = plex_free_next#28 plex_free_next#9 Alias PLEX_SCREEN_PTR#14 = PLEX_SCREEN_PTR#7 -Alias plex_show_idx#10 = plex_show_idx#21 -Alias plex_sprite_idx#10 = plex_sprite_idx#21 -Alias plex_sprite_msb#11 = plex_sprite_msb#22 -Alias plex_free_next#10 = plex_free_next#20 -Successful SSA optimization Pass2AliasElimination -Alias plex_sprite_idx#12 = plex_sprite_idx#14 -Alias plex_show_idx#12 = plex_show_idx#14 -Alias plex_sprite_msb#13 = plex_sprite_msb#15 -Alias plex_free_next#13 = plex_free_next#22 plex_free_next#2 -Alias plex_sprite_idx#15 = plex_sprite_idx#27 -Alias plex_show_idx#15 = plex_show_idx#27 Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Identical Phi Values (byte*) plexInit::plexSetScreen1_screen#0 (byte*) plexInit::screen#0 Identical Phi Values (byte*) PLEX_SCREEN_PTR#15 (byte*) PLEX_SCREEN_PTR#1 Identical Phi Values (byte) plexSort::nxt_y#1 (byte) plexSort::nxt_y#0 Identical Phi Values (byte) plexSort::nxt_idx#1 (byte) plexSort::nxt_idx#0 Identical Phi Values (byte) plexSort::m#5 (byte) plexSort::m#2 -Identical Phi Values (byte) plex_show_idx#11 (byte) plex_show_idx#1 -Identical Phi Values (byte) plex_sprite_idx#11 (byte) plex_sprite_idx#1 -Identical Phi Values (byte) plex_sprite_msb#12 (byte) plex_sprite_msb#1 -Identical Phi Values (byte) plex_sprite_idx#12 (byte) plex_sprite_idx#23 -Identical Phi Values (byte) plex_show_idx#12 (byte) plex_show_idx#23 -Identical Phi Values (byte) plex_free_next#12 (byte) plex_free_next#27 Identical Phi Values (byte*) PLEX_SCREEN_PTR#16 (byte*) PLEX_SCREEN_PTR#26 -Identical Phi Values (byte) plex_sprite_msb#13 (byte) plex_sprite_msb#27 Identical Phi Values (byte*) PLEX_SCREEN_PTR#17 (byte*) PLEX_SCREEN_PTR#0 -Identical Phi Values (byte) plex_show_idx#28 (byte) plex_show_idx#0 -Identical Phi Values (byte) plex_sprite_idx#28 (byte) plex_sprite_idx#0 -Identical Phi Values (byte) plex_sprite_msb#25 (byte) plex_sprite_msb#0 -Identical Phi Values (byte) plex_free_next#24 (byte) plex_free_next#29 Identical Phi Values (byte*) PLEX_SCREEN_PTR#10 (byte*) PLEX_SCREEN_PTR#13 -Identical Phi Values (byte) plex_show_idx#16 (byte) plex_show_idx#20 -Identical Phi Values (byte) plex_sprite_idx#16 (byte) plex_sprite_idx#20 -Identical Phi Values (byte) plex_sprite_msb#17 (byte) plex_sprite_msb#10 -Identical Phi Values (byte) plex_free_next#14 (byte) plex_free_next#19 Identical Phi Values (byte*) PLEX_SCREEN_PTR#19 (byte*) PLEX_SCREEN_PTR#17 Identical Phi Values (byte*) PLEX_SCREEN_PTR#12 (byte*) PLEX_SCREEN_PTR#15 Identical Phi Values (byte*) PLEX_SCREEN_PTR#24 (byte*) PLEX_SCREEN_PTR#12 Identical Phi Values (byte*) PLEX_SCREEN_PTR#13 (byte*) PLEX_SCREEN_PTR#24 -Identical Phi Values (byte) plex_show_idx#34 (byte) plex_show_idx#28 -Identical Phi Values (byte) plex_sprite_idx#34 (byte) plex_sprite_idx#28 -Identical Phi Values (byte) plex_sprite_msb#33 (byte) plex_sprite_msb#25 -Identical Phi Values (byte) plex_free_next#33 (byte) plex_free_next#24 Identical Phi Values (byte*) PLEX_SCREEN_PTR#43 (byte*) PLEX_SCREEN_PTR#10 Identical Phi Values (byte) loop::sin_idx#2 (byte) loop::sin_idx#6 -Identical Phi Values (byte) plex_show_idx#41 (byte) plex_show_idx#20 -Identical Phi Values (byte) plex_sprite_idx#41 (byte) plex_sprite_idx#20 -Identical Phi Values (byte) plex_sprite_msb#41 (byte) plex_sprite_msb#10 -Identical Phi Values (byte) plex_free_next#40 (byte) plex_free_next#19 Identical Phi Values (byte*) PLEX_SCREEN_PTR#40 (byte*) PLEX_SCREEN_PTR#42 Identical Phi Values (byte) loop::sin_idx#3 (byte) loop::sin_idx#2 -Identical Phi Values (byte) plex_show_idx#29 (byte) plex_show_idx#41 -Identical Phi Values (byte) plex_sprite_idx#29 (byte) plex_sprite_idx#41 -Identical Phi Values (byte) plex_sprite_msb#26 (byte) plex_sprite_msb#41 -Identical Phi Values (byte) plex_free_next#25 (byte) plex_free_next#40 Identical Phi Values (byte*) PLEX_SCREEN_PTR#37 (byte*) PLEX_SCREEN_PTR#40 -Identical Phi Values (byte) plex_show_idx#18 (byte) plex_show_idx#11 -Identical Phi Values (byte) plex_sprite_idx#18 (byte) plex_sprite_idx#11 -Identical Phi Values (byte) plex_sprite_msb#19 (byte) plex_sprite_msb#12 -Identical Phi Values (byte) plex_free_next#16 (byte) plex_free_next#0 -Identical Phi Values (byte) plex_free_next#36 (byte) plex_free_next#16 -Identical Phi Values (byte) plex_sprite_idx#47 (byte) plex_sprite_idx#18 -Identical Phi Values (byte) plex_show_idx#47 (byte) plex_show_idx#18 -Identical Phi Values (byte) plex_sprite_msb#47 (byte) plex_sprite_msb#19 Identical Phi Values (byte*) PLEX_SCREEN_PTR#34 (byte*) PLEX_SCREEN_PTR#37 Identical Phi Values (byte) loop::sin_idx#15 (byte) loop::sin_idx#1 Identical Phi Values (byte) loop::rasterY#1 (byte) loop::plexFreeNextYpos1_return#0 -Identical Phi Values (byte) plex_sprite_idx#23 (byte) plex_sprite_idx#42 -Identical Phi Values (byte) plex_show_idx#23 (byte) plex_show_idx#42 -Identical Phi Values (byte) plex_free_next#27 (byte) plex_free_next#17 -Identical Phi Values (byte) plex_sprite_msb#27 (byte) plex_sprite_msb#42 Identical Phi Values (byte) loop::ss#2 (byte) loop::ss#5 Identical Phi Values (byte*) PLEX_SCREEN_PTR#26 (byte*) PLEX_SCREEN_PTR#30 Identical Phi Values (byte) loop::sin_idx#10 (byte) loop::sin_idx#11 -Identical Phi Values (byte) plex_free_next#18 (byte) plex_free_next#13 -Identical Phi Values (byte) plex_sprite_idx#19 (byte) plex_sprite_idx#15 -Identical Phi Values (byte) plex_show_idx#19 (byte) plex_show_idx#15 -Identical Phi Values (byte) plex_sprite_msb#20 (byte) plex_sprite_msb#16 Identical Phi Values (byte*) PLEX_SCREEN_PTR#14 (byte*) PLEX_SCREEN_PTR#10 -Identical Phi Values (byte) plex_show_idx#10 (byte) plex_show_idx#16 -Identical Phi Values (byte) plex_sprite_idx#10 (byte) plex_sprite_idx#16 -Identical Phi Values (byte) plex_sprite_msb#11 (byte) plex_sprite_msb#17 -Identical Phi Values (byte) plex_free_next#10 (byte) plex_free_next#14 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte) plexSort::m#3 (byte) plexSort::m#2 Identical Phi Values (byte*) PLEX_SCREEN_PTR#30 (byte*) PLEX_SCREEN_PTR#42 @@ -1393,39 +905,30 @@ Identical Phi Values (byte) loop::sin_idx#11 (byte) loop::sin_idx#1 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) PLEX_SCREEN_PTR#42 (byte*) PLEX_SCREEN_PTR#1 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [80] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD +Identified duplicate assignment right side [73] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) plexInit::$1 [11] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 Simple Condition (bool~) plexSort::$3 [19] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 Simple Condition (bool~) plexSort::$8 [23] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [42] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 -Simple Condition (bool~) plexShowSprite::$4 [61] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -Simple Condition (bool~) plexShowSprite::$8 [70] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return +Simple Condition (bool~) plexShowSprite::$4 [62] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 +Simple Condition (bool~) plexShowSprite::$8 [72] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return Simple Condition (bool~) init::$3 [99] if((byte) init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 Simple Condition (bool~) init::$4 [106] if((byte) init::ss#1!=rangelast(0,7)) goto init::@3 Simple Condition (bool~) loop::$0 [114] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@4 Simple Condition (bool~) loop::$2 [122] if((byte) loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 -Simple Condition (bool~) loop::$6 [131] if((byte~) loop::$5!=(byte) 0) goto loop::@12 -Simple Condition (bool~) loop::$8 [138] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@19 -Simple Condition (bool~) loop::$11 [144] if((byte) loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 +Simple Condition (bool~) loop::$6 [130] if((byte~) loop::$5!=(byte) 0) goto loop::@12 +Simple Condition (bool~) loop::$8 [137] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@19 +Simple Condition (bool~) loop::$11 [142] if((byte) loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 Successful SSA optimization Pass2ConditionalJumpSimplification Rewriting && if()-condition to two if()s [30] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant right-side identified [91] (byte*~) init::$1 ← (const byte*) SPRITE / (byte) $40 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PLEX_SCREEN_PTR#0 = (byte*)$400+$3f8 -Constant (const byte) plex_show_idx#0 = 0 -Constant (const byte) plex_sprite_idx#0 = 0 -Constant (const byte) plex_sprite_msb#0 = 1 Constant (const byte) plexInit::i#0 = 0 Constant (const byte) plexSort::m#0 = 0 -Constant (const byte) plex_show_idx#1 = 0 -Constant (const byte) plex_sprite_idx#1 = 0 -Constant (const byte) plex_sprite_msb#1 = 1 Constant (const byte) plexSort::plexFreePrepare1_s#0 = 0 -Constant (const byte) plex_free_next#0 = 0 -Constant (const byte) plex_sprite_msb#4 = 1 -Constant (const byte) plex_free_next#29 = 0 Constant (const byte*) plexInit::screen#0 = SCREEN Constant (const word) init::xp#0 = $20 Constant (const byte) init::sx#0 = 0 @@ -1451,19 +954,10 @@ Resolved ranged next value [104] init::ss#1 ← ++ init::ss#2 to ++ Resolved ranged comparison value [106] if(init::ss#1!=rangelast(0,7)) goto init::@3 to (number) 8 Resolved ranged next value [120] loop::sy#1 ← ++ loop::sy#2 to ++ Resolved ranged comparison value [122] if(loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 to (const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [142] loop::ss#1 ← ++ loop::ss#5 to ++ -Resolved ranged comparison value [144] if(loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 to (const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1 -Eliminating unused variable - keeping the phi block (byte) plex_show_idx#20 -Eliminating unused variable - keeping the phi block (byte) plex_sprite_idx#20 -Eliminating unused variable - keeping the phi block (byte) plex_sprite_msb#10 -Eliminating unused variable - keeping the phi block (byte) plex_free_next#19 +Resolved ranged next value [140] loop::ss#1 ← ++ loop::ss#5 to ++ +Resolved ranged comparison value [142] if(loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 to (const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1 Eliminating unused constant (const byte*) PLEX_SCREEN_PTR#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) plex_show_idx#0 -Eliminating unused constant (const byte) plex_sprite_idx#0 -Eliminating unused constant (const byte) plex_sprite_msb#0 -Eliminating unused constant (const byte) plex_free_next#29 -Successful SSA optimization PassNEliminateUnusedVars Removing unused block loop::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) PLEX_COUNT-1+1 in if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(number) 1) goto plexInit::@1 @@ -1500,21 +994,26 @@ Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias plexShowSprite::$11 = plexShowSprite::$10 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) plexSort::$5 [19] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 -Simple Condition (bool~) plexSort::$6 [95] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 +Simple Condition (bool~) plexSort::$5 [22] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 +Simple Condition (bool~) plexSort::$6 [105] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [19] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 +Negating conditional jump and destination [22] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [0] (byte*) PLEX_SCREEN_PTR#1 ← (const byte*) plexInit::screen#0 + (word) $3f8 +Constant right-side identified [3] (byte*) PLEX_SCREEN_PTR#1 ← (const byte*) plexInit::screen#0 + (word) $3f8 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PLEX_SCREEN_PTR#1 = plexInit::screen#0+$3f8 Successful SSA optimization Pass2ConstantIdentification -Rewriting multiplication to use shift [24] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 * (byte) 2 -Rewriting multiplication to use shift [33] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [44] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 * (byte) 2 -Rewriting multiplication to use shift [57] (byte~) init::$5 ← (byte) init::sx#2 * (const byte) SIZEOF_WORD +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 +Rewriting multiplication to use shift [31] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx * (byte) 2 +Rewriting multiplication to use shift [41] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [67] (byte~) init::$5 ← (byte) init::sx#2 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) plexInit::i#0 Inlining constant with var siblings (const byte) plexSort::m#0 @@ -1525,12 +1024,11 @@ Inlining constant with var siblings (const byte) init::ss#0 Inlining constant with var siblings (const byte) loop::sin_idx#0 Inlining constant with var siblings (const byte) loop::sy#0 Inlining constant with var siblings (const byte) loop::ss#0 -Inlining constant with var siblings (const byte) plex_show_idx#1 -Inlining constant with var siblings (const byte) plex_sprite_idx#1 -Inlining constant with var siblings (const byte) plex_sprite_msb#1 -Inlining constant with var siblings (const byte) plex_free_next#0 -Inlining constant with var siblings (const byte) plex_sprite_msb#4 +Constant inlined plexInit::screen#0 = (const byte*) SCREEN Constant inlined init::xp#0 = (word) $20 +Constant inlined loop::sy#0 = (byte) 0 +Constant inlined loop::ss#0 = (byte) 0 +Constant inlined init::sx#0 = (byte) 0 Constant inlined plexSort::plexFreePrepare1_s#0 = (byte) 0 Constant inlined init::ss#0 = (byte) 0 Constant inlined plexInit::i#0 = (byte) 0 @@ -1538,36 +1036,30 @@ Constant inlined plexSort::m#0 = (byte) 0 Constant inlined init::$2 = (byte)(const byte*) SPRITE/(byte) $40 Constant inlined init::$1 = (const byte*) SPRITE/(byte) $40 Constant inlined loop::sin_idx#0 = (byte) 0 -Constant inlined plexInit::screen#0 = (const byte*) SCREEN -Constant inlined plex_sprite_msb#4 = (byte) 1 -Constant inlined plex_show_idx#1 = (byte) 0 -Constant inlined plex_sprite_idx#1 = (byte) 0 -Constant inlined plex_sprite_msb#1 = (byte) 1 -Constant inlined loop::sy#0 = (byte) 0 -Constant inlined plex_free_next#0 = (byte) 0 -Constant inlined loop::ss#0 = (byte) 0 -Constant inlined init::sx#0 = (byte) 0 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in assignment *(PLEX_SORTED_IDX+1 + plexSort::$1) Consolidated array index constant in assignment *(PLEX_SORTED_IDX+1 + plexSort::$4) Successful SSA optimization Pass2ConstantAdditionElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Alias plexSort::m#2 = plexSort::$1 Alias plexSort::s#3 = plexSort::$4 Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Eliminating unused constant (const byte) SIZEOF_WORD Successful SSA optimization PassNEliminateUnusedVars +Alias candidate removed (volatile)plex_free_next = plexShowSprite::plexFreeAdd1_$2 +Alias candidate removed (volatile)plex_sprite_idx = plexShowSprite::$6 Added new block during phi lifting plexInit::@4(between plexInit::@1 and plexInit::@1) Added new block during phi lifting plexSort::@9(between plexSort::@2 and plexSort::@1) Added new block during phi lifting plexSort::@10(between plexSort::@8 and plexSort::@3) Added new block during phi lifting plexSort::@11(between plexSort::plexFreePrepare1_@1 and plexSort::plexFreePrepare1_@1) -Added new block during phi lifting plexShowSprite::@8(between plexShowSprite::@2 and plexShowSprite::@return) Added new block during phi lifting init::@6(between init::@1 and init::@1) Added new block during phi lifting init::@7(between init::@3 and init::@3) Added new block during phi lifting loop::@32(between loop::@10 and loop::@10) Added new block during phi lifting loop::@33(between loop::@31 and loop::@18) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @4 -Adding NOP phi() at start of @9 Adding NOP phi() at start of @15 Adding NOP phi() at start of @16 Adding NOP phi() at start of @end @@ -1577,33 +1069,25 @@ Adding NOP phi() at start of loop Adding NOP phi() at start of loop::@14 Adding NOP phi() at start of loop::plexFreeNextYpos1_@return Adding NOP phi() at start of loop::@29 -Adding NOP phi() at start of plexShowSprite::@6 Adding NOP phi() at start of plexSort -Adding NOP phi() at start of plexSort::@6 Adding NOP phi() at start of plexSort::plexFreePrepare1 -Adding NOP phi() at start of plexSort::plexFreePrepare1_@2 Adding NOP phi() at start of init::@5 Adding NOP phi() at start of plexInit Adding NOP phi() at start of plexInit::plexSetScreen1 Adding NOP phi() at start of plexInit::@3 CALL GRAPH -Calls in [] to main:5 -Calls in [main] to init:9 loop:11 -Calls in [loop] to plexSort:26 plexShowSprite:38 +Calls in [] to main:7 +Calls in [main] to init:11 loop:13 +Calls in [loop] to plexSort:28 plexShowSprite:40 Calls in [init] to plexInit:103 -Created 16 initial phi equivalence classes -Not coalescing [18] loop::y_idx#4 ← loop::sin_idx#6 -Coalesced [42] loop::sin_idx#18 ← loop::sin_idx#1 -Coalesced [43] plex_free_next#45 ← plex_free_next#13 -Coalesced [44] plex_sprite_idx#49 ← plex_sprite_idx#15 -Coalesced [45] plex_show_idx#49 ← plex_show_idx#15 -Coalesced [46] plex_sprite_msb#50 ← plex_sprite_msb#16 -Coalesced [47] loop::ss#9 ← loop::ss#1 -Coalesced [48] loop::y_idx#3 ← loop::y_idx#1 -Coalesced [49] loop::sy#3 ← loop::sy#1 -Coalesced [74] plex_sprite_msb#49 ← plex_sprite_msb#3 -Not coalescing [81] plexSort::s#6 ← plexSort::m#2 +Created 11 initial phi equivalence classes +Not coalescing [20] loop::y_idx#4 ← loop::sin_idx#6 +Coalesced [44] loop::sin_idx#18 ← loop::sin_idx#1 +Coalesced [45] loop::ss#9 ← loop::ss#1 +Coalesced [46] loop::y_idx#3 ← loop::y_idx#1 +Coalesced [47] loop::sy#3 ← loop::sy#1 +Not coalescing [79] plexSort::s#6 ← plexSort::m#2 Coalesced [99] plexSort::plexFreePrepare1_s#3 ← plexSort::plexFreePrepare1_s#1 Coalesced [100] plexSort::m#7 ← plexSort::m#1 Coalesced [101] plexSort::s#5 ← plexSort::s#1 @@ -1611,9 +1095,7 @@ Coalesced [118] init::ss#3 ← init::ss#1 Coalesced [119] init::sx#3 ← init::sx#1 Coalesced [120] init::xp#3 ← init::xp#1 Coalesced [129] plexInit::i#3 ← plexInit::i#1 -Coalesced down to 15 phi equivalence classes -Culled Empty Block (label) @4 -Culled Empty Block (label) @9 +Coalesced down to 11 phi equivalence classes Culled Empty Block (label) @16 Culled Empty Block (label) main::@2 Culled Empty Block (label) loop::@14 @@ -1621,9 +1103,6 @@ Culled Empty Block (label) loop::plexFreeNextYpos1_@return Culled Empty Block (label) loop::@29 Culled Empty Block (label) loop::@33 Culled Empty Block (label) loop::@32 -Culled Empty Block (label) plexShowSprite::@6 -Culled Empty Block (label) plexSort::@6 -Culled Empty Block (label) plexSort::plexFreePrepare1_@2 Culled Empty Block (label) plexSort::@11 Culled Empty Block (label) plexSort::@9 Culled Empty Block (label) plexSort::@10 @@ -1632,12 +1111,14 @@ Culled Empty Block (label) init::@7 Culled Empty Block (label) init::@6 Culled Empty Block (label) plexInit::@3 Culled Empty Block (label) plexInit::@4 -Renumbering block @12 to @1 -Renumbering block @15 to @2 -Renumbering block plexSort::@8 to plexSort::@6 +Renumbering block @4 to @1 +Renumbering block @9 to @2 +Renumbering block @12 to @3 +Renumbering block @15 to @4 +Renumbering block plexSort::@8 to plexSort::@7 Renumbering block plexShowSprite::@4 to plexShowSprite::@3 -Renumbering block plexShowSprite::@7 to plexShowSprite::@4 -Renumbering block plexShowSprite::@8 to plexShowSprite::@5 +Renumbering block plexShowSprite::@6 to plexShowSprite::@4 +Renumbering block plexShowSprite::@7 to plexShowSprite::@5 Renumbering block loop::@4 to loop::@2 Renumbering block loop::@6 to loop::@3 Renumbering block loop::@10 to loop::@4 @@ -1650,11 +1131,10 @@ Renumbering block loop::@25 to loop::@10 Renumbering block loop::@30 to loop::@11 Renumbering block loop::@31 to loop::@12 Adding NOP phi() at start of @begin -Adding NOP phi() at start of @2 +Adding NOP phi() at start of @4 Adding NOP phi() at start of @end Adding NOP phi() at start of main::@1 Adding NOP phi() at start of loop -Adding NOP phi() at start of plexShowSprite::@5 Adding NOP phi() at start of plexSort Adding NOP phi() at start of plexSort::plexFreePrepare1 Adding NOP phi() at start of plexInit @@ -1665,221 +1145,234 @@ FINAL CONTROL FLOW GRAPH [0] phi() to:@1 @1: scope:[] from @begin + [1] (volatile byte) plex_show_idx ← (byte) 0 + [2] (volatile byte) plex_sprite_idx ← (byte) 0 + [3] (volatile byte) plex_sprite_msb ← (byte) 1 + to:@2 +@2: scope:[] from @1 + [4] (volatile byte) plex_free_next ← (byte) 0 + to:@3 +@3: scope:[] from @2 kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} - to:@2 -@2: scope:[] from @1 - [2] phi() - [3] call main + to:@4 +@4: scope:[] from @3 + [6] phi() + [7] call main to:@end -@end: scope:[] from @2 - [4] phi() +@end: scope:[] from @4 + [8] phi() (void()) main() -main: scope:[main] from @2 +main: scope:[main] from @4 asm { sei } - [6] call init + [10] call init to:main::@1 main::@1: scope:[main] from main - [7] phi() - [8] call loop + [11] phi() + [12] call loop to:main::@return main::@return: scope:[main] from main::@1 - [9] return + [13] return to:@return (void()) loop() loop: scope:[loop] from main::@1 - [10] phi() + [14] phi() to:loop::@1 loop::@1: scope:[loop] from loop loop::@10 - [11] (byte) loop::sin_idx#6 ← phi( loop/(byte) 0 loop::@10/(byte) loop::sin_idx#1 ) + [15] (byte) loop::sin_idx#6 ← phi( loop/(byte) 0 loop::@10/(byte) loop::sin_idx#1 ) to:loop::@2 loop::@2: scope:[loop] from loop::@1 loop::@2 - [12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 + [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 to:loop::@3 loop::@3: scope:[loop] from loop::@2 - [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) - [14] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 + [17] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [18] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 to:loop::@4 loop::@4: scope:[loop] from loop::@3 loop::@4 - [15] (byte) loop::sy#2 ← phi( loop::@4/(byte) loop::sy#1 loop::@3/(byte) 0 ) - [15] (byte) loop::y_idx#2 ← phi( loop::@4/(byte) loop::y_idx#1 loop::@3/(byte) loop::y_idx#4 ) - [16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) - [17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 - [18] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 - [19] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 + [19] (byte) loop::sy#2 ← phi( loop::@4/(byte) loop::sy#1 loop::@3/(byte) 0 ) + [19] (byte) loop::y_idx#2 ← phi( loop::@4/(byte) loop::y_idx#1 loop::@3/(byte) loop::y_idx#4 ) + [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) + [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 + [22] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 + [23] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 to:loop::@5 loop::@5: scope:[loop] from loop::@4 - [20] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 - [21] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) - [22] call plexSort + [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 + [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [26] call plexSort to:loop::@11 loop::@11: scope:[loop] from loop::@5 - [23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@6 loop::@6: scope:[loop] from loop::@11 loop::@6 - [24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 - [25] if((byte~) loop::$5!=(byte) 0) goto loop::@6 + [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 + [29] if((byte~) loop::$5!=(byte) 0) goto loop::@6 to:loop::@7 loop::@7: scope:[loop] from loop::@12 loop::@6 - [26] (byte) loop::ss#5 ← phi( loop::@6/(byte) 0 loop::@12/(byte) loop::ss#1 ) - [26] (byte) plex_sprite_msb#42 ← phi( loop::@6/(byte) 1 loop::@12/(byte) plex_sprite_msb#16 ) - [26] (byte) plex_show_idx#42 ← phi( loop::@6/(byte) 0 loop::@12/(byte) plex_show_idx#15 ) - [26] (byte) plex_sprite_idx#42 ← phi( loop::@6/(byte) 0 loop::@12/(byte) plex_sprite_idx#15 ) - [26] (byte) plex_free_next#17 ← phi( loop::@6/(byte) 0 loop::@12/(byte) plex_free_next#13 ) - [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [30] (byte) loop::ss#5 ← phi( loop::@6/(byte) 0 loop::@12/(byte) loop::ss#1 ) + [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::plexFreeNextYpos1 loop::plexFreeNextYpos1: scope:[loop] from loop::@7 - [28] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) + [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) to:loop::@8 loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1 - [29] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 + [33] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 to:loop::@9 loop::@9: scope:[loop] from loop::@8 - [30] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) - [31] call plexShowSprite + [34] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) + [35] call plexShowSprite to:loop::@12 loop::@12: scope:[loop] from loop::@9 - [32] (byte) loop::ss#1 ← ++ (byte) loop::ss#5 - [33] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 + [36] (byte) loop::ss#1 ← ++ (byte) loop::ss#5 + [37] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 to:loop::@10 loop::@10: scope:[loop] from loop::@12 - [34] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK + [38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK to:loop::@1 (void()) plexShowSprite() plexShowSprite: scope:[plexShowSprite] from loop::@9 - [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 - [36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) - [37] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 + [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 to:plexShowSprite::plexFreeAdd1 plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite - [38] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 - [39] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 - [40] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 - [41] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 - to:plexShowSprite::@4 -plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 - [42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) - [43] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42) - [44] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 - [45] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [46] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 - [47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) - [48] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 + [42] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 + [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 + [44] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 + [45] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 + [46] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 + to:plexShowSprite::@5 +plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1 + [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) + [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) + [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 + [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 + [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) + [53] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 to:plexShowSprite::@3 -plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@4 - [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 - [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 +plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@5 + [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb + [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 to:plexShowSprite::@2 plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@3 - [51] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#42 + (byte) 1 - [52] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 - [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#42 - [54] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 << (byte) 1 - [55] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 + [56] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 + [57] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 + [58] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 + [59] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx + [60] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 + [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return + to:plexShowSprite::@4 +plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@2 + [62] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexShowSprite::@return -plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::@2 - [56] phi() - to:plexShowSprite::@return -plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@5 - [57] (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@5/(byte) plex_sprite_msb#3 plexShowSprite::@2/(byte) 1 ) - [58] return +plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@4 + [63] return to:@return -plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4 - [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 +plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@5 + [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb to:plexShowSprite::@2 (void()) plexSort() plexSort: scope:[plexSort] from loop::@5 - [60] phi() + [65] phi() to:plexSort::@1 plexSort::@1: scope:[plexSort] from plexSort plexSort::@2 - [61] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) - [62] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) - [63] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) - [64] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 + [66] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 ) + [67] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) + [68] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) + [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 to:plexSort::@5 plexSort::@5: scope:[plexSort] from plexSort::@1 - [65] (byte) plexSort::s#6 ← (byte) plexSort::m#2 + [70] (byte) plexSort::s#6 ← (byte) plexSort::m#2 to:plexSort::@3 -plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@6 - [66] (byte) plexSort::s#3 ← phi( plexSort::@6/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) - [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) - [68] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 - [69] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 - to:plexSort::@6 -plexSort::@6: scope:[plexSort] from plexSort::@3 - [70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7 + [71] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 ) + [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) + [73] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 + [74] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 + to:plexSort::@7 +plexSort::@7: scope:[plexSort] from plexSort::@3 + [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 to:plexSort::@4 -plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@6 - [71] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 - [72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 +plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7 + [76] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 + [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 to:plexSort::@2 plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4 - [73] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 - [74] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + [78] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 + [79] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 + to:plexSort::@6 +plexSort::@6: scope:[plexSort] from plexSort::@2 + [80] (volatile byte) plex_show_idx ← (byte) 0 + [81] (volatile byte) plex_sprite_idx ← (byte) 0 + [82] (volatile byte) plex_sprite_msb ← (byte) 1 to:plexSort::plexFreePrepare1 -plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@2 - [75] phi() +plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6 + [83] phi() to:plexSort::plexFreePrepare1_@1 plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1 - [76] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) - [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 - [78] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 - [79] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + [84] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 ) + [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 + [86] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 + [87] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 + to:plexSort::plexFreePrepare1_@2 +plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1 + [88] (volatile byte) plex_free_next ← (byte) 0 to:plexSort::@return -plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1 - [80] return +plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2 + [89] return to:@return (void()) init() init: scope:[init] from main - [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 - [82] call plexInit + [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 + [91] call plexInit to:init::@1 init::@1: scope:[init] from init init::@1 - [83] (word) init::xp#2 ← phi( init::@1/(word) init::xp#1 init/(word) $20 ) - [83] (byte) init::sx#2 ← phi( init::@1/(byte) init::sx#1 init/(byte) 0 ) - [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 - [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 - [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 - [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 - [88] (byte) init::sx#1 ← ++ (byte) init::sx#2 - [89] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 + [92] (word) init::xp#2 ← phi( init::@1/(word) init::xp#1 init/(word) $20 ) + [92] (byte) init::sx#2 ← phi( init::@1/(byte) init::sx#1 init/(byte) 0 ) + [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 + [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 + [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 + [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 + [97] (byte) init::sx#1 ← ++ (byte) init::sx#2 + [98] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 to:init::@2 init::@2: scope:[init] from init::@1 - [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff + [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff to:init::@3 init::@3: scope:[init] from init::@2 init::@3 - [91] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) - [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN - [93] (byte) init::ss#1 ← ++ (byte) init::ss#2 - [94] if((byte) init::ss#1!=(byte) 8) goto init::@3 + [100] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 ) + [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN + [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 + [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 to:init::@return init::@return: scope:[init] from init::@3 - [95] return + [104] return to:@return (void()) plexInit((byte*) plexInit::screen) plexInit: scope:[plexInit] from init - [96] phi() + [105] phi() to:plexInit::plexSetScreen1 plexInit::plexSetScreen1: scope:[plexInit] from plexInit - [97] phi() + [106] phi() to:plexInit::@1 plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1 - [98] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) - [99] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 - [100] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 - [101] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 + [107] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 ) + [108] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 + [109] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 + [110] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 to:plexInit::@return plexInit::@return: scope:[plexInit] from plexInit::@1 - [102] return + [111] return to:@return @@ -1926,13 +1419,15 @@ VARIABLE REGISTER WEIGHTS (byte~) plexShowSprite::$2 200002.0 (byte~) plexShowSprite::$3 200002.0 (byte~) plexShowSprite::$5 200002.0 +(byte~) plexShowSprite::$6 200002.0 (byte~) plexShowSprite::$9 200002.0 (byte~) plexShowSprite::plexFreeAdd1_$0 200002.0 (byte~) plexShowSprite::plexFreeAdd1_$1 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$2 200002.0 (byte) plexShowSprite::plexFreeAdd1_ypos (byte) plexShowSprite::plexFreeAdd1_ypos#0 150001.5 (byte) plexShowSprite::plex_sprite_idx2 -(byte) plexShowSprite::plex_sprite_idx2#0 27273.0 +(byte) plexShowSprite::plex_sprite_idx2#0 25000.25 (byte) plexShowSprite::xpos_idx (byte) plexShowSprite::xpos_idx#0 200002.0 (byte) plexShowSprite::ypos @@ -1952,28 +1447,15 @@ VARIABLE REGISTER WEIGHTS (byte) plexSort::s#2 2000002.0 (byte) plexSort::s#3 2.05000025E7 (byte) plexSort::s#6 2000002.0 -(byte) plex_free_next -(byte) plex_free_next#13 5000.090909090909 -(byte) plex_free_next#17 22000.4 -(byte) plex_show_idx -(byte) plex_show_idx#15 12222.444444444445 -(byte) plex_show_idx#42 17083.541666666664 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#15 11000.2 -(byte) plex_sprite_idx#42 14091.090909090908 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#16 22000.4 -(byte) plex_sprite_msb#3 100001.0 -(byte) plex_sprite_msb#42 12400.16 +(volatile byte) plex_free_next loadstore 8421.236842105262 +(volatile byte) plex_show_idx loadstore 10625.166666666664 +(volatile byte) plex_sprite_idx loadstore 9111.266666666666 +(volatile byte) plex_sprite_msb loadstore 13261.065217391304 Initial phi equivalence classes [ loop::sin_idx#6 loop::sin_idx#1 ] [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] [ loop::sy#2 loop::sy#1 ] -[ plex_free_next#17 plex_free_next#13 ] -[ plex_sprite_idx#42 plex_sprite_idx#15 ] -[ plex_show_idx#42 plex_show_idx#15 ] -[ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] [ loop::ss#5 loop::ss#1 ] [ plexSort::m#2 plexSort::m#1 ] [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] @@ -1982,18 +1464,24 @@ Initial phi equivalence classes [ init::xp#2 init::xp#1 ] [ init::ss#2 init::ss#1 ] [ plexInit::i#2 plexInit::i#1 ] +Added variable plex_show_idx to live range equivalence class [ plex_show_idx ] +Added variable plex_sprite_idx to live range equivalence class [ plex_sprite_idx ] +Added variable plex_sprite_msb to live range equivalence class [ plex_sprite_msb ] +Added variable plex_free_next to live range equivalence class [ plex_free_next ] Added variable loop::$5 to live range equivalence class [ loop::$5 ] Added variable loop::plexFreeNextYpos1_return#0 to live range equivalence class [ loop::plexFreeNextYpos1_return#0 ] Added variable plexShowSprite::plex_sprite_idx2#0 to live range equivalence class [ plexShowSprite::plex_sprite_idx2#0 ] Added variable plexShowSprite::plexFreeAdd1_ypos#0 to live range equivalence class [ plexShowSprite::plexFreeAdd1_ypos#0 ] Added variable plexShowSprite::plexFreeAdd1_$0 to live range equivalence class [ plexShowSprite::plexFreeAdd1_$0 ] Added variable plexShowSprite::plexFreeAdd1_$1 to live range equivalence class [ plexShowSprite::plexFreeAdd1_$1 ] +Added variable plexShowSprite::plexFreeAdd1_$2 to live range equivalence class [ plexShowSprite::plexFreeAdd1_$2 ] Added variable plexShowSprite::xpos_idx#0 to live range equivalence class [ plexShowSprite::xpos_idx#0 ] Added variable plexShowSprite::$11 to live range equivalence class [ plexShowSprite::$11 ] Added variable plexShowSprite::$2 to live range equivalence class [ plexShowSprite::$2 ] Added variable plexShowSprite::$3 to live range equivalence class [ plexShowSprite::$3 ] Added variable plexShowSprite::$9 to live range equivalence class [ plexShowSprite::$9 ] Added variable plexShowSprite::$5 to live range equivalence class [ plexShowSprite::$5 ] +Added variable plexShowSprite::$6 to live range equivalence class [ plexShowSprite::$6 ] Added variable plexSort::nxt_idx#0 to live range equivalence class [ plexSort::nxt_idx#0 ] Added variable plexSort::nxt_y#0 to live range equivalence class [ plexSort::nxt_y#0 ] Added variable plexSort::s#2 to live range equivalence class [ plexSort::s#2 ] @@ -2002,10 +1490,6 @@ Complete equivalence classes [ loop::sin_idx#6 loop::sin_idx#1 ] [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] [ loop::sy#2 loop::sy#1 ] -[ plex_free_next#17 plex_free_next#13 ] -[ plex_sprite_idx#42 plex_sprite_idx#15 ] -[ plex_show_idx#42 plex_show_idx#15 ] -[ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] [ loop::ss#5 loop::ss#1 ] [ plexSort::m#2 plexSort::m#1 ] [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] @@ -2014,18 +1498,24 @@ Complete equivalence classes [ init::xp#2 init::xp#1 ] [ init::ss#2 init::ss#1 ] [ plexInit::i#2 plexInit::i#1 ] +[ plex_show_idx ] +[ plex_sprite_idx ] +[ plex_sprite_msb ] +[ plex_free_next ] [ loop::$5 ] [ loop::plexFreeNextYpos1_return#0 ] [ plexShowSprite::plex_sprite_idx2#0 ] [ plexShowSprite::plexFreeAdd1_ypos#0 ] [ plexShowSprite::plexFreeAdd1_$0 ] [ plexShowSprite::plexFreeAdd1_$1 ] +[ plexShowSprite::plexFreeAdd1_$2 ] [ plexShowSprite::xpos_idx#0 ] [ plexShowSprite::$11 ] [ plexShowSprite::$2 ] [ plexShowSprite::$3 ] [ plexShowSprite::$9 ] [ plexShowSprite::$5 ] +[ plexShowSprite::$6 ] [ plexSort::nxt_idx#0 ] [ plexSort::nxt_y#0 ] [ plexSort::s#2 ] @@ -2033,34 +1523,36 @@ Complete equivalence classes Allocated zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] Allocated zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] Allocated zp[1]:4 [ loop::sy#2 loop::sy#1 ] -Allocated zp[1]:5 [ plex_free_next#17 plex_free_next#13 ] -Allocated zp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -Allocated zp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] -Allocated zp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -Allocated zp[1]:9 [ loop::ss#5 loop::ss#1 ] -Allocated zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] -Allocated zp[1]:11 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] -Allocated zp[1]:12 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] -Allocated zp[1]:13 [ init::sx#2 init::sx#1 ] -Allocated zp[2]:14 [ init::xp#2 init::xp#1 ] -Allocated zp[1]:16 [ init::ss#2 init::ss#1 ] -Allocated zp[1]:17 [ plexInit::i#2 plexInit::i#1 ] +Allocated zp[1]:5 [ loop::ss#5 loop::ss#1 ] +Allocated zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] +Allocated zp[1]:7 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] +Allocated zp[1]:8 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] +Allocated zp[1]:9 [ init::sx#2 init::sx#1 ] +Allocated zp[2]:10 [ init::xp#2 init::xp#1 ] +Allocated zp[1]:12 [ init::ss#2 init::ss#1 ] +Allocated zp[1]:13 [ plexInit::i#2 plexInit::i#1 ] +Allocated zp[1]:14 [ plex_show_idx ] +Allocated zp[1]:15 [ plex_sprite_idx ] +Allocated zp[1]:16 [ plex_sprite_msb ] +Allocated zp[1]:17 [ plex_free_next ] Allocated zp[1]:18 [ loop::$5 ] Allocated zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] Allocated zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] Allocated zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] Allocated zp[1]:22 [ plexShowSprite::plexFreeAdd1_$0 ] Allocated zp[1]:23 [ plexShowSprite::plexFreeAdd1_$1 ] -Allocated zp[1]:24 [ plexShowSprite::xpos_idx#0 ] -Allocated zp[1]:25 [ plexShowSprite::$11 ] -Allocated zp[1]:26 [ plexShowSprite::$2 ] -Allocated zp[1]:27 [ plexShowSprite::$3 ] -Allocated zp[1]:28 [ plexShowSprite::$9 ] -Allocated zp[1]:29 [ plexShowSprite::$5 ] -Allocated zp[1]:30 [ plexSort::nxt_idx#0 ] -Allocated zp[1]:31 [ plexSort::nxt_y#0 ] -Allocated zp[1]:32 [ plexSort::s#2 ] -Allocated zp[1]:33 [ init::$5 ] +Allocated zp[1]:24 [ plexShowSprite::plexFreeAdd1_$2 ] +Allocated zp[1]:25 [ plexShowSprite::xpos_idx#0 ] +Allocated zp[1]:26 [ plexShowSprite::$11 ] +Allocated zp[1]:27 [ plexShowSprite::$2 ] +Allocated zp[1]:28 [ plexShowSprite::$3 ] +Allocated zp[1]:29 [ plexShowSprite::$9 ] +Allocated zp[1]:30 [ plexShowSprite::$5 ] +Allocated zp[1]:31 [ plexShowSprite::$6 ] +Allocated zp[1]:32 [ plexSort::nxt_idx#0 ] +Allocated zp[1]:33 [ plexSort::nxt_y#0 ] +Allocated zp[1]:34 [ plexSort::s#2 ] +Allocated zp[1]:35 [ init::$5 ] INITIAL ASM Target platform is c64basic / MOS6502X @@ -2090,32 +1582,49 @@ Target platform is c64basic / MOS6502X // Location of screen & sprites .label SCREEN = $400 .label SPRITE = $2000 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 8 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 5 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 6 - // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 7 + .label plex_show_idx = $e + .label plex_sprite_idx = $f + .label plex_sprite_msb = $10 + .label plex_free_next = $11 // @begin __bbegin: jmp __b1 // @1 __b1: - // kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} - // [2] phi from @1 to @2 [phi:@1->@2] -__b2_from___b1: + // [1] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index in the PLEX tables of the next sprite to show + lda #0 + sta.z plex_show_idx + // [2] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index the next sprite to use for showing (sprites are used round-robin) + lda #0 + sta.z plex_sprite_idx + // [3] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb jmp __b2 // @2 __b2: - // [3] call main + // [4] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next + jmp __b3 + // @3 +__b3: + // kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} + // [6] phi from @3 to @4 [phi:@3->@4] +__b4_from___b3: + jmp __b4 + // @4 +__b4: + // [7] call main jsr main - // [4] phi from @2 to @end [phi:@2->@end] -__bend_from___b2: + // [8] phi from @4 to @end [phi:@4->@end] +__bend_from___b4: jmp __bend // @end __bend: @@ -2123,21 +1632,21 @@ __bend: main: { // asm { sei } sei - // [6] call init + // [10] call init jsr init - // [7] phi from main to main::@1 [phi:main->main::@1] + // [11] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: jmp __b1 // main::@1 __b1: - // [8] call loop - // [10] phi from main::@1 to loop [phi:main::@1->loop] + // [12] call loop + // [14] phi from main::@1 to loop [phi:main::@1->loop] loop_from___b1: jsr loop jmp __breturn // main::@return __breturn: - // [9] return + // [13] return rts } // loop @@ -2149,10 +1658,10 @@ loop: { // The current index into the y-sinus .label sin_idx = 2 .label plexFreeNextYpos1_return = $13 - .label ss = 9 - // [11] phi from loop to loop::@1 [phi:loop->loop::@1] + .label ss = 5 + // [15] phi from loop to loop::@1 [phi:loop->loop::@1] __b1_from_loop: - // [11] phi (byte) loop::sin_idx#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 + // [15] phi (byte) loop::sin_idx#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 lda #0 sta.z sin_idx jmp __b1 @@ -2161,279 +1670,263 @@ loop: { jmp __b2 // loop::@2 __b2: - // [12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + // [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 lda #$ff cmp RASTER bne __b2 jmp __b3 // loop::@3 __b3: - // [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [17] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [14] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 -- vbuz1=vbuz2 + // [18] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 -- vbuz1=vbuz2 lda.z sin_idx sta.z y_idx - // [15] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] + // [19] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] __b4_from___b3: - // [15] phi (byte) loop::sy#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 + // [19] phi (byte) loop::sy#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuz1=vbuc1 lda #0 sta.z sy - // [15] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#4 [phi:loop::@3->loop::@4#1] -- register_copy + // [19] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#4 [phi:loop::@3->loop::@4#1] -- register_copy jmp __b4 - // [15] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4] + // [19] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4] __b4_from___b4: - // [15] phi (byte) loop::sy#2 = (byte) loop::sy#1 [phi:loop::@4->loop::@4#0] -- register_copy - // [15] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#1 [phi:loop::@4->loop::@4#1] -- register_copy + // [19] phi (byte) loop::sy#2 = (byte) loop::sy#1 [phi:loop::@4->loop::@4#0] -- register_copy + // [19] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#1 [phi:loop::@4->loop::@4#1] -- register_copy jmp __b4 // loop::@4 __b4: - // [16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 + // [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 ldy.z y_idx lda YSIN,y ldy.z sy sta PLEX_YPOS,y - // [17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax.z y_idx axs #-[8] stx.z y_idx - // [18] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 -- vbuz1=_inc_vbuz1 + // [22] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 -- vbuz1=_inc_vbuz1 inc.z sy - // [19] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 + // [23] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z sy bne __b4_from___b4 jmp __b5 // loop::@5 __b5: - // [20] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 + // [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 inc.z sin_idx - // [21] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [22] call plexSort - // [60] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] + // [26] call plexSort + // [65] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: jsr plexSort jmp __b11 // loop::@11 __b11: - // [23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp __b6 // loop::@6 __b6: - // [24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuz1=_deref_pbuc1_band_vbuc2 + // [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuz1=_deref_pbuc1_band_vbuc2 lda #VIC_RST8 and D011 sta.z __5 - // [25] if((byte~) loop::$5!=(byte) 0) goto loop::@6 -- vbuz1_neq_0_then_la1 + // [29] if((byte~) loop::$5!=(byte) 0) goto loop::@6 -- vbuz1_neq_0_then_la1 lda.z __5 cmp #0 bne __b6 - // [26] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] + // [30] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] __b7_from___b6: - // [26] phi (byte) loop::ss#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 + // [30] phi (byte) loop::ss#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 lda #0 sta.z ss - // [26] phi (byte) plex_sprite_msb#42 = (byte) 1 [phi:loop::@6->loop::@7#1] -- vbuz1=vbuc1 - lda #1 - sta.z plex_sprite_msb - // [26] phi (byte) plex_show_idx#42 = (byte) 0 [phi:loop::@6->loop::@7#2] -- vbuz1=vbuc1 - lda #0 - sta.z plex_show_idx - // [26] phi (byte) plex_sprite_idx#42 = (byte) 0 [phi:loop::@6->loop::@7#3] -- vbuz1=vbuc1 - lda #0 - sta.z plex_sprite_idx - // [26] phi (byte) plex_free_next#17 = (byte) 0 [phi:loop::@6->loop::@7#4] -- vbuz1=vbuc1 - lda #0 - sta.z plex_free_next jmp __b7 // Show the sprites - // [26] phi from loop::@12 to loop::@7 [phi:loop::@12->loop::@7] + // [30] phi from loop::@12 to loop::@7 [phi:loop::@12->loop::@7] __b7_from___b12: - // [26] phi (byte) loop::ss#5 = (byte) loop::ss#1 [phi:loop::@12->loop::@7#0] -- register_copy - // [26] phi (byte) plex_sprite_msb#42 = (byte) plex_sprite_msb#16 [phi:loop::@12->loop::@7#1] -- register_copy - // [26] phi (byte) plex_show_idx#42 = (byte) plex_show_idx#15 [phi:loop::@12->loop::@7#2] -- register_copy - // [26] phi (byte) plex_sprite_idx#42 = (byte) plex_sprite_idx#15 [phi:loop::@12->loop::@7#3] -- register_copy - // [26] phi (byte) plex_free_next#17 = (byte) plex_free_next#13 [phi:loop::@12->loop::@7#4] -- register_copy + // [30] phi (byte) loop::ss#5 = (byte) loop::ss#1 [phi:loop::@12->loop::@7#0] -- register_copy jmp __b7 // loop::@7 __b7: - // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp plexFreeNextYpos1 // loop::plexFreeNextYpos1 plexFreeNextYpos1: - // [28] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) -- vbuz1=pbuc1_derefidx_vbuz2 + // [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return jmp __b8 // loop::@8 __b8: - // [29] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [33] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp.z plexFreeNextYpos1_return bcc __b8 jmp __b9 // loop::@9 __b9: - // [30] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [34] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [31] call plexShowSprite + // [35] call plexShowSprite jsr plexShowSprite jmp __b12 // loop::@12 __b12: - // [32] (byte) loop::ss#1 ← ++ (byte) loop::ss#5 -- vbuz1=_inc_vbuz1 + // [36] (byte) loop::ss#1 ← ++ (byte) loop::ss#5 -- vbuz1=_inc_vbuz1 inc.z ss - // [33] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 + // [37] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z ss bne __b7_from___b12 jmp __b10 // loop::@10 __b10: - // [34] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [11] phi from loop::@10 to loop::@1 [phi:loop::@10->loop::@1] + // [15] phi from loop::@10 to loop::@1 [phi:loop::@10->loop::@1] __b1_from___b10: - // [11] phi (byte) loop::sin_idx#6 = (byte) loop::sin_idx#1 [phi:loop::@10->loop::@1#0] -- register_copy + // [15] phi (byte) loop::sin_idx#6 = (byte) loop::sin_idx#1 [phi:loop::@10->loop::@1#0] -- register_copy jmp __b1 } // plexShowSprite // Show the next sprite. // plexSort() prepares showing the sprites plexShowSprite: { - .label __2 = $1a - .label __3 = $1b - .label __5 = $1d - .label __9 = $1c - .label __11 = $19 + .label __2 = $1b + .label __3 = $1c + .label __5 = $1e + .label __6 = $1f + .label __9 = $1d + .label __11 = $1a .label plexFreeAdd1___0 = $16 .label plexFreeAdd1___1 = $17 + .label plexFreeAdd1___2 = $18 .label plex_sprite_idx2 = $14 .label plexFreeAdd1_ypos = $15 - .label xpos_idx = $18 - // [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 -- vbuz1=vbuz2_rol_1 + .label xpos_idx = $19 + // [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z plex_sprite_idx asl sta.z plex_sprite_idx2 - // [36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) -- vbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) + // [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- vbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x ldx PLEX_YPOS,y stx.z plexFreeAdd1_ypos - // [37] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z plexFreeAdd1_ypos ldy.z plex_sprite_idx2 sta SPRITES_YPOS,y jmp plexFreeAdd1 // plexShowSprite::plexFreeAdd1 plexFreeAdd1: - // [38] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuz1=vbuz2_plus_vbuc1 + // [42] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuz1=vbuz2_plus_vbuc1 lax.z plexFreeAdd1_ypos axs #-[$15] stx.z plexFreeAdd1___0 - // [39] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z plexFreeAdd1___0 ldy.z plex_free_next sta PLEX_FREE_YPOS,y - // [40] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [44] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z plex_free_next iny sty.z plexFreeAdd1___1 - // [41] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [45] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z plexFreeAdd1___1 + sta.z plexFreeAdd1___2 + // [46] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 -- vbuz1=vbuz2 + lda.z plexFreeAdd1___2 sta.z plex_free_next - jmp __b4 - // plexShowSprite::@4 - __b4: - // [42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) + jmp __b5 + // plexShowSprite::@5 + __b5: + // [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_PTR,y ldx.z plex_sprite_idx sta PLEX_SCREEN_PTR,x - // [43] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42) -- vbuz1=pbuc1_derefidx_vbuz2 + // [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_show_idx lda PLEX_SORTED_IDX,y sta.z xpos_idx - // [44] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z xpos_idx asl sta.z __11 - // [45] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_lo_pwuc1_derefidx_vbuz2 + // [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_lo_pwuc1_derefidx_vbuz2 ldy.z __11 lda PLEX_XPOS,y sta.z __2 - // [46] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __2 ldy.z plex_sprite_idx2 sta SPRITES_XPOS,y - // [47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_hi_pwuc1_derefidx_vbuz2 + // [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuz1=_hi_pwuc1_derefidx_vbuz2 ldy.z __11 lda PLEX_XPOS+1,y sta.z __3 - // [48] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuz1_neq_0_then_la1 + // [53] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuz1_neq_0_then_la1 lda.z __3 cmp #0 bne __b1 jmp __b3 // plexShowSprite::@3 __b3: - // [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 -- vbuz1=vbuc1_bxor_vbuz2 + // [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb -- vbuz1=vbuc1_bxor_vbuz2 lda #$ff eor.z plex_sprite_msb sta.z __9 - // [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 + // [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 lda SPRITES_XMSB and.z __9 sta SPRITES_XMSB jmp __b2 // plexShowSprite::@2 __b2: - // [51] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#42 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [56] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z plex_sprite_idx iny sty.z __5 - // [52] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [57] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z __5 + sta.z __6 + // [58] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 -- vbuz1=vbuz2 + lda.z __6 sta.z plex_sprite_idx - // [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#42 -- vbuz1=_inc_vbuz1 + // [59] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx -- vbuz1=_inc_vbuz1 inc.z plex_show_idx - // [54] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [60] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z plex_sprite_msb - // [55] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 -- vbuz1_neq_0_then_la1 + // [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -- vbuz1_neq_0_then_la1 lda.z plex_sprite_msb cmp #0 - bne __b5_from___b2 - // [57] phi from plexShowSprite::@2 to plexShowSprite::@return [phi:plexShowSprite::@2->plexShowSprite::@return] - __breturn_from___b2: - // [57] phi (byte) plex_sprite_msb#16 = (byte) 1 [phi:plexShowSprite::@2->plexShowSprite::@return#0] -- vbuz1=vbuc1 + bne __breturn + jmp __b4 + // plexShowSprite::@4 + __b4: + // [62] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 lda #1 sta.z plex_sprite_msb jmp __breturn - // [56] phi from plexShowSprite::@2 to plexShowSprite::@5 [phi:plexShowSprite::@2->plexShowSprite::@5] - __b5_from___b2: - jmp __b5 - // plexShowSprite::@5 - __b5: - // [57] phi from plexShowSprite::@5 to plexShowSprite::@return [phi:plexShowSprite::@5->plexShowSprite::@return] - __breturn_from___b5: - // [57] phi (byte) plex_sprite_msb#16 = (byte) plex_sprite_msb#3 [phi:plexShowSprite::@5->plexShowSprite::@return#0] -- register_copy - jmp __breturn // plexShowSprite::@return __breturn: - // [58] return + // [63] return rts // plexShowSprite::@1 __b1: - // [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + // [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -2450,33 +1943,33 @@ plexShowSprite: { // elements before the marker are shifted right one at a time until encountering one smaller than the current one. // It is then inserted at the spot. Now the marker can move forward. plexSort: { - .label nxt_idx = $1e - .label nxt_y = $1f - .label m = $a - .label s = $b - .label s_1 = $20 - .label plexFreePrepare1_s = $c - // [61] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] + .label nxt_idx = $20 + .label nxt_y = $21 + .label m = 6 + .label s = 7 + .label s_1 = $22 + .label plexFreePrepare1_s = 8 + // [66] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] __b1_from_plexSort: - // [61] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 + // [66] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 lda #0 sta.z m jmp __b1 - // [61] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] + // [66] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] __b1_from___b2: - // [61] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy + // [66] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy jmp __b1 // plexSort::@1 __b1: - // [62] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [67] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx - // [63] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [68] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z nxt_idx lda PLEX_YPOS,y sta.z nxt_y - // [64] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + // [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 lda.z nxt_y ldx.z m ldy PLEX_SORTED_IDX,x @@ -2485,137 +1978,156 @@ plexSort: { jmp __b5 // plexSort::@5 __b5: - // [65] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuz1=vbuz2 + // [70] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuz1=vbuz2 lda.z m sta.z s - // [66] phi from plexSort::@5 plexSort::@6 to plexSort::@3 [phi:plexSort::@5/plexSort::@6->plexSort::@3] + // [71] phi from plexSort::@5 plexSort::@7 to plexSort::@3 [phi:plexSort::@5/plexSort::@7->plexSort::@3] __b3_from___b5: - __b3_from___b6: - // [66] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@6->plexSort::@3#0] -- register_copy + __b3_from___b7: + // [71] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@7->plexSort::@3#0] -- register_copy jmp __b3 // plexSort::@3 __b3: - // [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + // [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 ldy.z s lda PLEX_SORTED_IDX,y sta PLEX_SORTED_IDX+1,y - // [68] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuz1=_dec_vbuz1 + // [73] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuz1=_dec_vbuz1 dec.z s - // [69] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuz1_eq_vbuc1_then_la1 + // [74] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp.z s beq __b4 - jmp __b6 - // plexSort::@6 - __b6: - // [70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + jmp __b7 + // plexSort::@7 + __b7: + // [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 lda.z nxt_y ldx.z s ldy PLEX_SORTED_IDX,x cmp PLEX_YPOS,y - bcc __b3_from___b6 + bcc __b3_from___b7 jmp __b4 // plexSort::@4 __b4: - // [71] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuz1=_inc_vbuz2 + // [76] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuz1=_inc_vbuz2 ldy.z s iny sty.z s_1 - // [72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z nxt_idx ldy.z s_1 sta PLEX_SORTED_IDX,y jmp __b2 // plexSort::@2 __b2: - // [73] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 + // [78] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 inc.z m - // [74] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 + // [79] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-2+1 cmp.z m bne __b1_from___b2 - // [75] phi from plexSort::@2 to plexSort::plexFreePrepare1 [phi:plexSort::@2->plexSort::plexFreePrepare1] - plexFreePrepare1_from___b2: + jmp __b6 + // plexSort::@6 + __b6: + // [80] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // Prepare for showing the sprites + lda #0 + sta.z plex_show_idx + // [81] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_sprite_idx + // [82] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + lda #1 + sta.z plex_sprite_msb + // [83] phi from plexSort::@6 to plexSort::plexFreePrepare1 [phi:plexSort::@6->plexSort::plexFreePrepare1] + plexFreePrepare1_from___b6: jmp plexFreePrepare1 // plexSort::plexFreePrepare1 plexFreePrepare1: - // [76] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] + // [84] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1: - // [76] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuz1=vbuc1 + // [84] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuz1=vbuc1 lda #0 sta.z plexFreePrepare1_s jmp plexFreePrepare1___b1 - // [76] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] + // [84] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1___b1: - // [76] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy + // [84] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy jmp plexFreePrepare1___b1 // plexSort::plexFreePrepare1_@1 plexFreePrepare1___b1: - // [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy.z plexFreePrepare1_s sta PLEX_FREE_YPOS,y - // [78] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuz1=_inc_vbuz1 + // [86] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuz1=_inc_vbuz1 inc.z plexFreePrepare1_s - // [79] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuz1_neq_vbuc1_then_la1 + // [87] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z plexFreePrepare1_s bne plexFreePrepare1___b1_from_plexFreePrepare1___b1 + jmp plexFreePrepare1___b2 + // plexSort::plexFreePrepare1_@2 + plexFreePrepare1___b2: + // [88] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_free_next jmp __breturn // plexSort::@return __breturn: - // [80] return + // [89] return rts } // init // Initialize the program init: { - .label __5 = $21 + .label __5 = $23 // Set the x-positions & pointers - .label xp = $e - .label sx = $d - .label ss = $10 - // [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + .label xp = $a + .label sx = 9 + .label ss = $c + // [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_RSEL|3 sta D011 - // [82] call plexInit + // [91] call plexInit // Initialize the multiplexer - // [96] phi from init to plexInit [phi:init->plexInit] + // [105] phi from init to plexInit [phi:init->plexInit] plexInit_from_init: jsr plexInit - // [83] phi from init to init::@1 [phi:init->init::@1] + // [92] phi from init to init::@1 [phi:init->init::@1] __b1_from_init: - // [83] phi (word) init::xp#2 = (word) $20 [phi:init->init::@1#0] -- vwuz1=vwuc1 + // [92] phi (word) init::xp#2 = (word) $20 [phi:init->init::@1#0] -- vwuz1=vwuc1 lda #<$20 sta.z xp lda #>$20 sta.z xp+1 - // [83] phi (byte) init::sx#2 = (byte) 0 [phi:init->init::@1#1] -- vbuz1=vbuc1 + // [92] phi (byte) init::sx#2 = (byte) 0 [phi:init->init::@1#1] -- vbuz1=vbuc1 lda #0 sta.z sx jmp __b1 - // [83] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + // [92] phi from init::@1 to init::@1 [phi:init::@1->init::@1] __b1_from___b1: - // [83] phi (word) init::xp#2 = (word) init::xp#1 [phi:init::@1->init::@1#0] -- register_copy - // [83] phi (byte) init::sx#2 = (byte) init::sx#1 [phi:init::@1->init::@1#1] -- register_copy + // [92] phi (word) init::xp#2 = (word) init::xp#1 [phi:init::@1->init::@1#0] -- register_copy + // [92] phi (byte) init::sx#2 = (byte) init::sx#1 [phi:init::@1->init::@1#1] -- register_copy jmp __b1 // init::@1 __b1: - // [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 + // [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuz1=vbuc2 lda #SPRITE/$40 ldy.z sx sta PLEX_PTR,y - // [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z sx asl sta.z __5 - // [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 -- pwuc1_derefidx_vbuz1=vwuz2 + // [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 -- pwuc1_derefidx_vbuz1=vwuz2 ldy.z __5 lda.z xp sta PLEX_XPOS,y lda.z xp+1 sta PLEX_XPOS+1,y - // [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 -- vwuz1=vwuz1_plus_vbuc1 + // [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 -- vwuz1=vwuz1_plus_vbuc1 lda #9 clc adc.z xp @@ -2623,86 +2135,86 @@ init: { bcc !+ inc.z xp+1 !: - // [88] (byte) init::sx#1 ← ++ (byte) init::sx#2 -- vbuz1=_inc_vbuz1 + // [97] (byte) init::sx#1 ← ++ (byte) init::sx#2 -- vbuz1=_inc_vbuz1 inc.z sx - // [89] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [98] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z sx bne __b1_from___b1 jmp __b2 // init::@2 __b2: - // [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE - // [91] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + // [100] phi from init::@2 to init::@3 [phi:init::@2->init::@3] __b3_from___b2: - // [91] phi (byte) init::ss#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuz1=vbuc1 + // [100] phi (byte) init::ss#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuz1=vbuc1 lda #0 sta.z ss jmp __b3 - // [91] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + // [100] phi from init::@3 to init::@3 [phi:init::@3->init::@3] __b3_from___b3: - // [91] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy + // [100] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy jmp __b3 // init::@3 __b3: - // [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 + // [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuz1=vbuc2 lda #GREEN ldy.z ss sta SPRITES_COLS,y - // [93] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuz1=_inc_vbuz1 + // [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuz1=_inc_vbuz1 inc.z ss - // [94] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 + // [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z ss bne __b3_from___b3 jmp __breturn // init::@return __breturn: - // [95] return + // [104] return rts } // plexInit // Initialize the multiplexer data structures plexInit: { - .label i = $11 - // [97] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] + .label i = $d + // [106] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] plexSetScreen1_from_plexInit: jmp plexSetScreen1 // plexInit::plexSetScreen1 plexSetScreen1: - // [98] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] + // [107] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] __b1_from_plexSetScreen1: - // [98] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuz1=vbuc1 + // [107] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b1 - // [98] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] + // [107] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] __b1_from___b1: - // [98] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy + // [107] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy jmp __b1 // plexInit::@1 __b1: - // [99] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuz1=vbuz1 + // [108] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuz1=vbuz1 ldy.z i tya sta PLEX_SORTED_IDX,y - // [100] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuz1=_inc_vbuz1 + // [109] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [101] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuz1_neq_vbuc1_then_la1 + // [110] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z i bne __b1_from___b1 jmp __breturn // plexInit::@return __breturn: - // [102] return + // [111] return rts } // File Data - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 @@ -2728,184 +2240,269 @@ YSIN: REGISTER UPLIFT POTENTIAL REGISTERS -Statement [12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 [ loop::sin_idx#6 ] ( main:3::loop:8 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a +Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] -Statement [16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:3::loop:8 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a +Statement [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] Removing always clobbered register reg byte a as potential for zp[1]:4 [ loop::sy#2 loop::sy#1 ] -Statement [17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:3::loop:8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a -Statement [23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:3::loop:8 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a -Statement [24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ loop::sin_idx#1 loop::$5 ] ( main:3::loop:8 [ loop::sin_idx#1 loop::$5 ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 loop::ss#5 ] ( main:3::loop:8 [ loop::sin_idx#1 plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 loop::ss#5 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:5 [ plex_free_next#17 plex_free_next#13 ] -Removing always clobbered register reg byte a as potential for zp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -Removing always clobbered register reg byte a as potential for zp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] -Removing always clobbered register reg byte a as potential for zp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -Removing always clobbered register reg byte a as potential for zp[1]:9 [ loop::ss#5 loop::ss#1 ] -Statement [34] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:3::loop:8 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a -Statement [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 [ plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plexShowSprite::plex_sprite_idx2#0 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Statement [42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::$5 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::$5 ] { } ) always clobbers reg byte a +Statement [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:5 [ loop::ss#5 loop::ss#1 ] +Statement [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 loop::plexFreeNextYpos1_return#0 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:5 [ loop::ss#5 loop::ss#1 ] +Statement [38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y +Removing always clobbered register reg byte x as potential for zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:5 [ loop::ss#5 loop::ss#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] +Removing always clobbered register reg byte y as potential for zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] +Statement [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte y +Statement [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a reg byte x reg byte y Removing always clobbered register reg byte a as potential for zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] -Statement [44] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a -Statement [45] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:25 [ plexShowSprite::$11 ] -Statement [47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$3 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$3 ] { } ) always clobbers reg byte a -Statement [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$9 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$9 ] { } ) always clobbers reg byte a -Statement [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:30 [ plexSort::nxt_idx#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:31 [ plexSort::nxt_y#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:11 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] -Statement [70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a -Statement [72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 ] { } ) always clobbers reg byte a -Statement [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plexSort::plexFreePrepare1_s#2 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:12 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] -Statement [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:3::init:6 [ ] { } ) always clobbers reg byte a -Statement [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::sx#2 init::xp#2 ] ( main:3::init:6 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:13 [ init::sx#2 init::sx#1 ] -Statement [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 init::xp#2 init::$5 ] ( main:3::init:6 [ init::sx#2 init::xp#2 init::$5 ] { } ) always clobbers reg byte a -Statement [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:3::init:6 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a -Statement [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:3::init:6 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a -Statement [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:3::init:6 [ ] { } ) always clobbers reg byte a -Statement [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:3::init:6 [ init::ss#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:16 [ init::ss#2 init::ss#1 ] -Statement [12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 [ loop::sin_idx#6 ] ( main:3::loop:8 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a -Statement [16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:3::loop:8 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a -Statement [17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:3::loop:8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a -Statement [23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:3::loop:8 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a -Statement [24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ loop::sin_idx#1 loop::$5 ] ( main:3::loop:8 [ loop::sin_idx#1 loop::$5 ] { } ) always clobbers reg byte a -Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 loop::ss#5 ] ( main:3::loop:8 [ loop::sin_idx#1 plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 loop::ss#5 ] { } ) always clobbers reg byte a -Statement [34] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:3::loop:8 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a -Statement [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 [ plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plexShowSprite::plex_sprite_idx2#0 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_free_next#17 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Statement [42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a -Statement [44] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a -Statement [45] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a -Statement [47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$3 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$3 ] { } ) always clobbers reg byte a -Statement [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$9 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 plexShowSprite::$9 ] { } ) always clobbers reg byte a -Statement [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 [ plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] ( main:3::loop:8::plexShowSprite:31 [ loop::sin_idx#1 loop::ss#5 plex_sprite_idx#42 plex_show_idx#42 plex_sprite_msb#42 plex_free_next#13 ] { } ) always clobbers reg byte a -Statement [64] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a -Statement [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a -Statement [70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a -Statement [72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::m#2 ] { } ) always clobbers reg byte a -Statement [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plexSort::plexFreePrepare1_s#2 ] ( main:3::loop:8::plexSort:22 [ loop::sin_idx#1 plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a -Statement [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:3::init:6 [ ] { } ) always clobbers reg byte a -Statement [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::sx#2 init::xp#2 ] ( main:3::init:6 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a -Statement [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 init::xp#2 init::$5 ] ( main:3::init:6 [ init::sx#2 init::xp#2 init::$5 ] { } ) always clobbers reg byte a -Statement [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:3::init:6 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a -Statement [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:3::init:6 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a -Statement [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:3::init:6 [ ] { } ) always clobbers reg byte a -Statement [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:3::init:6 [ init::ss#2 ] { } ) always clobbers reg byte a -Potential registers zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] : zp[1]:2 , reg byte x , reg byte y , +Statement [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] { } ) always clobbers reg byte y +Statement [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a +Statement [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:26 [ plexShowSprite::$11 ] +Statement [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:26 [ plexShowSprite::$11 ] +Statement [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] { } ) always clobbers reg byte a +Statement [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] { } ) always clobbers reg byte a +Statement [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [62] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:32 [ plexSort::nxt_idx#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:33 [ plexSort::nxt_y#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:7 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] +Statement [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a +Statement [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 ] { } ) always clobbers reg byte a +Statement [80] (volatile byte) plex_show_idx ← (byte) 0 [ plex_show_idx ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx ] { } ) always clobbers reg byte a +Statement [81] (volatile byte) plex_sprite_idx ← (byte) 0 [ plex_show_idx plex_sprite_idx ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx ] { } ) always clobbers reg byte a +Statement [82] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb ] { } ) always clobbers reg byte a +Statement [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:8 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] +Statement [88] (volatile byte) plex_free_next ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a +Statement [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:9 [ init::sx#2 init::sx#1 ] +Statement [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 init::xp#2 init::$5 ] ( main:7::init:10 [ init::sx#2 init::xp#2 init::$5 ] { } ) always clobbers reg byte a +Statement [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a +Statement [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a +Statement [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a +Statement [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:12 [ init::ss#2 init::ss#1 ] +Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a +Statement [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a +Statement [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::$5 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::$5 ] { } ) always clobbers reg byte a +Statement [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 ] { } ) always clobbers reg byte a +Statement [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 loop::plexFreeNextYpos1_return#0 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y +Statement [37] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#1 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#1 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y +Statement [41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] +Statement [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte y +Statement [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] { } ) always clobbers reg byte y +Statement [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a +Statement [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a +Statement [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] { } ) always clobbers reg byte y +Statement [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] { } ) always clobbers reg byte a +Statement [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] { } ) always clobbers reg byte a +Statement [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [62] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a +Statement [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a +Statement [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a +Statement [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 ] { } ) always clobbers reg byte a +Statement [80] (volatile byte) plex_show_idx ← (byte) 0 [ plex_show_idx ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx ] { } ) always clobbers reg byte a +Statement [81] (volatile byte) plex_sprite_idx ← (byte) 0 [ plex_show_idx plex_sprite_idx ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx ] { } ) always clobbers reg byte a +Statement [82] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb ] { } ) always clobbers reg byte a +Statement [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a +Statement [88] (volatile byte) plex_free_next ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a +Statement [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a +Statement [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 init::xp#2 init::$5 ] ( main:7::init:10 [ init::sx#2 init::xp#2 init::$5 ] { } ) always clobbers reg byte a +Statement [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a +Statement [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a +Statement [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a +Statement [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a +Statement [1] (volatile byte) plex_show_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) plex_sprite_idx ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] (volatile byte) plex_sprite_msb ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] (volatile byte) plex_free_next ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 [ loop::sin_idx#6 ] ( main:7::loop:12 [ loop::sin_idx#6 ] { } ) always clobbers reg byte a +Statement [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::y_idx#2 loop::sy#2 ] { } ) always clobbers reg byte a +Statement [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#6 loop::sy#2 loop::y_idx#1 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::$5 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::$5 ] { } ) always clobbers reg byte a +Statement [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 ] { } ) always clobbers reg byte a +Statement [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 loop::plexFreeNextYpos1_return#0 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#5 loop::plexFreeNextYpos1_return#0 ] { } ) always clobbers reg byte y +Statement [37] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#1 ] ( main:7::loop:12 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next loop::sin_idx#1 loop::ss#1 ] { } ) always clobbers reg byte a +Statement [38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK [ loop::sin_idx#1 ] ( main:7::loop:12 [ loop::sin_idx#1 ] { } ) always clobbers reg byte a +Statement [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a +Statement [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte x reg byte y +Statement [41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::plexFreeAdd1_ypos#0 ] { } ) always clobbers reg byte y +Statement [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte y +Statement [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::xpos_idx#0 ] { } ) always clobbers reg byte y +Statement [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 ] { } ) always clobbers reg byte a +Statement [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::plex_sprite_idx2#0 plexShowSprite::$11 plexShowSprite::$2 ] { } ) always clobbers reg byte a +Statement [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$11 ] { } ) always clobbers reg byte y +Statement [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$3 ] { } ) always clobbers reg byte a +Statement [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next plexShowSprite::$9 ] { } ) always clobbers reg byte a +Statement [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [62] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexShowSprite:35 [ loop::sin_idx#1 loop::ss#5 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 ] { } ) always clobbers reg byte a +Statement [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#3 ] { } ) always clobbers reg byte a +Statement [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 [ plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 plexSort::nxt_idx#0 plexSort::nxt_y#0 plexSort::s#1 ] { } ) always clobbers reg byte a +Statement [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 [ plexSort::m#2 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plexSort::m#2 ] { } ) always clobbers reg byte a +Statement [80] (volatile byte) plex_show_idx ← (byte) 0 [ plex_show_idx ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx ] { } ) always clobbers reg byte a +Statement [81] (volatile byte) plex_sprite_idx ← (byte) 0 [ plex_show_idx plex_sprite_idx ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx ] { } ) always clobbers reg byte a +Statement [82] (volatile byte) plex_sprite_msb ← (byte) 1 [ plex_show_idx plex_sprite_idx plex_sprite_msb ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb ] { } ) always clobbers reg byte a +Statement [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb plexSort::plexFreePrepare1_s#2 ] { } ) always clobbers reg byte a +Statement [88] (volatile byte) plex_free_next ← (byte) 0 [ plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] ( main:7::loop:12::plexSort:26 [ loop::sin_idx#1 plex_show_idx plex_sprite_idx plex_sprite_msb plex_free_next ] { } ) always clobbers reg byte a +Statement [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a +Statement [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a +Statement [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 [ init::sx#2 init::xp#2 init::$5 ] ( main:7::init:10 [ init::sx#2 init::xp#2 init::$5 ] { } ) always clobbers reg byte a +Statement [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 [ init::sx#2 init::xp#2 ] ( main:7::init:10 [ init::sx#2 init::xp#2 ] { } ) always clobbers reg byte a +Statement [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 [ init::sx#2 init::xp#1 ] ( main:7::init:10 [ init::sx#2 init::xp#1 ] { } ) always clobbers reg byte a +Statement [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff [ ] ( main:7::init:10 [ ] { } ) always clobbers reg byte a +Statement [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN [ init::ss#2 ] ( main:7::init:10 [ init::ss#2 ] { } ) always clobbers reg byte a +Potential registers zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] : zp[1]:2 , Potential registers zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] : zp[1]:3 , reg byte x , reg byte y , Potential registers zp[1]:4 [ loop::sy#2 loop::sy#1 ] : zp[1]:4 , reg byte x , reg byte y , -Potential registers zp[1]:5 [ plex_free_next#17 plex_free_next#13 ] : zp[1]:5 , reg byte x , reg byte y , -Potential registers zp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] : zp[1]:6 , reg byte x , reg byte y , -Potential registers zp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] : zp[1]:7 , reg byte x , reg byte y , -Potential registers zp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] : zp[1]:8 , reg byte x , reg byte y , -Potential registers zp[1]:9 [ loop::ss#5 loop::ss#1 ] : zp[1]:9 , reg byte x , reg byte y , -Potential registers zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] : zp[1]:10 , reg byte x , reg byte y , -Potential registers zp[1]:11 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] : zp[1]:11 , reg byte x , reg byte y , -Potential registers zp[1]:12 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] : zp[1]:12 , reg byte x , reg byte y , -Potential registers zp[1]:13 [ init::sx#2 init::sx#1 ] : zp[1]:13 , reg byte x , reg byte y , -Potential registers zp[2]:14 [ init::xp#2 init::xp#1 ] : zp[2]:14 , -Potential registers zp[1]:16 [ init::ss#2 init::ss#1 ] : zp[1]:16 , reg byte x , reg byte y , -Potential registers zp[1]:17 [ plexInit::i#2 plexInit::i#1 ] : zp[1]:17 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:5 [ loop::ss#5 loop::ss#1 ] : zp[1]:5 , +Potential registers zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] : zp[1]:6 , reg byte x , reg byte y , +Potential registers zp[1]:7 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] : zp[1]:7 , reg byte x , reg byte y , +Potential registers zp[1]:8 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] : zp[1]:8 , reg byte x , reg byte y , +Potential registers zp[1]:9 [ init::sx#2 init::sx#1 ] : zp[1]:9 , reg byte x , reg byte y , +Potential registers zp[2]:10 [ init::xp#2 init::xp#1 ] : zp[2]:10 , +Potential registers zp[1]:12 [ init::ss#2 init::ss#1 ] : zp[1]:12 , reg byte x , reg byte y , +Potential registers zp[1]:13 [ plexInit::i#2 plexInit::i#1 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:14 [ plex_show_idx ] : zp[1]:14 , +Potential registers zp[1]:15 [ plex_sprite_idx ] : zp[1]:15 , +Potential registers zp[1]:16 [ plex_sprite_msb ] : zp[1]:16 , +Potential registers zp[1]:17 [ plex_free_next ] : zp[1]:17 , Potential registers zp[1]:18 [ loop::$5 ] : zp[1]:18 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] : zp[1]:19 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] : zp[1]:20 , reg byte x , reg byte y , -Potential registers zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] : zp[1]:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] : zp[1]:20 , +Potential registers zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] : zp[1]:21 , reg byte a , reg byte x , Potential registers zp[1]:22 [ plexShowSprite::plexFreeAdd1_$0 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:23 [ plexShowSprite::plexFreeAdd1_$1 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:24 [ plexShowSprite::xpos_idx#0 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:25 [ plexShowSprite::$11 ] : zp[1]:25 , reg byte x , reg byte y , -Potential registers zp[1]:26 [ plexShowSprite::$2 ] : zp[1]:26 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:27 [ plexShowSprite::$3 ] : zp[1]:27 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:28 [ plexShowSprite::$9 ] : zp[1]:28 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:29 [ plexShowSprite::$5 ] : zp[1]:29 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:30 [ plexSort::nxt_idx#0 ] : zp[1]:30 , reg byte x , reg byte y , -Potential registers zp[1]:31 [ plexSort::nxt_y#0 ] : zp[1]:31 , reg byte x , reg byte y , -Potential registers zp[1]:32 [ plexSort::s#2 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:33 [ init::$5 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:24 [ plexShowSprite::plexFreeAdd1_$2 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:25 [ plexShowSprite::xpos_idx#0 ] : zp[1]:25 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:26 [ plexShowSprite::$11 ] : zp[1]:26 , reg byte x , +Potential registers zp[1]:27 [ plexShowSprite::$2 ] : zp[1]:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:28 [ plexShowSprite::$3 ] : zp[1]:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:29 [ plexShowSprite::$9 ] : zp[1]:29 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:30 [ plexShowSprite::$5 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:31 [ plexShowSprite::$6 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:32 [ plexSort::nxt_idx#0 ] : zp[1]:32 , reg byte x , reg byte y , +Potential registers zp[1]:33 [ plexSort::nxt_y#0 ] : zp[1]:33 , reg byte x , reg byte y , +Potential registers zp[1]:34 [ plexSort::s#2 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:35 [ init::$5 ] : zp[1]:35 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [plexSort] 36,166,672.83: zp[1]:11 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] 3,000,003: zp[1]:12 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] 2,000,002: zp[1]:32 [ plexSort::s#2 ] 1,916,668.58: zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] 1,500,000.38: zp[1]:31 [ plexSort::nxt_y#0 ] 300,000.3: zp[1]:30 [ plexSort::nxt_idx#0 ] -Uplift Scope [plexShowSprite] 200,002: zp[1]:22 [ plexShowSprite::plexFreeAdd1_$0 ] 200,002: zp[1]:23 [ plexShowSprite::plexFreeAdd1_$1 ] 200,002: zp[1]:24 [ plexShowSprite::xpos_idx#0 ] 200,002: zp[1]:26 [ plexShowSprite::$2 ] 200,002: zp[1]:27 [ plexShowSprite::$3 ] 200,002: zp[1]:28 [ plexShowSprite::$9 ] 200,002: zp[1]:29 [ plexShowSprite::$5 ] 150,001.5: zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] 100,001: zp[1]:25 [ plexShowSprite::$11 ] 27,273: zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] -Uplift Scope [] 134,401.56: zp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] 29,305.99: zp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] 27,000.49: zp[1]:5 [ plex_free_next#17 plex_free_next#13 ] 25,091.29: zp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -Uplift Scope [loop] 55,001: zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] 25,002.5: zp[1]:4 [ loop::sy#2 loop::sy#1 ] 24,171.33: zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] 20,002: zp[1]:18 [ loop::$5 ] 18,335.17: zp[1]:9 [ loop::ss#5 loop::ss#1 ] 467.13: zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] -Uplift Scope [plexInit] 35,003.5: zp[1]:17 [ plexInit::i#2 plexInit::i#1 ] -Uplift Scope [init] 3,003: zp[1]:16 [ init::ss#2 init::ss#1 ] 2,302.3: zp[1]:13 [ init::sx#2 init::sx#1 ] 2,002: zp[1]:33 [ init::$5 ] 1,418.08: zp[2]:14 [ init::xp#2 init::xp#1 ] +Uplift Scope [plexSort] 36,166,672.83: zp[1]:7 [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] 3,000,003: zp[1]:8 [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] 2,000,002: zp[1]:34 [ plexSort::s#2 ] 1,916,668.58: zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] 1,500,000.38: zp[1]:33 [ plexSort::nxt_y#0 ] 300,000.3: zp[1]:32 [ plexSort::nxt_idx#0 ] +Uplift Scope [plexShowSprite] 200,002: zp[1]:22 [ plexShowSprite::plexFreeAdd1_$0 ] 200,002: zp[1]:23 [ plexShowSprite::plexFreeAdd1_$1 ] 200,002: zp[1]:24 [ plexShowSprite::plexFreeAdd1_$2 ] 200,002: zp[1]:25 [ plexShowSprite::xpos_idx#0 ] 200,002: zp[1]:27 [ plexShowSprite::$2 ] 200,002: zp[1]:28 [ plexShowSprite::$3 ] 200,002: zp[1]:29 [ plexShowSprite::$9 ] 200,002: zp[1]:30 [ plexShowSprite::$5 ] 200,002: zp[1]:31 [ plexShowSprite::$6 ] 150,001.5: zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] 100,001: zp[1]:26 [ plexShowSprite::$11 ] 25,000.25: zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] +Uplift Scope [loop] 55,001: zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] 25,002.5: zp[1]:4 [ loop::sy#2 loop::sy#1 ] 24,171.33: zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] 20,002: zp[1]:18 [ loop::$5 ] 18,335.17: zp[1]:5 [ loop::ss#5 loop::ss#1 ] 467.13: zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] +Uplift Scope [] 13,261.07: zp[1]:16 [ plex_sprite_msb ] 10,625.17: zp[1]:14 [ plex_show_idx ] 9,111.27: zp[1]:15 [ plex_sprite_idx ] 8,421.24: zp[1]:17 [ plex_free_next ] +Uplift Scope [plexInit] 35,003.5: zp[1]:13 [ plexInit::i#2 plexInit::i#1 ] +Uplift Scope [init] 3,003: zp[1]:12 [ init::ss#2 init::ss#1 ] 2,302.3: zp[1]:9 [ init::sx#2 init::sx#1 ] 2,002: zp[1]:35 [ init::$5 ] 1,418.08: zp[2]:10 [ init::xp#2 init::xp#1 ] Uplift Scope [main] -Uplifting [plexSort] best 84432 combination reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] zp[1]:32 [ plexSort::s#2 ] zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] zp[1]:31 [ plexSort::nxt_y#0 ] zp[1]:30 [ plexSort::nxt_idx#0 ] +Uplifting [plexSort] best 82790 combination reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] zp[1]:34 [ plexSort::s#2 ] zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] zp[1]:33 [ plexSort::nxt_y#0 ] zp[1]:32 [ plexSort::nxt_idx#0 ] Limited combination testing to 10 combinations of 972 possible. -Uplifting [plexShowSprite] best 84422 combination reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] zp[1]:24 [ plexShowSprite::xpos_idx#0 ] zp[1]:26 [ plexShowSprite::$2 ] zp[1]:27 [ plexShowSprite::$3 ] zp[1]:28 [ plexShowSprite::$9 ] zp[1]:29 [ plexShowSprite::$5 ] zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] zp[1]:25 [ plexShowSprite::$11 ] zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] -Limited combination testing to 10 combinations of 589824 possible. -Uplifting [] best 84422 combination zp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] zp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] zp[1]:5 [ plex_free_next#17 plex_free_next#13 ] zp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -Limited combination testing to 10 combinations of 81 possible. -Uplifting [loop] best 83222 combination zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] reg byte y [ loop::sy#2 loop::sy#1 ] zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] zp[1]:18 [ loop::$5 ] zp[1]:9 [ loop::ss#5 loop::ss#1 ] zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] -Limited combination testing to 10 combinations of 1296 possible. -Uplifting [plexInit] best 83102 combination reg byte x [ plexInit::i#2 plexInit::i#1 ] -Uplifting [init] best 82852 combination reg byte x [ init::ss#2 init::ss#1 ] reg byte x [ init::sx#2 init::sx#1 ] zp[1]:33 [ init::$5 ] zp[2]:14 [ init::xp#2 init::xp#1 ] +Uplifting [plexShowSprite] best 82780 combination reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] zp[1]:24 [ plexShowSprite::plexFreeAdd1_$2 ] zp[1]:25 [ plexShowSprite::xpos_idx#0 ] zp[1]:27 [ plexShowSprite::$2 ] zp[1]:28 [ plexShowSprite::$3 ] zp[1]:29 [ plexShowSprite::$9 ] zp[1]:30 [ plexShowSprite::$5 ] zp[1]:31 [ plexShowSprite::$6 ] zp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] zp[1]:26 [ plexShowSprite::$11 ] zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] +Limited combination testing to 10 combinations of 1572864 possible. +Uplifting [loop] best 81580 combination zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] reg byte y [ loop::sy#2 loop::sy#1 ] zp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] zp[1]:18 [ loop::$5 ] zp[1]:5 [ loop::ss#5 loop::ss#1 ] zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] +Limited combination testing to 10 combinations of 144 possible. +Uplifting [] best 81580 combination zp[1]:16 [ plex_sprite_msb ] zp[1]:14 [ plex_show_idx ] zp[1]:15 [ plex_sprite_idx ] zp[1]:17 [ plex_free_next ] +Uplifting [plexInit] best 81460 combination reg byte x [ plexInit::i#2 plexInit::i#1 ] +Uplifting [init] best 81210 combination reg byte x [ init::ss#2 init::ss#1 ] reg byte x [ init::sx#2 init::sx#1 ] zp[1]:35 [ init::$5 ] zp[2]:10 [ init::xp#2 init::xp#1 ] Limited combination testing to 10 combinations of 36 possible. -Uplifting [main] best 82852 combination -Attempting to uplift remaining variables inzp[1]:32 [ plexSort::s#2 ] -Uplifting [plexSort] best 82252 combination reg byte x [ plexSort::s#2 ] -Attempting to uplift remaining variables inzp[1]:10 [ plexSort::m#2 plexSort::m#1 ] -Uplifting [plexSort] best 82252 combination zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] -Attempting to uplift remaining variables inzp[1]:31 [ plexSort::nxt_y#0 ] -Uplifting [plexSort] best 82252 combination zp[1]:31 [ plexSort::nxt_y#0 ] -Attempting to uplift remaining variables inzp[1]:30 [ plexSort::nxt_idx#0 ] -Uplifting [plexSort] best 82252 combination zp[1]:30 [ plexSort::nxt_idx#0 ] -Attempting to uplift remaining variables inzp[1]:24 [ plexShowSprite::xpos_idx#0 ] -Uplifting [plexShowSprite] best 82246 combination reg byte a [ plexShowSprite::xpos_idx#0 ] -Attempting to uplift remaining variables inzp[1]:26 [ plexShowSprite::$2 ] -Uplifting [plexShowSprite] best 82240 combination reg byte a [ plexShowSprite::$2 ] -Attempting to uplift remaining variables inzp[1]:27 [ plexShowSprite::$3 ] -Uplifting [plexShowSprite] best 82234 combination reg byte a [ plexShowSprite::$3 ] -Attempting to uplift remaining variables inzp[1]:28 [ plexShowSprite::$9 ] -Uplifting [plexShowSprite] best 82228 combination reg byte a [ plexShowSprite::$9 ] -Attempting to uplift remaining variables inzp[1]:29 [ plexShowSprite::$5 ] -Uplifting [plexShowSprite] best 82222 combination reg byte x [ plexShowSprite::$5 ] +Uplifting [main] best 81210 combination +Attempting to uplift remaining variables inzp[1]:34 [ plexSort::s#2 ] +Uplifting [plexSort] best 80610 combination reg byte x [ plexSort::s#2 ] +Attempting to uplift remaining variables inzp[1]:6 [ plexSort::m#2 plexSort::m#1 ] +Uplifting [plexSort] best 80610 combination zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] +Attempting to uplift remaining variables inzp[1]:33 [ plexSort::nxt_y#0 ] +Uplifting [plexSort] best 80610 combination zp[1]:33 [ plexSort::nxt_y#0 ] +Attempting to uplift remaining variables inzp[1]:32 [ plexSort::nxt_idx#0 ] +Uplifting [plexSort] best 80610 combination zp[1]:32 [ plexSort::nxt_idx#0 ] +Attempting to uplift remaining variables inzp[1]:24 [ plexShowSprite::plexFreeAdd1_$2 ] +Uplifting [plexShowSprite] best 80606 combination reg byte a [ plexShowSprite::plexFreeAdd1_$2 ] +Attempting to uplift remaining variables inzp[1]:25 [ plexShowSprite::xpos_idx#0 ] +Uplifting [plexShowSprite] best 80600 combination reg byte a [ plexShowSprite::xpos_idx#0 ] +Attempting to uplift remaining variables inzp[1]:27 [ plexShowSprite::$2 ] +Uplifting [plexShowSprite] best 80594 combination reg byte a [ plexShowSprite::$2 ] +Attempting to uplift remaining variables inzp[1]:28 [ plexShowSprite::$3 ] +Uplifting [plexShowSprite] best 80588 combination reg byte a [ plexShowSprite::$3 ] +Attempting to uplift remaining variables inzp[1]:29 [ plexShowSprite::$9 ] +Uplifting [plexShowSprite] best 80582 combination reg byte a [ plexShowSprite::$9 ] +Attempting to uplift remaining variables inzp[1]:30 [ plexShowSprite::$5 ] +Uplifting [plexShowSprite] best 80576 combination reg byte x [ plexShowSprite::$5 ] +Attempting to uplift remaining variables inzp[1]:31 [ plexShowSprite::$6 ] +Uplifting [plexShowSprite] best 80572 combination reg byte a [ plexShowSprite::$6 ] Attempting to uplift remaining variables inzp[1]:21 [ plexShowSprite::plexFreeAdd1_ypos#0 ] -Uplifting [plexShowSprite] best 82213 combination reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] -Attempting to uplift remaining variables inzp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -Uplifting [] best 82213 combination zp[1]:8 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -Attempting to uplift remaining variables inzp[1]:25 [ plexShowSprite::$11 ] -Uplifting [plexShowSprite] best 82206 combination reg byte x [ plexShowSprite::$11 ] +Uplifting [plexShowSprite] best 80563 combination reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] +Attempting to uplift remaining variables inzp[1]:26 [ plexShowSprite::$11 ] +Uplifting [plexShowSprite] best 80556 combination reg byte x [ plexShowSprite::$11 ] Attempting to uplift remaining variables inzp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] -Uplifting [loop] best 82206 combination zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] -Attempting to uplift remaining variables inzp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] -Uplifting [] best 82206 combination zp[1]:7 [ plex_show_idx#42 plex_show_idx#15 ] +Uplifting [loop] best 80556 combination zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] Attempting to uplift remaining variables inzp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] -Uplifting [plexShowSprite] best 82206 combination zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] -Attempting to uplift remaining variables inzp[1]:5 [ plex_free_next#17 plex_free_next#13 ] -Uplifting [] best 82206 combination zp[1]:5 [ plex_free_next#17 plex_free_next#13 ] -Attempting to uplift remaining variables inzp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -Uplifting [] best 82206 combination zp[1]:6 [ plex_sprite_idx#42 plex_sprite_idx#15 ] +Uplifting [plexShowSprite] best 80556 combination zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] Attempting to uplift remaining variables inzp[1]:3 [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] -Uplifting [loop] best 81476 combination reg byte x [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] +Uplifting [loop] best 79826 combination reg byte x [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] Attempting to uplift remaining variables inzp[1]:18 [ loop::$5 ] -Uplifting [loop] best 80876 combination reg byte a [ loop::$5 ] -Attempting to uplift remaining variables inzp[1]:9 [ loop::ss#5 loop::ss#1 ] -Uplifting [loop] best 80876 combination zp[1]:9 [ loop::ss#5 loop::ss#1 ] -Attempting to uplift remaining variables inzp[1]:33 [ init::$5 ] -Uplifting [init] best 80836 combination reg byte a [ init::$5 ] +Uplifting [loop] best 79226 combination reg byte a [ loop::$5 ] +Attempting to uplift remaining variables inzp[1]:5 [ loop::ss#5 loop::ss#1 ] +Uplifting [loop] best 79226 combination zp[1]:5 [ loop::ss#5 loop::ss#1 ] +Attempting to uplift remaining variables inzp[1]:16 [ plex_sprite_msb ] +Uplifting [] best 79226 combination zp[1]:16 [ plex_sprite_msb ] +Attempting to uplift remaining variables inzp[1]:14 [ plex_show_idx ] +Uplifting [] best 79226 combination zp[1]:14 [ plex_show_idx ] +Attempting to uplift remaining variables inzp[1]:15 [ plex_sprite_idx ] +Uplifting [] best 79226 combination zp[1]:15 [ plex_sprite_idx ] +Attempting to uplift remaining variables inzp[1]:17 [ plex_free_next ] +Uplifting [] best 79226 combination zp[1]:17 [ plex_free_next ] +Attempting to uplift remaining variables inzp[1]:35 [ init::$5 ] +Uplifting [init] best 79186 combination reg byte a [ init::$5 ] Attempting to uplift remaining variables inzp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] -Uplifting [loop] best 80836 combination zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] -Coalescing zero page register [ zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] ] with [ zp[1]:10 [ plexSort::m#2 plexSort::m#1 ] ] -Coalescing zero page register [ zp[1]:30 [ plexSort::nxt_idx#0 ] ] with [ zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] ] -Allocated (was zp[1]:5) zp[1]:3 [ plex_free_next#17 plex_free_next#13 ] -Allocated (was zp[1]:6) zp[1]:4 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -Allocated (was zp[1]:7) zp[1]:5 [ plex_show_idx#42 plex_show_idx#15 ] -Allocated (was zp[1]:8) zp[1]:6 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -Allocated (was zp[1]:9) zp[1]:7 [ loop::ss#5 loop::ss#1 ] -Allocated (was zp[2]:14) zp[2]:8 [ init::xp#2 init::xp#1 ] +Uplifting [loop] best 79186 combination zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] +Coalescing zero page register [ zp[1]:19 [ loop::plexFreeNextYpos1_return#0 ] ] with [ zp[1]:6 [ plexSort::m#2 plexSort::m#1 ] ] +Coalescing zero page register [ zp[1]:32 [ plexSort::nxt_idx#0 ] ] with [ zp[1]:20 [ plexShowSprite::plex_sprite_idx2#0 ] ] +Allocated (was zp[1]:5) zp[1]:3 [ loop::ss#5 loop::ss#1 ] +Allocated (was zp[2]:10) zp[2]:4 [ init::xp#2 init::xp#1 ] +Allocated (was zp[1]:14) zp[1]:6 [ plex_show_idx ] +Allocated (was zp[1]:15) zp[1]:7 [ plex_sprite_idx ] +Allocated (was zp[1]:16) zp[1]:8 [ plex_sprite_msb ] +Allocated (was zp[1]:17) zp[1]:9 [ plex_free_next ] Allocated (was zp[1]:19) zp[1]:10 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ] -Allocated (was zp[1]:30) zp[1]:11 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] -Allocated (was zp[1]:31) zp[1]:12 [ plexSort::nxt_y#0 ] +Allocated (was zp[1]:32) zp[1]:11 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] +Allocated (was zp[1]:33) zp[1]:12 [ plexSort::nxt_y#0 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -2934,32 +2531,49 @@ ASSEMBLER BEFORE OPTIMIZATION // Location of screen & sprites .label SCREEN = $400 .label SPRITE = $2000 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 6 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 3 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 4 - // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 5 + .label plex_show_idx = 6 + .label plex_sprite_idx = 7 + .label plex_sprite_msb = 8 + .label plex_free_next = 9 // @begin __bbegin: jmp __b1 // @1 __b1: - // kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} - // [2] phi from @1 to @2 [phi:@1->@2] -__b2_from___b1: + // [1] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index in the PLEX tables of the next sprite to show + lda #0 + sta.z plex_show_idx + // [2] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index the next sprite to use for showing (sprites are used round-robin) + lda #0 + sta.z plex_sprite_idx + // [3] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb jmp __b2 // @2 __b2: - // [3] call main + // [4] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next + jmp __b3 + // @3 +__b3: + // kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} + // [6] phi from @3 to @4 [phi:@3->@4] +__b4_from___b3: + jmp __b4 + // @4 +__b4: + // [7] call main jsr main - // [4] phi from @2 to @end [phi:@2->@end] -__bend_from___b2: + // [8] phi from @4 to @end [phi:@4->@end] +__bend_from___b4: jmp __bend // @end __bend: @@ -2967,21 +2581,21 @@ __bend: main: { // asm { sei } sei - // [6] call init + // [10] call init jsr init - // [7] phi from main to main::@1 [phi:main->main::@1] + // [11] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: jmp __b1 // main::@1 __b1: - // [8] call loop - // [10] phi from main::@1 to loop [phi:main::@1->loop] + // [12] call loop + // [14] phi from main::@1 to loop [phi:main::@1->loop] loop_from___b1: jsr loop jmp __breturn // main::@return __breturn: - // [9] return + // [13] return rts } // loop @@ -2990,10 +2604,10 @@ loop: { // The current index into the y-sinus .label sin_idx = 2 .label plexFreeNextYpos1_return = $a - .label ss = 7 - // [11] phi from loop to loop::@1 [phi:loop->loop::@1] + .label ss = 3 + // [15] phi from loop to loop::@1 [phi:loop->loop::@1] __b1_from_loop: - // [11] phi (byte) loop::sin_idx#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 + // [15] phi (byte) loop::sin_idx#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 lda #0 sta.z sin_idx jmp __b1 @@ -3002,138 +2616,122 @@ loop: { jmp __b2 // loop::@2 __b2: - // [12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + // [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 lda #$ff cmp RASTER bne __b2 jmp __b3 // loop::@3 __b3: - // [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [17] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [14] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 -- vbuxx=vbuz1 + // [18] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 -- vbuxx=vbuz1 ldx.z sin_idx - // [15] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] + // [19] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] __b4_from___b3: - // [15] phi (byte) loop::sy#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuyy=vbuc1 + // [19] phi (byte) loop::sy#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuyy=vbuc1 ldy #0 - // [15] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#4 [phi:loop::@3->loop::@4#1] -- register_copy + // [19] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#4 [phi:loop::@3->loop::@4#1] -- register_copy jmp __b4 - // [15] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4] + // [19] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4] __b4_from___b4: - // [15] phi (byte) loop::sy#2 = (byte) loop::sy#1 [phi:loop::@4->loop::@4#0] -- register_copy - // [15] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#1 [phi:loop::@4->loop::@4#1] -- register_copy + // [19] phi (byte) loop::sy#2 = (byte) loop::sy#1 [phi:loop::@4->loop::@4#0] -- register_copy + // [19] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#1 [phi:loop::@4->loop::@4#1] -- register_copy jmp __b4 // loop::@4 __b4: - // [16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx + // [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx lda YSIN,x sta PLEX_YPOS,y - // [17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 -- vbuxx=vbuxx_plus_vbuc1 + // [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[8] - // [18] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 -- vbuyy=_inc_vbuyy + // [22] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 -- vbuyy=_inc_vbuyy iny - // [19] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 -- vbuyy_neq_vbuc1_then_la1 + // [23] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 -- vbuyy_neq_vbuc1_then_la1 cpy #PLEX_COUNT-1+1 bne __b4_from___b4 jmp __b5 // loop::@5 __b5: - // [20] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 + // [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 inc.z sin_idx - // [21] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [22] call plexSort - // [60] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] + // [26] call plexSort + // [65] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] plexSort_from___b5: jsr plexSort jmp __b11 // loop::@11 __b11: - // [23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp __b6 // loop::@6 __b6: - // [24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 lda #VIC_RST8 and D011 - // [25] if((byte~) loop::$5!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 + // [29] if((byte~) loop::$5!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne __b6 - // [26] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] + // [30] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] __b7_from___b6: - // [26] phi (byte) loop::ss#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 + // [30] phi (byte) loop::ss#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 lda #0 sta.z ss - // [26] phi (byte) plex_sprite_msb#42 = (byte) 1 [phi:loop::@6->loop::@7#1] -- vbuz1=vbuc1 - lda #1 - sta.z plex_sprite_msb - // [26] phi (byte) plex_show_idx#42 = (byte) 0 [phi:loop::@6->loop::@7#2] -- vbuz1=vbuc1 - lda #0 - sta.z plex_show_idx - // [26] phi (byte) plex_sprite_idx#42 = (byte) 0 [phi:loop::@6->loop::@7#3] -- vbuz1=vbuc1 - lda #0 - sta.z plex_sprite_idx - // [26] phi (byte) plex_free_next#17 = (byte) 0 [phi:loop::@6->loop::@7#4] -- vbuz1=vbuc1 - lda #0 - sta.z plex_free_next jmp __b7 // Show the sprites - // [26] phi from loop::@12 to loop::@7 [phi:loop::@12->loop::@7] + // [30] phi from loop::@12 to loop::@7 [phi:loop::@12->loop::@7] __b7_from___b12: - // [26] phi (byte) loop::ss#5 = (byte) loop::ss#1 [phi:loop::@12->loop::@7#0] -- register_copy - // [26] phi (byte) plex_sprite_msb#42 = (byte) plex_sprite_msb#16 [phi:loop::@12->loop::@7#1] -- register_copy - // [26] phi (byte) plex_show_idx#42 = (byte) plex_show_idx#15 [phi:loop::@12->loop::@7#2] -- register_copy - // [26] phi (byte) plex_sprite_idx#42 = (byte) plex_sprite_idx#15 [phi:loop::@12->loop::@7#3] -- register_copy - // [26] phi (byte) plex_free_next#17 = (byte) plex_free_next#13 [phi:loop::@12->loop::@7#4] -- register_copy + // [30] phi (byte) loop::ss#5 = (byte) loop::ss#1 [phi:loop::@12->loop::@7#0] -- register_copy jmp __b7 // loop::@7 __b7: - // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL jmp plexFreeNextYpos1 // loop::plexFreeNextYpos1 plexFreeNextYpos1: - // [28] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) -- vbuz1=pbuc1_derefidx_vbuz2 + // [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return jmp __b8 // loop::@8 __b8: - // [29] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [33] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp.z plexFreeNextYpos1_return bcc __b8 jmp __b9 // loop::@9 __b9: - // [30] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [34] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [31] call plexShowSprite + // [35] call plexShowSprite jsr plexShowSprite jmp __b12 // loop::@12 __b12: - // [32] (byte) loop::ss#1 ← ++ (byte) loop::ss#5 -- vbuz1=_inc_vbuz1 + // [36] (byte) loop::ss#1 ← ++ (byte) loop::ss#5 -- vbuz1=_inc_vbuz1 inc.z ss - // [33] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 + // [37] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-1+1 cmp.z ss bne __b7_from___b12 jmp __b10 // loop::@10 __b10: - // [34] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [11] phi from loop::@10 to loop::@1 [phi:loop::@10->loop::@1] + // [15] phi from loop::@10 to loop::@1 [phi:loop::@10->loop::@1] __b1_from___b10: - // [11] phi (byte) loop::sin_idx#6 = (byte) loop::sin_idx#1 [phi:loop::@10->loop::@1#0] -- register_copy + // [15] phi (byte) loop::sin_idx#6 = (byte) loop::sin_idx#1 [phi:loop::@10->loop::@1#0] -- register_copy jmp __b1 } // plexShowSprite @@ -3141,105 +2739,101 @@ loop: { // plexSort() prepares showing the sprites plexShowSprite: { .label plex_sprite_idx2 = $b - // [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z plex_sprite_idx asl sta.z plex_sprite_idx2 - // [36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) + // [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_YPOS,y - // [37] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa + // [41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_sprite_idx2 sta SPRITES_YPOS,y jmp plexFreeAdd1 // plexShowSprite::plexFreeAdd1 plexFreeAdd1: - // [38] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 + // [42] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 clc adc #$15 - // [39] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa + // [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_free_next sta PLEX_FREE_YPOS,y - // [40] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [44] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z plex_free_next inx - // [41] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_free_next - jmp __b4 - // plexShowSprite::@4 - __b4: - // [42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) + // [45] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + // [46] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 -- vbuz1=vbuaa + sta.z plex_free_next + jmp __b5 + // plexShowSprite::@5 + __b5: + // [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_PTR,y ldx.z plex_sprite_idx sta PLEX_SCREEN_PTR,x - // [43] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42) -- vbuaa=pbuc1_derefidx_vbuz1 + // [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) -- vbuaa=pbuc1_derefidx_vbuz1 ldy.z plex_show_idx lda PLEX_SORTED_IDX,y - // [44] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuxx=vbuaa_rol_1 + // [49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1 -- vbuxx=vbuaa_rol_1 asl tax - // [45] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_lo_pwuc1_derefidx_vbuxx + // [50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_lo_pwuc1_derefidx_vbuxx lda PLEX_XPOS,x - // [46] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuaa + // [51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_sprite_idx2 sta SPRITES_XPOS,y - // [47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx + // [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx lda PLEX_XPOS+1,x - // [48] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 + // [53] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 cmp #0 bne __b1 jmp __b3 // plexShowSprite::@3 __b3: - // [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 -- vbuaa=vbuc1_bxor_vbuz1 + // [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor.z plex_sprite_msb - // [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + // [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB jmp __b2 // plexShowSprite::@2 __b2: - // [51] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#42 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [56] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z plex_sprite_idx inx - // [52] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_sprite_idx - // [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#42 -- vbuz1=_inc_vbuz1 + // [57] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + // [58] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 -- vbuz1=vbuaa + sta.z plex_sprite_idx + // [59] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx -- vbuz1=_inc_vbuz1 inc.z plex_show_idx - // [54] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [60] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z plex_sprite_msb - // [55] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 -- vbuz1_neq_0_then_la1 + // [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -- vbuz1_neq_0_then_la1 lda.z plex_sprite_msb cmp #0 - bne __b5_from___b2 - // [57] phi from plexShowSprite::@2 to plexShowSprite::@return [phi:plexShowSprite::@2->plexShowSprite::@return] - __breturn_from___b2: - // [57] phi (byte) plex_sprite_msb#16 = (byte) 1 [phi:plexShowSprite::@2->plexShowSprite::@return#0] -- vbuz1=vbuc1 + bne __breturn + jmp __b4 + // plexShowSprite::@4 + __b4: + // [62] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 lda #1 sta.z plex_sprite_msb jmp __breturn - // [56] phi from plexShowSprite::@2 to plexShowSprite::@5 [phi:plexShowSprite::@2->plexShowSprite::@5] - __b5_from___b2: - jmp __b5 - // plexShowSprite::@5 - __b5: - // [57] phi from plexShowSprite::@5 to plexShowSprite::@return [phi:plexShowSprite::@5->plexShowSprite::@return] - __breturn_from___b5: - // [57] phi (byte) plex_sprite_msb#16 = (byte) plex_sprite_msb#3 [phi:plexShowSprite::@5->plexShowSprite::@return#0] -- register_copy - jmp __breturn // plexShowSprite::@return __breturn: - // [58] return + // [63] return rts // plexShowSprite::@1 __b1: - // [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + // [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -3259,27 +2853,27 @@ plexSort: { .label nxt_idx = $b .label nxt_y = $c .label m = $a - // [61] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] + // [66] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] __b1_from_plexSort: - // [61] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 + // [66] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 lda #0 sta.z m jmp __b1 - // [61] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] + // [66] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] __b1_from___b2: - // [61] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy + // [66] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy jmp __b1 // plexSort::@1 __b1: - // [62] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [67] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx - // [63] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [68] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z nxt_idx lda PLEX_YPOS,y sta.z nxt_y - // [64] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + // [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 lda.z nxt_y ldx.z m ldy PLEX_SORTED_IDX,x @@ -3288,121 +2882,140 @@ plexSort: { jmp __b5 // plexSort::@5 __b5: - // [65] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 + // [70] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 ldx.z m - // [66] phi from plexSort::@5 plexSort::@6 to plexSort::@3 [phi:plexSort::@5/plexSort::@6->plexSort::@3] + // [71] phi from plexSort::@5 plexSort::@7 to plexSort::@3 [phi:plexSort::@5/plexSort::@7->plexSort::@3] __b3_from___b5: - __b3_from___b6: - // [66] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@6->plexSort::@3#0] -- register_copy + __b3_from___b7: + // [71] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@7->plexSort::@3#0] -- register_copy jmp __b3 // plexSort::@3 __b3: - // [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + // [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx lda PLEX_SORTED_IDX,x sta PLEX_SORTED_IDX+1,x - // [68] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx + // [73] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx dex - // [69] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuxx_eq_vbuc1_then_la1 + // [74] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -- vbuxx_eq_vbuc1_then_la1 cpx #$ff beq __b4 - jmp __b6 - // plexSort::@6 - __b6: - // [70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 + jmp __b7 + // plexSort::@7 + __b7: + // [75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -- vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 lda.z nxt_y ldy PLEX_SORTED_IDX,x cmp PLEX_YPOS,y - bcc __b3_from___b6 + bcc __b3_from___b7 jmp __b4 // plexSort::@4 __b4: - // [71] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuxx=_inc_vbuxx + // [76] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1 -- vbuxx=_inc_vbuxx inx - // [72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuxx=vbuz1 + // [77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z nxt_idx sta PLEX_SORTED_IDX,x jmp __b2 // plexSort::@2 __b2: - // [73] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 + // [78] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2 -- vbuz1=_inc_vbuz1 inc.z m - // [74] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 + // [79] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLEX_COUNT-2+1 cmp.z m bne __b1_from___b2 - // [75] phi from plexSort::@2 to plexSort::plexFreePrepare1 [phi:plexSort::@2->plexSort::plexFreePrepare1] - plexFreePrepare1_from___b2: + jmp __b6 + // plexSort::@6 + __b6: + // [80] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // Prepare for showing the sprites + lda #0 + sta.z plex_show_idx + // [81] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_sprite_idx + // [82] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + lda #1 + sta.z plex_sprite_msb + // [83] phi from plexSort::@6 to plexSort::plexFreePrepare1 [phi:plexSort::@6->plexSort::plexFreePrepare1] + plexFreePrepare1_from___b6: jmp plexFreePrepare1 // plexSort::plexFreePrepare1 plexFreePrepare1: - // [76] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] + // [84] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1: - // [76] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 + // [84] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 ldx #0 jmp plexFreePrepare1___b1 - // [76] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] + // [84] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] plexFreePrepare1___b1_from_plexFreePrepare1___b1: - // [76] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy + // [84] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy jmp plexFreePrepare1___b1 // plexSort::plexFreePrepare1_@1 plexFreePrepare1___b1: - // [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PLEX_FREE_YPOS,x - // [78] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx + // [86] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx inx - // [79] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 + // [87] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne plexFreePrepare1___b1_from_plexFreePrepare1___b1 + jmp plexFreePrepare1___b2 + // plexSort::plexFreePrepare1_@2 + plexFreePrepare1___b2: + // [88] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z plex_free_next jmp __breturn // plexSort::@return __breturn: - // [80] return + // [89] return rts } // init // Initialize the program init: { // Set the x-positions & pointers - .label xp = 8 - // [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + .label xp = 4 + // [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_RSEL|3 sta D011 - // [82] call plexInit + // [91] call plexInit // Initialize the multiplexer - // [96] phi from init to plexInit [phi:init->plexInit] + // [105] phi from init to plexInit [phi:init->plexInit] plexInit_from_init: jsr plexInit - // [83] phi from init to init::@1 [phi:init->init::@1] + // [92] phi from init to init::@1 [phi:init->init::@1] __b1_from_init: - // [83] phi (word) init::xp#2 = (word) $20 [phi:init->init::@1#0] -- vwuz1=vwuc1 + // [92] phi (word) init::xp#2 = (word) $20 [phi:init->init::@1#0] -- vwuz1=vwuc1 lda #<$20 sta.z xp lda #>$20 sta.z xp+1 - // [83] phi (byte) init::sx#2 = (byte) 0 [phi:init->init::@1#1] -- vbuxx=vbuc1 + // [92] phi (byte) init::sx#2 = (byte) 0 [phi:init->init::@1#1] -- vbuxx=vbuc1 ldx #0 jmp __b1 - // [83] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + // [92] phi from init::@1 to init::@1 [phi:init::@1->init::@1] __b1_from___b1: - // [83] phi (word) init::xp#2 = (word) init::xp#1 [phi:init::@1->init::@1#0] -- register_copy - // [83] phi (byte) init::sx#2 = (byte) init::sx#1 [phi:init::@1->init::@1#1] -- register_copy + // [92] phi (word) init::xp#2 = (word) init::xp#1 [phi:init::@1->init::@1#0] -- register_copy + // [92] phi (byte) init::sx#2 = (byte) init::sx#1 [phi:init::@1->init::@1#1] -- register_copy jmp __b1 // init::@1 __b1: - // [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 + // [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #SPRITE/$40 sta PLEX_PTR,x - // [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 -- pwuc1_derefidx_vbuaa=vwuz1 + // [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 -- pwuc1_derefidx_vbuaa=vwuz1 tay lda.z xp sta PLEX_XPOS,y lda.z xp+1 sta PLEX_XPOS+1,y - // [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 -- vwuz1=vwuz1_plus_vbuc1 + // [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 -- vwuz1=vwuz1_plus_vbuc1 lda #9 clc adc.z xp @@ -3410,78 +3023,78 @@ init: { bcc !+ inc.z xp+1 !: - // [88] (byte) init::sx#1 ← ++ (byte) init::sx#2 -- vbuxx=_inc_vbuxx + // [97] (byte) init::sx#1 ← ++ (byte) init::sx#2 -- vbuxx=_inc_vbuxx inx - // [89] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 + // [98] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #PLEX_COUNT-1+1 bne __b1_from___b1 jmp __b2 // init::@2 __b2: - // [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE - // [91] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + // [100] phi from init::@2 to init::@3 [phi:init::@2->init::@3] __b3_from___b2: - // [91] phi (byte) init::ss#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 + // [100] phi (byte) init::ss#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 ldx #0 jmp __b3 - // [91] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + // [100] phi from init::@3 to init::@3 [phi:init::@3->init::@3] __b3_from___b3: - // [91] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy + // [100] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy jmp __b3 // init::@3 __b3: - // [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN sta SPRITES_COLS,x - // [93] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx + // [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx inx - // [94] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b3_from___b3 jmp __breturn // init::@return __breturn: - // [95] return + // [104] return rts } // plexInit // Initialize the multiplexer data structures plexInit: { - // [97] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] + // [106] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] plexSetScreen1_from_plexInit: jmp plexSetScreen1 // plexInit::plexSetScreen1 plexSetScreen1: - // [98] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] + // [107] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] __b1_from_plexSetScreen1: - // [98] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 + // [107] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 ldx #0 jmp __b1 - // [98] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] + // [107] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] __b1_from___b1: - // [98] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy + // [107] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy jmp __b1 // plexInit::@1 __b1: - // [99] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx + // [108] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx txa sta PLEX_SORTED_IDX,x - // [100] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx + // [109] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx inx - // [101] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 + // [110] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #PLEX_COUNT-1+1 bne __b1_from___b1 jmp __breturn // plexInit::@return __breturn: - // [102] return + // [111] return rts } // File Data - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 @@ -3509,6 +3122,8 @@ YSIN: ASSEMBLER OPTIMIZATIONS Removing instruction jmp __b1 Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __b4 Removing instruction jmp __bend Removing instruction jmp __b1 Removing instruction jmp __breturn @@ -3526,19 +3141,21 @@ Removing instruction jmp __b9 Removing instruction jmp __b12 Removing instruction jmp __b10 Removing instruction jmp plexFreeAdd1 -Removing instruction jmp __b4 +Removing instruction jmp __b5 Removing instruction jmp __b3 Removing instruction jmp __b2 -Removing instruction jmp __b5 +Removing instruction jmp __b4 Removing instruction jmp __breturn Removing instruction jmp __b1 Removing instruction jmp __b5 Removing instruction jmp __b3 -Removing instruction jmp __b6 +Removing instruction jmp __b7 Removing instruction jmp __b4 Removing instruction jmp __b2 +Removing instruction jmp __b6 Removing instruction jmp plexFreePrepare1 Removing instruction jmp plexFreePrepare1___b1 +Removing instruction jmp plexFreePrepare1___b2 Removing instruction jmp __breturn Removing instruction jmp __b1 Removing instruction jmp __b2 @@ -3549,37 +3166,32 @@ Removing instruction jmp __b1 Removing instruction jmp __breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #0 -Removing instruction lda #0 Replacing instruction ldy.z nxt_idx with TAY Removing instruction lda.z nxt_y +Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __b4_from___b4 with __b4 Replacing label __b7_from___b12 with __b7 Replacing label __b1 with __b2 -Replacing label __b5_from___b2 with __b5 -Replacing label __breturn with __b5 -Replacing label __b3_from___b6 with __b3 +Replacing label __b3_from___b7 with __b3 Replacing label __b1_from___b2 with __b1 Replacing label plexFreePrepare1___b1_from_plexFreePrepare1___b1 with plexFreePrepare1___b1 Replacing label __b1_from___b1 with __b1 Replacing label __b3_from___b3 with __b3 Replacing label __b1_from___b1 with __b1 Removing instruction __b1: -Removing instruction __b2_from___b1: -Removing instruction __b2: -Removing instruction __bend_from___b2: +Removing instruction __b3: +Removing instruction __b4_from___b3: +Removing instruction __bend_from___b4: Removing instruction __b1_from_main: Removing instruction loop_from___b1: Removing instruction __b1: Removing instruction __b4_from___b4: Removing instruction __b7_from___b12: -Removing instruction __b5_from___b2: -Removing instruction __breturn_from___b5: -Removing instruction __breturn: Removing instruction __b1_from___b2: Removing instruction __b3_from___b5: -Removing instruction __b3_from___b6: -Removing instruction plexFreePrepare1_from___b2: +Removing instruction __b3_from___b7: +Removing instruction plexFreePrepare1_from___b6: Removing instruction plexFreePrepare1___b1_from_plexFreePrepare1: Removing instruction plexFreePrepare1___b1_from_plexFreePrepare1___b1: Removing instruction __b1_from___b1: @@ -3588,6 +3200,8 @@ Removing instruction plexSetScreen1_from_plexInit: Removing instruction __b1_from_plexSetScreen1: Removing instruction __b1_from___b1: Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __b2: +Removing instruction __b4: Removing instruction __bend: Removing instruction __b1: Removing instruction __breturn: @@ -3604,13 +3218,15 @@ Removing instruction __b12: Removing instruction __b10: Removing instruction __b1_from___b10: Removing instruction plexFreeAdd1: -Removing instruction __b4: +Removing instruction __b5: Removing instruction __b3: -Removing instruction __breturn_from___b2: +Removing instruction __b4: Removing instruction __b1_from_plexSort: Removing instruction __b5: +Removing instruction __b7: Removing instruction __b6: Removing instruction plexFreePrepare1: +Removing instruction plexFreePrepare1___b2: Removing instruction __breturn: Removing instruction plexInit_from_init: Removing instruction __b1_from_init: @@ -3620,11 +3236,8 @@ Removing instruction __breturn: Removing instruction plexSetScreen1: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination -Updating BasicUpstart to call main directly -Removing instruction jsr main -Succesful ASM optimization Pass5SkipBegin -Replacing jump to rts with rts in jmp __b5 -Succesful ASM optimization Pass5DoubleJumpElimination +Adding RTS to root block +Succesful ASM optimization Pass5AddMainRts Removing instruction jmp __b4 Removing instruction jmp __b7 Removing instruction jmp __b1 @@ -3634,13 +3247,14 @@ Removing instruction jmp __b3 Removing instruction jmp __b1 Succesful ASM optimization Pass5NextJumpElimination Removing instruction ldx.z m +Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination -Removing instruction __bbegin: -Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE (label) @1 (label) @2 +(label) @3 +(label) @4 (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 @@ -3685,8 +3299,8 @@ FINAL SYMBOL TABLE (byte) init::sx#1 reg byte x 1501.5 (byte) init::sx#2 reg byte x 800.8 (word) init::xp -(word) init::xp#1 xp zp[2]:8 667.3333333333334 -(word) init::xp#2 xp zp[2]:8 750.75 +(word) init::xp#1 xp zp[2]:4 667.3333333333334 +(word) init::xp#2 xp zp[2]:4 750.75 (void()) loop() (byte~) loop::$5 reg byte a 20002.0 (label) loop::@1 @@ -3709,8 +3323,8 @@ FINAL SYMBOL TABLE (byte) loop::sin_idx#1 sin_idx zp[1]:2 133.46666666666667 (byte) loop::sin_idx#6 sin_idx zp[1]:2 333.6666666666667 (byte) loop::ss -(byte) loop::ss#1 ss zp[1]:7 15001.5 -(byte) loop::ss#5 ss zp[1]:7 3333.6666666666665 +(byte) loop::ss#1 ss zp[1]:3 15001.5 +(byte) loop::ss#5 ss zp[1]:3 3333.6666666666665 (byte) loop::sy (byte) loop::sy#1 reg byte y 15001.5 (byte) loop::sy#2 reg byte y 10001.0 @@ -3735,6 +3349,7 @@ FINAL SYMBOL TABLE (byte~) plexShowSprite::$2 reg byte a 200002.0 (byte~) plexShowSprite::$3 reg byte a 200002.0 (byte~) plexShowSprite::$5 reg byte x 200002.0 +(byte~) plexShowSprite::$6 reg byte a 200002.0 (byte~) plexShowSprite::$9 reg byte a 200002.0 (label) plexShowSprite::@1 (label) plexShowSprite::@2 @@ -3745,10 +3360,11 @@ FINAL SYMBOL TABLE (label) plexShowSprite::plexFreeAdd1 (byte~) plexShowSprite::plexFreeAdd1_$0 reg byte a 200002.0 (byte~) plexShowSprite::plexFreeAdd1_$1 reg byte x 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$2 reg byte a 200002.0 (byte) plexShowSprite::plexFreeAdd1_ypos (byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 150001.5 (byte) plexShowSprite::plex_sprite_idx2 -(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:11 27273.0 +(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:11 25000.25 (byte) plexShowSprite::xpos_idx (byte) plexShowSprite::xpos_idx#0 reg byte a 200002.0 (byte) plexShowSprite::ypos @@ -3759,6 +3375,7 @@ FINAL SYMBOL TABLE (label) plexSort::@4 (label) plexSort::@5 (label) plexSort::@6 +(label) plexSort::@7 (label) plexSort::@return (byte) plexSort::m (byte) plexSort::m#1 m zp[1]:10 1500001.5 @@ -3769,6 +3386,7 @@ FINAL SYMBOL TABLE (byte) plexSort::nxt_y#0 nxt_y zp[1]:12 1500000.375 (label) plexSort::plexFreePrepare1 (label) plexSort::plexFreePrepare1_@1 +(label) plexSort::plexFreePrepare1_@2 (byte) plexSort::plexFreePrepare1_s (byte) plexSort::plexFreePrepare1_s#1 reg byte x 1500001.5 (byte) plexSort::plexFreePrepare1_s#2 reg byte x 1500001.5 @@ -3777,45 +3395,38 @@ FINAL SYMBOL TABLE (byte) plexSort::s#2 reg byte x 2000002.0 (byte) plexSort::s#3 reg byte x 2.05000025E7 (byte) plexSort::s#6 reg byte x 2000002.0 -(byte) plex_free_next -(byte) plex_free_next#13 plex_free_next zp[1]:3 5000.090909090909 -(byte) plex_free_next#17 plex_free_next zp[1]:3 22000.4 -(byte) plex_show_idx -(byte) plex_show_idx#15 plex_show_idx zp[1]:5 12222.444444444445 -(byte) plex_show_idx#42 plex_show_idx zp[1]:5 17083.541666666664 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#15 plex_sprite_idx zp[1]:4 11000.2 -(byte) plex_sprite_idx#42 plex_sprite_idx zp[1]:4 14091.090909090908 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#16 plex_sprite_msb zp[1]:6 22000.4 -(byte) plex_sprite_msb#3 plex_sprite_msb zp[1]:6 100001.0 -(byte) plex_sprite_msb#42 plex_sprite_msb zp[1]:6 12400.16 +(volatile byte) plex_free_next loadstore zp[1]:9 8421.236842105262 +(volatile byte) plex_show_idx loadstore zp[1]:6 10625.166666666664 +(volatile byte) plex_sprite_idx loadstore zp[1]:7 9111.266666666666 +(volatile byte) plex_sprite_msb loadstore zp[1]:8 13261.065217391304 zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] reg byte x [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] reg byte y [ loop::sy#2 loop::sy#1 ] -zp[1]:3 [ plex_free_next#17 plex_free_next#13 ] -zp[1]:4 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -zp[1]:5 [ plex_show_idx#42 plex_show_idx#15 ] -zp[1]:6 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -zp[1]:7 [ loop::ss#5 loop::ss#1 ] +zp[1]:3 [ loop::ss#5 loop::ss#1 ] reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] reg byte x [ init::sx#2 init::sx#1 ] -zp[2]:8 [ init::xp#2 init::xp#1 ] +zp[2]:4 [ init::xp#2 init::xp#1 ] reg byte x [ init::ss#2 init::ss#1 ] reg byte x [ plexInit::i#2 plexInit::i#1 ] +zp[1]:6 [ plex_show_idx ] +zp[1]:7 [ plex_sprite_idx ] +zp[1]:8 [ plex_sprite_msb ] +zp[1]:9 [ plex_free_next ] reg byte a [ loop::$5 ] zp[1]:10 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ] reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] +reg byte a [ plexShowSprite::plexFreeAdd1_$2 ] reg byte a [ plexShowSprite::xpos_idx#0 ] reg byte x [ plexShowSprite::$11 ] reg byte a [ plexShowSprite::$2 ] reg byte a [ plexShowSprite::$3 ] reg byte a [ plexShowSprite::$9 ] reg byte x [ plexShowSprite::$5 ] +reg byte a [ plexShowSprite::$6 ] zp[1]:11 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] zp[1]:12 [ plexSort::nxt_y#0 ] reg byte x [ plexSort::s#2 ] @@ -3823,13 +3434,13 @@ reg byte a [ init::$5 ] FINAL ASSEMBLER -Score: 62204 +Score: 60648 // File Comments // A simple usage of the flexible sprite multiplexer routine // Upstart .pc = $801 "Basic" -:BasicUpstart(main) +:BasicUpstart(__bbegin) .pc = $80d "Program" // Global Constants & labels .label SPRITES_XPOS = $d000 @@ -3851,25 +3462,44 @@ Score: 62204 // Location of screen & sprites .label SCREEN = $400 .label SPRITE = $2000 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = SCREEN+$3f8 - // The MSB bit of the next sprite to use for showing - .label plex_sprite_msb = 6 - // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. - .label plex_free_next = 3 - // The index the next sprite to use for showing (sprites are used round-robin) - .label plex_sprite_idx = 4 - // The index in the PLEX tables of the next sprite to show - // Prepare for showing the sprites - .label plex_show_idx = 5 + .label plex_show_idx = 6 + .label plex_sprite_idx = 7 + .label plex_sprite_msb = 8 + .label plex_free_next = 9 // @begin +__bbegin: // @1 + // plex_show_idx=0 + // [1] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index in the PLEX tables of the next sprite to show + lda #0 + sta.z plex_show_idx + // plex_sprite_idx=0 + // [2] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + // The index the next sprite to use for showing (sprites are used round-robin) + sta.z plex_sprite_idx + // plex_sprite_msb=1 + // [3] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + // The MSB bit of the next sprite to use for showing + lda #1 + sta.z plex_sprite_msb + // @2 + // plex_free_next = 0 + // [4] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. + lda #0 + sta.z plex_free_next + // @3 // kickasm // kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff)) .for (var y=0; y<21; y++) .for (var x=0;x<3; x++) .byte pic.getSinglecolorByte(x,y) }} - // [2] phi from @1 to @2 [phi:@1->@2] - // @2 - // [3] call main - // [4] phi from @2 to @end [phi:@2->@end] + // [6] phi from @3 to @4 [phi:@3->@4] + // @4 + // [7] call main + jsr main + rts + // [8] phi from @4 to @end [phi:@4->@end] // @end // main main: { @@ -3877,17 +3507,17 @@ main: { // asm { sei } sei // init() - // [6] call init + // [10] call init jsr init - // [7] phi from main to main::@1 [phi:main->main::@1] + // [11] phi from main to main::@1 [phi:main->main::@1] // main::@1 // loop() - // [8] call loop - // [10] phi from main::@1 to loop [phi:main::@1->loop] + // [12] call loop + // [14] phi from main::@1 to loop [phi:main::@1->loop] jsr loop // main::@return // } - // [9] return + // [13] return rts } // loop @@ -3896,136 +3526,122 @@ loop: { // The current index into the y-sinus .label sin_idx = 2 .label plexFreeNextYpos1_return = $a - .label ss = 7 - // [11] phi from loop to loop::@1 [phi:loop->loop::@1] - // [11] phi (byte) loop::sin_idx#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 + .label ss = 3 + // [15] phi from loop to loop::@1 [phi:loop->loop::@1] + // [15] phi (byte) loop::sin_idx#6 = (byte) 0 [phi:loop->loop::@1#0] -- vbuz1=vbuc1 lda #0 sta.z sin_idx // loop::@1 // loop::@2 __b2: // while(*RASTER!=$ff) - // [12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + // [16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 lda #$ff cmp RASTER bne __b2 // loop::@3 // (*BORDERCOL)++; - // [13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [17] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - // [14] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 -- vbuxx=vbuz1 + // [18] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6 -- vbuxx=vbuz1 ldx.z sin_idx - // [15] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] - // [15] phi (byte) loop::sy#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuyy=vbuc1 + // [19] phi from loop::@3 to loop::@4 [phi:loop::@3->loop::@4] + // [19] phi (byte) loop::sy#2 = (byte) 0 [phi:loop::@3->loop::@4#0] -- vbuyy=vbuc1 ldy #0 - // [15] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#4 [phi:loop::@3->loop::@4#1] -- register_copy - // [15] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4] - // [15] phi (byte) loop::sy#2 = (byte) loop::sy#1 [phi:loop::@4->loop::@4#0] -- register_copy - // [15] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#1 [phi:loop::@4->loop::@4#1] -- register_copy + // [19] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#4 [phi:loop::@3->loop::@4#1] -- register_copy + // [19] phi from loop::@4 to loop::@4 [phi:loop::@4->loop::@4] + // [19] phi (byte) loop::sy#2 = (byte) loop::sy#1 [phi:loop::@4->loop::@4#0] -- register_copy + // [19] phi (byte) loop::y_idx#2 = (byte) loop::y_idx#1 [phi:loop::@4->loop::@4#1] -- register_copy // loop::@4 __b4: // PLEX_YPOS[sy] = YSIN[y_idx] - // [16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx + // [20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2) -- pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx lda YSIN,x sta PLEX_YPOS,y // y_idx += 8 - // [17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 -- vbuxx=vbuxx_plus_vbuc1 + // [21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8 -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[8] // for(char sy: 0..PLEX_COUNT-1) - // [18] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 -- vbuyy=_inc_vbuyy + // [22] (byte) loop::sy#1 ← ++ (byte) loop::sy#2 -- vbuyy=_inc_vbuyy iny - // [19] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 -- vbuyy_neq_vbuc1_then_la1 + // [23] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4 -- vbuyy_neq_vbuc1_then_la1 cpy #PLEX_COUNT-1+1 bne __b4 // loop::@5 // sin_idx +=1 - // [20] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 + // [24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1 -- vbuz1=vbuz1_plus_1 inc.z sin_idx // (*BORDERCOL)++; - // [21] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL // plexSort() - // [22] call plexSort - // [60] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] + // [26] call plexSort + // [65] phi from loop::@5 to plexSort [phi:loop::@5->plexSort] jsr plexSort // loop::@11 // *BORDERCOL = BLACK - // [23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL // loop::@6 __b6: // *D011&VIC_RST8 - // [24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8 -- vbuaa=_deref_pbuc1_band_vbuc2 lda #VIC_RST8 and D011 // while((*D011&VIC_RST8)!=0) - // [25] if((byte~) loop::$5!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 + // [29] if((byte~) loop::$5!=(byte) 0) goto loop::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne __b6 - // [26] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] - // [26] phi (byte) loop::ss#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 + // [30] phi from loop::@6 to loop::@7 [phi:loop::@6->loop::@7] + // [30] phi (byte) loop::ss#5 = (byte) 0 [phi:loop::@6->loop::@7#0] -- vbuz1=vbuc1 lda #0 sta.z ss - // [26] phi (byte) plex_sprite_msb#42 = (byte) 1 [phi:loop::@6->loop::@7#1] -- vbuz1=vbuc1 - lda #1 - sta.z plex_sprite_msb - // [26] phi (byte) plex_show_idx#42 = (byte) 0 [phi:loop::@6->loop::@7#2] -- vbuz1=vbuc1 - lda #0 - sta.z plex_show_idx - // [26] phi (byte) plex_sprite_idx#42 = (byte) 0 [phi:loop::@6->loop::@7#3] -- vbuz1=vbuc1 - sta.z plex_sprite_idx - // [26] phi (byte) plex_free_next#17 = (byte) 0 [phi:loop::@6->loop::@7#4] -- vbuz1=vbuc1 - sta.z plex_free_next // Show the sprites - // [26] phi from loop::@12 to loop::@7 [phi:loop::@12->loop::@7] - // [26] phi (byte) loop::ss#5 = (byte) loop::ss#1 [phi:loop::@12->loop::@7#0] -- register_copy - // [26] phi (byte) plex_sprite_msb#42 = (byte) plex_sprite_msb#16 [phi:loop::@12->loop::@7#1] -- register_copy - // [26] phi (byte) plex_show_idx#42 = (byte) plex_show_idx#15 [phi:loop::@12->loop::@7#2] -- register_copy - // [26] phi (byte) plex_sprite_idx#42 = (byte) plex_sprite_idx#15 [phi:loop::@12->loop::@7#3] -- register_copy - // [26] phi (byte) plex_free_next#17 = (byte) plex_free_next#13 [phi:loop::@12->loop::@7#4] -- register_copy + // [30] phi from loop::@12 to loop::@7 [phi:loop::@12->loop::@7] + // [30] phi (byte) loop::ss#5 = (byte) loop::ss#1 [phi:loop::@12->loop::@7#0] -- register_copy // loop::@7 __b7: // *BORDERCOL = BLACK - // [27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 + // [31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL // loop::plexFreeNextYpos1 // return PLEX_FREE_YPOS[plex_free_next]; - // [28] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) -- vbuz1=pbuc1_derefidx_vbuz2 + // [32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return // loop::@8 __b8: // while(*RASTERloop::@1] - // [11] phi (byte) loop::sin_idx#6 = (byte) loop::sin_idx#1 [phi:loop::@10->loop::@1#0] -- register_copy + // [15] phi from loop::@10 to loop::@1 [phi:loop::@10->loop::@1] + // [15] phi (byte) loop::sin_idx#6 = (byte) loop::sin_idx#1 [phi:loop::@10->loop::@1#0] -- register_copy jmp __b2 } // plexShowSprite @@ -4034,113 +3650,115 @@ loop: { plexShowSprite: { .label plex_sprite_idx2 = $b // plex_sprite_idx2 = plex_sprite_idx*2 - // [35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z plex_sprite_idx asl sta.z plex_sprite_idx2 // ypos = PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]] - // [36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) + // [40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_YPOS,y // SPRITES_YPOS[plex_sprite_idx2] = ypos - // [37] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa + // [41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_sprite_idx2 sta SPRITES_YPOS,y // plexShowSprite::plexFreeAdd1 // ypos+21 - // [38] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 + // [42] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15 -- vbuaa=vbuaa_plus_vbuc1 clc adc #$15 // PLEX_FREE_YPOS[plex_free_next] = ypos+21 - // [39] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa + // [43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0 -- pbuc1_derefidx_vbuz1=vbuaa ldy.z plex_free_next sta PLEX_FREE_YPOS,y // plex_free_next+1 - // [40] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [44] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z plex_free_next inx + // (plex_free_next+1)&7 + // [45] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 // plex_free_next = (plex_free_next+1)&7 - // [41] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_free_next - // plexShowSprite::@4 + // [46] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2 -- vbuz1=vbuaa + sta.z plex_free_next + // plexShowSprite::@5 // PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]] - // [42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) + // [47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) ldx.z plex_show_idx ldy PLEX_SORTED_IDX,x lda PLEX_PTR,y ldx.z plex_sprite_idx sta PLEX_SCREEN_PTR,x // xpos_idx = PLEX_SORTED_IDX[plex_show_idx] - // [43] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42) -- vbuaa=pbuc1_derefidx_vbuz1 + // [48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx) -- vbuaa=pbuc1_derefidx_vbuz1 ldy.z plex_show_idx lda PLEX_SORTED_IDX,y // PLEX_XPOS[xpos_idx] - // [47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx + // [52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11) -- vbuaa=_hi_pwuc1_derefidx_vbuxx lda PLEX_XPOS+1,x // if(>PLEX_XPOS[xpos_idx]!=0) - // [48] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 + // [53] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -- vbuaa_neq_0_then_la1 cmp #0 bne __b1 // plexShowSprite::@3 - // $ff^plex_sprite_msb - // [49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42 -- vbuaa=vbuc1_bxor_vbuz1 + // 0xff^plex_sprite_msb + // [54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor.z plex_sprite_msb - // *SPRITES_XMSB &= ($ff^plex_sprite_msb) - // [50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + // *SPRITES_XMSB &= (0xff^plex_sprite_msb) + // [55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB // plexShowSprite::@2 __b2: // plex_sprite_idx+1 - // [51] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#42 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [56] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z plex_sprite_idx inx + // (plex_sprite_idx+1)&7 + // [57] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 // plex_sprite_idx = (plex_sprite_idx+1)&7 - // [52] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 - lda #7 - sax.z plex_sprite_idx + // [58] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6 -- vbuz1=vbuaa + sta.z plex_sprite_idx // plex_show_idx++; - // [53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#42 -- vbuz1=_inc_vbuz1 + // [59] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx -- vbuz1=_inc_vbuz1 inc.z plex_show_idx - // plex_sprite_msb *=2 - // [54] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // plex_sprite_msb <<=1 + // [60] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z plex_sprite_msb // if(plex_sprite_msb==0) - // [55] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5 -- vbuz1_neq_0_then_la1 + // [61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -- vbuz1_neq_0_then_la1 lda.z plex_sprite_msb cmp #0 - bne __b5 - // [57] phi from plexShowSprite::@2 to plexShowSprite::@return [phi:plexShowSprite::@2->plexShowSprite::@return] - // [57] phi (byte) plex_sprite_msb#16 = (byte) 1 [phi:plexShowSprite::@2->plexShowSprite::@return#0] -- vbuz1=vbuc1 + bne __breturn + // plexShowSprite::@4 + // plex_sprite_msb = 1 + // [62] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 lda #1 sta.z plex_sprite_msb - rts - // [56] phi from plexShowSprite::@2 to plexShowSprite::@5 [phi:plexShowSprite::@2->plexShowSprite::@5] - // plexShowSprite::@5 - __b5: - // [57] phi from plexShowSprite::@5 to plexShowSprite::@return [phi:plexShowSprite::@5->plexShowSprite::@return] - // [57] phi (byte) plex_sprite_msb#16 = (byte) plex_sprite_msb#3 [phi:plexShowSprite::@5->plexShowSprite::@return#0] -- register_copy // plexShowSprite::@return + __breturn: // } - // [58] return + // [63] return rts // plexShowSprite::@1 __b1: // *SPRITES_XMSB |= plex_sprite_msb - // [59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + // [64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -4160,49 +3778,49 @@ plexSort: { .label nxt_idx = $b .label nxt_y = $c .label m = $a - // [61] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] - // [61] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 + // [66] phi from plexSort to plexSort::@1 [phi:plexSort->plexSort::@1] + // [66] phi (byte) plexSort::m#2 = (byte) 0 [phi:plexSort->plexSort::@1#0] -- vbuz1=vbuc1 lda #0 sta.z m - // [61] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] - // [61] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy + // [66] phi from plexSort::@2 to plexSort::@1 [phi:plexSort::@2->plexSort::@1] + // [66] phi (byte) plexSort::m#2 = (byte) plexSort::m#1 [phi:plexSort::@2->plexSort::@1#0] -- register_copy // plexSort::@1 __b1: // nxt_idx = PLEX_SORTED_IDX[m+1] - // [62] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [67] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx // nxt_y = PLEX_YPOS[nxt_idx] - // [63] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [68] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 tay lda PLEX_YPOS,y sta.z nxt_y // if(nxt_y=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 + // [69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -- vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 ldx.z m ldy PLEX_SORTED_IDX,x cmp PLEX_YPOS,y bcs __b2 // plexSort::@5 - // [65] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 - // [66] phi from plexSort::@5 plexSort::@6 to plexSort::@3 [phi:plexSort::@5/plexSort::@6->plexSort::@3] - // [66] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@6->plexSort::@3#0] -- register_copy + // [70] (byte) plexSort::s#6 ← (byte) plexSort::m#2 -- vbuxx=vbuz1 + // [71] phi from plexSort::@5 plexSort::@7 to plexSort::@3 [phi:plexSort::@5/plexSort::@7->plexSort::@3] + // [71] phi (byte) plexSort::s#3 = (byte) plexSort::s#6 [phi:plexSort::@5/plexSort::@7->plexSort::@3#0] -- register_copy // plexSort::@3 __b3: // PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s] - // [67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + // [72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx lda PLEX_SORTED_IDX,x sta PLEX_SORTED_IDX+1,x // s--; - // [68] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx + // [73] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx dex - // while((s!=$ff) && (nxt_yplexSort::plexFreePrepare1] + // plexSort::@6 + // plex_show_idx = 0 + // [80] (volatile byte) plex_show_idx ← (byte) 0 -- vbuz1=vbuc1 + // Prepare for showing the sprites + lda #0 + sta.z plex_show_idx + // plex_sprite_idx = 0 + // [81] (volatile byte) plex_sprite_idx ← (byte) 0 -- vbuz1=vbuc1 + sta.z plex_sprite_idx + // plex_sprite_msb = 1 + // [82] (volatile byte) plex_sprite_msb ← (byte) 1 -- vbuz1=vbuc1 + lda #1 + sta.z plex_sprite_msb + // [83] phi from plexSort::@6 to plexSort::plexFreePrepare1 [phi:plexSort::@6->plexSort::plexFreePrepare1] // plexSort::plexFreePrepare1 - // [76] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] - // [76] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 + // [84] phi from plexSort::plexFreePrepare1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1] + // [84] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) 0 [phi:plexSort::plexFreePrepare1->plexSort::plexFreePrepare1_@1#0] -- vbuxx=vbuc1 ldx #0 - // [76] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] - // [76] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy + // [84] phi from plexSort::plexFreePrepare1_@1 to plexSort::plexFreePrepare1_@1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1] + // [84] phi (byte) plexSort::plexFreePrepare1_s#2 = (byte) plexSort::plexFreePrepare1_s#1 [phi:plexSort::plexFreePrepare1_@1->plexSort::plexFreePrepare1_@1#0] -- register_copy // plexSort::plexFreePrepare1_@1 plexFreePrepare1___b1: // PLEX_FREE_YPOS[s] = 0 - // [77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PLEX_FREE_YPOS,x // for( char s: 0..7) - // [78] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx + // [86] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2 -- vbuxx=_inc_vbuxx inx - // [79] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 + // [87] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne plexFreePrepare1___b1 + // plexSort::plexFreePrepare1_@2 + // plex_free_next = 0 + // [88] (volatile byte) plex_free_next ← (byte) 0 -- vbuz1=vbuc1 + sta.z plex_free_next // plexSort::@return // } - // [80] return + // [89] return rts } // init // Initialize the program init: { // Set the x-positions & pointers - .label xp = 8 + .label xp = 4 // *D011 = VIC_DEN | VIC_RSEL | 3 - // [81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + // [90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 lda #VIC_DEN|VIC_RSEL|3 sta D011 // plexInit(SCREEN) - // [82] call plexInit + // [91] call plexInit // Initialize the multiplexer - // [96] phi from init to plexInit [phi:init->plexInit] + // [105] phi from init to plexInit [phi:init->plexInit] jsr plexInit - // [83] phi from init to init::@1 [phi:init->init::@1] - // [83] phi (word) init::xp#2 = (word) $20 [phi:init->init::@1#0] -- vwuz1=vwuc1 + // [92] phi from init to init::@1 [phi:init->init::@1] + // [92] phi (word) init::xp#2 = (word) $20 [phi:init->init::@1#0] -- vwuz1=vwuc1 lda #<$20 sta.z xp lda #>$20 sta.z xp+1 - // [83] phi (byte) init::sx#2 = (byte) 0 [phi:init->init::@1#1] -- vbuxx=vbuc1 + // [92] phi (byte) init::sx#2 = (byte) 0 [phi:init->init::@1#1] -- vbuxx=vbuc1 ldx #0 - // [83] phi from init::@1 to init::@1 [phi:init::@1->init::@1] - // [83] phi (word) init::xp#2 = (word) init::xp#1 [phi:init::@1->init::@1#0] -- register_copy - // [83] phi (byte) init::sx#2 = (byte) init::sx#1 [phi:init::@1->init::@1#1] -- register_copy + // [92] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + // [92] phi (word) init::xp#2 = (word) init::xp#1 [phi:init::@1->init::@1#0] -- register_copy + // [92] phi (byte) init::sx#2 = (byte) init::sx#1 [phi:init::@1->init::@1#1] -- register_copy // init::@1 __b1: // PLEX_PTR[sx] = (char)(SPRITE/$40) - // [84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 + // [93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #SPRITE/$40 sta PLEX_PTR,x // PLEX_XPOS[sx] = xp - // [85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 + // [94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1 -- vbuaa=vbuxx_rol_1 txa asl - // [86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 -- pwuc1_derefidx_vbuaa=vwuz1 + // [95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2 -- pwuc1_derefidx_vbuaa=vwuz1 tay lda.z xp sta PLEX_XPOS,y lda.z xp+1 sta PLEX_XPOS+1,y // xp += 9 - // [87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 -- vwuz1=vwuz1_plus_vbuc1 + // [96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9 -- vwuz1=vwuz1_plus_vbuc1 lda #9 clc adc.z xp @@ -4300,68 +3935,68 @@ init: { inc.z xp+1 !: // for(char sx: 0..PLEX_COUNT-1) - // [88] (byte) init::sx#1 ← ++ (byte) init::sx#2 -- vbuxx=_inc_vbuxx + // [97] (byte) init::sx#1 ← ++ (byte) init::sx#2 -- vbuxx=_inc_vbuxx inx - // [89] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 + // [98] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #PLEX_COUNT-1+1 bne __b1 // init::@2 // *SPRITES_ENABLE = $ff - // [90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE - // [91] phi from init::@2 to init::@3 [phi:init::@2->init::@3] - // [91] phi (byte) init::ss#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 + // [100] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + // [100] phi (byte) init::ss#2 = (byte) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 ldx #0 - // [91] phi from init::@3 to init::@3 [phi:init::@3->init::@3] - // [91] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy + // [100] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + // [100] phi (byte) init::ss#2 = (byte) init::ss#1 [phi:init::@3->init::@3#0] -- register_copy // init::@3 __b3: // SPRITES_COLS[ss] = GREEN - // [92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 + // [101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN -- pbuc1_derefidx_vbuxx=vbuc2 lda #GREEN sta SPRITES_COLS,x // for(char ss: 0..7) - // [93] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx + // [102] (byte) init::ss#1 ← ++ (byte) init::ss#2 -- vbuxx=_inc_vbuxx inx - // [94] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [103] if((byte) init::ss#1!=(byte) 8) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b3 // init::@return // } - // [95] return + // [104] return rts } // plexInit // Initialize the multiplexer data structures plexInit: { - // [97] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] + // [106] phi from plexInit to plexInit::plexSetScreen1 [phi:plexInit->plexInit::plexSetScreen1] // plexInit::plexSetScreen1 - // [98] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] - // [98] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 + // [107] phi from plexInit::plexSetScreen1 to plexInit::@1 [phi:plexInit::plexSetScreen1->plexInit::@1] + // [107] phi (byte) plexInit::i#2 = (byte) 0 [phi:plexInit::plexSetScreen1->plexInit::@1#0] -- vbuxx=vbuc1 ldx #0 - // [98] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] - // [98] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy + // [107] phi from plexInit::@1 to plexInit::@1 [phi:plexInit::@1->plexInit::@1] + // [107] phi (byte) plexInit::i#2 = (byte) plexInit::i#1 [phi:plexInit::@1->plexInit::@1#0] -- register_copy // plexInit::@1 __b1: // PLEX_SORTED_IDX[i] = i - // [99] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx + // [108] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2 -- pbuc1_derefidx_vbuxx=vbuxx txa sta PLEX_SORTED_IDX,x // for(char i: 0..PLEX_COUNT-1) - // [100] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx + // [109] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2 -- vbuxx=_inc_vbuxx inx - // [101] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 + // [110] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #PLEX_COUNT-1+1 bne __b1 // plexInit::@return // } - // [102] return + // [111] return rts } // File Data - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.sym b/src/test/ref/examples/multiplexer/simple-multiplexer.sym index 0d9294918..046f6bb24 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.sym +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.sym @@ -1,5 +1,7 @@ (label) @1 (label) @2 +(label) @3 +(label) @4 (label) @begin (label) @end (const nomodify byte) BLACK = (byte) 0 @@ -44,8 +46,8 @@ (byte) init::sx#1 reg byte x 1501.5 (byte) init::sx#2 reg byte x 800.8 (word) init::xp -(word) init::xp#1 xp zp[2]:8 667.3333333333334 -(word) init::xp#2 xp zp[2]:8 750.75 +(word) init::xp#1 xp zp[2]:4 667.3333333333334 +(word) init::xp#2 xp zp[2]:4 750.75 (void()) loop() (byte~) loop::$5 reg byte a 20002.0 (label) loop::@1 @@ -68,8 +70,8 @@ (byte) loop::sin_idx#1 sin_idx zp[1]:2 133.46666666666667 (byte) loop::sin_idx#6 sin_idx zp[1]:2 333.6666666666667 (byte) loop::ss -(byte) loop::ss#1 ss zp[1]:7 15001.5 -(byte) loop::ss#5 ss zp[1]:7 3333.6666666666665 +(byte) loop::ss#1 ss zp[1]:3 15001.5 +(byte) loop::ss#5 ss zp[1]:3 3333.6666666666665 (byte) loop::sy (byte) loop::sy#1 reg byte y 15001.5 (byte) loop::sy#2 reg byte y 10001.0 @@ -94,6 +96,7 @@ (byte~) plexShowSprite::$2 reg byte a 200002.0 (byte~) plexShowSprite::$3 reg byte a 200002.0 (byte~) plexShowSprite::$5 reg byte x 200002.0 +(byte~) plexShowSprite::$6 reg byte a 200002.0 (byte~) plexShowSprite::$9 reg byte a 200002.0 (label) plexShowSprite::@1 (label) plexShowSprite::@2 @@ -104,10 +107,11 @@ (label) plexShowSprite::plexFreeAdd1 (byte~) plexShowSprite::plexFreeAdd1_$0 reg byte a 200002.0 (byte~) plexShowSprite::plexFreeAdd1_$1 reg byte x 200002.0 +(byte~) plexShowSprite::plexFreeAdd1_$2 reg byte a 200002.0 (byte) plexShowSprite::plexFreeAdd1_ypos (byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 150001.5 (byte) plexShowSprite::plex_sprite_idx2 -(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:11 27273.0 +(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:11 25000.25 (byte) plexShowSprite::xpos_idx (byte) plexShowSprite::xpos_idx#0 reg byte a 200002.0 (byte) plexShowSprite::ypos @@ -118,6 +122,7 @@ (label) plexSort::@4 (label) plexSort::@5 (label) plexSort::@6 +(label) plexSort::@7 (label) plexSort::@return (byte) plexSort::m (byte) plexSort::m#1 m zp[1]:10 1500001.5 @@ -128,6 +133,7 @@ (byte) plexSort::nxt_y#0 nxt_y zp[1]:12 1500000.375 (label) plexSort::plexFreePrepare1 (label) plexSort::plexFreePrepare1_@1 +(label) plexSort::plexFreePrepare1_@2 (byte) plexSort::plexFreePrepare1_s (byte) plexSort::plexFreePrepare1_s#1 reg byte x 1500001.5 (byte) plexSort::plexFreePrepare1_s#2 reg byte x 1500001.5 @@ -136,45 +142,38 @@ (byte) plexSort::s#2 reg byte x 2000002.0 (byte) plexSort::s#3 reg byte x 2.05000025E7 (byte) plexSort::s#6 reg byte x 2000002.0 -(byte) plex_free_next -(byte) plex_free_next#13 plex_free_next zp[1]:3 5000.090909090909 -(byte) plex_free_next#17 plex_free_next zp[1]:3 22000.4 -(byte) plex_show_idx -(byte) plex_show_idx#15 plex_show_idx zp[1]:5 12222.444444444445 -(byte) plex_show_idx#42 plex_show_idx zp[1]:5 17083.541666666664 -(byte) plex_sprite_idx -(byte) plex_sprite_idx#15 plex_sprite_idx zp[1]:4 11000.2 -(byte) plex_sprite_idx#42 plex_sprite_idx zp[1]:4 14091.090909090908 -(byte) plex_sprite_msb -(byte) plex_sprite_msb#16 plex_sprite_msb zp[1]:6 22000.4 -(byte) plex_sprite_msb#3 plex_sprite_msb zp[1]:6 100001.0 -(byte) plex_sprite_msb#42 plex_sprite_msb zp[1]:6 12400.16 +(volatile byte) plex_free_next loadstore zp[1]:9 8421.236842105262 +(volatile byte) plex_show_idx loadstore zp[1]:6 10625.166666666664 +(volatile byte) plex_sprite_idx loadstore zp[1]:7 9111.266666666666 +(volatile byte) plex_sprite_msb loadstore zp[1]:8 13261.065217391304 zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ] reg byte x [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ] reg byte y [ loop::sy#2 loop::sy#1 ] -zp[1]:3 [ plex_free_next#17 plex_free_next#13 ] -zp[1]:4 [ plex_sprite_idx#42 plex_sprite_idx#15 ] -zp[1]:5 [ plex_show_idx#42 plex_show_idx#15 ] -zp[1]:6 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ] -zp[1]:7 [ loop::ss#5 loop::ss#1 ] +zp[1]:3 [ loop::ss#5 loop::ss#1 ] reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ] reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ] reg byte x [ init::sx#2 init::sx#1 ] -zp[2]:8 [ init::xp#2 init::xp#1 ] +zp[2]:4 [ init::xp#2 init::xp#1 ] reg byte x [ init::ss#2 init::ss#1 ] reg byte x [ plexInit::i#2 plexInit::i#1 ] +zp[1]:6 [ plex_show_idx ] +zp[1]:7 [ plex_sprite_idx ] +zp[1]:8 [ plex_sprite_msb ] +zp[1]:9 [ plex_free_next ] reg byte a [ loop::$5 ] zp[1]:10 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ] reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ] reg byte a [ plexShowSprite::plexFreeAdd1_$0 ] reg byte x [ plexShowSprite::plexFreeAdd1_$1 ] +reg byte a [ plexShowSprite::plexFreeAdd1_$2 ] reg byte a [ plexShowSprite::xpos_idx#0 ] reg byte x [ plexShowSprite::$11 ] reg byte a [ plexShowSprite::$2 ] reg byte a [ plexShowSprite::$3 ] reg byte a [ plexShowSprite::$9 ] reg byte x [ plexShowSprite::$5 ] +reg byte a [ plexShowSprite::$6 ] zp[1]:11 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ] zp[1]:12 [ plexSort::nxt_y#0 ] reg byte x [ plexSort::s#2 ] diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm index 8f893f2d9..f345a4335 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm @@ -256,7 +256,7 @@ init: { sta KERNEL_IRQ lda #>plex_irq sta KERNEL_IRQ+1 - // *VIC_CONTROL &=0x7f + // *VIC_CONTROL &= 0x7f lda #$7f and VIC_CONTROL sta VIC_CONTROL @@ -314,7 +314,7 @@ plex_irq: { lda.z plex_show_idx cmp #PLEX_COUNT bcc __b1 - // *RASTER = 0 + // *RASTER = 0x0 lda #0 sta RASTER // framedone = true diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log index 1784e34de..4693915b6 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log @@ -3942,7 +3942,7 @@ init: { sta KERNEL_IRQ lda #>plex_irq sta KERNEL_IRQ+1 - // *VIC_CONTROL &=0x7f + // *VIC_CONTROL &= 0x7f // [73] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 lda #$7f and VIC_CONTROL @@ -4036,7 +4036,7 @@ plex_irq: { cmp #PLEX_COUNT bcc __b1 // plex_irq::@5 - // *RASTER = 0 + // *RASTER = 0x0 // [94] *((const nomodify byte*) RASTER) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta RASTER