diff --git a/src/main/fragment/pbuz1=pbuaa.asm b/src/main/fragment/pbuz1=pbuaa.asm new file mode 100644 index 000000000..e87d75da4 --- /dev/null +++ b/src/main/fragment/pbuz1=pbuaa.asm @@ -0,0 +1,3 @@ +sta {z1} +lda #0 +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwuz1=pbuz1_band_vwuc1.asm b/src/main/fragment/vwuz1=pbuz1_band_vwuc1.asm new file mode 100644 index 000000000..c42c89244 --- /dev/null +++ b/src/main/fragment/vwuz1=pbuz1_band_vwuc1.asm @@ -0,0 +1,6 @@ +lda {z1} +and #<{c1} +sta {z1} +lda {z1}+1 +and #>{c1} +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwuz1=pbuz2_band_vwuc1.asm b/src/main/fragment/vwuz1=pbuz2_band_vwuc1.asm new file mode 100644 index 000000000..ed0882de5 --- /dev/null +++ b/src/main/fragment/vwuz1=pbuz2_band_vwuc1.asm @@ -0,0 +1,6 @@ +lda {z2} +and #<{c1} +sta {z1} +lda {z2}+1 +and #>{c1} +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwuz1=vwuz2_plus__lo_pbuz3.asm b/src/main/fragment/vwuz1=vwuz2_plus__lo_pbuz3.asm new file mode 100644 index 000000000..178c93893 --- /dev/null +++ b/src/main/fragment/vwuz1=vwuz2_plus__lo_pbuz3.asm @@ -0,0 +1,7 @@ +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 diff --git a/src/main/java/dk/camelot64/kickc/passes/PassNEliminateUnusedVars.java b/src/main/java/dk/camelot64/kickc/passes/PassNEliminateUnusedVars.java index ae9ed7dea..3a2e63256 100644 --- a/src/main/java/dk/camelot64/kickc/passes/PassNEliminateUnusedVars.java +++ b/src/main/java/dk/camelot64/kickc/passes/PassNEliminateUnusedVars.java @@ -36,7 +36,7 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization { StatementAssignment assignment = (StatementAssignment) statement; LValue lValue = assignment.getlValue(); if(lValue instanceof VariableRef && referenceInfos.isUnused((VariableRef) lValue) && !Pass2ConstantIdentification.isAddressOfUsed((VariableRef) lValue, getProgram())) { - if(getLog().isVerbosePass1CreateSsa()) { + if(getLog().isVerbosePass1CreateSsa()||getLog().isVerboseSSAOptimize()) { getLog().append("Eliminating unused variable " + lValue.toString(getProgram()) + " and assignment " + assignment.toString(getProgram(), false)); } stmtIt.remove(); @@ -50,7 +50,7 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization { StatementCall call = (StatementCall) statement; LValue lValue = call.getlValue(); if(lValue instanceof VariableRef && referenceInfos.isUnused((VariableRef) lValue) && !Pass2ConstantIdentification.isAddressOfUsed((VariableRef) lValue, getProgram())) { - if(getLog().isVerbosePass1CreateSsa()) { + if(getLog().isVerbosePass1CreateSsa()||getLog().isVerboseSSAOptimize()) { getLog().append("Eliminating unused variable - keeping the call " + lValue.toString(getProgram())); } Variable variable = getScope().getVariable((VariableRef) lValue); @@ -67,7 +67,7 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization { StatementPhiBlock.PhiVariable phiVariable = phiVarIt.next(); VariableRef variableRef = phiVariable.getVariable(); if(referenceInfos.isUnused(variableRef) && !Pass2ConstantIdentification.isAddressOfUsed(variableRef, getProgram())) { - if(getLog().isVerbosePass1CreateSsa()) { + if(getLog().isVerbosePass1CreateSsa()||getLog().isVerboseSSAOptimize()) { getLog().append("Eliminating unused variable - keeping the phi block " + variableRef.toString(getProgram())); } Variable variable = getScope().getVariable(variableRef); @@ -85,7 +85,9 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization { Collection allConstants = getScope().getAllConstants(true); for(ConstantVar constant : allConstants) { if(referenceInfos.isUnused(constant.getRef())) { - getLog().append("Eliminating unused constant " + constant.toString(getProgram())); + if(getLog().isVerbosePass1CreateSsa()||getLog().isVerboseSSAOptimize()) { + getLog().append("Eliminating unused constant " + constant.toString(getProgram())); + } constant.getScope().remove(constant); modified = true; } diff --git a/src/main/kc/stdlib/keyboard.kc b/src/main/kc/stdlib/keyboard.kc index 82b71861f..d8353aa47 100644 --- a/src/main/kc/stdlib/keyboard.kc +++ b/src/main/kc/stdlib/keyboard.kc @@ -221,7 +221,7 @@ byte keyboard_event_pressed(byte keycode) { // Get the next event from the keyboard event buffer. // Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process. -// The buffer is filled by keyboard_scan() +// The buffer is filled by keyboard_event_scan() byte keyboard_event_get() { if(keyboard_events_size==0) { return $ff; diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 701fdfd81..f91004bf1 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -49,6 +49,11 @@ public class TestPrograms { compileAndCompare("examples/tetris/tetris"); } + //@Test + //public void testTetrisNullPointer() throws IOException, URISyntaxException { + // compileAndCompare("tetris-npe"); + //} + @Test public void testFastMultiply8() throws IOException, URISyntaxException { diff --git a/src/test/kc/examples/tetris/tetris.kc b/src/test/kc/examples/tetris/tetris.kc index 7292e5227..67709d29c 100644 --- a/src/test/kc/examples/tetris/tetris.kc +++ b/src/test/kc/examples/tetris/tetris.kc @@ -1,6 +1,7 @@ // Tetris Game Implementation import "c64" import "memory" +import "keyboard" byte* SCREEN = $400; @@ -9,28 +10,92 @@ byte*[20] screen_lines; // Playfield 20 lines x 10 blocks. 0 is empty non-zero is color. byte[20*10] playfield; -// The current piece -byte[4*4] current_piece; +// The current moving piece +byte* current_piece = 0; + +// The curent piece orientation - each piece have 4 orientations (00/$10/$20/$30). The orientation chooses one of the 4 sub-graphics of the piece. +byte current_piece_orientation = 0; + +// Position of top left corner of current moving piece on the playfield byte current_xpos = 3; byte current_ypos = 0; +// The rate of moving down the current piece (number of frames between moves if movedown is not not forced) +const byte current_movedown_rate = 50; + +// The rate of moving down the current piece fast (number of frames between moves if movedown is not not forced) +const byte current_movedown_rate_fast = 5; + +// Counts down til next movedown of current piece +byte current_movedown_counter = 0; + void main() { init(); render_playfield(); - render_current_piece(); + render_current(); while(true) { - (*BORDERCOL)++; + // Wait for a frame to pass + while(*RASTER!=$ff) {} + while(*RASTER!=$fe) {} + // Scan keyboard events + keyboard_event_scan(); + byte render = 0; + byte key_event = keyboard_event_get(); + // Handle moving down current piece + ++current_movedown_counter; + byte movedown = 0; + if(key_event==KEY_SPACE) { + movedown++; + } + if(keyboard_event_pressed(KEY_SPACE)!=0) { + if(current_movedown_counter>=current_movedown_rate_fast) { + movedown++; + } + } + if(current_movedown_counter>=current_movedown_rate) { + movedown++; + } + if(movedown!=0) { + current_movedown(); + current_movedown_counter = 0; + render++; + } + // Handle other keyboard events + if((key_event&$80)==0) { + // New keyboard event + if(key_event==KEY_COMMA) { + current_xpos--; + render++; + } + if(key_event==KEY_DOT) { + current_xpos++; + render++; + } + if(key_event==KEY_Z) { + current_piece_orientation = (current_piece_orientation-$10)&$3f; + render++; + } + if(key_event==KEY_X) { + current_piece_orientation = (current_piece_orientation+$10)&$3f; + render++; + } + } + + if(render!=0) { + (*BORDERCOL)++; + render_playfield(); + render_current(); + (*BORDERCOL)--; + } } } void init() { - // Initialize a piece - current_piece[0] = GREEN; - current_piece[1] = GREEN; - current_piece[2] = GREEN; - current_piece[4] = GREEN; + // Initialize a current piece + current_piece = piece_t; + current_piece_orientation = 0; // Clear the screen fill(SCREEN,1000,$a0); @@ -66,10 +131,195 @@ void render_playfield() { } -// Render the current piece -void render_current_piece() { - +// Render the current moving piece at position (current_xpos, current_ypos) +void render_current() { + byte i = 0; + byte* current_piece_gfx = current_piece + current_piece_orientation; + for(byte l:0..3) { + byte* screen_line = screen_lines[(current_ypos+l)<<1]; + for(byte c:0..3) { + byte current_cell = current_piece_gfx[i++]; + if(current_cell!=0) { + byte xpos = current_xpos+c; + if(xpos<10) { + screen_line[xpos] = current_cell; + } + } + } + } +} +// Move the current piece down one position +void current_movedown() { + current_ypos++; } + +// The T-piece +align($40) byte[4*4*4] piece_t = { + 1, 1, 1, 0, + 0, 1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + 0, 0, 1, 0, + 0, 1, 1, 0, + 0, 0, 1, 0, + 0, 0, 0, 0, + + 0, 0, 0, 0, + 0, 1, 0, 0, + 1, 1, 1, 0, + 0, 0, 0, 0, + + 1, 0, 0, 0, + 1, 1, 0, 0, + 1, 0, 0, 0, + 0, 0, 0, 0 +}; + +// The S-piece +align($40) byte[4*4*4] piece_s = { + 0, 0, 0, 0, + 0, 1, 1, 0, + 1, 1, 0, 0, + 0, 0, 0, 0, + + 1, 0, 0, 0, + 1, 1, 0, 0, + 0, 1, 0, 0, + 0, 0, 0, 0, + + 0, 0, 0, 0, + 0, 1, 1, 0, + 1, 1, 0, 0, + 0, 0, 0, 0, + + 1, 0, 0, 0, + 1, 1, 0, 0, + 0, 1, 0, 0, + 0, 0, 0, 0 + +}; + +// The Z-piece +align($40) byte[4*4*4] piece_z = { + 0, 0, 0, 0, + 1, 1, 0, 0, + 0, 1, 1, 0, + 0, 0, 0, 0, + + 0, 1, 0, 0, + 1, 1, 0, 0, + 1, 0, 0, 0, + 0, 0, 0, 0, + + 0, 0, 0, 0, + 1, 1, 0, 0, + 0, 1, 1, 0, + 0, 0, 0, 0, + + 0, 1, 0, 0, + 1, 1, 0, 0, + 1, 0, 0, 0, + 0, 0, 0, 0 + +}; + +// The L-piece +align($40) byte[4*4*4] piece_l = { + 0, 0, 0, 0, + 1, 1, 1, 0, + 1, 0, 0, 0, + 0, 0, 0, 0, + + 1, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 0, 0, 0, + + 0, 0, 1, 0, + 1, 1, 1, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 1, 0, + 0, 0, 0, 0 + +}; + +// The J-piece +align($40) byte[4*4*4] piece_j = { + 1, 0, 0, 0, + 1, 1, 1, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + 0, 1, 1, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 0, 0, 0, + + 0, 0, 0, 0, + 1, 1, 1, 0, + 0, 0, 1, 0, + 0, 0, 0, 0, + + 0, 1, 0, 0, + 0, 1, 0, 0, + 1, 1, 0, 0, + 0, 0, 0, 0 + +}; + +// The O-piece +align($40) byte[4*4*4] piece_o = { + 1, 1, 0, 0, + 1, 1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + 1, 1, 0, 0, + 1, 1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + 1, 1, 0, 0, + 1, 1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + 1, 1, 0, 0, + 1, 1, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0 + +}; + +// The I-piece +align($40) byte[4*4*4] piece_i = { + 0, 0, 0, 0, + 0, 0, 0, 0, + 1, 1, 1, 1, + 0, 0, 0, 0, + + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + + 0, 0, 0, 0, + 0, 0, 0, 0, + 1, 1, 1, 1, + 0, 0, 0, 0, + + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0, + 0, 1, 0, 0 + +}; + diff --git a/src/test/kc/tetris-npe.kc b/src/test/kc/tetris-npe.kc new file mode 100644 index 000000000..18de261e1 --- /dev/null +++ b/src/test/kc/tetris-npe.kc @@ -0,0 +1,21 @@ +// NullPointerException using current_movedown_rate in the main loop + +byte* RASTER = $d012; +byte* SCREEN = $400; +byte ypos = 0; +byte RATE = 50; +byte counter = RATE; + +void main() { + while(true) { + while(*RASTER!=$ff) {} + if(--counter==0) { + counter = RATE; + ypos++; + *SCREEN = ypos; + } + } +} + + + diff --git a/src/test/ref/bool-const.log b/src/test/ref/bool-const.log index f890d025f..50688b4d7 100644 --- a/src/test/ref/bool-const.log +++ b/src/test/ref/bool-const.log @@ -203,20 +203,7 @@ if() condition always true - replacing block destination if((const bool) bool_co if() condition always true - replacing block destination if((const bool) bool_const_vars::$6) goto bool_const_vars::@5 if() condition always false - eliminating if((const bool) bool_const_inline::$3) goto bool_const_inline::@1 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const bool) bool_const_if::b#0 -Eliminating unused constant (const bool) bool_const_vars::$0 -Eliminating unused constant (const bool) bool_const_vars::$2 -Eliminating unused constant (const bool) bool_const_vars::$4 -Eliminating unused constant (const bool) bool_const_vars::$6 -Eliminating unused constant (const bool) bool_const_inline::$0 -Eliminating unused constant (const bool) bool_const_inline::$2 -Eliminating unused constant (const bool) bool_const_inline::$3 -Eliminating unused constant (const bool) bool_const_inline::$7 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) bool_const_vars::a#0 -Eliminating unused constant (const signed byte/signed word/signed dword) bool_const_vars::$5 -Eliminating unused constant (const byte) bool_const_inline::a#0 -Eliminating unused constant (const signed byte/signed word/signed dword) bool_const_inline::$1 Successful SSA optimization PassNEliminateUnusedVars Removing unused block bool_const_if::@3 Removing unused block bool_const_vars::@1 diff --git a/src/test/ref/c64dtv-8bppcharstretch.log b/src/test/ref/c64dtv-8bppcharstretch.log index 33a183424..60db54d43 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.log +++ b/src/test/ref/c64dtv-8bppcharstretch.log @@ -746,7 +746,6 @@ Constant (const byte) main::$24 = main::$19|main::$23 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#1 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/c64dtv-gfxexplorer.log b/src/test/ref/c64dtv-gfxexplorer.log index c4e6b68aa..c4413649e 100644 --- a/src/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/ref/c64dtv-gfxexplorer.log @@ -8212,76 +8212,8 @@ Fixing inline constructor with form_field_ptr::$2 ← *(form_line_hi#0 + form_fi Successful SSA optimization Pass2FixInlineConstructors Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) gfx_init_vic_bitmap::$2 ← (byte) gfx_init_vic_bitmap::l#2 Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) gfx_init_vic_bitmap::$3 ← (byte) gfx_init_vic_bitmap::l#2 -Eliminating unused constant (const byte) gfx_init_plane_horisontal::gfxbCpuBank#1 -Eliminating unused constant (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#1 -Eliminating unused constant (const byte) gfx_init_plane_vertical::gfxbCpuBank#1 -Eliminating unused constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#1 -Eliminating unused constant (const string) $70 -Eliminating unused constant (const string) $71 -Eliminating unused constant (const string) $72 -Eliminating unused constant (const string) $73 -Eliminating unused constant (const string) $74 -Eliminating unused constant (const string) $75 -Eliminating unused constant (const string) $76 -Eliminating unused constant (const string) $77 -Eliminating unused constant (const string) $78 -Eliminating unused constant (const string) $79 -Eliminating unused constant (const string) $80 -Eliminating unused constant (const string) $81 -Eliminating unused constant (const string) $82 -Eliminating unused constant (const string) $83 -Eliminating unused constant (const string) $84 -Eliminating unused constant (const string) $85 -Eliminating unused constant (const string) $86 -Eliminating unused constant (const string) $87 -Eliminating unused constant (const string) $88 -Eliminating unused constant (const string) $89 -Eliminating unused constant (const string) $90 -Eliminating unused constant (const string) $91 -Eliminating unused constant (const string) $92 -Eliminating unused constant (const string) $93 -Eliminating unused constant (const string) $94 -Eliminating unused constant (const string) $95 -Eliminating unused constant (const string) $96 -Eliminating unused constant (const string) $97 -Eliminating unused constant (const string) $98 -Eliminating unused constant (const string) $99 -Eliminating unused constant (const string) $100 -Eliminating unused constant (const string) $101 -Eliminating unused constant (const string) $102 -Eliminating unused constant (const string) $1 -Eliminating unused constant (const string) $16 -Eliminating unused constant (const string) $2 -Eliminating unused constant (const string) $17 -Eliminating unused constant (const string) $3 -Eliminating unused constant (const string) $18 -Eliminating unused constant (const string) $4 -Eliminating unused constant (const string) $19 -Eliminating unused constant (const string) $5 -Eliminating unused constant (const string) $20 -Eliminating unused constant (const string) $6 -Eliminating unused constant (const string) $21 -Eliminating unused constant (const string) $7 -Eliminating unused constant (const string) $22 -Eliminating unused constant (const string) $8 -Eliminating unused constant (const string) $23 -Eliminating unused constant (const string) $9 -Eliminating unused constant (const string) $24 -Eliminating unused constant (const string) $10 -Eliminating unused constant (const string) $25 -Eliminating unused constant (const string) $11 -Eliminating unused constant (const string) $26 -Eliminating unused constant (const string) $12 -Eliminating unused constant (const string) $27 -Eliminating unused constant (const string) $13 -Eliminating unused constant (const string) $28 -Eliminating unused constant (const string) $14 -Eliminating unused constant (const string) $29 -Eliminating unused constant (const string) $30 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte*) print_screen#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) keyboard_modifiers#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte*) bitmap_clear::bitmap#0 ← ((byte*)) (word~) bitmap_clear::$3 Eliminating Noop Cast (byte*) bitmap_plot::plotter#0 ← ((byte*)) (word~) bitmap_plot::$0 diff --git a/src/test/ref/c64dtv-gfxmodes.log b/src/test/ref/c64dtv-gfxmodes.log index 1d8b36ded..10e17d813 100644 --- a/src/test/ref/c64dtv-gfxmodes.log +++ b/src/test/ref/c64dtv-gfxmodes.log @@ -7243,49 +7243,7 @@ Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_ Successful SSA optimization Pass2FixInlineConstructors Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) mode_stdbitmap::$28 ← (byte) mode_stdbitmap::l#2 Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) mode_stdbitmap::$29 ← (byte) mode_stdbitmap::l#2 -Eliminating unused constant (const string) $21 -Eliminating unused constant (const string) $22 -Eliminating unused constant (const string) $23 -Eliminating unused constant (const string) $24 -Eliminating unused constant (const string) $25 -Eliminating unused constant (const string) $26 -Eliminating unused constant (const string) $27 -Eliminating unused constant (const string) $28 -Eliminating unused constant (const string) $29 -Eliminating unused constant (const string) $30 -Eliminating unused constant (const string) $31 -Eliminating unused constant (const string) $32 -Eliminating unused constant (const string) $33 -Eliminating unused constant (const string) $34 -Eliminating unused constant (const string) $35 -Eliminating unused constant (const string) $36 -Eliminating unused constant (const string) $37 -Eliminating unused constant (const string) $38 -Eliminating unused constant (const string) $39 -Eliminating unused constant (const string) $40 -Eliminating unused constant (const string) $41 -Eliminating unused constant (const string) $1 -Eliminating unused constant (const string) $2 -Eliminating unused constant (const string) $3 -Eliminating unused constant (const string) $4 -Eliminating unused constant (const string) $5 -Eliminating unused constant (const string) $6 -Eliminating unused constant (const string) $7 -Eliminating unused constant (const string) $8 -Eliminating unused constant (const string) $9 -Eliminating unused constant (const string) $10 -Eliminating unused constant (const string) $11 -Eliminating unused constant (const string) $12 -Eliminating unused constant (const string) $13 -Eliminating unused constant (const string) $14 -Eliminating unused constant (const string) $15 -Eliminating unused constant (const string) $16 -Eliminating unused constant (const string) $17 -Eliminating unused constant (const string) $18 -Eliminating unused constant (const string) $19 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte*) print_screen#0 -Eliminating unused constant (const byte) dtv_control#129 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte*) bitmap_clear::bitmap#0 ← ((byte*)) (word~) bitmap_clear::$3 Eliminating Noop Cast (byte*) bitmap_plot::plotter#0 ← ((byte*)) (word~) bitmap_plot::$0 diff --git a/src/test/ref/compound-assignment.log b/src/test/ref/compound-assignment.log index 62a6114b2..a5c5f359c 100644 --- a/src/test/ref/compound-assignment.log +++ b/src/test/ref/compound-assignment.log @@ -502,7 +502,6 @@ Constant (const byte) test::i#10 = main::i#10 Constant (const byte) test::a#10 = main::a#10 Constant (const byte) main::i#11 = ++main::i#10 Successful SSA optimization Pass2ConstantIdentification -Eliminating unused constant (const byte) main::i#11 Successful SSA optimization PassNEliminateUnusedVars Culled Empty Block (label) main::@11 Successful SSA optimization Pass2CullEmptyBlocks diff --git a/src/test/ref/concat-char.log b/src/test/ref/concat-char.log index dd6b12f75..d055a9466 100644 --- a/src/test/ref/concat-char.log +++ b/src/test/ref/concat-char.log @@ -66,8 +66,6 @@ Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte[]) main::msg#0 = "cm"+'l' Successful SSA optimization Pass2ConstantIdentification -Eliminating unused constant (const string) main::$2 -Eliminating unused constant (const byte) main::l#0 Successful SSA optimization PassNEliminateUnusedVars Resolved ranged next value main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value if(main::i#1!=rangelast(0,2)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 3 diff --git a/src/test/ref/const-identification.log b/src/test/ref/const-identification.log index b448fac9c..d7c518d62 100644 --- a/src/test/ref/const-identification.log +++ b/src/test/ref/const-identification.log @@ -170,7 +170,6 @@ Culled Empty Block (label) line::@1 Successful SSA optimization Pass2CullEmptyBlocks Redundant Phi (byte) plot::x#2 (byte) plot::x#1 Successful SSA optimization Pass2RedundantPhiElimination -Eliminating unused constant (const byte) plot::x#0 Successful SSA optimization PassNEliminateUnusedVars Inlining constant with var siblings (const byte) main::i#0 Constant inlined main::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 diff --git a/src/test/ref/const-pointer.log b/src/test/ref/const-pointer.log index b8986bd97..681f5613e 100644 --- a/src/test/ref/const-pointer.log +++ b/src/test/ref/const-pointer.log @@ -61,8 +61,6 @@ Consolidated array index constant in *(main::screen#0+0) Successful SSA optimization Pass2ConstantAdditionElimination if() condition always true - replacing block destination if((const byte*) main::rem#0!=(const byte*) main::NULL#0) goto main::@1 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte*) main::NULL#0 -Eliminating unused constant (const byte*) main::rem#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@3 Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/constant-string-concat.log b/src/test/ref/constant-string-concat.log index fc7a1cecc..40329450c 100644 --- a/src/test/ref/constant-string-concat.log +++ b/src/test/ref/constant-string-concat.log @@ -102,13 +102,6 @@ Constant (const byte[]) main::s3#0 = "cam"+main::s#0+'o' Successful SSA optimization Pass2ConstantIdentification Constant (const byte[]) main::s5#0 = main::s3#0+main::s4#0 Successful SSA optimization Pass2ConstantIdentification -Eliminating unused constant (const string) main::$7 -Eliminating unused constant (const string) main::$8 -Eliminating unused constant (const string) main::$9 -Eliminating unused constant (const string) main::$10 -Eliminating unused constant (const byte) main::e#0 -Eliminating unused constant (const string) main::$3 -Eliminating unused constant (const byte[]) main::s2#0 Successful SSA optimization PassNEliminateUnusedVars Resolved ranged next value main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value if(main::i#1!=rangelast(0,7)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 8 diff --git a/src/test/ref/examples/chargen/chargen-analysis.log b/src/test/ref/examples/chargen/chargen-analysis.log index 9cdccc560..d67b7a378 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.log +++ b/src/test/ref/examples/chargen/chargen-analysis.log @@ -1328,7 +1328,6 @@ Consolidated constant in assignment plot_chargen::$7 Successful SSA optimization Pass2ConstantAdditionElimination if() condition always true - replacing block destination if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) main::shift#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.log b/src/test/ref/examples/multiplexer/simple-multiplexer.log index a7ca2bbcb..0e36ff998 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.log +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.log @@ -1542,13 +1542,7 @@ if() condition always true - replacing block destination if(true) goto loop::@2 Successful SSA optimization Pass2ConstantIfs Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) plexSort::$1 ← (byte) plexSort::m#2 Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) plexSort::$4 ← (byte) plexSort::s#3 -Eliminating unused constant (const byte*) PLEX_SCREEN_PTR#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const word/signed word/dword/signed dword) $0 -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 diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.log b/src/test/ref/examples/scrolllogo/scrolllogo.log index 8dbb63fb1..2baed13e2 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.log +++ b/src/test/ref/examples/scrolllogo/scrolllogo.log @@ -1990,8 +1990,6 @@ if() condition always true - replacing block destination if(true) goto loop::@2 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with div32u16u::$4 ← div32u16u::quotient_hi#0 dw= div32u16u::quotient_lo#0 Successful SSA optimization Pass2FixInlineConstructors -Eliminating unused constant (const byte) render_logo::line#0 -Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (word) mul16u::a#1 ← ((word)) (signed word) mul16s::a#0 Eliminating Noop Cast (word~) mul16s::$13 ← ((word)) (signed word) mul16s::a#0 @@ -2138,7 +2136,6 @@ Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@9_5) in block render_logo::@9_6 if() condition always false - eliminating [58] if((const byte) render_logo::line#24!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_6 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) render_logo::line#24 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#25 from unused block render_logo::@9_6 Eliminating variable (byte/signed word/word/dword/signed dword~) render_logo::$51 from unused block render_logo::@9_6 @@ -2204,7 +2201,6 @@ Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@5_5) in block render_logo::@5_6 if() condition always false - eliminating [65] if((const byte) render_logo::line#34!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_6 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) render_logo::line#34 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#35 from unused block render_logo::@5_6 Eliminating variable (byte/signed word/word/dword/signed dword~) render_logo::$63 from unused block render_logo::@5_6 @@ -2279,7 +2275,6 @@ Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@18_5) in block render_logo::@18_6 if() condition always false - eliminating [77] if((const byte) render_logo::line#46!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_6 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) render_logo::line#46 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#47 from unused block render_logo::@18_6 Eliminating variable (byte/signed word/word/dword/signed dword~) render_logo::$75 from unused block render_logo::@18_6 @@ -2360,7 +2355,6 @@ Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@14_5) in block render_logo::@14_6 if() condition always false - eliminating [91] if((const byte) render_logo::line#58!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_6 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) render_logo::line#58 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#59 from unused block render_logo::@14_6 Eliminating variable (byte/signed word/word/dword/signed dword~) render_logo::$97 from unused block render_logo::@14_6 diff --git a/src/test/ref/examples/sinplotter/sine-plotter.log b/src/test/ref/examples/sinplotter/sine-plotter.log index 3ea7ecf2b..0874962e8 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.log +++ b/src/test/ref/examples/sinplotter/sine-plotter.log @@ -2052,7 +2052,6 @@ Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_yhi#0 + 0) w= Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#2) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#2) Fixing inline constructor with div32u16u::$4 ← div32u16u::quotient_hi#0 dw= div32u16u::quotient_lo#0 Successful SSA optimization Pass2FixInlineConstructors -Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (word) mul16u::a#1 ← ((word)) (signed word) mul16s::a#0 Eliminating Noop Cast (word~) mul16s::$13 ← ((word)) (signed word) mul16s::a#0 diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.log b/src/test/ref/examples/sinsprites/sinus-sprites.log index a15f13968..fd43b82bf 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.log +++ b/src/test/ref/examples/sinsprites/sinus-sprites.log @@ -1975,7 +1975,6 @@ Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with getFAC::$0 ← *(memHi#0) w= *(memLo#0) Successful SSA optimization Pass2FixInlineConstructors Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) init::$1 ← (byte) init::i#2 -Eliminating unused constant (const byte) progress_idx#35 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte*) prepareMEM::mem#0 ← ((byte*)) (word) setFAC::w#5 Successful SSA optimization Pass2NopCastElimination diff --git a/src/test/ref/examples/tetris/tetris.asm b/src/test/ref/examples/tetris/tetris.asm index e3782d221..e7611e085 100644 --- a/src/test/ref/examples/tetris/tetris.asm +++ b/src/test/ref/examples/tetris/tetris.asm @@ -1,29 +1,209 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" + .label RASTER = $d012 .label BORDERCOL = $d020 .label COLS = $d800 + .label CIA1_PORT_A = $dc00 + .label CIA1_PORT_B = $dc01 .const BLACK = 0 - .const GREEN = 5 .const DARK_GREY = $b + .const KEY_Z = $c + .const KEY_LSHIFT = $f + .const KEY_X = $17 + .const KEY_DOT = $2c + .const KEY_COMMA = $2f + .const KEY_RSHIFT = $34 + .const KEY_CTRL = $3a + .const KEY_SPACE = $3c + .const KEY_COMMODORE = $3d .label SCREEN = $400 + .const current_movedown_rate = $32 + .const current_movedown_rate_fast = 5 + .label current_movedown_counter = 2 + .label current_xpos = 5 + .label current_piece_orientation = 6 + .label current_ypos = 3 + .label current_ypos_14 = 4 + .label current_xpos_26 = 7 + .label current_ypos_62 = 4 + .label current_xpos_64 = 7 jsr main main: { + .label key_event = 8 + .label movedown = 4 jsr init jsr render_playfield - jsr render_current_piece + lda #3 + sta current_xpos_26 + lda #0 + sta current_ypos_14 + tay + jsr render_current + lda #3 + sta current_xpos + lda #0 + sta current_ypos + sta current_movedown_counter + tax + sta current_piece_orientation + b4: + lda RASTER + cmp #$ff + bne b4 + b7: + lda RASTER + cmp #$fe + bne b7 + jsr keyboard_event_scan + jsr keyboard_event_get + sta key_event + inc current_movedown_counter + cmp #KEY_SPACE + bne b1 + lda #1 + sta movedown + jmp b10 + b1: + lda #0 + sta movedown + b10: + lda #KEY_SPACE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + cmp #0 + beq b11 + lda current_movedown_counter + cmp #current_movedown_rate_fast + bcc b11 + inc movedown + b11: + lda current_movedown_counter + cmp #current_movedown_rate + bcc b13 + inc movedown + b13: + lda movedown + beq b2 + jsr current_movedown + lda #0 + sta current_movedown_counter + ldy #1 + jmp b14 b2: + ldy #0 + b14: + lda #$80 + and key_event + cmp #0 + bne b15 + lda key_event + cmp #KEY_COMMA + bne b16 + dec current_xpos + iny + b16: + lda key_event + cmp #KEY_DOT + bne b17 + inc current_xpos + iny + b17: + lda key_event + cmp #KEY_Z + bne b18 + lda current_piece_orientation + sec + sbc #$10 + and #$3f + sta current_piece_orientation + iny + b18: + lda key_event + cmp #KEY_X + bne b15 + lda #$10 + clc + adc current_piece_orientation + and #$3f + sta current_piece_orientation + iny + b15: + cpy #0 + bne !b4+ + jmp b4 + !b4: inc BORDERCOL - jmp b2 + jsr render_playfield + ldy current_piece_orientation + lda current_ypos + sta current_ypos_62 + lda current_xpos + sta current_xpos_64 + jsr render_current + dec BORDERCOL + jmp b4 } -render_current_piece: { +render_current: { + .label current_piece_gfx = $b + .label screen_line = $d + .label current_cell = $f + .label i = 9 + .label c = $a + .label l = 8 + tya + clc + adc #piece_t + adc #0 + sta current_piece_gfx+1 + lda #0 + sta i + sta l + b1: + lda current_ypos_14 + clc + adc l + asl + tay + lda screen_lines,y + sta screen_line + lda screen_lines+1,y + sta screen_line+1 + lda #0 + sta c + b2: + ldy i + lda (current_piece_gfx),y + sta current_cell + inc i + beq b3 + lda current_xpos_26 + clc + adc c + cmp #$a + bcs b3 + tay + lda current_cell + sta (screen_line),y + b3: + inc c + lda c + cmp #4 + bne b2 + inc l + lda l + cmp #4 + bne b1 rts } render_playfield: { - .label _1 = 6 - .label line = 4 - .label i = 3 - .label l = 2 + .label _1 = $d + .label line = $b + .label i = 8 + .label c = 7 + .label l = 4 lda #0 sta i sta l @@ -35,9 +215,10 @@ render_playfield: { sta line lda screen_lines+1,y sta line+1 - ldx #0 + lda #0 + sta c b2: - txa + lda c clc adc line sta _1 @@ -49,8 +230,9 @@ render_playfield: { ldy #0 sta (_1),y inc i - inx - cpx #$a + inc c + lda c + cmp #$a bne b2 inc l lda l @@ -58,16 +240,128 @@ render_playfield: { bne b1 rts } +current_movedown: { + inc current_ypos + rts +} +keyboard_event_pressed: { + .label row_bits = 9 + .label keycode = 7 + lda keycode + lsr + lsr + lsr + tay + lda keyboard_scan_values,y + sta row_bits + lda #7 + and keycode + tay + lda keyboard_matrix_col_bitmask,y + and row_bits + rts +} +keyboard_event_get: { + cpx #0 + beq b1 + dex + lda keyboard_events,x + jmp breturn + b1: + lda #$ff + breturn: + rts +} +keyboard_event_scan: { + .label row_scan = 9 + .label keycode = 8 + .label row = 4 + .label col = 7 + lda #0 + sta keycode + sta row + b1: + ldy row + jsr keyboard_matrix_read + sta row_scan + ldy row + cmp keyboard_scan_values,y + bne b2 + lda #8 + clc + adc keycode + sta keycode + b3: + inc row + lda row + cmp #8 + bne b1 + lda #KEY_LSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + cmp #0 + lda #KEY_RSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + cmp #0 + lda #KEY_CTRL + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + cmp #0 + lda #KEY_COMMODORE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + cmp #0 + rts + b2: + lda #0 + sta col + b4: + lda row_scan + ldy row + eor keyboard_scan_values,y + ldy col + and keyboard_matrix_col_bitmask,y + cmp #0 + beq b5 + cpx #8 + beq b5 + lda row_scan + and keyboard_matrix_col_bitmask,y + cmp #0 + beq b7 + lda keycode + sta keyboard_events,x + inx + b5: + inc keycode + inc col + lda col + cmp #8 + bne b4 + lda row_scan + ldy row + sta keyboard_scan_values,y + jmp b3 + b7: + lda #$40 + ora keycode + sta keyboard_events,x + inx + jmp b5 +} +keyboard_matrix_read: { + lda keyboard_matrix_row_bitmask,y + sta CIA1_PORT_A + lda CIA1_PORT_B + eor #$ff + rts +} init: { - .label _7 = 6 - .label li = 4 - .label line = 4 + .label _7 = $d + .label li = $b + .label line = $b .label l = 2 - lda #GREEN - sta current_piece - sta current_piece+1 - sta current_piece+2 - sta current_piece+4 ldx #$a0 lda #=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_current::@3 + to:render_current::@6 +render_current::@6: scope:[render_current] from render_current::@5 + [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 + to:render_current::@3 +render_current::@3: scope:[render_current] from render_current::@2 render_current::@5 render_current::@6 + [78] (byte) render_current::c#1 ← ++ (byte) render_current::c#2 + [79] if((byte) render_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@2 + to:render_current::@7 +render_current::@7: scope:[render_current] from render_current::@3 + [80] (byte) render_current::l#1 ← ++ (byte) render_current::l#2 + [81] if((byte) render_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@1 + to:render_current::@return +render_current::@return: scope:[render_current] from render_current::@7 + [82] return + to:@return +render_playfield: scope:[render_playfield] from main::@39 main::@41 + [83] phi() to:render_playfield::@1 render_playfield::@1: scope:[render_playfield] from render_playfield render_playfield::@3 - [14] (byte) render_playfield::i#3 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::i#1 ) - [14] (byte) render_playfield::l#2 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::l#1 ) - [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 - [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) + [84] (byte) render_playfield::i#3 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::i#1 ) + [84] (byte) render_playfield::l#2 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::l#1 ) + [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) to:render_playfield::@2 render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render_playfield::@2 - [17] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) - [17] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@2/(byte) render_playfield::c#1 ) - [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 - [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) - [20] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 - [21] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 - [22] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 + [87] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) + [87] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@2/(byte) render_playfield::c#1 ) + [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 + [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) + [90] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 + [91] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 + [92] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 to:render_playfield::@3 render_playfield::@3: scope:[render_playfield] from render_playfield::@2 - [23] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 - [24] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 + [93] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 + [94] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 to:render_playfield::@return render_playfield::@return: scope:[render_playfield] from render_playfield::@3 - [25] return + [95] return + to:@return +current_movedown: scope:[current_movedown] from main::@33 + [96] (byte) current_ypos#10 ← ++ (byte) current_ypos#13 + to:current_movedown::@return +current_movedown::@return: scope:[current_movedown] from current_movedown + [97] return + to:@return +keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@10 keyboard_event_scan::@11 keyboard_event_scan::@20 keyboard_event_scan::@9 main::@10 + [98] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@10/(const byte) KEY_CTRL#0 keyboard_event_scan::@11/(const byte) KEY_COMMODORE#0 keyboard_event_scan::@20/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@9/(const byte) KEY_RSHIFT#0 main::@10/(const byte) KEY_SPACE#0 ) + [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 + [100] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) + [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 + [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) + to:keyboard_event_pressed::@return +keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed + [103] return + to:@return +keyboard_event_get: scope:[keyboard_event_get] from main::@44 + [104] if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@return + to:keyboard_event_get::@3 +keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get + [105] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [106] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) + to:keyboard_event_get::@return +keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@3 + [107] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@3/(byte) keyboard_events_size#4 ) + [107] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte/word/signed word/dword/signed dword) 255 keyboard_event_get::@3/(byte) keyboard_event_get::return#1 ) + [108] return + to:@return +keyboard_event_scan: scope:[keyboard_event_scan] from main::@9 + [109] phi() + to:keyboard_event_scan::@1 +keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@3 + [110] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@3/(byte) keyboard_events_size#13 ) + [110] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@3/(byte) keyboard_event_scan::keycode#14 ) + [110] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@3/(byte) keyboard_event_scan::row#1 ) + [111] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [112] call keyboard_matrix_read + [113] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + to:keyboard_event_scan::@25 +keyboard_event_scan::@25: scope:[keyboard_event_scan] from keyboard_event_scan::@1 + [114] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [115] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@4 + to:keyboard_event_scan::@13 +keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@25 + [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 + to:keyboard_event_scan::@3 +keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@13 keyboard_event_scan::@19 + [117] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@13/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) + [117] (byte) keyboard_event_scan::keycode#14 ← phi( keyboard_event_scan::@13/(byte) keyboard_event_scan::keycode#1 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#15 ) + [118] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [119] if((byte) keyboard_event_scan::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@1 + to:keyboard_event_scan::@20 +keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@3 + [120] phi() + [121] call keyboard_event_pressed + [122] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@26 +keyboard_event_scan::@26: scope:[keyboard_event_scan] from keyboard_event_scan::@20 + [123] (byte~) keyboard_event_scan::$14 ← (byte) keyboard_event_pressed::return#0 + [124] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 + to:keyboard_event_scan::@21 +keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@26 + [125] phi() + to:keyboard_event_scan::@9 +keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@26 + [126] phi() + [127] call keyboard_event_pressed + [128] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@27 +keyboard_event_scan::@27: scope:[keyboard_event_scan] from keyboard_event_scan::@9 + [129] (byte~) keyboard_event_scan::$18 ← (byte) keyboard_event_pressed::return#1 + [130] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 + to:keyboard_event_scan::@22 +keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@27 + [131] phi() + to:keyboard_event_scan::@10 +keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@27 + [132] phi() + [133] call keyboard_event_pressed + [134] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@28 +keyboard_event_scan::@28: scope:[keyboard_event_scan] from keyboard_event_scan::@10 + [135] (byte~) keyboard_event_scan::$22 ← (byte) keyboard_event_pressed::return#2 + [136] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 + to:keyboard_event_scan::@23 +keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@28 + [137] phi() + to:keyboard_event_scan::@11 +keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@28 + [138] phi() + [139] call keyboard_event_pressed + [140] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@29 +keyboard_event_scan::@29: scope:[keyboard_event_scan] from keyboard_event_scan::@11 + [141] (byte~) keyboard_event_scan::$26 ← (byte) keyboard_event_pressed::return#10 + [142] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@return + to:keyboard_event_scan::@24 +keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@29 + [143] phi() + to:keyboard_event_scan::@return +keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@24 keyboard_event_scan::@29 + [144] return + to:@return +keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@25 keyboard_event_scan::@5 + [145] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#29 keyboard_event_scan::@5/(byte) keyboard_events_size#30 ) + [145] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#11 keyboard_event_scan::@5/(byte) keyboard_event_scan::keycode#15 ) + [145] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@5/(byte) keyboard_event_scan::col#1 ) + [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) + [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [148] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 + to:keyboard_event_scan::@15 +keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@4 + [149] if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@5 + to:keyboard_event_scan::@16 +keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15 + [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [151] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 + to:keyboard_event_scan::@17 +keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [153] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + to:keyboard_event_scan::@5 +keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@17 keyboard_event_scan::@4 keyboard_event_scan::@7 + [154] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan::@17/(byte) keyboard_events_size#2 keyboard_event_scan::@4/(byte) keyboard_events_size#10 keyboard_event_scan::@15/(byte) keyboard_events_size#10 keyboard_event_scan::@7/(byte) keyboard_events_size#1 ) + [155] (byte) keyboard_event_scan::keycode#15 ← ++ (byte) keyboard_event_scan::keycode#10 + [156] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [157] if((byte) keyboard_event_scan::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@4 + to:keyboard_event_scan::@19 +keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@5 + [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + to:keyboard_event_scan::@3 +keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 + [160] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte/word/dword~) keyboard_event_scan::$11 + [161] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + to:keyboard_event_scan::@5 +keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@1 + [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) + [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) + to:keyboard_matrix_read::@return +keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read + [164] return to:@return init: scope:[init] from main - [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 - [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 - [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 - [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 - [30] call fill + [165] phi() + [166] call fill to:init::@7 init::@7: scope:[init] from init - [31] phi() - [32] call fill + [167] phi() + [168] call fill to:init::@1 init::@1: scope:[init] from init::@1 init::@7 - [33] (byte*) init::li#2 ← phi( init::@1/(byte*) init::li#1 init::@7/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 ) - [33] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 ) - [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 - [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 - [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 - [37] (byte) init::i#1 ← ++ (byte) init::i#2 - [38] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 + [169] (byte*) init::li#2 ← phi( init::@1/(byte*) init::li#1 init::@7/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 ) + [169] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 + [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 + [173] (byte) init::i#1 ← ++ (byte) init::i#2 + [174] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 to:init::@2 init::@2: scope:[init] from init::@1 init::@5 - [39] (byte) init::l#4 ← phi( init::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@5/(byte) init::l#1 ) - [39] (byte*) init::line#4 ← phi( init::@1/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 init::@5/(byte*) init::line#1 ) + [175] (byte) init::l#4 ← phi( init::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@5/(byte) init::l#1 ) + [175] (byte*) init::line#4 ← phi( init::@1/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 init::@5/(byte*) init::line#1 ) to:init::@3 init::@3: scope:[init] from init::@2 init::@3 - [40] (byte) init::c#2 ← phi( init::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@3/(byte) init::c#1 ) - [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 - [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 - [43] (byte) init::c#1 ← ++ (byte) init::c#2 - [44] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 + [176] (byte) init::c#2 ← phi( init::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@3/(byte) init::c#1 ) + [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 + [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 + [179] (byte) init::c#1 ← ++ (byte) init::c#2 + [180] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 to:init::@5 init::@5: scope:[init] from init::@3 - [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 - [46] (byte) init::l#1 ← ++ (byte) init::l#4 - [47] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 + [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 + [182] (byte) init::l#1 ← ++ (byte) init::l#4 + [183] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 to:init::@return init::@return: scope:[init] from init::@5 - [48] return + [184] return to:@return fill: scope:[fill] from init init::@7 - [49] (byte) fill::val#3 ← phi( init/(byte/word/signed word/dword/signed dword) 160 init::@7/(const byte) BLACK#0 ) - [49] (byte*) fill::addr#0 ← phi( init/(const byte*) SCREEN#0 init::@7/(const byte*) COLS#0 ) - [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 + [185] (byte) fill::val#3 ← phi( init/(byte/word/signed word/dword/signed dword) 160 init::@7/(const byte) BLACK#0 ) + [185] (byte*) fill::addr#0 ← phi( init/(const byte*) SCREEN#0 init::@7/(const byte*) COLS#0 ) + [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 to:fill::@1 fill::@1: scope:[fill] from fill fill::@1 - [51] (byte*) fill::addr#2 ← phi( fill/(byte*) fill::addr#0 fill::@1/(byte*) fill::addr#1 ) - [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 - [53] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 - [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 + [187] (byte*) fill::addr#2 ← phi( fill/(byte*) fill::addr#0 fill::@1/(byte*) fill::addr#1 ) + [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 + [189] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 + [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 to:fill::@return fill::@return: scope:[fill] from fill::@1 - [55] return + [191] return to:@return diff --git a/src/test/ref/examples/tetris/tetris.log b/src/test/ref/examples/tetris/tetris.log index 596db1b1c..99224dc67 100644 --- a/src/test/ref/examples/tetris/tetris.log +++ b/src/test/ref/examples/tetris/tetris.log @@ -1,11 +1,14 @@ +Resolved forward reference piece_t to (byte[$3]) piece_t Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx CONTROL FLOW GRAPH SSA @begin: scope:[] from + (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) 53266 (byte*) BORDERCOL#0 ← ((byte*)) (word/dword/signed dword) 53280 (byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) 55296 + (byte*) CIA1_PORT_A#0 ← ((byte*)) (word/dword/signed dword) 56320 + (byte*) CIA1_PORT_B#0 ← ((byte*)) (word/dword/signed dword) 56321 (byte) BLACK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 - (byte) GREEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5 (byte) DARK_GREY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 11 to:@4 fill: scope:[fill] from init init::@7 @@ -29,58 +32,840 @@ fill::@return: scope:[fill] from fill::@1 return to:@return @4: scope:[] from @begin + (byte) KEY_Z#0 ← (byte/signed byte/word/signed word/dword/signed dword) 12 + (byte) KEY_LSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte) KEY_X#0 ← (byte/signed byte/word/signed word/dword/signed dword) 23 + (byte) KEY_DOT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 44 + (byte) KEY_COMMA#0 ← (byte/signed byte/word/signed word/dword/signed dword) 47 + (byte) KEY_RSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 52 + (byte) KEY_CTRL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 58 + (byte) KEY_SPACE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 60 + (byte) KEY_COMMODORE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 61 + (byte[8]) keyboard_matrix_row_bitmask#0 ← { (byte/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 } + (byte[8]) keyboard_matrix_col_bitmask#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 } + to:@8 +keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@1 + (byte) keyboard_matrix_read::rowid#1 ← phi( keyboard_event_scan::@1/(byte) keyboard_matrix_read::rowid#0 ) + *((byte*) CIA1_PORT_A#0) ← *((byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#1) + (byte~) keyboard_matrix_read::$0 ← ~ *((byte*) CIA1_PORT_B#0) + (byte) keyboard_matrix_read::row_pressed_bits#0 ← (byte~) keyboard_matrix_read::$0 + (byte) keyboard_matrix_read::return#0 ← (byte) keyboard_matrix_read::row_pressed_bits#0 + to:keyboard_matrix_read::@return +keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read + (byte) keyboard_matrix_read::return#3 ← phi( keyboard_matrix_read/(byte) keyboard_matrix_read::return#0 ) + (byte) keyboard_matrix_read::return#1 ← (byte) keyboard_matrix_read::return#3 + return + to:@return +@8: scope:[] from @4 + (byte[8]) keyboard_events#0 ← { fill( 8, 0) } + (byte) keyboard_events_size#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) keyboard_modifiers#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) KEY_MODIFIER_LSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) KEY_MODIFIER_RSHIFT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) KEY_MODIFIER_CTRL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) KEY_MODIFIER_COMMODORE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte[8]) keyboard_scan_values#0 ← { fill( 8, 0) } + to:@11 +keyboard_event_scan: scope:[keyboard_event_scan] from main::@9 + (byte) keyboard_events_size#55 ← phi( main::@9/(byte) keyboard_events_size#26 ) + (byte) keyboard_event_scan::keycode#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) keyboard_event_scan::row#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:keyboard_event_scan::@1 +keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@3 + (byte) keyboard_events_size#45 ← phi( keyboard_event_scan/(byte) keyboard_events_size#55 keyboard_event_scan::@3/(byte) keyboard_events_size#56 ) + (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) keyboard_event_scan::keycode#0 keyboard_event_scan::@3/(byte) keyboard_event_scan::keycode#14 ) + (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) keyboard_event_scan::row#0 keyboard_event_scan::@3/(byte) keyboard_event_scan::row#1 ) + (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + call keyboard_matrix_read + (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#1 + to:keyboard_event_scan::@25 +keyboard_event_scan::@25: scope:[keyboard_event_scan] from keyboard_event_scan::@1 + (byte) keyboard_events_size#37 ← phi( keyboard_event_scan::@1/(byte) keyboard_events_size#45 ) + (byte) keyboard_event_scan::keycode#7 ← phi( keyboard_event_scan::@1/(byte) keyboard_event_scan::keycode#11 ) + (byte) keyboard_event_scan::row#3 ← phi( keyboard_event_scan::@1/(byte) keyboard_event_scan::row#2 ) + (byte) keyboard_matrix_read::return#4 ← phi( keyboard_event_scan::@1/(byte) keyboard_matrix_read::return#2 ) + (byte~) keyboard_event_scan::$0 ← (byte) keyboard_matrix_read::return#4 + (byte) keyboard_event_scan::row_scan#0 ← (byte~) keyboard_event_scan::$0 + (bool~) keyboard_event_scan::$1 ← (byte) keyboard_event_scan::row_scan#0 != *((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#3) + if((bool~) keyboard_event_scan::$1) goto keyboard_event_scan::@2 + to:keyboard_event_scan::@13 +keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@25 + (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#37 ) + (byte) keyboard_event_scan::keycode#12 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#7 ) + (byte) keyboard_event_scan::row#8 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row#3 ) + (byte) keyboard_event_scan::row_scan#4 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row_scan#0 ) + (byte) keyboard_event_scan::col#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:keyboard_event_scan::@4 +keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@25 + (byte) keyboard_events_size#62 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#37 ) + (byte) keyboard_event_scan::row#7 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::row#3 ) + (byte) keyboard_event_scan::keycode#3 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#7 ) + (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$2 ← (byte) keyboard_event_scan::keycode#3 + (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) keyboard_event_scan::keycode#1 ← (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$2 + to:keyboard_event_scan::@3 +keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@13 keyboard_event_scan::@19 + (byte) keyboard_events_size#56 ← phi( keyboard_event_scan::@13/(byte) keyboard_events_size#62 keyboard_event_scan::@19/(byte) keyboard_events_size#63 ) + (byte) keyboard_event_scan::keycode#14 ← phi( keyboard_event_scan::@13/(byte) keyboard_event_scan::keycode#1 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#15 ) + (byte) keyboard_event_scan::row#4 ← phi( keyboard_event_scan::@13/(byte) keyboard_event_scan::row#7 keyboard_event_scan::@19/(byte) keyboard_event_scan::row#6 ) + (byte) keyboard_event_scan::row#1 ← (byte) keyboard_event_scan::row#4 + rangenext(0,7) + (bool~) keyboard_event_scan::$13 ← (byte) keyboard_event_scan::row#1 != rangelast(0,7) + if((bool~) keyboard_event_scan::$13) goto keyboard_event_scan::@1 + to:keyboard_event_scan::@20 +keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@2 keyboard_event_scan::@5 + (byte) keyboard_events_size#21 ← phi( keyboard_event_scan::@2/(byte) keyboard_events_size#29 keyboard_event_scan::@5/(byte) keyboard_events_size#30 ) + (byte) keyboard_event_scan::keycode#8 ← phi( keyboard_event_scan::@2/(byte) keyboard_event_scan::keycode#12 keyboard_event_scan::@5/(byte) keyboard_event_scan::keycode#2 ) + (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@2/(byte) keyboard_event_scan::col#0 keyboard_event_scan::@5/(byte) keyboard_event_scan::col#1 ) + (byte) keyboard_event_scan::row#5 ← phi( keyboard_event_scan::@2/(byte) keyboard_event_scan::row#8 keyboard_event_scan::@5/(byte) keyboard_event_scan::row#9 ) + (byte) keyboard_event_scan::row_scan#1 ← phi( keyboard_event_scan::@2/(byte) keyboard_event_scan::row_scan#4 keyboard_event_scan::@5/(byte) keyboard_event_scan::row_scan#5 ) + (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#1 ^ *((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#5) + (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) keyboard_event_scan::$6 ← ! (bool~) keyboard_event_scan::$5 + if((bool~) keyboard_event_scan::$6) goto keyboard_event_scan::@5 + to:keyboard_event_scan::@15 +keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@17 keyboard_event_scan::@4 keyboard_event_scan::@6 keyboard_event_scan::@7 + (byte) keyboard_events_size#30 ← phi( keyboard_event_scan::@17/(byte) keyboard_events_size#2 keyboard_event_scan::@4/(byte) keyboard_events_size#21 keyboard_event_scan::@6/(byte) keyboard_events_size#38 keyboard_event_scan::@7/(byte) keyboard_events_size#1 ) + (byte) keyboard_event_scan::row#9 ← phi( keyboard_event_scan::@17/(byte) keyboard_event_scan::row#10 keyboard_event_scan::@4/(byte) keyboard_event_scan::row#5 keyboard_event_scan::@6/(byte) keyboard_event_scan::row#11 keyboard_event_scan::@7/(byte) keyboard_event_scan::row#12 ) + (byte) keyboard_event_scan::row_scan#5 ← phi( keyboard_event_scan::@17/(byte) keyboard_event_scan::row_scan#7 keyboard_event_scan::@4/(byte) keyboard_event_scan::row_scan#1 keyboard_event_scan::@6/(byte) keyboard_event_scan::row_scan#8 keyboard_event_scan::@7/(byte) keyboard_event_scan::row_scan#9 ) + (byte) keyboard_event_scan::col#3 ← phi( keyboard_event_scan::@17/(byte) keyboard_event_scan::col#5 keyboard_event_scan::@4/(byte) keyboard_event_scan::col#2 keyboard_event_scan::@6/(byte) keyboard_event_scan::col#6 keyboard_event_scan::@7/(byte) keyboard_event_scan::col#7 ) + (byte) keyboard_event_scan::keycode#4 ← phi( keyboard_event_scan::@17/(byte) keyboard_event_scan::keycode#6 keyboard_event_scan::@4/(byte) keyboard_event_scan::keycode#8 keyboard_event_scan::@6/(byte) keyboard_event_scan::keycode#9 keyboard_event_scan::@7/(byte) keyboard_event_scan::keycode#5 ) + (byte) keyboard_event_scan::keycode#2 ← ++ (byte) keyboard_event_scan::keycode#4 + (byte) keyboard_event_scan::col#1 ← (byte) keyboard_event_scan::col#3 + rangenext(0,7) + (bool~) keyboard_event_scan::$12 ← (byte) keyboard_event_scan::col#1 != rangelast(0,7) + if((bool~) keyboard_event_scan::$12) goto keyboard_event_scan::@4 + to:keyboard_event_scan::@19 +keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@4 + (byte) keyboard_event_scan::row#13 ← phi( keyboard_event_scan::@4/(byte) keyboard_event_scan::row#5 ) + (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@4/(byte) keyboard_event_scan::keycode#8 ) + (byte) keyboard_event_scan::col#8 ← phi( keyboard_event_scan::@4/(byte) keyboard_event_scan::col#2 ) + (byte) keyboard_event_scan::row_scan#6 ← phi( keyboard_event_scan::@4/(byte) keyboard_event_scan::row_scan#1 ) + (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@4/(byte) keyboard_events_size#21 ) + (bool~) keyboard_event_scan::$7 ← (byte) keyboard_events_size#10 != (byte/signed byte/word/signed word/dword/signed dword) 8 + (bool~) keyboard_event_scan::$8 ← ! (bool~) keyboard_event_scan::$7 + if((bool~) keyboard_event_scan::$8) goto keyboard_event_scan::@6 + to:keyboard_event_scan::@16 +keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@15 + (byte) keyboard_events_size#38 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#10 ) + (byte) keyboard_event_scan::row#11 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::row#13 ) + (byte) keyboard_event_scan::row_scan#8 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::row_scan#6 ) + (byte) keyboard_event_scan::col#6 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::col#8 ) + (byte) keyboard_event_scan::keycode#9 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#13 ) + to:keyboard_event_scan::@5 +keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15 + (byte) keyboard_event_scan::row#14 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::row#13 ) + (byte) keyboard_events_size#22 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#10 ) + (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#13 ) + (byte) keyboard_event_scan::col#4 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::col#8 ) + (byte) keyboard_event_scan::row_scan#2 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::row_scan#6 ) + (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_scan::row_scan#2 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#4) + (byte) keyboard_event_scan::event_type#0 ← (byte~) keyboard_event_scan::$9 + (bool~) keyboard_event_scan::$10 ← (byte) keyboard_event_scan::event_type#0 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) keyboard_event_scan::$10) goto keyboard_event_scan::@7 + to:keyboard_event_scan::@17 +keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + (byte) keyboard_event_scan::row#12 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::row#14 ) + (byte) keyboard_event_scan::row_scan#9 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::row_scan#2 ) + (byte) keyboard_event_scan::col#7 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::col#4 ) + (byte) keyboard_events_size#11 ← phi( keyboard_event_scan::@16/(byte) keyboard_events_size#22 ) + (byte) keyboard_event_scan::keycode#5 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#10 ) + (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#5 | (byte/signed byte/word/signed word/dword/signed dword) 64 + *((byte[8]) keyboard_events#0 + (byte) keyboard_events_size#11) ← (byte/word/dword~) keyboard_event_scan::$11 + (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#11 + to:keyboard_event_scan::@5 +keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + (byte) keyboard_event_scan::row#10 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::row#14 ) + (byte) keyboard_event_scan::row_scan#7 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::row_scan#2 ) + (byte) keyboard_event_scan::col#5 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::col#4 ) + (byte) keyboard_events_size#12 ← phi( keyboard_event_scan::@16/(byte) keyboard_events_size#22 ) + (byte) keyboard_event_scan::keycode#6 ← phi( keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#10 ) + *((byte[8]) keyboard_events#0 + (byte) keyboard_events_size#12) ← (byte) keyboard_event_scan::keycode#6 + (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#12 + to:keyboard_event_scan::@5 +keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@5 + (byte) keyboard_events_size#63 ← phi( keyboard_event_scan::@5/(byte) keyboard_events_size#30 ) + (byte) keyboard_event_scan::keycode#15 ← phi( keyboard_event_scan::@5/(byte) keyboard_event_scan::keycode#2 ) + (byte) keyboard_event_scan::row#6 ← phi( keyboard_event_scan::@5/(byte) keyboard_event_scan::row#9 ) + (byte) keyboard_event_scan::row_scan#3 ← phi( keyboard_event_scan::@5/(byte) keyboard_event_scan::row_scan#5 ) + *((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#6) ← (byte) keyboard_event_scan::row_scan#3 + to:keyboard_event_scan::@3 +keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@3 + (byte) keyboard_events_size#83 ← phi( keyboard_event_scan::@3/(byte) keyboard_events_size#56 ) + (byte) keyboard_modifiers#1 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) keyboard_event_pressed::keycode#0 ← (byte) KEY_LSHIFT#0 + call keyboard_event_pressed + (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#5 + to:keyboard_event_scan::@26 +keyboard_event_scan::@26: scope:[keyboard_event_scan] from keyboard_event_scan::@20 + (byte) keyboard_events_size#78 ← phi( keyboard_event_scan::@20/(byte) keyboard_events_size#83 ) + (byte) keyboard_modifiers#18 ← phi( keyboard_event_scan::@20/(byte) keyboard_modifiers#1 ) + (byte) keyboard_event_pressed::return#7 ← phi( keyboard_event_scan::@20/(byte) keyboard_event_pressed::return#0 ) + (byte~) keyboard_event_scan::$14 ← (byte) keyboard_event_pressed::return#7 + (bool~) keyboard_event_scan::$15 ← (byte~) keyboard_event_scan::$14 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) keyboard_event_scan::$16 ← ! (bool~) keyboard_event_scan::$15 + if((bool~) keyboard_event_scan::$16) goto keyboard_event_scan::@9 + to:keyboard_event_scan::@21 +keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@26 + (byte) keyboard_events_size#71 ← phi( keyboard_event_scan::@21/(byte) keyboard_events_size#77 keyboard_event_scan::@26/(byte) keyboard_events_size#78 ) + (byte) keyboard_modifiers#26 ← phi( keyboard_event_scan::@21/(byte) keyboard_modifiers#2 keyboard_event_scan::@26/(byte) keyboard_modifiers#18 ) + (byte) keyboard_event_pressed::keycode#1 ← (byte) KEY_RSHIFT#0 + call keyboard_event_pressed + (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#5 + to:keyboard_event_scan::@27 +keyboard_event_scan::@27: scope:[keyboard_event_scan] from keyboard_event_scan::@9 + (byte) keyboard_events_size#65 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#71 ) + (byte) keyboard_modifiers#19 ← phi( keyboard_event_scan::@9/(byte) keyboard_modifiers#26 ) + (byte) keyboard_event_pressed::return#8 ← phi( keyboard_event_scan::@9/(byte) keyboard_event_pressed::return#1 ) + (byte~) keyboard_event_scan::$18 ← (byte) keyboard_event_pressed::return#8 + (bool~) keyboard_event_scan::$19 ← (byte~) keyboard_event_scan::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) keyboard_event_scan::$20 ← ! (bool~) keyboard_event_scan::$19 + if((bool~) keyboard_event_scan::$20) goto keyboard_event_scan::@10 + to:keyboard_event_scan::@22 +keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@26 + (byte) keyboard_events_size#77 ← phi( keyboard_event_scan::@26/(byte) keyboard_events_size#78 ) + (byte) keyboard_modifiers#10 ← phi( keyboard_event_scan::@26/(byte) keyboard_modifiers#18 ) + (byte~) keyboard_event_scan::$17 ← (byte) keyboard_modifiers#10 | (byte) KEY_MODIFIER_LSHIFT#0 + (byte) keyboard_modifiers#2 ← (byte~) keyboard_event_scan::$17 + to:keyboard_event_scan::@9 +keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@27 + (byte) keyboard_events_size#57 ← phi( keyboard_event_scan::@22/(byte) keyboard_events_size#64 keyboard_event_scan::@27/(byte) keyboard_events_size#65 ) + (byte) keyboard_modifiers#27 ← phi( keyboard_event_scan::@22/(byte) keyboard_modifiers#3 keyboard_event_scan::@27/(byte) keyboard_modifiers#19 ) + (byte) keyboard_event_pressed::keycode#2 ← (byte) KEY_CTRL#0 + call keyboard_event_pressed + (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#5 + to:keyboard_event_scan::@28 +keyboard_event_scan::@28: scope:[keyboard_event_scan] from keyboard_event_scan::@10 + (byte) keyboard_events_size#47 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#57 ) + (byte) keyboard_modifiers#20 ← phi( keyboard_event_scan::@10/(byte) keyboard_modifiers#27 ) + (byte) keyboard_event_pressed::return#9 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_pressed::return#2 ) + (byte~) keyboard_event_scan::$22 ← (byte) keyboard_event_pressed::return#9 + (bool~) keyboard_event_scan::$23 ← (byte~) keyboard_event_scan::$22 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) keyboard_event_scan::$24 ← ! (bool~) keyboard_event_scan::$23 + if((bool~) keyboard_event_scan::$24) goto keyboard_event_scan::@11 + to:keyboard_event_scan::@23 +keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@27 + (byte) keyboard_events_size#64 ← phi( keyboard_event_scan::@27/(byte) keyboard_events_size#65 ) + (byte) keyboard_modifiers#11 ← phi( keyboard_event_scan::@27/(byte) keyboard_modifiers#19 ) + (byte~) keyboard_event_scan::$21 ← (byte) keyboard_modifiers#11 | (byte) KEY_MODIFIER_RSHIFT#0 + (byte) keyboard_modifiers#3 ← (byte~) keyboard_event_scan::$21 + to:keyboard_event_scan::@10 +keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@28 + (byte) keyboard_events_size#39 ← phi( keyboard_event_scan::@23/(byte) keyboard_events_size#46 keyboard_event_scan::@28/(byte) keyboard_events_size#47 ) + (byte) keyboard_modifiers#28 ← phi( keyboard_event_scan::@23/(byte) keyboard_modifiers#4 keyboard_event_scan::@28/(byte) keyboard_modifiers#20 ) + (byte) keyboard_event_pressed::keycode#3 ← (byte) KEY_COMMODORE#0 + call keyboard_event_pressed + (byte) keyboard_event_pressed::return#3 ← (byte) keyboard_event_pressed::return#5 + to:keyboard_event_scan::@29 +keyboard_event_scan::@29: scope:[keyboard_event_scan] from keyboard_event_scan::@11 + (byte) keyboard_events_size#31 ← phi( keyboard_event_scan::@11/(byte) keyboard_events_size#39 ) + (byte) keyboard_modifiers#21 ← phi( keyboard_event_scan::@11/(byte) keyboard_modifiers#28 ) + (byte) keyboard_event_pressed::return#10 ← phi( keyboard_event_scan::@11/(byte) keyboard_event_pressed::return#3 ) + (byte~) keyboard_event_scan::$26 ← (byte) keyboard_event_pressed::return#10 + (bool~) keyboard_event_scan::$27 ← (byte~) keyboard_event_scan::$26 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) keyboard_event_scan::$28 ← ! (bool~) keyboard_event_scan::$27 + if((bool~) keyboard_event_scan::$28) goto keyboard_event_scan::@12 + to:keyboard_event_scan::@24 +keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@28 + (byte) keyboard_events_size#46 ← phi( keyboard_event_scan::@28/(byte) keyboard_events_size#47 ) + (byte) keyboard_modifiers#12 ← phi( keyboard_event_scan::@28/(byte) keyboard_modifiers#20 ) + (byte~) keyboard_event_scan::$25 ← (byte) keyboard_modifiers#12 | (byte) KEY_MODIFIER_CTRL#0 + (byte) keyboard_modifiers#4 ← (byte~) keyboard_event_scan::$25 + to:keyboard_event_scan::@11 +keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@29 + (byte) keyboard_modifiers#22 ← phi( keyboard_event_scan::@29/(byte) keyboard_modifiers#21 ) + (byte) keyboard_events_size#23 ← phi( keyboard_event_scan::@29/(byte) keyboard_events_size#31 ) + to:keyboard_event_scan::@return +keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@29 + (byte) keyboard_events_size#24 ← phi( keyboard_event_scan::@29/(byte) keyboard_events_size#31 ) + (byte) keyboard_modifiers#13 ← phi( keyboard_event_scan::@29/(byte) keyboard_modifiers#21 ) + (byte~) keyboard_event_scan::$29 ← (byte) keyboard_modifiers#13 | (byte) KEY_MODIFIER_COMMODORE#0 + (byte) keyboard_modifiers#5 ← (byte~) keyboard_event_scan::$29 + to:keyboard_event_scan::@return +keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@12 keyboard_event_scan::@24 + (byte) keyboard_modifiers#14 ← phi( keyboard_event_scan::@12/(byte) keyboard_modifiers#22 keyboard_event_scan::@24/(byte) keyboard_modifiers#5 ) + (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@12/(byte) keyboard_events_size#23 keyboard_event_scan::@24/(byte) keyboard_events_size#24 ) + (byte) keyboard_events_size#3 ← (byte) keyboard_events_size#13 + (byte) keyboard_modifiers#6 ← (byte) keyboard_modifiers#14 + return + to:@return +keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@10 keyboard_event_scan::@11 keyboard_event_scan::@20 keyboard_event_scan::@9 main::@10 + (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_pressed::keycode#2 keyboard_event_scan::@11/(byte) keyboard_event_pressed::keycode#3 keyboard_event_scan::@20/(byte) keyboard_event_pressed::keycode#0 keyboard_event_scan::@9/(byte) keyboard_event_pressed::keycode#1 main::@10/(byte) keyboard_event_pressed::keycode#4 ) + (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) keyboard_event_pressed::row_bits#0 ← *((byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) + (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) keyboard_event_pressed::$2 ← (byte) keyboard_event_pressed::row_bits#0 & *((byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) + (byte) keyboard_event_pressed::return#4 ← (byte~) keyboard_event_pressed::$2 + to:keyboard_event_pressed::@return +keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed + (byte) keyboard_event_pressed::return#11 ← phi( keyboard_event_pressed/(byte) keyboard_event_pressed::return#4 ) + (byte) keyboard_event_pressed::return#5 ← (byte) keyboard_event_pressed::return#11 + return + to:@return +keyboard_event_get: scope:[keyboard_event_get] from main::@44 + (byte) keyboard_events_size#14 ← phi( main::@44/(byte) keyboard_events_size#6 ) + (bool~) keyboard_event_get::$0 ← (byte) keyboard_events_size#14 == (byte/signed byte/word/signed word/dword/signed dword) 0 + if((bool~) keyboard_event_get::$0) goto keyboard_event_get::@1 + to:keyboard_event_get::@3 +keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get + (byte) keyboard_events_size#25 ← phi( keyboard_event_get/(byte) keyboard_events_size#14 ) + (byte) keyboard_event_get::return#0 ← (byte/word/signed word/dword/signed dword) 255 + to:keyboard_event_get::@return +keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get + (byte) keyboard_events_size#15 ← phi( keyboard_event_get/(byte) keyboard_events_size#14 ) + (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#15 + (byte) keyboard_event_get::return#1 ← *((byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) + to:keyboard_event_get::@return +keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get::@1 keyboard_event_get::@3 + (byte) keyboard_events_size#16 ← phi( keyboard_event_get::@1/(byte) keyboard_events_size#25 keyboard_event_get::@3/(byte) keyboard_events_size#4 ) + (byte) keyboard_event_get::return#4 ← phi( keyboard_event_get::@1/(byte) keyboard_event_get::return#0 keyboard_event_get::@3/(byte) keyboard_event_get::return#1 ) + (byte) keyboard_event_get::return#2 ← (byte) keyboard_event_get::return#4 + (byte) keyboard_events_size#5 ← (byte) keyboard_events_size#16 + return + to:@return +@11: scope:[] from @8 + (byte) keyboard_modifiers#33 ← phi( @8/(byte) keyboard_modifiers#0 ) + (byte) keyboard_events_size#36 ← phi( @8/(byte) keyboard_events_size#0 ) (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024 (byte*[20]) screen_lines#0 ← { fill( 20, 0) } - (byte/word/signed word/dword/signed dword~) $0 ← (byte/signed byte/word/signed word/dword/signed dword) 20 * (byte/signed byte/word/signed word/dword/signed dword) 10 - (byte[$0]) playfield#0 ← { fill( $0, 0) } - (byte/signed byte/word/signed word/dword/signed dword~) $1 ← (byte/signed byte/word/signed word/dword/signed dword) 4 * (byte/signed byte/word/signed word/dword/signed dword) 4 - (byte[$1]) current_piece#0 ← { fill( $1, 0) } - to:@8 -main: scope:[main] from @8 - (byte*) SCREEN#2 ← phi( @8/(byte*) SCREEN#3 ) + (byte/word/signed word/dword/signed dword~) $1 ← (byte/signed byte/word/signed word/dword/signed dword) 20 * (byte/signed byte/word/signed word/dword/signed dword) 10 + (byte[$1]) playfield#0 ← { fill( $1, 0) } + (byte*) current_piece#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) current_piece_orientation#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) current_xpos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) current_ypos#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) current_movedown_rate#0 ← (byte/signed byte/word/signed word/dword/signed dword) 50 + (byte) current_movedown_rate_fast#0 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) current_movedown_counter#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:@16 +main: scope:[main] from @16 + (byte) current_xpos#37 ← phi( @16/(byte) current_xpos#14 ) + (byte) current_movedown_counter#33 ← phi( @16/(byte) current_movedown_counter#15 ) + (byte) keyboard_modifiers#46 ← phi( @16/(byte) keyboard_modifiers#25 ) + (byte) keyboard_events_size#58 ← phi( @16/(byte) keyboard_events_size#28 ) + (byte) current_ypos#32 ← phi( @16/(byte) current_ypos#16 ) + (byte*) SCREEN#2 ← phi( @16/(byte*) SCREEN#3 ) + (byte) current_piece_orientation#15 ← phi( @16/(byte) current_piece_orientation#22 ) + (byte*) current_piece#11 ← phi( @16/(byte*) current_piece#16 ) call init - to:main::@7 -main::@7: scope:[main] from main + to:main::@41 +main::@41: scope:[main] from main + (byte) current_xpos#30 ← phi( main/(byte) current_xpos#37 ) + (byte) current_movedown_counter#26 ← phi( main/(byte) current_movedown_counter#33 ) + (byte) keyboard_modifiers#39 ← phi( main/(byte) keyboard_modifiers#46 ) + (byte) keyboard_events_size#48 ← phi( main/(byte) keyboard_events_size#58 ) + (byte) current_ypos#24 ← phi( main/(byte) current_ypos#32 ) + (byte) current_piece_orientation#8 ← phi( main/(byte) current_piece_orientation#6 ) + (byte*) current_piece#6 ← phi( main/(byte*) current_piece#4 ) + (byte*) current_piece#1 ← (byte*) current_piece#6 + (byte) current_piece_orientation#1 ← (byte) current_piece_orientation#8 call render_playfield - to:main::@8 -main::@8: scope:[main] from main::@7 - call render_current_piece - to:main::@9 -main::@9: scope:[main] from main::@8 + to:main::@42 +main::@42: scope:[main] from main::@41 + (byte) current_xpos#21 ← phi( main::@41/(byte) current_xpos#30 ) + (byte) current_movedown_counter#21 ← phi( main::@41/(byte) current_movedown_counter#26 ) + (byte) keyboard_modifiers#34 ← phi( main::@41/(byte) keyboard_modifiers#39 ) + (byte) keyboard_events_size#40 ← phi( main::@41/(byte) keyboard_events_size#48 ) + (byte) current_ypos#21 ← phi( main::@41/(byte) current_ypos#24 ) + (byte) current_piece_orientation#20 ← phi( main::@41/(byte) current_piece_orientation#1 ) + (byte*) current_piece#14 ← phi( main::@41/(byte*) current_piece#1 ) + call render_current + to:main::@43 +main::@43: scope:[main] from main::@42 + (byte) current_xpos#16 ← phi( main::@42/(byte) current_xpos#21 ) + (byte) current_ypos#18 ← phi( main::@42/(byte) current_ypos#21 ) + (byte) current_movedown_counter#17 ← phi( main::@42/(byte) current_movedown_counter#21 ) + (byte) keyboard_modifiers#30 ← phi( main::@42/(byte) keyboard_modifiers#34 ) + (byte) keyboard_events_size#33 ← phi( main::@42/(byte) keyboard_events_size#40 ) + (byte) current_piece_orientation#24 ← phi( main::@42/(byte) current_piece_orientation#20 ) + (byte*) current_piece#18 ← phi( main::@42/(byte*) current_piece#14 ) to:main::@1 -main::@1: scope:[main] from main::@2 main::@9 +main::@1: scope:[main] from main::@20 main::@43 main::@49 + (byte) current_xpos#12 ← phi( main::@20/(byte) current_xpos#15 main::@43/(byte) current_xpos#16 main::@49/(byte) current_xpos#17 ) + (byte) current_ypos#13 ← phi( main::@20/(byte) current_ypos#17 main::@43/(byte) current_ypos#18 main::@49/(byte) current_ypos#19 ) + (byte) current_movedown_counter#14 ← phi( main::@20/(byte) current_movedown_counter#16 main::@43/(byte) current_movedown_counter#17 main::@49/(byte) current_movedown_counter#18 ) + (byte) keyboard_modifiers#24 ← phi( main::@20/(byte) keyboard_modifiers#29 main::@43/(byte) keyboard_modifiers#30 main::@49/(byte) keyboard_modifiers#31 ) + (byte) keyboard_events_size#27 ← phi( main::@20/(byte) keyboard_events_size#32 main::@43/(byte) keyboard_events_size#33 main::@49/(byte) keyboard_events_size#34 ) + (byte) current_piece_orientation#18 ← phi( main::@20/(byte) current_piece_orientation#23 main::@43/(byte) current_piece_orientation#24 main::@49/(byte) current_piece_orientation#25 ) + (byte*) current_piece#12 ← phi( main::@20/(byte*) current_piece#17 main::@43/(byte*) current_piece#18 main::@49/(byte*) current_piece#19 ) if(true) goto main::@2 to:main::@return main::@2: scope:[main] from main::@1 + (byte) current_piece_orientation#57 ← phi( main::@1/(byte) current_piece_orientation#18 ) + (byte*) current_piece#55 ← phi( main::@1/(byte*) current_piece#12 ) + (byte) current_xpos#53 ← phi( main::@1/(byte) current_xpos#12 ) + (byte) current_ypos#56 ← phi( main::@1/(byte) current_ypos#13 ) + (byte) current_movedown_counter#34 ← phi( main::@1/(byte) current_movedown_counter#14 ) + (byte) keyboard_modifiers#40 ← phi( main::@1/(byte) keyboard_modifiers#24 ) + (byte) keyboard_events_size#49 ← phi( main::@1/(byte) keyboard_events_size#27 ) + to:main::@4 +main::@4: scope:[main] from main::@2 main::@5 + (byte) current_piece_orientation#55 ← phi( main::@2/(byte) current_piece_orientation#57 main::@5/(byte) current_piece_orientation#58 ) + (byte*) current_piece#53 ← phi( main::@2/(byte*) current_piece#55 main::@5/(byte*) current_piece#56 ) + (byte) current_xpos#51 ← phi( main::@2/(byte) current_xpos#53 main::@5/(byte) current_xpos#54 ) + (byte) current_ypos#54 ← phi( main::@2/(byte) current_ypos#56 main::@5/(byte) current_ypos#57 ) + (byte) current_movedown_counter#27 ← phi( main::@2/(byte) current_movedown_counter#34 main::@5/(byte) current_movedown_counter#35 ) + (byte) keyboard_modifiers#35 ← phi( main::@2/(byte) keyboard_modifiers#40 main::@5/(byte) keyboard_modifiers#41 ) + (byte) keyboard_events_size#41 ← phi( main::@2/(byte) keyboard_events_size#49 main::@5/(byte) keyboard_events_size#50 ) + (bool~) main::$3 ← *((byte*) RASTER#0) != (byte/word/signed word/dword/signed dword) 255 + if((bool~) main::$3) goto main::@5 + to:main::@7 +main::@5: scope:[main] from main::@4 + (byte) current_piece_orientation#58 ← phi( main::@4/(byte) current_piece_orientation#55 ) + (byte*) current_piece#56 ← phi( main::@4/(byte*) current_piece#53 ) + (byte) current_xpos#54 ← phi( main::@4/(byte) current_xpos#51 ) + (byte) current_ypos#57 ← phi( main::@4/(byte) current_ypos#54 ) + (byte) current_movedown_counter#35 ← phi( main::@4/(byte) current_movedown_counter#27 ) + (byte) keyboard_modifiers#41 ← phi( main::@4/(byte) keyboard_modifiers#35 ) + (byte) keyboard_events_size#50 ← phi( main::@4/(byte) keyboard_events_size#41 ) + to:main::@4 +main::@7: scope:[main] from main::@4 main::@8 + (byte) current_piece_orientation#54 ← phi( main::@4/(byte) current_piece_orientation#55 main::@8/(byte) current_piece_orientation#56 ) + (byte*) current_piece#52 ← phi( main::@4/(byte*) current_piece#53 main::@8/(byte*) current_piece#54 ) + (byte) current_xpos#50 ← phi( main::@4/(byte) current_xpos#51 main::@8/(byte) current_xpos#52 ) + (byte) current_ypos#53 ← phi( main::@4/(byte) current_ypos#54 main::@8/(byte) current_ypos#55 ) + (byte) current_movedown_counter#22 ← phi( main::@4/(byte) current_movedown_counter#27 main::@8/(byte) current_movedown_counter#28 ) + (byte) keyboard_modifiers#32 ← phi( main::@4/(byte) keyboard_modifiers#35 main::@8/(byte) keyboard_modifiers#36 ) + (byte) keyboard_events_size#35 ← phi( main::@4/(byte) keyboard_events_size#41 main::@8/(byte) keyboard_events_size#42 ) + (bool~) main::$4 ← *((byte*) RASTER#0) != (byte/word/signed word/dword/signed dword) 254 + if((bool~) main::$4) goto main::@8 + to:main::@9 +main::@8: scope:[main] from main::@7 + (byte) current_piece_orientation#56 ← phi( main::@7/(byte) current_piece_orientation#54 ) + (byte*) current_piece#54 ← phi( main::@7/(byte*) current_piece#52 ) + (byte) current_xpos#52 ← phi( main::@7/(byte) current_xpos#50 ) + (byte) current_ypos#55 ← phi( main::@7/(byte) current_ypos#53 ) + (byte) current_movedown_counter#28 ← phi( main::@7/(byte) current_movedown_counter#22 ) + (byte) keyboard_modifiers#36 ← phi( main::@7/(byte) keyboard_modifiers#32 ) + (byte) keyboard_events_size#42 ← phi( main::@7/(byte) keyboard_events_size#35 ) + to:main::@7 +main::@9: scope:[main] from main::@7 + (byte) current_piece_orientation#53 ← phi( main::@7/(byte) current_piece_orientation#54 ) + (byte*) current_piece#51 ← phi( main::@7/(byte*) current_piece#52 ) + (byte) current_xpos#49 ← phi( main::@7/(byte) current_xpos#50 ) + (byte) current_ypos#50 ← phi( main::@7/(byte) current_ypos#53 ) + (byte) current_movedown_counter#19 ← phi( main::@7/(byte) current_movedown_counter#22 ) + (byte) keyboard_modifiers#23 ← phi( main::@7/(byte) keyboard_modifiers#32 ) + (byte) keyboard_events_size#26 ← phi( main::@7/(byte) keyboard_events_size#35 ) + call keyboard_event_scan + to:main::@44 +main::@44: scope:[main] from main::@9 + (byte) current_piece_orientation#52 ← phi( main::@9/(byte) current_piece_orientation#53 ) + (byte*) current_piece#50 ← phi( main::@9/(byte*) current_piece#51 ) + (byte) current_xpos#48 ← phi( main::@9/(byte) current_xpos#49 ) + (byte) current_ypos#47 ← phi( main::@9/(byte) current_ypos#50 ) + (byte) current_movedown_counter#10 ← phi( main::@9/(byte) current_movedown_counter#19 ) + (byte) keyboard_modifiers#15 ← phi( main::@9/(byte) keyboard_modifiers#6 ) + (byte) keyboard_events_size#17 ← phi( main::@9/(byte) keyboard_events_size#3 ) + (byte) keyboard_events_size#6 ← (byte) keyboard_events_size#17 + (byte) keyboard_modifiers#7 ← (byte) keyboard_modifiers#15 + (byte) main::render#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + call keyboard_event_get + (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + to:main::@45 +main::@45: scope:[main] from main::@44 + (byte) keyboard_modifiers#65 ← phi( main::@44/(byte) keyboard_modifiers#7 ) + (byte) current_piece_orientation#51 ← phi( main::@44/(byte) current_piece_orientation#52 ) + (byte*) current_piece#49 ← phi( main::@44/(byte*) current_piece#50 ) + (byte) current_xpos#47 ← phi( main::@44/(byte) current_xpos#48 ) + (byte) current_ypos#44 ← phi( main::@44/(byte) current_ypos#47 ) + (byte) main::render#28 ← phi( main::@44/(byte) main::render#0 ) + (byte) current_movedown_counter#5 ← phi( main::@44/(byte) current_movedown_counter#10 ) + (byte) keyboard_events_size#18 ← phi( main::@44/(byte) keyboard_events_size#5 ) + (byte) keyboard_event_get::return#5 ← phi( main::@44/(byte) keyboard_event_get::return#3 ) + (byte~) main::$6 ← (byte) keyboard_event_get::return#5 + (byte) keyboard_events_size#7 ← (byte) keyboard_events_size#18 + (byte) main::key_event#0 ← (byte~) main::$6 + (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#5 + (byte) main::movedown#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) main::$7 ← (byte) main::key_event#0 == (byte) KEY_SPACE#0 + (bool~) main::$8 ← ! (bool~) main::$7 + if((bool~) main::$8) goto main::@10 + to:main::@29 +main::@10: scope:[main] from main::@29 main::@45 + (byte) keyboard_modifiers#60 ← phi( main::@29/(byte) keyboard_modifiers#64 main::@45/(byte) keyboard_modifiers#65 ) + (byte) keyboard_events_size#79 ← phi( main::@29/(byte) keyboard_events_size#84 main::@45/(byte) keyboard_events_size#7 ) + (byte) current_piece_orientation#48 ← phi( main::@29/(byte) current_piece_orientation#50 main::@45/(byte) current_piece_orientation#51 ) + (byte*) current_piece#44 ← phi( main::@29/(byte*) current_piece#48 main::@45/(byte*) current_piece#49 ) + (byte) current_xpos#42 ← phi( main::@29/(byte) current_xpos#46 main::@45/(byte) current_xpos#47 ) + (byte) current_ypos#40 ← phi( main::@29/(byte) current_ypos#43 main::@45/(byte) current_ypos#44 ) + (byte) main::render#25 ← phi( main::@29/(byte) main::render#27 main::@45/(byte) main::render#28 ) + (byte) main::key_event#17 ← phi( main::@29/(byte) main::key_event#19 main::@45/(byte) main::key_event#0 ) + (byte) main::movedown#12 ← phi( main::@29/(byte) main::movedown#1 main::@45/(byte) main::movedown#0 ) + (byte) current_movedown_counter#20 ← phi( main::@29/(byte) current_movedown_counter#23 main::@45/(byte) current_movedown_counter#1 ) + (byte) keyboard_event_pressed::keycode#4 ← (byte) KEY_SPACE#0 + call keyboard_event_pressed + (byte) keyboard_event_pressed::return#6 ← (byte) keyboard_event_pressed::return#5 + to:main::@46 +main::@46: scope:[main] from main::@10 + (byte) keyboard_modifiers#57 ← phi( main::@10/(byte) keyboard_modifiers#60 ) + (byte) keyboard_events_size#74 ← phi( main::@10/(byte) keyboard_events_size#79 ) + (byte) current_piece_orientation#46 ← phi( main::@10/(byte) current_piece_orientation#48 ) + (byte*) current_piece#40 ← phi( main::@10/(byte*) current_piece#44 ) + (byte) current_xpos#40 ← phi( main::@10/(byte) current_xpos#42 ) + (byte) current_ypos#35 ← phi( main::@10/(byte) current_ypos#40 ) + (byte) main::render#24 ← phi( main::@10/(byte) main::render#25 ) + (byte) main::key_event#16 ← phi( main::@10/(byte) main::key_event#17 ) + (byte) main::movedown#11 ← phi( main::@10/(byte) main::movedown#12 ) + (byte) current_movedown_counter#13 ← phi( main::@10/(byte) current_movedown_counter#20 ) + (byte) keyboard_event_pressed::return#12 ← phi( main::@10/(byte) keyboard_event_pressed::return#6 ) + (byte~) main::$9 ← (byte) keyboard_event_pressed::return#12 + (bool~) main::$10 ← (byte~) main::$9 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) main::$11 ← ! (bool~) main::$10 + if((bool~) main::$11) goto main::@11 + to:main::@30 +main::@29: scope:[main] from main::@45 + (byte) keyboard_modifiers#64 ← phi( main::@45/(byte) keyboard_modifiers#65 ) + (byte) keyboard_events_size#84 ← phi( main::@45/(byte) keyboard_events_size#7 ) + (byte) current_piece_orientation#50 ← phi( main::@45/(byte) current_piece_orientation#51 ) + (byte*) current_piece#48 ← phi( main::@45/(byte*) current_piece#49 ) + (byte) current_xpos#46 ← phi( main::@45/(byte) current_xpos#47 ) + (byte) current_ypos#43 ← phi( main::@45/(byte) current_ypos#44 ) + (byte) main::render#27 ← phi( main::@45/(byte) main::render#28 ) + (byte) main::key_event#19 ← phi( main::@45/(byte) main::key_event#0 ) + (byte) current_movedown_counter#23 ← phi( main::@45/(byte) current_movedown_counter#1 ) + (byte) main::movedown#4 ← phi( main::@45/(byte) main::movedown#0 ) + (byte) main::movedown#1 ← ++ (byte) main::movedown#4 + to:main::@10 +main::@11: scope:[main] from main::@12 main::@31 main::@46 + (byte) keyboard_modifiers#50 ← phi( main::@12/(byte) keyboard_modifiers#55 main::@31/(byte) keyboard_modifiers#56 main::@46/(byte) keyboard_modifiers#57 ) + (byte) keyboard_events_size#66 ← phi( main::@12/(byte) keyboard_events_size#72 main::@31/(byte) keyboard_events_size#73 main::@46/(byte) keyboard_events_size#74 ) + (byte) current_piece_orientation#40 ← phi( main::@12/(byte) current_piece_orientation#44 main::@31/(byte) current_piece_orientation#45 main::@46/(byte) current_piece_orientation#46 ) + (byte*) current_piece#32 ← phi( main::@12/(byte*) current_piece#38 main::@31/(byte*) current_piece#39 main::@46/(byte*) current_piece#40 ) + (byte) current_xpos#31 ← phi( main::@12/(byte) current_xpos#38 main::@31/(byte) current_xpos#39 main::@46/(byte) current_xpos#40 ) + (byte) current_ypos#25 ← phi( main::@12/(byte) current_ypos#33 main::@31/(byte) current_ypos#34 main::@46/(byte) current_ypos#35 ) + (byte) main::render#20 ← phi( main::@12/(byte) main::render#22 main::@31/(byte) main::render#23 main::@46/(byte) main::render#24 ) + (byte) main::key_event#11 ← phi( main::@12/(byte) main::key_event#14 main::@31/(byte) main::key_event#15 main::@46/(byte) main::key_event#16 ) + (byte) main::movedown#9 ← phi( main::@12/(byte) main::movedown#10 main::@31/(byte) main::movedown#2 main::@46/(byte) main::movedown#11 ) + (byte) current_movedown_counter#6 ← phi( main::@12/(byte) current_movedown_counter#11 main::@31/(byte) current_movedown_counter#12 main::@46/(byte) current_movedown_counter#13 ) + (bool~) main::$14 ← (byte) current_movedown_counter#6 >= (byte) current_movedown_rate#0 + (bool~) main::$15 ← ! (bool~) main::$14 + if((bool~) main::$15) goto main::@13 + to:main::@32 +main::@30: scope:[main] from main::@46 + (byte) keyboard_modifiers#61 ← phi( main::@46/(byte) keyboard_modifiers#57 ) + (byte) keyboard_events_size#80 ← phi( main::@46/(byte) keyboard_events_size#74 ) + (byte) current_piece_orientation#49 ← phi( main::@46/(byte) current_piece_orientation#46 ) + (byte*) current_piece#45 ← phi( main::@46/(byte*) current_piece#40 ) + (byte) current_xpos#43 ← phi( main::@46/(byte) current_xpos#40 ) + (byte) current_ypos#41 ← phi( main::@46/(byte) current_ypos#35 ) + (byte) main::render#26 ← phi( main::@46/(byte) main::render#24 ) + (byte) main::key_event#18 ← phi( main::@46/(byte) main::key_event#16 ) + (byte) main::movedown#8 ← phi( main::@46/(byte) main::movedown#11 ) + (byte) current_movedown_counter#7 ← phi( main::@46/(byte) current_movedown_counter#13 ) + (bool~) main::$12 ← (byte) current_movedown_counter#7 >= (byte) current_movedown_rate_fast#0 + (bool~) main::$13 ← ! (bool~) main::$12 + if((bool~) main::$13) goto main::@12 + to:main::@31 +main::@12: scope:[main] from main::@30 + (byte) keyboard_modifiers#55 ← phi( main::@30/(byte) keyboard_modifiers#61 ) + (byte) keyboard_events_size#72 ← phi( main::@30/(byte) keyboard_events_size#80 ) + (byte) current_piece_orientation#44 ← phi( main::@30/(byte) current_piece_orientation#49 ) + (byte*) current_piece#38 ← phi( main::@30/(byte*) current_piece#45 ) + (byte) current_xpos#38 ← phi( main::@30/(byte) current_xpos#43 ) + (byte) current_ypos#33 ← phi( main::@30/(byte) current_ypos#41 ) + (byte) main::render#22 ← phi( main::@30/(byte) main::render#26 ) + (byte) main::key_event#14 ← phi( main::@30/(byte) main::key_event#18 ) + (byte) main::movedown#10 ← phi( main::@30/(byte) main::movedown#8 ) + (byte) current_movedown_counter#11 ← phi( main::@30/(byte) current_movedown_counter#7 ) + to:main::@11 +main::@31: scope:[main] from main::@30 + (byte) keyboard_modifiers#56 ← phi( main::@30/(byte) keyboard_modifiers#61 ) + (byte) keyboard_events_size#73 ← phi( main::@30/(byte) keyboard_events_size#80 ) + (byte) current_piece_orientation#45 ← phi( main::@30/(byte) current_piece_orientation#49 ) + (byte*) current_piece#39 ← phi( main::@30/(byte*) current_piece#45 ) + (byte) current_xpos#39 ← phi( main::@30/(byte) current_xpos#43 ) + (byte) current_ypos#34 ← phi( main::@30/(byte) current_ypos#41 ) + (byte) main::render#23 ← phi( main::@30/(byte) main::render#26 ) + (byte) main::key_event#15 ← phi( main::@30/(byte) main::key_event#18 ) + (byte) current_movedown_counter#12 ← phi( main::@30/(byte) current_movedown_counter#7 ) + (byte) main::movedown#5 ← phi( main::@30/(byte) main::movedown#8 ) + (byte) main::movedown#2 ← ++ (byte) main::movedown#5 + to:main::@11 +main::@13: scope:[main] from main::@11 main::@32 + (byte) current_movedown_counter#36 ← phi( main::@11/(byte) current_movedown_counter#6 main::@32/(byte) current_movedown_counter#38 ) + (byte) keyboard_modifiers#47 ← phi( main::@11/(byte) keyboard_modifiers#50 main::@32/(byte) keyboard_modifiers#51 ) + (byte) keyboard_events_size#59 ← phi( main::@11/(byte) keyboard_events_size#66 main::@32/(byte) keyboard_events_size#67 ) + (byte) current_piece_orientation#37 ← phi( main::@11/(byte) current_piece_orientation#40 main::@32/(byte) current_piece_orientation#41 ) + (byte*) current_piece#28 ← phi( main::@11/(byte*) current_piece#32 main::@32/(byte*) current_piece#33 ) + (byte) current_xpos#22 ← phi( main::@11/(byte) current_xpos#31 main::@32/(byte) current_xpos#32 ) + (byte) current_ypos#20 ← phi( main::@11/(byte) current_ypos#25 main::@32/(byte) current_ypos#26 ) + (byte) main::render#19 ← phi( main::@11/(byte) main::render#20 main::@32/(byte) main::render#21 ) + (byte) main::key_event#6 ← phi( main::@11/(byte) main::key_event#11 main::@32/(byte) main::key_event#12 ) + (byte) main::movedown#6 ← phi( main::@11/(byte) main::movedown#9 main::@32/(byte) main::movedown#3 ) + (bool~) main::$16 ← (byte) main::movedown#6 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) main::$17 ← ! (bool~) main::$16 + if((bool~) main::$17) goto main::@14 + to:main::@33 +main::@32: scope:[main] from main::@11 + (byte) current_movedown_counter#38 ← phi( main::@11/(byte) current_movedown_counter#6 ) + (byte) keyboard_modifiers#51 ← phi( main::@11/(byte) keyboard_modifiers#50 ) + (byte) keyboard_events_size#67 ← phi( main::@11/(byte) keyboard_events_size#66 ) + (byte) current_piece_orientation#41 ← phi( main::@11/(byte) current_piece_orientation#40 ) + (byte*) current_piece#33 ← phi( main::@11/(byte*) current_piece#32 ) + (byte) current_xpos#32 ← phi( main::@11/(byte) current_xpos#31 ) + (byte) current_ypos#26 ← phi( main::@11/(byte) current_ypos#25 ) + (byte) main::render#21 ← phi( main::@11/(byte) main::render#20 ) + (byte) main::key_event#12 ← phi( main::@11/(byte) main::key_event#11 ) + (byte) main::movedown#7 ← phi( main::@11/(byte) main::movedown#9 ) + (byte) main::movedown#3 ← ++ (byte) main::movedown#7 + to:main::@13 +main::@14: scope:[main] from main::@13 main::@47 + (byte) current_ypos#36 ← phi( main::@13/(byte) current_ypos#20 main::@47/(byte) current_ypos#1 ) + (byte) current_movedown_counter#29 ← phi( main::@13/(byte) current_movedown_counter#36 main::@47/(byte) current_movedown_counter#2 ) + (byte) keyboard_modifiers#42 ← phi( main::@13/(byte) keyboard_modifiers#47 main::@47/(byte) keyboard_modifiers#48 ) + (byte) keyboard_events_size#51 ← phi( main::@13/(byte) keyboard_events_size#59 main::@47/(byte) keyboard_events_size#60 ) + (byte) current_piece_orientation#34 ← phi( main::@13/(byte) current_piece_orientation#37 main::@47/(byte) current_piece_orientation#38 ) + (byte*) current_piece#24 ← phi( main::@13/(byte*) current_piece#28 main::@47/(byte*) current_piece#29 ) + (byte) current_xpos#18 ← phi( main::@13/(byte) current_xpos#22 main::@47/(byte) current_xpos#23 ) + (byte) main::render#13 ← phi( main::@13/(byte) main::render#19 main::@47/(byte) main::render#1 ) + (byte) main::key_event#1 ← phi( main::@13/(byte) main::key_event#6 main::@47/(byte) main::key_event#7 ) + (byte~) main::$19 ← (byte) main::key_event#1 & (byte/word/signed word/dword/signed dword) 128 + (bool~) main::$20 ← (byte~) main::$19 == (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) main::$21 ← ! (bool~) main::$20 + if((bool~) main::$21) goto main::@15 + to:main::@34 +main::@33: scope:[main] from main::@13 + (byte) keyboard_modifiers#52 ← phi( main::@13/(byte) keyboard_modifiers#47 ) + (byte) keyboard_events_size#68 ← phi( main::@13/(byte) keyboard_events_size#59 ) + (byte) current_piece_orientation#42 ← phi( main::@13/(byte) current_piece_orientation#37 ) + (byte*) current_piece#34 ← phi( main::@13/(byte*) current_piece#28 ) + (byte) current_xpos#33 ← phi( main::@13/(byte) current_xpos#22 ) + (byte) main::key_event#13 ← phi( main::@13/(byte) main::key_event#6 ) + (byte) main::render#12 ← phi( main::@13/(byte) main::render#19 ) + (byte) current_ypos#12 ← phi( main::@13/(byte) current_ypos#20 ) + call current_movedown + to:main::@47 +main::@47: scope:[main] from main::@33 + (byte) keyboard_modifiers#48 ← phi( main::@33/(byte) keyboard_modifiers#52 ) + (byte) keyboard_events_size#60 ← phi( main::@33/(byte) keyboard_events_size#68 ) + (byte) current_piece_orientation#38 ← phi( main::@33/(byte) current_piece_orientation#42 ) + (byte*) current_piece#29 ← phi( main::@33/(byte*) current_piece#34 ) + (byte) current_xpos#23 ← phi( main::@33/(byte) current_xpos#33 ) + (byte) main::key_event#7 ← phi( main::@33/(byte) main::key_event#13 ) + (byte) main::render#6 ← phi( main::@33/(byte) main::render#12 ) + (byte) current_ypos#6 ← phi( main::@33/(byte) current_ypos#4 ) + (byte) current_ypos#1 ← (byte) current_ypos#6 + (byte) current_movedown_counter#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) main::render#1 ← ++ (byte) main::render#6 + to:main::@14 +main::@15: scope:[main] from main::@14 main::@19 main::@38 + (byte) current_xpos#24 ← phi( main::@14/(byte) current_xpos#18 main::@19/(byte) current_xpos#34 main::@38/(byte) current_xpos#35 ) + (byte) current_ypos#27 ← phi( main::@14/(byte) current_ypos#36 main::@19/(byte) current_ypos#37 main::@38/(byte) current_ypos#38 ) + (byte) current_movedown_counter#24 ← phi( main::@14/(byte) current_movedown_counter#29 main::@19/(byte) current_movedown_counter#30 main::@38/(byte) current_movedown_counter#31 ) + (byte) keyboard_modifiers#37 ← phi( main::@14/(byte) keyboard_modifiers#42 main::@19/(byte) keyboard_modifiers#43 main::@38/(byte) keyboard_modifiers#44 ) + (byte) keyboard_events_size#43 ← phi( main::@14/(byte) keyboard_events_size#51 main::@19/(byte) keyboard_events_size#52 main::@38/(byte) keyboard_events_size#53 ) + (byte) current_piece_orientation#32 ← phi( main::@14/(byte) current_piece_orientation#34 main::@19/(byte) current_piece_orientation#35 main::@38/(byte) current_piece_orientation#3 ) + (byte*) current_piece#22 ← phi( main::@14/(byte*) current_piece#24 main::@19/(byte*) current_piece#25 main::@38/(byte*) current_piece#26 ) + (byte) main::render#7 ← phi( main::@14/(byte) main::render#13 main::@19/(byte) main::render#14 main::@38/(byte) main::render#5 ) + (bool~) main::$34 ← (byte) main::render#7 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) main::$35 ← ! (bool~) main::$34 + if((bool~) main::$35) goto main::@20 + to:main::@39 +main::@34: scope:[main] from main::@14 + (byte) current_ypos#51 ← phi( main::@14/(byte) current_ypos#36 ) + (byte) current_movedown_counter#43 ← phi( main::@14/(byte) current_movedown_counter#29 ) + (byte) keyboard_modifiers#62 ← phi( main::@14/(byte) keyboard_modifiers#42 ) + (byte) keyboard_events_size#81 ← phi( main::@14/(byte) keyboard_events_size#51 ) + (byte*) current_piece#46 ← phi( main::@14/(byte*) current_piece#24 ) + (byte) current_piece_orientation#30 ← phi( main::@14/(byte) current_piece_orientation#34 ) + (byte) main::render#15 ← phi( main::@14/(byte) main::render#13 ) + (byte) current_xpos#10 ← phi( main::@14/(byte) current_xpos#18 ) + (byte) main::key_event#2 ← phi( main::@14/(byte) main::key_event#1 ) + (bool~) main::$22 ← (byte) main::key_event#2 == (byte) KEY_COMMA#0 + (bool~) main::$23 ← ! (bool~) main::$22 + if((bool~) main::$23) goto main::@16 + to:main::@35 +main::@16: scope:[main] from main::@34 main::@35 + (byte) current_ypos#48 ← phi( main::@34/(byte) current_ypos#51 main::@35/(byte) current_ypos#52 ) + (byte) current_movedown_counter#41 ← phi( main::@34/(byte) current_movedown_counter#43 main::@35/(byte) current_movedown_counter#44 ) + (byte) keyboard_modifiers#58 ← phi( main::@34/(byte) keyboard_modifiers#62 main::@35/(byte) keyboard_modifiers#63 ) + (byte) keyboard_events_size#75 ← phi( main::@34/(byte) keyboard_events_size#81 main::@35/(byte) keyboard_events_size#82 ) + (byte*) current_piece#41 ← phi( main::@34/(byte*) current_piece#46 main::@35/(byte*) current_piece#47 ) + (byte) current_piece_orientation#26 ← phi( main::@34/(byte) current_piece_orientation#30 main::@35/(byte) current_piece_orientation#31 ) + (byte) main::render#16 ← phi( main::@34/(byte) main::render#15 main::@35/(byte) main::render#2 ) + (byte) current_xpos#11 ← phi( main::@34/(byte) current_xpos#10 main::@35/(byte) current_xpos#1 ) + (byte) main::key_event#3 ← phi( main::@34/(byte) main::key_event#2 main::@35/(byte) main::key_event#8 ) + (bool~) main::$24 ← (byte) main::key_event#3 == (byte) KEY_DOT#0 + (bool~) main::$25 ← ! (bool~) main::$24 + if((bool~) main::$25) goto main::@17 + to:main::@36 +main::@35: scope:[main] from main::@34 + (byte) current_ypos#52 ← phi( main::@34/(byte) current_ypos#51 ) + (byte) current_movedown_counter#44 ← phi( main::@34/(byte) current_movedown_counter#43 ) + (byte) keyboard_modifiers#63 ← phi( main::@34/(byte) keyboard_modifiers#62 ) + (byte) keyboard_events_size#82 ← phi( main::@34/(byte) keyboard_events_size#81 ) + (byte*) current_piece#47 ← phi( main::@34/(byte*) current_piece#46 ) + (byte) current_piece_orientation#31 ← phi( main::@34/(byte) current_piece_orientation#30 ) + (byte) main::key_event#8 ← phi( main::@34/(byte) main::key_event#2 ) + (byte) main::render#8 ← phi( main::@34/(byte) main::render#15 ) + (byte) current_xpos#5 ← phi( main::@34/(byte) current_xpos#10 ) + (byte) current_xpos#1 ← -- (byte) current_xpos#5 + (byte) main::render#2 ← ++ (byte) main::render#8 + to:main::@16 +main::@17: scope:[main] from main::@16 main::@36 + (byte) current_xpos#44 ← phi( main::@16/(byte) current_xpos#11 main::@36/(byte) current_xpos#2 ) + (byte) current_ypos#45 ← phi( main::@16/(byte) current_ypos#48 main::@36/(byte) current_ypos#49 ) + (byte) current_movedown_counter#39 ← phi( main::@16/(byte) current_movedown_counter#41 main::@36/(byte) current_movedown_counter#42 ) + (byte) keyboard_modifiers#53 ← phi( main::@16/(byte) keyboard_modifiers#58 main::@36/(byte) keyboard_modifiers#59 ) + (byte) keyboard_events_size#69 ← phi( main::@16/(byte) keyboard_events_size#75 main::@36/(byte) keyboard_events_size#76 ) + (byte*) current_piece#35 ← phi( main::@16/(byte*) current_piece#41 main::@36/(byte*) current_piece#42 ) + (byte) main::render#17 ← phi( main::@16/(byte) main::render#16 main::@36/(byte) main::render#3 ) + (byte) current_piece_orientation#16 ← phi( main::@16/(byte) current_piece_orientation#26 main::@36/(byte) current_piece_orientation#27 ) + (byte) main::key_event#4 ← phi( main::@16/(byte) main::key_event#3 main::@36/(byte) main::key_event#9 ) + (bool~) main::$26 ← (byte) main::key_event#4 == (byte) KEY_Z#0 + (bool~) main::$27 ← ! (bool~) main::$26 + if((bool~) main::$27) goto main::@18 + to:main::@37 +main::@36: scope:[main] from main::@16 + (byte) current_ypos#49 ← phi( main::@16/(byte) current_ypos#48 ) + (byte) current_movedown_counter#42 ← phi( main::@16/(byte) current_movedown_counter#41 ) + (byte) keyboard_modifiers#59 ← phi( main::@16/(byte) keyboard_modifiers#58 ) + (byte) keyboard_events_size#76 ← phi( main::@16/(byte) keyboard_events_size#75 ) + (byte*) current_piece#42 ← phi( main::@16/(byte*) current_piece#41 ) + (byte) current_piece_orientation#27 ← phi( main::@16/(byte) current_piece_orientation#26 ) + (byte) main::key_event#9 ← phi( main::@16/(byte) main::key_event#3 ) + (byte) main::render#9 ← phi( main::@16/(byte) main::render#16 ) + (byte) current_xpos#6 ← phi( main::@16/(byte) current_xpos#11 ) + (byte) current_xpos#2 ← ++ (byte) current_xpos#6 + (byte) main::render#3 ← ++ (byte) main::render#9 + to:main::@17 +main::@18: scope:[main] from main::@17 main::@37 + (byte) current_xpos#41 ← phi( main::@17/(byte) current_xpos#44 main::@37/(byte) current_xpos#45 ) + (byte) current_ypos#42 ← phi( main::@17/(byte) current_ypos#45 main::@37/(byte) current_ypos#46 ) + (byte) current_movedown_counter#37 ← phi( main::@17/(byte) current_movedown_counter#39 main::@37/(byte) current_movedown_counter#40 ) + (byte) keyboard_modifiers#49 ← phi( main::@17/(byte) keyboard_modifiers#53 main::@37/(byte) keyboard_modifiers#54 ) + (byte) keyboard_events_size#61 ← phi( main::@17/(byte) keyboard_events_size#69 main::@37/(byte) keyboard_events_size#70 ) + (byte*) current_piece#30 ← phi( main::@17/(byte*) current_piece#35 main::@37/(byte*) current_piece#36 ) + (byte) main::render#18 ← phi( main::@17/(byte) main::render#17 main::@37/(byte) main::render#4 ) + (byte) current_piece_orientation#17 ← phi( main::@17/(byte) current_piece_orientation#16 main::@37/(byte) current_piece_orientation#2 ) + (byte) main::key_event#5 ← phi( main::@17/(byte) main::key_event#4 main::@37/(byte) main::key_event#10 ) + (bool~) main::$30 ← (byte) main::key_event#5 == (byte) KEY_X#0 + (bool~) main::$31 ← ! (bool~) main::$30 + if((bool~) main::$31) goto main::@19 + to:main::@38 +main::@37: scope:[main] from main::@17 + (byte) current_xpos#45 ← phi( main::@17/(byte) current_xpos#44 ) + (byte) current_ypos#46 ← phi( main::@17/(byte) current_ypos#45 ) + (byte) current_movedown_counter#40 ← phi( main::@17/(byte) current_movedown_counter#39 ) + (byte) keyboard_modifiers#54 ← phi( main::@17/(byte) keyboard_modifiers#53 ) + (byte) keyboard_events_size#70 ← phi( main::@17/(byte) keyboard_events_size#69 ) + (byte*) current_piece#36 ← phi( main::@17/(byte*) current_piece#35 ) + (byte) main::key_event#10 ← phi( main::@17/(byte) main::key_event#4 ) + (byte) main::render#10 ← phi( main::@17/(byte) main::render#17 ) + (byte) current_piece_orientation#9 ← phi( main::@17/(byte) current_piece_orientation#16 ) + (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#9 - (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte/word/dword~) main::$29 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 + (byte) current_piece_orientation#2 ← (byte/word/dword~) main::$29 + (byte) main::render#4 ← ++ (byte) main::render#10 + to:main::@18 +main::@19: scope:[main] from main::@18 + (byte) current_xpos#34 ← phi( main::@18/(byte) current_xpos#41 ) + (byte) current_ypos#37 ← phi( main::@18/(byte) current_ypos#42 ) + (byte) current_movedown_counter#30 ← phi( main::@18/(byte) current_movedown_counter#37 ) + (byte) keyboard_modifiers#43 ← phi( main::@18/(byte) keyboard_modifiers#49 ) + (byte) keyboard_events_size#52 ← phi( main::@18/(byte) keyboard_events_size#61 ) + (byte) current_piece_orientation#35 ← phi( main::@18/(byte) current_piece_orientation#17 ) + (byte*) current_piece#25 ← phi( main::@18/(byte*) current_piece#30 ) + (byte) main::render#14 ← phi( main::@18/(byte) main::render#18 ) + to:main::@15 +main::@38: scope:[main] from main::@18 + (byte) current_xpos#35 ← phi( main::@18/(byte) current_xpos#41 ) + (byte) current_ypos#38 ← phi( main::@18/(byte) current_ypos#42 ) + (byte) current_movedown_counter#31 ← phi( main::@18/(byte) current_movedown_counter#37 ) + (byte) keyboard_modifiers#44 ← phi( main::@18/(byte) keyboard_modifiers#49 ) + (byte) keyboard_events_size#53 ← phi( main::@18/(byte) keyboard_events_size#61 ) + (byte*) current_piece#26 ← phi( main::@18/(byte*) current_piece#30 ) + (byte) main::render#11 ← phi( main::@18/(byte) main::render#18 ) + (byte) current_piece_orientation#10 ← phi( main::@18/(byte) current_piece_orientation#17 ) + (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte/word/dword~) main::$33 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 + (byte) current_piece_orientation#3 ← (byte/word/dword~) main::$33 + (byte) main::render#5 ← ++ (byte) main::render#11 + to:main::@15 +main::@20: scope:[main] from main::@15 + (byte) current_xpos#15 ← phi( main::@15/(byte) current_xpos#24 ) + (byte) current_ypos#17 ← phi( main::@15/(byte) current_ypos#27 ) + (byte) current_movedown_counter#16 ← phi( main::@15/(byte) current_movedown_counter#24 ) + (byte) keyboard_modifiers#29 ← phi( main::@15/(byte) keyboard_modifiers#37 ) + (byte) keyboard_events_size#32 ← phi( main::@15/(byte) keyboard_events_size#43 ) + (byte) current_piece_orientation#23 ← phi( main::@15/(byte) current_piece_orientation#32 ) + (byte*) current_piece#17 ← phi( main::@15/(byte*) current_piece#22 ) + to:main::@1 +main::@39: scope:[main] from main::@15 + (byte) current_xpos#36 ← phi( main::@15/(byte) current_xpos#24 ) + (byte) current_movedown_counter#32 ← phi( main::@15/(byte) current_movedown_counter#24 ) + (byte) keyboard_modifiers#45 ← phi( main::@15/(byte) keyboard_modifiers#37 ) + (byte) keyboard_events_size#54 ← phi( main::@15/(byte) keyboard_events_size#43 ) + (byte) current_ypos#28 ← phi( main::@15/(byte) current_ypos#27 ) + (byte) current_piece_orientation#28 ← phi( main::@15/(byte) current_piece_orientation#32 ) + (byte*) current_piece#20 ← phi( main::@15/(byte*) current_piece#22 ) *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0) + call render_playfield + to:main::@48 +main::@48: scope:[main] from main::@39 + (byte) current_xpos#25 ← phi( main::@39/(byte) current_xpos#36 ) + (byte) current_movedown_counter#25 ← phi( main::@39/(byte) current_movedown_counter#32 ) + (byte) keyboard_modifiers#38 ← phi( main::@39/(byte) keyboard_modifiers#45 ) + (byte) keyboard_events_size#44 ← phi( main::@39/(byte) keyboard_events_size#54 ) + (byte) current_ypos#22 ← phi( main::@39/(byte) current_ypos#28 ) + (byte) current_piece_orientation#21 ← phi( main::@39/(byte) current_piece_orientation#28 ) + (byte*) current_piece#15 ← phi( main::@39/(byte*) current_piece#20 ) + call render_current + to:main::@49 +main::@49: scope:[main] from main::@48 + (byte) current_xpos#17 ← phi( main::@48/(byte) current_xpos#25 ) + (byte) current_ypos#19 ← phi( main::@48/(byte) current_ypos#22 ) + (byte) current_movedown_counter#18 ← phi( main::@48/(byte) current_movedown_counter#25 ) + (byte) keyboard_modifiers#31 ← phi( main::@48/(byte) keyboard_modifiers#38 ) + (byte) keyboard_events_size#34 ← phi( main::@48/(byte) keyboard_events_size#44 ) + (byte) current_piece_orientation#25 ← phi( main::@48/(byte) current_piece_orientation#21 ) + (byte*) current_piece#19 ← phi( main::@48/(byte*) current_piece#15 ) + *((byte*) BORDERCOL#0) ← -- *((byte*) BORDERCOL#0) to:main::@1 main::@return: scope:[main] from main::@1 + (byte) current_xpos#7 ← phi( main::@1/(byte) current_xpos#12 ) + (byte) current_ypos#7 ← phi( main::@1/(byte) current_ypos#13 ) + (byte) current_movedown_counter#8 ← phi( main::@1/(byte) current_movedown_counter#14 ) + (byte) keyboard_modifiers#16 ← phi( main::@1/(byte) keyboard_modifiers#24 ) + (byte) keyboard_events_size#19 ← phi( main::@1/(byte) keyboard_events_size#27 ) + (byte) current_piece_orientation#11 ← phi( main::@1/(byte) current_piece_orientation#18 ) + (byte*) current_piece#7 ← phi( main::@1/(byte*) current_piece#12 ) + (byte*) current_piece#2 ← (byte*) current_piece#7 + (byte) current_piece_orientation#4 ← (byte) current_piece_orientation#11 + (byte) keyboard_events_size#8 ← (byte) keyboard_events_size#19 + (byte) keyboard_modifiers#8 ← (byte) keyboard_modifiers#16 + (byte) current_movedown_counter#3 ← (byte) current_movedown_counter#8 + (byte) current_ypos#2 ← (byte) current_ypos#7 + (byte) current_xpos#3 ← (byte) current_xpos#7 return to:@return init: scope:[init] from main (byte*) SCREEN#1 ← phi( main/(byte*) SCREEN#2 ) - *((byte[$1]) current_piece#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte) GREEN#0 - *((byte[$1]) current_piece#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) GREEN#0 - *((byte[$1]) current_piece#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte) GREEN#0 - *((byte[$1]) current_piece#0 + (byte/signed byte/word/signed word/dword/signed dword) 4) ← (byte) GREEN#0 + (byte*) current_piece#3 ← (byte[$3]) piece_t#0 + (byte) current_piece_orientation#5 ← (byte/signed byte/word/signed word/dword/signed dword) 0 (byte*) fill::start#0 ← (byte*) SCREEN#1 (word) fill::size#0 ← (word/signed word/dword/signed dword) 1000 (byte) fill::val#0 ← (byte/word/signed word/dword/signed dword) 160 call fill to:init::@7 init::@7: scope:[init] from init + (byte) current_piece_orientation#47 ← phi( init/(byte) current_piece_orientation#5 ) + (byte*) current_piece#43 ← phi( init/(byte*) current_piece#3 ) (byte*) fill::start#1 ← (byte*) COLS#0 (word) fill::size#1 ← (word/signed word/dword/signed dword) 1000 (byte) fill::val#1 ← (byte) BLACK#0 call fill to:init::@8 init::@8: scope:[init] from init::@7 + (byte) current_piece_orientation#43 ← phi( init::@7/(byte) current_piece_orientation#47 ) + (byte*) current_piece#37 ← phi( init::@7/(byte*) current_piece#43 ) (byte*~) init::$2 ← (byte*) COLS#0 + (byte/signed byte/word/signed word/dword/signed dword) 40 (byte*~) init::$3 ← (byte*~) init::$2 + (byte/signed byte/word/signed word/dword/signed dword) 15 (byte*) init::li#0 ← (byte*~) init::$3 (byte) init::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 to:init::@1 init::@1: scope:[init] from init::@1 init::@8 + (byte) current_piece_orientation#39 ← phi( init::@1/(byte) current_piece_orientation#39 init::@8/(byte) current_piece_orientation#43 ) + (byte*) current_piece#31 ← phi( init::@1/(byte*) current_piece#31 init::@8/(byte*) current_piece#37 ) (byte*) init::li#2 ← phi( init::@1/(byte*) init::li#1 init::@8/(byte*) init::li#0 ) (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@8/(byte) init::i#0 ) (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 @@ -91,16 +876,22 @@ init::@1: scope:[init] from init::@1 init::@8 if((bool~) init::$5) goto init::@1 to:init::@4 init::@4: scope:[init] from init::@1 + (byte) current_piece_orientation#36 ← phi( init::@1/(byte) current_piece_orientation#39 ) + (byte*) current_piece#27 ← phi( init::@1/(byte*) current_piece#31 ) (byte*~) init::$6 ← (byte*) COLS#0 + (byte/signed byte/word/signed word/dword/signed dword) 14 (byte*) init::line#0 ← (byte*~) init::$6 (byte) init::l#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 to:init::@2 init::@2: scope:[init] from init::@4 init::@5 + (byte) current_piece_orientation#33 ← phi( init::@4/(byte) current_piece_orientation#36 init::@5/(byte) current_piece_orientation#19 ) + (byte*) current_piece#23 ← phi( init::@4/(byte*) current_piece#27 init::@5/(byte*) current_piece#13 ) (byte) init::l#4 ← phi( init::@4/(byte) init::l#0 init::@5/(byte) init::l#1 ) (byte*) init::line#4 ← phi( init::@4/(byte*) init::line#0 init::@5/(byte*) init::line#1 ) (byte) init::c#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 to:init::@3 init::@3: scope:[init] from init::@2 init::@3 + (byte) current_piece_orientation#29 ← phi( init::@2/(byte) current_piece_orientation#33 init::@3/(byte) current_piece_orientation#29 ) + (byte*) current_piece#21 ← phi( init::@2/(byte*) current_piece#23 init::@3/(byte*) current_piece#21 ) (byte) init::l#3 ← phi( init::@2/(byte) init::l#4 init::@3/(byte) init::l#3 ) (byte) init::c#2 ← phi( init::@2/(byte) init::c#0 init::@3/(byte) init::c#1 ) (byte*) init::line#2 ← phi( init::@2/(byte*) init::line#4 init::@3/(byte*) init::line#2 ) @@ -111,6 +902,8 @@ init::@3: scope:[init] from init::@2 init::@3 if((bool~) init::$8) goto init::@3 to:init::@5 init::@5: scope:[init] from init::@3 + (byte) current_piece_orientation#19 ← phi( init::@3/(byte) current_piece_orientation#29 ) + (byte*) current_piece#13 ← phi( init::@3/(byte*) current_piece#21 ) (byte) init::l#2 ← phi( init::@3/(byte) init::l#3 ) (byte*) init::line#3 ← phi( init::@3/(byte*) init::line#2 ) (byte*) init::line#1 ← (byte*) init::line#3 + (byte/signed byte/word/signed word/dword/signed dword) 40 @@ -119,9 +912,13 @@ init::@5: scope:[init] from init::@3 if((bool~) init::$9) goto init::@2 to:init::@return init::@return: scope:[init] from init::@5 + (byte) current_piece_orientation#12 ← phi( init::@5/(byte) current_piece_orientation#19 ) + (byte*) current_piece#8 ← phi( init::@5/(byte*) current_piece#13 ) + (byte*) current_piece#4 ← (byte*) current_piece#8 + (byte) current_piece_orientation#6 ← (byte) current_piece_orientation#12 return to:@return -render_playfield: scope:[render_playfield] from main::@7 +render_playfield: scope:[render_playfield] from main::@39 main::@41 (byte) render_playfield::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 (byte) render_playfield::l#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 to:render_playfield::@1 @@ -138,7 +935,7 @@ render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte) render_playfield::c#0 render_playfield::@2/(byte) render_playfield::c#1 ) (byte*) render_playfield::line#1 ← phi( render_playfield::@1/(byte*) render_playfield::line#0 render_playfield::@2/(byte*) render_playfield::line#1 ) (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#1 + (byte) render_playfield::c#2 - *((byte*~) render_playfield::$1) ← *((byte[$0]) playfield#0 + (byte) render_playfield::i#2) + *((byte*~) render_playfield::$1) ← *((byte[$1]) playfield#0 + (byte) render_playfield::i#2) (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 (byte) render_playfield::c#1 ← (byte) render_playfield::c#2 + rangenext(0,9) (bool~) render_playfield::$2 ← (byte) render_playfield::c#1 != rangelast(0,9) @@ -154,44 +951,484 @@ render_playfield::@3: scope:[render_playfield] from render_playfield::@2 render_playfield::@return: scope:[render_playfield] from render_playfield::@3 return to:@return -render_current_piece: scope:[render_current_piece] from main::@8 - to:render_current_piece::@return -render_current_piece::@return: scope:[render_current_piece] from render_current_piece +render_current: scope:[render_current] from main::@42 main::@48 + (byte) current_xpos#26 ← phi( main::@42/(byte) current_xpos#21 main::@48/(byte) current_xpos#25 ) + (byte) current_ypos#14 ← phi( main::@42/(byte) current_ypos#21 main::@48/(byte) current_ypos#22 ) + (byte) current_piece_orientation#13 ← phi( main::@42/(byte) current_piece_orientation#20 main::@48/(byte) current_piece_orientation#21 ) + (byte*) current_piece#9 ← phi( main::@42/(byte*) current_piece#14 main::@48/(byte*) current_piece#15 ) + (byte) render_current::i#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*~) render_current::$0 ← (byte*) current_piece#9 + (byte) current_piece_orientation#13 + (byte*) render_current::current_piece_gfx#0 ← (byte*~) render_current::$0 + (byte) render_current::l#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:render_current::@1 +render_current::@1: scope:[render_current] from render_current render_current::@7 + (byte) current_xpos#19 ← phi( render_current/(byte) current_xpos#26 render_current::@7/(byte) current_xpos#27 ) + (byte) render_current::i#3 ← phi( render_current/(byte) render_current::i#0 render_current::@7/(byte) render_current::i#5 ) + (byte*) render_current::current_piece_gfx#2 ← phi( render_current/(byte*) render_current::current_piece_gfx#0 render_current::@7/(byte*) render_current::current_piece_gfx#4 ) + (byte) render_current::l#2 ← phi( render_current/(byte) render_current::l#0 render_current::@7/(byte) render_current::l#1 ) + (byte) current_ypos#8 ← phi( render_current/(byte) current_ypos#14 render_current::@7/(byte) current_ypos#15 ) + (byte~) render_current::$1 ← (byte) current_ypos#8 + (byte) render_current::l#2 + (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) render_current::screen_line#0 ← *((byte*[20]) screen_lines#0 + (byte~) render_current::$2) + (byte) render_current::c#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:render_current::@2 +render_current::@2: scope:[render_current] from render_current::@1 render_current::@3 + (byte) current_ypos#29 ← phi( render_current::@1/(byte) current_ypos#8 render_current::@3/(byte) current_ypos#23 ) + (byte*) render_current::screen_line#3 ← phi( render_current::@1/(byte*) render_current::screen_line#0 render_current::@3/(byte*) render_current::screen_line#4 ) + (byte) render_current::l#5 ← phi( render_current::@1/(byte) render_current::l#2 render_current::@3/(byte) render_current::l#4 ) + (byte) current_xpos#13 ← phi( render_current::@1/(byte) current_xpos#19 render_current::@3/(byte) current_xpos#20 ) + (byte) render_current::c#4 ← phi( render_current::@1/(byte) render_current::c#0 render_current::@3/(byte) render_current::c#1 ) + (byte) render_current::i#2 ← phi( render_current::@1/(byte) render_current::i#3 render_current::@3/(byte) render_current::i#4 ) + (byte*) render_current::current_piece_gfx#1 ← phi( render_current::@1/(byte*) render_current::current_piece_gfx#2 render_current::@3/(byte*) render_current::current_piece_gfx#3 ) + (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#1 + (byte) render_current::i#2) + (byte) render_current::i#1 ← ++ (byte) render_current::i#2 + (bool~) render_current::$3 ← (byte) render_current::current_cell#0 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (bool~) render_current::$4 ← ! (bool~) render_current::$3 + if((bool~) render_current::$4) goto render_current::@3 + to:render_current::@5 +render_current::@3: scope:[render_current] from render_current::@2 render_current::@4 render_current::@6 + (byte*) render_current::screen_line#4 ← phi( render_current::@2/(byte*) render_current::screen_line#3 render_current::@4/(byte*) render_current::screen_line#5 render_current::@6/(byte*) render_current::screen_line#1 ) + (byte) current_ypos#23 ← phi( render_current::@2/(byte) current_ypos#29 render_current::@4/(byte) current_ypos#30 render_current::@6/(byte) current_ypos#31 ) + (byte) current_xpos#20 ← phi( render_current::@2/(byte) current_xpos#13 render_current::@4/(byte) current_xpos#28 render_current::@6/(byte) current_xpos#29 ) + (byte) render_current::l#4 ← phi( render_current::@2/(byte) render_current::l#5 render_current::@4/(byte) render_current::l#6 render_current::@6/(byte) render_current::l#7 ) + (byte) render_current::i#4 ← phi( render_current::@2/(byte) render_current::i#1 render_current::@4/(byte) render_current::i#6 render_current::@6/(byte) render_current::i#7 ) + (byte*) render_current::current_piece_gfx#3 ← phi( render_current::@2/(byte*) render_current::current_piece_gfx#1 render_current::@4/(byte*) render_current::current_piece_gfx#5 render_current::@6/(byte*) render_current::current_piece_gfx#6 ) + (byte) render_current::c#2 ← phi( render_current::@2/(byte) render_current::c#4 render_current::@4/(byte) render_current::c#5 render_current::@6/(byte) render_current::c#6 ) + (byte) render_current::c#1 ← (byte) render_current::c#2 + rangenext(0,3) + (bool~) render_current::$8 ← (byte) render_current::c#1 != rangelast(0,3) + if((bool~) render_current::$8) goto render_current::@2 + to:render_current::@7 +render_current::@5: scope:[render_current] from render_current::@2 + (byte) current_ypos#39 ← phi( render_current::@2/(byte) current_ypos#29 ) + (byte) render_current::l#8 ← phi( render_current::@2/(byte) render_current::l#5 ) + (byte) render_current::i#8 ← phi( render_current::@2/(byte) render_current::i#1 ) + (byte*) render_current::current_piece_gfx#7 ← phi( render_current::@2/(byte*) render_current::current_piece_gfx#1 ) + (byte*) render_current::screen_line#2 ← phi( render_current::@2/(byte*) render_current::screen_line#3 ) + (byte) render_current::current_cell#2 ← phi( render_current::@2/(byte) render_current::current_cell#0 ) + (byte) render_current::c#3 ← phi( render_current::@2/(byte) render_current::c#4 ) + (byte) current_xpos#8 ← phi( render_current::@2/(byte) current_xpos#13 ) + (byte~) render_current::$5 ← (byte) current_xpos#8 + (byte) render_current::c#3 + (byte) render_current::xpos#0 ← (byte~) render_current::$5 + (bool~) render_current::$6 ← (byte) render_current::xpos#0 < (byte/signed byte/word/signed word/dword/signed dword) 10 + (bool~) render_current::$7 ← ! (bool~) render_current::$6 + if((bool~) render_current::$7) goto render_current::@4 + to:render_current::@6 +render_current::@4: scope:[render_current] from render_current::@5 + (byte*) render_current::screen_line#5 ← phi( render_current::@5/(byte*) render_current::screen_line#2 ) + (byte) current_ypos#30 ← phi( render_current::@5/(byte) current_ypos#39 ) + (byte) current_xpos#28 ← phi( render_current::@5/(byte) current_xpos#8 ) + (byte) render_current::l#6 ← phi( render_current::@5/(byte) render_current::l#8 ) + (byte) render_current::i#6 ← phi( render_current::@5/(byte) render_current::i#8 ) + (byte*) render_current::current_piece_gfx#5 ← phi( render_current::@5/(byte*) render_current::current_piece_gfx#7 ) + (byte) render_current::c#5 ← phi( render_current::@5/(byte) render_current::c#3 ) + to:render_current::@3 +render_current::@6: scope:[render_current] from render_current::@5 + (byte) current_ypos#31 ← phi( render_current::@5/(byte) current_ypos#39 ) + (byte) current_xpos#29 ← phi( render_current::@5/(byte) current_xpos#8 ) + (byte) render_current::l#7 ← phi( render_current::@5/(byte) render_current::l#8 ) + (byte) render_current::i#7 ← phi( render_current::@5/(byte) render_current::i#8 ) + (byte*) render_current::current_piece_gfx#6 ← phi( render_current::@5/(byte*) render_current::current_piece_gfx#7 ) + (byte) render_current::c#6 ← phi( render_current::@5/(byte) render_current::c#3 ) + (byte) render_current::xpos#1 ← phi( render_current::@5/(byte) render_current::xpos#0 ) + (byte*) render_current::screen_line#1 ← phi( render_current::@5/(byte*) render_current::screen_line#2 ) + (byte) render_current::current_cell#1 ← phi( render_current::@5/(byte) render_current::current_cell#2 ) + *((byte*) render_current::screen_line#1 + (byte) render_current::xpos#1) ← (byte) render_current::current_cell#1 + to:render_current::@3 +render_current::@7: scope:[render_current] from render_current::@3 + (byte) current_xpos#27 ← phi( render_current::@3/(byte) current_xpos#20 ) + (byte) render_current::i#5 ← phi( render_current::@3/(byte) render_current::i#4 ) + (byte*) render_current::current_piece_gfx#4 ← phi( render_current::@3/(byte*) render_current::current_piece_gfx#3 ) + (byte) current_ypos#15 ← phi( render_current::@3/(byte) current_ypos#23 ) + (byte) render_current::l#3 ← phi( render_current::@3/(byte) render_current::l#4 ) + (byte) render_current::l#1 ← (byte) render_current::l#3 + rangenext(0,3) + (bool~) render_current::$9 ← (byte) render_current::l#1 != rangelast(0,3) + if((bool~) render_current::$9) goto render_current::@1 + to:render_current::@return +render_current::@return: scope:[render_current] from render_current::@7 return to:@return -@8: scope:[] from @4 - (byte*) SCREEN#3 ← phi( @4/(byte*) SCREEN#0 ) +current_movedown: scope:[current_movedown] from main::@33 + (byte) current_ypos#9 ← phi( main::@33/(byte) current_ypos#12 ) + (byte) current_ypos#3 ← ++ (byte) current_ypos#9 + to:current_movedown::@return +current_movedown::@return: scope:[current_movedown] from current_movedown + (byte) current_ypos#10 ← phi( current_movedown/(byte) current_ypos#3 ) + (byte) current_ypos#4 ← (byte) current_ypos#10 + return + to:@return +@16: scope:[] from @11 + (byte*) SCREEN#3 ← phi( @11/(byte*) SCREEN#0 ) + (byte) current_xpos#14 ← phi( @11/(byte) current_xpos#0 ) + (byte) current_ypos#16 ← phi( @11/(byte) current_ypos#0 ) + (byte) current_movedown_counter#15 ← phi( @11/(byte) current_movedown_counter#0 ) + (byte) keyboard_modifiers#25 ← phi( @11/(byte) keyboard_modifiers#33 ) + (byte) keyboard_events_size#28 ← phi( @11/(byte) keyboard_events_size#36 ) + (byte) current_piece_orientation#22 ← phi( @11/(byte) current_piece_orientation#0 ) + (byte*) current_piece#16 ← phi( @11/(byte*) current_piece#0 ) + (byte/signed byte/word/signed word/dword/signed dword~) $2 ← (byte/signed byte/word/signed word/dword/signed dword) 4 * (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte/signed word/word/dword/signed dword/signed byte~) $3 ← (byte/signed byte/word/signed word/dword/signed dword~) $2 * (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte[$3]) piece_t#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 } call main - to:@9 -@9: scope:[] from @8 + to:@17 +@17: scope:[] from @16 + (byte) current_xpos#9 ← phi( @16/(byte) current_xpos#3 ) + (byte) current_ypos#11 ← phi( @16/(byte) current_ypos#2 ) + (byte) current_movedown_counter#9 ← phi( @16/(byte) current_movedown_counter#3 ) + (byte) keyboard_modifiers#17 ← phi( @16/(byte) keyboard_modifiers#8 ) + (byte) keyboard_events_size#20 ← phi( @16/(byte) keyboard_events_size#8 ) + (byte) current_piece_orientation#14 ← phi( @16/(byte) current_piece_orientation#4 ) + (byte*) current_piece#10 ← phi( @16/(byte*) current_piece#2 ) + (byte*) current_piece#5 ← (byte*) current_piece#10 + (byte) current_piece_orientation#7 ← (byte) current_piece_orientation#14 + (byte) keyboard_events_size#9 ← (byte) keyboard_events_size#20 + (byte) keyboard_modifiers#9 ← (byte) keyboard_modifiers#17 + (byte) current_movedown_counter#4 ← (byte) current_movedown_counter#9 + (byte) current_ypos#5 ← (byte) current_ypos#11 + (byte) current_xpos#4 ← (byte) current_xpos#9 to:@end -@end: scope:[] from @9 +@end: scope:[] from @17 SYMBOL TABLE SSA -(byte/word/signed word/dword/signed dword~) $0 -(byte/signed byte/word/signed word/dword/signed dword~) $1 +(byte/word/signed word/dword/signed dword~) $1 +(byte/signed byte/word/signed word/dword/signed dword~) $2 +(byte/signed word/word/dword/signed dword/signed byte~) $3 +(label) @11 +(label) @16 +(label) @17 (label) @4 (label) @8 -(label) @9 (label) @begin (label) @end (byte) BLACK (byte) BLACK#0 (byte*) BORDERCOL (byte*) BORDERCOL#0 +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A#0 +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B#0 (byte*) COLS (byte*) COLS#0 (byte) DARK_GREY (byte) DARK_GREY#0 -(byte) GREEN -(byte) GREEN#0 +(byte) KEY_COMMA +(byte) KEY_COMMA#0 +(byte) KEY_COMMODORE +(byte) KEY_COMMODORE#0 +(byte) KEY_CTRL +(byte) KEY_CTRL#0 +(byte) KEY_DOT +(byte) KEY_DOT#0 +(byte) KEY_LSHIFT +(byte) KEY_LSHIFT#0 +(byte) KEY_MODIFIER_COMMODORE +(byte) KEY_MODIFIER_COMMODORE#0 +(byte) KEY_MODIFIER_CTRL +(byte) KEY_MODIFIER_CTRL#0 +(byte) KEY_MODIFIER_LSHIFT +(byte) KEY_MODIFIER_LSHIFT#0 +(byte) KEY_MODIFIER_RSHIFT +(byte) KEY_MODIFIER_RSHIFT#0 +(byte) KEY_RSHIFT +(byte) KEY_RSHIFT#0 +(byte) KEY_SPACE +(byte) KEY_SPACE#0 +(byte) KEY_X +(byte) KEY_X#0 +(byte) KEY_Z +(byte) KEY_Z#0 +(byte*) RASTER +(byte*) RASTER#0 (byte*) SCREEN (byte*) SCREEN#0 (byte*) SCREEN#1 (byte*) SCREEN#2 (byte*) SCREEN#3 -(byte[$1]) current_piece -(byte[$1]) current_piece#0 +(void()) current_movedown() +(label) current_movedown::@return +(byte) current_movedown_counter +(byte) current_movedown_counter#0 +(byte) current_movedown_counter#1 +(byte) current_movedown_counter#10 +(byte) current_movedown_counter#11 +(byte) current_movedown_counter#12 +(byte) current_movedown_counter#13 +(byte) current_movedown_counter#14 +(byte) current_movedown_counter#15 +(byte) current_movedown_counter#16 +(byte) current_movedown_counter#17 +(byte) current_movedown_counter#18 +(byte) current_movedown_counter#19 +(byte) current_movedown_counter#2 +(byte) current_movedown_counter#20 +(byte) current_movedown_counter#21 +(byte) current_movedown_counter#22 +(byte) current_movedown_counter#23 +(byte) current_movedown_counter#24 +(byte) current_movedown_counter#25 +(byte) current_movedown_counter#26 +(byte) current_movedown_counter#27 +(byte) current_movedown_counter#28 +(byte) current_movedown_counter#29 +(byte) current_movedown_counter#3 +(byte) current_movedown_counter#30 +(byte) current_movedown_counter#31 +(byte) current_movedown_counter#32 +(byte) current_movedown_counter#33 +(byte) current_movedown_counter#34 +(byte) current_movedown_counter#35 +(byte) current_movedown_counter#36 +(byte) current_movedown_counter#37 +(byte) current_movedown_counter#38 +(byte) current_movedown_counter#39 +(byte) current_movedown_counter#4 +(byte) current_movedown_counter#40 +(byte) current_movedown_counter#41 +(byte) current_movedown_counter#42 +(byte) current_movedown_counter#43 +(byte) current_movedown_counter#44 +(byte) current_movedown_counter#5 +(byte) current_movedown_counter#6 +(byte) current_movedown_counter#7 +(byte) current_movedown_counter#8 +(byte) current_movedown_counter#9 +(byte) current_movedown_rate +(byte) current_movedown_rate#0 +(byte) current_movedown_rate_fast +(byte) current_movedown_rate_fast#0 +(byte*) current_piece +(byte*) current_piece#0 +(byte*) current_piece#1 +(byte*) current_piece#10 +(byte*) current_piece#11 +(byte*) current_piece#12 +(byte*) current_piece#13 +(byte*) current_piece#14 +(byte*) current_piece#15 +(byte*) current_piece#16 +(byte*) current_piece#17 +(byte*) current_piece#18 +(byte*) current_piece#19 +(byte*) current_piece#2 +(byte*) current_piece#20 +(byte*) current_piece#21 +(byte*) current_piece#22 +(byte*) current_piece#23 +(byte*) current_piece#24 +(byte*) current_piece#25 +(byte*) current_piece#26 +(byte*) current_piece#27 +(byte*) current_piece#28 +(byte*) current_piece#29 +(byte*) current_piece#3 +(byte*) current_piece#30 +(byte*) current_piece#31 +(byte*) current_piece#32 +(byte*) current_piece#33 +(byte*) current_piece#34 +(byte*) current_piece#35 +(byte*) current_piece#36 +(byte*) current_piece#37 +(byte*) current_piece#38 +(byte*) current_piece#39 +(byte*) current_piece#4 +(byte*) current_piece#40 +(byte*) current_piece#41 +(byte*) current_piece#42 +(byte*) current_piece#43 +(byte*) current_piece#44 +(byte*) current_piece#45 +(byte*) current_piece#46 +(byte*) current_piece#47 +(byte*) current_piece#48 +(byte*) current_piece#49 +(byte*) current_piece#5 +(byte*) current_piece#50 +(byte*) current_piece#51 +(byte*) current_piece#52 +(byte*) current_piece#53 +(byte*) current_piece#54 +(byte*) current_piece#55 +(byte*) current_piece#56 +(byte*) current_piece#6 +(byte*) current_piece#7 +(byte*) current_piece#8 +(byte*) current_piece#9 +(byte) current_piece_orientation +(byte) current_piece_orientation#0 +(byte) current_piece_orientation#1 +(byte) current_piece_orientation#10 +(byte) current_piece_orientation#11 +(byte) current_piece_orientation#12 +(byte) current_piece_orientation#13 +(byte) current_piece_orientation#14 +(byte) current_piece_orientation#15 +(byte) current_piece_orientation#16 +(byte) current_piece_orientation#17 +(byte) current_piece_orientation#18 +(byte) current_piece_orientation#19 +(byte) current_piece_orientation#2 +(byte) current_piece_orientation#20 +(byte) current_piece_orientation#21 +(byte) current_piece_orientation#22 +(byte) current_piece_orientation#23 +(byte) current_piece_orientation#24 +(byte) current_piece_orientation#25 +(byte) current_piece_orientation#26 +(byte) current_piece_orientation#27 +(byte) current_piece_orientation#28 +(byte) current_piece_orientation#29 +(byte) current_piece_orientation#3 +(byte) current_piece_orientation#30 +(byte) current_piece_orientation#31 +(byte) current_piece_orientation#32 +(byte) current_piece_orientation#33 +(byte) current_piece_orientation#34 +(byte) current_piece_orientation#35 +(byte) current_piece_orientation#36 +(byte) current_piece_orientation#37 +(byte) current_piece_orientation#38 +(byte) current_piece_orientation#39 +(byte) current_piece_orientation#4 +(byte) current_piece_orientation#40 +(byte) current_piece_orientation#41 +(byte) current_piece_orientation#42 +(byte) current_piece_orientation#43 +(byte) current_piece_orientation#44 +(byte) current_piece_orientation#45 +(byte) current_piece_orientation#46 +(byte) current_piece_orientation#47 +(byte) current_piece_orientation#48 +(byte) current_piece_orientation#49 +(byte) current_piece_orientation#5 +(byte) current_piece_orientation#50 +(byte) current_piece_orientation#51 +(byte) current_piece_orientation#52 +(byte) current_piece_orientation#53 +(byte) current_piece_orientation#54 +(byte) current_piece_orientation#55 +(byte) current_piece_orientation#56 +(byte) current_piece_orientation#57 +(byte) current_piece_orientation#58 +(byte) current_piece_orientation#6 +(byte) current_piece_orientation#7 +(byte) current_piece_orientation#8 +(byte) current_piece_orientation#9 +(byte) current_xpos +(byte) current_xpos#0 +(byte) current_xpos#1 +(byte) current_xpos#10 +(byte) current_xpos#11 +(byte) current_xpos#12 +(byte) current_xpos#13 +(byte) current_xpos#14 +(byte) current_xpos#15 +(byte) current_xpos#16 +(byte) current_xpos#17 +(byte) current_xpos#18 +(byte) current_xpos#19 +(byte) current_xpos#2 +(byte) current_xpos#20 +(byte) current_xpos#21 +(byte) current_xpos#22 +(byte) current_xpos#23 +(byte) current_xpos#24 +(byte) current_xpos#25 +(byte) current_xpos#26 +(byte) current_xpos#27 +(byte) current_xpos#28 +(byte) current_xpos#29 +(byte) current_xpos#3 +(byte) current_xpos#30 +(byte) current_xpos#31 +(byte) current_xpos#32 +(byte) current_xpos#33 +(byte) current_xpos#34 +(byte) current_xpos#35 +(byte) current_xpos#36 +(byte) current_xpos#37 +(byte) current_xpos#38 +(byte) current_xpos#39 +(byte) current_xpos#4 +(byte) current_xpos#40 +(byte) current_xpos#41 +(byte) current_xpos#42 +(byte) current_xpos#43 +(byte) current_xpos#44 +(byte) current_xpos#45 +(byte) current_xpos#46 +(byte) current_xpos#47 +(byte) current_xpos#48 +(byte) current_xpos#49 +(byte) current_xpos#5 +(byte) current_xpos#50 +(byte) current_xpos#51 +(byte) current_xpos#52 +(byte) current_xpos#53 +(byte) current_xpos#54 +(byte) current_xpos#6 +(byte) current_xpos#7 +(byte) current_xpos#8 +(byte) current_xpos#9 +(byte) current_ypos +(byte) current_ypos#0 +(byte) current_ypos#1 +(byte) current_ypos#10 +(byte) current_ypos#11 +(byte) current_ypos#12 +(byte) current_ypos#13 +(byte) current_ypos#14 +(byte) current_ypos#15 +(byte) current_ypos#16 +(byte) current_ypos#17 +(byte) current_ypos#18 +(byte) current_ypos#19 +(byte) current_ypos#2 +(byte) current_ypos#20 +(byte) current_ypos#21 +(byte) current_ypos#22 +(byte) current_ypos#23 +(byte) current_ypos#24 +(byte) current_ypos#25 +(byte) current_ypos#26 +(byte) current_ypos#27 +(byte) current_ypos#28 +(byte) current_ypos#29 +(byte) current_ypos#3 +(byte) current_ypos#30 +(byte) current_ypos#31 +(byte) current_ypos#32 +(byte) current_ypos#33 +(byte) current_ypos#34 +(byte) current_ypos#35 +(byte) current_ypos#36 +(byte) current_ypos#37 +(byte) current_ypos#38 +(byte) current_ypos#39 +(byte) current_ypos#4 +(byte) current_ypos#40 +(byte) current_ypos#41 +(byte) current_ypos#42 +(byte) current_ypos#43 +(byte) current_ypos#44 +(byte) current_ypos#45 +(byte) current_ypos#46 +(byte) current_ypos#47 +(byte) current_ypos#48 +(byte) current_ypos#49 +(byte) current_ypos#5 +(byte) current_ypos#50 +(byte) current_ypos#51 +(byte) current_ypos#52 +(byte) current_ypos#53 +(byte) current_ypos#54 +(byte) current_ypos#55 +(byte) current_ypos#56 +(byte) current_ypos#57 +(byte) current_ypos#6 +(byte) current_ypos#7 +(byte) current_ypos#8 +(byte) current_ypos#9 (void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val) (byte*~) fill::$0 (bool~) fill::$1 @@ -258,17 +1495,545 @@ SYMBOL TABLE SSA (byte*) init::line#2 (byte*) init::line#3 (byte*) init::line#4 +(byte()) keyboard_event_get() +(bool~) keyboard_event_get::$0 +(label) keyboard_event_get::@1 +(label) keyboard_event_get::@3 +(label) keyboard_event_get::@return +(byte) keyboard_event_get::return +(byte) keyboard_event_get::return#0 +(byte) keyboard_event_get::return#1 +(byte) keyboard_event_get::return#2 +(byte) keyboard_event_get::return#3 +(byte) keyboard_event_get::return#4 +(byte) keyboard_event_get::return#5 +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) +(byte~) keyboard_event_pressed::$0 +(byte~) keyboard_event_pressed::$1 +(byte~) keyboard_event_pressed::$2 +(label) keyboard_event_pressed::@return +(byte) keyboard_event_pressed::keycode +(byte) keyboard_event_pressed::keycode#0 +(byte) keyboard_event_pressed::keycode#1 +(byte) keyboard_event_pressed::keycode#2 +(byte) keyboard_event_pressed::keycode#3 +(byte) keyboard_event_pressed::keycode#4 +(byte) keyboard_event_pressed::keycode#5 +(byte) keyboard_event_pressed::return +(byte) keyboard_event_pressed::return#0 +(byte) keyboard_event_pressed::return#1 +(byte) keyboard_event_pressed::return#10 +(byte) keyboard_event_pressed::return#11 +(byte) keyboard_event_pressed::return#12 +(byte) keyboard_event_pressed::return#2 +(byte) keyboard_event_pressed::return#3 +(byte) keyboard_event_pressed::return#4 +(byte) keyboard_event_pressed::return#5 +(byte) keyboard_event_pressed::return#6 +(byte) keyboard_event_pressed::return#7 +(byte) keyboard_event_pressed::return#8 +(byte) keyboard_event_pressed::return#9 +(byte) keyboard_event_pressed::row_bits +(byte) keyboard_event_pressed::row_bits#0 +(void()) keyboard_event_scan() +(byte~) keyboard_event_scan::$0 +(bool~) keyboard_event_scan::$1 +(bool~) keyboard_event_scan::$10 +(byte/word/dword~) keyboard_event_scan::$11 +(bool~) keyboard_event_scan::$12 +(bool~) keyboard_event_scan::$13 +(byte~) keyboard_event_scan::$14 +(bool~) keyboard_event_scan::$15 +(bool~) keyboard_event_scan::$16 +(byte~) keyboard_event_scan::$17 +(byte~) keyboard_event_scan::$18 +(bool~) keyboard_event_scan::$19 +(byte/signed word/word/dword/signed dword~) keyboard_event_scan::$2 +(bool~) keyboard_event_scan::$20 +(byte~) keyboard_event_scan::$21 +(byte~) keyboard_event_scan::$22 +(bool~) keyboard_event_scan::$23 +(bool~) keyboard_event_scan::$24 +(byte~) keyboard_event_scan::$25 +(byte~) keyboard_event_scan::$26 +(bool~) keyboard_event_scan::$27 +(bool~) keyboard_event_scan::$28 +(byte~) keyboard_event_scan::$29 +(byte~) keyboard_event_scan::$3 +(byte~) keyboard_event_scan::$4 +(bool~) keyboard_event_scan::$5 +(bool~) keyboard_event_scan::$6 +(bool~) keyboard_event_scan::$7 +(bool~) keyboard_event_scan::$8 +(byte~) keyboard_event_scan::$9 +(label) keyboard_event_scan::@1 +(label) keyboard_event_scan::@10 +(label) keyboard_event_scan::@11 +(label) keyboard_event_scan::@12 +(label) keyboard_event_scan::@13 +(label) keyboard_event_scan::@15 +(label) keyboard_event_scan::@16 +(label) keyboard_event_scan::@17 +(label) keyboard_event_scan::@19 +(label) keyboard_event_scan::@2 +(label) keyboard_event_scan::@20 +(label) keyboard_event_scan::@21 +(label) keyboard_event_scan::@22 +(label) keyboard_event_scan::@23 +(label) keyboard_event_scan::@24 +(label) keyboard_event_scan::@25 +(label) keyboard_event_scan::@26 +(label) keyboard_event_scan::@27 +(label) keyboard_event_scan::@28 +(label) keyboard_event_scan::@29 +(label) keyboard_event_scan::@3 +(label) keyboard_event_scan::@4 +(label) keyboard_event_scan::@5 +(label) keyboard_event_scan::@6 +(label) keyboard_event_scan::@7 +(label) keyboard_event_scan::@9 +(label) keyboard_event_scan::@return +(byte) keyboard_event_scan::col +(byte) keyboard_event_scan::col#0 +(byte) keyboard_event_scan::col#1 +(byte) keyboard_event_scan::col#2 +(byte) keyboard_event_scan::col#3 +(byte) keyboard_event_scan::col#4 +(byte) keyboard_event_scan::col#5 +(byte) keyboard_event_scan::col#6 +(byte) keyboard_event_scan::col#7 +(byte) keyboard_event_scan::col#8 +(byte) keyboard_event_scan::event_type +(byte) keyboard_event_scan::event_type#0 +(byte) keyboard_event_scan::keycode +(byte) keyboard_event_scan::keycode#0 +(byte) keyboard_event_scan::keycode#1 +(byte) keyboard_event_scan::keycode#10 +(byte) keyboard_event_scan::keycode#11 +(byte) keyboard_event_scan::keycode#12 +(byte) keyboard_event_scan::keycode#13 +(byte) keyboard_event_scan::keycode#14 +(byte) keyboard_event_scan::keycode#15 +(byte) keyboard_event_scan::keycode#2 +(byte) keyboard_event_scan::keycode#3 +(byte) keyboard_event_scan::keycode#4 +(byte) keyboard_event_scan::keycode#5 +(byte) keyboard_event_scan::keycode#6 +(byte) keyboard_event_scan::keycode#7 +(byte) keyboard_event_scan::keycode#8 +(byte) keyboard_event_scan::keycode#9 +(byte) keyboard_event_scan::row +(byte) keyboard_event_scan::row#0 +(byte) keyboard_event_scan::row#1 +(byte) keyboard_event_scan::row#10 +(byte) keyboard_event_scan::row#11 +(byte) keyboard_event_scan::row#12 +(byte) keyboard_event_scan::row#13 +(byte) keyboard_event_scan::row#14 +(byte) keyboard_event_scan::row#2 +(byte) keyboard_event_scan::row#3 +(byte) keyboard_event_scan::row#4 +(byte) keyboard_event_scan::row#5 +(byte) keyboard_event_scan::row#6 +(byte) keyboard_event_scan::row#7 +(byte) keyboard_event_scan::row#8 +(byte) keyboard_event_scan::row#9 +(byte) keyboard_event_scan::row_scan +(byte) keyboard_event_scan::row_scan#0 +(byte) keyboard_event_scan::row_scan#1 +(byte) keyboard_event_scan::row_scan#2 +(byte) keyboard_event_scan::row_scan#3 +(byte) keyboard_event_scan::row_scan#4 +(byte) keyboard_event_scan::row_scan#5 +(byte) keyboard_event_scan::row_scan#6 +(byte) keyboard_event_scan::row_scan#7 +(byte) keyboard_event_scan::row_scan#8 +(byte) keyboard_event_scan::row_scan#9 +(byte[8]) keyboard_events +(byte[8]) keyboard_events#0 +(byte) keyboard_events_size +(byte) keyboard_events_size#0 +(byte) keyboard_events_size#1 +(byte) keyboard_events_size#10 +(byte) keyboard_events_size#11 +(byte) keyboard_events_size#12 +(byte) keyboard_events_size#13 +(byte) keyboard_events_size#14 +(byte) keyboard_events_size#15 +(byte) keyboard_events_size#16 +(byte) keyboard_events_size#17 +(byte) keyboard_events_size#18 +(byte) keyboard_events_size#19 +(byte) keyboard_events_size#2 +(byte) keyboard_events_size#20 +(byte) keyboard_events_size#21 +(byte) keyboard_events_size#22 +(byte) keyboard_events_size#23 +(byte) keyboard_events_size#24 +(byte) keyboard_events_size#25 +(byte) keyboard_events_size#26 +(byte) keyboard_events_size#27 +(byte) keyboard_events_size#28 +(byte) keyboard_events_size#29 +(byte) keyboard_events_size#3 +(byte) keyboard_events_size#30 +(byte) keyboard_events_size#31 +(byte) keyboard_events_size#32 +(byte) keyboard_events_size#33 +(byte) keyboard_events_size#34 +(byte) keyboard_events_size#35 +(byte) keyboard_events_size#36 +(byte) keyboard_events_size#37 +(byte) keyboard_events_size#38 +(byte) keyboard_events_size#39 +(byte) keyboard_events_size#4 +(byte) keyboard_events_size#40 +(byte) keyboard_events_size#41 +(byte) keyboard_events_size#42 +(byte) keyboard_events_size#43 +(byte) keyboard_events_size#44 +(byte) keyboard_events_size#45 +(byte) keyboard_events_size#46 +(byte) keyboard_events_size#47 +(byte) keyboard_events_size#48 +(byte) keyboard_events_size#49 +(byte) keyboard_events_size#5 +(byte) keyboard_events_size#50 +(byte) keyboard_events_size#51 +(byte) keyboard_events_size#52 +(byte) keyboard_events_size#53 +(byte) keyboard_events_size#54 +(byte) keyboard_events_size#55 +(byte) keyboard_events_size#56 +(byte) keyboard_events_size#57 +(byte) keyboard_events_size#58 +(byte) keyboard_events_size#59 +(byte) keyboard_events_size#6 +(byte) keyboard_events_size#60 +(byte) keyboard_events_size#61 +(byte) keyboard_events_size#62 +(byte) keyboard_events_size#63 +(byte) keyboard_events_size#64 +(byte) keyboard_events_size#65 +(byte) keyboard_events_size#66 +(byte) keyboard_events_size#67 +(byte) keyboard_events_size#68 +(byte) keyboard_events_size#69 +(byte) keyboard_events_size#7 +(byte) keyboard_events_size#70 +(byte) keyboard_events_size#71 +(byte) keyboard_events_size#72 +(byte) keyboard_events_size#73 +(byte) keyboard_events_size#74 +(byte) keyboard_events_size#75 +(byte) keyboard_events_size#76 +(byte) keyboard_events_size#77 +(byte) keyboard_events_size#78 +(byte) keyboard_events_size#79 +(byte) keyboard_events_size#8 +(byte) keyboard_events_size#80 +(byte) keyboard_events_size#81 +(byte) keyboard_events_size#82 +(byte) keyboard_events_size#83 +(byte) keyboard_events_size#84 +(byte) keyboard_events_size#9 +(byte[8]) keyboard_matrix_col_bitmask +(byte[8]) keyboard_matrix_col_bitmask#0 +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) +(byte~) keyboard_matrix_read::$0 +(label) keyboard_matrix_read::@return +(byte) keyboard_matrix_read::return +(byte) keyboard_matrix_read::return#0 +(byte) keyboard_matrix_read::return#1 +(byte) keyboard_matrix_read::return#2 +(byte) keyboard_matrix_read::return#3 +(byte) keyboard_matrix_read::return#4 +(byte) keyboard_matrix_read::row_pressed_bits +(byte) keyboard_matrix_read::row_pressed_bits#0 +(byte) keyboard_matrix_read::rowid +(byte) keyboard_matrix_read::rowid#0 +(byte) keyboard_matrix_read::rowid#1 +(byte[8]) keyboard_matrix_row_bitmask +(byte[8]) keyboard_matrix_row_bitmask#0 +(byte) keyboard_modifiers +(byte) keyboard_modifiers#0 +(byte) keyboard_modifiers#1 +(byte) keyboard_modifiers#10 +(byte) keyboard_modifiers#11 +(byte) keyboard_modifiers#12 +(byte) keyboard_modifiers#13 +(byte) keyboard_modifiers#14 +(byte) keyboard_modifiers#15 +(byte) keyboard_modifiers#16 +(byte) keyboard_modifiers#17 +(byte) keyboard_modifiers#18 +(byte) keyboard_modifiers#19 +(byte) keyboard_modifiers#2 +(byte) keyboard_modifiers#20 +(byte) keyboard_modifiers#21 +(byte) keyboard_modifiers#22 +(byte) keyboard_modifiers#23 +(byte) keyboard_modifiers#24 +(byte) keyboard_modifiers#25 +(byte) keyboard_modifiers#26 +(byte) keyboard_modifiers#27 +(byte) keyboard_modifiers#28 +(byte) keyboard_modifiers#29 +(byte) keyboard_modifiers#3 +(byte) keyboard_modifiers#30 +(byte) keyboard_modifiers#31 +(byte) keyboard_modifiers#32 +(byte) keyboard_modifiers#33 +(byte) keyboard_modifiers#34 +(byte) keyboard_modifiers#35 +(byte) keyboard_modifiers#36 +(byte) keyboard_modifiers#37 +(byte) keyboard_modifiers#38 +(byte) keyboard_modifiers#39 +(byte) keyboard_modifiers#4 +(byte) keyboard_modifiers#40 +(byte) keyboard_modifiers#41 +(byte) keyboard_modifiers#42 +(byte) keyboard_modifiers#43 +(byte) keyboard_modifiers#44 +(byte) keyboard_modifiers#45 +(byte) keyboard_modifiers#46 +(byte) keyboard_modifiers#47 +(byte) keyboard_modifiers#48 +(byte) keyboard_modifiers#49 +(byte) keyboard_modifiers#5 +(byte) keyboard_modifiers#50 +(byte) keyboard_modifiers#51 +(byte) keyboard_modifiers#52 +(byte) keyboard_modifiers#53 +(byte) keyboard_modifiers#54 +(byte) keyboard_modifiers#55 +(byte) keyboard_modifiers#56 +(byte) keyboard_modifiers#57 +(byte) keyboard_modifiers#58 +(byte) keyboard_modifiers#59 +(byte) keyboard_modifiers#6 +(byte) keyboard_modifiers#60 +(byte) keyboard_modifiers#61 +(byte) keyboard_modifiers#62 +(byte) keyboard_modifiers#63 +(byte) keyboard_modifiers#64 +(byte) keyboard_modifiers#65 +(byte) keyboard_modifiers#7 +(byte) keyboard_modifiers#8 +(byte) keyboard_modifiers#9 +(byte[8]) keyboard_scan_values +(byte[8]) keyboard_scan_values#0 (void()) main() +(bool~) main::$10 +(bool~) main::$11 +(bool~) main::$12 +(bool~) main::$13 +(bool~) main::$14 +(bool~) main::$15 +(bool~) main::$16 +(bool~) main::$17 +(byte~) main::$19 +(bool~) main::$20 +(bool~) main::$21 +(bool~) main::$22 +(bool~) main::$23 +(bool~) main::$24 +(bool~) main::$25 +(bool~) main::$26 +(bool~) main::$27 +(byte/signed word/word/dword/signed dword~) main::$28 +(byte/word/dword~) main::$29 +(bool~) main::$3 +(bool~) main::$30 +(bool~) main::$31 +(byte/signed word/word/dword/signed dword~) main::$32 +(byte/word/dword~) main::$33 +(bool~) main::$34 +(bool~) main::$35 +(bool~) main::$4 +(byte~) main::$6 +(bool~) main::$7 +(bool~) main::$8 +(byte~) main::$9 (label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 (label) main::@2 +(label) main::@20 +(label) main::@29 +(label) main::@30 +(label) main::@31 +(label) main::@32 +(label) main::@33 +(label) main::@34 +(label) main::@35 +(label) main::@36 +(label) main::@37 +(label) main::@38 +(label) main::@39 +(label) main::@4 +(label) main::@41 +(label) main::@42 +(label) main::@43 +(label) main::@44 +(label) main::@45 +(label) main::@46 +(label) main::@47 +(label) main::@48 +(label) main::@49 +(label) main::@5 (label) main::@7 (label) main::@8 (label) main::@9 (label) main::@return -(byte[$0]) playfield -(byte[$0]) playfield#0 -(void()) render_current_piece() -(label) render_current_piece::@return +(byte) main::key_event +(byte) main::key_event#0 +(byte) main::key_event#1 +(byte) main::key_event#10 +(byte) main::key_event#11 +(byte) main::key_event#12 +(byte) main::key_event#13 +(byte) main::key_event#14 +(byte) main::key_event#15 +(byte) main::key_event#16 +(byte) main::key_event#17 +(byte) main::key_event#18 +(byte) main::key_event#19 +(byte) main::key_event#2 +(byte) main::key_event#3 +(byte) main::key_event#4 +(byte) main::key_event#5 +(byte) main::key_event#6 +(byte) main::key_event#7 +(byte) main::key_event#8 +(byte) main::key_event#9 +(byte) main::movedown +(byte) main::movedown#0 +(byte) main::movedown#1 +(byte) main::movedown#10 +(byte) main::movedown#11 +(byte) main::movedown#12 +(byte) main::movedown#2 +(byte) main::movedown#3 +(byte) main::movedown#4 +(byte) main::movedown#5 +(byte) main::movedown#6 +(byte) main::movedown#7 +(byte) main::movedown#8 +(byte) main::movedown#9 +(byte) main::render +(byte) main::render#0 +(byte) main::render#1 +(byte) main::render#10 +(byte) main::render#11 +(byte) main::render#12 +(byte) main::render#13 +(byte) main::render#14 +(byte) main::render#15 +(byte) main::render#16 +(byte) main::render#17 +(byte) main::render#18 +(byte) main::render#19 +(byte) main::render#2 +(byte) main::render#20 +(byte) main::render#21 +(byte) main::render#22 +(byte) main::render#23 +(byte) main::render#24 +(byte) main::render#25 +(byte) main::render#26 +(byte) main::render#27 +(byte) main::render#28 +(byte) main::render#3 +(byte) main::render#4 +(byte) main::render#5 +(byte) main::render#6 +(byte) main::render#7 +(byte) main::render#8 +(byte) main::render#9 +(byte[$3]) piece_t +(byte[$3]) piece_t#0 +(byte[$1]) playfield +(byte[$1]) playfield#0 +(void()) render_current() +(byte*~) render_current::$0 +(byte~) render_current::$1 +(byte~) render_current::$2 +(bool~) render_current::$3 +(bool~) render_current::$4 +(byte~) render_current::$5 +(bool~) render_current::$6 +(bool~) render_current::$7 +(bool~) render_current::$8 +(bool~) render_current::$9 +(label) render_current::@1 +(label) render_current::@2 +(label) render_current::@3 +(label) render_current::@4 +(label) render_current::@5 +(label) render_current::@6 +(label) render_current::@7 +(label) render_current::@return +(byte) render_current::c +(byte) render_current::c#0 +(byte) render_current::c#1 +(byte) render_current::c#2 +(byte) render_current::c#3 +(byte) render_current::c#4 +(byte) render_current::c#5 +(byte) render_current::c#6 +(byte) render_current::current_cell +(byte) render_current::current_cell#0 +(byte) render_current::current_cell#1 +(byte) render_current::current_cell#2 +(byte*) render_current::current_piece_gfx +(byte*) render_current::current_piece_gfx#0 +(byte*) render_current::current_piece_gfx#1 +(byte*) render_current::current_piece_gfx#2 +(byte*) render_current::current_piece_gfx#3 +(byte*) render_current::current_piece_gfx#4 +(byte*) render_current::current_piece_gfx#5 +(byte*) render_current::current_piece_gfx#6 +(byte*) render_current::current_piece_gfx#7 +(byte) render_current::i +(byte) render_current::i#0 +(byte) render_current::i#1 +(byte) render_current::i#2 +(byte) render_current::i#3 +(byte) render_current::i#4 +(byte) render_current::i#5 +(byte) render_current::i#6 +(byte) render_current::i#7 +(byte) render_current::i#8 +(byte) render_current::l +(byte) render_current::l#0 +(byte) render_current::l#1 +(byte) render_current::l#2 +(byte) render_current::l#3 +(byte) render_current::l#4 +(byte) render_current::l#5 +(byte) render_current::l#6 +(byte) render_current::l#7 +(byte) render_current::l#8 +(byte*) render_current::screen_line +(byte*) render_current::screen_line#0 +(byte*) render_current::screen_line#1 +(byte*) render_current::screen_line#2 +(byte*) render_current::screen_line#3 +(byte*) render_current::screen_line#4 +(byte*) render_current::screen_line#5 +(byte) render_current::xpos +(byte) render_current::xpos#0 +(byte) render_current::xpos#1 (void()) render_playfield() (byte~) render_playfield::$0 (byte*~) render_playfield::$1 @@ -300,51 +2065,424 @@ SYMBOL TABLE SSA (byte*[20]) screen_lines (byte*[20]) screen_lines#0 -Culled Empty Block (label) main::@9 -Culled Empty Block (label) @9 -Successful SSA optimization Pass2CullEmptyBlocks +Inversing boolean not (bool~) keyboard_event_scan::$6 ← (byte~) keyboard_event_scan::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) keyboard_event_scan::$8 ← (byte) keyboard_events_size#10 == (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) keyboard_event_scan::$7 ← (byte) keyboard_events_size#10 != (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not (bool~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$14 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$15 ← (byte~) keyboard_event_scan::$14 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) keyboard_event_scan::$20 ← (byte~) keyboard_event_scan::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$19 ← (byte~) keyboard_event_scan::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) keyboard_event_scan::$24 ← (byte~) keyboard_event_scan::$22 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$23 ← (byte~) keyboard_event_scan::$22 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) keyboard_event_scan::$28 ← (byte~) keyboard_event_scan::$26 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$27 ← (byte~) keyboard_event_scan::$26 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) main::$8 ← (byte) main::key_event#0 != (byte) KEY_SPACE#0 from (bool~) main::$7 ← (byte) main::key_event#0 == (byte) KEY_SPACE#0 +Inversing boolean not (bool~) main::$11 ← (byte~) main::$9 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$10 ← (byte~) main::$9 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) main::$15 ← (byte) current_movedown_counter#6 < (byte) current_movedown_rate#0 from (bool~) main::$14 ← (byte) current_movedown_counter#6 >= (byte) current_movedown_rate#0 +Inversing boolean not (bool~) main::$13 ← (byte) current_movedown_counter#7 < (byte) current_movedown_rate_fast#0 from (bool~) main::$12 ← (byte) current_movedown_counter#7 >= (byte) current_movedown_rate_fast#0 +Inversing boolean not (bool~) main::$17 ← (byte) main::movedown#6 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$16 ← (byte) main::movedown#6 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) main::$21 ← (byte~) main::$19 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$20 ← (byte~) main::$19 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) main::$35 ← (byte) main::render#7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$34 ← (byte) main::render#7 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) main::$23 ← (byte) main::key_event#2 != (byte) KEY_COMMA#0 from (bool~) main::$22 ← (byte) main::key_event#2 == (byte) KEY_COMMA#0 +Inversing boolean not (bool~) main::$25 ← (byte) main::key_event#3 != (byte) KEY_DOT#0 from (bool~) main::$24 ← (byte) main::key_event#3 == (byte) KEY_DOT#0 +Inversing boolean not (bool~) main::$27 ← (byte) main::key_event#4 != (byte) KEY_Z#0 from (bool~) main::$26 ← (byte) main::key_event#4 == (byte) KEY_Z#0 +Inversing boolean not (bool~) main::$31 ← (byte) main::key_event#5 != (byte) KEY_X#0 from (bool~) main::$30 ← (byte) main::key_event#5 == (byte) KEY_X#0 +Inversing boolean not (bool~) render_current::$4 ← (byte) render_current::current_cell#0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) render_current::$3 ← (byte) render_current::current_cell#0 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not (bool~) render_current::$7 ← (byte) render_current::xpos#0 >= (byte/signed byte/word/signed word/dword/signed dword) 10 from (bool~) render_current::$6 ← (byte) render_current::xpos#0 < (byte/signed byte/word/signed word/dword/signed dword) 10 +Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) fill::end#0 = (byte*~) fill::$0 Alias (byte*) fill::addr#0 = (byte*) fill::start#2 +Alias (byte) keyboard_matrix_read::return#0 = (byte) keyboard_matrix_read::row_pressed_bits#0 (byte~) keyboard_matrix_read::$0 (byte) keyboard_matrix_read::return#3 (byte) keyboard_matrix_read::return#1 +Alias (byte) keyboard_matrix_read::return#2 = (byte) keyboard_matrix_read::return#4 +Alias (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#3 (byte) keyboard_event_scan::row#8 (byte) keyboard_event_scan::row#7 +Alias (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#7 (byte) keyboard_event_scan::keycode#12 (byte) keyboard_event_scan::keycode#3 +Alias (byte) keyboard_events_size#29 = (byte) keyboard_events_size#37 (byte) keyboard_events_size#45 (byte) keyboard_events_size#62 +Alias (byte) keyboard_event_scan::row_scan#0 = (byte~) keyboard_event_scan::$0 (byte) keyboard_event_scan::row_scan#4 +Alias (byte) keyboard_event_scan::keycode#1 = (byte/signed word/word/dword/signed dword~) keyboard_event_scan::$2 +Alias (byte) keyboard_events_size#10 = (byte) keyboard_events_size#21 (byte) keyboard_events_size#38 (byte) keyboard_events_size#22 (byte) keyboard_events_size#11 (byte) keyboard_events_size#12 +Alias (byte) keyboard_event_scan::row_scan#1 = (byte) keyboard_event_scan::row_scan#6 (byte) keyboard_event_scan::row_scan#8 (byte) keyboard_event_scan::row_scan#2 (byte) keyboard_event_scan::row_scan#9 (byte) keyboard_event_scan::row_scan#7 +Alias (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#8 (byte) keyboard_event_scan::col#6 (byte) keyboard_event_scan::col#4 (byte) keyboard_event_scan::col#7 (byte) keyboard_event_scan::col#5 +Alias (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#13 (byte) keyboard_event_scan::keycode#8 (byte) keyboard_event_scan::keycode#9 (byte) keyboard_event_scan::keycode#5 (byte) keyboard_event_scan::keycode#6 +Alias (byte) keyboard_event_scan::row#10 = (byte) keyboard_event_scan::row#13 (byte) keyboard_event_scan::row#5 (byte) keyboard_event_scan::row#11 (byte) keyboard_event_scan::row#14 (byte) keyboard_event_scan::row#12 +Alias (byte) keyboard_event_scan::event_type#0 = (byte~) keyboard_event_scan::$9 +Alias (byte) keyboard_event_scan::row_scan#3 = (byte) keyboard_event_scan::row_scan#5 +Alias (byte) keyboard_event_scan::row#6 = (byte) keyboard_event_scan::row#9 +Alias (byte) keyboard_event_scan::keycode#15 = (byte) keyboard_event_scan::keycode#2 +Alias (byte) keyboard_events_size#30 = (byte) keyboard_events_size#63 +Alias (byte) keyboard_events_size#56 = (byte) keyboard_events_size#83 (byte) keyboard_events_size#78 (byte) keyboard_events_size#77 +Alias (byte) keyboard_event_pressed::return#0 = (byte) keyboard_event_pressed::return#7 +Alias (byte) keyboard_modifiers#1 = (byte) keyboard_modifiers#18 (byte) keyboard_modifiers#10 +Alias (byte) keyboard_event_pressed::return#1 = (byte) keyboard_event_pressed::return#8 +Alias (byte) keyboard_modifiers#11 = (byte) keyboard_modifiers#19 (byte) keyboard_modifiers#26 +Alias (byte) keyboard_events_size#64 = (byte) keyboard_events_size#65 (byte) keyboard_events_size#71 +Alias (byte) keyboard_modifiers#2 = (byte~) keyboard_event_scan::$17 +Alias (byte) keyboard_event_pressed::return#2 = (byte) keyboard_event_pressed::return#9 +Alias (byte) keyboard_modifiers#12 = (byte) keyboard_modifiers#20 (byte) keyboard_modifiers#27 +Alias (byte) keyboard_events_size#46 = (byte) keyboard_events_size#47 (byte) keyboard_events_size#57 +Alias (byte) keyboard_modifiers#3 = (byte~) keyboard_event_scan::$21 +Alias (byte) keyboard_event_pressed::return#10 = (byte) keyboard_event_pressed::return#3 +Alias (byte) keyboard_modifiers#13 = (byte) keyboard_modifiers#21 (byte) keyboard_modifiers#28 (byte) keyboard_modifiers#22 +Alias (byte) keyboard_events_size#23 = (byte) keyboard_events_size#31 (byte) keyboard_events_size#39 (byte) keyboard_events_size#24 +Alias (byte) keyboard_modifiers#4 = (byte~) keyboard_event_scan::$25 +Alias (byte) keyboard_modifiers#5 = (byte~) keyboard_event_scan::$29 +Alias (byte) keyboard_events_size#13 = (byte) keyboard_events_size#3 +Alias (byte) keyboard_modifiers#14 = (byte) keyboard_modifiers#6 +Alias (byte) keyboard_event_pressed::return#11 = (byte) keyboard_event_pressed::return#4 (byte~) keyboard_event_pressed::$2 (byte) keyboard_event_pressed::return#5 +Alias (byte) keyboard_events_size#14 = (byte) keyboard_events_size#25 (byte) keyboard_events_size#15 +Alias (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#4 +Alias (byte) keyboard_events_size#16 = (byte) keyboard_events_size#5 +Alias (byte) keyboard_events_size#0 = (byte) keyboard_events_size#36 (byte) keyboard_events_size#28 +Alias (byte) keyboard_modifiers#0 = (byte) keyboard_modifiers#33 (byte) keyboard_modifiers#25 +Alias (byte) current_ypos#18 = (byte) current_ypos#24 (byte) current_ypos#32 (byte) current_ypos#21 +Alias (byte) keyboard_events_size#33 = (byte) keyboard_events_size#48 (byte) keyboard_events_size#58 (byte) keyboard_events_size#40 +Alias (byte) keyboard_modifiers#30 = (byte) keyboard_modifiers#39 (byte) keyboard_modifiers#46 (byte) keyboard_modifiers#34 +Alias (byte) current_movedown_counter#17 = (byte) current_movedown_counter#26 (byte) current_movedown_counter#33 (byte) current_movedown_counter#21 +Alias (byte) current_xpos#16 = (byte) current_xpos#30 (byte) current_xpos#37 (byte) current_xpos#21 +Alias (byte*) current_piece#1 = (byte*) current_piece#6 (byte*) current_piece#14 (byte*) current_piece#18 +Alias (byte) current_piece_orientation#1 = (byte) current_piece_orientation#8 (byte) current_piece_orientation#20 (byte) current_piece_orientation#24 +Alias (byte) keyboard_events_size#19 = (byte) keyboard_events_size#49 (byte) keyboard_events_size#27 (byte) keyboard_events_size#8 +Alias (byte) keyboard_modifiers#16 = (byte) keyboard_modifiers#40 (byte) keyboard_modifiers#24 (byte) keyboard_modifiers#8 +Alias (byte) current_movedown_counter#14 = (byte) current_movedown_counter#34 (byte) current_movedown_counter#8 (byte) current_movedown_counter#3 +Alias (byte) current_ypos#13 = (byte) current_ypos#56 (byte) current_ypos#7 (byte) current_ypos#2 +Alias (byte) current_xpos#12 = (byte) current_xpos#53 (byte) current_xpos#7 (byte) current_xpos#3 +Alias (byte*) current_piece#12 = (byte*) current_piece#55 (byte*) current_piece#7 (byte*) current_piece#2 +Alias (byte) current_piece_orientation#11 = (byte) current_piece_orientation#57 (byte) current_piece_orientation#18 (byte) current_piece_orientation#4 +Alias (byte) keyboard_events_size#41 = (byte) keyboard_events_size#50 +Alias (byte) keyboard_modifiers#35 = (byte) keyboard_modifiers#41 +Alias (byte) current_movedown_counter#27 = (byte) current_movedown_counter#35 +Alias (byte) current_ypos#54 = (byte) current_ypos#57 +Alias (byte) current_xpos#51 = (byte) current_xpos#54 +Alias (byte*) current_piece#53 = (byte*) current_piece#56 +Alias (byte) current_piece_orientation#55 = (byte) current_piece_orientation#58 +Alias (byte) keyboard_events_size#26 = (byte) keyboard_events_size#42 (byte) keyboard_events_size#35 +Alias (byte) keyboard_modifiers#23 = (byte) keyboard_modifiers#36 (byte) keyboard_modifiers#32 +Alias (byte) current_movedown_counter#10 = (byte) current_movedown_counter#28 (byte) current_movedown_counter#22 (byte) current_movedown_counter#19 (byte) current_movedown_counter#5 +Alias (byte) current_ypos#43 = (byte) current_ypos#55 (byte) current_ypos#53 (byte) current_ypos#50 (byte) current_ypos#47 (byte) current_ypos#44 +Alias (byte) current_xpos#46 = (byte) current_xpos#52 (byte) current_xpos#50 (byte) current_xpos#49 (byte) current_xpos#48 (byte) current_xpos#47 +Alias (byte*) current_piece#48 = (byte*) current_piece#54 (byte*) current_piece#52 (byte*) current_piece#51 (byte*) current_piece#50 (byte*) current_piece#49 +Alias (byte) current_piece_orientation#50 = (byte) current_piece_orientation#56 (byte) current_piece_orientation#54 (byte) current_piece_orientation#53 (byte) current_piece_orientation#52 (byte) current_piece_orientation#51 +Alias (byte) keyboard_events_size#17 = (byte) keyboard_events_size#6 +Alias (byte) keyboard_modifiers#15 = (byte) keyboard_modifiers#7 (byte) keyboard_modifiers#65 (byte) keyboard_modifiers#64 +Alias (byte) keyboard_event_get::return#3 = (byte) keyboard_event_get::return#5 +Alias (byte) main::render#0 = (byte) main::render#28 (byte) main::render#27 +Alias (byte) keyboard_events_size#18 = (byte) keyboard_events_size#7 (byte) keyboard_events_size#84 +Alias (byte) main::key_event#0 = (byte~) main::$6 (byte) main::key_event#19 +Alias (byte) keyboard_event_pressed::return#12 = (byte) keyboard_event_pressed::return#6 +Alias (byte) current_movedown_counter#11 = (byte) current_movedown_counter#13 (byte) current_movedown_counter#20 (byte) current_movedown_counter#7 (byte) current_movedown_counter#12 +Alias (byte) main::movedown#10 = (byte) main::movedown#11 (byte) main::movedown#12 (byte) main::movedown#8 (byte) main::movedown#5 +Alias (byte) main::key_event#14 = (byte) main::key_event#16 (byte) main::key_event#17 (byte) main::key_event#18 (byte) main::key_event#15 +Alias (byte) main::render#22 = (byte) main::render#24 (byte) main::render#25 (byte) main::render#26 (byte) main::render#23 +Alias (byte) current_ypos#33 = (byte) current_ypos#35 (byte) current_ypos#40 (byte) current_ypos#41 (byte) current_ypos#34 +Alias (byte) current_xpos#38 = (byte) current_xpos#40 (byte) current_xpos#42 (byte) current_xpos#43 (byte) current_xpos#39 +Alias (byte*) current_piece#38 = (byte*) current_piece#40 (byte*) current_piece#44 (byte*) current_piece#45 (byte*) current_piece#39 +Alias (byte) current_piece_orientation#44 = (byte) current_piece_orientation#46 (byte) current_piece_orientation#48 (byte) current_piece_orientation#49 (byte) current_piece_orientation#45 +Alias (byte) keyboard_events_size#72 = (byte) keyboard_events_size#74 (byte) keyboard_events_size#79 (byte) keyboard_events_size#80 (byte) keyboard_events_size#73 +Alias (byte) keyboard_modifiers#55 = (byte) keyboard_modifiers#57 (byte) keyboard_modifiers#60 (byte) keyboard_modifiers#61 (byte) keyboard_modifiers#56 +Alias (byte) main::movedown#0 = (byte) main::movedown#4 +Alias (byte) current_movedown_counter#1 = (byte) current_movedown_counter#23 +Alias (byte) main::movedown#7 = (byte) main::movedown#9 +Alias (byte) main::key_event#11 = (byte) main::key_event#12 +Alias (byte) main::render#20 = (byte) main::render#21 +Alias (byte) current_ypos#25 = (byte) current_ypos#26 +Alias (byte) current_xpos#31 = (byte) current_xpos#32 +Alias (byte*) current_piece#32 = (byte*) current_piece#33 +Alias (byte) current_piece_orientation#40 = (byte) current_piece_orientation#41 +Alias (byte) keyboard_events_size#66 = (byte) keyboard_events_size#67 +Alias (byte) keyboard_modifiers#50 = (byte) keyboard_modifiers#51 +Alias (byte) current_movedown_counter#38 = (byte) current_movedown_counter#6 +Alias (byte) current_ypos#12 = (byte) current_ypos#20 +Alias (byte) main::render#12 = (byte) main::render#19 (byte) main::render#6 +Alias (byte) main::key_event#13 = (byte) main::key_event#6 (byte) main::key_event#7 +Alias (byte) current_xpos#22 = (byte) current_xpos#33 (byte) current_xpos#23 +Alias (byte*) current_piece#28 = (byte*) current_piece#34 (byte*) current_piece#29 +Alias (byte) current_piece_orientation#37 = (byte) current_piece_orientation#42 (byte) current_piece_orientation#38 +Alias (byte) keyboard_events_size#59 = (byte) keyboard_events_size#68 (byte) keyboard_events_size#60 +Alias (byte) keyboard_modifiers#47 = (byte) keyboard_modifiers#52 (byte) keyboard_modifiers#48 +Alias (byte) current_ypos#1 = (byte) current_ypos#6 +Alias (byte) main::key_event#1 = (byte) main::key_event#2 (byte) main::key_event#8 +Alias (byte) current_xpos#10 = (byte) current_xpos#18 (byte) current_xpos#5 +Alias (byte) main::render#13 = (byte) main::render#15 (byte) main::render#8 +Alias (byte) current_piece_orientation#30 = (byte) current_piece_orientation#34 (byte) current_piece_orientation#31 +Alias (byte*) current_piece#24 = (byte*) current_piece#46 (byte*) current_piece#47 +Alias (byte) keyboard_events_size#51 = (byte) keyboard_events_size#81 (byte) keyboard_events_size#82 +Alias (byte) keyboard_modifiers#42 = (byte) keyboard_modifiers#62 (byte) keyboard_modifiers#63 +Alias (byte) current_movedown_counter#29 = (byte) current_movedown_counter#43 (byte) current_movedown_counter#44 +Alias (byte) current_ypos#36 = (byte) current_ypos#51 (byte) current_ypos#52 +Alias (byte) current_xpos#11 = (byte) current_xpos#6 +Alias (byte) main::render#16 = (byte) main::render#9 +Alias (byte) main::key_event#3 = (byte) main::key_event#9 +Alias (byte) current_piece_orientation#26 = (byte) current_piece_orientation#27 +Alias (byte*) current_piece#41 = (byte*) current_piece#42 +Alias (byte) keyboard_events_size#75 = (byte) keyboard_events_size#76 +Alias (byte) keyboard_modifiers#58 = (byte) keyboard_modifiers#59 +Alias (byte) current_movedown_counter#41 = (byte) current_movedown_counter#42 +Alias (byte) current_ypos#48 = (byte) current_ypos#49 +Alias (byte) current_piece_orientation#16 = (byte) current_piece_orientation#9 +Alias (byte) main::render#10 = (byte) main::render#17 +Alias (byte) main::key_event#10 = (byte) main::key_event#4 +Alias (byte*) current_piece#35 = (byte*) current_piece#36 +Alias (byte) keyboard_events_size#69 = (byte) keyboard_events_size#70 +Alias (byte) keyboard_modifiers#53 = (byte) keyboard_modifiers#54 +Alias (byte) current_movedown_counter#39 = (byte) current_movedown_counter#40 +Alias (byte) current_ypos#45 = (byte) current_ypos#46 +Alias (byte) current_xpos#44 = (byte) current_xpos#45 +Alias (byte) current_piece_orientation#2 = (byte/word/dword~) main::$29 +Alias (byte) main::render#11 = (byte) main::render#14 (byte) main::render#18 +Alias (byte*) current_piece#25 = (byte*) current_piece#30 (byte*) current_piece#26 +Alias (byte) current_piece_orientation#10 = (byte) current_piece_orientation#35 (byte) current_piece_orientation#17 +Alias (byte) keyboard_events_size#52 = (byte) keyboard_events_size#61 (byte) keyboard_events_size#53 +Alias (byte) keyboard_modifiers#43 = (byte) keyboard_modifiers#49 (byte) keyboard_modifiers#44 +Alias (byte) current_movedown_counter#30 = (byte) current_movedown_counter#37 (byte) current_movedown_counter#31 +Alias (byte) current_ypos#37 = (byte) current_ypos#42 (byte) current_ypos#38 +Alias (byte) current_xpos#34 = (byte) current_xpos#41 (byte) current_xpos#35 +Alias (byte) current_piece_orientation#3 = (byte/word/dword~) main::$33 +Alias (byte*) current_piece#15 = (byte*) current_piece#17 (byte*) current_piece#22 (byte*) current_piece#20 (byte*) current_piece#19 +Alias (byte) current_piece_orientation#21 = (byte) current_piece_orientation#23 (byte) current_piece_orientation#32 (byte) current_piece_orientation#28 (byte) current_piece_orientation#25 +Alias (byte) keyboard_events_size#32 = (byte) keyboard_events_size#43 (byte) keyboard_events_size#54 (byte) keyboard_events_size#44 (byte) keyboard_events_size#34 +Alias (byte) keyboard_modifiers#29 = (byte) keyboard_modifiers#37 (byte) keyboard_modifiers#45 (byte) keyboard_modifiers#38 (byte) keyboard_modifiers#31 +Alias (byte) current_movedown_counter#16 = (byte) current_movedown_counter#24 (byte) current_movedown_counter#32 (byte) current_movedown_counter#25 (byte) current_movedown_counter#18 +Alias (byte) current_ypos#17 = (byte) current_ypos#27 (byte) current_ypos#28 (byte) current_ypos#22 (byte) current_ypos#19 +Alias (byte) current_xpos#15 = (byte) current_xpos#24 (byte) current_xpos#36 (byte) current_xpos#25 (byte) current_xpos#17 +Alias (byte*) current_piece#3 = (byte*) current_piece#43 (byte*) current_piece#37 +Alias (byte) current_piece_orientation#43 = (byte) current_piece_orientation#47 (byte) current_piece_orientation#5 Alias (byte*) init::li#0 = (byte*~) init::$3 +Alias (byte*) current_piece#27 = (byte*) current_piece#31 +Alias (byte) current_piece_orientation#36 = (byte) current_piece_orientation#39 Alias (byte*) init::line#0 = (byte*~) init::$6 Alias (byte*) init::line#2 = (byte*) init::line#3 Alias (byte) init::l#2 = (byte) init::l#3 +Alias (byte*) current_piece#13 = (byte*) current_piece#21 (byte*) current_piece#8 (byte*) current_piece#4 +Alias (byte) current_piece_orientation#12 = (byte) current_piece_orientation#19 (byte) current_piece_orientation#29 (byte) current_piece_orientation#6 Alias (byte) render_playfield::l#3 = (byte) render_playfield::l#4 Alias (byte) render_playfield::i#1 = (byte) render_playfield::i#4 +Alias (byte*) render_current::current_piece_gfx#0 = (byte*~) render_current::$0 +Alias (byte) current_xpos#13 = (byte) current_xpos#8 (byte) current_xpos#28 (byte) current_xpos#29 +Alias (byte) render_current::c#3 = (byte) render_current::c#4 (byte) render_current::c#5 (byte) render_current::c#6 +Alias (byte) render_current::current_cell#0 = (byte) render_current::current_cell#2 (byte) render_current::current_cell#1 +Alias (byte*) render_current::screen_line#1 = (byte*) render_current::screen_line#2 (byte*) render_current::screen_line#3 (byte*) render_current::screen_line#5 +Alias (byte*) render_current::current_piece_gfx#1 = (byte*) render_current::current_piece_gfx#7 (byte*) render_current::current_piece_gfx#5 (byte*) render_current::current_piece_gfx#6 +Alias (byte) render_current::i#1 = (byte) render_current::i#8 (byte) render_current::i#6 (byte) render_current::i#7 +Alias (byte) render_current::l#5 = (byte) render_current::l#8 (byte) render_current::l#6 (byte) render_current::l#7 +Alias (byte) current_ypos#29 = (byte) current_ypos#39 (byte) current_ypos#30 (byte) current_ypos#31 +Alias (byte) render_current::xpos#0 = (byte~) render_current::$5 (byte) render_current::xpos#1 +Alias (byte) render_current::l#3 = (byte) render_current::l#4 +Alias (byte) current_ypos#15 = (byte) current_ypos#23 +Alias (byte*) render_current::current_piece_gfx#3 = (byte*) render_current::current_piece_gfx#4 +Alias (byte) render_current::i#4 = (byte) render_current::i#5 +Alias (byte) current_xpos#20 = (byte) current_xpos#27 +Alias (byte) current_ypos#10 = (byte) current_ypos#3 (byte) current_ypos#4 +Alias (byte*) current_piece#0 = (byte*) current_piece#16 +Alias (byte) current_piece_orientation#0 = (byte) current_piece_orientation#22 +Alias (byte) current_movedown_counter#0 = (byte) current_movedown_counter#15 +Alias (byte) current_ypos#0 = (byte) current_ypos#16 +Alias (byte) current_xpos#0 = (byte) current_xpos#14 Alias (byte*) SCREEN#0 = (byte*) SCREEN#3 +Alias (byte*) current_piece#10 = (byte*) current_piece#5 +Alias (byte) current_piece_orientation#14 = (byte) current_piece_orientation#7 +Alias (byte) keyboard_events_size#20 = (byte) keyboard_events_size#9 +Alias (byte) keyboard_modifiers#17 = (byte) keyboard_modifiers#9 +Alias (byte) current_movedown_counter#4 = (byte) current_movedown_counter#9 +Alias (byte) current_ypos#11 = (byte) current_ypos#5 +Alias (byte) current_xpos#4 = (byte) current_xpos#9 +Successful SSA optimization Pass2AliasElimination +Alias (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#4 +Alias (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#3 +Alias (byte) keyboard_event_scan::row_scan#1 = (byte) keyboard_event_scan::row_scan#3 +Alias (byte) keyboard_event_scan::row#10 = (byte) keyboard_event_scan::row#6 +Alias (byte) keyboard_events_size#13 = (byte) keyboard_events_size#64 (byte) keyboard_events_size#56 (byte) keyboard_events_size#46 (byte) keyboard_events_size#23 +Alias (byte) current_movedown_counter#1 = (byte) current_movedown_counter#11 (byte) current_movedown_counter#38 (byte) current_movedown_counter#36 +Alias (byte) main::key_event#0 = (byte) main::key_event#14 (byte) main::key_event#11 (byte) main::key_event#13 (byte) main::key_event#1 (byte) main::key_event#3 (byte) main::key_event#10 (byte) main::key_event#5 +Alias (byte) main::render#0 = (byte) main::render#22 (byte) main::render#20 (byte) main::render#12 +Alias (byte) current_ypos#12 = (byte) current_ypos#33 (byte) current_ypos#43 (byte) current_ypos#25 +Alias (byte) current_xpos#10 = (byte) current_xpos#38 (byte) current_xpos#46 (byte) current_xpos#31 (byte) current_xpos#22 +Alias (byte*) current_piece#24 = (byte*) current_piece#38 (byte*) current_piece#48 (byte*) current_piece#32 (byte*) current_piece#28 (byte*) current_piece#41 (byte*) current_piece#35 (byte*) current_piece#25 +Alias (byte) current_piece_orientation#16 = (byte) current_piece_orientation#44 (byte) current_piece_orientation#50 (byte) current_piece_orientation#40 (byte) current_piece_orientation#37 (byte) current_piece_orientation#30 (byte) current_piece_orientation#26 +Alias (byte) keyboard_events_size#18 = (byte) keyboard_events_size#72 (byte) keyboard_events_size#66 (byte) keyboard_events_size#59 (byte) keyboard_events_size#51 (byte) keyboard_events_size#75 (byte) keyboard_events_size#69 (byte) keyboard_events_size#52 +Alias (byte) keyboard_modifiers#15 = (byte) keyboard_modifiers#55 (byte) keyboard_modifiers#50 (byte) keyboard_modifiers#47 (byte) keyboard_modifiers#42 (byte) keyboard_modifiers#58 (byte) keyboard_modifiers#53 (byte) keyboard_modifiers#43 +Alias (byte) current_movedown_counter#29 = (byte) current_movedown_counter#41 (byte) current_movedown_counter#39 (byte) current_movedown_counter#30 +Alias (byte) current_ypos#36 = (byte) current_ypos#48 (byte) current_ypos#45 (byte) current_ypos#37 +Alias (byte) current_xpos#34 = (byte) current_xpos#44 +Alias (byte) render_current::c#2 = (byte) render_current::c#3 +Alias (byte*) render_current::current_piece_gfx#1 = (byte*) render_current::current_piece_gfx#3 +Alias (byte) render_current::i#1 = (byte) render_current::i#4 +Alias (byte) render_current::l#3 = (byte) render_current::l#5 +Alias (byte) current_xpos#13 = (byte) current_xpos#20 +Alias (byte) current_ypos#15 = (byte) current_ypos#29 +Alias (byte*) render_current::screen_line#1 = (byte*) render_current::screen_line#4 +Successful SSA optimization Pass2AliasElimination +Alias (byte*) current_piece#15 = (byte*) current_piece#24 +Alias (byte) keyboard_events_size#18 = (byte) keyboard_events_size#32 +Alias (byte) keyboard_modifiers#15 = (byte) keyboard_modifiers#29 +Alias (byte) current_movedown_counter#16 = (byte) current_movedown_counter#29 +Alias (byte) current_ypos#17 = (byte) current_ypos#36 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (byte) fill::val#2 Self Phi Eliminated (byte*) fill::end#1 +Self Phi Eliminated (byte) keyboard_event_scan::row_scan#1 +Self Phi Eliminated (byte) keyboard_event_scan::row#10 +Self Phi Eliminated (byte) keyboard_events_size#41 +Self Phi Eliminated (byte) keyboard_modifiers#35 +Self Phi Eliminated (byte) current_movedown_counter#27 +Self Phi Eliminated (byte) current_ypos#54 +Self Phi Eliminated (byte) current_xpos#51 +Self Phi Eliminated (byte*) current_piece#53 +Self Phi Eliminated (byte) current_piece_orientation#55 +Self Phi Eliminated (byte) keyboard_events_size#26 +Self Phi Eliminated (byte) keyboard_modifiers#23 +Self Phi Eliminated (byte) current_movedown_counter#10 +Self Phi Eliminated (byte) current_ypos#12 +Self Phi Eliminated (byte) current_xpos#10 +Self Phi Eliminated (byte*) current_piece#15 +Self Phi Eliminated (byte) current_piece_orientation#16 +Self Phi Eliminated (byte*) current_piece#27 +Self Phi Eliminated (byte) current_piece_orientation#36 Self Phi Eliminated (byte*) init::line#2 Self Phi Eliminated (byte) init::l#2 +Self Phi Eliminated (byte*) current_piece#13 +Self Phi Eliminated (byte) current_piece_orientation#12 Self Phi Eliminated (byte*) render_playfield::line#1 Self Phi Eliminated (byte) render_playfield::l#3 +Self Phi Eliminated (byte*) render_current::current_piece_gfx#1 +Self Phi Eliminated (byte) current_xpos#13 +Self Phi Eliminated (byte) render_current::l#3 +Self Phi Eliminated (byte*) render_current::screen_line#1 +Self Phi Eliminated (byte) current_ypos#15 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte) fill::val#2 (byte) fill::val#3 Redundant Phi (byte*) fill::end#1 (byte*) fill::end#0 +Redundant Phi (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0 +Redundant Phi (byte) keyboard_events_size#55 (byte) keyboard_events_size#26 +Redundant Phi (byte) keyboard_event_scan::row_scan#1 (byte) keyboard_event_scan::row_scan#0 +Redundant Phi (byte) keyboard_event_scan::row#10 (byte) keyboard_event_scan::row#2 +Redundant Phi (byte) keyboard_events_size#14 (byte) keyboard_events_size#17 +Redundant Phi (byte*) current_piece#11 (byte*) current_piece#0 +Redundant Phi (byte) current_piece_orientation#15 (byte) current_piece_orientation#0 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0 +Redundant Phi (byte) current_ypos#18 (byte) current_ypos#0 +Redundant Phi (byte) keyboard_events_size#33 (byte) keyboard_events_size#0 +Redundant Phi (byte) keyboard_modifiers#30 (byte) keyboard_modifiers#0 +Redundant Phi (byte) current_movedown_counter#17 (byte) current_movedown_counter#0 +Redundant Phi (byte) current_xpos#16 (byte) current_xpos#0 +Redundant Phi (byte*) current_piece#1 (byte*) current_piece#13 +Redundant Phi (byte) current_piece_orientation#1 (byte) current_piece_orientation#12 +Redundant Phi (byte) keyboard_events_size#41 (byte) keyboard_events_size#19 +Redundant Phi (byte) keyboard_modifiers#35 (byte) keyboard_modifiers#16 +Redundant Phi (byte) current_movedown_counter#27 (byte) current_movedown_counter#14 +Redundant Phi (byte) current_ypos#54 (byte) current_ypos#13 +Redundant Phi (byte) current_xpos#51 (byte) current_xpos#12 +Redundant Phi (byte*) current_piece#53 (byte*) current_piece#12 +Redundant Phi (byte) current_piece_orientation#55 (byte) current_piece_orientation#11 +Redundant Phi (byte) keyboard_events_size#26 (byte) keyboard_events_size#41 +Redundant Phi (byte) keyboard_modifiers#23 (byte) keyboard_modifiers#35 +Redundant Phi (byte) current_movedown_counter#10 (byte) current_movedown_counter#27 +Redundant Phi (byte) current_ypos#12 (byte) current_ypos#54 +Redundant Phi (byte) current_xpos#10 (byte) current_xpos#51 +Redundant Phi (byte*) current_piece#15 (byte*) current_piece#53 +Redundant Phi (byte) current_piece_orientation#16 (byte) current_piece_orientation#55 +Redundant Phi (byte) keyboard_events_size#17 (byte) keyboard_events_size#13 +Redundant Phi (byte) keyboard_modifiers#15 (byte) keyboard_modifiers#14 +Redundant Phi (byte) keyboard_events_size#18 (byte) keyboard_events_size#16 +Redundant Phi (byte) current_ypos#1 (byte) current_ypos#10 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 +Redundant Phi (byte*) current_piece#27 (byte*) current_piece#3 +Redundant Phi (byte) current_piece_orientation#36 (byte) current_piece_orientation#43 Redundant Phi (byte*) init::line#2 (byte*) init::line#4 Redundant Phi (byte) init::l#2 (byte) init::l#4 +Redundant Phi (byte*) current_piece#13 (byte*) current_piece#23 +Redundant Phi (byte) current_piece_orientation#12 (byte) current_piece_orientation#33 Redundant Phi (byte*) render_playfield::line#1 (byte*) render_playfield::line#0 Redundant Phi (byte) render_playfield::l#3 (byte) render_playfield::l#2 +Redundant Phi (byte*) render_current::current_piece_gfx#1 (byte*) render_current::current_piece_gfx#2 +Redundant Phi (byte) current_xpos#13 (byte) current_xpos#19 +Redundant Phi (byte) render_current::l#3 (byte) render_current::l#2 +Redundant Phi (byte*) render_current::screen_line#1 (byte*) render_current::screen_line#0 +Redundant Phi (byte) current_ypos#15 (byte) current_ypos#8 +Redundant Phi (byte) current_ypos#9 (byte) current_ypos#12 +Redundant Phi (byte*) current_piece#10 (byte*) current_piece#12 +Redundant Phi (byte) current_piece_orientation#14 (byte) current_piece_orientation#11 +Redundant Phi (byte) keyboard_events_size#20 (byte) keyboard_events_size#19 +Redundant Phi (byte) keyboard_modifiers#17 (byte) keyboard_modifiers#16 +Redundant Phi (byte) current_movedown_counter#4 (byte) current_movedown_counter#14 +Redundant Phi (byte) current_ypos#11 (byte) current_ypos#13 +Redundant Phi (byte) current_xpos#4 (byte) current_xpos#12 +Successful SSA optimization Pass2RedundantPhiElimination +Redundant Phi (byte) keyboard_event_scan::row#4 (byte) keyboard_event_scan::row#2 Successful SSA optimization Pass2RedundantPhiElimination Simple Condition (bool~) fill::$1 if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 +Simple Condition (bool~) keyboard_event_scan::$1 if((byte) keyboard_event_scan::row_scan#0!=*((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@2 +Simple Condition (bool~) keyboard_event_scan::$13 if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@1 +Simple Condition (bool~) keyboard_event_scan::$6 if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 +Simple Condition (bool~) keyboard_event_scan::$12 if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@4 +Simple Condition (bool~) keyboard_event_scan::$8 if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@6 +Simple Condition (bool~) keyboard_event_scan::$10 if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 +Simple Condition (bool~) keyboard_event_scan::$16 if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 +Simple Condition (bool~) keyboard_event_scan::$20 if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 +Simple Condition (bool~) keyboard_event_scan::$24 if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 +Simple Condition (bool~) keyboard_event_scan::$28 if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_get::$0 if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@1 +Simple Condition (bool~) main::$3 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 +Simple Condition (bool~) main::$4 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@8 +Simple Condition (bool~) main::$8 if((byte) main::key_event#0!=(byte) KEY_SPACE#0) goto main::@10 +Simple Condition (bool~) main::$11 if((byte~) main::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 +Simple Condition (bool~) main::$15 if((byte) current_movedown_counter#1<(byte) current_movedown_rate#0) goto main::@13 +Simple Condition (bool~) main::$13 if((byte) current_movedown_counter#1<(byte) current_movedown_rate_fast#0) goto main::@12 +Simple Condition (bool~) main::$17 if((byte) main::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@14 +Simple Condition (bool~) main::$21 if((byte~) main::$19!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@15 +Simple Condition (bool~) main::$35 if((byte) main::render#7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@20 +Simple Condition (bool~) main::$23 if((byte) main::key_event#0!=(byte) KEY_COMMA#0) goto main::@16 +Simple Condition (bool~) main::$25 if((byte) main::key_event#0!=(byte) KEY_DOT#0) goto main::@17 +Simple Condition (bool~) main::$27 if((byte) main::key_event#0!=(byte) KEY_Z#0) goto main::@18 +Simple Condition (bool~) main::$31 if((byte) main::key_event#0!=(byte) KEY_X#0) goto main::@19 Simple Condition (bool~) init::$5 if((byte) init::i#1!=rangelast(0,19)) goto init::@1 Simple Condition (bool~) init::$8 if((byte) init::c#1!=rangelast(0,11)) goto init::@3 Simple Condition (bool~) init::$9 if((byte) init::l#1!=rangelast(0,21)) goto init::@2 Simple Condition (bool~) render_playfield::$2 if((byte) render_playfield::c#1!=rangelast(0,9)) goto render_playfield::@2 Simple Condition (bool~) render_playfield::$3 if((byte) render_playfield::l#1!=rangelast(0,19)) goto render_playfield::@1 +Simple Condition (bool~) render_current::$4 if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@3 +Simple Condition (bool~) render_current::$8 if((byte) render_current::c#1!=rangelast(0,3)) goto render_current::@2 +Simple Condition (bool~) render_current::$7 if((byte) render_current::xpos#0>=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_current::@4 +Simple Condition (bool~) render_current::$9 if((byte) render_current::l#1!=rangelast(0,3)) goto render_current::@1 Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) RASTER#0 = ((byte*))53266 Constant (const byte*) BORDERCOL#0 = ((byte*))53280 Constant (const byte*) COLS#0 = ((byte*))55296 +Constant (const byte*) CIA1_PORT_A#0 = ((byte*))56320 +Constant (const byte*) CIA1_PORT_B#0 = ((byte*))56321 Constant (const byte) BLACK#0 = 0 -Constant (const byte) GREEN#0 = 5 Constant (const byte) DARK_GREY#0 = 11 +Constant (const byte) KEY_Z#0 = 12 +Constant (const byte) KEY_LSHIFT#0 = 15 +Constant (const byte) KEY_X#0 = 23 +Constant (const byte) KEY_DOT#0 = 44 +Constant (const byte) KEY_COMMA#0 = 47 +Constant (const byte) KEY_RSHIFT#0 = 52 +Constant (const byte) KEY_CTRL#0 = 58 +Constant (const byte) KEY_SPACE#0 = 60 +Constant (const byte) KEY_COMMODORE#0 = 61 +Constant (const byte[8]) keyboard_matrix_row_bitmask#0 = { 254, 253, 251, 247, 239, 223, 191, 127 } +Constant (const byte[8]) keyboard_matrix_col_bitmask#0 = { 1, 2, 4, 8, 16, 32, 64, 128 } +Constant (const byte[8]) keyboard_events#0 = { fill( 8, 0) } +Constant (const byte) keyboard_events_size#0 = 0 +Constant (const byte) keyboard_modifiers#0 = 0 +Constant (const byte) KEY_MODIFIER_LSHIFT#0 = 1 +Constant (const byte) KEY_MODIFIER_RSHIFT#0 = 2 +Constant (const byte) KEY_MODIFIER_CTRL#0 = 4 +Constant (const byte) KEY_MODIFIER_COMMODORE#0 = 8 +Constant (const byte[8]) keyboard_scan_values#0 = { fill( 8, 0) } +Constant (const byte) keyboard_event_scan::keycode#0 = 0 +Constant (const byte) keyboard_event_scan::row#0 = 0 +Constant (const byte) keyboard_event_scan::col#0 = 0 +Constant (const byte) keyboard_modifiers#1 = 0 +Constant (const byte) keyboard_event_get::return#0 = 255 Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte*[20]) screen_lines#0 = { fill( 20, 0) } -Constant (const byte/word/signed word/dword/signed dword) $0 = 20*10 -Constant (const byte/signed byte/word/signed word/dword/signed dword) $1 = 4*4 +Constant (const byte/word/signed word/dword/signed dword) $1 = 20*10 +Constant (const byte*) current_piece#0 = ((byte*))0 +Constant (const byte) current_piece_orientation#0 = 0 +Constant (const byte) current_xpos#0 = 3 +Constant (const byte) current_ypos#0 = 0 +Constant (const byte) current_movedown_rate#0 = 50 +Constant (const byte) current_movedown_rate_fast#0 = 5 +Constant (const byte) current_movedown_counter#0 = 0 +Constant (const byte) main::render#0 = 0 +Constant (const byte) main::movedown#0 = 0 +Constant (const byte) current_movedown_counter#2 = 0 +Constant (const byte) current_piece_orientation#43 = 0 Constant (const word) fill::size#0 = 1000 Constant (const byte) fill::val#0 = 160 Constant (const word) fill::size#1 = 1000 @@ -354,26 +2492,49 @@ Constant (const byte) init::c#0 = 0 Constant (const byte) render_playfield::i#0 = 0 Constant (const byte) render_playfield::l#0 = 0 Constant (const byte) render_playfield::c#0 = 0 +Constant (const byte) render_current::i#0 = 0 +Constant (const byte) render_current::l#0 = 0 +Constant (const byte) render_current::c#0 = 0 +Constant (const byte/signed byte/word/signed word/dword/signed dword) $2 = 4*4 +Constant (const byte[$3]) piece_t#0 = { 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 } Successful SSA optimization Pass2ConstantIdentification -Constant (const byte[$0]) playfield#0 = { fill( $0, 0) } -Constant (const byte[$1]) current_piece#0 = { fill( $1, 0) } +Constant (const byte) keyboard_event_pressed::keycode#0 = KEY_LSHIFT#0 +Constant (const byte) keyboard_event_pressed::keycode#1 = KEY_RSHIFT#0 +Constant (const byte) keyboard_modifiers#2 = keyboard_modifiers#1|KEY_MODIFIER_LSHIFT#0 +Constant (const byte) keyboard_event_pressed::keycode#2 = KEY_CTRL#0 +Constant (const byte) keyboard_event_pressed::keycode#3 = KEY_COMMODORE#0 +Constant (const byte[$1]) playfield#0 = { fill( $1, 0) } +Constant (const byte) keyboard_event_pressed::keycode#4 = KEY_SPACE#0 +Constant (const byte) main::movedown#1 = ++main::movedown#0 +Constant (const byte) main::render#1 = ++main::render#0 +Constant (const byte*) current_piece#3 = piece_t#0 Constant (const byte*) fill::start#0 = SCREEN#0 Constant (const byte*) fill::start#1 = COLS#0 Constant (const byte) fill::val#1 = BLACK#0 Constant (const byte*) init::$2 = COLS#0+40 Constant (const byte*) init::line#0 = COLS#0+14 +Constant (const byte/signed word/word/dword/signed dword/signed byte) $3 = $2*4 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) init::li#0 = init::$2+15 Successful SSA optimization Pass2ConstantIdentification -Consolidated array index constant in *(current_piece#0+0) -Consolidated array index constant in *(current_piece#0+1) -Consolidated array index constant in *(current_piece#0+2) -Consolidated array index constant in *(current_piece#0+4) -Successful SSA optimization Pass2ConstantAdditionElimination if() condition always true - replacing block destination if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars +Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks +Resolved ranged next value keyboard_event_scan::row#1 ← ++ keyboard_event_scan::row#2 to ++ +Resolved ranged comparison value if(keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@1 to (byte/signed byte/word/signed word/dword/signed dword) 8 +Resolved ranged next value keyboard_event_scan::col#1 ← ++ keyboard_event_scan::col#2 to ++ +Resolved ranged comparison value if(keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@4 to (byte/signed byte/word/signed word/dword/signed dword) 8 Resolved ranged next value init::i#1 ← ++ init::i#2 to ++ Resolved ranged comparison value if(init::i#1!=rangelast(0,19)) goto init::@1 to (byte/signed byte/word/signed word/dword/signed dword) 20 Resolved ranged next value init::c#1 ← ++ init::c#2 to ++ @@ -384,15 +2545,64 @@ Resolved ranged next value render_playfield::c#1 ← ++ render_playfield::c#2 to Resolved ranged comparison value if(render_playfield::c#1!=rangelast(0,9)) goto render_playfield::@2 to (byte/signed byte/word/signed word/dword/signed dword) 10 Resolved ranged next value render_playfield::l#1 ← ++ render_playfield::l#2 to ++ Resolved ranged comparison value if(render_playfield::l#1!=rangelast(0,19)) goto render_playfield::@1 to (byte/signed byte/word/signed word/dword/signed dword) 20 +Resolved ranged next value render_current::c#1 ← ++ render_current::c#2 to ++ +Resolved ranged comparison value if(render_current::c#1!=rangelast(0,3)) goto render_current::@2 to (byte/signed byte/word/signed word/dword/signed dword) 4 +Resolved ranged next value render_current::l#1 ← ++ render_current::l#2 to ++ +Resolved ranged comparison value if(render_current::l#1!=rangelast(0,3)) goto render_current::@1 to (byte/signed byte/word/signed word/dword/signed dword) 4 Culled Empty Block (label) @4 -Culled Empty Block (label) main::@1 +Culled Empty Block (label) @8 +Culled Empty Block (label) keyboard_event_scan::@2 +Culled Empty Block (label) keyboard_event_scan::@6 +Culled Empty Block (label) keyboard_event_scan::@12 +Culled Empty Block (label) keyboard_event_get::@1 +Culled Empty Block (label) @11 +Culled Empty Block (label) main::@43 +Culled Empty Block (label) main::@2 +Culled Empty Block (label) main::@5 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@12 +Culled Empty Block (label) main::@47 +Culled Empty Block (label) main::@19 +Culled Empty Block (label) main::@20 Culled Empty Block (label) init::@8 Culled Empty Block (label) init::@4 +Culled Empty Block (label) render_current::@4 +Culled Empty Block (label) @17 Successful SSA optimization Pass2CullEmptyBlocks +Self Phi Eliminated (byte*) current_piece#12 +Self Phi Eliminated (byte*) current_piece#12 +Self Phi Eliminated (byte*) current_piece#23 +Self Phi Eliminated (byte) current_piece_orientation#33 +Self Phi Eliminated (byte) current_ypos#8 +Self Phi Eliminated (byte*) render_current::current_piece_gfx#2 +Self Phi Eliminated (byte) current_xpos#19 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) current_piece#12 (byte*) current_piece#23 +Redundant Phi (byte*) current_piece#23 (const byte*) current_piece#3 +Redundant Phi (byte) current_piece_orientation#33 (const byte) current_piece_orientation#43 +Redundant Phi (byte) current_ypos#8 (byte) current_ypos#14 +Redundant Phi (byte*) render_current::current_piece_gfx#2 (byte*) render_current::current_piece_gfx#0 +Redundant Phi (byte) current_xpos#19 (byte) current_xpos#26 +Successful SSA optimization Pass2RedundantPhiElimination +Redundant Phi (byte*) current_piece#9 (const byte*) current_piece#3 +Successful SSA optimization Pass2RedundantPhiElimination Inlining constant with var siblings (const word) fill::size#0 Inlining constant with var siblings (const byte) fill::val#0 Inlining constant with var siblings (const word) fill::size#1 Inlining constant with var siblings (const byte) fill::val#1 +Inlining constant with var siblings (const byte) keyboard_event_scan::keycode#0 +Inlining constant with var siblings (const byte) keyboard_event_scan::row#0 +Inlining constant with var siblings (const byte) keyboard_event_scan::col#0 +Inlining constant with var siblings (const byte) keyboard_event_pressed::keycode#0 +Inlining constant with var siblings (const byte) keyboard_event_pressed::keycode#1 +Inlining constant with var siblings (const byte) keyboard_event_pressed::keycode#2 +Inlining constant with var siblings (const byte) keyboard_event_pressed::keycode#3 +Inlining constant with var siblings (const byte) keyboard_event_pressed::keycode#4 +Inlining constant with var siblings (const byte) keyboard_event_get::return#0 +Inlining constant with var siblings (const byte) main::render#0 +Inlining constant with var siblings (const byte) main::movedown#0 +Inlining constant with var siblings (const byte) main::movedown#1 +Inlining constant with var siblings (const byte) main::render#1 Inlining constant with var siblings (const byte) init::i#0 Inlining constant with var siblings (const byte) init::l#0 Inlining constant with var siblings (const byte) init::c#0 @@ -401,196 +2611,699 @@ Inlining constant with var siblings (const byte*) init::li#0 Inlining constant with var siblings (const byte) render_playfield::i#0 Inlining constant with var siblings (const byte) render_playfield::l#0 Inlining constant with var siblings (const byte) render_playfield::c#0 +Inlining constant with var siblings (const byte) render_current::i#0 +Inlining constant with var siblings (const byte) render_current::l#0 +Inlining constant with var siblings (const byte) render_current::c#0 +Inlining constant with var siblings (const byte) keyboard_events_size#0 +Inlining constant with var siblings (const byte) current_xpos#0 +Inlining constant with var siblings (const byte) current_ypos#0 +Inlining constant with var siblings (const byte) current_movedown_counter#0 +Inlining constant with var siblings (const byte) current_movedown_counter#2 +Inlining constant with var siblings (const byte) current_piece_orientation#43 Constant inlined fill::val#0 = (byte/word/signed word/dword/signed dword) 160 Constant inlined init::c#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined render_current::c#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::movedown#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined keyboard_event_scan::col#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined render_current::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 Constant inlined init::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 Constant inlined init::line#0 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 Constant inlined fill::val#1 = (const byte) BLACK#0 -Constant inlined init::li#0 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 -Constant inlined fill::size#1 = (word/signed word/dword/signed dword) 1000 +Constant inlined keyboard_event_scan::row#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::movedown#1 = ++(byte/signed byte/word/signed word/dword/signed dword) 0 Constant inlined init::l#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 -Constant inlined fill::size#0 = (word/signed word/dword/signed dword) 1000 -Constant inlined $0 = (byte/signed byte/word/signed word/dword/signed dword) 20*(byte/signed byte/word/signed word/dword/signed dword) 10 -Constant inlined init::$2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40 -Constant inlined $1 = (byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) 4 +Constant inlined render_current::l#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined current_movedown_counter#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined current_movedown_counter#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined $1 = (byte/signed byte/word/signed word/dword/signed dword) 20*(byte/signed byte/word/signed word/dword/signed dword) 10 +Constant inlined $2 = (byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) 4 +Constant inlined $3 = (byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) 4*(byte/signed byte/word/signed word/dword/signed dword) 4 Constant inlined fill::start#1 = (const byte*) COLS#0 Constant inlined fill::start#0 = (const byte*) SCREEN#0 Constant inlined render_playfield::c#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 Constant inlined render_playfield::l#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined current_xpos#0 = (byte/signed byte/word/signed word/dword/signed dword) 3 Constant inlined render_playfield::i#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined current_piece_orientation#43 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined current_ypos#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined keyboard_event_pressed::keycode#4 = (const byte) KEY_SPACE#0 +Constant inlined main::render#1 = ++(byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::render#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined init::li#0 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 +Constant inlined fill::size#1 = (word/signed word/dword/signed dword) 1000 +Constant inlined fill::size#0 = (word/signed word/dword/signed dword) 1000 +Constant inlined keyboard_event_scan::keycode#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined keyboard_event_pressed::keycode#3 = (const byte) KEY_COMMODORE#0 +Constant inlined init::$2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40 +Constant inlined keyboard_event_pressed::keycode#2 = (const byte) KEY_CTRL#0 +Constant inlined keyboard_event_pressed::keycode#1 = (const byte) KEY_RSHIFT#0 +Constant inlined keyboard_event_pressed::keycode#0 = (const byte) KEY_LSHIFT#0 +Constant inlined current_piece#3 = (const byte[4*4*4]) piece_t#0 +Constant inlined keyboard_event_get::return#0 = (byte/word/signed word/dword/signed dword) 255 +Constant inlined keyboard_events_size#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2ConstantInlining Identical Phi Values (word) fill::size#2 (word/signed word/dword/signed dword) 1000 Successful SSA optimization Pass2IdenticalPhiElimination -Simplifying constant plus zero current_piece#0+0 +Simplifying constant integer increment ++0 +Simplifying constant integer increment ++0 +Successful SSA optimization Pass2ConstantSimplification +Added new block during phi lifting main::@50(between main::@15 and main::@1) +Added new block during phi lifting main::@51(between main::@30 and main::@11) +Added new block during phi lifting main::@52(between main::@46 and main::@11) +Added new block during phi lifting main::@53(between main::@11 and main::@13) +Added new block during phi lifting main::@54(between main::@13 and main::@14) +Fixing phi predecessor for main::render#13 to new block ( main::@13 -> main::@54 ) during phi lifting. +Added new block during phi lifting main::@55(between main::@34 and main::@16) +Added new block during phi lifting main::@56(between main::@16 and main::@17) +Added new block during phi lifting main::@57(between main::@17 and main::@18) +Added new block during phi lifting main::@58(between main::@14 and main::@15) +Added new block during phi lifting main::@59(between main::@18 and main::@15) +Added new block during phi lifting render_current::@9(between render_current::@7 and render_current::@1) +Added new block during phi lifting render_current::@10(between render_current::@3 and render_current::@2) Added new block during phi lifting render_playfield::@5(between render_playfield::@3 and render_playfield::@1) Added new block during phi lifting render_playfield::@6(between render_playfield::@2 and render_playfield::@2) +Added new block during phi lifting keyboard_event_get::@7(between keyboard_event_get and keyboard_event_get::@return) +Fixing phi predecessor for keyboard_event_get::return#2 to new block ( keyboard_event_get -> keyboard_event_get::@7 ) during phi lifting. +Added new block during phi lifting keyboard_event_scan::@30(between keyboard_event_scan::@3 and keyboard_event_scan::@1) +Added new block during phi lifting keyboard_event_scan::@31(between keyboard_event_scan::@5 and keyboard_event_scan::@4) +Added new block during phi lifting keyboard_event_scan::@32(between keyboard_event_scan::@25 and keyboard_event_scan::@4) +Fixing phi predecessor for keyboard_event_scan::col#2 to new block ( keyboard_event_scan::@25 -> keyboard_event_scan::@32 ) during phi lifting. +Added new block during phi lifting keyboard_event_scan::@33(between keyboard_event_scan::@4 and keyboard_event_scan::@5) +Added new block during phi lifting keyboard_event_scan::@34(between keyboard_event_scan::@15 and keyboard_event_scan::@5) Added new block during phi lifting init::@9(between init::@1 and init::@1) Added new block during phi lifting init::@10(between init::@5 and init::@2) Added new block during phi lifting init::@11(between init::@3 and init::@3) Added new block during phi lifting fill::@3(between fill::@1 and fill::@1) Adding NOP phi() at start of @begin -Adding NOP phi() at start of @8 +Adding NOP phi() at start of @16 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@7 -Adding NOP phi() at start of main::@8 -Adding NOP phi() at start of render_current_piece +Adding NOP phi() at start of main::@41 +Adding NOP phi() at start of main::@42 +Adding NOP phi() at start of main::@9 +Adding NOP phi() at start of main::@44 +Adding NOP phi() at start of main::@29 +Adding NOP phi() at start of main::@33 Adding NOP phi() at start of render_playfield +Adding NOP phi() at start of keyboard_event_scan::@20 +Adding NOP phi() at start of keyboard_event_scan::@21 +Adding NOP phi() at start of keyboard_event_scan::@9 +Adding NOP phi() at start of keyboard_event_scan::@22 +Adding NOP phi() at start of keyboard_event_scan::@10 +Adding NOP phi() at start of keyboard_event_scan::@23 +Adding NOP phi() at start of keyboard_event_scan::@11 +Adding NOP phi() at start of keyboard_event_scan::@24 +Adding NOP phi() at start of init Adding NOP phi() at start of init::@7 CALL GRAPH Calls in [] to main:2 -Calls in [main] to init:5 render_playfield:7 render_current_piece:9 -Calls in [init] to fill:35 fill:37 +Calls in [main] to init:5 render_playfield:7 render_current:9 keyboard_event_scan:14 keyboard_event_get:16 keyboard_event_pressed:23 current_movedown:37 render_playfield:71 render_current:75 +Calls in [keyboard_event_scan] to keyboard_matrix_read:164 keyboard_event_pressed:175 keyboard_event_pressed:181 keyboard_event_pressed:187 keyboard_event_pressed:193 +Calls in [init] to fill:234 fill:236 -Created 12 initial phi equivalence classes -Coalesced [17] render_playfield::i#6 ← render_playfield::i#3 -Coalesced [27] render_playfield::l#5 ← render_playfield::l#1 -Coalesced [28] render_playfield::i#5 ← render_playfield::i#1 -Coalesced [29] render_playfield::c#3 ← render_playfield::c#1 -Coalesced (already) [30] render_playfield::i#7 ← render_playfield::i#1 -Coalesced [54] init::line#5 ← init::line#1 -Coalesced [55] init::l#5 ← init::l#1 -Coalesced [56] init::c#3 ← init::c#1 -Coalesced [57] init::i#3 ← init::i#1 -Coalesced [58] init::li#3 ← init::li#1 -Coalesced [61] fill::addr#3 ← fill::addr#0 -Coalesced [67] fill::addr#4 ← fill::addr#1 -Coalesced down to 10 phi equivalence classes +Created 51 initial phi equivalence classes +Coalesced [29] main::movedown#14 ← main::movedown#2 +Coalesced [33] main::movedown#17 ← main::movedown#3 +Coalesced [38] current_ypos#61 ← current_ypos#10 +Coalesced [45] current_xpos#58 ← current_xpos#1 +Coalesced [46] main::render#30 ← main::render#2 +Coalesced [51] main::render#32 ← main::render#3 +Coalesced [52] current_xpos#60 ← current_xpos#2 +Coalesced [58] current_piece_orientation#62 ← current_piece_orientation#2 +Coalesced [59] main::render#34 ← main::render#4 +Coalesced [65] main::render#37 ← main::render#5 +Coalesced [66] current_piece_orientation#65 ← current_piece_orientation#3 +Coalesced [67] current_xpos#63 ← current_xpos#34 +Not coalescing [72] current_piece_orientation#66 ← current_piece_orientation#21 +Not coalescing [73] current_ypos#62 ← current_ypos#17 +Not coalescing [74] current_xpos#64 ← current_xpos#15 +Coalesced [77] current_piece_orientation#60 ← current_piece_orientation#21 +Coalesced [78] keyboard_events_size#86 ← keyboard_events_size#16 +Coalesced [79] current_movedown_counter#46 ← current_movedown_counter#16 +Coalesced [80] current_ypos#59 ← current_ypos#17 +Coalesced [81] current_xpos#56 ← current_xpos#15 +Coalesced (already) [82] current_piece_orientation#59 ← current_piece_orientation#21 +Coalesced (already) [83] keyboard_events_size#85 ← keyboard_events_size#16 +Coalesced (already) [84] current_movedown_counter#45 ← current_movedown_counter#16 +Coalesced (already) [85] current_ypos#58 ← current_ypos#17 +Coalesced (already) [86] current_xpos#55 ← current_xpos#15 +Coalesced [87] main::render#36 ← main::render#11 +Coalesced [88] current_piece_orientation#64 ← current_piece_orientation#10 +Coalesced (already) [89] current_xpos#62 ← current_xpos#34 +Coalesced (already) [90] current_piece_orientation#61 ← current_piece_orientation#11 +Coalesced [91] main::render#33 ← main::render#10 +Coalesced [92] main::render#31 ← main::render#16 +Coalesced [93] current_xpos#59 ← current_xpos#11 +Coalesced (already) [94] current_xpos#57 ← current_xpos#12 +Coalesced [95] main::render#29 ← main::render#13 +Coalesced (already) [96] main::render#35 ← main::render#13 +Coalesced (already) [97] current_piece_orientation#63 ← current_piece_orientation#11 +Coalesced (already) [98] current_xpos#61 ← current_xpos#12 +Coalesced [99] current_movedown_counter#47 ← current_movedown_counter#1 +Coalesced (already) [100] current_ypos#60 ← current_ypos#13 +Coalesced [101] main::movedown#16 ← main::movedown#7 +Coalesced [102] main::movedown#13 ← main::movedown#10 +Coalesced (already) [103] main::movedown#15 ← main::movedown#10 +Coalesced [110] render_current::i#10 ← render_current::i#3 +Coalesced [123] render_current::l#9 ← render_current::l#1 +Coalesced [124] render_current::i#9 ← render_current::i#1 +Coalesced (already) [125] render_current::i#11 ← render_current::i#1 +Coalesced [126] render_current::c#7 ← render_current::c#1 +Coalesced [131] render_playfield::i#6 ← render_playfield::i#3 +Coalesced [141] render_playfield::l#5 ← render_playfield::l#1 +Coalesced [142] render_playfield::i#5 ← render_playfield::i#1 +Coalesced [143] render_playfield::c#3 ← render_playfield::c#1 +Coalesced (already) [144] render_playfield::i#7 ← render_playfield::i#1 +Coalesced [156] keyboard_event_get::return#6 ← keyboard_event_get::return#1 +Coalesced [157] keyboard_events_size#88 ← keyboard_events_size#4 +Coalesced [160] keyboard_events_size#87 ← keyboard_events_size#13 +Coalesced [161] keyboard_events_size#89 ← keyboard_events_size#19 +Coalesced [169] keyboard_event_scan::keycode#17 ← keyboard_event_scan::keycode#1 +Coalesced (already) [170] keyboard_events_size#91 ← keyboard_events_size#29 +Coalesced [199] keyboard_event_scan::row#15 ← keyboard_event_scan::row#1 +Coalesced [200] keyboard_event_scan::keycode#16 ← keyboard_event_scan::keycode#14 +Coalesced (already) [201] keyboard_events_size#90 ← keyboard_events_size#13 +Coalesced [202] keyboard_event_scan::keycode#19 ← keyboard_event_scan::keycode#11 +Coalesced [203] keyboard_events_size#93 ← keyboard_events_size#29 +Coalesced [213] keyboard_events_size#95 ← keyboard_events_size#2 +Coalesced [219] keyboard_event_scan::keycode#18 ← keyboard_event_scan::keycode#15 +Coalesced [220] keyboard_events_size#92 ← keyboard_events_size#30 +Coalesced [221] keyboard_event_scan::col#9 ← keyboard_event_scan::col#1 +Coalesced (already) [222] keyboard_event_scan::keycode#20 ← keyboard_event_scan::keycode#15 +Coalesced (already) [223] keyboard_events_size#94 ← keyboard_events_size#30 +Coalesced [227] keyboard_events_size#98 ← keyboard_events_size#1 +Coalesced (already) [228] keyboard_events_size#97 ← keyboard_events_size#10 +Coalesced (already) [229] keyboard_events_size#96 ← keyboard_events_size#10 +Coalesced [253] init::line#5 ← init::line#1 +Coalesced [254] init::l#5 ← init::l#1 +Coalesced [255] init::c#3 ← init::c#1 +Coalesced [256] init::i#3 ← init::i#1 +Coalesced [257] init::li#3 ← init::li#1 +Coalesced [260] fill::addr#3 ← fill::addr#0 +Coalesced [266] fill::addr#4 ← fill::addr#1 +Coalesced down to 28 phi equivalence classes +Culled Empty Block (label) main::@50 +Culled Empty Block (label) main::@59 +Culled Empty Block (label) main::@57 +Culled Empty Block (label) main::@56 +Culled Empty Block (label) main::@55 +Culled Empty Block (label) main::@58 +Culled Empty Block (label) main::@54 +Culled Empty Block (label) main::@53 +Culled Empty Block (label) main::@51 +Culled Empty Block (label) main::@52 +Culled Empty Block (label) render_current::@9 +Culled Empty Block (label) render_current::@10 Culled Empty Block (label) render_playfield::@5 Culled Empty Block (label) render_playfield::@6 +Culled Empty Block (label) keyboard_event_get::@7 +Culled Empty Block (label) keyboard_event_scan::@30 +Culled Empty Block (label) keyboard_event_scan::@32 +Culled Empty Block (label) keyboard_event_scan::@31 +Culled Empty Block (label) keyboard_event_scan::@34 +Culled Empty Block (label) keyboard_event_scan::@33 Culled Empty Block (label) init::@10 Culled Empty Block (label) init::@11 Culled Empty Block (label) init::@9 Culled Empty Block (label) fill::@3 Adding NOP phi() at start of @begin -Adding NOP phi() at start of @8 +Adding NOP phi() at start of @16 Adding NOP phi() at start of @end Adding NOP phi() at start of main -Adding NOP phi() at start of main::@7 -Adding NOP phi() at start of main::@8 -Adding NOP phi() at start of render_current_piece +Adding NOP phi() at start of main::@41 +Adding NOP phi() at start of main::@42 +Adding NOP phi() at start of main::@9 +Adding NOP phi() at start of main::@44 +Adding NOP phi() at start of main::@29 +Adding NOP phi() at start of main::@33 Adding NOP phi() at start of render_playfield +Adding NOP phi() at start of keyboard_event_scan +Adding NOP phi() at start of keyboard_event_scan::@20 +Adding NOP phi() at start of keyboard_event_scan::@21 +Adding NOP phi() at start of keyboard_event_scan::@9 +Adding NOP phi() at start of keyboard_event_scan::@22 +Adding NOP phi() at start of keyboard_event_scan::@10 +Adding NOP phi() at start of keyboard_event_scan::@23 +Adding NOP phi() at start of keyboard_event_scan::@11 +Adding NOP phi() at start of keyboard_event_scan::@24 +Adding NOP phi() at start of init Adding NOP phi() at start of init::@7 FINAL CONTROL FLOW GRAPH @begin: scope:[] from [0] phi() - to:@8 -@8: scope:[] from @begin + to:@16 +@16: scope:[] from @begin [1] phi() [2] call main to:@end -@end: scope:[] from @8 +@end: scope:[] from @16 [3] phi() -main: scope:[main] from @8 +main: scope:[main] from @16 [4] phi() [5] call init - to:main::@7 -main::@7: scope:[main] from main + to:main::@41 +main::@41: scope:[main] from main [6] phi() [7] call render_playfield - to:main::@8 -main::@8: scope:[main] from main::@7 + to:main::@42 +main::@42: scope:[main] from main::@41 [8] phi() - [9] call render_current_piece - to:main::@2 -main::@2: scope:[main] from main::@2 main::@8 - [10] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) - to:main::@2 -render_current_piece: scope:[render_current_piece] from main::@8 - [11] phi() - to:render_current_piece::@return -render_current_piece::@return: scope:[render_current_piece] from render_current_piece - [12] return - to:@return -render_playfield: scope:[render_playfield] from main::@7 + [9] call render_current + to:main::@1 +main::@1: scope:[main] from main::@15 main::@42 main::@49 + [10] (byte) current_xpos#12 ← phi( main::@15/(byte) current_xpos#15 main::@42/(byte/signed byte/word/signed word/dword/signed dword) 3 main::@49/(byte) current_xpos#15 ) + [10] (byte) current_ypos#13 ← phi( main::@15/(byte) current_ypos#17 main::@42/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@49/(byte) current_ypos#17 ) + [10] (byte) current_movedown_counter#14 ← phi( main::@15/(byte) current_movedown_counter#16 main::@42/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@49/(byte) current_movedown_counter#16 ) + [10] (byte) keyboard_events_size#19 ← phi( main::@15/(byte) keyboard_events_size#16 main::@42/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@49/(byte) keyboard_events_size#16 ) + [10] (byte) current_piece_orientation#11 ← phi( main::@15/(byte) current_piece_orientation#21 main::@42/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@49/(byte) current_piece_orientation#21 ) + to:main::@4 +main::@4: scope:[main] from main::@1 main::@4 + [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 + to:main::@7 +main::@7: scope:[main] from main::@4 main::@7 + [12] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@7 + to:main::@9 +main::@9: scope:[main] from main::@7 [13] phi() + [14] call keyboard_event_scan + to:main::@44 +main::@44: scope:[main] from main::@9 + [15] phi() + [16] call keyboard_event_get + [17] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + to:main::@45 +main::@45: scope:[main] from main::@44 + [18] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 + [19] (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#14 + [20] if((byte) main::key_event#0!=(const byte) KEY_SPACE#0) goto main::@10 + to:main::@29 +main::@29: scope:[main] from main::@45 + [21] phi() + to:main::@10 +main::@10: scope:[main] from main::@29 main::@45 + [22] (byte) main::movedown#10 ← phi( main::@29/(byte/signed byte/word/signed word/dword/signed dword) 1 main::@45/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [23] call keyboard_event_pressed + [24] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + to:main::@46 +main::@46: scope:[main] from main::@10 + [25] (byte~) main::$9 ← (byte) keyboard_event_pressed::return#12 + [26] if((byte~) main::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 + to:main::@30 +main::@30: scope:[main] from main::@46 + [27] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate_fast#0) goto main::@11 + to:main::@31 +main::@31: scope:[main] from main::@30 + [28] (byte) main::movedown#2 ← ++ (byte) main::movedown#10 + to:main::@11 +main::@11: scope:[main] from main::@30 main::@31 main::@46 + [29] (byte) main::movedown#7 ← phi( main::@30/(byte) main::movedown#10 main::@31/(byte) main::movedown#2 main::@46/(byte) main::movedown#10 ) + [30] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate#0) goto main::@13 + to:main::@32 +main::@32: scope:[main] from main::@11 + [31] (byte) main::movedown#3 ← ++ (byte) main::movedown#7 + to:main::@13 +main::@13: scope:[main] from main::@11 main::@32 + [32] (byte) main::movedown#6 ← phi( main::@11/(byte) main::movedown#7 main::@32/(byte) main::movedown#3 ) + [33] if((byte) main::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@14 + to:main::@33 +main::@33: scope:[main] from main::@13 + [34] phi() + [35] call current_movedown + to:main::@14 +main::@14: scope:[main] from main::@13 main::@33 + [36] (byte) current_ypos#17 ← phi( main::@13/(byte) current_ypos#13 main::@33/(byte) current_ypos#10 ) + [36] (byte) current_movedown_counter#16 ← phi( main::@13/(byte) current_movedown_counter#1 main::@33/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [36] (byte) main::render#13 ← phi( main::@13/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@33/(byte/signed byte/word/signed word/dword/signed dword) 1 ) + [37] (byte~) main::$19 ← (byte) main::key_event#0 & (byte/word/signed word/dword/signed dword) 128 + [38] if((byte~) main::$19!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@15 + to:main::@34 +main::@34: scope:[main] from main::@14 + [39] if((byte) main::key_event#0!=(const byte) KEY_COMMA#0) goto main::@16 + to:main::@35 +main::@35: scope:[main] from main::@34 + [40] (byte) current_xpos#1 ← -- (byte) current_xpos#12 + [41] (byte) main::render#2 ← ++ (byte) main::render#13 + to:main::@16 +main::@16: scope:[main] from main::@34 main::@35 + [42] (byte) main::render#16 ← phi( main::@34/(byte) main::render#13 main::@35/(byte) main::render#2 ) + [42] (byte) current_xpos#11 ← phi( main::@34/(byte) current_xpos#12 main::@35/(byte) current_xpos#1 ) + [43] if((byte) main::key_event#0!=(const byte) KEY_DOT#0) goto main::@17 + to:main::@36 +main::@36: scope:[main] from main::@16 + [44] (byte) current_xpos#2 ← ++ (byte) current_xpos#11 + [45] (byte) main::render#3 ← ++ (byte) main::render#16 + to:main::@17 +main::@17: scope:[main] from main::@16 main::@36 + [46] (byte) current_xpos#34 ← phi( main::@16/(byte) current_xpos#11 main::@36/(byte) current_xpos#2 ) + [46] (byte) main::render#10 ← phi( main::@16/(byte) main::render#16 main::@36/(byte) main::render#3 ) + [47] if((byte) main::key_event#0!=(const byte) KEY_Z#0) goto main::@18 + to:main::@37 +main::@37: scope:[main] from main::@17 + [48] (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#11 - (byte/signed byte/word/signed word/dword/signed dword) 16 + [49] (byte) current_piece_orientation#2 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 + [50] (byte) main::render#4 ← ++ (byte) main::render#10 + to:main::@18 +main::@18: scope:[main] from main::@17 main::@37 + [51] (byte) main::render#11 ← phi( main::@17/(byte) main::render#10 main::@37/(byte) main::render#4 ) + [51] (byte) current_piece_orientation#10 ← phi( main::@17/(byte) current_piece_orientation#11 main::@37/(byte) current_piece_orientation#2 ) + [52] if((byte) main::key_event#0!=(const byte) KEY_X#0) goto main::@15 + to:main::@38 +main::@38: scope:[main] from main::@18 + [53] (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 + [54] (byte) current_piece_orientation#3 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 + [55] (byte) main::render#5 ← ++ (byte) main::render#11 + to:main::@15 +main::@15: scope:[main] from main::@14 main::@18 main::@38 + [56] (byte) current_xpos#15 ← phi( main::@14/(byte) current_xpos#12 main::@18/(byte) current_xpos#34 main::@38/(byte) current_xpos#34 ) + [56] (byte) current_piece_orientation#21 ← phi( main::@14/(byte) current_piece_orientation#11 main::@18/(byte) current_piece_orientation#10 main::@38/(byte) current_piece_orientation#3 ) + [56] (byte) main::render#7 ← phi( main::@14/(byte) main::render#13 main::@18/(byte) main::render#11 main::@38/(byte) main::render#5 ) + [57] if((byte) main::render#7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 + to:main::@39 +main::@39: scope:[main] from main::@15 + [58] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + [59] call render_playfield + to:main::@48 +main::@48: scope:[main] from main::@39 + [60] (byte~) current_piece_orientation#66 ← (byte) current_piece_orientation#21 + [61] (byte~) current_ypos#62 ← (byte) current_ypos#17 + [62] (byte~) current_xpos#64 ← (byte) current_xpos#15 + [63] call render_current + to:main::@49 +main::@49: scope:[main] from main::@48 + [64] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) + to:main::@1 +render_current: scope:[render_current] from main::@42 main::@48 + [65] (byte) current_xpos#26 ← phi( main::@42/(byte/signed byte/word/signed word/dword/signed dword) 3 main::@48/(byte~) current_xpos#64 ) + [65] (byte) current_ypos#14 ← phi( main::@42/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@48/(byte~) current_ypos#62 ) + [65] (byte) current_piece_orientation#13 ← phi( main::@42/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@48/(byte~) current_piece_orientation#66 ) + [66] (byte*) render_current::current_piece_gfx#0 ← (const byte[4*4*4]) piece_t#0 + (byte) current_piece_orientation#13 + to:render_current::@1 +render_current::@1: scope:[render_current] from render_current render_current::@7 + [67] (byte) render_current::i#3 ← phi( render_current/(byte/signed byte/word/signed word/dword/signed dword) 0 render_current::@7/(byte) render_current::i#1 ) + [67] (byte) render_current::l#2 ← phi( render_current/(byte/signed byte/word/signed word/dword/signed dword) 0 render_current::@7/(byte) render_current::l#1 ) + [68] (byte~) render_current::$1 ← (byte) current_ypos#14 + (byte) render_current::l#2 + [69] (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [70] (byte*) render_current::screen_line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_current::$2) + to:render_current::@2 +render_current::@2: scope:[render_current] from render_current::@1 render_current::@3 + [71] (byte) render_current::c#2 ← phi( render_current::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 render_current::@3/(byte) render_current::c#1 ) + [71] (byte) render_current::i#2 ← phi( render_current::@1/(byte) render_current::i#3 render_current::@3/(byte) render_current::i#1 ) + [72] (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#0 + (byte) render_current::i#2) + [73] (byte) render_current::i#1 ← ++ (byte) render_current::i#2 + [74] if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@3 + to:render_current::@5 +render_current::@5: scope:[render_current] from render_current::@2 + [75] (byte) render_current::xpos#0 ← (byte) current_xpos#26 + (byte) render_current::c#2 + [76] if((byte) render_current::xpos#0>=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_current::@3 + to:render_current::@6 +render_current::@6: scope:[render_current] from render_current::@5 + [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 + to:render_current::@3 +render_current::@3: scope:[render_current] from render_current::@2 render_current::@5 render_current::@6 + [78] (byte) render_current::c#1 ← ++ (byte) render_current::c#2 + [79] if((byte) render_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@2 + to:render_current::@7 +render_current::@7: scope:[render_current] from render_current::@3 + [80] (byte) render_current::l#1 ← ++ (byte) render_current::l#2 + [81] if((byte) render_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@1 + to:render_current::@return +render_current::@return: scope:[render_current] from render_current::@7 + [82] return + to:@return +render_playfield: scope:[render_playfield] from main::@39 main::@41 + [83] phi() to:render_playfield::@1 render_playfield::@1: scope:[render_playfield] from render_playfield render_playfield::@3 - [14] (byte) render_playfield::i#3 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::i#1 ) - [14] (byte) render_playfield::l#2 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::l#1 ) - [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 - [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) + [84] (byte) render_playfield::i#3 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::i#1 ) + [84] (byte) render_playfield::l#2 ← phi( render_playfield/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@3/(byte) render_playfield::l#1 ) + [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) to:render_playfield::@2 render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render_playfield::@2 - [17] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) - [17] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@2/(byte) render_playfield::c#1 ) - [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 - [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) - [20] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 - [21] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 - [22] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 + [87] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) + [87] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 render_playfield::@2/(byte) render_playfield::c#1 ) + [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 + [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) + [90] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 + [91] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 + [92] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 to:render_playfield::@3 render_playfield::@3: scope:[render_playfield] from render_playfield::@2 - [23] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 - [24] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 + [93] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 + [94] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 to:render_playfield::@return render_playfield::@return: scope:[render_playfield] from render_playfield::@3 - [25] return + [95] return + to:@return +current_movedown: scope:[current_movedown] from main::@33 + [96] (byte) current_ypos#10 ← ++ (byte) current_ypos#13 + to:current_movedown::@return +current_movedown::@return: scope:[current_movedown] from current_movedown + [97] return + to:@return +keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@10 keyboard_event_scan::@11 keyboard_event_scan::@20 keyboard_event_scan::@9 main::@10 + [98] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@10/(const byte) KEY_CTRL#0 keyboard_event_scan::@11/(const byte) KEY_COMMODORE#0 keyboard_event_scan::@20/(const byte) KEY_LSHIFT#0 keyboard_event_scan::@9/(const byte) KEY_RSHIFT#0 main::@10/(const byte) KEY_SPACE#0 ) + [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 + [100] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) + [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 + [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) + to:keyboard_event_pressed::@return +keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed + [103] return + to:@return +keyboard_event_get: scope:[keyboard_event_get] from main::@44 + [104] if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@return + to:keyboard_event_get::@3 +keyboard_event_get::@3: scope:[keyboard_event_get] from keyboard_event_get + [105] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [106] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) + to:keyboard_event_get::@return +keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@3 + [107] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@3/(byte) keyboard_events_size#4 ) + [107] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte/word/signed word/dword/signed dword) 255 keyboard_event_get::@3/(byte) keyboard_event_get::return#1 ) + [108] return + to:@return +keyboard_event_scan: scope:[keyboard_event_scan] from main::@9 + [109] phi() + to:keyboard_event_scan::@1 +keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@3 + [110] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@3/(byte) keyboard_events_size#13 ) + [110] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@3/(byte) keyboard_event_scan::keycode#14 ) + [110] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@3/(byte) keyboard_event_scan::row#1 ) + [111] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [112] call keyboard_matrix_read + [113] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + to:keyboard_event_scan::@25 +keyboard_event_scan::@25: scope:[keyboard_event_scan] from keyboard_event_scan::@1 + [114] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [115] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@4 + to:keyboard_event_scan::@13 +keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@25 + [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 + to:keyboard_event_scan::@3 +keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@13 keyboard_event_scan::@19 + [117] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@13/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) + [117] (byte) keyboard_event_scan::keycode#14 ← phi( keyboard_event_scan::@13/(byte) keyboard_event_scan::keycode#1 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#15 ) + [118] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [119] if((byte) keyboard_event_scan::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@1 + to:keyboard_event_scan::@20 +keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@3 + [120] phi() + [121] call keyboard_event_pressed + [122] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@26 +keyboard_event_scan::@26: scope:[keyboard_event_scan] from keyboard_event_scan::@20 + [123] (byte~) keyboard_event_scan::$14 ← (byte) keyboard_event_pressed::return#0 + [124] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 + to:keyboard_event_scan::@21 +keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@26 + [125] phi() + to:keyboard_event_scan::@9 +keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@26 + [126] phi() + [127] call keyboard_event_pressed + [128] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@27 +keyboard_event_scan::@27: scope:[keyboard_event_scan] from keyboard_event_scan::@9 + [129] (byte~) keyboard_event_scan::$18 ← (byte) keyboard_event_pressed::return#1 + [130] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 + to:keyboard_event_scan::@22 +keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@27 + [131] phi() + to:keyboard_event_scan::@10 +keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@27 + [132] phi() + [133] call keyboard_event_pressed + [134] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@28 +keyboard_event_scan::@28: scope:[keyboard_event_scan] from keyboard_event_scan::@10 + [135] (byte~) keyboard_event_scan::$22 ← (byte) keyboard_event_pressed::return#2 + [136] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 + to:keyboard_event_scan::@23 +keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@28 + [137] phi() + to:keyboard_event_scan::@11 +keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@28 + [138] phi() + [139] call keyboard_event_pressed + [140] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + to:keyboard_event_scan::@29 +keyboard_event_scan::@29: scope:[keyboard_event_scan] from keyboard_event_scan::@11 + [141] (byte~) keyboard_event_scan::$26 ← (byte) keyboard_event_pressed::return#10 + [142] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@return + to:keyboard_event_scan::@24 +keyboard_event_scan::@24: scope:[keyboard_event_scan] from keyboard_event_scan::@29 + [143] phi() + to:keyboard_event_scan::@return +keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@24 keyboard_event_scan::@29 + [144] return + to:@return +keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@25 keyboard_event_scan::@5 + [145] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@25/(byte) keyboard_events_size#29 keyboard_event_scan::@5/(byte) keyboard_events_size#30 ) + [145] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@25/(byte) keyboard_event_scan::keycode#11 keyboard_event_scan::@5/(byte) keyboard_event_scan::keycode#15 ) + [145] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@25/(byte/signed byte/word/signed word/dword/signed dword) 0 keyboard_event_scan::@5/(byte) keyboard_event_scan::col#1 ) + [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) + [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [148] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 + to:keyboard_event_scan::@15 +keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@4 + [149] if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@5 + to:keyboard_event_scan::@16 +keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@15 + [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) + [151] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 + to:keyboard_event_scan::@17 +keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [153] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + to:keyboard_event_scan::@5 +keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@17 keyboard_event_scan::@4 keyboard_event_scan::@7 + [154] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan::@17/(byte) keyboard_events_size#2 keyboard_event_scan::@4/(byte) keyboard_events_size#10 keyboard_event_scan::@15/(byte) keyboard_events_size#10 keyboard_event_scan::@7/(byte) keyboard_events_size#1 ) + [155] (byte) keyboard_event_scan::keycode#15 ← ++ (byte) keyboard_event_scan::keycode#10 + [156] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [157] if((byte) keyboard_event_scan::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@4 + to:keyboard_event_scan::@19 +keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@5 + [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + to:keyboard_event_scan::@3 +keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan::@16 + [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 + [160] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte/word/dword~) keyboard_event_scan::$11 + [161] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + to:keyboard_event_scan::@5 +keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@1 + [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) + [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) + to:keyboard_matrix_read::@return +keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read + [164] return to:@return init: scope:[init] from main - [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 - [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 - [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 - [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 - [30] call fill + [165] phi() + [166] call fill to:init::@7 init::@7: scope:[init] from init - [31] phi() - [32] call fill + [167] phi() + [168] call fill to:init::@1 init::@1: scope:[init] from init::@1 init::@7 - [33] (byte*) init::li#2 ← phi( init::@1/(byte*) init::li#1 init::@7/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 ) - [33] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 ) - [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 - [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 - [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 - [37] (byte) init::i#1 ← ++ (byte) init::i#2 - [38] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 + [169] (byte*) init::li#2 ← phi( init::@1/(byte*) init::li#1 init::@7/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 ) + [169] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init::@7/(byte/signed byte/word/signed word/dword/signed dword) 0 ) + [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 + [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 + [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 + [173] (byte) init::i#1 ← ++ (byte) init::i#2 + [174] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 to:init::@2 init::@2: scope:[init] from init::@1 init::@5 - [39] (byte) init::l#4 ← phi( init::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@5/(byte) init::l#1 ) - [39] (byte*) init::line#4 ← phi( init::@1/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 init::@5/(byte*) init::line#1 ) + [175] (byte) init::l#4 ← phi( init::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@5/(byte) init::l#1 ) + [175] (byte*) init::line#4 ← phi( init::@1/(const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 init::@5/(byte*) init::line#1 ) to:init::@3 init::@3: scope:[init] from init::@2 init::@3 - [40] (byte) init::c#2 ← phi( init::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@3/(byte) init::c#1 ) - [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 - [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 - [43] (byte) init::c#1 ← ++ (byte) init::c#2 - [44] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 + [176] (byte) init::c#2 ← phi( init::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 init::@3/(byte) init::c#1 ) + [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 + [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 + [179] (byte) init::c#1 ← ++ (byte) init::c#2 + [180] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 to:init::@5 init::@5: scope:[init] from init::@3 - [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 - [46] (byte) init::l#1 ← ++ (byte) init::l#4 - [47] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 + [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 + [182] (byte) init::l#1 ← ++ (byte) init::l#4 + [183] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 to:init::@return init::@return: scope:[init] from init::@5 - [48] return + [184] return to:@return fill: scope:[fill] from init init::@7 - [49] (byte) fill::val#3 ← phi( init/(byte/word/signed word/dword/signed dword) 160 init::@7/(const byte) BLACK#0 ) - [49] (byte*) fill::addr#0 ← phi( init/(const byte*) SCREEN#0 init::@7/(const byte*) COLS#0 ) - [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 + [185] (byte) fill::val#3 ← phi( init/(byte/word/signed word/dword/signed dword) 160 init::@7/(const byte) BLACK#0 ) + [185] (byte*) fill::addr#0 ← phi( init/(const byte*) SCREEN#0 init::@7/(const byte*) COLS#0 ) + [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 to:fill::@1 fill::@1: scope:[fill] from fill fill::@1 - [51] (byte*) fill::addr#2 ← phi( fill/(byte*) fill::addr#0 fill::@1/(byte*) fill::addr#1 ) - [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 - [53] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 - [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 + [187] (byte*) fill::addr#2 ← phi( fill/(byte*) fill::addr#0 fill::@1/(byte*) fill::addr#1 ) + [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 + [189] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 + [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 to:fill::@return fill::@return: scope:[fill] from fill::@1 - [55] return + [191] return to:@return VARIABLE REGISTER WEIGHTS (byte) BLACK (byte*) BORDERCOL +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_B (byte*) COLS (byte) DARK_GREY -(byte) GREEN +(byte) KEY_COMMA +(byte) KEY_COMMODORE +(byte) KEY_CTRL +(byte) KEY_DOT +(byte) KEY_LSHIFT +(byte) KEY_MODIFIER_COMMODORE +(byte) KEY_MODIFIER_CTRL +(byte) KEY_MODIFIER_LSHIFT +(byte) KEY_MODIFIER_RSHIFT +(byte) KEY_RSHIFT +(byte) KEY_SPACE +(byte) KEY_X +(byte) KEY_Z +(byte*) RASTER (byte*) SCREEN -(byte[4*4]) current_piece +(void()) current_movedown() +(byte) current_movedown_counter +(byte) current_movedown_counter#1 26.933333333333334 +(byte) current_movedown_counter#14 23.666666666666664 +(byte) current_movedown_counter#16 7.344827586206897 +(byte) current_movedown_rate +(byte) current_movedown_rate_fast +(byte*) current_piece +(byte) current_piece_orientation +(byte) current_piece_orientation#10 202.0 +(byte) current_piece_orientation#11 10.921052631578949 +(byte) current_piece_orientation#13 13.0 +(byte) current_piece_orientation#2 101.0 +(byte) current_piece_orientation#21 47.33333333333333 +(byte) current_piece_orientation#3 101.0 +(byte~) current_piece_orientation#66 7.333333333333333 +(byte) current_xpos +(byte) current_xpos#1 101.0 +(byte) current_xpos#11 202.0 +(byte) current_xpos#12 13.833333333333334 +(byte) current_xpos#15 47.33333333333333 +(byte) current_xpos#2 101.0 +(byte) current_xpos#26 59.529411764705884 +(byte) current_xpos#34 40.4 +(byte~) current_xpos#64 22.0 +(byte) current_ypos +(byte) current_ypos#10 34.33333333333333 +(byte) current_ypos#13 8.6 +(byte) current_ypos#14 6.588235294117648 +(byte) current_ypos#17 11.206896551724137 +(byte~) current_ypos#62 11.0 (void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val) (byte*) fill::addr (byte*) fill::addr#0 2.0 @@ -620,30 +3333,156 @@ VARIABLE REGISTER WEIGHTS (byte*) init::line (byte*) init::line#1 7.333333333333333 (byte*) init::line#4 20.499999999999996 +(byte()) keyboard_event_get() +(byte) keyboard_event_get::return +(byte) keyboard_event_get::return#1 4.0 +(byte) keyboard_event_get::return#2 34.33333333333333 +(byte) keyboard_event_get::return#3 202.0 +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) +(byte~) keyboard_event_pressed::$0 4.0 +(byte~) keyboard_event_pressed::$1 4.0 +(byte) keyboard_event_pressed::keycode +(byte) keyboard_event_pressed::keycode#5 1.3333333333333333 +(byte) keyboard_event_pressed::return +(byte) keyboard_event_pressed::return#0 4.0 +(byte) keyboard_event_pressed::return#1 4.0 +(byte) keyboard_event_pressed::return#10 4.0 +(byte) keyboard_event_pressed::return#11 15.857142857142861 +(byte) keyboard_event_pressed::return#12 202.0 +(byte) keyboard_event_pressed::return#2 4.0 +(byte) keyboard_event_pressed::row_bits +(byte) keyboard_event_pressed::row_bits#0 2.0 +(void()) keyboard_event_scan() +(byte/word/dword~) keyboard_event_scan::$11 20002.0 +(byte~) keyboard_event_scan::$14 4.0 +(byte~) keyboard_event_scan::$18 4.0 +(byte~) keyboard_event_scan::$22 4.0 +(byte~) keyboard_event_scan::$26 4.0 +(byte~) keyboard_event_scan::$3 20002.0 +(byte~) keyboard_event_scan::$4 20002.0 +(byte) keyboard_event_scan::col +(byte) keyboard_event_scan::col#1 15001.5 +(byte) keyboard_event_scan::col#2 2857.4285714285716 +(byte) keyboard_event_scan::event_type +(byte) keyboard_event_scan::event_type#0 20002.0 +(byte) keyboard_event_scan::keycode +(byte) keyboard_event_scan::keycode#1 2002.0 +(byte) keyboard_event_scan::keycode#10 3154.230769230769 +(byte) keyboard_event_scan::keycode#11 500.5 +(byte) keyboard_event_scan::keycode#14 1001.0 +(byte) keyboard_event_scan::keycode#15 5250.75 +(byte) keyboard_event_scan::row +(byte) keyboard_event_scan::row#1 1501.5 +(byte) keyboard_event_scan::row#2 600.24 +(byte) keyboard_event_scan::row_scan +(byte) keyboard_event_scan::row_scan#0 1278.0555555555554 +(byte[8]) keyboard_events +(byte) keyboard_events_size +(byte) keyboard_events_size#1 20002.0 +(byte) keyboard_events_size#10 8100.9000000000015 +(byte) keyboard_events_size#13 97.06451612903226 +(byte) keyboard_events_size#16 2.2745098039215685 +(byte) keyboard_events_size#19 22.799999999999997 +(byte) keyboard_events_size#2 20002.0 +(byte) keyboard_events_size#29 429.2857142857143 +(byte) keyboard_events_size#30 10201.2 +(byte) keyboard_events_size#4 3.0 +(byte[8]) keyboard_matrix_col_bitmask +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) +(byte) keyboard_matrix_read::return +(byte) keyboard_matrix_read::return#0 334.33333333333337 +(byte) keyboard_matrix_read::return#2 2002.0 +(byte) keyboard_matrix_read::row_pressed_bits +(byte) keyboard_matrix_read::rowid +(byte) keyboard_matrix_read::rowid#0 1003.0 +(byte[8]) keyboard_matrix_row_bitmask +(byte) keyboard_modifiers +(byte[8]) keyboard_scan_values (void()) main() +(byte~) main::$19 202.0 +(byte/signed word/word/dword/signed dword~) main::$28 202.0 +(byte/signed word/word/dword/signed dword~) main::$32 202.0 +(byte~) main::$9 202.0 +(byte) main::key_event +(byte) main::key_event#0 20.794117647058826 +(byte) main::movedown +(byte) main::movedown#10 50.5 +(byte) main::movedown#2 202.0 +(byte) main::movedown#3 202.0 +(byte) main::movedown#6 303.0 +(byte) main::movedown#7 252.5 +(byte) main::render +(byte) main::render#10 101.0 +(byte) main::render#11 101.0 +(byte) main::render#13 60.599999999999994 +(byte) main::render#16 134.66666666666666 +(byte) main::render#2 202.0 +(byte) main::render#3 202.0 +(byte) main::render#4 202.0 +(byte) main::render#5 202.0 +(byte) main::render#7 404.0 +(byte[4*4*4]) piece_t (byte[20*10]) playfield -(void()) render_current_piece() +(void()) render_current() +(byte~) render_current::$1 202.0 +(byte~) render_current::$2 202.0 +(byte) render_current::c +(byte) render_current::c#1 1501.5 +(byte) render_current::c#2 429.0 +(byte) render_current::current_cell +(byte) render_current::current_cell#0 600.5999999999999 +(byte*) render_current::current_piece_gfx +(byte*) render_current::current_piece_gfx#0 62.6875 +(byte) render_current::i +(byte) render_current::i#1 233.66666666666669 +(byte) render_current::i#2 1552.0 +(byte) render_current::i#3 50.5 +(byte) render_current::l +(byte) render_current::l#1 151.5 +(byte) render_current::l#2 23.307692307692307 +(byte*) render_current::screen_line +(byte*) render_current::screen_line#0 110.19999999999999 +(byte) render_current::xpos +(byte) render_current::xpos#0 1501.5 (void()) render_playfield() -(byte~) render_playfield::$0 22.0 -(byte*~) render_playfield::$1 202.0 +(byte~) render_playfield::$0 202.0 +(byte*~) render_playfield::$1 2002.0 (byte) render_playfield::c -(byte) render_playfield::c#1 151.5 -(byte) render_playfield::c#2 75.75 +(byte) render_playfield::c#1 1501.5 +(byte) render_playfield::c#2 750.75 (byte) render_playfield::i -(byte) render_playfield::i#1 42.599999999999994 -(byte) render_playfield::i#2 104.66666666666666 -(byte) render_playfield::i#3 7.333333333333333 +(byte) render_playfield::i#1 420.59999999999997 +(byte) render_playfield::i#2 1034.6666666666667 +(byte) render_playfield::i#3 67.33333333333333 (byte) render_playfield::l -(byte) render_playfield::l#1 16.5 -(byte) render_playfield::l#2 3.666666666666667 +(byte) render_playfield::l#1 151.5 +(byte) render_playfield::l#2 33.666666666666664 (byte*) render_playfield::line -(byte*) render_playfield::line#0 16.0 +(byte*) render_playfield::line#0 157.42857142857142 (byte*[20]) screen_lines Initial phi equivalence classes +[ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +[ current_ypos#13 current_ypos#17 current_ypos#10 ] +[ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] +[ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +[ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +[ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] +[ current_piece_orientation#13 current_piece_orientation#66 ] +[ current_ypos#14 current_ypos#62 ] +[ current_xpos#26 current_xpos#64 ] +[ render_current::l#2 render_current::l#1 ] +[ render_current::i#2 render_current::i#3 render_current::i#1 ] +[ render_current::c#2 render_current::c#1 ] [ render_playfield::l#2 render_playfield::l#1 ] [ render_playfield::c#2 render_playfield::c#1 ] [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +[ keyboard_event_pressed::keycode#5 ] +[ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +[ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +[ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +[ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] +[ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] [ init::i#2 init::i#1 ] [ init::li#2 init::li#1 ] [ init::line#4 init::line#1 ] @@ -651,16 +3490,67 @@ Initial phi equivalence classes [ init::c#2 init::c#1 ] [ fill::val#3 ] [ fill::addr#2 fill::addr#0 fill::addr#1 ] +Added variable keyboard_event_get::return#3 to zero page equivalence class [ keyboard_event_get::return#3 ] +Added variable main::key_event#0 to zero page equivalence class [ main::key_event#0 ] +Added variable keyboard_event_pressed::return#12 to zero page equivalence class [ keyboard_event_pressed::return#12 ] +Added variable main::$9 to zero page equivalence class [ main::$9 ] +Added variable main::$19 to zero page equivalence class [ main::$19 ] +Added variable main::$28 to zero page equivalence class [ main::$28 ] +Added variable main::$32 to zero page equivalence class [ main::$32 ] +Added variable render_current::current_piece_gfx#0 to zero page equivalence class [ render_current::current_piece_gfx#0 ] +Added variable render_current::$1 to zero page equivalence class [ render_current::$1 ] +Added variable render_current::$2 to zero page equivalence class [ render_current::$2 ] +Added variable render_current::screen_line#0 to zero page equivalence class [ render_current::screen_line#0 ] +Added variable render_current::current_cell#0 to zero page equivalence class [ render_current::current_cell#0 ] +Added variable render_current::xpos#0 to zero page equivalence class [ render_current::xpos#0 ] Added variable render_playfield::$0 to zero page equivalence class [ render_playfield::$0 ] Added variable render_playfield::line#0 to zero page equivalence class [ render_playfield::line#0 ] Added variable render_playfield::$1 to zero page equivalence class [ render_playfield::$1 ] +Added variable keyboard_event_pressed::$0 to zero page equivalence class [ keyboard_event_pressed::$0 ] +Added variable keyboard_event_pressed::row_bits#0 to zero page equivalence class [ keyboard_event_pressed::row_bits#0 ] +Added variable keyboard_event_pressed::$1 to zero page equivalence class [ keyboard_event_pressed::$1 ] +Added variable keyboard_event_pressed::return#11 to zero page equivalence class [ keyboard_event_pressed::return#11 ] +Added variable keyboard_matrix_read::rowid#0 to zero page equivalence class [ keyboard_matrix_read::rowid#0 ] +Added variable keyboard_matrix_read::return#2 to zero page equivalence class [ keyboard_matrix_read::return#2 ] +Added variable keyboard_event_scan::row_scan#0 to zero page equivalence class [ keyboard_event_scan::row_scan#0 ] +Added variable keyboard_event_pressed::return#0 to zero page equivalence class [ keyboard_event_pressed::return#0 ] +Added variable keyboard_event_scan::$14 to zero page equivalence class [ keyboard_event_scan::$14 ] +Added variable keyboard_event_pressed::return#1 to zero page equivalence class [ keyboard_event_pressed::return#1 ] +Added variable keyboard_event_scan::$18 to zero page equivalence class [ keyboard_event_scan::$18 ] +Added variable keyboard_event_pressed::return#2 to zero page equivalence class [ keyboard_event_pressed::return#2 ] +Added variable keyboard_event_scan::$22 to zero page equivalence class [ keyboard_event_scan::$22 ] +Added variable keyboard_event_pressed::return#10 to zero page equivalence class [ keyboard_event_pressed::return#10 ] +Added variable keyboard_event_scan::$26 to zero page equivalence class [ keyboard_event_scan::$26 ] +Added variable keyboard_event_scan::$3 to zero page equivalence class [ keyboard_event_scan::$3 ] +Added variable keyboard_event_scan::$4 to zero page equivalence class [ keyboard_event_scan::$4 ] +Added variable keyboard_event_scan::event_type#0 to zero page equivalence class [ keyboard_event_scan::event_type#0 ] +Added variable keyboard_event_scan::$11 to zero page equivalence class [ keyboard_event_scan::$11 ] +Added variable keyboard_matrix_read::return#0 to zero page equivalence class [ keyboard_matrix_read::return#0 ] Added variable init::$4 to zero page equivalence class [ init::$4 ] Added variable init::$7 to zero page equivalence class [ init::$7 ] Added variable fill::end#0 to zero page equivalence class [ fill::end#0 ] Complete equivalence classes +[ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +[ current_ypos#13 current_ypos#17 current_ypos#10 ] +[ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] +[ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +[ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +[ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] +[ current_piece_orientation#13 current_piece_orientation#66 ] +[ current_ypos#14 current_ypos#62 ] +[ current_xpos#26 current_xpos#64 ] +[ render_current::l#2 render_current::l#1 ] +[ render_current::i#2 render_current::i#3 render_current::i#1 ] +[ render_current::c#2 render_current::c#1 ] [ render_playfield::l#2 render_playfield::l#1 ] [ render_playfield::c#2 render_playfield::c#1 ] [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +[ keyboard_event_pressed::keycode#5 ] +[ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +[ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +[ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +[ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] +[ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] [ init::i#2 init::i#1 ] [ init::li#2 init::li#1 ] [ init::line#4 init::line#1 ] @@ -668,28 +3558,112 @@ Complete equivalence classes [ init::c#2 init::c#1 ] [ fill::val#3 ] [ fill::addr#2 fill::addr#0 fill::addr#1 ] +[ keyboard_event_get::return#3 ] +[ main::key_event#0 ] +[ keyboard_event_pressed::return#12 ] +[ main::$9 ] +[ main::$19 ] +[ main::$28 ] +[ main::$32 ] +[ render_current::current_piece_gfx#0 ] +[ render_current::$1 ] +[ render_current::$2 ] +[ render_current::screen_line#0 ] +[ render_current::current_cell#0 ] +[ render_current::xpos#0 ] [ render_playfield::$0 ] [ render_playfield::line#0 ] [ render_playfield::$1 ] +[ keyboard_event_pressed::$0 ] +[ keyboard_event_pressed::row_bits#0 ] +[ keyboard_event_pressed::$1 ] +[ keyboard_event_pressed::return#11 ] +[ keyboard_matrix_read::rowid#0 ] +[ keyboard_matrix_read::return#2 ] +[ keyboard_event_scan::row_scan#0 ] +[ keyboard_event_pressed::return#0 ] +[ keyboard_event_scan::$14 ] +[ keyboard_event_pressed::return#1 ] +[ keyboard_event_scan::$18 ] +[ keyboard_event_pressed::return#2 ] +[ keyboard_event_scan::$22 ] +[ keyboard_event_pressed::return#10 ] +[ keyboard_event_scan::$26 ] +[ keyboard_event_scan::$3 ] +[ keyboard_event_scan::$4 ] +[ keyboard_event_scan::event_type#0 ] +[ keyboard_event_scan::$11 ] +[ keyboard_matrix_read::return#0 ] [ init::$4 ] [ init::$7 ] [ fill::end#0 ] -Allocated zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] -Allocated zp ZP_BYTE:3 [ render_playfield::c#2 render_playfield::c#1 ] -Allocated zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Allocated zp ZP_BYTE:5 [ init::i#2 init::i#1 ] -Allocated zp ZP_WORD:6 [ init::li#2 init::li#1 ] -Allocated zp ZP_WORD:8 [ init::line#4 init::line#1 ] -Allocated zp ZP_BYTE:10 [ init::l#4 init::l#1 ] -Allocated zp ZP_BYTE:11 [ init::c#2 init::c#1 ] -Allocated zp ZP_BYTE:12 [ fill::val#3 ] -Allocated zp ZP_WORD:13 [ fill::addr#2 fill::addr#0 fill::addr#1 ] -Allocated zp ZP_BYTE:15 [ render_playfield::$0 ] -Allocated zp ZP_WORD:16 [ render_playfield::line#0 ] -Allocated zp ZP_WORD:18 [ render_playfield::$1 ] -Allocated zp ZP_BYTE:20 [ init::$4 ] -Allocated zp ZP_WORD:21 [ init::$7 ] -Allocated zp ZP_WORD:23 [ fill::end#0 ] +Allocated zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +Allocated zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +Allocated zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] +Allocated zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +Allocated zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +Allocated zp ZP_BYTE:7 [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] +Allocated zp ZP_BYTE:8 [ current_piece_orientation#13 current_piece_orientation#66 ] +Allocated zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] +Allocated zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] +Allocated zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] +Allocated zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] +Allocated zp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] +Allocated zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] +Allocated zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] +Allocated zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Allocated zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] +Allocated zp ZP_BYTE:18 [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +Allocated zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Allocated zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Allocated zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] +Allocated zp ZP_BYTE:22 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] +Allocated zp ZP_BYTE:23 [ init::i#2 init::i#1 ] +Allocated zp ZP_WORD:24 [ init::li#2 init::li#1 ] +Allocated zp ZP_WORD:26 [ init::line#4 init::line#1 ] +Allocated zp ZP_BYTE:28 [ init::l#4 init::l#1 ] +Allocated zp ZP_BYTE:29 [ init::c#2 init::c#1 ] +Allocated zp ZP_BYTE:30 [ fill::val#3 ] +Allocated zp ZP_WORD:31 [ fill::addr#2 fill::addr#0 fill::addr#1 ] +Allocated zp ZP_BYTE:33 [ keyboard_event_get::return#3 ] +Allocated zp ZP_BYTE:34 [ main::key_event#0 ] +Allocated zp ZP_BYTE:35 [ keyboard_event_pressed::return#12 ] +Allocated zp ZP_BYTE:36 [ main::$9 ] +Allocated zp ZP_BYTE:37 [ main::$19 ] +Allocated zp ZP_BYTE:38 [ main::$28 ] +Allocated zp ZP_BYTE:39 [ main::$32 ] +Allocated zp ZP_WORD:40 [ render_current::current_piece_gfx#0 ] +Allocated zp ZP_BYTE:42 [ render_current::$1 ] +Allocated zp ZP_BYTE:43 [ render_current::$2 ] +Allocated zp ZP_WORD:44 [ render_current::screen_line#0 ] +Allocated zp ZP_BYTE:46 [ render_current::current_cell#0 ] +Allocated zp ZP_BYTE:47 [ render_current::xpos#0 ] +Allocated zp ZP_BYTE:48 [ render_playfield::$0 ] +Allocated zp ZP_WORD:49 [ render_playfield::line#0 ] +Allocated zp ZP_WORD:51 [ render_playfield::$1 ] +Allocated zp ZP_BYTE:53 [ keyboard_event_pressed::$0 ] +Allocated zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] +Allocated zp ZP_BYTE:55 [ keyboard_event_pressed::$1 ] +Allocated zp ZP_BYTE:56 [ keyboard_event_pressed::return#11 ] +Allocated zp ZP_BYTE:57 [ keyboard_matrix_read::rowid#0 ] +Allocated zp ZP_BYTE:58 [ keyboard_matrix_read::return#2 ] +Allocated zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] +Allocated zp ZP_BYTE:60 [ keyboard_event_pressed::return#0 ] +Allocated zp ZP_BYTE:61 [ keyboard_event_scan::$14 ] +Allocated zp ZP_BYTE:62 [ keyboard_event_pressed::return#1 ] +Allocated zp ZP_BYTE:63 [ keyboard_event_scan::$18 ] +Allocated zp ZP_BYTE:64 [ keyboard_event_pressed::return#2 ] +Allocated zp ZP_BYTE:65 [ keyboard_event_scan::$22 ] +Allocated zp ZP_BYTE:66 [ keyboard_event_pressed::return#10 ] +Allocated zp ZP_BYTE:67 [ keyboard_event_scan::$26 ] +Allocated zp ZP_BYTE:68 [ keyboard_event_scan::$3 ] +Allocated zp ZP_BYTE:69 [ keyboard_event_scan::$4 ] +Allocated zp ZP_BYTE:70 [ keyboard_event_scan::event_type#0 ] +Allocated zp ZP_BYTE:71 [ keyboard_event_scan::$11 ] +Allocated zp ZP_BYTE:72 [ keyboard_matrix_read::return#0 ] +Allocated zp ZP_BYTE:73 [ init::$4 ] +Allocated zp ZP_WORD:74 [ init::$7 ] +Allocated zp ZP_WORD:76 [ fill::end#0 ] INITIAL ASM //SEG0 Basic Upstart @@ -697,114 +3671,575 @@ INITIAL ASM :BasicUpstart(main) .pc = $80d "Program" //SEG1 Global Constants & labels + .label RASTER = $d012 .label BORDERCOL = $d020 .label COLS = $d800 + .label CIA1_PORT_A = $dc00 + .label CIA1_PORT_B = $dc01 .const BLACK = 0 - .const GREEN = 5 .const DARK_GREY = $b + .const KEY_Z = $c + .const KEY_LSHIFT = $f + .const KEY_X = $17 + .const KEY_DOT = $2c + .const KEY_COMMA = $2f + .const KEY_RSHIFT = $34 + .const KEY_CTRL = $3a + .const KEY_SPACE = $3c + .const KEY_COMMODORE = $3d .label SCREEN = $400 + .const current_movedown_rate = $32 + .const current_movedown_rate_fast = 5 + .label keyboard_events_size = $16 + .label current_movedown_counter = 2 + .label current_xpos = 5 + .label current_piece_orientation = 6 + .label current_piece_orientation_13 = 8 + .label current_ypos = 3 + .label current_ypos_14 = 9 + .label current_xpos_26 = $a + .label current_piece_orientation_66 = 8 + .label current_ypos_62 = 9 + .label current_xpos_64 = $a //SEG2 @begin bbegin: -//SEG3 [1] phi from @begin to @8 [phi:@begin->@8] -b8_from_bbegin: - jmp b8 -//SEG4 @8 -b8: +//SEG3 [1] phi from @begin to @16 [phi:@begin->@16] +b16_from_bbegin: + jmp b16 +//SEG4 @16 +b16: //SEG5 [2] call main -//SEG6 [4] phi from @8 to main [phi:@8->main] -main_from_b8: +//SEG6 [4] phi from @16 to main [phi:@16->main] +main_from_b16: jsr main -//SEG7 [3] phi from @8 to @end [phi:@8->@end] -bend_from_b8: +//SEG7 [3] phi from @16 to @end [phi:@16->@end] +bend_from_b16: jmp bend //SEG8 @end bend: //SEG9 main main: { + .label _9 = $24 + .label _19 = $25 + .label _28 = $26 + .label _32 = $27 + .label key_event = $22 + .label movedown = 4 + .label render = 7 //SEG10 [5] call init + //SEG11 [165] phi from main to init [phi:main->init] + init_from_main: jsr init - //SEG11 [6] phi from main to main::@7 [phi:main->main::@7] - b7_from_main: - jmp b7 - //SEG12 main::@7 - b7: - //SEG13 [7] call render_playfield - //SEG14 [13] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] - render_playfield_from_b7: + //SEG12 [6] phi from main to main::@41 [phi:main->main::@41] + b41_from_main: + jmp b41 + //SEG13 main::@41 + b41: + //SEG14 [7] call render_playfield + //SEG15 [83] phi from main::@41 to render_playfield [phi:main::@41->render_playfield] + render_playfield_from_b41: jsr render_playfield - //SEG15 [8] phi from main::@7 to main::@8 [phi:main::@7->main::@8] - b8_from_b7: - jmp b8 - //SEG16 main::@8 - b8: - //SEG17 [9] call render_current_piece - //SEG18 [11] phi from main::@8 to render_current_piece [phi:main::@8->render_current_piece] - render_current_piece_from_b8: - jsr render_current_piece - jmp b2 - //SEG19 main::@2 - b2: - //SEG20 [10] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG16 [8] phi from main::@41 to main::@42 [phi:main::@41->main::@42] + b42_from_b41: + jmp b42 + //SEG17 main::@42 + b42: + //SEG18 [9] call render_current + //SEG19 [65] phi from main::@42 to render_current [phi:main::@42->render_current] + render_current_from_b42: + //SEG20 [65] phi (byte) current_xpos#26 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@42->render_current#0] -- vbuz1=vbuc1 + lda #3 + sta current_xpos_26 + //SEG21 [65] phi (byte) current_ypos#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->render_current#1] -- vbuz1=vbuc1 + lda #0 + sta current_ypos_14 + //SEG22 [65] phi (byte) current_piece_orientation#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->render_current#2] -- vbuz1=vbuc1 + lda #0 + sta current_piece_orientation_13 + jsr render_current + //SEG23 [10] phi from main::@42 to main::@1 [phi:main::@42->main::@1] + b1_from_b42: + //SEG24 [10] phi (byte) current_xpos#12 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@42->main::@1#0] -- vbuz1=vbuc1 + lda #3 + sta current_xpos + //SEG25 [10] phi (byte) current_ypos#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta current_ypos + //SEG26 [10] phi (byte) current_movedown_counter#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#2] -- vbuz1=vbuc1 + lda #0 + sta current_movedown_counter + //SEG27 [10] phi (byte) keyboard_events_size#19 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#3] -- vbuz1=vbuc1 + lda #0 + sta keyboard_events_size + //SEG28 [10] phi (byte) current_piece_orientation#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#4] -- vbuz1=vbuc1 + lda #0 + sta current_piece_orientation + jmp b1 + //SEG29 [10] phi from main::@15 main::@49 to main::@1 [phi:main::@15/main::@49->main::@1] + b1_from_b15: + b1_from_b49: + //SEG30 [10] phi (byte) current_xpos#12 = (byte) current_xpos#15 [phi:main::@15/main::@49->main::@1#0] -- register_copy + //SEG31 [10] phi (byte) current_ypos#13 = (byte) current_ypos#17 [phi:main::@15/main::@49->main::@1#1] -- register_copy + //SEG32 [10] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#16 [phi:main::@15/main::@49->main::@1#2] -- register_copy + //SEG33 [10] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@15/main::@49->main::@1#3] -- register_copy + //SEG34 [10] phi (byte) current_piece_orientation#11 = (byte) current_piece_orientation#21 [phi:main::@15/main::@49->main::@1#4] -- register_copy + jmp b1 + //SEG35 main::@1 + b1: + jmp b4 + //SEG36 main::@4 + b4: + //SEG37 [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$ff + bne b4 + jmp b7 + //SEG38 main::@7 + b7: + //SEG39 [12] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@7 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$fe + bne b7 + //SEG40 [13] phi from main::@7 to main::@9 [phi:main::@7->main::@9] + b9_from_b7: + jmp b9 + //SEG41 main::@9 + b9: + //SEG42 [14] call keyboard_event_scan + //SEG43 [109] phi from main::@9 to keyboard_event_scan [phi:main::@9->keyboard_event_scan] + keyboard_event_scan_from_b9: + jsr keyboard_event_scan + //SEG44 [15] phi from main::@9 to main::@44 [phi:main::@9->main::@44] + b44_from_b9: + jmp b44 + //SEG45 main::@44 + b44: + //SEG46 [16] call keyboard_event_get + jsr keyboard_event_get + //SEG47 [17] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 -- vbuz1=vbuz2 + lda keyboard_event_get.return + sta keyboard_event_get.return_3 + jmp b45 + //SEG48 main::@45 + b45: + //SEG49 [18] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 -- vbuz1=vbuz2 + lda keyboard_event_get.return_3 + sta key_event + //SEG50 [19] (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#14 -- vbuz1=_inc_vbuz1 + inc current_movedown_counter + //SEG51 [20] if((byte) main::key_event#0!=(const byte) KEY_SPACE#0) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_SPACE + bne b10_from_b45 + //SEG52 [21] phi from main::@45 to main::@29 [phi:main::@45->main::@29] + b29_from_b45: + jmp b29 + //SEG53 main::@29 + b29: + //SEG54 [22] phi from main::@29 to main::@10 [phi:main::@29->main::@10] + b10_from_b29: + //SEG55 [22] phi (byte) main::movedown#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@29->main::@10#0] -- vbuz1=vbuc1 + lda #1 + sta movedown + jmp b10 + //SEG56 [22] phi from main::@45 to main::@10 [phi:main::@45->main::@10] + b10_from_b45: + //SEG57 [22] phi (byte) main::movedown#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@45->main::@10#0] -- vbuz1=vbuc1 + lda #0 + sta movedown + jmp b10 + //SEG58 main::@10 + b10: + //SEG59 [23] call keyboard_event_pressed + //SEG60 [98] phi from main::@10 to keyboard_event_pressed [phi:main::@10->keyboard_event_pressed] + keyboard_event_pressed_from_b10: + //SEG61 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:main::@10->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_SPACE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG62 [24] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_11 + sta keyboard_event_pressed.return_12 + jmp b46 + //SEG63 main::@46 + b46: + //SEG64 [25] (byte~) main::$9 ← (byte) keyboard_event_pressed::return#12 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_12 + sta _9 + //SEG65 [26] if((byte~) main::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 -- vbuz1_eq_0_then_la1 + lda _9 + beq b11_from_b46 + jmp b30 + //SEG66 main::@30 + b30: + //SEG67 [27] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate_fast#0) goto main::@11 -- vbuz1_lt_vbuc1_then_la1 + lda current_movedown_counter + cmp #current_movedown_rate_fast + bcc b11_from_b30 + jmp b31 + //SEG68 main::@31 + b31: + //SEG69 [28] (byte) main::movedown#2 ← ++ (byte) main::movedown#10 -- vbuz1=_inc_vbuz1 + inc movedown + //SEG70 [29] phi from main::@30 main::@31 main::@46 to main::@11 [phi:main::@30/main::@31/main::@46->main::@11] + b11_from_b30: + b11_from_b31: + b11_from_b46: + //SEG71 [29] phi (byte) main::movedown#7 = (byte) main::movedown#10 [phi:main::@30/main::@31/main::@46->main::@11#0] -- register_copy + jmp b11 + //SEG72 main::@11 + b11: + //SEG73 [30] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate#0) goto main::@13 -- vbuz1_lt_vbuc1_then_la1 + lda current_movedown_counter + cmp #current_movedown_rate + bcc b13_from_b11 + jmp b32 + //SEG74 main::@32 + b32: + //SEG75 [31] (byte) main::movedown#3 ← ++ (byte) main::movedown#7 -- vbuz1=_inc_vbuz1 + inc movedown + //SEG76 [32] phi from main::@11 main::@32 to main::@13 [phi:main::@11/main::@32->main::@13] + b13_from_b11: + b13_from_b32: + //SEG77 [32] phi (byte) main::movedown#6 = (byte) main::movedown#7 [phi:main::@11/main::@32->main::@13#0] -- register_copy + jmp b13 + //SEG78 main::@13 + b13: + //SEG79 [33] if((byte) main::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@14 -- vbuz1_eq_0_then_la1 + lda movedown + beq b14_from_b13 + //SEG80 [34] phi from main::@13 to main::@33 [phi:main::@13->main::@33] + b33_from_b13: + jmp b33 + //SEG81 main::@33 + b33: + //SEG82 [35] call current_movedown + jsr current_movedown + //SEG83 [36] phi from main::@33 to main::@14 [phi:main::@33->main::@14] + b14_from_b33: + //SEG84 [36] phi (byte) current_ypos#17 = (byte) current_ypos#10 [phi:main::@33->main::@14#0] -- register_copy + //SEG85 [36] phi (byte) current_movedown_counter#16 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@33->main::@14#1] -- vbuz1=vbuc1 + lda #0 + sta current_movedown_counter + //SEG86 [36] phi (byte) main::render#13 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@33->main::@14#2] -- vbuz1=vbuc1 + lda #1 + sta render + jmp b14 + //SEG87 [36] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + b14_from_b13: + //SEG88 [36] phi (byte) current_ypos#17 = (byte) current_ypos#13 [phi:main::@13->main::@14#0] -- register_copy + //SEG89 [36] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#1 [phi:main::@13->main::@14#1] -- register_copy + //SEG90 [36] phi (byte) main::render#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@13->main::@14#2] -- vbuz1=vbuc1 + lda #0 + sta render + jmp b14 + //SEG91 main::@14 + b14: + //SEG92 [37] (byte~) main::$19 ← (byte) main::key_event#0 & (byte/word/signed word/dword/signed dword) 128 -- vbuz1=vbuz2_band_vbuc1 + lda #$80 + and key_event + sta _19 + //SEG93 [38] if((byte~) main::$19!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@15 -- vbuz1_neq_0_then_la1 + lda _19 + bne b15_from_b14 + jmp b34 + //SEG94 main::@34 + b34: + //SEG95 [39] if((byte) main::key_event#0!=(const byte) KEY_COMMA#0) goto main::@16 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_COMMA + bne b16_from_b34 + jmp b35 + //SEG96 main::@35 + b35: + //SEG97 [40] (byte) current_xpos#1 ← -- (byte) current_xpos#12 -- vbuz1=_dec_vbuz1 + dec current_xpos + //SEG98 [41] (byte) main::render#2 ← ++ (byte) main::render#13 -- vbuz1=_inc_vbuz1 + inc render + //SEG99 [42] phi from main::@34 main::@35 to main::@16 [phi:main::@34/main::@35->main::@16] + b16_from_b34: + b16_from_b35: + //SEG100 [42] phi (byte) main::render#16 = (byte) main::render#13 [phi:main::@34/main::@35->main::@16#0] -- register_copy + //SEG101 [42] phi (byte) current_xpos#11 = (byte) current_xpos#12 [phi:main::@34/main::@35->main::@16#1] -- register_copy + jmp b16 + //SEG102 main::@16 + b16: + //SEG103 [43] if((byte) main::key_event#0!=(const byte) KEY_DOT#0) goto main::@17 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_DOT + bne b17_from_b16 + jmp b36 + //SEG104 main::@36 + b36: + //SEG105 [44] (byte) current_xpos#2 ← ++ (byte) current_xpos#11 -- vbuz1=_inc_vbuz1 + inc current_xpos + //SEG106 [45] (byte) main::render#3 ← ++ (byte) main::render#16 -- vbuz1=_inc_vbuz1 + inc render + //SEG107 [46] phi from main::@16 main::@36 to main::@17 [phi:main::@16/main::@36->main::@17] + b17_from_b16: + b17_from_b36: + //SEG108 [46] phi (byte) current_xpos#34 = (byte) current_xpos#11 [phi:main::@16/main::@36->main::@17#0] -- register_copy + //SEG109 [46] phi (byte) main::render#10 = (byte) main::render#16 [phi:main::@16/main::@36->main::@17#1] -- register_copy + jmp b17 + //SEG110 main::@17 + b17: + //SEG111 [47] if((byte) main::key_event#0!=(const byte) KEY_Z#0) goto main::@18 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_Z + bne b18_from_b17 + jmp b37 + //SEG112 main::@37 + b37: + //SEG113 [48] (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#11 - (byte/signed byte/word/signed word/dword/signed dword) 16 -- vbuz1=vbuz2_minus_vbuc1 + lda current_piece_orientation + sec + sbc #$10 + sta _28 + //SEG114 [49] (byte) current_piece_orientation#2 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 -- vbuz1=vbuz2_band_vbuc1 + lda #$3f + and _28 + sta current_piece_orientation + //SEG115 [50] (byte) main::render#4 ← ++ (byte) main::render#10 -- vbuz1=_inc_vbuz1 + inc render + //SEG116 [51] phi from main::@17 main::@37 to main::@18 [phi:main::@17/main::@37->main::@18] + b18_from_b17: + b18_from_b37: + //SEG117 [51] phi (byte) main::render#11 = (byte) main::render#10 [phi:main::@17/main::@37->main::@18#0] -- register_copy + //SEG118 [51] phi (byte) current_piece_orientation#10 = (byte) current_piece_orientation#11 [phi:main::@17/main::@37->main::@18#1] -- register_copy + jmp b18 + //SEG119 main::@18 + b18: + //SEG120 [52] if((byte) main::key_event#0!=(const byte) KEY_X#0) goto main::@15 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_X + bne b15_from_b18 + jmp b38 + //SEG121 main::@38 + b38: + //SEG122 [53] (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 -- vbuz1=vbuz2_plus_vbuc1 + lda #$10 + clc + adc current_piece_orientation + sta _32 + //SEG123 [54] (byte) current_piece_orientation#3 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 -- vbuz1=vbuz2_band_vbuc1 + lda #$3f + and _32 + sta current_piece_orientation + //SEG124 [55] (byte) main::render#5 ← ++ (byte) main::render#11 -- vbuz1=_inc_vbuz1 + inc render + //SEG125 [56] phi from main::@14 main::@18 main::@38 to main::@15 [phi:main::@14/main::@18/main::@38->main::@15] + b15_from_b14: + b15_from_b18: + b15_from_b38: + //SEG126 [56] phi (byte) current_xpos#15 = (byte) current_xpos#12 [phi:main::@14/main::@18/main::@38->main::@15#0] -- register_copy + //SEG127 [56] phi (byte) current_piece_orientation#21 = (byte) current_piece_orientation#11 [phi:main::@14/main::@18/main::@38->main::@15#1] -- register_copy + //SEG128 [56] phi (byte) main::render#7 = (byte) main::render#13 [phi:main::@14/main::@18/main::@38->main::@15#2] -- register_copy + jmp b15 + //SEG129 main::@15 + b15: + //SEG130 [57] if((byte) main::render#7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuz1_eq_0_then_la1 + lda render + beq b1_from_b15 + jmp b39 + //SEG131 main::@39 + b39: + //SEG132 [58] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - jmp b2 + //SEG133 [59] call render_playfield + //SEG134 [83] phi from main::@39 to render_playfield [phi:main::@39->render_playfield] + render_playfield_from_b39: + jsr render_playfield + jmp b48 + //SEG135 main::@48 + b48: + //SEG136 [60] (byte~) current_piece_orientation#66 ← (byte) current_piece_orientation#21 -- vbuz1=vbuz2 + lda current_piece_orientation + sta current_piece_orientation_66 + //SEG137 [61] (byte~) current_ypos#62 ← (byte) current_ypos#17 -- vbuz1=vbuz2 + lda current_ypos + sta current_ypos_62 + //SEG138 [62] (byte~) current_xpos#64 ← (byte) current_xpos#15 -- vbuz1=vbuz2 + lda current_xpos + sta current_xpos_64 + //SEG139 [63] call render_current + //SEG140 [65] phi from main::@48 to render_current [phi:main::@48->render_current] + render_current_from_b48: + //SEG141 [65] phi (byte) current_xpos#26 = (byte~) current_xpos#64 [phi:main::@48->render_current#0] -- register_copy + //SEG142 [65] phi (byte) current_ypos#14 = (byte~) current_ypos#62 [phi:main::@48->render_current#1] -- register_copy + //SEG143 [65] phi (byte) current_piece_orientation#13 = (byte~) current_piece_orientation#66 [phi:main::@48->render_current#2] -- register_copy + jsr render_current + jmp b49 + //SEG144 main::@49 + b49: + //SEG145 [64] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDERCOL + jmp b1_from_b49 } -//SEG21 render_current_piece -render_current_piece: { - jmp breturn - //SEG22 render_current_piece::@return - breturn: - //SEG23 [12] return - rts -} -//SEG24 render_playfield -render_playfield: { - .label _0 = $f - .label _1 = $12 - .label line = $10 - .label i = 4 - .label c = 3 - .label l = 2 - //SEG25 [14] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] - b1_from_render_playfield: - //SEG26 [14] phi (byte) render_playfield::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 +//SEG146 render_current +render_current: { + .label _1 = $2a + .label _2 = $2b + .label current_piece_gfx = $28 + .label screen_line = $2c + .label current_cell = $2e + .label i = $c + .label c = $d + .label xpos = $2f + .label l = $b + //SEG147 [66] (byte*) render_current::current_piece_gfx#0 ← (const byte[4*4*4]) piece_t#0 + (byte) current_piece_orientation#13 -- pbuz1=pbuc1_plus_vbuz2 + lda current_piece_orientation_13 + clc + adc #piece_t + adc #0 + sta current_piece_gfx+1 + //SEG148 [67] phi from render_current to render_current::@1 [phi:render_current->render_current::@1] + b1_from_render_current: + //SEG149 [67] phi (byte) render_current::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current->render_current::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG27 [14] phi (byte) render_playfield::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + //SEG150 [67] phi (byte) render_current::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current->render_current::@1#1] -- vbuz1=vbuc1 lda #0 sta l jmp b1 - //SEG28 [14] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] - b1_from_b3: - //SEG29 [14] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy - //SEG30 [14] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + //SEG151 [67] phi from render_current::@7 to render_current::@1 [phi:render_current::@7->render_current::@1] + b1_from_b7: + //SEG152 [67] phi (byte) render_current::i#3 = (byte) render_current::i#1 [phi:render_current::@7->render_current::@1#0] -- register_copy + //SEG153 [67] phi (byte) render_current::l#2 = (byte) render_current::l#1 [phi:render_current::@7->render_current::@1#1] -- register_copy jmp b1 - //SEG31 render_playfield::@1 + //SEG154 render_current::@1 b1: - //SEG32 [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 + //SEG155 [68] (byte~) render_current::$1 ← (byte) current_ypos#14 + (byte) render_current::l#2 -- vbuz1=vbuz2_plus_vbuz3 + lda current_ypos_14 + clc + adc l + sta _1 + //SEG156 [69] (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 + lda _1 + asl + sta _2 + //SEG157 [70] (byte*) render_current::screen_line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_current::$2) -- pbuz1=pptc1_derefidx_vbuz2 + ldy _2 + lda screen_lines,y + sta screen_line + lda screen_lines+1,y + sta screen_line+1 + //SEG158 [71] phi from render_current::@1 to render_current::@2 [phi:render_current::@1->render_current::@2] + b2_from_b1: + //SEG159 [71] phi (byte) render_current::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current::@1->render_current::@2#0] -- vbuz1=vbuc1 + lda #0 + sta c + //SEG160 [71] phi (byte) render_current::i#2 = (byte) render_current::i#3 [phi:render_current::@1->render_current::@2#1] -- register_copy + jmp b2 + //SEG161 [71] phi from render_current::@3 to render_current::@2 [phi:render_current::@3->render_current::@2] + b2_from_b3: + //SEG162 [71] phi (byte) render_current::c#2 = (byte) render_current::c#1 [phi:render_current::@3->render_current::@2#0] -- register_copy + //SEG163 [71] phi (byte) render_current::i#2 = (byte) render_current::i#1 [phi:render_current::@3->render_current::@2#1] -- register_copy + jmp b2 + //SEG164 render_current::@2 + b2: + //SEG165 [72] (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#0 + (byte) render_current::i#2) -- vbuz1=pbuz2_derefidx_vbuz3 + ldy i + lda (current_piece_gfx),y + sta current_cell + //SEG166 [73] (byte) render_current::i#1 ← ++ (byte) render_current::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG167 [74] if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@3 -- vbuz1_eq_0_then_la1 + lda current_cell + beq b3 + jmp b5 + //SEG168 render_current::@5 + b5: + //SEG169 [75] (byte) render_current::xpos#0 ← (byte) current_xpos#26 + (byte) render_current::c#2 -- vbuz1=vbuz2_plus_vbuz3 + lda current_xpos_26 + clc + adc c + sta xpos + //SEG170 [76] if((byte) render_current::xpos#0>=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_current::@3 -- vbuz1_ge_vbuc1_then_la1 + lda xpos + cmp #$a + bcs b3 + jmp b6 + //SEG171 render_current::@6 + b6: + //SEG172 [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 -- pbuz1_derefidx_vbuz2=vbuz3 + lda current_cell + ldy xpos + sta (screen_line),y + jmp b3 + //SEG173 render_current::@3 + b3: + //SEG174 [78] (byte) render_current::c#1 ← ++ (byte) render_current::c#2 -- vbuz1=_inc_vbuz1 + inc c + //SEG175 [79] if((byte) render_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@2 -- vbuz1_neq_vbuc1_then_la1 + lda c + cmp #4 + bne b2_from_b3 + jmp b7 + //SEG176 render_current::@7 + b7: + //SEG177 [80] (byte) render_current::l#1 ← ++ (byte) render_current::l#2 -- vbuz1=_inc_vbuz1 + inc l + //SEG178 [81] if((byte) render_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@1 -- vbuz1_neq_vbuc1_then_la1 + lda l + cmp #4 + bne b1_from_b7 + jmp breturn + //SEG179 render_current::@return + breturn: + //SEG180 [82] return + rts +} +//SEG181 render_playfield +render_playfield: { + .label _0 = $30 + .label _1 = $33 + .label line = $31 + .label i = $10 + .label c = $f + .label l = $e + //SEG182 [84] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] + b1_from_render_playfield: + //SEG183 [84] phi (byte) render_playfield::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG184 [84] phi (byte) render_playfield::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + lda #0 + sta l + jmp b1 + //SEG185 [84] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] + b1_from_b3: + //SEG186 [84] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy + //SEG187 [84] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + jmp b1 + //SEG188 render_playfield::@1 + b1: + //SEG189 [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 lda l asl sta _0 - //SEG33 [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) -- pbuz1=pptc1_derefidx_vbuz2 + //SEG190 [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) -- pbuz1=pptc1_derefidx_vbuz2 ldy _0 lda screen_lines,y sta line lda screen_lines+1,y sta line+1 - //SEG34 [17] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] + //SEG191 [87] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] b2_from_b1: - //SEG35 [17] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#0] -- register_copy - //SEG36 [17] phi (byte) render_playfield::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield::@1->render_playfield::@2#1] -- vbuz1=vbuc1 + //SEG192 [87] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#0] -- register_copy + //SEG193 [87] phi (byte) render_playfield::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield::@1->render_playfield::@2#1] -- vbuz1=vbuc1 lda #0 sta c jmp b2 - //SEG37 [17] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] + //SEG194 [87] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] b2_from_b2: - //SEG38 [17] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy - //SEG39 [17] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy + //SEG195 [87] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy + //SEG196 [87] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy jmp b2 - //SEG40 render_playfield::@2 + //SEG197 render_playfield::@2 b2: - //SEG41 [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 -- pbuz1=pbuz2_plus_vbuz3 + //SEG198 [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 -- pbuz1=pbuz2_plus_vbuz3 lda c clc adc line @@ -812,113 +4247,492 @@ render_playfield: { lda #0 adc line+1 sta _1+1 - //SEG42 [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + //SEG199 [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy i lda playfield,y ldy #0 sta (_1),y - //SEG43 [20] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 + //SEG200 [90] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG44 [21] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 + //SEG201 [91] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 inc c - //SEG45 [22] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG202 [92] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 lda c cmp #$a bne b2_from_b2 jmp b3 - //SEG46 render_playfield::@3 + //SEG203 render_playfield::@3 b3: - //SEG47 [23] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 + //SEG204 [93] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 inc l - //SEG48 [24] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG205 [94] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 lda l cmp #$14 bne b1_from_b3 jmp breturn - //SEG49 render_playfield::@return + //SEG206 render_playfield::@return breturn: - //SEG50 [25] return + //SEG207 [95] return rts } -//SEG51 init +//SEG208 current_movedown +current_movedown: { + //SEG209 [96] (byte) current_ypos#10 ← ++ (byte) current_ypos#13 -- vbuz1=_inc_vbuz1 + inc current_ypos + jmp breturn + //SEG210 current_movedown::@return + breturn: + //SEG211 [97] return + rts +} +//SEG212 keyboard_event_pressed +keyboard_event_pressed: { + .label _0 = $35 + .label _1 = $37 + .label return = $3c + .label return_1 = $3e + .label return_2 = $40 + .label row_bits = $36 + .label return_10 = $42 + .label keycode = $11 + .label return_11 = $38 + .label return_12 = $23 + //SEG213 [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuz1=vbuz2_ror_3 + lda keycode + lsr + lsr + lsr + sta _0 + //SEG214 [100] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy _0 + lda keyboard_scan_values,y + sta row_bits + //SEG215 [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuz1=vbuz2_band_vbuc1 + lda #7 + and keycode + sta _1 + //SEG216 [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + lda row_bits + ldy _1 + and keyboard_matrix_col_bitmask,y + sta return_11 + jmp breturn + //SEG217 keyboard_event_pressed::@return + breturn: + //SEG218 [103] return + rts +} +//SEG219 keyboard_event_get +keyboard_event_get: { + .label return = $12 + .label return_3 = $21 + //SEG220 [104] if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + lda keyboard_events_size + beq breturn_from_keyboard_event_get + jmp b3 + //SEG221 keyboard_event_get::@3 + b3: + //SEG222 [105] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + dec keyboard_events_size + //SEG223 [106] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy keyboard_events_size + lda keyboard_events,y + sta return + //SEG224 [107] phi from keyboard_event_get::@3 to keyboard_event_get::@return [phi:keyboard_event_get::@3->keyboard_event_get::@return] + breturn_from_b3: + //SEG225 [107] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@3->keyboard_event_get::@return#0] -- register_copy + //SEG226 [107] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@3->keyboard_event_get::@return#1] -- register_copy + jmp breturn + //SEG227 [107] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + breturn_from_keyboard_event_get: + //SEG228 [107] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + //SEG229 [107] phi (byte) keyboard_event_get::return#2 = (byte/word/signed word/dword/signed dword) 255 [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuz1=vbuc1 + lda #$ff + sta return + jmp breturn + //SEG230 keyboard_event_get::@return + breturn: + //SEG231 [108] return + rts +} +//SEG232 keyboard_event_scan +keyboard_event_scan: { + .label _3 = $44 + .label _4 = $45 + .label _11 = $47 + .label _14 = $3d + .label _18 = $3f + .label _22 = $41 + .label _26 = $43 + .label row_scan = $3b + .label keycode = $15 + .label row = $13 + .label col = $14 + .label event_type = $46 + //SEG233 [110] phi from keyboard_event_scan to keyboard_event_scan::@1 [phi:keyboard_event_scan->keyboard_event_scan::@1] + b1_from_keyboard_event_scan: + //SEG234 [110] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@1#0] -- register_copy + //SEG235 [110] phi (byte) keyboard_event_scan::keycode#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan->keyboard_event_scan::@1#1] -- vbuz1=vbuc1 + lda #0 + sta keycode + //SEG236 [110] phi (byte) keyboard_event_scan::row#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan->keyboard_event_scan::@1#2] -- vbuz1=vbuc1 + lda #0 + sta row + jmp b1 + //SEG237 [110] phi from keyboard_event_scan::@3 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1] + b1_from_b3: + //SEG238 [110] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#0] -- register_copy + //SEG239 [110] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#1] -- register_copy + //SEG240 [110] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#2] -- register_copy + jmp b1 + //SEG241 keyboard_event_scan::@1 + b1: + //SEG242 [111] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuz1=vbuz2 + lda row + sta keyboard_matrix_read.rowid + //SEG243 [112] call keyboard_matrix_read + jsr keyboard_matrix_read + //SEG244 [113] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 + lda keyboard_matrix_read.return + sta keyboard_matrix_read.return_2 + jmp b25 + //SEG245 keyboard_event_scan::@25 + b25: + //SEG246 [114] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 + lda keyboard_matrix_read.return_2 + sta row_scan + //SEG247 [115] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@4 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + lda row_scan + ldy row + cmp keyboard_scan_values,y + bne b4_from_b25 + jmp b13 + //SEG248 keyboard_event_scan::@13 + b13: + //SEG249 [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 -- vbuz1=vbuz1_plus_vbuc1 + lda #8 + clc + adc keycode + sta keycode + //SEG250 [117] phi from keyboard_event_scan::@13 keyboard_event_scan::@19 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3] + b3_from_b13: + b3_from_b19: + //SEG251 [117] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3#0] -- register_copy + //SEG252 [117] phi (byte) keyboard_event_scan::keycode#14 = (byte) keyboard_event_scan::keycode#1 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3#1] -- register_copy + jmp b3 + //SEG253 keyboard_event_scan::@3 + b3: + //SEG254 [118] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + inc row + //SEG255 [119] if((byte) keyboard_event_scan::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@1 -- vbuz1_neq_vbuc1_then_la1 + lda row + cmp #8 + bne b1_from_b3 + //SEG256 [120] phi from keyboard_event_scan::@3 to keyboard_event_scan::@20 [phi:keyboard_event_scan::@3->keyboard_event_scan::@20] + b20_from_b3: + jmp b20 + //SEG257 keyboard_event_scan::@20 + b20: + //SEG258 [121] call keyboard_event_pressed + //SEG259 [98] phi from keyboard_event_scan::@20 to keyboard_event_pressed [phi:keyboard_event_scan::@20->keyboard_event_pressed] + keyboard_event_pressed_from_b20: + //SEG260 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@20->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_LSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG261 [122] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_11 + sta keyboard_event_pressed.return + jmp b26 + //SEG262 keyboard_event_scan::@26 + b26: + //SEG263 [123] (byte~) keyboard_event_scan::$14 ← (byte) keyboard_event_pressed::return#0 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return + sta _14 + //SEG264 [124] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 -- vbuz1_eq_0_then_la1 + lda _14 + beq b9_from_b26 + //SEG265 [125] phi from keyboard_event_scan::@26 to keyboard_event_scan::@21 [phi:keyboard_event_scan::@26->keyboard_event_scan::@21] + b21_from_b26: + jmp b21 + //SEG266 keyboard_event_scan::@21 + b21: + //SEG267 [126] phi from keyboard_event_scan::@21 keyboard_event_scan::@26 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@21/keyboard_event_scan::@26->keyboard_event_scan::@9] + b9_from_b21: + b9_from_b26: + jmp b9 + //SEG268 keyboard_event_scan::@9 + b9: + //SEG269 [127] call keyboard_event_pressed + //SEG270 [98] phi from keyboard_event_scan::@9 to keyboard_event_pressed [phi:keyboard_event_scan::@9->keyboard_event_pressed] + keyboard_event_pressed_from_b9: + //SEG271 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@9->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_RSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG272 [128] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_11 + sta keyboard_event_pressed.return_1 + jmp b27 + //SEG273 keyboard_event_scan::@27 + b27: + //SEG274 [129] (byte~) keyboard_event_scan::$18 ← (byte) keyboard_event_pressed::return#1 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_1 + sta _18 + //SEG275 [130] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 -- vbuz1_eq_0_then_la1 + lda _18 + beq b10_from_b27 + //SEG276 [131] phi from keyboard_event_scan::@27 to keyboard_event_scan::@22 [phi:keyboard_event_scan::@27->keyboard_event_scan::@22] + b22_from_b27: + jmp b22 + //SEG277 keyboard_event_scan::@22 + b22: + //SEG278 [132] phi from keyboard_event_scan::@22 keyboard_event_scan::@27 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@22/keyboard_event_scan::@27->keyboard_event_scan::@10] + b10_from_b22: + b10_from_b27: + jmp b10 + //SEG279 keyboard_event_scan::@10 + b10: + //SEG280 [133] call keyboard_event_pressed + //SEG281 [98] phi from keyboard_event_scan::@10 to keyboard_event_pressed [phi:keyboard_event_scan::@10->keyboard_event_pressed] + keyboard_event_pressed_from_b10: + //SEG282 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@10->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_CTRL + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG283 [134] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_11 + sta keyboard_event_pressed.return_2 + jmp b28 + //SEG284 keyboard_event_scan::@28 + b28: + //SEG285 [135] (byte~) keyboard_event_scan::$22 ← (byte) keyboard_event_pressed::return#2 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_2 + sta _22 + //SEG286 [136] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 -- vbuz1_eq_0_then_la1 + lda _22 + beq b11_from_b28 + //SEG287 [137] phi from keyboard_event_scan::@28 to keyboard_event_scan::@23 [phi:keyboard_event_scan::@28->keyboard_event_scan::@23] + b23_from_b28: + jmp b23 + //SEG288 keyboard_event_scan::@23 + b23: + //SEG289 [138] phi from keyboard_event_scan::@23 keyboard_event_scan::@28 to keyboard_event_scan::@11 [phi:keyboard_event_scan::@23/keyboard_event_scan::@28->keyboard_event_scan::@11] + b11_from_b23: + b11_from_b28: + jmp b11 + //SEG290 keyboard_event_scan::@11 + b11: + //SEG291 [139] call keyboard_event_pressed + //SEG292 [98] phi from keyboard_event_scan::@11 to keyboard_event_pressed [phi:keyboard_event_scan::@11->keyboard_event_pressed] + keyboard_event_pressed_from_b11: + //SEG293 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@11->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_COMMODORE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG294 [140] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_11 + sta keyboard_event_pressed.return_10 + jmp b29 + //SEG295 keyboard_event_scan::@29 + b29: + //SEG296 [141] (byte~) keyboard_event_scan::$26 ← (byte) keyboard_event_pressed::return#10 -- vbuz1=vbuz2 + lda keyboard_event_pressed.return_10 + sta _26 + //SEG297 [142] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@return -- vbuz1_eq_0_then_la1 + lda _26 + beq breturn + //SEG298 [143] phi from keyboard_event_scan::@29 to keyboard_event_scan::@24 [phi:keyboard_event_scan::@29->keyboard_event_scan::@24] + b24_from_b29: + jmp b24 + //SEG299 keyboard_event_scan::@24 + b24: + jmp breturn + //SEG300 keyboard_event_scan::@return + breturn: + //SEG301 [144] return + rts + //SEG302 [145] phi from keyboard_event_scan::@25 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4] + b4_from_b25: + //SEG303 [145] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#0] -- register_copy + //SEG304 [145] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#1] -- register_copy + //SEG305 [145] phi (byte) keyboard_event_scan::col#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#2] -- vbuz1=vbuc1 + lda #0 + sta col + jmp b4 + //SEG306 [145] phi from keyboard_event_scan::@5 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4] + b4_from_b5: + //SEG307 [145] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#0] -- register_copy + //SEG308 [145] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#15 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#1] -- register_copy + //SEG309 [145] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#2] -- register_copy + jmp b4 + //SEG310 keyboard_event_scan::@4 + b4: + //SEG311 [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuz3 + lda row_scan + ldy row + eor keyboard_scan_values,y + sta _3 + //SEG312 [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + lda _3 + ldy col + and keyboard_matrix_col_bitmask,y + sta _4 + //SEG313 [148] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 -- vbuz1_eq_0_then_la1 + lda _4 + beq b5_from_b4 + jmp b15 + //SEG314 keyboard_event_scan::@15 + b15: + //SEG315 [149] if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@5 -- vbuz1_eq_vbuc1_then_la1 + lda keyboard_events_size + cmp #8 + beq b5_from_b15 + jmp b16 + //SEG316 keyboard_event_scan::@16 + b16: + //SEG317 [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + lda row_scan + ldy col + and keyboard_matrix_col_bitmask,y + sta event_type + //SEG318 [151] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 -- vbuz1_eq_0_then_la1 + lda event_type + beq b7 + jmp b17 + //SEG319 keyboard_event_scan::@17 + b17: + //SEG320 [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + lda keycode + ldy keyboard_events_size + sta keyboard_events,y + //SEG321 [153] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + inc keyboard_events_size + //SEG322 [154] phi from keyboard_event_scan::@15 keyboard_event_scan::@17 keyboard_event_scan::@4 keyboard_event_scan::@7 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@15/keyboard_event_scan::@17/keyboard_event_scan::@4/keyboard_event_scan::@7->keyboard_event_scan::@5] + b5_from_b15: + b5_from_b17: + b5_from_b4: + b5_from_b7: + //SEG323 [154] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#10 [phi:keyboard_event_scan::@15/keyboard_event_scan::@17/keyboard_event_scan::@4/keyboard_event_scan::@7->keyboard_event_scan::@5#0] -- register_copy + jmp b5 + //SEG324 keyboard_event_scan::@5 + b5: + //SEG325 [155] (byte) keyboard_event_scan::keycode#15 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + inc keycode + //SEG326 [156] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 + inc col + //SEG327 [157] if((byte) keyboard_event_scan::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@4 -- vbuz1_neq_vbuc1_then_la1 + lda col + cmp #8 + bne b4_from_b5 + jmp b19 + //SEG328 keyboard_event_scan::@19 + b19: + //SEG329 [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + lda row_scan + ldy row + sta keyboard_scan_values,y + jmp b3_from_b19 + //SEG330 keyboard_event_scan::@7 + b7: + //SEG331 [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 -- vbuz1=vbuz2_bor_vbuc1 + lda #$40 + ora keycode + sta _11 + //SEG332 [160] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte/word/dword~) keyboard_event_scan::$11 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _11 + ldy keyboard_events_size + sta keyboard_events,y + //SEG333 [161] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + inc keyboard_events_size + jmp b5_from_b7 +} +//SEG334 keyboard_matrix_read +keyboard_matrix_read: { + .label return = $48 + .label rowid = $39 + .label return_2 = $3a + //SEG335 [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + ldy rowid + lda keyboard_matrix_row_bitmask,y + sta CIA1_PORT_A + //SEG336 [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuz1=_bnot__deref_pbuc1 + lda CIA1_PORT_B + eor #$ff + sta return + jmp breturn + //SEG337 keyboard_matrix_read::@return + breturn: + //SEG338 [164] return + rts +} +//SEG339 init init: { - .label _4 = $14 - .label _7 = $15 - .label li = 6 - .label i = 5 - .label c = $b - .label line = 8 - .label l = $a - //SEG52 [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece - //SEG53 [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece+1 - //SEG54 [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece+2 - //SEG55 [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece+4 - //SEG56 [30] call fill - //SEG57 [49] phi from init to fill [phi:init->fill] + .label _4 = $49 + .label _7 = $4a + .label li = $18 + .label i = $17 + .label c = $1d + .label line = $1a + .label l = $1c + //SEG340 [166] call fill + //SEG341 [185] phi from init to fill [phi:init->fill] fill_from_init: - //SEG58 [49] phi (byte) fill::val#3 = (byte/word/signed word/dword/signed dword) 160 [phi:init->fill#0] -- vbuz1=vbuc1 + //SEG342 [185] phi (byte) fill::val#3 = (byte/word/signed word/dword/signed dword) 160 [phi:init->fill#0] -- vbuz1=vbuc1 lda #$a0 sta fill.val - //SEG59 [49] phi (byte*) fill::addr#0 = (const byte*) SCREEN#0 [phi:init->fill#1] -- pbuz1=pbuc1 + //SEG343 [185] phi (byte*) fill::addr#0 = (const byte*) SCREEN#0 [phi:init->fill#1] -- pbuz1=pbuc1 lda #SCREEN sta fill.addr+1 jsr fill - //SEG60 [31] phi from init to init::@7 [phi:init->init::@7] + //SEG344 [167] phi from init to init::@7 [phi:init->init::@7] b7_from_init: jmp b7 - //SEG61 init::@7 + //SEG345 init::@7 b7: - //SEG62 [32] call fill - //SEG63 [49] phi from init::@7 to fill [phi:init::@7->fill] + //SEG346 [168] call fill + //SEG347 [185] phi from init::@7 to fill [phi:init::@7->fill] fill_from_b7: - //SEG64 [49] phi (byte) fill::val#3 = (const byte) BLACK#0 [phi:init::@7->fill#0] -- vbuz1=vbuc1 + //SEG348 [185] phi (byte) fill::val#3 = (const byte) BLACK#0 [phi:init::@7->fill#0] -- vbuz1=vbuc1 lda #BLACK sta fill.val - //SEG65 [49] phi (byte*) fill::addr#0 = (const byte*) COLS#0 [phi:init::@7->fill#1] -- pbuz1=pbuc1 + //SEG349 [185] phi (byte*) fill::addr#0 = (const byte*) COLS#0 [phi:init::@7->fill#1] -- pbuz1=pbuc1 lda #COLS sta fill.addr+1 jsr fill - //SEG66 [33] phi from init::@7 to init::@1 [phi:init::@7->init::@1] + //SEG350 [169] phi from init::@7 to init::@1 [phi:init::@7->init::@1] b1_from_b7: - //SEG67 [33] phi (byte*) init::li#2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 [phi:init::@7->init::@1#0] -- pbuz1=pbuc1 + //SEG351 [169] phi (byte*) init::li#2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 [phi:init::@7->init::@1#0] -- pbuz1=pbuc1 lda #COLS+$28+$f sta li+1 - //SEG68 [33] phi (byte) init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@7->init::@1#1] -- vbuz1=vbuc1 + //SEG352 [169] phi (byte) init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@7->init::@1#1] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG69 [33] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + //SEG353 [169] phi from init::@1 to init::@1 [phi:init::@1->init::@1] b1_from_b1: - //SEG70 [33] phi (byte*) init::li#2 = (byte*) init::li#1 [phi:init::@1->init::@1#0] -- register_copy - //SEG71 [33] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#1] -- register_copy + //SEG354 [169] phi (byte*) init::li#2 = (byte*) init::li#1 [phi:init::@1->init::@1#0] -- register_copy + //SEG355 [169] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#1] -- register_copy jmp b1 - //SEG72 init::@1 + //SEG356 init::@1 b1: - //SEG73 [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 + //SEG357 [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _4 - //SEG74 [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 -- pptc1_derefidx_vbuz1=pbuz2 + //SEG358 [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy _4 lda li sta screen_lines,y lda li+1 sta screen_lines+1,y - //SEG75 [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 + //SEG359 [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 lda li clc adc #$28 @@ -926,43 +4740,43 @@ init: { bcc !+ inc li+1 !: - //SEG76 [37] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 + //SEG360 [173] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG77 [38] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG361 [174] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 -- vbuz1_neq_vbuc1_then_la1 lda i cmp #$14 bne b1_from_b1 - //SEG78 [39] phi from init::@1 to init::@2 [phi:init::@1->init::@2] + //SEG362 [175] phi from init::@1 to init::@2 [phi:init::@1->init::@2] b2_from_b1: - //SEG79 [39] phi (byte) init::l#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@1->init::@2#0] -- vbuz1=vbuc1 + //SEG363 [175] phi (byte) init::l#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@1->init::@2#0] -- vbuz1=vbuc1 lda #0 sta l - //SEG80 [39] phi (byte*) init::line#4 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 [phi:init::@1->init::@2#1] -- pbuz1=pbuc1 + //SEG364 [175] phi (byte*) init::line#4 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 [phi:init::@1->init::@2#1] -- pbuz1=pbuc1 lda #COLS+$e sta line+1 jmp b2 - //SEG81 [39] phi from init::@5 to init::@2 [phi:init::@5->init::@2] + //SEG365 [175] phi from init::@5 to init::@2 [phi:init::@5->init::@2] b2_from_b5: - //SEG82 [39] phi (byte) init::l#4 = (byte) init::l#1 [phi:init::@5->init::@2#0] -- register_copy - //SEG83 [39] phi (byte*) init::line#4 = (byte*) init::line#1 [phi:init::@5->init::@2#1] -- register_copy + //SEG366 [175] phi (byte) init::l#4 = (byte) init::l#1 [phi:init::@5->init::@2#0] -- register_copy + //SEG367 [175] phi (byte*) init::line#4 = (byte*) init::line#1 [phi:init::@5->init::@2#1] -- register_copy jmp b2 - //SEG84 init::@2 + //SEG368 init::@2 b2: - //SEG85 [40] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + //SEG369 [176] phi from init::@2 to init::@3 [phi:init::@2->init::@3] b3_from_b2: - //SEG86 [40] phi (byte) init::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@2->init::@3#0] -- vbuz1=vbuc1 + //SEG370 [176] phi (byte) init::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@2->init::@3#0] -- vbuz1=vbuc1 lda #0 sta c jmp b3 - //SEG87 [40] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + //SEG371 [176] phi from init::@3 to init::@3 [phi:init::@3->init::@3] b3_from_b3: - //SEG88 [40] phi (byte) init::c#2 = (byte) init::c#1 [phi:init::@3->init::@3#0] -- register_copy + //SEG372 [176] phi (byte) init::c#2 = (byte) init::c#1 [phi:init::@3->init::@3#0] -- register_copy jmp b3 - //SEG89 init::@3 + //SEG373 init::@3 b3: - //SEG90 [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 -- pbuz1=pbuz2_plus_vbuz3 + //SEG374 [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 -- pbuz1=pbuz2_plus_vbuz3 lda c clc adc line @@ -970,20 +4784,20 @@ init: { lda #0 adc line+1 sta _7+1 - //SEG91 [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 -- _deref_pbuz1=vbuc1 + //SEG375 [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 -- _deref_pbuz1=vbuc1 lda #DARK_GREY ldy #0 sta (_7),y - //SEG92 [43] (byte) init::c#1 ← ++ (byte) init::c#2 -- vbuz1=_inc_vbuz1 + //SEG376 [179] (byte) init::c#1 ← ++ (byte) init::c#2 -- vbuz1=_inc_vbuz1 inc c - //SEG93 [44] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG377 [180] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 -- vbuz1_neq_vbuc1_then_la1 lda c cmp #$c bne b3_from_b3 jmp b5 - //SEG94 init::@5 + //SEG378 init::@5 b5: - //SEG95 [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 + //SEG379 [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 lda line clc adc #$28 @@ -991,24 +4805,24 @@ init: { bcc !+ inc line+1 !: - //SEG96 [46] (byte) init::l#1 ← ++ (byte) init::l#4 -- vbuz1=_inc_vbuz1 + //SEG380 [182] (byte) init::l#1 ← ++ (byte) init::l#4 -- vbuz1=_inc_vbuz1 inc l - //SEG97 [47] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG381 [183] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 -- vbuz1_neq_vbuc1_then_la1 lda l cmp #$16 bne b2_from_b5 jmp breturn - //SEG98 init::@return + //SEG382 init::@return breturn: - //SEG99 [48] return + //SEG383 [184] return rts } -//SEG100 fill +//SEG384 fill fill: { - .label end = $17 - .label addr = $d - .label val = $c - //SEG101 [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 -- pbuz1=pbuz2_plus_vwuc1 + .label end = $4c + .label addr = $1f + .label val = $1e + //SEG385 [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 -- pbuz1=pbuz2_plus_vwuc1 lda addr clc adc #<$3e8 @@ -1016,23 +4830,23 @@ fill: { lda addr+1 adc #>$3e8 sta end+1 - //SEG102 [51] phi from fill fill::@1 to fill::@1 [phi:fill/fill::@1->fill::@1] + //SEG386 [187] phi from fill fill::@1 to fill::@1 [phi:fill/fill::@1->fill::@1] b1_from_fill: b1_from_b1: - //SEG103 [51] phi (byte*) fill::addr#2 = (byte*) fill::addr#0 [phi:fill/fill::@1->fill::@1#0] -- register_copy + //SEG387 [187] phi (byte*) fill::addr#2 = (byte*) fill::addr#0 [phi:fill/fill::@1->fill::@1#0] -- register_copy jmp b1 - //SEG104 fill::@1 + //SEG388 fill::@1 b1: - //SEG105 [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 -- _deref_pbuz1=vbuz2 + //SEG389 [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 -- _deref_pbuz1=vbuz2 lda val ldy #0 sta (addr),y - //SEG106 [53] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 -- pbuz1=_inc_pbuz1 + //SEG390 [189] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 -- pbuz1=_inc_pbuz1 inc addr bne !+ inc addr+1 !: - //SEG107 [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -- pbuz1_neq_pbuz2_then_la1 + //SEG391 [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -- pbuz1_neq_pbuz2_then_la1 lda addr+1 cmp end+1 bne b1_from_b1 @@ -1040,109 +4854,331 @@ fill: { cmp end bne b1_from_b1 jmp breturn - //SEG108 fill::@return + //SEG392 fill::@return breturn: - //SEG109 [55] return + //SEG393 [191] return rts } + keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f + keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80 + keyboard_events: .fill 8, 0 + keyboard_scan_values: .fill 8, 0 screen_lines: .fill 2*$14, 0 + .align $40 + piece_t: .byte 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 playfield: .fill $14*$a, 0 - current_piece: .fill 4*4, 0 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Statement [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ) always clobbers reg byte a -Statement [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ render_playfield::c#2 render_playfield::c#1 ] -Statement [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ render_playfield::c#2 render_playfield::c#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Statement [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ init::i#2 init::li#2 init::$4 ] ( main:2::init:5 [ init::i#2 init::li#2 init::$4 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ init::i#2 init::i#1 ] -Statement [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 [ init::i#2 init::li#2 ] ( main:2::init:5 [ init::i#2 init::li#2 ] ) always clobbers reg byte a -Statement [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::i#2 init::li#1 ] ( main:2::init:5 [ init::i#2 init::li#1 ] ) always clobbers reg byte a -Statement [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 [ init::line#4 init::l#4 init::c#2 init::$7 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 init::$7 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ init::l#4 init::l#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ init::c#2 init::c#1 ] -Statement [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 [ init::line#4 init::l#4 init::c#2 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ init::l#4 init::l#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ init::c#2 init::c#1 ] -Statement [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::l#4 init::line#1 ] ( main:2::init:5 [ init::l#4 init::line#1 ] ) always clobbers reg byte a -Statement [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 [ fill::addr#0 fill::val#3 fill::end#0 ] ( main:2::init:5::fill:30 [ fill::addr#0 fill::val#3 fill::end#0 ] main:2::init:5::fill:32 [ fill::addr#0 fill::val#3 fill::end#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ fill::val#3 ] -Statement [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 [ fill::val#3 fill::end#0 fill::addr#2 ] ( main:2::init:5::fill:30 [ fill::val#3 fill::end#0 fill::addr#2 ] main:2::init:5::fill:32 [ fill::val#3 fill::end#0 fill::addr#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:12 [ fill::val#3 ] -Statement [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 [ fill::val#3 fill::end#0 fill::addr#1 ] ( main:2::init:5::fill:30 [ fill::val#3 fill::end#0 fill::addr#1 ] main:2::init:5::fill:32 [ fill::val#3 fill::end#0 fill::addr#1 ] ) always clobbers reg byte a -Statement [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a -Statement [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ) always clobbers reg byte a -Statement [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ) always clobbers reg byte a -Statement [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ) always clobbers reg byte a reg byte y -Statement [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 [ ] ( main:2::init:5 [ ] ) always clobbers reg byte a -Statement [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ init::i#2 init::li#2 init::$4 ] ( main:2::init:5 [ init::i#2 init::li#2 init::$4 ] ) always clobbers reg byte a -Statement [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 [ init::i#2 init::li#2 ] ( main:2::init:5 [ init::i#2 init::li#2 ] ) always clobbers reg byte a -Statement [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::i#2 init::li#1 ] ( main:2::init:5 [ init::i#2 init::li#1 ] ) always clobbers reg byte a -Statement [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 [ init::line#4 init::l#4 init::c#2 init::$7 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 init::$7 ] ) always clobbers reg byte a -Statement [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 [ init::line#4 init::l#4 init::c#2 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 ] ) always clobbers reg byte a reg byte y -Statement [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::l#4 init::line#1 ] ( main:2::init:5 [ init::l#4 init::line#1 ] ) always clobbers reg byte a -Statement [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 [ fill::addr#0 fill::val#3 fill::end#0 ] ( main:2::init:5::fill:30 [ fill::addr#0 fill::val#3 fill::end#0 ] main:2::init:5::fill:32 [ fill::addr#0 fill::val#3 fill::end#0 ] ) always clobbers reg byte a -Statement [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 [ fill::val#3 fill::end#0 fill::addr#2 ] ( main:2::init:5::fill:30 [ fill::val#3 fill::end#0 fill::addr#2 ] main:2::init:5::fill:32 [ fill::val#3 fill::end#0 fill::addr#2 ] ) always clobbers reg byte a reg byte y -Statement [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 [ fill::val#3 fill::end#0 fill::addr#1 ] ( main:2::init:5::fill:30 [ fill::val#3 fill::end#0 fill::addr#1 ] main:2::init:5::fill:32 [ fill::val#3 fill::end#0 fill::addr#1 ] ) always clobbers reg byte a -Potential registers zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] : zp ZP_BYTE:2 , reg byte x , -Potential registers zp ZP_BYTE:3 [ render_playfield::c#2 render_playfield::c#1 ] : zp ZP_BYTE:3 , reg byte x , -Potential registers zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] : zp ZP_BYTE:4 , reg byte x , -Potential registers zp ZP_BYTE:5 [ init::i#2 init::i#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:6 [ init::li#2 init::li#1 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ init::line#4 init::line#1 ] : zp ZP_WORD:8 , -Potential registers zp ZP_BYTE:10 [ init::l#4 init::l#1 ] : zp ZP_BYTE:10 , reg byte x , -Potential registers zp ZP_BYTE:11 [ init::c#2 init::c#1 ] : zp ZP_BYTE:11 , reg byte x , -Potential registers zp ZP_BYTE:12 [ fill::val#3 ] : zp ZP_BYTE:12 , reg byte x , -Potential registers zp ZP_WORD:13 [ fill::addr#2 fill::addr#0 fill::addr#1 ] : zp ZP_WORD:13 , -Potential registers zp ZP_BYTE:15 [ render_playfield::$0 ] : zp ZP_BYTE:15 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:16 [ render_playfield::line#0 ] : zp ZP_WORD:16 , -Potential registers zp ZP_WORD:18 [ render_playfield::$1 ] : zp ZP_WORD:18 , -Potential registers zp ZP_BYTE:20 [ init::$4 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:21 [ init::$7 ] : zp ZP_WORD:21 , -Potential registers zp ZP_WORD:23 [ fill::end#0 ] : zp ZP_WORD:23 , +Statement [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ( main:2 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +Statement [12] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@7 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ( main:2 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ) always clobbers reg byte a +Statement [37] (byte~) main::$19 ← (byte) main::key_event#0 & (byte/word/signed word/dword/signed dword) 128 [ current_piece_orientation#11 current_xpos#12 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#13 main::$19 ] ( main:2 [ current_piece_orientation#11 current_xpos#12 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#13 main::$19 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:34 [ main::key_event#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] +Statement [48] (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#11 - (byte/signed byte/word/signed word/dword/signed dword) 16 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 main::$28 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 main::$28 ] ) always clobbers reg byte a +Statement [49] (byte) current_piece_orientation#2 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 current_piece_orientation#2 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 current_piece_orientation#2 ] ) always clobbers reg byte a +Statement [53] (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 main::$32 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 main::$32 ] ) always clobbers reg byte a +Statement [54] (byte) current_piece_orientation#3 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 current_piece_orientation#3 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 current_piece_orientation#3 ] ) always clobbers reg byte a +Statement [66] (byte*) render_current::current_piece_gfx#0 ← (const byte[4*4*4]) piece_t#0 + (byte) current_piece_orientation#13 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] +Statement [68] (byte~) render_current::$1 ← (byte) current_ypos#14 + (byte) render_current::l#2 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$1 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$1 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] +Statement [69] (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$2 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$2 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$2 ] ) always clobbers reg byte a +Statement [70] (byte*) render_current::screen_line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_current::$2) [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::screen_line#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::screen_line#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::screen_line#0 ] ) always clobbers reg byte a +Statement [72] (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#0 + (byte) render_current::i#2) [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::screen_line#0 render_current::i#2 render_current::c#2 render_current::current_cell#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::screen_line#0 render_current::i#2 render_current::c#2 render_current::current_cell#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::screen_line#0 render_current::i#2 render_current::c#2 render_current::current_cell#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] +Statement [75] (byte) render_current::xpos#0 ← (byte) current_xpos#26 + (byte) render_current::c#2 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 render_current::current_cell#0 render_current::xpos#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 render_current::current_cell#0 render_current::xpos#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 render_current::current_cell#0 render_current::xpos#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:46 [ render_current::current_cell#0 ] +Statement [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 ] ) always clobbers reg byte a +Statement [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Statement [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ) always clobbers reg byte a +Statement [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] +Statement [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:22 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +Statement [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:2::keyboard_event_pressed:23 [ current_piece_orientation#11 current_ypos#13 current_xpos#12 keyboard_events_size#16 main::key_event#0 current_movedown_counter#1 main::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:121 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:127 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:133 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:139 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] +Statement [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::keyboard_event_pressed:23 [ current_piece_orientation#11 current_ypos#13 current_xpos#12 keyboard_events_size#16 main::key_event#0 current_movedown_counter#1 main::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:121 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:127 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:133 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:139 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] +Statement [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:2::keyboard_event_pressed:23 [ current_piece_orientation#11 current_ypos#13 current_xpos#12 keyboard_events_size#16 main::key_event#0 current_movedown_counter#1 main::movedown#10 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:121 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:127 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:133 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:139 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 [ keyboard_event_scan::row#2 keyboard_events_size#29 keyboard_event_scan::keycode#1 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_events_size#29 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Statement [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$3 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$3 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] +Statement [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$4 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$4 ] ) always clobbers reg byte a +Statement [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#15 keyboard_events_size#30 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#15 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$11 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$11 ] ) always clobbers reg byte a +Statement [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::keyboard_event_scan:14::keyboard_matrix_read:112 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#29 ] ) always clobbers reg byte a +Statement [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_event_scan:14::keyboard_matrix_read:112 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#29 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ init::i#2 init::li#2 init::$4 ] ( main:2::init:5 [ init::i#2 init::li#2 init::$4 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ init::i#2 init::i#1 ] +Statement [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 [ init::i#2 init::li#2 ] ( main:2::init:5 [ init::i#2 init::li#2 ] ) always clobbers reg byte a +Statement [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::i#2 init::li#1 ] ( main:2::init:5 [ init::i#2 init::li#1 ] ) always clobbers reg byte a +Statement [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 [ init::line#4 init::l#4 init::c#2 init::$7 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 init::$7 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:28 [ init::l#4 init::l#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ init::c#2 init::c#1 ] +Statement [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 [ init::line#4 init::l#4 init::c#2 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:28 [ init::l#4 init::l#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:29 [ init::c#2 init::c#1 ] +Statement [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::l#4 init::line#1 ] ( main:2::init:5 [ init::l#4 init::line#1 ] ) always clobbers reg byte a +Statement [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 [ fill::addr#0 fill::val#3 fill::end#0 ] ( main:2::init:5::fill:166 [ fill::addr#0 fill::val#3 fill::end#0 ] main:2::init:5::fill:168 [ fill::addr#0 fill::val#3 fill::end#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:30 [ fill::val#3 ] +Statement [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 [ fill::val#3 fill::end#0 fill::addr#2 ] ( main:2::init:5::fill:166 [ fill::val#3 fill::end#0 fill::addr#2 ] main:2::init:5::fill:168 [ fill::val#3 fill::end#0 fill::addr#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:30 [ fill::val#3 ] +Statement [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 [ fill::val#3 fill::end#0 fill::addr#1 ] ( main:2::init:5::fill:166 [ fill::val#3 fill::end#0 fill::addr#1 ] main:2::init:5::fill:168 [ fill::val#3 fill::end#0 fill::addr#1 ] ) always clobbers reg byte a +Statement [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ( main:2 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ) always clobbers reg byte a +Statement [12] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@7 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ( main:2 [ current_piece_orientation#11 keyboard_events_size#19 current_movedown_counter#14 current_ypos#13 current_xpos#12 ] ) always clobbers reg byte a +Statement [37] (byte~) main::$19 ← (byte) main::key_event#0 & (byte/word/signed word/dword/signed dword) 128 [ current_piece_orientation#11 current_xpos#12 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#13 main::$19 ] ( main:2 [ current_piece_orientation#11 current_xpos#12 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#13 main::$19 ] ) always clobbers reg byte a +Statement [48] (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#11 - (byte/signed byte/word/signed word/dword/signed dword) 16 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 main::$28 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 main::$28 ] ) always clobbers reg byte a +Statement [49] (byte) current_piece_orientation#2 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 current_piece_orientation#2 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 main::key_event#0 main::render#10 current_xpos#34 current_piece_orientation#2 ] ) always clobbers reg byte a +Statement [53] (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 main::$32 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 main::$32 ] ) always clobbers reg byte a +Statement [54] (byte) current_piece_orientation#3 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 current_piece_orientation#3 ] ( main:2 [ keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#34 main::render#11 current_piece_orientation#3 ] ) always clobbers reg byte a +Statement [66] (byte*) render_current::current_piece_gfx#0 ← (const byte[4*4*4]) piece_t#0 + (byte) current_piece_orientation#13 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 ] ) always clobbers reg byte a +Statement [68] (byte~) render_current::$1 ← (byte) current_ypos#14 + (byte) render_current::l#2 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$1 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$1 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$1 ] ) always clobbers reg byte a +Statement [69] (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$2 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$2 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::$2 ] ) always clobbers reg byte a +Statement [70] (byte*) render_current::screen_line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_current::$2) [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::screen_line#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::screen_line#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#3 render_current::screen_line#0 ] ) always clobbers reg byte a +Statement [72] (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#0 + (byte) render_current::i#2) [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::screen_line#0 render_current::i#2 render_current::c#2 render_current::current_cell#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::screen_line#0 render_current::i#2 render_current::c#2 render_current::current_cell#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::screen_line#0 render_current::i#2 render_current::c#2 render_current::current_cell#0 ] ) always clobbers reg byte a +Statement [75] (byte) render_current::xpos#0 ← (byte) current_xpos#26 + (byte) render_current::c#2 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 render_current::current_cell#0 render_current::xpos#0 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 render_current::current_cell#0 render_current::xpos#0 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 render_current::current_cell#0 render_current::xpos#0 ] ) always clobbers reg byte a +Statement [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 ] ( main:2::render_current:9 [ current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 ] main:2::render_current:63 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 current_ypos#14 current_xpos#26 render_current::current_piece_gfx#0 render_current::l#2 render_current::i#1 render_current::screen_line#0 render_current::c#2 ] ) always clobbers reg byte a +Statement [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a +Statement [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::i#3 render_playfield::line#0 ] ) always clobbers reg byte a +Statement [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 render_playfield::$1 ] ) always clobbers reg byte a +Statement [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ( main:2::render_playfield:7 [ render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] main:2::render_playfield:59 [ current_piece_orientation#21 keyboard_events_size#16 current_movedown_counter#16 current_ypos#17 current_xpos#15 render_playfield::l#2 render_playfield::line#0 render_playfield::c#2 render_playfield::i#2 ] ) always clobbers reg byte a reg byte y +Statement [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:2::keyboard_event_pressed:23 [ current_piece_orientation#11 current_ypos#13 current_xpos#12 keyboard_events_size#16 main::key_event#0 current_movedown_counter#1 main::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:121 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:127 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:133 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:139 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::keyboard_event_pressed:23 [ current_piece_orientation#11 current_ypos#13 current_xpos#12 keyboard_events_size#16 main::key_event#0 current_movedown_counter#1 main::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:121 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:127 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:133 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:139 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:2::keyboard_event_pressed:23 [ current_piece_orientation#11 current_ypos#13 current_xpos#12 keyboard_events_size#16 main::key_event#0 current_movedown_counter#1 main::movedown#10 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:121 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:127 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:133 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:2::keyboard_event_scan:14::keyboard_event_pressed:139 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [115] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@4 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#29 keyboard_event_scan::row_scan#0 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#29 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a +Statement [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 [ keyboard_event_scan::row#2 keyboard_events_size#29 keyboard_event_scan::keycode#1 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_events_size#29 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a +Statement [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$3 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$3 ] ) always clobbers reg byte a +Statement [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$4 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$4 ] ) always clobbers reg byte a +Statement [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#15 keyboard_events_size#30 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#15 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$11 ] ( main:2::keyboard_event_scan:14 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$11 ] ) always clobbers reg byte a +Statement [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::keyboard_event_scan:14::keyboard_matrix_read:112 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#29 ] ) always clobbers reg byte a +Statement [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) [ keyboard_matrix_read::return#0 ] ( main:2::keyboard_event_scan:14::keyboard_matrix_read:112 [ current_piece_orientation#11 current_movedown_counter#14 current_ypos#13 current_xpos#12 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#29 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ init::i#2 init::li#2 init::$4 ] ( main:2::init:5 [ init::i#2 init::li#2 init::$4 ] ) always clobbers reg byte a +Statement [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 [ init::i#2 init::li#2 ] ( main:2::init:5 [ init::i#2 init::li#2 ] ) always clobbers reg byte a +Statement [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::i#2 init::li#1 ] ( main:2::init:5 [ init::i#2 init::li#1 ] ) always clobbers reg byte a +Statement [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 [ init::line#4 init::l#4 init::c#2 init::$7 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 init::$7 ] ) always clobbers reg byte a +Statement [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 [ init::line#4 init::l#4 init::c#2 ] ( main:2::init:5 [ init::line#4 init::l#4 init::c#2 ] ) always clobbers reg byte a reg byte y +Statement [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 [ init::l#4 init::line#1 ] ( main:2::init:5 [ init::l#4 init::line#1 ] ) always clobbers reg byte a +Statement [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 [ fill::addr#0 fill::val#3 fill::end#0 ] ( main:2::init:5::fill:166 [ fill::addr#0 fill::val#3 fill::end#0 ] main:2::init:5::fill:168 [ fill::addr#0 fill::val#3 fill::end#0 ] ) always clobbers reg byte a +Statement [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 [ fill::val#3 fill::end#0 fill::addr#2 ] ( main:2::init:5::fill:166 [ fill::val#3 fill::end#0 fill::addr#2 ] main:2::init:5::fill:168 [ fill::val#3 fill::end#0 fill::addr#2 ] ) always clobbers reg byte a reg byte y +Statement [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 [ fill::val#3 fill::end#0 fill::addr#1 ] ( main:2::init:5::fill:166 [ fill::val#3 fill::end#0 fill::addr#1 ] main:2::init:5::fill:168 [ fill::val#3 fill::end#0 fill::addr#1 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] : zp ZP_BYTE:2 , reg byte x , +Potential registers zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] : zp ZP_BYTE:3 , reg byte x , +Potential registers zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] : zp ZP_BYTE:4 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] : zp ZP_BYTE:5 , reg byte x , +Potential registers zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] : zp ZP_BYTE:6 , reg byte x , +Potential registers zp ZP_BYTE:7 [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:8 [ current_piece_orientation#13 current_piece_orientation#66 ] : zp ZP_BYTE:8 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] : zp ZP_BYTE:9 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] : zp ZP_BYTE:11 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] : zp ZP_BYTE:12 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] : zp ZP_BYTE:13 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] : zp ZP_BYTE:14 , reg byte x , +Potential registers zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] : zp ZP_BYTE:15 , reg byte x , +Potential registers zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] : zp ZP_BYTE:16 , reg byte x , +Potential registers zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] : zp ZP_BYTE:17 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:18 [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] : zp ZP_BYTE:18 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] : zp ZP_BYTE:19 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:22 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] : zp ZP_BYTE:22 , reg byte x , +Potential registers zp ZP_BYTE:23 [ init::i#2 init::i#1 ] : zp ZP_BYTE:23 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:24 [ init::li#2 init::li#1 ] : zp ZP_WORD:24 , +Potential registers zp ZP_WORD:26 [ init::line#4 init::line#1 ] : zp ZP_WORD:26 , +Potential registers zp ZP_BYTE:28 [ init::l#4 init::l#1 ] : zp ZP_BYTE:28 , reg byte x , +Potential registers zp ZP_BYTE:29 [ init::c#2 init::c#1 ] : zp ZP_BYTE:29 , reg byte x , +Potential registers zp ZP_BYTE:30 [ fill::val#3 ] : zp ZP_BYTE:30 , reg byte x , +Potential registers zp ZP_WORD:31 [ fill::addr#2 fill::addr#0 fill::addr#1 ] : zp ZP_WORD:31 , +Potential registers zp ZP_BYTE:33 [ keyboard_event_get::return#3 ] : zp ZP_BYTE:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:34 [ main::key_event#0 ] : zp ZP_BYTE:34 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:35 [ keyboard_event_pressed::return#12 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:36 [ main::$9 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:37 [ main::$19 ] : zp ZP_BYTE:37 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:38 [ main::$28 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:39 [ main::$32 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:40 [ render_current::current_piece_gfx#0 ] : zp ZP_WORD:40 , +Potential registers zp ZP_BYTE:42 [ render_current::$1 ] : zp ZP_BYTE:42 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:43 [ render_current::$2 ] : zp ZP_BYTE:43 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:44 [ render_current::screen_line#0 ] : zp ZP_WORD:44 , +Potential registers zp ZP_BYTE:46 [ render_current::current_cell#0 ] : zp ZP_BYTE:46 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:47 [ render_current::xpos#0 ] : zp ZP_BYTE:47 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:48 [ render_playfield::$0 ] : zp ZP_BYTE:48 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:49 [ render_playfield::line#0 ] : zp ZP_WORD:49 , +Potential registers zp ZP_WORD:51 [ render_playfield::$1 ] : zp ZP_WORD:51 , +Potential registers zp ZP_BYTE:53 [ keyboard_event_pressed::$0 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] : zp ZP_BYTE:54 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:55 [ keyboard_event_pressed::$1 ] : zp ZP_BYTE:55 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:56 [ keyboard_event_pressed::return#11 ] : zp ZP_BYTE:56 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:57 [ keyboard_matrix_read::rowid#0 ] : zp ZP_BYTE:57 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:58 [ keyboard_matrix_read::return#2 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] : zp ZP_BYTE:59 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:60 [ keyboard_event_pressed::return#0 ] : zp ZP_BYTE:60 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:61 [ keyboard_event_scan::$14 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:62 [ keyboard_event_pressed::return#1 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:63 [ keyboard_event_scan::$18 ] : zp ZP_BYTE:63 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:64 [ keyboard_event_pressed::return#2 ] : zp ZP_BYTE:64 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:65 [ keyboard_event_scan::$22 ] : zp ZP_BYTE:65 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:66 [ keyboard_event_pressed::return#10 ] : zp ZP_BYTE:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:67 [ keyboard_event_scan::$26 ] : zp ZP_BYTE:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:68 [ keyboard_event_scan::$3 ] : zp ZP_BYTE:68 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:69 [ keyboard_event_scan::$4 ] : zp ZP_BYTE:69 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:70 [ keyboard_event_scan::event_type#0 ] : zp ZP_BYTE:70 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:71 [ keyboard_event_scan::$11 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:72 [ keyboard_matrix_read::return#0 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:73 [ init::$4 ] : zp ZP_BYTE:73 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:74 [ init::$7 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ fill::end#0 ] : zp ZP_WORD:76 , REGISTER UPLIFT SCOPES -Uplift Scope [render_playfield] 227.25: zp ZP_BYTE:3 [ render_playfield::c#2 render_playfield::c#1 ] 202: zp ZP_WORD:18 [ render_playfield::$1 ] 154.6: zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] 22: zp ZP_BYTE:15 [ render_playfield::$0 ] 20.17: zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] 16: zp ZP_WORD:16 [ render_playfield::line#0 ] -Uplift Scope [init] 252.5: zp ZP_BYTE:11 [ init::c#2 init::c#1 ] 202: zp ZP_WORD:21 [ init::$7 ] 27.83: zp ZP_WORD:8 [ init::line#4 init::line#1 ] 24.75: zp ZP_BYTE:5 [ init::i#2 init::i#1 ] 22: zp ZP_BYTE:20 [ init::$4 ] 19.64: zp ZP_BYTE:10 [ init::l#4 init::l#1 ] 18.33: zp ZP_WORD:6 [ init::li#2 init::li#1 ] -Uplift Scope [fill] 36: zp ZP_WORD:13 [ fill::addr#2 fill::addr#0 fill::addr#1 ] 2.6: zp ZP_WORD:23 [ fill::end#0 ] 1.83: zp ZP_BYTE:12 [ fill::val#3 ] -Uplift Scope [main] -Uplift Scope [render_current_piece] -Uplift Scope [] +Uplift Scope [keyboard_event_scan] 20,002: zp ZP_BYTE:68 [ keyboard_event_scan::$3 ] 20,002: zp ZP_BYTE:69 [ keyboard_event_scan::$4 ] 20,002: zp ZP_BYTE:70 [ keyboard_event_scan::event_type#0 ] 20,002: zp ZP_BYTE:71 [ keyboard_event_scan::$11 ] 17,858.93: zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] 11,908.48: zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] 2,101.74: zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] 1,278.06: zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] 4: zp ZP_BYTE:61 [ keyboard_event_scan::$14 ] 4: zp ZP_BYTE:63 [ keyboard_event_scan::$18 ] 4: zp ZP_BYTE:65 [ keyboard_event_scan::$22 ] 4: zp ZP_BYTE:67 [ keyboard_event_scan::$26 ] +Uplift Scope [] 58,860.52: zp ZP_BYTE:22 [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] 505.57: zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] 462.25: zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] 81.53: zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] 57.94: zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] 54.14: zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] 20.33: zp ZP_BYTE:8 [ current_piece_orientation#13 current_piece_orientation#66 ] 17.59: zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] +Uplift Scope [render_current] 1,930.5: zp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] 1,836.17: zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] 1,501.5: zp ZP_BYTE:47 [ render_current::xpos#0 ] 600.6: zp ZP_BYTE:46 [ render_current::current_cell#0 ] 202: zp ZP_BYTE:42 [ render_current::$1 ] 202: zp ZP_BYTE:43 [ render_current::$2 ] 174.81: zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] 110.2: zp ZP_WORD:44 [ render_current::screen_line#0 ] 62.69: zp ZP_WORD:40 [ render_current::current_piece_gfx#0 ] +Uplift Scope [render_playfield] 2,252.25: zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] 2,002: zp ZP_WORD:51 [ render_playfield::$1 ] 1,522.6: zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] 202: zp ZP_BYTE:48 [ render_playfield::$0 ] 185.17: zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] 157.43: zp ZP_WORD:49 [ render_playfield::line#0 ] +Uplift Scope [main] 1,609.27: zp ZP_BYTE:7 [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] 1,010: zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] 202: zp ZP_BYTE:36 [ main::$9 ] 202: zp ZP_BYTE:37 [ main::$19 ] 202: zp ZP_BYTE:38 [ main::$28 ] 202: zp ZP_BYTE:39 [ main::$32 ] 20.79: zp ZP_BYTE:34 [ main::key_event#0 ] +Uplift Scope [keyboard_matrix_read] 2,002: zp ZP_BYTE:58 [ keyboard_matrix_read::return#2 ] 1,003: zp ZP_BYTE:57 [ keyboard_matrix_read::rowid#0 ] 334.33: zp ZP_BYTE:72 [ keyboard_matrix_read::return#0 ] +Uplift Scope [init] 252.5: zp ZP_BYTE:29 [ init::c#2 init::c#1 ] 202: zp ZP_WORD:74 [ init::$7 ] 27.83: zp ZP_WORD:26 [ init::line#4 init::line#1 ] 24.75: zp ZP_BYTE:23 [ init::i#2 init::i#1 ] 22: zp ZP_BYTE:73 [ init::$4 ] 19.64: zp ZP_BYTE:28 [ init::l#4 init::l#1 ] 18.33: zp ZP_WORD:24 [ init::li#2 init::li#1 ] +Uplift Scope [keyboard_event_pressed] 202: zp ZP_BYTE:35 [ keyboard_event_pressed::return#12 ] 15.86: zp ZP_BYTE:56 [ keyboard_event_pressed::return#11 ] 4: zp ZP_BYTE:53 [ keyboard_event_pressed::$0 ] 4: zp ZP_BYTE:55 [ keyboard_event_pressed::$1 ] 4: zp ZP_BYTE:60 [ keyboard_event_pressed::return#0 ] 4: zp ZP_BYTE:62 [ keyboard_event_pressed::return#1 ] 4: zp ZP_BYTE:64 [ keyboard_event_pressed::return#2 ] 4: zp ZP_BYTE:66 [ keyboard_event_pressed::return#10 ] 2: zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] 1.33: zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] +Uplift Scope [keyboard_event_get] 202: zp ZP_BYTE:33 [ keyboard_event_get::return#3 ] 38.33: zp ZP_BYTE:18 [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +Uplift Scope [fill] 36: zp ZP_WORD:31 [ fill::addr#2 fill::addr#0 fill::addr#1 ] 2.6: zp ZP_WORD:76 [ fill::end#0 ] 1.83: zp ZP_BYTE:30 [ fill::val#3 ] +Uplift Scope [current_movedown] -Uplifting [render_playfield] best 13740 combination reg byte x [ render_playfield::c#2 render_playfield::c#1 ] zp ZP_WORD:18 [ render_playfield::$1 ] zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$0 ] zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] zp ZP_WORD:16 [ render_playfield::line#0 ] -Uplifting [init] best 12600 combination reg byte x [ init::c#2 init::c#1 ] zp ZP_WORD:21 [ init::$7 ] zp ZP_WORD:8 [ init::line#4 init::line#1 ] reg byte x [ init::i#2 init::i#1 ] reg byte a [ init::$4 ] zp ZP_BYTE:10 [ init::l#4 init::l#1 ] zp ZP_WORD:6 [ init::li#2 init::li#1 ] -Uplifting [fill] best 12584 combination zp ZP_WORD:13 [ fill::addr#2 fill::addr#0 fill::addr#1 ] zp ZP_WORD:23 [ fill::end#0 ] reg byte x [ fill::val#3 ] -Uplifting [main] best 12584 combination -Uplifting [render_current_piece] best 12584 combination -Uplifting [] best 12584 combination -Attempting to uplift remaining variables inzp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Uplifting [render_playfield] best 12584 combination zp ZP_BYTE:4 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] -Uplifting [render_playfield] best 12584 combination zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:10 [ init::l#4 init::l#1 ] -Uplifting [init] best 12584 combination zp ZP_BYTE:10 [ init::l#4 init::l#1 ] -Coalescing zero page register [ zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 ] ] with [ zp ZP_BYTE:10 [ init::l#4 init::l#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init::li#2 init::li#1 ] ] with [ zp ZP_WORD:8 [ init::line#4 init::line#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init::li#2 init::li#1 init::line#4 init::line#1 ] ] with [ zp ZP_WORD:13 [ fill::addr#2 fill::addr#0 fill::addr#1 ] ] -Coalescing zero page register [ zp ZP_WORD:6 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 ] ] with [ zp ZP_WORD:16 [ render_playfield::line#0 ] ] -Coalescing zero page register [ zp ZP_WORD:18 [ render_playfield::$1 ] ] with [ zp ZP_WORD:21 [ init::$7 ] ] -Coalescing zero page register [ zp ZP_WORD:18 [ render_playfield::$1 init::$7 ] ] with [ zp ZP_WORD:23 [ fill::end#0 ] ] -Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:3 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_playfield::line#0 ] -Allocated (was zp ZP_WORD:18) zp ZP_WORD:6 [ render_playfield::$1 init::$7 fill::end#0 ] +Uplifting [keyboard_event_scan] best 1581354 combination reg byte a [ keyboard_event_scan::$3 ] reg byte a [ keyboard_event_scan::$4 ] reg byte a [ keyboard_event_scan::event_type#0 ] reg byte a [ keyboard_event_scan::$11 ] zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:61 [ keyboard_event_scan::$14 ] zp ZP_BYTE:63 [ keyboard_event_scan::$18 ] zp ZP_BYTE:65 [ keyboard_event_scan::$22 ] zp ZP_BYTE:67 [ keyboard_event_scan::$26 ] +Limited combination testing to 100 combinations of 5308416 possible. +Uplifting [] best 1431047 combination reg byte x [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] zp ZP_BYTE:8 [ current_piece_orientation#13 current_piece_orientation#66 ] zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] +Limited combination testing to 100 combinations of 1152 possible. +Uplifting [render_current] best 1424047 combination zp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] reg byte a [ render_current::xpos#0 ] zp ZP_BYTE:46 [ render_current::current_cell#0 ] zp ZP_BYTE:42 [ render_current::$1 ] zp ZP_BYTE:43 [ render_current::$2 ] zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] zp ZP_WORD:44 [ render_current::screen_line#0 ] zp ZP_WORD:40 [ render_current::current_piece_gfx#0 ] +Limited combination testing to 100 combinations of 5184 possible. +Uplifting [render_playfield] best 1423647 combination zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] zp ZP_WORD:51 [ render_playfield::$1 ] zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$0 ] zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] zp ZP_WORD:49 [ render_playfield::line#0 ] +Uplifting [main] best 1420947 combination reg byte y [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] reg byte a [ main::$9 ] reg byte a [ main::$19 ] zp ZP_BYTE:38 [ main::$28 ] zp ZP_BYTE:39 [ main::$32 ] zp ZP_BYTE:34 [ main::key_event#0 ] +Limited combination testing to 100 combinations of 6912 possible. +Uplifting [keyboard_matrix_read] best 1408941 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte y [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [init] best 1407801 combination reg byte x [ init::c#2 init::c#1 ] zp ZP_WORD:74 [ init::$7 ] zp ZP_WORD:26 [ init::line#4 init::line#1 ] reg byte x [ init::i#2 init::i#1 ] reg byte a [ init::$4 ] zp ZP_BYTE:28 [ init::l#4 init::l#1 ] zp ZP_WORD:24 [ init::li#2 init::li#1 ] +Uplifting [keyboard_event_pressed] best 1406878 combination reg byte a [ keyboard_event_pressed::return#12 ] reg byte a [ keyboard_event_pressed::return#11 ] reg byte a [ keyboard_event_pressed::$0 ] reg byte a [ keyboard_event_pressed::$1 ] zp ZP_BYTE:60 [ keyboard_event_pressed::return#0 ] zp ZP_BYTE:62 [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:64 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:66 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] +Limited combination testing to 100 combinations of 589824 possible. +Uplifting [keyboard_event_get] best 1405972 combination reg byte a [ keyboard_event_get::return#3 ] reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +Uplifting [fill] best 1405956 combination zp ZP_WORD:31 [ fill::addr#2 fill::addr#0 fill::addr#1 ] zp ZP_WORD:76 [ fill::end#0 ] reg byte x [ fill::val#3 ] +Uplifting [current_movedown] best 1405956 combination +Attempting to uplift remaining variables inzp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Uplifting [keyboard_event_scan] best 1405956 combination zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] +Uplifting [keyboard_event_scan] best 1405956 combination zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] +Attempting to uplift remaining variables inzp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] +Uplifting [render_playfield] best 1405956 combination zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Uplifting [keyboard_event_scan] best 1405956 combination zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] +Uplifting [render_current] best 1405956 combination zp ZP_BYTE:13 [ render_current::c#2 render_current::c#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] +Uplifting [render_current] best 1405956 combination zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Uplifting [render_playfield] best 1405956 combination zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] +Uplifting [keyboard_event_scan] best 1405956 combination zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] +Uplifting [main] best 1405956 combination zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:46 [ render_current::current_cell#0 ] +Uplifting [render_current] best 1405956 combination zp ZP_BYTE:46 [ render_current::current_cell#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +Uplifting [] best 1405956 combination zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +Uplifting [] best 1405956 combination zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:38 [ main::$28 ] +Uplifting [main] best 1405356 combination reg byte a [ main::$28 ] +Attempting to uplift remaining variables inzp ZP_BYTE:39 [ main::$32 ] +Uplifting [main] best 1404756 combination reg byte a [ main::$32 ] +Attempting to uplift remaining variables inzp ZP_BYTE:42 [ render_current::$1 ] +Uplifting [render_current] best 1404156 combination reg byte a [ render_current::$1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:43 [ render_current::$2 ] +Uplifting [render_current] best 1403756 combination reg byte a [ render_current::$2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] +Uplifting [render_playfield] best 1403756 combination zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] +Uplifting [render_current] best 1403756 combination zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] +Uplifting [] best 1403756 combination zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +Uplifting [] best 1403756 combination zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +Uplifting [] best 1403756 combination zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:34 [ main::key_event#0 ] +Uplifting [main] best 1403756 combination zp ZP_BYTE:34 [ main::key_event#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:8 [ current_piece_orientation#13 current_piece_orientation#66 ] +Uplifting [] best 1403722 combination reg byte y [ current_piece_orientation#13 current_piece_orientation#66 ] +Attempting to uplift remaining variables inzp ZP_BYTE:28 [ init::l#4 init::l#1 ] +Uplifting [init] best 1403722 combination zp ZP_BYTE:28 [ init::l#4 init::l#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] +Uplifting [] best 1403722 combination zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] +Attempting to uplift remaining variables inzp ZP_BYTE:60 [ keyboard_event_pressed::return#0 ] +Uplifting [keyboard_event_pressed] best 1403716 combination reg byte a [ keyboard_event_pressed::return#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:61 [ keyboard_event_scan::$14 ] +Uplifting [keyboard_event_scan] best 1403712 combination reg byte a [ keyboard_event_scan::$14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:62 [ keyboard_event_pressed::return#1 ] +Uplifting [keyboard_event_pressed] best 1403706 combination reg byte a [ keyboard_event_pressed::return#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:63 [ keyboard_event_scan::$18 ] +Uplifting [keyboard_event_scan] best 1403702 combination reg byte a [ keyboard_event_scan::$18 ] +Attempting to uplift remaining variables inzp ZP_BYTE:64 [ keyboard_event_pressed::return#2 ] +Uplifting [keyboard_event_pressed] best 1403696 combination reg byte a [ keyboard_event_pressed::return#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:65 [ keyboard_event_scan::$22 ] +Uplifting [keyboard_event_scan] best 1403692 combination reg byte a [ keyboard_event_scan::$22 ] +Attempting to uplift remaining variables inzp ZP_BYTE:66 [ keyboard_event_pressed::return#10 ] +Uplifting [keyboard_event_pressed] best 1403686 combination reg byte a [ keyboard_event_pressed::return#10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:67 [ keyboard_event_scan::$26 ] +Uplifting [keyboard_event_scan] best 1403682 combination reg byte a [ keyboard_event_scan::$26 ] +Attempting to uplift remaining variables inzp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] +Uplifting [keyboard_event_pressed] best 1403682 combination zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] +Uplifting [keyboard_event_pressed] best 1403682 combination zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] +Coalescing zero page register [ zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 ] ] with [ zp ZP_BYTE:28 [ init::l#4 init::l#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 ] ] with [ zp ZP_BYTE:9 [ current_ypos#14 current_ypos#62 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 current_ypos#14 current_ypos#62 ] ] with [ zp ZP_BYTE:14 [ render_playfield::l#2 render_playfield::l#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 current_ypos#14 current_ypos#62 render_playfield::l#2 render_playfield::l#1 ] ] with [ zp ZP_BYTE:19 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 ] ] with [ zp ZP_BYTE:15 [ render_playfield::c#2 render_playfield::c#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 render_playfield::c#2 render_playfield::c#1 ] ] with [ zp ZP_BYTE:17 [ keyboard_event_pressed::keycode#5 ] ] +Coalescing zero page register [ zp ZP_BYTE:10 [ current_xpos#26 current_xpos#64 render_playfield::c#2 render_playfield::c#1 keyboard_event_pressed::keycode#5 ] ] with [ zp ZP_BYTE:20 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 ] ] with [ zp ZP_BYTE:16 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] ] with [ zp ZP_BYTE:21 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] ] +Coalescing zero page register [ zp ZP_BYTE:11 [ render_current::l#2 render_current::l#1 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 ] ] with [ zp ZP_BYTE:34 [ main::key_event#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 ] ] with [ zp ZP_BYTE:54 [ keyboard_event_pressed::row_bits#0 ] ] +Coalescing zero page register [ zp ZP_BYTE:12 [ render_current::i#2 render_current::i#3 render_current::i#1 keyboard_event_pressed::row_bits#0 ] ] with [ zp ZP_BYTE:59 [ keyboard_event_scan::row_scan#0 ] ] +Coalescing zero page register [ zp ZP_WORD:24 [ init::li#2 init::li#1 ] ] with [ zp ZP_WORD:26 [ init::line#4 init::line#1 ] ] +Coalescing zero page register [ zp ZP_WORD:24 [ init::li#2 init::li#1 init::line#4 init::line#1 ] ] with [ zp ZP_WORD:31 [ fill::addr#2 fill::addr#0 fill::addr#1 ] ] +Coalescing zero page register [ zp ZP_WORD:24 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 ] ] with [ zp ZP_WORD:40 [ render_current::current_piece_gfx#0 ] ] +Coalescing zero page register [ zp ZP_WORD:24 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_current::current_piece_gfx#0 ] ] with [ zp ZP_WORD:49 [ render_playfield::line#0 ] ] +Coalescing zero page register [ zp ZP_WORD:44 [ render_current::screen_line#0 ] ] with [ zp ZP_WORD:51 [ render_playfield::$1 ] ] +Coalescing zero page register [ zp ZP_WORD:44 [ render_current::screen_line#0 render_playfield::$1 ] ] with [ zp ZP_WORD:74 [ init::$7 ] ] +Coalescing zero page register [ zp ZP_WORD:44 [ render_current::screen_line#0 render_playfield::$1 init::$7 ] ] with [ zp ZP_WORD:76 [ fill::end#0 ] ] +Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:7 [ current_xpos#26 current_xpos#64 render_playfield::c#2 render_playfield::c#1 keyboard_event_pressed::keycode#5 keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:8 [ render_current::l#2 render_current::l#1 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 main::key_event#0 ] +Allocated (was zp ZP_BYTE:12) zp ZP_BYTE:9 [ render_current::i#2 render_current::i#3 render_current::i#1 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 ] +Allocated (was zp ZP_BYTE:13) zp ZP_BYTE:10 [ render_current::c#2 render_current::c#1 ] +Allocated (was zp ZP_WORD:24) zp ZP_WORD:11 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_current::current_piece_gfx#0 render_playfield::line#0 ] +Allocated (was zp ZP_WORD:44) zp ZP_WORD:13 [ render_current::screen_line#0 render_playfield::$1 init::$7 fill::end#0 ] +Allocated (was zp ZP_BYTE:46) zp ZP_BYTE:15 [ render_current::current_cell#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -1150,216 +5186,980 @@ ASSEMBLER BEFORE OPTIMIZATION :BasicUpstart(main) .pc = $80d "Program" //SEG1 Global Constants & labels + .label RASTER = $d012 .label BORDERCOL = $d020 .label COLS = $d800 + .label CIA1_PORT_A = $dc00 + .label CIA1_PORT_B = $dc01 .const BLACK = 0 - .const GREEN = 5 .const DARK_GREY = $b + .const KEY_Z = $c + .const KEY_LSHIFT = $f + .const KEY_X = $17 + .const KEY_DOT = $2c + .const KEY_COMMA = $2f + .const KEY_RSHIFT = $34 + .const KEY_CTRL = $3a + .const KEY_SPACE = $3c + .const KEY_COMMODORE = $3d .label SCREEN = $400 + .const current_movedown_rate = $32 + .const current_movedown_rate_fast = 5 + .label current_movedown_counter = 2 + .label current_xpos = 5 + .label current_piece_orientation = 6 + .label current_ypos = 3 + .label current_ypos_14 = 4 + .label current_xpos_26 = 7 + .label current_ypos_62 = 4 + .label current_xpos_64 = 7 //SEG2 @begin bbegin: -//SEG3 [1] phi from @begin to @8 [phi:@begin->@8] -b8_from_bbegin: - jmp b8 -//SEG4 @8 -b8: +//SEG3 [1] phi from @begin to @16 [phi:@begin->@16] +b16_from_bbegin: + jmp b16 +//SEG4 @16 +b16: //SEG5 [2] call main -//SEG6 [4] phi from @8 to main [phi:@8->main] -main_from_b8: +//SEG6 [4] phi from @16 to main [phi:@16->main] +main_from_b16: jsr main -//SEG7 [3] phi from @8 to @end [phi:@8->@end] -bend_from_b8: +//SEG7 [3] phi from @16 to @end [phi:@16->@end] +bend_from_b16: jmp bend //SEG8 @end bend: //SEG9 main main: { + .label key_event = 8 + .label movedown = 4 //SEG10 [5] call init + //SEG11 [165] phi from main to init [phi:main->init] + init_from_main: jsr init - //SEG11 [6] phi from main to main::@7 [phi:main->main::@7] - b7_from_main: - jmp b7 - //SEG12 main::@7 - b7: - //SEG13 [7] call render_playfield - //SEG14 [13] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] - render_playfield_from_b7: + //SEG12 [6] phi from main to main::@41 [phi:main->main::@41] + b41_from_main: + jmp b41 + //SEG13 main::@41 + b41: + //SEG14 [7] call render_playfield + //SEG15 [83] phi from main::@41 to render_playfield [phi:main::@41->render_playfield] + render_playfield_from_b41: jsr render_playfield - //SEG15 [8] phi from main::@7 to main::@8 [phi:main::@7->main::@8] - b8_from_b7: - jmp b8 - //SEG16 main::@8 - b8: - //SEG17 [9] call render_current_piece - //SEG18 [11] phi from main::@8 to render_current_piece [phi:main::@8->render_current_piece] - render_current_piece_from_b8: - jsr render_current_piece - jmp b2 - //SEG19 main::@2 - b2: - //SEG20 [10] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG16 [8] phi from main::@41 to main::@42 [phi:main::@41->main::@42] + b42_from_b41: + jmp b42 + //SEG17 main::@42 + b42: + //SEG18 [9] call render_current + //SEG19 [65] phi from main::@42 to render_current [phi:main::@42->render_current] + render_current_from_b42: + //SEG20 [65] phi (byte) current_xpos#26 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@42->render_current#0] -- vbuz1=vbuc1 + lda #3 + sta current_xpos_26 + //SEG21 [65] phi (byte) current_ypos#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->render_current#1] -- vbuz1=vbuc1 + lda #0 + sta current_ypos_14 + //SEG22 [65] phi (byte) current_piece_orientation#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->render_current#2] -- vbuyy=vbuc1 + ldy #0 + jsr render_current + //SEG23 [10] phi from main::@42 to main::@1 [phi:main::@42->main::@1] + b1_from_b42: + //SEG24 [10] phi (byte) current_xpos#12 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@42->main::@1#0] -- vbuz1=vbuc1 + lda #3 + sta current_xpos + //SEG25 [10] phi (byte) current_ypos#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta current_ypos + //SEG26 [10] phi (byte) current_movedown_counter#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#2] -- vbuz1=vbuc1 + lda #0 + sta current_movedown_counter + //SEG27 [10] phi (byte) keyboard_events_size#19 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#3] -- vbuxx=vbuc1 + ldx #0 + //SEG28 [10] phi (byte) current_piece_orientation#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#4] -- vbuz1=vbuc1 + lda #0 + sta current_piece_orientation + jmp b1 + //SEG29 [10] phi from main::@15 main::@49 to main::@1 [phi:main::@15/main::@49->main::@1] + b1_from_b15: + b1_from_b49: + //SEG30 [10] phi (byte) current_xpos#12 = (byte) current_xpos#15 [phi:main::@15/main::@49->main::@1#0] -- register_copy + //SEG31 [10] phi (byte) current_ypos#13 = (byte) current_ypos#17 [phi:main::@15/main::@49->main::@1#1] -- register_copy + //SEG32 [10] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#16 [phi:main::@15/main::@49->main::@1#2] -- register_copy + //SEG33 [10] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@15/main::@49->main::@1#3] -- register_copy + //SEG34 [10] phi (byte) current_piece_orientation#11 = (byte) current_piece_orientation#21 [phi:main::@15/main::@49->main::@1#4] -- register_copy + jmp b1 + //SEG35 main::@1 + b1: + jmp b4 + //SEG36 main::@4 + b4: + //SEG37 [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$ff + bne b4 + jmp b7 + //SEG38 main::@7 + b7: + //SEG39 [12] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@7 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$fe + bne b7 + //SEG40 [13] phi from main::@7 to main::@9 [phi:main::@7->main::@9] + b9_from_b7: + jmp b9 + //SEG41 main::@9 + b9: + //SEG42 [14] call keyboard_event_scan + //SEG43 [109] phi from main::@9 to keyboard_event_scan [phi:main::@9->keyboard_event_scan] + keyboard_event_scan_from_b9: + jsr keyboard_event_scan + //SEG44 [15] phi from main::@9 to main::@44 [phi:main::@9->main::@44] + b44_from_b9: + jmp b44 + //SEG45 main::@44 + b44: + //SEG46 [16] call keyboard_event_get + jsr keyboard_event_get + //SEG47 [17] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + // (byte) keyboard_event_get::return#3 = (byte) keyboard_event_get::return#2 // register copy reg byte a + jmp b45 + //SEG48 main::@45 + b45: + //SEG49 [18] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 -- vbuz1=vbuaa + sta key_event + //SEG50 [19] (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#14 -- vbuz1=_inc_vbuz1 + inc current_movedown_counter + //SEG51 [20] if((byte) main::key_event#0!=(const byte) KEY_SPACE#0) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_SPACE + bne b10_from_b45 + //SEG52 [21] phi from main::@45 to main::@29 [phi:main::@45->main::@29] + b29_from_b45: + jmp b29 + //SEG53 main::@29 + b29: + //SEG54 [22] phi from main::@29 to main::@10 [phi:main::@29->main::@10] + b10_from_b29: + //SEG55 [22] phi (byte) main::movedown#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@29->main::@10#0] -- vbuz1=vbuc1 + lda #1 + sta movedown + jmp b10 + //SEG56 [22] phi from main::@45 to main::@10 [phi:main::@45->main::@10] + b10_from_b45: + //SEG57 [22] phi (byte) main::movedown#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@45->main::@10#0] -- vbuz1=vbuc1 + lda #0 + sta movedown + jmp b10 + //SEG58 main::@10 + b10: + //SEG59 [23] call keyboard_event_pressed + //SEG60 [98] phi from main::@10 to keyboard_event_pressed [phi:main::@10->keyboard_event_pressed] + keyboard_event_pressed_from_b10: + //SEG61 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:main::@10->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_SPACE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG62 [24] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#12 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + jmp b46 + //SEG63 main::@46 + b46: + //SEG64 [25] (byte~) main::$9 ← (byte) keyboard_event_pressed::return#12 + // (byte~) main::$9 = (byte) keyboard_event_pressed::return#12 // register copy reg byte a + //SEG65 [26] if((byte~) main::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b11_from_b46 + jmp b30 + //SEG66 main::@30 + b30: + //SEG67 [27] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate_fast#0) goto main::@11 -- vbuz1_lt_vbuc1_then_la1 + lda current_movedown_counter + cmp #current_movedown_rate_fast + bcc b11_from_b30 + jmp b31 + //SEG68 main::@31 + b31: + //SEG69 [28] (byte) main::movedown#2 ← ++ (byte) main::movedown#10 -- vbuz1=_inc_vbuz1 + inc movedown + //SEG70 [29] phi from main::@30 main::@31 main::@46 to main::@11 [phi:main::@30/main::@31/main::@46->main::@11] + b11_from_b30: + b11_from_b31: + b11_from_b46: + //SEG71 [29] phi (byte) main::movedown#7 = (byte) main::movedown#10 [phi:main::@30/main::@31/main::@46->main::@11#0] -- register_copy + jmp b11 + //SEG72 main::@11 + b11: + //SEG73 [30] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate#0) goto main::@13 -- vbuz1_lt_vbuc1_then_la1 + lda current_movedown_counter + cmp #current_movedown_rate + bcc b13_from_b11 + jmp b32 + //SEG74 main::@32 + b32: + //SEG75 [31] (byte) main::movedown#3 ← ++ (byte) main::movedown#7 -- vbuz1=_inc_vbuz1 + inc movedown + //SEG76 [32] phi from main::@11 main::@32 to main::@13 [phi:main::@11/main::@32->main::@13] + b13_from_b11: + b13_from_b32: + //SEG77 [32] phi (byte) main::movedown#6 = (byte) main::movedown#7 [phi:main::@11/main::@32->main::@13#0] -- register_copy + jmp b13 + //SEG78 main::@13 + b13: + //SEG79 [33] if((byte) main::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@14 -- vbuz1_eq_0_then_la1 + lda movedown + beq b14_from_b13 + //SEG80 [34] phi from main::@13 to main::@33 [phi:main::@13->main::@33] + b33_from_b13: + jmp b33 + //SEG81 main::@33 + b33: + //SEG82 [35] call current_movedown + jsr current_movedown + //SEG83 [36] phi from main::@33 to main::@14 [phi:main::@33->main::@14] + b14_from_b33: + //SEG84 [36] phi (byte) current_ypos#17 = (byte) current_ypos#10 [phi:main::@33->main::@14#0] -- register_copy + //SEG85 [36] phi (byte) current_movedown_counter#16 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@33->main::@14#1] -- vbuz1=vbuc1 + lda #0 + sta current_movedown_counter + //SEG86 [36] phi (byte) main::render#13 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@33->main::@14#2] -- vbuyy=vbuc1 + ldy #1 + jmp b14 + //SEG87 [36] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + b14_from_b13: + //SEG88 [36] phi (byte) current_ypos#17 = (byte) current_ypos#13 [phi:main::@13->main::@14#0] -- register_copy + //SEG89 [36] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#1 [phi:main::@13->main::@14#1] -- register_copy + //SEG90 [36] phi (byte) main::render#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@13->main::@14#2] -- vbuyy=vbuc1 + ldy #0 + jmp b14 + //SEG91 main::@14 + b14: + //SEG92 [37] (byte~) main::$19 ← (byte) main::key_event#0 & (byte/word/signed word/dword/signed dword) 128 -- vbuaa=vbuz1_band_vbuc1 + lda #$80 + and key_event + //SEG93 [38] if((byte~) main::$19!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@15 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b15_from_b14 + jmp b34 + //SEG94 main::@34 + b34: + //SEG95 [39] if((byte) main::key_event#0!=(const byte) KEY_COMMA#0) goto main::@16 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_COMMA + bne b16_from_b34 + jmp b35 + //SEG96 main::@35 + b35: + //SEG97 [40] (byte) current_xpos#1 ← -- (byte) current_xpos#12 -- vbuz1=_dec_vbuz1 + dec current_xpos + //SEG98 [41] (byte) main::render#2 ← ++ (byte) main::render#13 -- vbuyy=_inc_vbuyy + iny + //SEG99 [42] phi from main::@34 main::@35 to main::@16 [phi:main::@34/main::@35->main::@16] + b16_from_b34: + b16_from_b35: + //SEG100 [42] phi (byte) main::render#16 = (byte) main::render#13 [phi:main::@34/main::@35->main::@16#0] -- register_copy + //SEG101 [42] phi (byte) current_xpos#11 = (byte) current_xpos#12 [phi:main::@34/main::@35->main::@16#1] -- register_copy + jmp b16 + //SEG102 main::@16 + b16: + //SEG103 [43] if((byte) main::key_event#0!=(const byte) KEY_DOT#0) goto main::@17 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_DOT + bne b17_from_b16 + jmp b36 + //SEG104 main::@36 + b36: + //SEG105 [44] (byte) current_xpos#2 ← ++ (byte) current_xpos#11 -- vbuz1=_inc_vbuz1 + inc current_xpos + //SEG106 [45] (byte) main::render#3 ← ++ (byte) main::render#16 -- vbuyy=_inc_vbuyy + iny + //SEG107 [46] phi from main::@16 main::@36 to main::@17 [phi:main::@16/main::@36->main::@17] + b17_from_b16: + b17_from_b36: + //SEG108 [46] phi (byte) current_xpos#34 = (byte) current_xpos#11 [phi:main::@16/main::@36->main::@17#0] -- register_copy + //SEG109 [46] phi (byte) main::render#10 = (byte) main::render#16 [phi:main::@16/main::@36->main::@17#1] -- register_copy + jmp b17 + //SEG110 main::@17 + b17: + //SEG111 [47] if((byte) main::key_event#0!=(const byte) KEY_Z#0) goto main::@18 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_Z + bne b18_from_b17 + jmp b37 + //SEG112 main::@37 + b37: + //SEG113 [48] (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#11 - (byte/signed byte/word/signed word/dword/signed dword) 16 -- vbuaa=vbuz1_minus_vbuc1 + lda current_piece_orientation + sec + sbc #$10 + //SEG114 [49] (byte) current_piece_orientation#2 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 -- vbuz1=vbuaa_band_vbuc1 + and #$3f + sta current_piece_orientation + //SEG115 [50] (byte) main::render#4 ← ++ (byte) main::render#10 -- vbuyy=_inc_vbuyy + iny + //SEG116 [51] phi from main::@17 main::@37 to main::@18 [phi:main::@17/main::@37->main::@18] + b18_from_b17: + b18_from_b37: + //SEG117 [51] phi (byte) main::render#11 = (byte) main::render#10 [phi:main::@17/main::@37->main::@18#0] -- register_copy + //SEG118 [51] phi (byte) current_piece_orientation#10 = (byte) current_piece_orientation#11 [phi:main::@17/main::@37->main::@18#1] -- register_copy + jmp b18 + //SEG119 main::@18 + b18: + //SEG120 [52] if((byte) main::key_event#0!=(const byte) KEY_X#0) goto main::@15 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_X + bne b15_from_b18 + jmp b38 + //SEG121 main::@38 + b38: + //SEG122 [53] (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 -- vbuaa=vbuz1_plus_vbuc1 + lda #$10 + clc + adc current_piece_orientation + //SEG123 [54] (byte) current_piece_orientation#3 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 -- vbuz1=vbuaa_band_vbuc1 + and #$3f + sta current_piece_orientation + //SEG124 [55] (byte) main::render#5 ← ++ (byte) main::render#11 -- vbuyy=_inc_vbuyy + iny + //SEG125 [56] phi from main::@14 main::@18 main::@38 to main::@15 [phi:main::@14/main::@18/main::@38->main::@15] + b15_from_b14: + b15_from_b18: + b15_from_b38: + //SEG126 [56] phi (byte) current_xpos#15 = (byte) current_xpos#12 [phi:main::@14/main::@18/main::@38->main::@15#0] -- register_copy + //SEG127 [56] phi (byte) current_piece_orientation#21 = (byte) current_piece_orientation#11 [phi:main::@14/main::@18/main::@38->main::@15#1] -- register_copy + //SEG128 [56] phi (byte) main::render#7 = (byte) main::render#13 [phi:main::@14/main::@18/main::@38->main::@15#2] -- register_copy + jmp b15 + //SEG129 main::@15 + b15: + //SEG130 [57] if((byte) main::render#7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuyy_eq_0_then_la1 + cpy #0 + beq b1_from_b15 + jmp b39 + //SEG131 main::@39 + b39: + //SEG132 [58] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - jmp b2 + //SEG133 [59] call render_playfield + //SEG134 [83] phi from main::@39 to render_playfield [phi:main::@39->render_playfield] + render_playfield_from_b39: + jsr render_playfield + jmp b48 + //SEG135 main::@48 + b48: + //SEG136 [60] (byte~) current_piece_orientation#66 ← (byte) current_piece_orientation#21 -- vbuyy=vbuz1 + ldy current_piece_orientation + //SEG137 [61] (byte~) current_ypos#62 ← (byte) current_ypos#17 -- vbuz1=vbuz2 + lda current_ypos + sta current_ypos_62 + //SEG138 [62] (byte~) current_xpos#64 ← (byte) current_xpos#15 -- vbuz1=vbuz2 + lda current_xpos + sta current_xpos_64 + //SEG139 [63] call render_current + //SEG140 [65] phi from main::@48 to render_current [phi:main::@48->render_current] + render_current_from_b48: + //SEG141 [65] phi (byte) current_xpos#26 = (byte~) current_xpos#64 [phi:main::@48->render_current#0] -- register_copy + //SEG142 [65] phi (byte) current_ypos#14 = (byte~) current_ypos#62 [phi:main::@48->render_current#1] -- register_copy + //SEG143 [65] phi (byte) current_piece_orientation#13 = (byte~) current_piece_orientation#66 [phi:main::@48->render_current#2] -- register_copy + jsr render_current + jmp b49 + //SEG144 main::@49 + b49: + //SEG145 [64] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDERCOL + jmp b1_from_b49 } -//SEG21 render_current_piece -render_current_piece: { - jmp breturn - //SEG22 render_current_piece::@return - breturn: - //SEG23 [12] return - rts -} -//SEG24 render_playfield -render_playfield: { - .label _1 = 6 - .label line = 4 - .label i = 3 - .label l = 2 - //SEG25 [14] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] - b1_from_render_playfield: - //SEG26 [14] phi (byte) render_playfield::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 +//SEG146 render_current +render_current: { + .label current_piece_gfx = $b + .label screen_line = $d + .label current_cell = $f + .label i = 9 + .label c = $a + .label l = 8 + //SEG147 [66] (byte*) render_current::current_piece_gfx#0 ← (const byte[4*4*4]) piece_t#0 + (byte) current_piece_orientation#13 -- pbuz1=pbuc1_plus_vbuyy + tya + clc + adc #piece_t + adc #0 + sta current_piece_gfx+1 + //SEG148 [67] phi from render_current to render_current::@1 [phi:render_current->render_current::@1] + b1_from_render_current: + //SEG149 [67] phi (byte) render_current::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current->render_current::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG27 [14] phi (byte) render_playfield::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + //SEG150 [67] phi (byte) render_current::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current->render_current::@1#1] -- vbuz1=vbuc1 lda #0 sta l jmp b1 - //SEG28 [14] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] - b1_from_b3: - //SEG29 [14] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy - //SEG30 [14] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + //SEG151 [67] phi from render_current::@7 to render_current::@1 [phi:render_current::@7->render_current::@1] + b1_from_b7: + //SEG152 [67] phi (byte) render_current::i#3 = (byte) render_current::i#1 [phi:render_current::@7->render_current::@1#0] -- register_copy + //SEG153 [67] phi (byte) render_current::l#2 = (byte) render_current::l#1 [phi:render_current::@7->render_current::@1#1] -- register_copy jmp b1 - //SEG31 render_playfield::@1 + //SEG154 render_current::@1 b1: - //SEG32 [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 + //SEG155 [68] (byte~) render_current::$1 ← (byte) current_ypos#14 + (byte) render_current::l#2 -- vbuaa=vbuz1_plus_vbuz2 + lda current_ypos_14 + clc + adc l + //SEG156 [69] (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuaa_rol_1 + asl + //SEG157 [70] (byte*) render_current::screen_line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_current::$2) -- pbuz1=pptc1_derefidx_vbuaa + tay + lda screen_lines,y + sta screen_line + lda screen_lines+1,y + sta screen_line+1 + //SEG158 [71] phi from render_current::@1 to render_current::@2 [phi:render_current::@1->render_current::@2] + b2_from_b1: + //SEG159 [71] phi (byte) render_current::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current::@1->render_current::@2#0] -- vbuz1=vbuc1 + lda #0 + sta c + //SEG160 [71] phi (byte) render_current::i#2 = (byte) render_current::i#3 [phi:render_current::@1->render_current::@2#1] -- register_copy + jmp b2 + //SEG161 [71] phi from render_current::@3 to render_current::@2 [phi:render_current::@3->render_current::@2] + b2_from_b3: + //SEG162 [71] phi (byte) render_current::c#2 = (byte) render_current::c#1 [phi:render_current::@3->render_current::@2#0] -- register_copy + //SEG163 [71] phi (byte) render_current::i#2 = (byte) render_current::i#1 [phi:render_current::@3->render_current::@2#1] -- register_copy + jmp b2 + //SEG164 render_current::@2 + b2: + //SEG165 [72] (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#0 + (byte) render_current::i#2) -- vbuz1=pbuz2_derefidx_vbuz3 + ldy i + lda (current_piece_gfx),y + sta current_cell + //SEG166 [73] (byte) render_current::i#1 ← ++ (byte) render_current::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG167 [74] if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@3 -- vbuz1_eq_0_then_la1 + lda current_cell + beq b3 + jmp b5 + //SEG168 render_current::@5 + b5: + //SEG169 [75] (byte) render_current::xpos#0 ← (byte) current_xpos#26 + (byte) render_current::c#2 -- vbuaa=vbuz1_plus_vbuz2 + lda current_xpos_26 + clc + adc c + //SEG170 [76] if((byte) render_current::xpos#0>=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_current::@3 -- vbuaa_ge_vbuc1_then_la1 + cmp #$a + bcs b3 + jmp b6 + //SEG171 render_current::@6 + b6: + //SEG172 [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 -- pbuz1_derefidx_vbuaa=vbuz2 + tay + lda current_cell + sta (screen_line),y + jmp b3 + //SEG173 render_current::@3 + b3: + //SEG174 [78] (byte) render_current::c#1 ← ++ (byte) render_current::c#2 -- vbuz1=_inc_vbuz1 + inc c + //SEG175 [79] if((byte) render_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@2 -- vbuz1_neq_vbuc1_then_la1 + lda c + cmp #4 + bne b2_from_b3 + jmp b7 + //SEG176 render_current::@7 + b7: + //SEG177 [80] (byte) render_current::l#1 ← ++ (byte) render_current::l#2 -- vbuz1=_inc_vbuz1 + inc l + //SEG178 [81] if((byte) render_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@1 -- vbuz1_neq_vbuc1_then_la1 + lda l + cmp #4 + bne b1_from_b7 + jmp breturn + //SEG179 render_current::@return + breturn: + //SEG180 [82] return + rts +} +//SEG181 render_playfield +render_playfield: { + .label _1 = $d + .label line = $b + .label i = 8 + .label c = 7 + .label l = 4 + //SEG182 [84] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] + b1_from_render_playfield: + //SEG183 [84] phi (byte) render_playfield::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG184 [84] phi (byte) render_playfield::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + lda #0 + sta l + jmp b1 + //SEG185 [84] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] + b1_from_b3: + //SEG186 [84] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy + //SEG187 [84] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + jmp b1 + //SEG188 render_playfield::@1 + b1: + //SEG189 [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 lda l asl - //SEG33 [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) -- pbuz1=pptc1_derefidx_vbuaa + //SEG190 [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) -- pbuz1=pptc1_derefidx_vbuaa tay lda screen_lines,y sta line lda screen_lines+1,y sta line+1 - //SEG34 [17] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] + //SEG191 [87] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] b2_from_b1: - //SEG35 [17] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#0] -- register_copy - //SEG36 [17] phi (byte) render_playfield::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield::@1->render_playfield::@2#1] -- vbuxx=vbuc1 - ldx #0 + //SEG192 [87] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#0] -- register_copy + //SEG193 [87] phi (byte) render_playfield::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield::@1->render_playfield::@2#1] -- vbuz1=vbuc1 + lda #0 + sta c jmp b2 - //SEG37 [17] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] + //SEG194 [87] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] b2_from_b2: - //SEG38 [17] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy - //SEG39 [17] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy + //SEG195 [87] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy + //SEG196 [87] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy jmp b2 - //SEG40 render_playfield::@2 + //SEG197 render_playfield::@2 b2: - //SEG41 [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 -- pbuz1=pbuz2_plus_vbuxx - txa + //SEG198 [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 -- pbuz1=pbuz2_plus_vbuz3 + lda c clc adc line sta _1 lda #0 adc line+1 sta _1+1 - //SEG42 [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + //SEG199 [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy i lda playfield,y ldy #0 sta (_1),y - //SEG43 [20] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 + //SEG200 [90] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG44 [21] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuxx=_inc_vbuxx - inx - //SEG45 [22] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 -- vbuxx_neq_vbuc1_then_la1 - cpx #$a + //SEG201 [91] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 + inc c + //SEG202 [92] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 + lda c + cmp #$a bne b2_from_b2 jmp b3 - //SEG46 render_playfield::@3 + //SEG203 render_playfield::@3 b3: - //SEG47 [23] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 + //SEG204 [93] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 inc l - //SEG48 [24] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG205 [94] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 lda l cmp #$14 bne b1_from_b3 jmp breturn - //SEG49 render_playfield::@return + //SEG206 render_playfield::@return breturn: - //SEG50 [25] return + //SEG207 [95] return rts } -//SEG51 init +//SEG208 current_movedown +current_movedown: { + //SEG209 [96] (byte) current_ypos#10 ← ++ (byte) current_ypos#13 -- vbuz1=_inc_vbuz1 + inc current_ypos + jmp breturn + //SEG210 current_movedown::@return + breturn: + //SEG211 [97] return + rts +} +//SEG212 keyboard_event_pressed +keyboard_event_pressed: { + .label row_bits = 9 + .label keycode = 7 + //SEG213 [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuz1_ror_3 + lda keycode + lsr + lsr + lsr + //SEG214 [100] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa + tay + lda keyboard_scan_values,y + sta row_bits + //SEG215 [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuz1_band_vbuc1 + lda #7 + and keycode + //SEG216 [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa + tay + lda keyboard_matrix_col_bitmask,y + and row_bits + jmp breturn + //SEG217 keyboard_event_pressed::@return + breturn: + //SEG218 [103] return + rts +} +//SEG219 keyboard_event_get +keyboard_event_get: { + //SEG220 [104] if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@return -- vbuxx_eq_0_then_la1 + cpx #0 + beq breturn_from_keyboard_event_get + jmp b3 + //SEG221 keyboard_event_get::@3 + b3: + //SEG222 [105] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuxx=_dec_vbuxx + dex + //SEG223 [106] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuaa=pbuc1_derefidx_vbuxx + lda keyboard_events,x + //SEG224 [107] phi from keyboard_event_get::@3 to keyboard_event_get::@return [phi:keyboard_event_get::@3->keyboard_event_get::@return] + breturn_from_b3: + //SEG225 [107] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@3->keyboard_event_get::@return#0] -- register_copy + //SEG226 [107] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@3->keyboard_event_get::@return#1] -- register_copy + jmp breturn + //SEG227 [107] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + breturn_from_keyboard_event_get: + //SEG228 [107] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + //SEG229 [107] phi (byte) keyboard_event_get::return#2 = (byte/word/signed word/dword/signed dword) 255 [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuaa=vbuc1 + lda #$ff + jmp breturn + //SEG230 keyboard_event_get::@return + breturn: + //SEG231 [108] return + rts +} +//SEG232 keyboard_event_scan +keyboard_event_scan: { + .label row_scan = 9 + .label keycode = 8 + .label row = 4 + .label col = 7 + //SEG233 [110] phi from keyboard_event_scan to keyboard_event_scan::@1 [phi:keyboard_event_scan->keyboard_event_scan::@1] + b1_from_keyboard_event_scan: + //SEG234 [110] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@1#0] -- register_copy + //SEG235 [110] phi (byte) keyboard_event_scan::keycode#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan->keyboard_event_scan::@1#1] -- vbuz1=vbuc1 + lda #0 + sta keycode + //SEG236 [110] phi (byte) keyboard_event_scan::row#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan->keyboard_event_scan::@1#2] -- vbuz1=vbuc1 + lda #0 + sta row + jmp b1 + //SEG237 [110] phi from keyboard_event_scan::@3 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1] + b1_from_b3: + //SEG238 [110] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#0] -- register_copy + //SEG239 [110] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#1] -- register_copy + //SEG240 [110] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#2] -- register_copy + jmp b1 + //SEG241 keyboard_event_scan::@1 + b1: + //SEG242 [111] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuyy=vbuz1 + ldy row + //SEG243 [112] call keyboard_matrix_read + jsr keyboard_matrix_read + //SEG244 [113] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // (byte) keyboard_matrix_read::return#2 = (byte) keyboard_matrix_read::return#0 // register copy reg byte a + jmp b25 + //SEG245 keyboard_event_scan::@25 + b25: + //SEG246 [114] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa + sta row_scan + //SEG247 [115] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@4 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + lda row_scan + ldy row + cmp keyboard_scan_values,y + bne b4_from_b25 + jmp b13 + //SEG248 keyboard_event_scan::@13 + b13: + //SEG249 [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 -- vbuz1=vbuz1_plus_vbuc1 + lda #8 + clc + adc keycode + sta keycode + //SEG250 [117] phi from keyboard_event_scan::@13 keyboard_event_scan::@19 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3] + b3_from_b13: + b3_from_b19: + //SEG251 [117] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3#0] -- register_copy + //SEG252 [117] phi (byte) keyboard_event_scan::keycode#14 = (byte) keyboard_event_scan::keycode#1 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3#1] -- register_copy + jmp b3 + //SEG253 keyboard_event_scan::@3 + b3: + //SEG254 [118] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + inc row + //SEG255 [119] if((byte) keyboard_event_scan::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@1 -- vbuz1_neq_vbuc1_then_la1 + lda row + cmp #8 + bne b1_from_b3 + //SEG256 [120] phi from keyboard_event_scan::@3 to keyboard_event_scan::@20 [phi:keyboard_event_scan::@3->keyboard_event_scan::@20] + b20_from_b3: + jmp b20 + //SEG257 keyboard_event_scan::@20 + b20: + //SEG258 [121] call keyboard_event_pressed + //SEG259 [98] phi from keyboard_event_scan::@20 to keyboard_event_pressed [phi:keyboard_event_scan::@20->keyboard_event_pressed] + keyboard_event_pressed_from_b20: + //SEG260 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@20->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_LSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG261 [122] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#0 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + jmp b26 + //SEG262 keyboard_event_scan::@26 + b26: + //SEG263 [123] (byte~) keyboard_event_scan::$14 ← (byte) keyboard_event_pressed::return#0 + // (byte~) keyboard_event_scan::$14 = (byte) keyboard_event_pressed::return#0 // register copy reg byte a + //SEG264 [124] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b9_from_b26 + //SEG265 [125] phi from keyboard_event_scan::@26 to keyboard_event_scan::@21 [phi:keyboard_event_scan::@26->keyboard_event_scan::@21] + b21_from_b26: + jmp b21 + //SEG266 keyboard_event_scan::@21 + b21: + //SEG267 [126] phi from keyboard_event_scan::@21 keyboard_event_scan::@26 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@21/keyboard_event_scan::@26->keyboard_event_scan::@9] + b9_from_b21: + b9_from_b26: + jmp b9 + //SEG268 keyboard_event_scan::@9 + b9: + //SEG269 [127] call keyboard_event_pressed + //SEG270 [98] phi from keyboard_event_scan::@9 to keyboard_event_pressed [phi:keyboard_event_scan::@9->keyboard_event_pressed] + keyboard_event_pressed_from_b9: + //SEG271 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@9->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_RSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG272 [128] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#1 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + jmp b27 + //SEG273 keyboard_event_scan::@27 + b27: + //SEG274 [129] (byte~) keyboard_event_scan::$18 ← (byte) keyboard_event_pressed::return#1 + // (byte~) keyboard_event_scan::$18 = (byte) keyboard_event_pressed::return#1 // register copy reg byte a + //SEG275 [130] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b10_from_b27 + //SEG276 [131] phi from keyboard_event_scan::@27 to keyboard_event_scan::@22 [phi:keyboard_event_scan::@27->keyboard_event_scan::@22] + b22_from_b27: + jmp b22 + //SEG277 keyboard_event_scan::@22 + b22: + //SEG278 [132] phi from keyboard_event_scan::@22 keyboard_event_scan::@27 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@22/keyboard_event_scan::@27->keyboard_event_scan::@10] + b10_from_b22: + b10_from_b27: + jmp b10 + //SEG279 keyboard_event_scan::@10 + b10: + //SEG280 [133] call keyboard_event_pressed + //SEG281 [98] phi from keyboard_event_scan::@10 to keyboard_event_pressed [phi:keyboard_event_scan::@10->keyboard_event_pressed] + keyboard_event_pressed_from_b10: + //SEG282 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@10->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_CTRL + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG283 [134] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#2 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + jmp b28 + //SEG284 keyboard_event_scan::@28 + b28: + //SEG285 [135] (byte~) keyboard_event_scan::$22 ← (byte) keyboard_event_pressed::return#2 + // (byte~) keyboard_event_scan::$22 = (byte) keyboard_event_pressed::return#2 // register copy reg byte a + //SEG286 [136] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b11_from_b28 + //SEG287 [137] phi from keyboard_event_scan::@28 to keyboard_event_scan::@23 [phi:keyboard_event_scan::@28->keyboard_event_scan::@23] + b23_from_b28: + jmp b23 + //SEG288 keyboard_event_scan::@23 + b23: + //SEG289 [138] phi from keyboard_event_scan::@23 keyboard_event_scan::@28 to keyboard_event_scan::@11 [phi:keyboard_event_scan::@23/keyboard_event_scan::@28->keyboard_event_scan::@11] + b11_from_b23: + b11_from_b28: + jmp b11 + //SEG290 keyboard_event_scan::@11 + b11: + //SEG291 [139] call keyboard_event_pressed + //SEG292 [98] phi from keyboard_event_scan::@11 to keyboard_event_pressed [phi:keyboard_event_scan::@11->keyboard_event_pressed] + keyboard_event_pressed_from_b11: + //SEG293 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@11->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_COMMODORE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG294 [140] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#10 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + jmp b29 + //SEG295 keyboard_event_scan::@29 + b29: + //SEG296 [141] (byte~) keyboard_event_scan::$26 ← (byte) keyboard_event_pressed::return#10 + // (byte~) keyboard_event_scan::$26 = (byte) keyboard_event_pressed::return#10 // register copy reg byte a + //SEG297 [142] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 + cmp #0 + beq breturn + //SEG298 [143] phi from keyboard_event_scan::@29 to keyboard_event_scan::@24 [phi:keyboard_event_scan::@29->keyboard_event_scan::@24] + b24_from_b29: + jmp b24 + //SEG299 keyboard_event_scan::@24 + b24: + jmp breturn + //SEG300 keyboard_event_scan::@return + breturn: + //SEG301 [144] return + rts + //SEG302 [145] phi from keyboard_event_scan::@25 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4] + b4_from_b25: + //SEG303 [145] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#0] -- register_copy + //SEG304 [145] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#1] -- register_copy + //SEG305 [145] phi (byte) keyboard_event_scan::col#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#2] -- vbuz1=vbuc1 + lda #0 + sta col + jmp b4 + //SEG306 [145] phi from keyboard_event_scan::@5 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4] + b4_from_b5: + //SEG307 [145] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#0] -- register_copy + //SEG308 [145] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#15 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#1] -- register_copy + //SEG309 [145] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#2] -- register_copy + jmp b4 + //SEG310 keyboard_event_scan::@4 + b4: + //SEG311 [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 + lda row_scan + ldy row + eor keyboard_scan_values,y + //SEG312 [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1 + ldy col + and keyboard_matrix_col_bitmask,y + //SEG313 [148] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b5_from_b4 + jmp b15 + //SEG314 keyboard_event_scan::@15 + b15: + //SEG315 [149] if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #8 + beq b5_from_b15 + jmp b16 + //SEG316 keyboard_event_scan::@16 + b16: + //SEG317 [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuz2 + lda row_scan + ldy col + and keyboard_matrix_col_bitmask,y + //SEG318 [151] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b7 + jmp b17 + //SEG319 keyboard_event_scan::@17 + b17: + //SEG320 [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuxx=vbuz1 + lda keycode + sta keyboard_events,x + //SEG321 [153] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuxx=_inc_vbuxx + inx + //SEG322 [154] phi from keyboard_event_scan::@15 keyboard_event_scan::@17 keyboard_event_scan::@4 keyboard_event_scan::@7 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@15/keyboard_event_scan::@17/keyboard_event_scan::@4/keyboard_event_scan::@7->keyboard_event_scan::@5] + b5_from_b15: + b5_from_b17: + b5_from_b4: + b5_from_b7: + //SEG323 [154] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#10 [phi:keyboard_event_scan::@15/keyboard_event_scan::@17/keyboard_event_scan::@4/keyboard_event_scan::@7->keyboard_event_scan::@5#0] -- register_copy + jmp b5 + //SEG324 keyboard_event_scan::@5 + b5: + //SEG325 [155] (byte) keyboard_event_scan::keycode#15 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + inc keycode + //SEG326 [156] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 + inc col + //SEG327 [157] if((byte) keyboard_event_scan::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@4 -- vbuz1_neq_vbuc1_then_la1 + lda col + cmp #8 + bne b4_from_b5 + jmp b19 + //SEG328 keyboard_event_scan::@19 + b19: + //SEG329 [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + lda row_scan + ldy row + sta keyboard_scan_values,y + jmp b3_from_b19 + //SEG330 keyboard_event_scan::@7 + b7: + //SEG331 [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 -- vbuaa=vbuz1_bor_vbuc1 + lda #$40 + ora keycode + //SEG332 [160] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte/word/dword~) keyboard_event_scan::$11 -- pbuc1_derefidx_vbuxx=vbuaa + sta keyboard_events,x + //SEG333 [161] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuxx=_inc_vbuxx + inx + jmp b5_from_b7 +} +//SEG334 keyboard_matrix_read +keyboard_matrix_read: { + //SEG335 [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuyy + lda keyboard_matrix_row_bitmask,y + sta CIA1_PORT_A + //SEG336 [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 + lda CIA1_PORT_B + eor #$ff + jmp breturn + //SEG337 keyboard_matrix_read::@return + breturn: + //SEG338 [164] return + rts +} +//SEG339 init init: { - .label _7 = 6 - .label li = 4 - .label line = 4 + .label _7 = $d + .label li = $b + .label line = $b .label l = 2 - //SEG52 [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece - //SEG53 [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece+1 - //SEG54 [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece+2 - //SEG55 [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece+4 - //SEG56 [30] call fill - //SEG57 [49] phi from init to fill [phi:init->fill] + //SEG340 [166] call fill + //SEG341 [185] phi from init to fill [phi:init->fill] fill_from_init: - //SEG58 [49] phi (byte) fill::val#3 = (byte/word/signed word/dword/signed dword) 160 [phi:init->fill#0] -- vbuxx=vbuc1 + //SEG342 [185] phi (byte) fill::val#3 = (byte/word/signed word/dword/signed dword) 160 [phi:init->fill#0] -- vbuxx=vbuc1 ldx #$a0 - //SEG59 [49] phi (byte*) fill::addr#0 = (const byte*) SCREEN#0 [phi:init->fill#1] -- pbuz1=pbuc1 + //SEG343 [185] phi (byte*) fill::addr#0 = (const byte*) SCREEN#0 [phi:init->fill#1] -- pbuz1=pbuc1 lda #SCREEN sta fill.addr+1 jsr fill - //SEG60 [31] phi from init to init::@7 [phi:init->init::@7] + //SEG344 [167] phi from init to init::@7 [phi:init->init::@7] b7_from_init: jmp b7 - //SEG61 init::@7 + //SEG345 init::@7 b7: - //SEG62 [32] call fill - //SEG63 [49] phi from init::@7 to fill [phi:init::@7->fill] + //SEG346 [168] call fill + //SEG347 [185] phi from init::@7 to fill [phi:init::@7->fill] fill_from_b7: - //SEG64 [49] phi (byte) fill::val#3 = (const byte) BLACK#0 [phi:init::@7->fill#0] -- vbuxx=vbuc1 + //SEG348 [185] phi (byte) fill::val#3 = (const byte) BLACK#0 [phi:init::@7->fill#0] -- vbuxx=vbuc1 ldx #BLACK - //SEG65 [49] phi (byte*) fill::addr#0 = (const byte*) COLS#0 [phi:init::@7->fill#1] -- pbuz1=pbuc1 + //SEG349 [185] phi (byte*) fill::addr#0 = (const byte*) COLS#0 [phi:init::@7->fill#1] -- pbuz1=pbuc1 lda #COLS sta fill.addr+1 jsr fill - //SEG66 [33] phi from init::@7 to init::@1 [phi:init::@7->init::@1] + //SEG350 [169] phi from init::@7 to init::@1 [phi:init::@7->init::@1] b1_from_b7: - //SEG67 [33] phi (byte*) init::li#2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 [phi:init::@7->init::@1#0] -- pbuz1=pbuc1 + //SEG351 [169] phi (byte*) init::li#2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 [phi:init::@7->init::@1#0] -- pbuz1=pbuc1 lda #COLS+$28+$f sta li+1 - //SEG68 [33] phi (byte) init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@7->init::@1#1] -- vbuxx=vbuc1 + //SEG352 [169] phi (byte) init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@7->init::@1#1] -- vbuxx=vbuc1 ldx #0 jmp b1 - //SEG69 [33] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + //SEG353 [169] phi from init::@1 to init::@1 [phi:init::@1->init::@1] b1_from_b1: - //SEG70 [33] phi (byte*) init::li#2 = (byte*) init::li#1 [phi:init::@1->init::@1#0] -- register_copy - //SEG71 [33] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#1] -- register_copy + //SEG354 [169] phi (byte*) init::li#2 = (byte*) init::li#1 [phi:init::@1->init::@1#0] -- register_copy + //SEG355 [169] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#1] -- register_copy jmp b1 - //SEG72 init::@1 + //SEG356 init::@1 b1: - //SEG73 [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_rol_1 + //SEG357 [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_rol_1 txa asl - //SEG74 [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 -- pptc1_derefidx_vbuaa=pbuz1 + //SEG358 [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 -- pptc1_derefidx_vbuaa=pbuz1 tay lda li sta screen_lines,y lda li+1 sta screen_lines+1,y - //SEG75 [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 + //SEG359 [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 lda li clc adc #$28 @@ -1367,41 +6167,41 @@ init: { bcc !+ inc li+1 !: - //SEG76 [37] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuxx=_inc_vbuxx + //SEG360 [173] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuxx=_inc_vbuxx inx - //SEG77 [38] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG361 [174] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$14 bne b1_from_b1 - //SEG78 [39] phi from init::@1 to init::@2 [phi:init::@1->init::@2] + //SEG362 [175] phi from init::@1 to init::@2 [phi:init::@1->init::@2] b2_from_b1: - //SEG79 [39] phi (byte) init::l#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@1->init::@2#0] -- vbuz1=vbuc1 + //SEG363 [175] phi (byte) init::l#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@1->init::@2#0] -- vbuz1=vbuc1 lda #0 sta l - //SEG80 [39] phi (byte*) init::line#4 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 [phi:init::@1->init::@2#1] -- pbuz1=pbuc1 + //SEG364 [175] phi (byte*) init::line#4 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 [phi:init::@1->init::@2#1] -- pbuz1=pbuc1 lda #COLS+$e sta line+1 jmp b2 - //SEG81 [39] phi from init::@5 to init::@2 [phi:init::@5->init::@2] + //SEG365 [175] phi from init::@5 to init::@2 [phi:init::@5->init::@2] b2_from_b5: - //SEG82 [39] phi (byte) init::l#4 = (byte) init::l#1 [phi:init::@5->init::@2#0] -- register_copy - //SEG83 [39] phi (byte*) init::line#4 = (byte*) init::line#1 [phi:init::@5->init::@2#1] -- register_copy + //SEG366 [175] phi (byte) init::l#4 = (byte) init::l#1 [phi:init::@5->init::@2#0] -- register_copy + //SEG367 [175] phi (byte*) init::line#4 = (byte*) init::line#1 [phi:init::@5->init::@2#1] -- register_copy jmp b2 - //SEG84 init::@2 + //SEG368 init::@2 b2: - //SEG85 [40] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + //SEG369 [176] phi from init::@2 to init::@3 [phi:init::@2->init::@3] b3_from_b2: - //SEG86 [40] phi (byte) init::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 + //SEG370 [176] phi (byte) init::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 ldx #0 jmp b3 - //SEG87 [40] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + //SEG371 [176] phi from init::@3 to init::@3 [phi:init::@3->init::@3] b3_from_b3: - //SEG88 [40] phi (byte) init::c#2 = (byte) init::c#1 [phi:init::@3->init::@3#0] -- register_copy + //SEG372 [176] phi (byte) init::c#2 = (byte) init::c#1 [phi:init::@3->init::@3#0] -- register_copy jmp b3 - //SEG89 init::@3 + //SEG373 init::@3 b3: - //SEG90 [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 -- pbuz1=pbuz2_plus_vbuxx + //SEG374 [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 -- pbuz1=pbuz2_plus_vbuxx txa clc adc line @@ -1409,19 +6209,19 @@ init: { lda #0 adc line+1 sta _7+1 - //SEG91 [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 -- _deref_pbuz1=vbuc1 + //SEG375 [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 -- _deref_pbuz1=vbuc1 lda #DARK_GREY ldy #0 sta (_7),y - //SEG92 [43] (byte) init::c#1 ← ++ (byte) init::c#2 -- vbuxx=_inc_vbuxx + //SEG376 [179] (byte) init::c#1 ← ++ (byte) init::c#2 -- vbuxx=_inc_vbuxx inx - //SEG93 [44] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG377 [180] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #$c bne b3_from_b3 jmp b5 - //SEG94 init::@5 + //SEG378 init::@5 b5: - //SEG95 [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 + //SEG379 [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 lda line clc adc #$28 @@ -1429,23 +6229,23 @@ init: { bcc !+ inc line+1 !: - //SEG96 [46] (byte) init::l#1 ← ++ (byte) init::l#4 -- vbuz1=_inc_vbuz1 + //SEG380 [182] (byte) init::l#1 ← ++ (byte) init::l#4 -- vbuz1=_inc_vbuz1 inc l - //SEG97 [47] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG381 [183] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 -- vbuz1_neq_vbuc1_then_la1 lda l cmp #$16 bne b2_from_b5 jmp breturn - //SEG98 init::@return + //SEG382 init::@return breturn: - //SEG99 [48] return + //SEG383 [184] return rts } -//SEG100 fill +//SEG384 fill fill: { - .label end = 6 - .label addr = 4 - //SEG101 [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 -- pbuz1=pbuz2_plus_vwuc1 + .label end = $d + .label addr = $b + //SEG385 [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 -- pbuz1=pbuz2_plus_vwuc1 lda addr clc adc #<$3e8 @@ -1453,23 +6253,23 @@ fill: { lda addr+1 adc #>$3e8 sta end+1 - //SEG102 [51] phi from fill fill::@1 to fill::@1 [phi:fill/fill::@1->fill::@1] + //SEG386 [187] phi from fill fill::@1 to fill::@1 [phi:fill/fill::@1->fill::@1] b1_from_fill: b1_from_b1: - //SEG103 [51] phi (byte*) fill::addr#2 = (byte*) fill::addr#0 [phi:fill/fill::@1->fill::@1#0] -- register_copy + //SEG387 [187] phi (byte*) fill::addr#2 = (byte*) fill::addr#0 [phi:fill/fill::@1->fill::@1#0] -- register_copy jmp b1 - //SEG104 fill::@1 + //SEG388 fill::@1 b1: - //SEG105 [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 -- _deref_pbuz1=vbuxx + //SEG389 [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (addr),y - //SEG106 [53] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 -- pbuz1=_inc_pbuz1 + //SEG390 [189] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 -- pbuz1=_inc_pbuz1 inc addr bne !+ inc addr+1 !: - //SEG107 [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -- pbuz1_neq_pbuz2_then_la1 + //SEG391 [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -- pbuz1_neq_pbuz2_then_la1 lda addr+1 cmp end+1 bne b1_from_b1 @@ -1477,26 +6277,92 @@ fill: { cmp end bne b1_from_b1 jmp breturn - //SEG108 fill::@return + //SEG392 fill::@return breturn: - //SEG109 [55] return + //SEG393 [191] return rts } + keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f + keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80 + keyboard_events: .fill 8, 0 + keyboard_scan_values: .fill 8, 0 screen_lines: .fill 2*$14, 0 + .align $40 + piece_t: .byte 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 playfield: .fill $14*$a, 0 - current_piece: .fill 4*4, 0 ASSEMBLER OPTIMIZATIONS -Removing instruction jmp b8 +Removing instruction jmp b16 Removing instruction jmp bend +Removing instruction jmp b41 +Removing instruction jmp b42 +Removing instruction jmp b1 +Removing instruction jmp b4 Removing instruction jmp b7 -Removing instruction jmp b8 +Removing instruction jmp b9 +Removing instruction jmp b44 +Removing instruction jmp b45 +Removing instruction jmp b29 +Removing instruction jmp b10 +Removing instruction jmp b46 +Removing instruction jmp b30 +Removing instruction jmp b31 +Removing instruction jmp b11 +Removing instruction jmp b32 +Removing instruction jmp b13 +Removing instruction jmp b33 +Removing instruction jmp b14 +Removing instruction jmp b34 +Removing instruction jmp b35 +Removing instruction jmp b16 +Removing instruction jmp b36 +Removing instruction jmp b17 +Removing instruction jmp b37 +Removing instruction jmp b18 +Removing instruction jmp b38 +Removing instruction jmp b15 +Removing instruction jmp b39 +Removing instruction jmp b48 +Removing instruction jmp b49 +Removing instruction jmp b1 Removing instruction jmp b2 +Removing instruction jmp b5 +Removing instruction jmp b6 +Removing instruction jmp b3 +Removing instruction jmp b7 Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp b3 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b25 +Removing instruction jmp b13 +Removing instruction jmp b3 +Removing instruction jmp b20 +Removing instruction jmp b26 +Removing instruction jmp b21 +Removing instruction jmp b9 +Removing instruction jmp b27 +Removing instruction jmp b22 +Removing instruction jmp b10 +Removing instruction jmp b28 +Removing instruction jmp b23 +Removing instruction jmp b11 +Removing instruction jmp b29 +Removing instruction jmp b24 +Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp b15 +Removing instruction jmp b16 +Removing instruction jmp b17 +Removing instruction jmp b5 +Removing instruction jmp b19 +Removing instruction jmp breturn Removing instruction jmp b7 Removing instruction jmp b1 Removing instruction jmp b2 @@ -1506,28 +6372,110 @@ Removing instruction jmp breturn Removing instruction jmp b1 Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination +Replacing instruction ldy #0 with TAY Removing instruction lda #0 -Removing instruction lda #GREEN -Removing instruction lda #GREEN -Removing instruction lda #GREEN +Replacing instruction ldx #0 with TAX +Removing instruction lda #0 +Removing instruction lda key_event +Removing instruction lda #0 +Removing instruction lda current_cell +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda row_scan Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b1 with b4 +Replacing label b11_from_b46 with b11 +Replacing label b11_from_b30 with b11 +Replacing label b13_from_b11 with b13 +Replacing label b15_from_b14 with b15 +Replacing label b16_from_b34 with b16 +Replacing label b17_from_b16 with b17 +Replacing label b18_from_b17 with b18 +Replacing label b15_from_b18 with b15 +Replacing label b1_from_b15 with b4 +Replacing label b1_from_b49 with b4 +Replacing label b2_from_b3 with b2 +Replacing label b1_from_b7 with b1 Replacing label b2_from_b2 with b2 Replacing label b1_from_b3 with b1 +Replacing label b1_from_b3 with b1 +Replacing label b9_from_b26 with b9 +Replacing label b10_from_b27 with b10 +Replacing label b11_from_b28 with b11 +Replacing label breturn with b24 +Replacing label b5_from_b4 with b5 +Replacing label b5_from_b15 with b5 +Replacing label b4_from_b5 with b4 +Replacing label b3_from_b19 with b3 +Replacing label b5_from_b7 with b5 Replacing label b1_from_b1 with b1 Replacing label b3_from_b3 with b3 Replacing label b2_from_b5 with b2 Replacing label b1_from_b1 with b1 Replacing label b1_from_b1 with b1 Removing instruction bbegin: -Removing instruction b8_from_bbegin: -Removing instruction main_from_b8: -Removing instruction bend_from_b8: -Removing instruction b7_from_main: -Removing instruction render_playfield_from_b7: -Removing instruction b8_from_b7: -Removing instruction render_current_piece_from_b8: +Removing instruction b16_from_bbegin: +Removing instruction main_from_b16: +Removing instruction bend_from_b16: +Removing instruction b41_from_main: +Removing instruction render_playfield_from_b41: +Removing instruction b42_from_b41: +Removing instruction render_current_from_b42: +Removing instruction b1_from_b15: +Removing instruction b1_from_b49: +Removing instruction b1: +Removing instruction b9_from_b7: +Removing instruction keyboard_event_scan_from_b9: +Removing instruction b44_from_b9: +Removing instruction b29_from_b45: +Removing instruction b10_from_b29: +Removing instruction keyboard_event_pressed_from_b10: +Removing instruction b11_from_b30: +Removing instruction b11_from_b31: +Removing instruction b11_from_b46: +Removing instruction b13_from_b11: +Removing instruction b13_from_b32: +Removing instruction b33_from_b13: +Removing instruction b16_from_b34: +Removing instruction b16_from_b35: +Removing instruction b17_from_b16: +Removing instruction b17_from_b36: +Removing instruction b18_from_b17: +Removing instruction b18_from_b37: +Removing instruction b15_from_b14: +Removing instruction b15_from_b18: +Removing instruction b15_from_b38: +Removing instruction b1_from_b7: +Removing instruction b2_from_b3: Removing instruction b1_from_b3: Removing instruction b2_from_b2: +Removing instruction b1_from_b3: +Removing instruction b3_from_b13: +Removing instruction b3_from_b19: +Removing instruction b20_from_b3: +Removing instruction keyboard_event_pressed_from_b20: +Removing instruction b21_from_b26: +Removing instruction b21: +Removing instruction b9_from_b21: +Removing instruction b9_from_b26: +Removing instruction keyboard_event_pressed_from_b9: +Removing instruction b22_from_b27: +Removing instruction b22: +Removing instruction b10_from_b22: +Removing instruction b10_from_b27: +Removing instruction keyboard_event_pressed_from_b10: +Removing instruction b23_from_b28: +Removing instruction b23: +Removing instruction b11_from_b23: +Removing instruction b11_from_b28: +Removing instruction keyboard_event_pressed_from_b11: +Removing instruction b24_from_b29: +Removing instruction breturn: +Removing instruction b4_from_b5: +Removing instruction b5_from_b15: +Removing instruction b5_from_b17: +Removing instruction b5_from_b4: +Removing instruction b5_from_b7: Removing instruction b7_from_init: Removing instruction fill_from_b7: Removing instruction b1_from_b1: @@ -1537,15 +6485,59 @@ Removing instruction b3_from_b3: Removing instruction b1_from_fill: Removing instruction b1_from_b1: Succesful ASM optimization Pass5RedundantLabelElimination -Removing instruction b8: +Removing instruction b16: Removing instruction bend: +Removing instruction init_from_main: +Removing instruction b41: +Removing instruction b42: +Removing instruction b1_from_b42: +Removing instruction b9: +Removing instruction b44: +Removing instruction b45: +Removing instruction b29: +Removing instruction b46: +Removing instruction b30: +Removing instruction b31: +Removing instruction b32: +Removing instruction b33: +Removing instruction b14_from_b33: +Removing instruction b34: +Removing instruction b35: +Removing instruction b36: +Removing instruction b37: +Removing instruction b38: +Removing instruction b39: +Removing instruction render_playfield_from_b39: +Removing instruction b48: +Removing instruction render_current_from_b48: +Removing instruction b49: +Removing instruction b1_from_render_current: +Removing instruction b2_from_b1: +Removing instruction b5: +Removing instruction b6: Removing instruction b7: -Removing instruction b8: Removing instruction breturn: Removing instruction b1_from_render_playfield: Removing instruction b2_from_b1: Removing instruction b3: Removing instruction breturn: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction b3: +Removing instruction breturn_from_b3: +Removing instruction b1_from_keyboard_event_scan: +Removing instruction b25: +Removing instruction b13: +Removing instruction b20: +Removing instruction b26: +Removing instruction b27: +Removing instruction b28: +Removing instruction b29: +Removing instruction b15: +Removing instruction b16: +Removing instruction b17: +Removing instruction b19: +Removing instruction breturn: Removing instruction fill_from_init: Removing instruction b7: Removing instruction b1_from_b7: @@ -1554,47 +6546,127 @@ Removing instruction b5: Removing instruction breturn: Removing instruction breturn: Succesful ASM optimization Pass5UnusedLabelElimination +Relabelling long label b10_from_b45 to b1 +Relabelling long label b14_from_b13 to b2 +Relabelling long label breturn_from_keyboard_event_get to b1 +Relabelling long label b4_from_b25 to b2 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b4 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b1 Removing instruction jmp b2 +Removing instruction jmp b1 +Removing instruction beq b9 +Removing instruction beq b10 +Removing instruction beq b11 +Removing instruction beq b24 +Removing instruction jmp b4 +Removing instruction jmp b1 +Removing instruction jmp b2 Removing instruction jmp b3 Succesful ASM optimization Pass5NextJumpElimination +Removing instruction ldy col +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Removing instruction b9: +Removing instruction b10: +Removing instruction b11: +Removing instruction b24: +Succesful ASM optimization Pass5UnusedLabelElimination +Fixing long branch [132] beq b4 to bne FINAL SYMBOL TABLE -(label) @8 +(label) @16 (label) @begin (label) @end (byte) BLACK (const byte) BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0 (byte*) BORDERCOL (const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280 +(byte*) CIA1_PORT_A +(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320 +(byte*) CIA1_PORT_B +(const byte*) CIA1_PORT_B#0 CIA1_PORT_B = ((byte*))(word/dword/signed dword) 56321 (byte*) COLS (const byte*) COLS#0 COLS = ((byte*))(word/dword/signed dword) 55296 (byte) DARK_GREY (const byte) DARK_GREY#0 DARK_GREY = (byte/signed byte/word/signed word/dword/signed dword) 11 -(byte) GREEN -(const byte) GREEN#0 GREEN = (byte/signed byte/word/signed word/dword/signed dword) 5 +(byte) KEY_COMMA +(const byte) KEY_COMMA#0 KEY_COMMA = (byte/signed byte/word/signed word/dword/signed dword) 47 +(byte) KEY_COMMODORE +(const byte) KEY_COMMODORE#0 KEY_COMMODORE = (byte/signed byte/word/signed word/dword/signed dword) 61 +(byte) KEY_CTRL +(const byte) KEY_CTRL#0 KEY_CTRL = (byte/signed byte/word/signed word/dword/signed dword) 58 +(byte) KEY_DOT +(const byte) KEY_DOT#0 KEY_DOT = (byte/signed byte/word/signed word/dword/signed dword) 44 +(byte) KEY_LSHIFT +(const byte) KEY_LSHIFT#0 KEY_LSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 15 +(byte) KEY_MODIFIER_COMMODORE +(byte) KEY_MODIFIER_CTRL +(byte) KEY_MODIFIER_LSHIFT +(byte) KEY_MODIFIER_RSHIFT +(byte) KEY_RSHIFT +(const byte) KEY_RSHIFT#0 KEY_RSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 52 +(byte) KEY_SPACE +(const byte) KEY_SPACE#0 KEY_SPACE = (byte/signed byte/word/signed word/dword/signed dword) 60 +(byte) KEY_X +(const byte) KEY_X#0 KEY_X = (byte/signed byte/word/signed word/dword/signed dword) 23 +(byte) KEY_Z +(const byte) KEY_Z#0 KEY_Z = (byte/signed byte/word/signed word/dword/signed dword) 12 +(byte*) RASTER +(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266 (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024 -(byte[4*4]) current_piece -(const byte[4*4]) current_piece#0 current_piece = { fill( 4*4, 0) } +(void()) current_movedown() +(label) current_movedown::@return +(byte) current_movedown_counter +(byte) current_movedown_counter#1 current_movedown_counter zp ZP_BYTE:2 26.933333333333334 +(byte) current_movedown_counter#14 current_movedown_counter zp ZP_BYTE:2 23.666666666666664 +(byte) current_movedown_counter#16 current_movedown_counter zp ZP_BYTE:2 7.344827586206897 +(byte) current_movedown_rate +(const byte) current_movedown_rate#0 current_movedown_rate = (byte/signed byte/word/signed word/dword/signed dword) 50 +(byte) current_movedown_rate_fast +(const byte) current_movedown_rate_fast#0 current_movedown_rate_fast = (byte/signed byte/word/signed word/dword/signed dword) 5 +(byte*) current_piece +(byte) current_piece_orientation +(byte) current_piece_orientation#10 current_piece_orientation zp ZP_BYTE:6 202.0 +(byte) current_piece_orientation#11 current_piece_orientation zp ZP_BYTE:6 10.921052631578949 +(byte) current_piece_orientation#13 reg byte y 13.0 +(byte) current_piece_orientation#2 current_piece_orientation zp ZP_BYTE:6 101.0 +(byte) current_piece_orientation#21 current_piece_orientation zp ZP_BYTE:6 47.33333333333333 +(byte) current_piece_orientation#3 current_piece_orientation zp ZP_BYTE:6 101.0 +(byte~) current_piece_orientation#66 reg byte y 7.333333333333333 +(byte) current_xpos +(byte) current_xpos#1 current_xpos zp ZP_BYTE:5 101.0 +(byte) current_xpos#11 current_xpos zp ZP_BYTE:5 202.0 +(byte) current_xpos#12 current_xpos zp ZP_BYTE:5 13.833333333333334 +(byte) current_xpos#15 current_xpos zp ZP_BYTE:5 47.33333333333333 +(byte) current_xpos#2 current_xpos zp ZP_BYTE:5 101.0 +(byte) current_xpos#26 current_xpos#26 zp ZP_BYTE:7 59.529411764705884 +(byte) current_xpos#34 current_xpos zp ZP_BYTE:5 40.4 +(byte~) current_xpos#64 current_xpos#64 zp ZP_BYTE:7 22.0 +(byte) current_ypos +(byte) current_ypos#10 current_ypos zp ZP_BYTE:3 34.33333333333333 +(byte) current_ypos#13 current_ypos zp ZP_BYTE:3 8.6 +(byte) current_ypos#14 current_ypos#14 zp ZP_BYTE:4 6.588235294117648 +(byte) current_ypos#17 current_ypos zp ZP_BYTE:3 11.206896551724137 +(byte~) current_ypos#62 current_ypos#62 zp ZP_BYTE:4 11.0 (void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val) (label) fill::@1 (label) fill::@return (byte*) fill::addr -(byte*) fill::addr#0 addr zp ZP_WORD:4 2.0 -(byte*) fill::addr#1 addr zp ZP_WORD:4 16.5 -(byte*) fill::addr#2 addr zp ZP_WORD:4 17.5 +(byte*) fill::addr#0 addr zp ZP_WORD:11 2.0 +(byte*) fill::addr#1 addr zp ZP_WORD:11 16.5 +(byte*) fill::addr#2 addr zp ZP_WORD:11 17.5 (byte*) fill::end -(byte*) fill::end#0 end zp ZP_WORD:6 2.6 +(byte*) fill::end#0 end zp ZP_WORD:13 2.6 (word) fill::size (byte*) fill::start (byte) fill::val (byte) fill::val#3 reg byte x 1.8333333333333333 (void()) init() (byte~) init::$4 reg byte a 22.0 -(byte*~) init::$7 $7 zp ZP_WORD:6 202.0 +(byte*~) init::$7 $7 zp ZP_WORD:13 202.0 (label) init::@1 (label) init::@2 (label) init::@3 @@ -1611,227 +6683,1029 @@ FINAL SYMBOL TABLE (byte) init::l#1 l zp ZP_BYTE:2 16.5 (byte) init::l#4 l zp ZP_BYTE:2 3.142857142857143 (byte*) init::li -(byte*) init::li#1 li zp ZP_WORD:4 7.333333333333333 -(byte*) init::li#2 li zp ZP_WORD:4 11.0 +(byte*) init::li#1 li zp ZP_WORD:11 7.333333333333333 +(byte*) init::li#2 li zp ZP_WORD:11 11.0 (byte*) init::line -(byte*) init::line#1 line zp ZP_WORD:4 7.333333333333333 -(byte*) init::line#4 line zp ZP_WORD:4 20.499999999999996 +(byte*) init::line#1 line zp ZP_WORD:11 7.333333333333333 +(byte*) init::line#4 line zp ZP_WORD:11 20.499999999999996 +(byte()) keyboard_event_get() +(label) keyboard_event_get::@3 +(label) keyboard_event_get::@return +(byte) keyboard_event_get::return +(byte) keyboard_event_get::return#1 reg byte a 4.0 +(byte) keyboard_event_get::return#2 reg byte a 34.33333333333333 +(byte) keyboard_event_get::return#3 reg byte a 202.0 +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) +(byte~) keyboard_event_pressed::$0 reg byte a 4.0 +(byte~) keyboard_event_pressed::$1 reg byte a 4.0 +(label) keyboard_event_pressed::@return +(byte) keyboard_event_pressed::keycode +(byte) keyboard_event_pressed::keycode#5 keycode zp ZP_BYTE:7 1.3333333333333333 +(byte) keyboard_event_pressed::return +(byte) keyboard_event_pressed::return#0 reg byte a 4.0 +(byte) keyboard_event_pressed::return#1 reg byte a 4.0 +(byte) keyboard_event_pressed::return#10 reg byte a 4.0 +(byte) keyboard_event_pressed::return#11 reg byte a 15.857142857142861 +(byte) keyboard_event_pressed::return#12 reg byte a 202.0 +(byte) keyboard_event_pressed::return#2 reg byte a 4.0 +(byte) keyboard_event_pressed::row_bits +(byte) keyboard_event_pressed::row_bits#0 row_bits zp ZP_BYTE:9 2.0 +(void()) keyboard_event_scan() +(byte/word/dword~) keyboard_event_scan::$11 reg byte a 20002.0 +(byte~) keyboard_event_scan::$14 reg byte a 4.0 +(byte~) keyboard_event_scan::$18 reg byte a 4.0 +(byte~) keyboard_event_scan::$22 reg byte a 4.0 +(byte~) keyboard_event_scan::$26 reg byte a 4.0 +(byte~) keyboard_event_scan::$3 reg byte a 20002.0 +(byte~) keyboard_event_scan::$4 reg byte a 20002.0 +(label) keyboard_event_scan::@1 +(label) keyboard_event_scan::@10 +(label) keyboard_event_scan::@11 +(label) keyboard_event_scan::@13 +(label) keyboard_event_scan::@15 +(label) keyboard_event_scan::@16 +(label) keyboard_event_scan::@17 +(label) keyboard_event_scan::@19 +(label) keyboard_event_scan::@20 +(label) keyboard_event_scan::@21 +(label) keyboard_event_scan::@22 +(label) keyboard_event_scan::@23 +(label) keyboard_event_scan::@24 +(label) keyboard_event_scan::@25 +(label) keyboard_event_scan::@26 +(label) keyboard_event_scan::@27 +(label) keyboard_event_scan::@28 +(label) keyboard_event_scan::@29 +(label) keyboard_event_scan::@3 +(label) keyboard_event_scan::@4 +(label) keyboard_event_scan::@5 +(label) keyboard_event_scan::@7 +(label) keyboard_event_scan::@9 +(label) keyboard_event_scan::@return +(byte) keyboard_event_scan::col +(byte) keyboard_event_scan::col#1 col zp ZP_BYTE:7 15001.5 +(byte) keyboard_event_scan::col#2 col zp ZP_BYTE:7 2857.4285714285716 +(byte) keyboard_event_scan::event_type +(byte) keyboard_event_scan::event_type#0 reg byte a 20002.0 +(byte) keyboard_event_scan::keycode +(byte) keyboard_event_scan::keycode#1 keycode zp ZP_BYTE:8 2002.0 +(byte) keyboard_event_scan::keycode#10 keycode zp ZP_BYTE:8 3154.230769230769 +(byte) keyboard_event_scan::keycode#11 keycode zp ZP_BYTE:8 500.5 +(byte) keyboard_event_scan::keycode#14 keycode zp ZP_BYTE:8 1001.0 +(byte) keyboard_event_scan::keycode#15 keycode zp ZP_BYTE:8 5250.75 +(byte) keyboard_event_scan::row +(byte) keyboard_event_scan::row#1 row zp ZP_BYTE:4 1501.5 +(byte) keyboard_event_scan::row#2 row zp ZP_BYTE:4 600.24 +(byte) keyboard_event_scan::row_scan +(byte) keyboard_event_scan::row_scan#0 row_scan zp ZP_BYTE:9 1278.0555555555554 +(byte[8]) keyboard_events +(const byte[8]) keyboard_events#0 keyboard_events = { fill( 8, 0) } +(byte) keyboard_events_size +(byte) keyboard_events_size#1 reg byte x 20002.0 +(byte) keyboard_events_size#10 reg byte x 8100.9000000000015 +(byte) keyboard_events_size#13 reg byte x 97.06451612903226 +(byte) keyboard_events_size#16 reg byte x 2.2745098039215685 +(byte) keyboard_events_size#19 reg byte x 22.799999999999997 +(byte) keyboard_events_size#2 reg byte x 20002.0 +(byte) keyboard_events_size#29 reg byte x 429.2857142857143 +(byte) keyboard_events_size#30 reg byte x 10201.2 +(byte) keyboard_events_size#4 reg byte x 3.0 +(byte[8]) keyboard_matrix_col_bitmask +(const byte[8]) keyboard_matrix_col_bitmask#0 keyboard_matrix_col_bitmask = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 } +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) +(label) keyboard_matrix_read::@return +(byte) keyboard_matrix_read::return +(byte) keyboard_matrix_read::return#0 reg byte a 334.33333333333337 +(byte) keyboard_matrix_read::return#2 reg byte a 2002.0 +(byte) keyboard_matrix_read::row_pressed_bits +(byte) keyboard_matrix_read::rowid +(byte) keyboard_matrix_read::rowid#0 reg byte y 1003.0 +(byte[8]) keyboard_matrix_row_bitmask +(const byte[8]) keyboard_matrix_row_bitmask#0 keyboard_matrix_row_bitmask = { (byte/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 } +(byte) keyboard_modifiers +(byte[8]) keyboard_scan_values +(const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) } (void()) main() -(label) main::@2 +(byte~) main::$19 reg byte a 202.0 +(byte/signed word/word/dword/signed dword~) main::$28 reg byte a 202.0 +(byte/signed word/word/dword/signed dword~) main::$32 reg byte a 202.0 +(byte~) main::$9 reg byte a 202.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@29 +(label) main::@30 +(label) main::@31 +(label) main::@32 +(label) main::@33 +(label) main::@34 +(label) main::@35 +(label) main::@36 +(label) main::@37 +(label) main::@38 +(label) main::@39 +(label) main::@4 +(label) main::@41 +(label) main::@42 +(label) main::@44 +(label) main::@45 +(label) main::@46 +(label) main::@48 +(label) main::@49 (label) main::@7 -(label) main::@8 +(label) main::@9 +(byte) main::key_event +(byte) main::key_event#0 key_event zp ZP_BYTE:8 20.794117647058826 +(byte) main::movedown +(byte) main::movedown#10 movedown zp ZP_BYTE:4 50.5 +(byte) main::movedown#2 movedown zp ZP_BYTE:4 202.0 +(byte) main::movedown#3 movedown zp ZP_BYTE:4 202.0 +(byte) main::movedown#6 movedown zp ZP_BYTE:4 303.0 +(byte) main::movedown#7 movedown zp ZP_BYTE:4 252.5 +(byte) main::render +(byte) main::render#10 reg byte y 101.0 +(byte) main::render#11 reg byte y 101.0 +(byte) main::render#13 reg byte y 60.599999999999994 +(byte) main::render#16 reg byte y 134.66666666666666 +(byte) main::render#2 reg byte y 202.0 +(byte) main::render#3 reg byte y 202.0 +(byte) main::render#4 reg byte y 202.0 +(byte) main::render#5 reg byte y 202.0 +(byte) main::render#7 reg byte y 404.0 +(byte[4*4*4]) piece_t +(const byte[4*4*4]) piece_t#0 piece_t = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 } (byte[20*10]) playfield (const byte[20*10]) playfield#0 playfield = { fill( 20*10, 0) } -(void()) render_current_piece() -(label) render_current_piece::@return +(void()) render_current() +(byte~) render_current::$1 reg byte a 202.0 +(byte~) render_current::$2 reg byte a 202.0 +(label) render_current::@1 +(label) render_current::@2 +(label) render_current::@3 +(label) render_current::@5 +(label) render_current::@6 +(label) render_current::@7 +(label) render_current::@return +(byte) render_current::c +(byte) render_current::c#1 c zp ZP_BYTE:10 1501.5 +(byte) render_current::c#2 c zp ZP_BYTE:10 429.0 +(byte) render_current::current_cell +(byte) render_current::current_cell#0 current_cell zp ZP_BYTE:15 600.5999999999999 +(byte*) render_current::current_piece_gfx +(byte*) render_current::current_piece_gfx#0 current_piece_gfx zp ZP_WORD:11 62.6875 +(byte) render_current::i +(byte) render_current::i#1 i zp ZP_BYTE:9 233.66666666666669 +(byte) render_current::i#2 i zp ZP_BYTE:9 1552.0 +(byte) render_current::i#3 i zp ZP_BYTE:9 50.5 +(byte) render_current::l +(byte) render_current::l#1 l zp ZP_BYTE:8 151.5 +(byte) render_current::l#2 l zp ZP_BYTE:8 23.307692307692307 +(byte*) render_current::screen_line +(byte*) render_current::screen_line#0 screen_line zp ZP_WORD:13 110.19999999999999 +(byte) render_current::xpos +(byte) render_current::xpos#0 reg byte a 1501.5 (void()) render_playfield() -(byte~) render_playfield::$0 reg byte a 22.0 -(byte*~) render_playfield::$1 $1 zp ZP_WORD:6 202.0 +(byte~) render_playfield::$0 reg byte a 202.0 +(byte*~) render_playfield::$1 $1 zp ZP_WORD:13 2002.0 (label) render_playfield::@1 (label) render_playfield::@2 (label) render_playfield::@3 (label) render_playfield::@return (byte) render_playfield::c -(byte) render_playfield::c#1 reg byte x 151.5 -(byte) render_playfield::c#2 reg byte x 75.75 +(byte) render_playfield::c#1 c zp ZP_BYTE:7 1501.5 +(byte) render_playfield::c#2 c zp ZP_BYTE:7 750.75 (byte) render_playfield::i -(byte) render_playfield::i#1 i zp ZP_BYTE:3 42.599999999999994 -(byte) render_playfield::i#2 i zp ZP_BYTE:3 104.66666666666666 -(byte) render_playfield::i#3 i zp ZP_BYTE:3 7.333333333333333 +(byte) render_playfield::i#1 i zp ZP_BYTE:8 420.59999999999997 +(byte) render_playfield::i#2 i zp ZP_BYTE:8 1034.6666666666667 +(byte) render_playfield::i#3 i zp ZP_BYTE:8 67.33333333333333 (byte) render_playfield::l -(byte) render_playfield::l#1 l zp ZP_BYTE:2 16.5 -(byte) render_playfield::l#2 l zp ZP_BYTE:2 3.666666666666667 +(byte) render_playfield::l#1 l zp ZP_BYTE:4 151.5 +(byte) render_playfield::l#2 l zp ZP_BYTE:4 33.666666666666664 (byte*) render_playfield::line -(byte*) render_playfield::line#0 line zp ZP_WORD:4 16.0 +(byte*) render_playfield::line#0 line zp ZP_WORD:11 157.42857142857142 (byte*[20]) screen_lines (const byte*[20]) screen_lines#0 screen_lines = { fill( 20, 0) } -zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 init::l#4 init::l#1 ] -reg byte x [ render_playfield::c#2 render_playfield::c#1 ] -zp ZP_BYTE:3 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 init::l#4 init::l#1 ] +zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 current_ypos#14 current_ypos#62 render_playfield::l#2 render_playfield::l#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +reg byte y [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] +reg byte y [ current_piece_orientation#13 current_piece_orientation#66 ] +zp ZP_BYTE:7 [ current_xpos#26 current_xpos#64 render_playfield::c#2 render_playfield::c#1 keyboard_event_pressed::keycode#5 keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +zp ZP_BYTE:8 [ render_current::l#2 render_current::l#1 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 main::key_event#0 ] +zp ZP_BYTE:9 [ render_current::i#2 render_current::i#3 render_current::i#1 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 ] +zp ZP_BYTE:10 [ render_current::c#2 render_current::c#1 ] +reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +reg byte x [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] reg byte x [ init::i#2 init::i#1 ] -zp ZP_WORD:4 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_playfield::line#0 ] +zp ZP_WORD:11 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_current::current_piece_gfx#0 render_playfield::line#0 ] reg byte x [ init::c#2 init::c#1 ] reg byte x [ fill::val#3 ] +reg byte a [ keyboard_event_get::return#3 ] +reg byte a [ keyboard_event_pressed::return#12 ] +reg byte a [ main::$9 ] +reg byte a [ main::$19 ] +reg byte a [ main::$28 ] +reg byte a [ main::$32 ] +reg byte a [ render_current::$1 ] +reg byte a [ render_current::$2 ] +zp ZP_WORD:13 [ render_current::screen_line#0 render_playfield::$1 init::$7 fill::end#0 ] +zp ZP_BYTE:15 [ render_current::current_cell#0 ] +reg byte a [ render_current::xpos#0 ] reg byte a [ render_playfield::$0 ] -zp ZP_WORD:6 [ render_playfield::$1 init::$7 fill::end#0 ] +reg byte a [ keyboard_event_pressed::$0 ] +reg byte a [ keyboard_event_pressed::$1 ] +reg byte a [ keyboard_event_pressed::return#11 ] +reg byte y [ keyboard_matrix_read::rowid#0 ] +reg byte a [ keyboard_matrix_read::return#2 ] +reg byte a [ keyboard_event_pressed::return#0 ] +reg byte a [ keyboard_event_scan::$14 ] +reg byte a [ keyboard_event_pressed::return#1 ] +reg byte a [ keyboard_event_scan::$18 ] +reg byte a [ keyboard_event_pressed::return#2 ] +reg byte a [ keyboard_event_scan::$22 ] +reg byte a [ keyboard_event_pressed::return#10 ] +reg byte a [ keyboard_event_scan::$26 ] +reg byte a [ keyboard_event_scan::$3 ] +reg byte a [ keyboard_event_scan::$4 ] +reg byte a [ keyboard_event_scan::event_type#0 ] +reg byte a [ keyboard_event_scan::$11 ] +reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ init::$4 ] FINAL ASSEMBLER -Score: 10410 +Score: 1099332 //SEG0 Basic Upstart .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" //SEG1 Global Constants & labels + .label RASTER = $d012 .label BORDERCOL = $d020 .label COLS = $d800 + .label CIA1_PORT_A = $dc00 + .label CIA1_PORT_B = $dc01 .const BLACK = 0 - .const GREEN = 5 .const DARK_GREY = $b + .const KEY_Z = $c + .const KEY_LSHIFT = $f + .const KEY_X = $17 + .const KEY_DOT = $2c + .const KEY_COMMA = $2f + .const KEY_RSHIFT = $34 + .const KEY_CTRL = $3a + .const KEY_SPACE = $3c + .const KEY_COMMODORE = $3d .label SCREEN = $400 + .const current_movedown_rate = $32 + .const current_movedown_rate_fast = 5 + .label current_movedown_counter = 2 + .label current_xpos = 5 + .label current_piece_orientation = 6 + .label current_ypos = 3 + .label current_ypos_14 = 4 + .label current_xpos_26 = 7 + .label current_ypos_62 = 4 + .label current_xpos_64 = 7 //SEG2 @begin -//SEG3 [1] phi from @begin to @8 [phi:@begin->@8] -//SEG4 @8 +//SEG3 [1] phi from @begin to @16 [phi:@begin->@16] +//SEG4 @16 //SEG5 [2] call main -//SEG6 [4] phi from @8 to main [phi:@8->main] +//SEG6 [4] phi from @16 to main [phi:@16->main] jsr main -//SEG7 [3] phi from @8 to @end [phi:@8->@end] +//SEG7 [3] phi from @16 to @end [phi:@16->@end] //SEG8 @end //SEG9 main main: { + .label key_event = 8 + .label movedown = 4 //SEG10 [5] call init + //SEG11 [165] phi from main to init [phi:main->init] jsr init - //SEG11 [6] phi from main to main::@7 [phi:main->main::@7] - //SEG12 main::@7 - //SEG13 [7] call render_playfield - //SEG14 [13] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] + //SEG12 [6] phi from main to main::@41 [phi:main->main::@41] + //SEG13 main::@41 + //SEG14 [7] call render_playfield + //SEG15 [83] phi from main::@41 to render_playfield [phi:main::@41->render_playfield] jsr render_playfield - //SEG15 [8] phi from main::@7 to main::@8 [phi:main::@7->main::@8] - //SEG16 main::@8 - //SEG17 [9] call render_current_piece - //SEG18 [11] phi from main::@8 to render_current_piece [phi:main::@8->render_current_piece] - jsr render_current_piece - //SEG19 main::@2 + //SEG16 [8] phi from main::@41 to main::@42 [phi:main::@41->main::@42] + //SEG17 main::@42 + //SEG18 [9] call render_current + //SEG19 [65] phi from main::@42 to render_current [phi:main::@42->render_current] + //SEG20 [65] phi (byte) current_xpos#26 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@42->render_current#0] -- vbuz1=vbuc1 + lda #3 + sta current_xpos_26 + //SEG21 [65] phi (byte) current_ypos#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->render_current#1] -- vbuz1=vbuc1 + lda #0 + sta current_ypos_14 + //SEG22 [65] phi (byte) current_piece_orientation#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->render_current#2] -- vbuyy=vbuc1 + tay + jsr render_current + //SEG23 [10] phi from main::@42 to main::@1 [phi:main::@42->main::@1] + //SEG24 [10] phi (byte) current_xpos#12 = (byte/signed byte/word/signed word/dword/signed dword) 3 [phi:main::@42->main::@1#0] -- vbuz1=vbuc1 + lda #3 + sta current_xpos + //SEG25 [10] phi (byte) current_ypos#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta current_ypos + //SEG26 [10] phi (byte) current_movedown_counter#14 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#2] -- vbuz1=vbuc1 + sta current_movedown_counter + //SEG27 [10] phi (byte) keyboard_events_size#19 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#3] -- vbuxx=vbuc1 + tax + //SEG28 [10] phi (byte) current_piece_orientation#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@42->main::@1#4] -- vbuz1=vbuc1 + sta current_piece_orientation + //SEG29 [10] phi from main::@15 main::@49 to main::@1 [phi:main::@15/main::@49->main::@1] + //SEG30 [10] phi (byte) current_xpos#12 = (byte) current_xpos#15 [phi:main::@15/main::@49->main::@1#0] -- register_copy + //SEG31 [10] phi (byte) current_ypos#13 = (byte) current_ypos#17 [phi:main::@15/main::@49->main::@1#1] -- register_copy + //SEG32 [10] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#16 [phi:main::@15/main::@49->main::@1#2] -- register_copy + //SEG33 [10] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@15/main::@49->main::@1#3] -- register_copy + //SEG34 [10] phi (byte) current_piece_orientation#11 = (byte) current_piece_orientation#21 [phi:main::@15/main::@49->main::@1#4] -- register_copy + //SEG35 main::@1 + //SEG36 main::@4 + b4: + //SEG37 [11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$ff + bne b4 + //SEG38 main::@7 + b7: + //SEG39 [12] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto main::@7 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$fe + bne b7 + //SEG40 [13] phi from main::@7 to main::@9 [phi:main::@7->main::@9] + //SEG41 main::@9 + //SEG42 [14] call keyboard_event_scan + //SEG43 [109] phi from main::@9 to keyboard_event_scan [phi:main::@9->keyboard_event_scan] + jsr keyboard_event_scan + //SEG44 [15] phi from main::@9 to main::@44 [phi:main::@9->main::@44] + //SEG45 main::@44 + //SEG46 [16] call keyboard_event_get + jsr keyboard_event_get + //SEG47 [17] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + // (byte) keyboard_event_get::return#3 = (byte) keyboard_event_get::return#2 // register copy reg byte a + //SEG48 main::@45 + //SEG49 [18] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 -- vbuz1=vbuaa + sta key_event + //SEG50 [19] (byte) current_movedown_counter#1 ← ++ (byte) current_movedown_counter#14 -- vbuz1=_inc_vbuz1 + inc current_movedown_counter + //SEG51 [20] if((byte) main::key_event#0!=(const byte) KEY_SPACE#0) goto main::@10 -- vbuz1_neq_vbuc1_then_la1 + cmp #KEY_SPACE + bne b1 + //SEG52 [21] phi from main::@45 to main::@29 [phi:main::@45->main::@29] + //SEG53 main::@29 + //SEG54 [22] phi from main::@29 to main::@10 [phi:main::@29->main::@10] + //SEG55 [22] phi (byte) main::movedown#10 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@29->main::@10#0] -- vbuz1=vbuc1 + lda #1 + sta movedown + jmp b10 + //SEG56 [22] phi from main::@45 to main::@10 [phi:main::@45->main::@10] + b1: + //SEG57 [22] phi (byte) main::movedown#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@45->main::@10#0] -- vbuz1=vbuc1 + lda #0 + sta movedown + //SEG58 main::@10 + b10: + //SEG59 [23] call keyboard_event_pressed + //SEG60 [98] phi from main::@10 to keyboard_event_pressed [phi:main::@10->keyboard_event_pressed] + //SEG61 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE#0 [phi:main::@10->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_SPACE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG62 [24] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#12 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + //SEG63 main::@46 + //SEG64 [25] (byte~) main::$9 ← (byte) keyboard_event_pressed::return#12 + // (byte~) main::$9 = (byte) keyboard_event_pressed::return#12 // register copy reg byte a + //SEG65 [26] if((byte~) main::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@11 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b11 + //SEG66 main::@30 + //SEG67 [27] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate_fast#0) goto main::@11 -- vbuz1_lt_vbuc1_then_la1 + lda current_movedown_counter + cmp #current_movedown_rate_fast + bcc b11 + //SEG68 main::@31 + //SEG69 [28] (byte) main::movedown#2 ← ++ (byte) main::movedown#10 -- vbuz1=_inc_vbuz1 + inc movedown + //SEG70 [29] phi from main::@30 main::@31 main::@46 to main::@11 [phi:main::@30/main::@31/main::@46->main::@11] + //SEG71 [29] phi (byte) main::movedown#7 = (byte) main::movedown#10 [phi:main::@30/main::@31/main::@46->main::@11#0] -- register_copy + //SEG72 main::@11 + b11: + //SEG73 [30] if((byte) current_movedown_counter#1<(const byte) current_movedown_rate#0) goto main::@13 -- vbuz1_lt_vbuc1_then_la1 + lda current_movedown_counter + cmp #current_movedown_rate + bcc b13 + //SEG74 main::@32 + //SEG75 [31] (byte) main::movedown#3 ← ++ (byte) main::movedown#7 -- vbuz1=_inc_vbuz1 + inc movedown + //SEG76 [32] phi from main::@11 main::@32 to main::@13 [phi:main::@11/main::@32->main::@13] + //SEG77 [32] phi (byte) main::movedown#6 = (byte) main::movedown#7 [phi:main::@11/main::@32->main::@13#0] -- register_copy + //SEG78 main::@13 + b13: + //SEG79 [33] if((byte) main::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@14 -- vbuz1_eq_0_then_la1 + lda movedown + beq b2 + //SEG80 [34] phi from main::@13 to main::@33 [phi:main::@13->main::@33] + //SEG81 main::@33 + //SEG82 [35] call current_movedown + jsr current_movedown + //SEG83 [36] phi from main::@33 to main::@14 [phi:main::@33->main::@14] + //SEG84 [36] phi (byte) current_ypos#17 = (byte) current_ypos#10 [phi:main::@33->main::@14#0] -- register_copy + //SEG85 [36] phi (byte) current_movedown_counter#16 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@33->main::@14#1] -- vbuz1=vbuc1 + lda #0 + sta current_movedown_counter + //SEG86 [36] phi (byte) main::render#13 = (byte/signed byte/word/signed word/dword/signed dword) 1 [phi:main::@33->main::@14#2] -- vbuyy=vbuc1 + ldy #1 + jmp b14 + //SEG87 [36] phi from main::@13 to main::@14 [phi:main::@13->main::@14] b2: - //SEG20 [10] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG88 [36] phi (byte) current_ypos#17 = (byte) current_ypos#13 [phi:main::@13->main::@14#0] -- register_copy + //SEG89 [36] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#1 [phi:main::@13->main::@14#1] -- register_copy + //SEG90 [36] phi (byte) main::render#13 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@13->main::@14#2] -- vbuyy=vbuc1 + ldy #0 + //SEG91 main::@14 + b14: + //SEG92 [37] (byte~) main::$19 ← (byte) main::key_event#0 & (byte/word/signed word/dword/signed dword) 128 -- vbuaa=vbuz1_band_vbuc1 + lda #$80 + and key_event + //SEG93 [38] if((byte~) main::$19!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@15 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b15 + //SEG94 main::@34 + //SEG95 [39] if((byte) main::key_event#0!=(const byte) KEY_COMMA#0) goto main::@16 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_COMMA + bne b16 + //SEG96 main::@35 + //SEG97 [40] (byte) current_xpos#1 ← -- (byte) current_xpos#12 -- vbuz1=_dec_vbuz1 + dec current_xpos + //SEG98 [41] (byte) main::render#2 ← ++ (byte) main::render#13 -- vbuyy=_inc_vbuyy + iny + //SEG99 [42] phi from main::@34 main::@35 to main::@16 [phi:main::@34/main::@35->main::@16] + //SEG100 [42] phi (byte) main::render#16 = (byte) main::render#13 [phi:main::@34/main::@35->main::@16#0] -- register_copy + //SEG101 [42] phi (byte) current_xpos#11 = (byte) current_xpos#12 [phi:main::@34/main::@35->main::@16#1] -- register_copy + //SEG102 main::@16 + b16: + //SEG103 [43] if((byte) main::key_event#0!=(const byte) KEY_DOT#0) goto main::@17 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_DOT + bne b17 + //SEG104 main::@36 + //SEG105 [44] (byte) current_xpos#2 ← ++ (byte) current_xpos#11 -- vbuz1=_inc_vbuz1 + inc current_xpos + //SEG106 [45] (byte) main::render#3 ← ++ (byte) main::render#16 -- vbuyy=_inc_vbuyy + iny + //SEG107 [46] phi from main::@16 main::@36 to main::@17 [phi:main::@16/main::@36->main::@17] + //SEG108 [46] phi (byte) current_xpos#34 = (byte) current_xpos#11 [phi:main::@16/main::@36->main::@17#0] -- register_copy + //SEG109 [46] phi (byte) main::render#10 = (byte) main::render#16 [phi:main::@16/main::@36->main::@17#1] -- register_copy + //SEG110 main::@17 + b17: + //SEG111 [47] if((byte) main::key_event#0!=(const byte) KEY_Z#0) goto main::@18 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_Z + bne b18 + //SEG112 main::@37 + //SEG113 [48] (byte/signed word/word/dword/signed dword~) main::$28 ← (byte) current_piece_orientation#11 - (byte/signed byte/word/signed word/dword/signed dword) 16 -- vbuaa=vbuz1_minus_vbuc1 + lda current_piece_orientation + sec + sbc #$10 + //SEG114 [49] (byte) current_piece_orientation#2 ← (byte/signed word/word/dword/signed dword~) main::$28 & (byte/signed byte/word/signed word/dword/signed dword) 63 -- vbuz1=vbuaa_band_vbuc1 + and #$3f + sta current_piece_orientation + //SEG115 [50] (byte) main::render#4 ← ++ (byte) main::render#10 -- vbuyy=_inc_vbuyy + iny + //SEG116 [51] phi from main::@17 main::@37 to main::@18 [phi:main::@17/main::@37->main::@18] + //SEG117 [51] phi (byte) main::render#11 = (byte) main::render#10 [phi:main::@17/main::@37->main::@18#0] -- register_copy + //SEG118 [51] phi (byte) current_piece_orientation#10 = (byte) current_piece_orientation#11 [phi:main::@17/main::@37->main::@18#1] -- register_copy + //SEG119 main::@18 + b18: + //SEG120 [52] if((byte) main::key_event#0!=(const byte) KEY_X#0) goto main::@15 -- vbuz1_neq_vbuc1_then_la1 + lda key_event + cmp #KEY_X + bne b15 + //SEG121 main::@38 + //SEG122 [53] (byte/signed word/word/dword/signed dword~) main::$32 ← (byte) current_piece_orientation#10 + (byte/signed byte/word/signed word/dword/signed dword) 16 -- vbuaa=vbuz1_plus_vbuc1 + lda #$10 + clc + adc current_piece_orientation + //SEG123 [54] (byte) current_piece_orientation#3 ← (byte/signed word/word/dword/signed dword~) main::$32 & (byte/signed byte/word/signed word/dword/signed dword) 63 -- vbuz1=vbuaa_band_vbuc1 + and #$3f + sta current_piece_orientation + //SEG124 [55] (byte) main::render#5 ← ++ (byte) main::render#11 -- vbuyy=_inc_vbuyy + iny + //SEG125 [56] phi from main::@14 main::@18 main::@38 to main::@15 [phi:main::@14/main::@18/main::@38->main::@15] + //SEG126 [56] phi (byte) current_xpos#15 = (byte) current_xpos#12 [phi:main::@14/main::@18/main::@38->main::@15#0] -- register_copy + //SEG127 [56] phi (byte) current_piece_orientation#21 = (byte) current_piece_orientation#11 [phi:main::@14/main::@18/main::@38->main::@15#1] -- register_copy + //SEG128 [56] phi (byte) main::render#7 = (byte) main::render#13 [phi:main::@14/main::@18/main::@38->main::@15#2] -- register_copy + //SEG129 main::@15 + b15: + //SEG130 [57] if((byte) main::render#7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuyy_eq_0_then_la1 + cpy #0 + bne !b4+ + jmp b4 + !b4: + //SEG131 main::@39 + //SEG132 [58] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL - jmp b2 + //SEG133 [59] call render_playfield + //SEG134 [83] phi from main::@39 to render_playfield [phi:main::@39->render_playfield] + jsr render_playfield + //SEG135 main::@48 + //SEG136 [60] (byte~) current_piece_orientation#66 ← (byte) current_piece_orientation#21 -- vbuyy=vbuz1 + ldy current_piece_orientation + //SEG137 [61] (byte~) current_ypos#62 ← (byte) current_ypos#17 -- vbuz1=vbuz2 + lda current_ypos + sta current_ypos_62 + //SEG138 [62] (byte~) current_xpos#64 ← (byte) current_xpos#15 -- vbuz1=vbuz2 + lda current_xpos + sta current_xpos_64 + //SEG139 [63] call render_current + //SEG140 [65] phi from main::@48 to render_current [phi:main::@48->render_current] + //SEG141 [65] phi (byte) current_xpos#26 = (byte~) current_xpos#64 [phi:main::@48->render_current#0] -- register_copy + //SEG142 [65] phi (byte) current_ypos#14 = (byte~) current_ypos#62 [phi:main::@48->render_current#1] -- register_copy + //SEG143 [65] phi (byte) current_piece_orientation#13 = (byte~) current_piece_orientation#66 [phi:main::@48->render_current#2] -- register_copy + jsr render_current + //SEG144 main::@49 + //SEG145 [64] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDERCOL + jmp b4 } -//SEG21 render_current_piece -render_current_piece: { - //SEG22 render_current_piece::@return - //SEG23 [12] return - rts -} -//SEG24 render_playfield -render_playfield: { - .label _1 = 6 - .label line = 4 - .label i = 3 - .label l = 2 - //SEG25 [14] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] - //SEG26 [14] phi (byte) render_playfield::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 +//SEG146 render_current +render_current: { + .label current_piece_gfx = $b + .label screen_line = $d + .label current_cell = $f + .label i = 9 + .label c = $a + .label l = 8 + //SEG147 [66] (byte*) render_current::current_piece_gfx#0 ← (const byte[4*4*4]) piece_t#0 + (byte) current_piece_orientation#13 -- pbuz1=pbuc1_plus_vbuyy + tya + clc + adc #piece_t + adc #0 + sta current_piece_gfx+1 + //SEG148 [67] phi from render_current to render_current::@1 [phi:render_current->render_current::@1] + //SEG149 [67] phi (byte) render_current::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current->render_current::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG27 [14] phi (byte) render_playfield::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + //SEG150 [67] phi (byte) render_current::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current->render_current::@1#1] -- vbuz1=vbuc1 sta l - //SEG28 [14] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] - //SEG29 [14] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy - //SEG30 [14] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy - //SEG31 render_playfield::@1 + //SEG151 [67] phi from render_current::@7 to render_current::@1 [phi:render_current::@7->render_current::@1] + //SEG152 [67] phi (byte) render_current::i#3 = (byte) render_current::i#1 [phi:render_current::@7->render_current::@1#0] -- register_copy + //SEG153 [67] phi (byte) render_current::l#2 = (byte) render_current::l#1 [phi:render_current::@7->render_current::@1#1] -- register_copy + //SEG154 render_current::@1 b1: - //SEG32 [15] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 + //SEG155 [68] (byte~) render_current::$1 ← (byte) current_ypos#14 + (byte) render_current::l#2 -- vbuaa=vbuz1_plus_vbuz2 + lda current_ypos_14 + clc + adc l + //SEG156 [69] (byte~) render_current::$2 ← (byte~) render_current::$1 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuaa_rol_1 + asl + //SEG157 [70] (byte*) render_current::screen_line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_current::$2) -- pbuz1=pptc1_derefidx_vbuaa + tay + lda screen_lines,y + sta screen_line + lda screen_lines+1,y + sta screen_line+1 + //SEG158 [71] phi from render_current::@1 to render_current::@2 [phi:render_current::@1->render_current::@2] + //SEG159 [71] phi (byte) render_current::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_current::@1->render_current::@2#0] -- vbuz1=vbuc1 + lda #0 + sta c + //SEG160 [71] phi (byte) render_current::i#2 = (byte) render_current::i#3 [phi:render_current::@1->render_current::@2#1] -- register_copy + //SEG161 [71] phi from render_current::@3 to render_current::@2 [phi:render_current::@3->render_current::@2] + //SEG162 [71] phi (byte) render_current::c#2 = (byte) render_current::c#1 [phi:render_current::@3->render_current::@2#0] -- register_copy + //SEG163 [71] phi (byte) render_current::i#2 = (byte) render_current::i#1 [phi:render_current::@3->render_current::@2#1] -- register_copy + //SEG164 render_current::@2 + b2: + //SEG165 [72] (byte) render_current::current_cell#0 ← *((byte*) render_current::current_piece_gfx#0 + (byte) render_current::i#2) -- vbuz1=pbuz2_derefidx_vbuz3 + ldy i + lda (current_piece_gfx),y + sta current_cell + //SEG166 [73] (byte) render_current::i#1 ← ++ (byte) render_current::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG167 [74] if((byte) render_current::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_current::@3 -- vbuz1_eq_0_then_la1 + beq b3 + //SEG168 render_current::@5 + //SEG169 [75] (byte) render_current::xpos#0 ← (byte) current_xpos#26 + (byte) render_current::c#2 -- vbuaa=vbuz1_plus_vbuz2 + lda current_xpos_26 + clc + adc c + //SEG170 [76] if((byte) render_current::xpos#0>=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_current::@3 -- vbuaa_ge_vbuc1_then_la1 + cmp #$a + bcs b3 + //SEG171 render_current::@6 + //SEG172 [77] *((byte*) render_current::screen_line#0 + (byte) render_current::xpos#0) ← (byte) render_current::current_cell#0 -- pbuz1_derefidx_vbuaa=vbuz2 + tay + lda current_cell + sta (screen_line),y + //SEG173 render_current::@3 + b3: + //SEG174 [78] (byte) render_current::c#1 ← ++ (byte) render_current::c#2 -- vbuz1=_inc_vbuz1 + inc c + //SEG175 [79] if((byte) render_current::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@2 -- vbuz1_neq_vbuc1_then_la1 + lda c + cmp #4 + bne b2 + //SEG176 render_current::@7 + //SEG177 [80] (byte) render_current::l#1 ← ++ (byte) render_current::l#2 -- vbuz1=_inc_vbuz1 + inc l + //SEG178 [81] if((byte) render_current::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_current::@1 -- vbuz1_neq_vbuc1_then_la1 + lda l + cmp #4 + bne b1 + //SEG179 render_current::@return + //SEG180 [82] return + rts +} +//SEG181 render_playfield +render_playfield: { + .label _1 = $d + .label line = $b + .label i = 8 + .label c = 7 + .label l = 4 + //SEG182 [84] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] + //SEG183 [84] phi (byte) render_playfield::i#3 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG184 [84] phi (byte) render_playfield::l#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + sta l + //SEG185 [84] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] + //SEG186 [84] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy + //SEG187 [84] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + //SEG188 render_playfield::@1 + b1: + //SEG189 [85] (byte~) render_playfield::$0 ← (byte) render_playfield::l#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuz1_rol_1 lda l asl - //SEG33 [16] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) -- pbuz1=pptc1_derefidx_vbuaa + //SEG190 [86] (byte*) render_playfield::line#0 ← *((const byte*[20]) screen_lines#0 + (byte~) render_playfield::$0) -- pbuz1=pptc1_derefidx_vbuaa tay lda screen_lines,y sta line lda screen_lines+1,y sta line+1 - //SEG34 [17] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] - //SEG35 [17] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#0] -- register_copy - //SEG36 [17] phi (byte) render_playfield::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield::@1->render_playfield::@2#1] -- vbuxx=vbuc1 - ldx #0 - //SEG37 [17] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] - //SEG38 [17] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy - //SEG39 [17] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy - //SEG40 render_playfield::@2 + //SEG191 [87] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] + //SEG192 [87] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#0] -- register_copy + //SEG193 [87] phi (byte) render_playfield::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:render_playfield::@1->render_playfield::@2#1] -- vbuz1=vbuc1 + lda #0 + sta c + //SEG194 [87] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] + //SEG195 [87] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy + //SEG196 [87] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy + //SEG197 render_playfield::@2 b2: - //SEG41 [18] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 -- pbuz1=pbuz2_plus_vbuxx - txa + //SEG198 [88] (byte*~) render_playfield::$1 ← (byte*) render_playfield::line#0 + (byte) render_playfield::c#2 -- pbuz1=pbuz2_plus_vbuz3 + lda c clc adc line sta _1 lda #0 adc line+1 sta _1+1 - //SEG42 [19] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + //SEG199 [89] *((byte*~) render_playfield::$1) ← *((const byte[20*10]) playfield#0 + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy i lda playfield,y ldy #0 sta (_1),y - //SEG43 [20] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 + //SEG200 [90] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG44 [21] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuxx=_inc_vbuxx - inx - //SEG45 [22] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 -- vbuxx_neq_vbuc1_then_la1 - cpx #$a + //SEG201 [91] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 + inc c + //SEG202 [92] if((byte) render_playfield::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 + lda c + cmp #$a bne b2 - //SEG46 render_playfield::@3 - //SEG47 [23] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 + //SEG203 render_playfield::@3 + //SEG204 [93] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 inc l - //SEG48 [24] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG205 [94] if((byte) render_playfield::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 lda l cmp #$14 bne b1 - //SEG49 render_playfield::@return - //SEG50 [25] return + //SEG206 render_playfield::@return + //SEG207 [95] return rts } -//SEG51 init +//SEG208 current_movedown +current_movedown: { + //SEG209 [96] (byte) current_ypos#10 ← ++ (byte) current_ypos#13 -- vbuz1=_inc_vbuz1 + inc current_ypos + //SEG210 current_movedown::@return + //SEG211 [97] return + rts +} +//SEG212 keyboard_event_pressed +keyboard_event_pressed: { + .label row_bits = 9 + .label keycode = 7 + //SEG213 [99] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte/signed byte/word/signed word/dword/signed dword) 3 -- vbuaa=vbuz1_ror_3 + lda keycode + lsr + lsr + lsr + //SEG214 [100] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte[8]) keyboard_scan_values#0 + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa + tay + lda keyboard_scan_values,y + sta row_bits + //SEG215 [101] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuz1_band_vbuc1 + lda #7 + and keycode + //SEG216 [102] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa + tay + lda keyboard_matrix_col_bitmask,y + and row_bits + //SEG217 keyboard_event_pressed::@return + //SEG218 [103] return + rts +} +//SEG219 keyboard_event_get +keyboard_event_get: { + //SEG220 [104] if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@return -- vbuxx_eq_0_then_la1 + cpx #0 + beq b1 + //SEG221 keyboard_event_get::@3 + //SEG222 [105] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuxx=_dec_vbuxx + dex + //SEG223 [106] (byte) keyboard_event_get::return#1 ← *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#4) -- vbuaa=pbuc1_derefidx_vbuxx + lda keyboard_events,x + //SEG224 [107] phi from keyboard_event_get::@3 to keyboard_event_get::@return [phi:keyboard_event_get::@3->keyboard_event_get::@return] + //SEG225 [107] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@3->keyboard_event_get::@return#0] -- register_copy + //SEG226 [107] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@3->keyboard_event_get::@return#1] -- register_copy + jmp breturn + //SEG227 [107] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + b1: + //SEG228 [107] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + //SEG229 [107] phi (byte) keyboard_event_get::return#2 = (byte/word/signed word/dword/signed dword) 255 [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuaa=vbuc1 + lda #$ff + //SEG230 keyboard_event_get::@return + breturn: + //SEG231 [108] return + rts +} +//SEG232 keyboard_event_scan +keyboard_event_scan: { + .label row_scan = 9 + .label keycode = 8 + .label row = 4 + .label col = 7 + //SEG233 [110] phi from keyboard_event_scan to keyboard_event_scan::@1 [phi:keyboard_event_scan->keyboard_event_scan::@1] + //SEG234 [110] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@1#0] -- register_copy + //SEG235 [110] phi (byte) keyboard_event_scan::keycode#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan->keyboard_event_scan::@1#1] -- vbuz1=vbuc1 + lda #0 + sta keycode + //SEG236 [110] phi (byte) keyboard_event_scan::row#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan->keyboard_event_scan::@1#2] -- vbuz1=vbuc1 + sta row + //SEG237 [110] phi from keyboard_event_scan::@3 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1] + //SEG238 [110] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#0] -- register_copy + //SEG239 [110] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#1] -- register_copy + //SEG240 [110] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@3->keyboard_event_scan::@1#2] -- register_copy + //SEG241 keyboard_event_scan::@1 + b1: + //SEG242 [111] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuyy=vbuz1 + ldy row + //SEG243 [112] call keyboard_matrix_read + jsr keyboard_matrix_read + //SEG244 [113] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // (byte) keyboard_matrix_read::return#2 = (byte) keyboard_matrix_read::return#0 // register copy reg byte a + //SEG245 keyboard_event_scan::@25 + //SEG246 [114] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa + sta row_scan + //SEG247 [115] if((byte) keyboard_event_scan::row_scan#0!=*((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@4 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + ldy row + cmp keyboard_scan_values,y + bne b2 + //SEG248 keyboard_event_scan::@13 + //SEG249 [116] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte/signed byte/word/signed word/dword/signed dword) 8 -- vbuz1=vbuz1_plus_vbuc1 + lda #8 + clc + adc keycode + sta keycode + //SEG250 [117] phi from keyboard_event_scan::@13 keyboard_event_scan::@19 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3] + //SEG251 [117] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3#0] -- register_copy + //SEG252 [117] phi (byte) keyboard_event_scan::keycode#14 = (byte) keyboard_event_scan::keycode#1 [phi:keyboard_event_scan::@13/keyboard_event_scan::@19->keyboard_event_scan::@3#1] -- register_copy + //SEG253 keyboard_event_scan::@3 + b3: + //SEG254 [118] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + inc row + //SEG255 [119] if((byte) keyboard_event_scan::row#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@1 -- vbuz1_neq_vbuc1_then_la1 + lda row + cmp #8 + bne b1 + //SEG256 [120] phi from keyboard_event_scan::@3 to keyboard_event_scan::@20 [phi:keyboard_event_scan::@3->keyboard_event_scan::@20] + //SEG257 keyboard_event_scan::@20 + //SEG258 [121] call keyboard_event_pressed + //SEG259 [98] phi from keyboard_event_scan::@20 to keyboard_event_pressed [phi:keyboard_event_scan::@20->keyboard_event_pressed] + //SEG260 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT#0 [phi:keyboard_event_scan::@20->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_LSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG261 [122] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#0 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + //SEG262 keyboard_event_scan::@26 + //SEG263 [123] (byte~) keyboard_event_scan::$14 ← (byte) keyboard_event_pressed::return#0 + // (byte~) keyboard_event_scan::$14 = (byte) keyboard_event_pressed::return#0 // register copy reg byte a + //SEG264 [124] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 -- vbuaa_eq_0_then_la1 + cmp #0 + //SEG265 [125] phi from keyboard_event_scan::@26 to keyboard_event_scan::@21 [phi:keyboard_event_scan::@26->keyboard_event_scan::@21] + //SEG266 keyboard_event_scan::@21 + //SEG267 [126] phi from keyboard_event_scan::@21 keyboard_event_scan::@26 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@21/keyboard_event_scan::@26->keyboard_event_scan::@9] + //SEG268 keyboard_event_scan::@9 + //SEG269 [127] call keyboard_event_pressed + //SEG270 [98] phi from keyboard_event_scan::@9 to keyboard_event_pressed [phi:keyboard_event_scan::@9->keyboard_event_pressed] + //SEG271 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT#0 [phi:keyboard_event_scan::@9->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_RSHIFT + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG272 [128] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#1 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + //SEG273 keyboard_event_scan::@27 + //SEG274 [129] (byte~) keyboard_event_scan::$18 ← (byte) keyboard_event_pressed::return#1 + // (byte~) keyboard_event_scan::$18 = (byte) keyboard_event_pressed::return#1 // register copy reg byte a + //SEG275 [130] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 + cmp #0 + //SEG276 [131] phi from keyboard_event_scan::@27 to keyboard_event_scan::@22 [phi:keyboard_event_scan::@27->keyboard_event_scan::@22] + //SEG277 keyboard_event_scan::@22 + //SEG278 [132] phi from keyboard_event_scan::@22 keyboard_event_scan::@27 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@22/keyboard_event_scan::@27->keyboard_event_scan::@10] + //SEG279 keyboard_event_scan::@10 + //SEG280 [133] call keyboard_event_pressed + //SEG281 [98] phi from keyboard_event_scan::@10 to keyboard_event_pressed [phi:keyboard_event_scan::@10->keyboard_event_pressed] + //SEG282 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL#0 [phi:keyboard_event_scan::@10->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_CTRL + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG283 [134] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#2 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + //SEG284 keyboard_event_scan::@28 + //SEG285 [135] (byte~) keyboard_event_scan::$22 ← (byte) keyboard_event_pressed::return#2 + // (byte~) keyboard_event_scan::$22 = (byte) keyboard_event_pressed::return#2 // register copy reg byte a + //SEG286 [136] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 + cmp #0 + //SEG287 [137] phi from keyboard_event_scan::@28 to keyboard_event_scan::@23 [phi:keyboard_event_scan::@28->keyboard_event_scan::@23] + //SEG288 keyboard_event_scan::@23 + //SEG289 [138] phi from keyboard_event_scan::@23 keyboard_event_scan::@28 to keyboard_event_scan::@11 [phi:keyboard_event_scan::@23/keyboard_event_scan::@28->keyboard_event_scan::@11] + //SEG290 keyboard_event_scan::@11 + //SEG291 [139] call keyboard_event_pressed + //SEG292 [98] phi from keyboard_event_scan::@11 to keyboard_event_pressed [phi:keyboard_event_scan::@11->keyboard_event_pressed] + //SEG293 [98] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE#0 [phi:keyboard_event_scan::@11->keyboard_event_pressed#0] -- vbuz1=vbuc1 + lda #KEY_COMMODORE + sta keyboard_event_pressed.keycode + jsr keyboard_event_pressed + //SEG294 [140] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + // (byte) keyboard_event_pressed::return#10 = (byte) keyboard_event_pressed::return#11 // register copy reg byte a + //SEG295 keyboard_event_scan::@29 + //SEG296 [141] (byte~) keyboard_event_scan::$26 ← (byte) keyboard_event_pressed::return#10 + // (byte~) keyboard_event_scan::$26 = (byte) keyboard_event_pressed::return#10 // register copy reg byte a + //SEG297 [142] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 + cmp #0 + //SEG298 [143] phi from keyboard_event_scan::@29 to keyboard_event_scan::@24 [phi:keyboard_event_scan::@29->keyboard_event_scan::@24] + //SEG299 keyboard_event_scan::@24 + //SEG300 keyboard_event_scan::@return + //SEG301 [144] return + rts + //SEG302 [145] phi from keyboard_event_scan::@25 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4] + b2: + //SEG303 [145] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#0] -- register_copy + //SEG304 [145] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#1] -- register_copy + //SEG305 [145] phi (byte) keyboard_event_scan::col#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:keyboard_event_scan::@25->keyboard_event_scan::@4#2] -- vbuz1=vbuc1 + lda #0 + sta col + //SEG306 [145] phi from keyboard_event_scan::@5 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4] + //SEG307 [145] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#0] -- register_copy + //SEG308 [145] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#15 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#1] -- register_copy + //SEG309 [145] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@5->keyboard_event_scan::@4#2] -- register_copy + //SEG310 keyboard_event_scan::@4 + b4: + //SEG311 [146] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 + lda row_scan + ldy row + eor keyboard_scan_values,y + //SEG312 [147] (byte~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1 + ldy col + and keyboard_matrix_col_bitmask,y + //SEG313 [148] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b5 + //SEG314 keyboard_event_scan::@15 + //SEG315 [149] if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@5 -- vbuxx_eq_vbuc1_then_la1 + cpx #8 + beq b5 + //SEG316 keyboard_event_scan::@16 + //SEG317 [150] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte[8]) keyboard_matrix_col_bitmask#0 + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuz2 + lda row_scan + and keyboard_matrix_col_bitmask,y + //SEG318 [151] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b7 + //SEG319 keyboard_event_scan::@17 + //SEG320 [152] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuxx=vbuz1 + lda keycode + sta keyboard_events,x + //SEG321 [153] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuxx=_inc_vbuxx + inx + //SEG322 [154] phi from keyboard_event_scan::@15 keyboard_event_scan::@17 keyboard_event_scan::@4 keyboard_event_scan::@7 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@15/keyboard_event_scan::@17/keyboard_event_scan::@4/keyboard_event_scan::@7->keyboard_event_scan::@5] + //SEG323 [154] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#10 [phi:keyboard_event_scan::@15/keyboard_event_scan::@17/keyboard_event_scan::@4/keyboard_event_scan::@7->keyboard_event_scan::@5#0] -- register_copy + //SEG324 keyboard_event_scan::@5 + b5: + //SEG325 [155] (byte) keyboard_event_scan::keycode#15 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + inc keycode + //SEG326 [156] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 + inc col + //SEG327 [157] if((byte) keyboard_event_scan::col#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@4 -- vbuz1_neq_vbuc1_then_la1 + lda col + cmp #8 + bne b4 + //SEG328 keyboard_event_scan::@19 + //SEG329 [158] *((const byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + lda row_scan + ldy row + sta keyboard_scan_values,y + jmp b3 + //SEG330 keyboard_event_scan::@7 + b7: + //SEG331 [159] (byte/word/dword~) keyboard_event_scan::$11 ← (byte) keyboard_event_scan::keycode#10 | (byte/signed byte/word/signed word/dword/signed dword) 64 -- vbuaa=vbuz1_bor_vbuc1 + lda #$40 + ora keycode + //SEG332 [160] *((const byte[8]) keyboard_events#0 + (byte) keyboard_events_size#10) ← (byte/word/dword~) keyboard_event_scan::$11 -- pbuc1_derefidx_vbuxx=vbuaa + sta keyboard_events,x + //SEG333 [161] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuxx=_inc_vbuxx + inx + jmp b5 +} +//SEG334 keyboard_matrix_read +keyboard_matrix_read: { + //SEG335 [162] *((const byte*) CIA1_PORT_A#0) ← *((const byte[8]) keyboard_matrix_row_bitmask#0 + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuyy + lda keyboard_matrix_row_bitmask,y + sta CIA1_PORT_A + //SEG336 [163] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B#0) -- vbuaa=_bnot__deref_pbuc1 + lda CIA1_PORT_B + eor #$ff + //SEG337 keyboard_matrix_read::@return + //SEG338 [164] return + rts +} +//SEG339 init init: { - .label _7 = 6 - .label li = 4 - .label line = 4 + .label _7 = $d + .label li = $b + .label line = $b .label l = 2 - //SEG52 [26] *((const byte[4*4]) current_piece#0) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - lda #GREEN - sta current_piece - //SEG53 [27] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - sta current_piece+1 - //SEG54 [28] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - sta current_piece+2 - //SEG55 [29] *((const byte[4*4]) current_piece#0+(byte/signed byte/word/signed word/dword/signed dword) 4) ← (const byte) GREEN#0 -- _deref_pbuc1=vbuc2 - sta current_piece+4 - //SEG56 [30] call fill - //SEG57 [49] phi from init to fill [phi:init->fill] - //SEG58 [49] phi (byte) fill::val#3 = (byte/word/signed word/dword/signed dword) 160 [phi:init->fill#0] -- vbuxx=vbuc1 + //SEG340 [166] call fill + //SEG341 [185] phi from init to fill [phi:init->fill] + //SEG342 [185] phi (byte) fill::val#3 = (byte/word/signed word/dword/signed dword) 160 [phi:init->fill#0] -- vbuxx=vbuc1 ldx #$a0 - //SEG59 [49] phi (byte*) fill::addr#0 = (const byte*) SCREEN#0 [phi:init->fill#1] -- pbuz1=pbuc1 + //SEG343 [185] phi (byte*) fill::addr#0 = (const byte*) SCREEN#0 [phi:init->fill#1] -- pbuz1=pbuc1 lda #SCREEN sta fill.addr+1 jsr fill - //SEG60 [31] phi from init to init::@7 [phi:init->init::@7] - //SEG61 init::@7 - //SEG62 [32] call fill - //SEG63 [49] phi from init::@7 to fill [phi:init::@7->fill] - //SEG64 [49] phi (byte) fill::val#3 = (const byte) BLACK#0 [phi:init::@7->fill#0] -- vbuxx=vbuc1 + //SEG344 [167] phi from init to init::@7 [phi:init->init::@7] + //SEG345 init::@7 + //SEG346 [168] call fill + //SEG347 [185] phi from init::@7 to fill [phi:init::@7->fill] + //SEG348 [185] phi (byte) fill::val#3 = (const byte) BLACK#0 [phi:init::@7->fill#0] -- vbuxx=vbuc1 ldx #BLACK - //SEG65 [49] phi (byte*) fill::addr#0 = (const byte*) COLS#0 [phi:init::@7->fill#1] -- pbuz1=pbuc1 + //SEG349 [185] phi (byte*) fill::addr#0 = (const byte*) COLS#0 [phi:init::@7->fill#1] -- pbuz1=pbuc1 lda #COLS sta fill.addr+1 jsr fill - //SEG66 [33] phi from init::@7 to init::@1 [phi:init::@7->init::@1] - //SEG67 [33] phi (byte*) init::li#2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 [phi:init::@7->init::@1#0] -- pbuz1=pbuc1 + //SEG350 [169] phi from init::@7 to init::@1 [phi:init::@7->init::@1] + //SEG351 [169] phi (byte*) init::li#2 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 40+(byte/signed byte/word/signed word/dword/signed dword) 15 [phi:init::@7->init::@1#0] -- pbuz1=pbuc1 lda #COLS+$28+$f sta li+1 - //SEG68 [33] phi (byte) init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@7->init::@1#1] -- vbuxx=vbuc1 + //SEG352 [169] phi (byte) init::i#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@7->init::@1#1] -- vbuxx=vbuc1 ldx #0 - //SEG69 [33] phi from init::@1 to init::@1 [phi:init::@1->init::@1] - //SEG70 [33] phi (byte*) init::li#2 = (byte*) init::li#1 [phi:init::@1->init::@1#0] -- register_copy - //SEG71 [33] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#1] -- register_copy - //SEG72 init::@1 + //SEG353 [169] phi from init::@1 to init::@1 [phi:init::@1->init::@1] + //SEG354 [169] phi (byte*) init::li#2 = (byte*) init::li#1 [phi:init::@1->init::@1#0] -- register_copy + //SEG355 [169] phi (byte) init::i#2 = (byte) init::i#1 [phi:init::@1->init::@1#1] -- register_copy + //SEG356 init::@1 b1: - //SEG73 [34] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_rol_1 + //SEG357 [170] (byte~) init::$4 ← (byte) init::i#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_rol_1 txa asl - //SEG74 [35] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 -- pptc1_derefidx_vbuaa=pbuz1 + //SEG358 [171] *((const byte*[20]) screen_lines#0 + (byte~) init::$4) ← (byte*) init::li#2 -- pptc1_derefidx_vbuaa=pbuz1 tay lda li sta screen_lines,y lda li+1 sta screen_lines+1,y - //SEG75 [36] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 + //SEG359 [172] (byte*) init::li#1 ← (byte*) init::li#2 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 lda li clc adc #$28 @@ -1839,33 +7713,33 @@ init: { bcc !+ inc li+1 !: - //SEG76 [37] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuxx=_inc_vbuxx + //SEG360 [173] (byte) init::i#1 ← ++ (byte) init::i#2 -- vbuxx=_inc_vbuxx inx - //SEG77 [38] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG361 [174] if((byte) init::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 20) goto init::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$14 bne b1 - //SEG78 [39] phi from init::@1 to init::@2 [phi:init::@1->init::@2] - //SEG79 [39] phi (byte) init::l#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@1->init::@2#0] -- vbuz1=vbuc1 + //SEG362 [175] phi from init::@1 to init::@2 [phi:init::@1->init::@2] + //SEG363 [175] phi (byte) init::l#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@1->init::@2#0] -- vbuz1=vbuc1 lda #0 sta l - //SEG80 [39] phi (byte*) init::line#4 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 [phi:init::@1->init::@2#1] -- pbuz1=pbuc1 + //SEG364 [175] phi (byte*) init::line#4 = (const byte*) COLS#0+(byte/signed byte/word/signed word/dword/signed dword) 14 [phi:init::@1->init::@2#1] -- pbuz1=pbuc1 lda #COLS+$e sta line+1 - //SEG81 [39] phi from init::@5 to init::@2 [phi:init::@5->init::@2] - //SEG82 [39] phi (byte) init::l#4 = (byte) init::l#1 [phi:init::@5->init::@2#0] -- register_copy - //SEG83 [39] phi (byte*) init::line#4 = (byte*) init::line#1 [phi:init::@5->init::@2#1] -- register_copy - //SEG84 init::@2 + //SEG365 [175] phi from init::@5 to init::@2 [phi:init::@5->init::@2] + //SEG366 [175] phi (byte) init::l#4 = (byte) init::l#1 [phi:init::@5->init::@2#0] -- register_copy + //SEG367 [175] phi (byte*) init::line#4 = (byte*) init::line#1 [phi:init::@5->init::@2#1] -- register_copy + //SEG368 init::@2 b2: - //SEG85 [40] phi from init::@2 to init::@3 [phi:init::@2->init::@3] - //SEG86 [40] phi (byte) init::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 + //SEG369 [176] phi from init::@2 to init::@3 [phi:init::@2->init::@3] + //SEG370 [176] phi (byte) init::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:init::@2->init::@3#0] -- vbuxx=vbuc1 ldx #0 - //SEG87 [40] phi from init::@3 to init::@3 [phi:init::@3->init::@3] - //SEG88 [40] phi (byte) init::c#2 = (byte) init::c#1 [phi:init::@3->init::@3#0] -- register_copy - //SEG89 init::@3 + //SEG371 [176] phi from init::@3 to init::@3 [phi:init::@3->init::@3] + //SEG372 [176] phi (byte) init::c#2 = (byte) init::c#1 [phi:init::@3->init::@3#0] -- register_copy + //SEG373 init::@3 b3: - //SEG90 [41] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 -- pbuz1=pbuz2_plus_vbuxx + //SEG374 [177] (byte*~) init::$7 ← (byte*) init::line#4 + (byte) init::c#2 -- pbuz1=pbuz2_plus_vbuxx txa clc adc line @@ -1873,17 +7747,17 @@ init: { lda #0 adc line+1 sta _7+1 - //SEG91 [42] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 -- _deref_pbuz1=vbuc1 + //SEG375 [178] *((byte*~) init::$7) ← (const byte) DARK_GREY#0 -- _deref_pbuz1=vbuc1 lda #DARK_GREY ldy #0 sta (_7),y - //SEG92 [43] (byte) init::c#1 ← ++ (byte) init::c#2 -- vbuxx=_inc_vbuxx + //SEG376 [179] (byte) init::c#1 ← ++ (byte) init::c#2 -- vbuxx=_inc_vbuxx inx - //SEG93 [44] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG377 [180] if((byte) init::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #$c bne b3 - //SEG94 init::@5 - //SEG95 [45] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 + //SEG378 init::@5 + //SEG379 [181] (byte*) init::line#1 ← (byte*) init::line#4 + (byte/signed byte/word/signed word/dword/signed dword) 40 -- pbuz1=pbuz1_plus_vbuc1 lda line clc adc #$28 @@ -1891,21 +7765,21 @@ init: { bcc !+ inc line+1 !: - //SEG96 [46] (byte) init::l#1 ← ++ (byte) init::l#4 -- vbuz1=_inc_vbuz1 + //SEG380 [182] (byte) init::l#1 ← ++ (byte) init::l#4 -- vbuz1=_inc_vbuz1 inc l - //SEG97 [47] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG381 [183] if((byte) init::l#1!=(byte/signed byte/word/signed word/dword/signed dword) 22) goto init::@2 -- vbuz1_neq_vbuc1_then_la1 lda l cmp #$16 bne b2 - //SEG98 init::@return - //SEG99 [48] return + //SEG382 init::@return + //SEG383 [184] return rts } -//SEG100 fill +//SEG384 fill fill: { - .label end = 6 - .label addr = 4 - //SEG101 [50] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 -- pbuz1=pbuz2_plus_vwuc1 + .label end = $d + .label addr = $b + //SEG385 [186] (byte*) fill::end#0 ← (byte*) fill::addr#0 + (word/signed word/dword/signed dword) 1000 -- pbuz1=pbuz2_plus_vwuc1 lda addr clc adc #<$3e8 @@ -1913,31 +7787,36 @@ fill: { lda addr+1 adc #>$3e8 sta end+1 - //SEG102 [51] phi from fill fill::@1 to fill::@1 [phi:fill/fill::@1->fill::@1] - //SEG103 [51] phi (byte*) fill::addr#2 = (byte*) fill::addr#0 [phi:fill/fill::@1->fill::@1#0] -- register_copy - //SEG104 fill::@1 + //SEG386 [187] phi from fill fill::@1 to fill::@1 [phi:fill/fill::@1->fill::@1] + //SEG387 [187] phi (byte*) fill::addr#2 = (byte*) fill::addr#0 [phi:fill/fill::@1->fill::@1#0] -- register_copy + //SEG388 fill::@1 b1: - //SEG105 [52] *((byte*) fill::addr#2) ← (byte) fill::val#3 -- _deref_pbuz1=vbuxx + //SEG389 [188] *((byte*) fill::addr#2) ← (byte) fill::val#3 -- _deref_pbuz1=vbuxx txa ldy #0 sta (addr),y - //SEG106 [53] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 -- pbuz1=_inc_pbuz1 + //SEG390 [189] (byte*) fill::addr#1 ← ++ (byte*) fill::addr#2 -- pbuz1=_inc_pbuz1 inc addr bne !+ inc addr+1 !: - //SEG107 [54] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -- pbuz1_neq_pbuz2_then_la1 + //SEG391 [190] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -- pbuz1_neq_pbuz2_then_la1 lda addr+1 cmp end+1 bne b1 lda addr cmp end bne b1 - //SEG108 fill::@return - //SEG109 [55] return + //SEG392 fill::@return + //SEG393 [191] return rts } + keyboard_matrix_row_bitmask: .byte $fe, $fd, $fb, $f7, $ef, $df, $bf, $7f + keyboard_matrix_col_bitmask: .byte 1, 2, 4, 8, $10, $20, $40, $80 + keyboard_events: .fill 8, 0 + keyboard_scan_values: .fill 8, 0 screen_lines: .fill 2*$14, 0 + .align $40 + piece_t: .byte 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 playfield: .fill $14*$a, 0 - current_piece: .fill 4*4, 0 diff --git a/src/test/ref/examples/tetris/tetris.sym b/src/test/ref/examples/tetris/tetris.sym index d8f1a24d4..f2290c3a7 100644 --- a/src/test/ref/examples/tetris/tetris.sym +++ b/src/test/ref/examples/tetris/tetris.sym @@ -1,36 +1,94 @@ -(label) @8 +(label) @16 (label) @begin (label) @end (byte) BLACK (const byte) BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0 (byte*) BORDERCOL (const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280 +(byte*) CIA1_PORT_A +(const byte*) CIA1_PORT_A#0 CIA1_PORT_A = ((byte*))(word/dword/signed dword) 56320 +(byte*) CIA1_PORT_B +(const byte*) CIA1_PORT_B#0 CIA1_PORT_B = ((byte*))(word/dword/signed dword) 56321 (byte*) COLS (const byte*) COLS#0 COLS = ((byte*))(word/dword/signed dword) 55296 (byte) DARK_GREY (const byte) DARK_GREY#0 DARK_GREY = (byte/signed byte/word/signed word/dword/signed dword) 11 -(byte) GREEN -(const byte) GREEN#0 GREEN = (byte/signed byte/word/signed word/dword/signed dword) 5 +(byte) KEY_COMMA +(const byte) KEY_COMMA#0 KEY_COMMA = (byte/signed byte/word/signed word/dword/signed dword) 47 +(byte) KEY_COMMODORE +(const byte) KEY_COMMODORE#0 KEY_COMMODORE = (byte/signed byte/word/signed word/dword/signed dword) 61 +(byte) KEY_CTRL +(const byte) KEY_CTRL#0 KEY_CTRL = (byte/signed byte/word/signed word/dword/signed dword) 58 +(byte) KEY_DOT +(const byte) KEY_DOT#0 KEY_DOT = (byte/signed byte/word/signed word/dword/signed dword) 44 +(byte) KEY_LSHIFT +(const byte) KEY_LSHIFT#0 KEY_LSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 15 +(byte) KEY_MODIFIER_COMMODORE +(byte) KEY_MODIFIER_CTRL +(byte) KEY_MODIFIER_LSHIFT +(byte) KEY_MODIFIER_RSHIFT +(byte) KEY_RSHIFT +(const byte) KEY_RSHIFT#0 KEY_RSHIFT = (byte/signed byte/word/signed word/dword/signed dword) 52 +(byte) KEY_SPACE +(const byte) KEY_SPACE#0 KEY_SPACE = (byte/signed byte/word/signed word/dword/signed dword) 60 +(byte) KEY_X +(const byte) KEY_X#0 KEY_X = (byte/signed byte/word/signed word/dword/signed dword) 23 +(byte) KEY_Z +(const byte) KEY_Z#0 KEY_Z = (byte/signed byte/word/signed word/dword/signed dword) 12 +(byte*) RASTER +(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266 (byte*) SCREEN (const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024 -(byte[4*4]) current_piece -(const byte[4*4]) current_piece#0 current_piece = { fill( 4*4, 0) } +(void()) current_movedown() +(label) current_movedown::@return +(byte) current_movedown_counter +(byte) current_movedown_counter#1 current_movedown_counter zp ZP_BYTE:2 26.933333333333334 +(byte) current_movedown_counter#14 current_movedown_counter zp ZP_BYTE:2 23.666666666666664 +(byte) current_movedown_counter#16 current_movedown_counter zp ZP_BYTE:2 7.344827586206897 +(byte) current_movedown_rate +(const byte) current_movedown_rate#0 current_movedown_rate = (byte/signed byte/word/signed word/dword/signed dword) 50 +(byte) current_movedown_rate_fast +(const byte) current_movedown_rate_fast#0 current_movedown_rate_fast = (byte/signed byte/word/signed word/dword/signed dword) 5 +(byte*) current_piece +(byte) current_piece_orientation +(byte) current_piece_orientation#10 current_piece_orientation zp ZP_BYTE:6 202.0 +(byte) current_piece_orientation#11 current_piece_orientation zp ZP_BYTE:6 10.921052631578949 +(byte) current_piece_orientation#13 reg byte y 13.0 +(byte) current_piece_orientation#2 current_piece_orientation zp ZP_BYTE:6 101.0 +(byte) current_piece_orientation#21 current_piece_orientation zp ZP_BYTE:6 47.33333333333333 +(byte) current_piece_orientation#3 current_piece_orientation zp ZP_BYTE:6 101.0 +(byte~) current_piece_orientation#66 reg byte y 7.333333333333333 +(byte) current_xpos +(byte) current_xpos#1 current_xpos zp ZP_BYTE:5 101.0 +(byte) current_xpos#11 current_xpos zp ZP_BYTE:5 202.0 +(byte) current_xpos#12 current_xpos zp ZP_BYTE:5 13.833333333333334 +(byte) current_xpos#15 current_xpos zp ZP_BYTE:5 47.33333333333333 +(byte) current_xpos#2 current_xpos zp ZP_BYTE:5 101.0 +(byte) current_xpos#26 current_xpos#26 zp ZP_BYTE:7 59.529411764705884 +(byte) current_xpos#34 current_xpos zp ZP_BYTE:5 40.4 +(byte~) current_xpos#64 current_xpos#64 zp ZP_BYTE:7 22.0 +(byte) current_ypos +(byte) current_ypos#10 current_ypos zp ZP_BYTE:3 34.33333333333333 +(byte) current_ypos#13 current_ypos zp ZP_BYTE:3 8.6 +(byte) current_ypos#14 current_ypos#14 zp ZP_BYTE:4 6.588235294117648 +(byte) current_ypos#17 current_ypos zp ZP_BYTE:3 11.206896551724137 +(byte~) current_ypos#62 current_ypos#62 zp ZP_BYTE:4 11.0 (void()) fill((byte*) fill::start , (word) fill::size , (byte) fill::val) (label) fill::@1 (label) fill::@return (byte*) fill::addr -(byte*) fill::addr#0 addr zp ZP_WORD:4 2.0 -(byte*) fill::addr#1 addr zp ZP_WORD:4 16.5 -(byte*) fill::addr#2 addr zp ZP_WORD:4 17.5 +(byte*) fill::addr#0 addr zp ZP_WORD:11 2.0 +(byte*) fill::addr#1 addr zp ZP_WORD:11 16.5 +(byte*) fill::addr#2 addr zp ZP_WORD:11 17.5 (byte*) fill::end -(byte*) fill::end#0 end zp ZP_WORD:6 2.6 +(byte*) fill::end#0 end zp ZP_WORD:13 2.6 (word) fill::size (byte*) fill::start (byte) fill::val (byte) fill::val#3 reg byte x 1.8333333333333333 (void()) init() (byte~) init::$4 reg byte a 22.0 -(byte*~) init::$7 $7 zp ZP_WORD:6 202.0 +(byte*~) init::$7 $7 zp ZP_WORD:13 202.0 (label) init::@1 (label) init::@2 (label) init::@3 @@ -47,48 +105,260 @@ (byte) init::l#1 l zp ZP_BYTE:2 16.5 (byte) init::l#4 l zp ZP_BYTE:2 3.142857142857143 (byte*) init::li -(byte*) init::li#1 li zp ZP_WORD:4 7.333333333333333 -(byte*) init::li#2 li zp ZP_WORD:4 11.0 +(byte*) init::li#1 li zp ZP_WORD:11 7.333333333333333 +(byte*) init::li#2 li zp ZP_WORD:11 11.0 (byte*) init::line -(byte*) init::line#1 line zp ZP_WORD:4 7.333333333333333 -(byte*) init::line#4 line zp ZP_WORD:4 20.499999999999996 +(byte*) init::line#1 line zp ZP_WORD:11 7.333333333333333 +(byte*) init::line#4 line zp ZP_WORD:11 20.499999999999996 +(byte()) keyboard_event_get() +(label) keyboard_event_get::@3 +(label) keyboard_event_get::@return +(byte) keyboard_event_get::return +(byte) keyboard_event_get::return#1 reg byte a 4.0 +(byte) keyboard_event_get::return#2 reg byte a 34.33333333333333 +(byte) keyboard_event_get::return#3 reg byte a 202.0 +(byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) +(byte~) keyboard_event_pressed::$0 reg byte a 4.0 +(byte~) keyboard_event_pressed::$1 reg byte a 4.0 +(label) keyboard_event_pressed::@return +(byte) keyboard_event_pressed::keycode +(byte) keyboard_event_pressed::keycode#5 keycode zp ZP_BYTE:7 1.3333333333333333 +(byte) keyboard_event_pressed::return +(byte) keyboard_event_pressed::return#0 reg byte a 4.0 +(byte) keyboard_event_pressed::return#1 reg byte a 4.0 +(byte) keyboard_event_pressed::return#10 reg byte a 4.0 +(byte) keyboard_event_pressed::return#11 reg byte a 15.857142857142861 +(byte) keyboard_event_pressed::return#12 reg byte a 202.0 +(byte) keyboard_event_pressed::return#2 reg byte a 4.0 +(byte) keyboard_event_pressed::row_bits +(byte) keyboard_event_pressed::row_bits#0 row_bits zp ZP_BYTE:9 2.0 +(void()) keyboard_event_scan() +(byte/word/dword~) keyboard_event_scan::$11 reg byte a 20002.0 +(byte~) keyboard_event_scan::$14 reg byte a 4.0 +(byte~) keyboard_event_scan::$18 reg byte a 4.0 +(byte~) keyboard_event_scan::$22 reg byte a 4.0 +(byte~) keyboard_event_scan::$26 reg byte a 4.0 +(byte~) keyboard_event_scan::$3 reg byte a 20002.0 +(byte~) keyboard_event_scan::$4 reg byte a 20002.0 +(label) keyboard_event_scan::@1 +(label) keyboard_event_scan::@10 +(label) keyboard_event_scan::@11 +(label) keyboard_event_scan::@13 +(label) keyboard_event_scan::@15 +(label) keyboard_event_scan::@16 +(label) keyboard_event_scan::@17 +(label) keyboard_event_scan::@19 +(label) keyboard_event_scan::@20 +(label) keyboard_event_scan::@21 +(label) keyboard_event_scan::@22 +(label) keyboard_event_scan::@23 +(label) keyboard_event_scan::@24 +(label) keyboard_event_scan::@25 +(label) keyboard_event_scan::@26 +(label) keyboard_event_scan::@27 +(label) keyboard_event_scan::@28 +(label) keyboard_event_scan::@29 +(label) keyboard_event_scan::@3 +(label) keyboard_event_scan::@4 +(label) keyboard_event_scan::@5 +(label) keyboard_event_scan::@7 +(label) keyboard_event_scan::@9 +(label) keyboard_event_scan::@return +(byte) keyboard_event_scan::col +(byte) keyboard_event_scan::col#1 col zp ZP_BYTE:7 15001.5 +(byte) keyboard_event_scan::col#2 col zp ZP_BYTE:7 2857.4285714285716 +(byte) keyboard_event_scan::event_type +(byte) keyboard_event_scan::event_type#0 reg byte a 20002.0 +(byte) keyboard_event_scan::keycode +(byte) keyboard_event_scan::keycode#1 keycode zp ZP_BYTE:8 2002.0 +(byte) keyboard_event_scan::keycode#10 keycode zp ZP_BYTE:8 3154.230769230769 +(byte) keyboard_event_scan::keycode#11 keycode zp ZP_BYTE:8 500.5 +(byte) keyboard_event_scan::keycode#14 keycode zp ZP_BYTE:8 1001.0 +(byte) keyboard_event_scan::keycode#15 keycode zp ZP_BYTE:8 5250.75 +(byte) keyboard_event_scan::row +(byte) keyboard_event_scan::row#1 row zp ZP_BYTE:4 1501.5 +(byte) keyboard_event_scan::row#2 row zp ZP_BYTE:4 600.24 +(byte) keyboard_event_scan::row_scan +(byte) keyboard_event_scan::row_scan#0 row_scan zp ZP_BYTE:9 1278.0555555555554 +(byte[8]) keyboard_events +(const byte[8]) keyboard_events#0 keyboard_events = { fill( 8, 0) } +(byte) keyboard_events_size +(byte) keyboard_events_size#1 reg byte x 20002.0 +(byte) keyboard_events_size#10 reg byte x 8100.9000000000015 +(byte) keyboard_events_size#13 reg byte x 97.06451612903226 +(byte) keyboard_events_size#16 reg byte x 2.2745098039215685 +(byte) keyboard_events_size#19 reg byte x 22.799999999999997 +(byte) keyboard_events_size#2 reg byte x 20002.0 +(byte) keyboard_events_size#29 reg byte x 429.2857142857143 +(byte) keyboard_events_size#30 reg byte x 10201.2 +(byte) keyboard_events_size#4 reg byte x 3.0 +(byte[8]) keyboard_matrix_col_bitmask +(const byte[8]) keyboard_matrix_col_bitmask#0 keyboard_matrix_col_bitmask = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 16, (byte/signed byte/word/signed word/dword/signed dword) 32, (byte/signed byte/word/signed word/dword/signed dword) 64, (byte/word/signed word/dword/signed dword) 128 } +(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) +(label) keyboard_matrix_read::@return +(byte) keyboard_matrix_read::return +(byte) keyboard_matrix_read::return#0 reg byte a 334.33333333333337 +(byte) keyboard_matrix_read::return#2 reg byte a 2002.0 +(byte) keyboard_matrix_read::row_pressed_bits +(byte) keyboard_matrix_read::rowid +(byte) keyboard_matrix_read::rowid#0 reg byte y 1003.0 +(byte[8]) keyboard_matrix_row_bitmask +(const byte[8]) keyboard_matrix_row_bitmask#0 keyboard_matrix_row_bitmask = { (byte/word/signed word/dword/signed dword) 254, (byte/word/signed word/dword/signed dword) 253, (byte/word/signed word/dword/signed dword) 251, (byte/word/signed word/dword/signed dword) 247, (byte/word/signed word/dword/signed dword) 239, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 191, (byte/signed byte/word/signed word/dword/signed dword) 127 } +(byte) keyboard_modifiers +(byte[8]) keyboard_scan_values +(const byte[8]) keyboard_scan_values#0 keyboard_scan_values = { fill( 8, 0) } (void()) main() -(label) main::@2 +(byte~) main::$19 reg byte a 202.0 +(byte/signed word/word/dword/signed dword~) main::$28 reg byte a 202.0 +(byte/signed word/word/dword/signed dword~) main::$32 reg byte a 202.0 +(byte~) main::$9 reg byte a 202.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@29 +(label) main::@30 +(label) main::@31 +(label) main::@32 +(label) main::@33 +(label) main::@34 +(label) main::@35 +(label) main::@36 +(label) main::@37 +(label) main::@38 +(label) main::@39 +(label) main::@4 +(label) main::@41 +(label) main::@42 +(label) main::@44 +(label) main::@45 +(label) main::@46 +(label) main::@48 +(label) main::@49 (label) main::@7 -(label) main::@8 +(label) main::@9 +(byte) main::key_event +(byte) main::key_event#0 key_event zp ZP_BYTE:8 20.794117647058826 +(byte) main::movedown +(byte) main::movedown#10 movedown zp ZP_BYTE:4 50.5 +(byte) main::movedown#2 movedown zp ZP_BYTE:4 202.0 +(byte) main::movedown#3 movedown zp ZP_BYTE:4 202.0 +(byte) main::movedown#6 movedown zp ZP_BYTE:4 303.0 +(byte) main::movedown#7 movedown zp ZP_BYTE:4 252.5 +(byte) main::render +(byte) main::render#10 reg byte y 101.0 +(byte) main::render#11 reg byte y 101.0 +(byte) main::render#13 reg byte y 60.599999999999994 +(byte) main::render#16 reg byte y 134.66666666666666 +(byte) main::render#2 reg byte y 202.0 +(byte) main::render#3 reg byte y 202.0 +(byte) main::render#4 reg byte y 202.0 +(byte) main::render#5 reg byte y 202.0 +(byte) main::render#7 reg byte y 404.0 +(byte[4*4*4]) piece_t +(const byte[4*4*4]) piece_t#0 piece_t = { (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 } (byte[20*10]) playfield (const byte[20*10]) playfield#0 playfield = { fill( 20*10, 0) } -(void()) render_current_piece() -(label) render_current_piece::@return +(void()) render_current() +(byte~) render_current::$1 reg byte a 202.0 +(byte~) render_current::$2 reg byte a 202.0 +(label) render_current::@1 +(label) render_current::@2 +(label) render_current::@3 +(label) render_current::@5 +(label) render_current::@6 +(label) render_current::@7 +(label) render_current::@return +(byte) render_current::c +(byte) render_current::c#1 c zp ZP_BYTE:10 1501.5 +(byte) render_current::c#2 c zp ZP_BYTE:10 429.0 +(byte) render_current::current_cell +(byte) render_current::current_cell#0 current_cell zp ZP_BYTE:15 600.5999999999999 +(byte*) render_current::current_piece_gfx +(byte*) render_current::current_piece_gfx#0 current_piece_gfx zp ZP_WORD:11 62.6875 +(byte) render_current::i +(byte) render_current::i#1 i zp ZP_BYTE:9 233.66666666666669 +(byte) render_current::i#2 i zp ZP_BYTE:9 1552.0 +(byte) render_current::i#3 i zp ZP_BYTE:9 50.5 +(byte) render_current::l +(byte) render_current::l#1 l zp ZP_BYTE:8 151.5 +(byte) render_current::l#2 l zp ZP_BYTE:8 23.307692307692307 +(byte*) render_current::screen_line +(byte*) render_current::screen_line#0 screen_line zp ZP_WORD:13 110.19999999999999 +(byte) render_current::xpos +(byte) render_current::xpos#0 reg byte a 1501.5 (void()) render_playfield() -(byte~) render_playfield::$0 reg byte a 22.0 -(byte*~) render_playfield::$1 $1 zp ZP_WORD:6 202.0 +(byte~) render_playfield::$0 reg byte a 202.0 +(byte*~) render_playfield::$1 $1 zp ZP_WORD:13 2002.0 (label) render_playfield::@1 (label) render_playfield::@2 (label) render_playfield::@3 (label) render_playfield::@return (byte) render_playfield::c -(byte) render_playfield::c#1 reg byte x 151.5 -(byte) render_playfield::c#2 reg byte x 75.75 +(byte) render_playfield::c#1 c zp ZP_BYTE:7 1501.5 +(byte) render_playfield::c#2 c zp ZP_BYTE:7 750.75 (byte) render_playfield::i -(byte) render_playfield::i#1 i zp ZP_BYTE:3 42.599999999999994 -(byte) render_playfield::i#2 i zp ZP_BYTE:3 104.66666666666666 -(byte) render_playfield::i#3 i zp ZP_BYTE:3 7.333333333333333 +(byte) render_playfield::i#1 i zp ZP_BYTE:8 420.59999999999997 +(byte) render_playfield::i#2 i zp ZP_BYTE:8 1034.6666666666667 +(byte) render_playfield::i#3 i zp ZP_BYTE:8 67.33333333333333 (byte) render_playfield::l -(byte) render_playfield::l#1 l zp ZP_BYTE:2 16.5 -(byte) render_playfield::l#2 l zp ZP_BYTE:2 3.666666666666667 +(byte) render_playfield::l#1 l zp ZP_BYTE:4 151.5 +(byte) render_playfield::l#2 l zp ZP_BYTE:4 33.666666666666664 (byte*) render_playfield::line -(byte*) render_playfield::line#0 line zp ZP_WORD:4 16.0 +(byte*) render_playfield::line#0 line zp ZP_WORD:11 157.42857142857142 (byte*[20]) screen_lines (const byte*[20]) screen_lines#0 screen_lines = { fill( 20, 0) } -zp ZP_BYTE:2 [ render_playfield::l#2 render_playfield::l#1 init::l#4 init::l#1 ] -reg byte x [ render_playfield::c#2 render_playfield::c#1 ] -zp ZP_BYTE:3 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +zp ZP_BYTE:2 [ current_movedown_counter#14 current_movedown_counter#16 current_movedown_counter#1 init::l#4 init::l#1 ] +zp ZP_BYTE:3 [ current_ypos#13 current_ypos#17 current_ypos#10 ] +zp ZP_BYTE:4 [ main::movedown#6 main::movedown#7 main::movedown#10 main::movedown#2 main::movedown#3 current_ypos#14 current_ypos#62 render_playfield::l#2 render_playfield::l#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +zp ZP_BYTE:5 [ current_xpos#34 current_xpos#11 current_xpos#12 current_xpos#15 current_xpos#1 current_xpos#2 ] +zp ZP_BYTE:6 [ current_piece_orientation#10 current_piece_orientation#11 current_piece_orientation#21 current_piece_orientation#2 current_piece_orientation#3 ] +reg byte y [ main::render#7 main::render#11 main::render#10 main::render#16 main::render#13 main::render#2 main::render#3 main::render#4 main::render#5 ] +reg byte y [ current_piece_orientation#13 current_piece_orientation#66 ] +zp ZP_BYTE:7 [ current_xpos#26 current_xpos#64 render_playfield::c#2 render_playfield::c#1 keyboard_event_pressed::keycode#5 keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +zp ZP_BYTE:8 [ render_current::l#2 render_current::l#1 render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 keyboard_event_scan::keycode#15 main::key_event#0 ] +zp ZP_BYTE:9 [ render_current::i#2 render_current::i#3 render_current::i#1 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 ] +zp ZP_BYTE:10 [ render_current::c#2 render_current::c#1 ] +reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] +reg byte x [ keyboard_events_size#10 keyboard_events_size#29 keyboard_events_size#19 keyboard_events_size#16 keyboard_events_size#13 keyboard_events_size#4 keyboard_events_size#30 keyboard_events_size#2 keyboard_events_size#1 ] reg byte x [ init::i#2 init::i#1 ] -zp ZP_WORD:4 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_playfield::line#0 ] +zp ZP_WORD:11 [ init::li#2 init::li#1 init::line#4 init::line#1 fill::addr#2 fill::addr#0 fill::addr#1 render_current::current_piece_gfx#0 render_playfield::line#0 ] reg byte x [ init::c#2 init::c#1 ] reg byte x [ fill::val#3 ] +reg byte a [ keyboard_event_get::return#3 ] +reg byte a [ keyboard_event_pressed::return#12 ] +reg byte a [ main::$9 ] +reg byte a [ main::$19 ] +reg byte a [ main::$28 ] +reg byte a [ main::$32 ] +reg byte a [ render_current::$1 ] +reg byte a [ render_current::$2 ] +zp ZP_WORD:13 [ render_current::screen_line#0 render_playfield::$1 init::$7 fill::end#0 ] +zp ZP_BYTE:15 [ render_current::current_cell#0 ] +reg byte a [ render_current::xpos#0 ] reg byte a [ render_playfield::$0 ] -zp ZP_WORD:6 [ render_playfield::$1 init::$7 fill::end#0 ] +reg byte a [ keyboard_event_pressed::$0 ] +reg byte a [ keyboard_event_pressed::$1 ] +reg byte a [ keyboard_event_pressed::return#11 ] +reg byte y [ keyboard_matrix_read::rowid#0 ] +reg byte a [ keyboard_matrix_read::return#2 ] +reg byte a [ keyboard_event_pressed::return#0 ] +reg byte a [ keyboard_event_scan::$14 ] +reg byte a [ keyboard_event_pressed::return#1 ] +reg byte a [ keyboard_event_scan::$18 ] +reg byte a [ keyboard_event_pressed::return#2 ] +reg byte a [ keyboard_event_scan::$22 ] +reg byte a [ keyboard_event_pressed::return#10 ] +reg byte a [ keyboard_event_scan::$26 ] +reg byte a [ keyboard_event_scan::$3 ] +reg byte a [ keyboard_event_scan::$4 ] +reg byte a [ keyboard_event_scan::event_type#0 ] +reg byte a [ keyboard_event_scan::$11 ] +reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ init::$4 ] diff --git a/src/test/ref/inline-function-if.log b/src/test/ref/inline-function-if.log index d0a1bd1d4..7ae2e0f6d 100644 --- a/src/test/ref/inline-function-if.log +++ b/src/test/ref/inline-function-if.log @@ -188,8 +188,6 @@ Removing PHI-reference to removed block (main::toUpper1) in block main::toUpper1 if() condition always true - replacing block destination if((const bool) main::toUpper1_bo#0) goto main::toUpper1_@2 if() condition always false - eliminating if((const bool) main::toUpper2_bo#0) goto main::toUpper2_@2 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const bool) main::toUpper1_bo#0 -Eliminating unused constant (const bool) main::toUpper2_bo#0 Successful SSA optimization PassNEliminateUnusedVars Removing PHI-reference to removed block (main::toUpper2_@2) in block main::toUpper2_@1 Removing unused block main::toUpper2_@2 @@ -201,7 +199,6 @@ Successful SSA optimization Pass2CullEmptyBlocks Redundant Phi (byte) main::toUpper1_return#0 (const byte) main::toUpper1_res#1 Redundant Phi (byte) main::toUpper2_return#0 (const byte) main::toUpper2_ch#0 Successful SSA optimization Pass2RedundantPhiElimination -Eliminating unused constant (const byte) main::toUpper2_res#1 Successful SSA optimization PassNEliminateUnusedVars Culled Empty Block (label) main::toUpper1_@1 Culled Empty Block (label) main::toUpper2_@1 diff --git a/src/test/ref/inline-function-level2.log b/src/test/ref/inline-function-level2.log index e9c85b435..d1e9f59ec 100644 --- a/src/test/ref/inline-function-level2.log +++ b/src/test/ref/inline-function-level2.log @@ -337,7 +337,6 @@ Fixing inline constructor with main::$5 ← main::line2_xpos#0 w= 0 Successful SSA optimization Pass2FixInlineConstructors Inferred type updated to word/signed word/dword/signed dword in (word~) main::$4 ← (const byte) main::line1_xpos#0 w= (byte/signed byte/word/signed word/dword/signed dword) 0 Inferred type updated to word/signed word/dword/signed dword in (word~) main::$5 ← (const byte) main::line2_xpos#0 w= (byte/signed byte/word/signed word/dword/signed dword) 0 -Eliminating unused constant (const byte*) cur_line#15 Successful SSA optimization PassNEliminateUnusedVars Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@3 diff --git a/src/test/ref/line-anim.log b/src/test/ref/line-anim.log index c66c48e09..42b062271 100644 --- a/src/test/ref/line-anim.log +++ b/src/test/ref/line-anim.log @@ -1493,10 +1493,6 @@ Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_yhi#0 + 0) w= *(bitmap_plot_ylo#0 + 0) Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#0) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#0) Successful SSA optimization Pass2FixInlineConstructors -Eliminating unused constant (const word) divr16s::dividendu#0 -Eliminating unused constant (const word) divr16s::remu#0 -Eliminating unused constant (const word) divr16s::divisoru#0 -Eliminating unused constant (const bool) divr16s::$0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (word) divr16s::remu#1 ← ((word)) (signed word~) divr16s::$7 Eliminating Noop Cast (word) divr16s::remu#2 ← ((word)) (signed word) divr16s::rem#0 diff --git a/src/test/ref/linegen.log b/src/test/ref/linegen.log index f68002f74..59f09518b 100644 --- a/src/test/ref/linegen.log +++ b/src/test/ref/linegen.log @@ -1275,7 +1275,6 @@ Fixing inline constructor with lin16u_gen::$9 ← lin16u_gen::stepi#0 dw= lin16u Fixing inline constructor with lin16u_gen::$10 ← lin16u_gen::min#3 dw= 0 Successful SSA optimization Pass2FixInlineConstructors Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars Resolved ranged next value divr16u::i#1 ← ++ divr16u::i#2 to ++ Resolved ranged comparison value if(divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 to (byte/signed byte/word/signed word/dword/signed dword) 16 diff --git a/src/test/ref/literals.log b/src/test/ref/literals.log index 4d4f92e42..22aa2b7ab 100644 --- a/src/test/ref/literals.log +++ b/src/test/ref/literals.log @@ -110,9 +110,6 @@ Consolidated array index constant in assignment *(SCREEN#0+9 + main::$1) Successful SSA optimization Pass2ConstantAdditionElimination Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 -Eliminating unused constant (const string) $2 -Eliminating unused constant (const string) $3 -Eliminating unused constant (const string) $0 Successful SSA optimization PassNEliminateUnusedVars Resolved ranged next value main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value if(main::i#1!=rangelast(0,3)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 4 diff --git a/src/test/ref/sinusgen16.log b/src/test/ref/sinusgen16.log index 6f8bd4eab..4f59a9de5 100644 --- a/src/test/ref/sinusgen16.log +++ b/src/test/ref/sinusgen16.log @@ -1480,7 +1480,6 @@ Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Successful SSA optimization Pass2ConstantIdentification Fixing inline constructor with div32u16u::$4 ← div32u16u::quotient_hi#0 dw= div32u16u::quotient_lo#0 Successful SSA optimization Pass2FixInlineConstructors -Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (signed word) sin16s::sinx#0 ← ((signed word)) (word) sin16s::usinx#1 Eliminating Noop Cast (signed word~) sin16s::$20 ← ((signed word)) (word) sin16s::usinx#1 diff --git a/src/test/ref/sinusgen16b.log b/src/test/ref/sinusgen16b.log index 2aa6016a7..5275f384e 100644 --- a/src/test/ref/sinusgen16b.log +++ b/src/test/ref/sinusgen16b.log @@ -1936,7 +1936,6 @@ Successful SSA optimization Pass2ConstantIdentification Fixing inline constructor with div32u16u::$4 ← div32u16u::quotient_hi#0 dw= div32u16u::quotient_lo#0 Successful SSA optimization Pass2FixInlineConstructors Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (signed word) sin16s::sinx#0 ← ((signed word)) (word) sin16s::usinx#1 Eliminating Noop Cast (signed word~) sin16s::$20 ← ((signed word)) (word) sin16s::usinx#1 diff --git a/src/test/ref/sinusgen8b.log b/src/test/ref/sinusgen8b.log index df1ce2ef8..eb3e448f2 100644 --- a/src/test/ref/sinusgen8b.log +++ b/src/test/ref/sinusgen8b.log @@ -2113,7 +2113,6 @@ Constant (const word) divr16u::divisor#2 = div32u16u::divisor#0 Successful SSA optimization Pass2ConstantIdentification Fixing inline constructor with div32u16u::$4 ← div32u16u::quotient_hi#0 dw= div32u16u::quotient_lo#0 Successful SSA optimization Pass2FixInlineConstructors -Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (signed word) sin16s::sinx#0 ← ((signed word)) (word) sin16s::usinx#1 Eliminating Noop Cast (signed word~) sin16s::$20 ← ((signed word)) (word) sin16s::usinx#1 diff --git a/src/test/ref/test-division.log b/src/test/ref/test-division.log index 272103f67..a866630cc 100644 --- a/src/test/ref/test-division.log +++ b/src/test/ref/test-division.log @@ -3003,18 +3003,8 @@ Constant (const word) divr16s::remu#1 = ((word))divr16s::$7 Successful SSA optimization Pass2ConstantIdentification if() condition always false - eliminating if((const bool) divr16s::$1) goto divr16s::@1 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) div8s::dividendu#0 -Eliminating unused constant (const byte) div8s::divisoru#0 -Eliminating unused constant (const word) divr16s::dividendu#0 -Eliminating unused constant (const word) divr16s::remu#0 -Eliminating unused constant (const word) divr16s::divisoru#0 -Eliminating unused constant (const bool) divr16s::$1 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const word) rem16u#0 -Eliminating unused constant (const signed byte) rem8s#0 -Eliminating unused constant (const signed word) rem16s#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) rem8u#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (word) print_word::w#0 ← ((word)) (signed word) print_sword::w#6 Eliminating Noop Cast (byte) print_byte::b#0 ← ((byte)) (signed byte) print_sbyte::b#7 diff --git a/src/test/ref/unroll-screenfill-for-double.log b/src/test/ref/unroll-screenfill-for-double.log index ddfec0e8e..8edea07e8 100644 --- a/src/test/ref/unroll-screenfill-for-double.log +++ b/src/test/ref/unroll-screenfill-for-double.log @@ -217,7 +217,6 @@ Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (main::@2_10) in block main::@2_11 if() condition always false - eliminating [17] if((const byte) main::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_11 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) main::line#22 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) main::line#23 from unused block main::@2_11 Eliminating variable (byte/signed word/word/dword/signed dword~) main::$24 from unused block main::@2_11 @@ -476,7 +475,6 @@ Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@3_2) in block main::@1_1 if() condition always false - eliminating [124] if((const byte) main::x#24!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) main::x#24 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) main::x#25 from unused block main::@1_1 Eliminating variable (byte) main::x#26 from unused block main::@3_1 diff --git a/src/test/ref/unroll-screenfill-for.log b/src/test/ref/unroll-screenfill-for.log index 4824c5948..2c834826e 100644 --- a/src/test/ref/unroll-screenfill-for.log +++ b/src/test/ref/unroll-screenfill-for.log @@ -371,7 +371,6 @@ Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (main::@2_24) in block main::@2_25 if() condition always false - eliminating [31] if((const byte) main::line#50!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_25 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant (const byte) main::line#50 Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) main::line#51 from unused block main::@2_25 Eliminating variable (byte/signed word/word/dword/signed dword~) main::$52 from unused block main::@2_25 diff --git a/src/test/ref/unroll-screenfill-while.log b/src/test/ref/unroll-screenfill-while.log index 49121a729..920c76a1c 100644 --- a/src/test/ref/unroll-screenfill-while.log +++ b/src/test/ref/unroll-screenfill-while.log @@ -450,12 +450,8 @@ Removing unused block main::@3_26 Successful SSA optimization Pass2EliminateUnusedBlocks Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks -Eliminating unused constant (const byte) main::line#53 -Eliminating unused constant (const byte*) main::$53 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const word/signed word/dword/signed dword) main::$52 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) main::line#51 Successful SSA optimization PassNEliminateUnusedVars Inlining constant with var siblings (const byte) main::x#0 Inlining constant with different constant siblings (const byte) main::line#0 diff --git a/src/test/ref/unused-vars.log b/src/test/ref/unused-vars.log index ea572e504..d6ffc5cf8 100644 --- a/src/test/ref/unused-vars.log +++ b/src/test/ref/unused-vars.log @@ -142,9 +142,7 @@ Constant (const byte) b#11 = ++b#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) b#2 = ++b#11 Successful SSA optimization Pass2ConstantIdentification -Eliminating unused constant (const byte) s::return#0 Successful SSA optimization PassNEliminateUnusedVars -Eliminating unused constant (const byte) s::return#1 Successful SSA optimization PassNEliminateUnusedVars Resolved ranged next value main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value if(main::i#1!=rangelast(0,100)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 101 diff --git a/src/test/ref/unusedblockproblem.log b/src/test/ref/unusedblockproblem.log index 0e1aa6fcf..45f65b2c1 100644 --- a/src/test/ref/unusedblockproblem.log +++ b/src/test/ref/unusedblockproblem.log @@ -84,7 +84,6 @@ Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Culled Empty Block (label) main::@1 Successful SSA optimization Pass2CullEmptyBlocks -Eliminating unused constant (const byte) main::line#0 Successful SSA optimization PassNEliminateUnusedVars Adding NOP phi() at start of @begin Adding NOP phi() at start of @1