diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 74d146fa5..9d82ff4c9 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -37,6 +37,11 @@ public class TestPrograms { public TestPrograms() { } + @Test + public void testPreBob() throws IOException, URISyntaxException { + compileAndCompare("complex/prebob/prebob"); + } + @Test public void testUnaryPlus() throws IOException, URISyntaxException { compileAndCompare("unary-plus"); diff --git a/src/test/kc/complex/prebob/prebob.kc b/src/test/kc/complex/prebob/prebob.kc new file mode 100644 index 000000000..c7f120865 --- /dev/null +++ b/src/test/kc/complex/prebob/prebob.kc @@ -0,0 +1,191 @@ +// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations) +import "c64" +import "string" + +// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars) +// The chars are layout as follows with data in chars 0, 1, 3, 4 initially +// 0 3 6 +// 1 4 7 +// 2 5 8 +const char[3*3*8] PROTO_BOB = kickasm(resource "smiley.png") {{ + .var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) +}}; + +// Sine used for the X-coordinate +const char[0x200] SIN_X_TAB = kickasm {{ .fill $200, 75.5+75.5*sin(i*2*PI/256) }}; +// Sine used for the Y-coordinate +const char[0x200] SIN_Y_TAB = kickasm {{ .fill $200, 91.5+91.5*sin(i*2*PI/256) }}; + +// The screen +const char* SCREEN = 0x4000; +// The charset that will receive the shifted bobs +const char* BOB_CHARSET = 0x6000; + +// Tables containing the char to use for a specific cell of a shifted BOB. +// char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x]; +char[9*8*4] BOB_TABLES; +// The number of different X-shifts +const char BOB_SHIFTS_X = 4; +// The number of different Y-shifts +const char BOB_SHIFTS_Y = 8; +// The size of a sub-table of BOB_TABLES +const char BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y; + +void main() { + prepareBobs(); + vicSelectGfxBank(SCREEN); + *D018 = toD018(SCREEN, BOB_CHARSET); + // Clear screen + memset(SCREEN, 0x00, 1000); + /* + // Display some BOBs + char* screen = SCREEN; + char bob_table_idx = 0; + for(char i:0..7) { + for(char j:0..3) { + screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen += 120; + bob_table_idx++; + } + screen -= (120*4)-3; + } + */ + char sin_x_idx = 0; + char sin_y_idx = 73; + while(true) { + do { } while (*RASTER!=$ff); + //kickasm {{ .break }} + (*BORDERCOL)++; + renderBob((SIN_X_TAB)[sin_x_idx], (SIN_Y_TAB)[sin_y_idx]); + renderBob((SIN_X_TAB+15)[sin_x_idx], (SIN_Y_TAB+11)[sin_y_idx]); + renderBob((SIN_X_TAB+22)[sin_x_idx], (SIN_Y_TAB+30)[sin_y_idx]); + sin_x_idx++; + sin_y_idx++; + (*BORDERCOL)--; + } +} + +// Render a single BOB at a given x/y-position +// X-position is 0-151. Each x-position is 2 pixels wide. +// Y-position is 0-183. Each y-position is 1 pixel high. +void renderBob(char xpos, char ypos) { + //kickasm {{ .break }} + char x_char_offset = xpos/BOB_SHIFTS_X; + char y_char_offset = ypos/BOB_SHIFTS_Y; + unsigned int y_offset = (unsigned int)y_char_offset*40; + char* screen = SCREEN+y_offset+x_char_offset; + char bob_table_idx = (ypos&7)*BOB_SHIFTS_X+(xpos&3); + screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx]; +} + +// Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES +// Modifies PROTO_BOB by shifting it around +void prepareBobs() { + bob_charset_next_id = 0; + // Ensure the first glyph is empty + bobCharsetFindOrAddGlyph(PROTO_BOB+48); + char bob_table_idx = 0; + for(char shift_y=0;shift_y>1 | carry; + // Update carry + carry = new_carry; + // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) + if(j>=48) { + j-=47; + } else { + j+=24; + } + } +} + +// Shift PROTO_BOB down one Y pixel +// At the same time restore PROTO_BOB X by shifting 8 pixels left +void shiftProtoBobDown() { + for(char i=23;i>0;i--) { + PROTO_BOB[i] = (PROTO_BOB+23)[i]; + (PROTO_BOB+24)[i] = (PROTO_BOB+47)[i]; + (PROTO_BOB+48)[i] = 0x00; + } + PROTO_BOB[0] = 0; + PROTO_BOB[24] = 0; + PROTO_BOB[48] = 0; + +} + +// BOB charset ID of the next glyph to be added +char bob_charset_next_id; + +// Looks through BOB_CHARSET to find the passed bob glyph if present. +// If not present it is added +// Returns the glyph ID +char bobCharsetFindOrAddGlyph(char* bob_glyph) { + char* glyph_cursor = BOB_CHARSET; + byte glyph_id = 0; + while(glyph_id!=bob_charset_next_id) { + byte found = 1; + for(char i=0;i<8;i++) { + if(glyph_cursor[i]!=bob_glyph[i]) { + found = 0; + break; + } + } + if(found) return glyph_id; + glyph_id++; + glyph_cursor +=8; + } + // Not found - add it + for(char i=0;i<8;i++) + glyph_cursor[i]=bob_glyph[i]; + bob_charset_next_id++; + return glyph_id; +} diff --git a/src/test/kc/complex/prebob/smiley.png b/src/test/kc/complex/prebob/smiley.png new file mode 100644 index 000000000..78d647509 Binary files /dev/null and b/src/test/kc/complex/prebob/smiley.png differ diff --git a/src/test/ref/complex/prebob/prebob.asm b/src/test/ref/complex/prebob/prebob.asm new file mode 100644 index 000000000..b3eda0734 --- /dev/null +++ b/src/test/ref/complex/prebob/prebob.asm @@ -0,0 +1,457 @@ +// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations) +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label D018 = $d018 + // CIA#2 Port A: Serial bus, RS-232, VIC memory bank + .label CIA2_PORT_A = $dd00 + // CIA #2 Port A data direction register. + .label CIA2_PORT_A_DDR = $dd02 + // The screen + .label SCREEN = $4000 + // The charset that will receive the shifted bobs + .label BOB_CHARSET = $6000 + // The number of different X-shifts + .const BOB_SHIFTS_X = 4 + // The number of different Y-shifts + .const BOB_SHIFTS_Y = 8 + // The size of a sub-table of BOB_TABLES + .const BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y + // BOB charset ID of the next glyph to be added + .label bob_charset_next_id = $e +main: { + .const vicSelectGfxBank1_toDd001_return = 3^(>SCREEN)/$40 + .const toD0181_return = (>BOB_CHARSET)/4&$f + /* + // Display some BOBs + char* screen = SCREEN; + char bob_table_idx = 0; + for(char i:0..7) { + for(char j:0..3) { + screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen += 120; + bob_table_idx++; + } + screen -= (120*4)-3; + } + */ + .label sin_x_idx = 2 + .label sin_y_idx = 3 + jsr prepareBobs + lda #3 + sta CIA2_PORT_A_DDR + lda #vicSelectGfxBank1_toDd001_return + sta CIA2_PORT_A + lda #toD0181_return + sta D018 + jsr memset + lda #$49 + sta.z sin_y_idx + lda #0 + sta.z sin_x_idx + __b2: + lda #$ff + cmp RASTER + bne __b2 + inc BORDERCOL + ldy.z sin_x_idx + lda SIN_X_TAB,y + sta.z renderBob.xpos + ldy.z sin_y_idx + ldx SIN_Y_TAB,y + jsr renderBob + ldy.z sin_x_idx + lda SIN_X_TAB+$f,y + sta.z renderBob.xpos + ldy.z sin_y_idx + ldx SIN_Y_TAB+$b,y + jsr renderBob + ldy.z sin_x_idx + lda SIN_X_TAB+$16,y + sta.z renderBob.xpos + ldy.z sin_y_idx + ldx SIN_Y_TAB+$1e,y + jsr renderBob + inc.z sin_x_idx + inc.z sin_y_idx + dec BORDERCOL + jmp __b2 +} +// Render a single BOB at a given x/y-position +// X-position is 0-151. Each x-position is 2 pixels wide. +// Y-position is 0-183. Each y-position is 1 pixel high. +// renderBob(byte zeropage(4) xpos, byte register(X) ypos) +renderBob: { + .label __2 = $a + .label __4 = $a + .label __7 = $e + .label xpos = 4 + .label y_offset = $a + .label screen = $a + .label __10 = $c + .label __11 = $a + lda.z xpos + lsr + lsr + tay + txa + lsr + lsr + lsr + sta.z __2 + lda #0 + sta.z __2+1 + lda.z __2 + asl + sta.z __10 + lda.z __2+1 + rol + sta.z __10+1 + asl.z __10 + rol.z __10+1 + lda.z __11 + clc + adc.z __10 + sta.z __11 + lda.z __11+1 + adc.z __10+1 + sta.z __11+1 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + clc + lda.z __4 + adc #SCREEN + sta.z __4+1 + tya + clc + adc.z screen + sta.z screen + bcc !+ + inc.z screen+1 + !: + txa + and #7 + asl + asl + sta.z __7 + lda #3 + and.z xpos + clc + adc.z __7 + tax + lda BOB_TABLES,x + ldy #0 + sta (screen),y + lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,x + ldy #$28 + sta (screen),y + lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,x + ldy #$50 + sta (screen),y + lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,x + ldy #1 + sta (screen),y + lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,x + ldy #$29 + sta (screen),y + lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,x + ldy #$51 + sta (screen),y + lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,x + ldy #2 + sta (screen),y + lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,x + ldy #$2a + sta (screen),y + lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,x + ldy #$52 + sta (screen),y + rts +} +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .label str = SCREEN + .const c = 0 + .const num = $3e8 + .label end = str+num + .label dst = 5 + lda #str + sta.z dst+1 + __b1: + lda.z dst+1 + cmp #>end + bne __b2 + lda.z dst + cmp #PROTO_BOB+$30 + sta.z bobCharsetFindOrAddGlyph.bob_glyph+1 + lda #0 + sta.z bob_charset_next_id + jsr bobCharsetFindOrAddGlyph + lda #0 + sta.z bob_table_idx + sta.z shift_y + __b1: + lda.z shift_y + cmp #BOB_SHIFTS_Y + bcc b1 + rts + b1: + lda #0 + sta.z shift_x + __b2: + lda.z shift_x + cmp #BOB_SHIFTS_X + bcc __b3 + jsr shiftProtoBobDown + inc.z shift_y + jmp __b1 + __b3: + lda.z bob_table_idx + clc + adc #BOB_TABLES + adc #0 + sta.z bob_table+1 + lda #PROTO_BOB + sta.z bob_glyph+1 + lda #0 + sta.z cell + __b5: + lda.z cell + cmp #9 + bcc __b6 + inc.z bob_table_idx + jsr shiftProtoBobRight + jsr shiftProtoBobRight + inc.z shift_x + jmp __b2 + __b6: + jsr bobCharsetFindOrAddGlyph + lda.z bobCharsetFindOrAddGlyph.glyph_id + // Look for an existing char in BOB_CHARSET + ldy #0 + sta (bob_table),y + // Move to the next glyph + lda #8 + clc + adc.z bob_glyph + sta.z bob_glyph + bcc !+ + inc.z bob_glyph+1 + !: + // Move to the next sub-table + lda #BOB_SHIFTS_X*BOB_SHIFTS_Y + clc + adc.z bob_table + sta.z bob_table + bcc !+ + inc.z bob_table+1 + !: + inc.z cell + jmp __b5 +} +// Looks through BOB_CHARSET to find the passed bob glyph if present. +// If not present it is added +// Returns the glyph ID +// bobCharsetFindOrAddGlyph(byte* zeropage(5) bob_glyph) +bobCharsetFindOrAddGlyph: { + .label bob_glyph = 5 + .label i = 7 + .label glyph_id = 9 + .label glyph_cursor = $c + lda #BOB_CHARSET + sta.z glyph_cursor+1 + lda #0 + sta.z glyph_id + __b1: + lda.z glyph_id + cmp.z bob_charset_next_id + bne b1 + ldx #0 + // Not found - add it + __b7: + cpx #8 + bcc __b8 + inc.z bob_charset_next_id + rts + __b8: + stx.z $ff + txa + tay + lda (bob_glyph),y + sta (glyph_cursor),y + inx + jmp __b7 + b1: + lda #0 + sta.z i + __b2: + lda.z i + cmp #8 + bcc __b3 + lda #1 + jmp __b5 + __b3: + ldy.z i + lda (glyph_cursor),y + tax + lda (bob_glyph),y + tay + sty.z $ff + cpx.z $ff + beq __b4 + lda #0 + __b5: + cmp #0 + beq __b6 + rts + __b6: + inc.z glyph_id + lda #8 + clc + adc.z glyph_cursor + sta.z glyph_cursor + bcc !+ + inc.z glyph_cursor+1 + !: + jmp __b1 + __b4: + inc.z i + jmp __b2 +} +// Shift PROTO_BOB right one X pixel +shiftProtoBobRight: { + .label carry = 9 + .label i = 8 + ldy #0 + ldx #0 + txa + sta.z i + __b1: + lda.z i + cmp #3*3*8 + bcc __b2 + rts + __b2: + lda #1 + and PROTO_BOB,x + cmp #0 + bne __b3 + lda #0 + sta.z carry + jmp __b4 + __b3: + lda #$80 + sta.z carry + __b4: + lda PROTO_BOB,x + lsr + sty.z $ff + ora.z $ff + // Shift value and add old carry + sta PROTO_BOB,x + // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) + cpx #$30 + bcs __b5 + txa + axs #-[$18] + __b6: + inc.z i + ldy.z carry + jmp __b1 + __b5: + txa + axs #$2f + jmp __b6 +} +// Shift PROTO_BOB down one Y pixel +// At the same time restore PROTO_BOB X by shifting 8 pixels left +shiftProtoBobDown: { + ldx #$17 + __b1: + cpx #0 + bne __b2 + lda #0 + sta PROTO_BOB + sta PROTO_BOB+$18 + sta PROTO_BOB+$30 + rts + __b2: + lda PROTO_BOB+$17,x + sta PROTO_BOB,x + lda PROTO_BOB+$2f,x + sta PROTO_BOB+$18,x + lda #0 + sta PROTO_BOB+$30,x + dex + jmp __b1 +} + // The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars) + // The chars are layout as follows with data in chars 0, 1, 3, 4 initially + // 0 3 6 + // 1 4 7 + // 2 5 8 +PROTO_BOB: +.var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + + // Sine used for the X-coordinate +SIN_X_TAB: +.fill $200, 75.5+75.5*sin(i*2*PI/256) + // Sine used for the Y-coordinate +SIN_Y_TAB: +.fill $200, 91.5+91.5*sin(i*2*PI/256) + // Tables containing the char to use for a specific cell of a shifted BOB. + // char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x]; + BOB_TABLES: .fill 9*8*4, 0 diff --git a/src/test/ref/complex/prebob/prebob.cfg b/src/test/ref/complex/prebob/prebob.cfg new file mode 100644 index 000000000..e232d6e11 --- /dev/null +++ b/src/test/ref/complex/prebob/prebob.cfg @@ -0,0 +1,272 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() + +(void()) main() +main: scope:[main] from @1 + [4] phi() + [5] call prepareBobs + to:main::vicSelectGfxBank1 +main::vicSelectGfxBank1: scope:[main] from main + [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 + to:main::vicSelectGfxBank1_toDd001 +main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1 + [7] phi() + to:main::vicSelectGfxBank1_@1 +main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001 + [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 + to:main::toD0181 +main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1 + [9] phi() + to:main::@4 +main::@4: scope:[main] from main::toD0181 + [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 + [11] call memset + to:main::@1 +main::@1: scope:[main] from main::@4 main::@7 + [12] (byte) main::sin_y_idx#7 ← phi( main::@4/(byte) $49 main::@7/(byte) main::sin_y_idx#1 ) + [12] (byte) main::sin_x_idx#7 ← phi( main::@4/(byte) 0 main::@7/(byte) main::sin_x_idx#1 ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 + [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 + [14] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + [15] (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#7) + [16] (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#7) + [17] call renderBob + to:main::@5 +main::@5: scope:[main] from main::@3 + [18] (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(byte) $f + (byte) main::sin_x_idx#7) + [19] (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(byte) $b + (byte) main::sin_y_idx#7) + [20] call renderBob + to:main::@6 +main::@6: scope:[main] from main::@5 + [21] (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(byte) $16 + (byte) main::sin_x_idx#7) + [22] (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(byte) $1e + (byte) main::sin_y_idx#7) + [23] call renderBob + to:main::@7 +main::@7: scope:[main] from main::@6 + [24] (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#7 + [25] (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#7 + [26] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) + to:main::@1 + +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +renderBob: scope:[renderBob] from main::@3 main::@5 main::@6 + [27] (byte) renderBob::ypos#3 ← phi( main::@5/(byte) renderBob::ypos#1 main::@6/(byte) renderBob::ypos#2 main::@3/(byte) renderBob::ypos#0 ) + [27] (byte) renderBob::xpos#3 ← phi( main::@5/(byte) renderBob::xpos#1 main::@6/(byte) renderBob::xpos#2 main::@3/(byte) renderBob::xpos#0 ) + [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 + [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 + [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 + [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 + [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 + [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 + [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 + [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 + [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 + [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 + [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 + [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 + [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) + [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + to:renderBob::@return +renderBob::@return: scope:[renderBob] from renderBob + [49] return + to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +memset: scope:[memset] from main::@4 + [50] phi() + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@2 + [51] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) + [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 + [53] return + to:@return +memset::@2: scope:[memset] from memset::@1 + [54] *((byte*) memset::dst#2) ← (const byte) memset::c#0 + [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + to:memset::@1 + +(void()) prepareBobs() +prepareBobs: scope:[prepareBobs] from main + [56] phi() + [57] call bobCharsetFindOrAddGlyph + to:prepareBobs::@1 +prepareBobs::@1: scope:[prepareBobs] from prepareBobs prepareBobs::@8 + [58] (byte) prepareBobs::bob_table_idx#6 ← phi( prepareBobs/(byte) 0 prepareBobs::@8/(byte) prepareBobs::bob_table_idx#12 ) + [58] (byte) bob_charset_next_id#14 ← phi( prepareBobs/(byte) bob_charset_next_id#16 prepareBobs::@8/(byte) bob_charset_next_id#30 ) + [58] (byte) prepareBobs::shift_y#2 ← phi( prepareBobs/(byte) 0 prepareBobs::@8/(byte) prepareBobs::shift_y#1 ) + [59] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 + to:prepareBobs::@return +prepareBobs::@return: scope:[prepareBobs] from prepareBobs::@1 + [60] return + to:@return +prepareBobs::@2: scope:[prepareBobs] from prepareBobs::@1 prepareBobs::@11 + [61] (byte) bob_charset_next_id#30 ← phi( prepareBobs::@1/(byte) bob_charset_next_id#14 prepareBobs::@11/(byte) bob_charset_next_id#21 ) + [61] (byte) prepareBobs::bob_table_idx#12 ← phi( prepareBobs::@1/(byte) prepareBobs::bob_table_idx#6 prepareBobs::@11/(byte) prepareBobs::bob_table_idx#1 ) + [61] (byte) prepareBobs::shift_x#2 ← phi( prepareBobs::@1/(byte) 0 prepareBobs::@11/(byte) prepareBobs::shift_x#1 ) + [62] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@3 + to:prepareBobs::@4 +prepareBobs::@4: scope:[prepareBobs] from prepareBobs::@2 + [63] phi() + [64] call shiftProtoBobDown + to:prepareBobs::@8 +prepareBobs::@8: scope:[prepareBobs] from prepareBobs::@4 + [65] (byte) prepareBobs::shift_y#1 ← ++ (byte) prepareBobs::shift_y#2 + to:prepareBobs::@1 +prepareBobs::@3: scope:[prepareBobs] from prepareBobs::@2 + [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 + to:prepareBobs::@5 +prepareBobs::@5: scope:[prepareBobs] from prepareBobs::@3 prepareBobs::@9 + [67] (byte*) prepareBobs::bob_table#2 ← phi( prepareBobs::@9/(byte*) prepareBobs::bob_table#1 prepareBobs::@3/(byte*) prepareBobs::bob_table#0 ) + [67] (byte) bob_charset_next_id#21 ← phi( prepareBobs::@9/(byte) bob_charset_next_id#16 prepareBobs::@3/(byte) bob_charset_next_id#30 ) + [67] (byte*) prepareBobs::bob_glyph#2 ← phi( prepareBobs::@9/(byte*) prepareBobs::bob_glyph#1 prepareBobs::@3/(const byte*) PROTO_BOB ) + [67] (byte) prepareBobs::cell#2 ← phi( prepareBobs::@9/(byte) prepareBobs::cell#1 prepareBobs::@3/(byte) 0 ) + [68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6 + to:prepareBobs::@7 +prepareBobs::@7: scope:[prepareBobs] from prepareBobs::@5 + [69] (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#12 + [70] call shiftProtoBobRight + to:prepareBobs::@10 +prepareBobs::@10: scope:[prepareBobs] from prepareBobs::@7 + [71] phi() + [72] call shiftProtoBobRight + to:prepareBobs::@11 +prepareBobs::@11: scope:[prepareBobs] from prepareBobs::@10 + [73] (byte) prepareBobs::shift_x#1 ← ++ (byte) prepareBobs::shift_x#2 + to:prepareBobs::@2 +prepareBobs::@6: scope:[prepareBobs] from prepareBobs::@5 + [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + [75] call bobCharsetFindOrAddGlyph + [76] (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11 + to:prepareBobs::@9 +prepareBobs::@9: scope:[prepareBobs] from prepareBobs::@6 + [77] (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#1 + [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 + [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 + [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y + [81] (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#2 + to:prepareBobs::@5 + +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +bobCharsetFindOrAddGlyph: scope:[bobCharsetFindOrAddGlyph] from prepareBobs prepareBobs::@6 + [82] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 ← phi( prepareBobs/(const byte*) PROTO_BOB+(byte) $30 prepareBobs::@6/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ) + [82] (byte) bob_charset_next_id#23 ← phi( prepareBobs/(byte) 0 prepareBobs::@6/(byte) bob_charset_next_id#21 ) + to:bobCharsetFindOrAddGlyph::@1 +bobCharsetFindOrAddGlyph::@1: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph bobCharsetFindOrAddGlyph::@6 + [83] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 ← phi( bobCharsetFindOrAddGlyph/(const byte*) BOB_CHARSET bobCharsetFindOrAddGlyph::@6/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ) + [83] (byte) bobCharsetFindOrAddGlyph::glyph_id#11 ← phi( bobCharsetFindOrAddGlyph/(byte) 0 bobCharsetFindOrAddGlyph::@6/(byte) bobCharsetFindOrAddGlyph::glyph_id#1 ) + [84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 + to:bobCharsetFindOrAddGlyph::@7 +bobCharsetFindOrAddGlyph::@7: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 bobCharsetFindOrAddGlyph::@8 + [85] (byte) bobCharsetFindOrAddGlyph::i1#2 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bobCharsetFindOrAddGlyph::i1#1 bobCharsetFindOrAddGlyph::@1/(byte) 0 ) + [86] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@8 + to:bobCharsetFindOrAddGlyph::@9 +bobCharsetFindOrAddGlyph::@9: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@7 + [87] (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#23 + to:bobCharsetFindOrAddGlyph::@return +bobCharsetFindOrAddGlyph::@return: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 bobCharsetFindOrAddGlyph::@9 + [88] (byte) bob_charset_next_id#16 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bob_charset_next_id#23 bobCharsetFindOrAddGlyph::@9/(byte) bob_charset_next_id#8 ) + [89] return + to:@return +bobCharsetFindOrAddGlyph::@8: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@7 + [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) + [91] (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#2 + to:bobCharsetFindOrAddGlyph::@7 +bobCharsetFindOrAddGlyph::@2: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 bobCharsetFindOrAddGlyph::@4 + [92] (byte) bobCharsetFindOrAddGlyph::i#2 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) 0 bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::i#1 ) + [93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3 + to:bobCharsetFindOrAddGlyph::@5 +bobCharsetFindOrAddGlyph::@3: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2 + [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 + to:bobCharsetFindOrAddGlyph::@5 +bobCharsetFindOrAddGlyph::@5: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2 bobCharsetFindOrAddGlyph::@3 + [95] (byte) bobCharsetFindOrAddGlyph::found#2 ← phi( bobCharsetFindOrAddGlyph::@3/(byte) 0 bobCharsetFindOrAddGlyph::@2/(byte) 1 ) + [96] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@6 + to:bobCharsetFindOrAddGlyph::@return +bobCharsetFindOrAddGlyph::@6: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 + [97] (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#11 + [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 + to:bobCharsetFindOrAddGlyph::@1 +bobCharsetFindOrAddGlyph::@4: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@3 + [99] (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#2 + to:bobCharsetFindOrAddGlyph::@2 + +(void()) shiftProtoBobRight() +shiftProtoBobRight: scope:[shiftProtoBobRight] from prepareBobs::@10 prepareBobs::@7 + [100] phi() + to:shiftProtoBobRight::@1 +shiftProtoBobRight::@1: scope:[shiftProtoBobRight] from shiftProtoBobRight shiftProtoBobRight::@6 + [101] (byte) shiftProtoBobRight::carry#2 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::carry#10 ) + [101] (byte) shiftProtoBobRight::j#3 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::j#10 ) + [101] (byte) shiftProtoBobRight::i#2 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::i#1 ) + [102] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 + to:shiftProtoBobRight::@return +shiftProtoBobRight::@return: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1 + [103] return + to:@return +shiftProtoBobRight::@2: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1 + [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 + [105] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@3 + to:shiftProtoBobRight::@4 +shiftProtoBobRight::@3: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 + [106] phi() + to:shiftProtoBobRight::@4 +shiftProtoBobRight::@4: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 shiftProtoBobRight::@3 + [107] (byte) shiftProtoBobRight::carry#1 ← phi( shiftProtoBobRight::@3/(byte) $80 shiftProtoBobRight::@2/(byte) 0 ) + [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 + [109] (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2 + [110] *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) ← (byte~) shiftProtoBobRight::$6 + [111] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@5 + to:shiftProtoBobRight::@7 +shiftProtoBobRight::@7: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4 + [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 + to:shiftProtoBobRight::@6 +shiftProtoBobRight::@6: scope:[shiftProtoBobRight] from shiftProtoBobRight::@5 shiftProtoBobRight::@7 + [113] (byte) shiftProtoBobRight::j#10 ← phi( shiftProtoBobRight::@7/(byte) shiftProtoBobRight::j#2 shiftProtoBobRight::@5/(byte) shiftProtoBobRight::j#1 ) + [114] (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#2 + [115] (byte) shiftProtoBobRight::carry#10 ← (byte) shiftProtoBobRight::carry#1 + to:shiftProtoBobRight::@1 +shiftProtoBobRight::@5: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4 + [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f + to:shiftProtoBobRight::@6 + +(void()) shiftProtoBobDown() +shiftProtoBobDown: scope:[shiftProtoBobDown] from prepareBobs::@4 + [117] phi() + to:shiftProtoBobDown::@1 +shiftProtoBobDown::@1: scope:[shiftProtoBobDown] from shiftProtoBobDown shiftProtoBobDown::@2 + [118] (byte) shiftProtoBobDown::i#2 ← phi( shiftProtoBobDown/(byte) $17 shiftProtoBobDown::@2/(byte) shiftProtoBobDown::i#1 ) + [119] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 + to:shiftProtoBobDown::@3 +shiftProtoBobDown::@3: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1 + [120] *((const byte*) PROTO_BOB) ← (byte) 0 + [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 + [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 + to:shiftProtoBobDown::@return +shiftProtoBobDown::@return: scope:[shiftProtoBobDown] from shiftProtoBobDown::@3 + [123] return + to:@return +shiftProtoBobDown::@2: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1 + [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) + [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) + [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 + [127] (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#2 + to:shiftProtoBobDown::@1 diff --git a/src/test/ref/complex/prebob/prebob.log b/src/test/ref/complex/prebob/prebob.log new file mode 100644 index 000000000..3a05e1075 --- /dev/null +++ b/src/test/ref/complex/prebob/prebob.log @@ -0,0 +1,5544 @@ +Resolved forward reference bob_charset_next_id to (byte) bob_charset_next_id +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) +Warning! Adding boolean cast to non-boolean condition (number~) shiftProtoBobRight::$1 +Warning! Adding boolean cast to non-boolean sub-expression (byte) bobCharsetFindOrAddGlyph::found +Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx +Inlined call call vicSelectGfxBank (const byte*) SCREEN +Inlined call (byte~) main::$2 ← call toD018 (const byte*) SCREEN (const byte*) BOB_CHARSET +Culled Empty Block (label) @1 +Culled Empty Block (label) @2 +Culled Empty Block (label) @3 +Culled Empty Block (label) @4 +Culled Empty Block (label) @5 +Culled Empty Block (label) @6 +Culled Empty Block (label) memset::@7 +Culled Empty Block (label) memset::@6 +Culled Empty Block (label) memset::@8 +Culled Empty Block (label) memset::@9 +Culled Empty Block (label) memset::@3 +Culled Empty Block (label) @7 +Culled Empty Block (label) @8 +Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@1 +Culled Empty Block (label) main::vicSelectGfxBank1_@return +Culled Empty Block (label) main::toD0181_@1 +Culled Empty Block (label) main::@2 +Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::@3 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@6 +Culled Empty Block (label) @9 +Culled Empty Block (label) @10 +Culled Empty Block (label) prepareBobs::@17 +Culled Empty Block (label) prepareBobs::@3 +Culled Empty Block (label) prepareBobs::@18 +Culled Empty Block (label) prepareBobs::@14 +Culled Empty Block (label) prepareBobs::@15 +Culled Empty Block (label) prepareBobs::@10 +Culled Empty Block (label) prepareBobs::@11 +Culled Empty Block (label) prepareBobs::@12 +Culled Empty Block (label) prepareBobs::@13 +Culled Empty Block (label) prepareBobs::@16 +Culled Empty Block (label) @11 +Culled Empty Block (label) shiftProtoBobRight::@9 +Culled Empty Block (label) shiftProtoBobRight::@3 +Culled Empty Block (label) shiftProtoBobRight::@10 +Culled Empty Block (label) shiftProtoBobRight::@11 +Culled Empty Block (label) shiftProtoBobRight::@12 +Culled Empty Block (label) shiftProtoBobRight::@14 +Culled Empty Block (label) shiftProtoBobRight::@15 +Culled Empty Block (label) @12 +Culled Empty Block (label) shiftProtoBobDown::@4 +Culled Empty Block (label) shiftProtoBobDown::@5 +Culled Empty Block (label) shiftProtoBobDown::@6 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@17 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@18 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@9 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@6 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@10 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@12 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@13 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@15 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@19 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@23 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@24 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@25 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@26 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@13 + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +memset: scope:[memset] from main::@10 + (byte) memset::c#4 ← phi( main::@10/(byte) memset::c#0 ) + (void*) memset::str#3 ← phi( main::@10/(void*) memset::str#0 ) + (word) memset::num#1 ← phi( main::@10/(word) memset::num#0 ) + (bool~) memset::$0 ← (word) memset::num#1 > (number) 0 + (bool~) memset::$1 ← ! (bool~) memset::$0 + if((bool~) memset::$1) goto memset::@1 + to:memset::@2 +memset::@1: scope:[memset] from memset memset::@4 + (void*) memset::str#1 ← phi( memset/(void*) memset::str#3 memset::@4/(void*) memset::str#4 ) + (void*) memset::return#0 ← (void*) memset::str#1 + to:memset::@return +memset::@2: scope:[memset] from memset + (byte) memset::c#3 ← phi( memset/(byte) memset::c#4 ) + (word) memset::num#2 ← phi( memset/(word) memset::num#1 ) + (void*) memset::str#2 ← phi( memset/(void*) memset::str#3 ) + (byte*~) memset::$2 ← ((byte*)) (void*) memset::str#2 + (byte*~) memset::$3 ← (byte*~) memset::$2 + (word) memset::num#2 + (byte*) memset::end#0 ← (byte*~) memset::$3 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 + to:memset::@4 +memset::@4: scope:[memset] from memset::@2 memset::@5 + (byte) memset::c#2 ← phi( memset::@2/(byte) memset::c#3 memset::@5/(byte) memset::c#1 ) + (void*) memset::str#4 ← phi( memset::@2/(void*) memset::str#2 memset::@5/(void*) memset::str#5 ) + (byte*) memset::end#1 ← phi( memset::@2/(byte*) memset::end#0 memset::@5/(byte*) memset::end#2 ) + (byte*) memset::dst#2 ← phi( memset::@2/(byte*) memset::dst#0 memset::@5/(byte*) memset::dst#1 ) + (bool~) memset::$4 ← (byte*) memset::dst#2 != (byte*) memset::end#1 + if((bool~) memset::$4) goto memset::@5 + to:memset::@1 +memset::@5: scope:[memset] from memset::@4 + (void*) memset::str#5 ← phi( memset::@4/(void*) memset::str#4 ) + (byte*) memset::end#2 ← phi( memset::@4/(byte*) memset::end#1 ) + (byte*) memset::dst#3 ← phi( memset::@4/(byte*) memset::dst#2 ) + (byte) memset::c#1 ← phi( memset::@4/(byte) memset::c#2 ) + *((byte*) memset::dst#3) ← (byte) memset::c#1 + (byte*) memset::dst#1 ← ++ (byte*) memset::dst#3 + to:memset::@4 +memset::@return: scope:[memset] from memset::@1 + (void*) memset::return#3 ← phi( memset::@1/(void*) memset::return#0 ) + (void*) memset::return#1 ← (void*) memset::return#3 + return + to:@return + +(void()) main() +main: scope:[main] from @14 + (byte) bob_charset_next_id#19 ← phi( @14/(byte) bob_charset_next_id#27 ) + call prepareBobs + to:main::@11 +main::@11: scope:[main] from main + (byte) bob_charset_next_id#10 ← phi( main/(byte) bob_charset_next_id#5 ) + (byte) bob_charset_next_id#0 ← (byte) bob_charset_next_id#10 + (byte*) main::vicSelectGfxBank1_gfx#0 ← (const byte*) SCREEN + to:main::vicSelectGfxBank1 +main::vicSelectGfxBank1: scope:[main] from main::@11 + (byte) bob_charset_next_id#58 ← phi( main::@11/(byte) bob_charset_next_id#0 ) + (byte*) main::vicSelectGfxBank1_gfx#1 ← phi( main::@11/(byte*) main::vicSelectGfxBank1_gfx#0 ) + *((const byte*) CIA2_PORT_A_DDR) ← (number) 3 + (byte*) main::vicSelectGfxBank1_toDd001_gfx#0 ← (byte*) main::vicSelectGfxBank1_gfx#1 + to:main::vicSelectGfxBank1_toDd001 +main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1 + (byte) bob_charset_next_id#57 ← phi( main::vicSelectGfxBank1/(byte) bob_charset_next_id#58 ) + (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 ← phi( main::vicSelectGfxBank1/(byte*) main::vicSelectGfxBank1_toDd001_gfx#0 ) + (word~) main::vicSelectGfxBank1_toDd001_$0 ← ((word)) (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 + (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (word~) main::vicSelectGfxBank1_toDd001_$0 + (number~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (number) $40 + (number~) main::vicSelectGfxBank1_toDd001_$3 ← (number) 3 ^ (number~) main::vicSelectGfxBank1_toDd001_$2 + (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (number~) main::vicSelectGfxBank1_toDd001_$3 + to:main::vicSelectGfxBank1_toDd001_@return +main::vicSelectGfxBank1_toDd001_@return: scope:[main] from main::vicSelectGfxBank1_toDd001 + (byte) bob_charset_next_id#56 ← phi( main::vicSelectGfxBank1_toDd001/(byte) bob_charset_next_id#57 ) + (byte) main::vicSelectGfxBank1_toDd001_return#2 ← phi( main::vicSelectGfxBank1_toDd001/(byte) main::vicSelectGfxBank1_toDd001_return#0 ) + (byte) main::vicSelectGfxBank1_toDd001_return#1 ← (byte) main::vicSelectGfxBank1_toDd001_return#2 + to:main::vicSelectGfxBank1_@1 +main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001_@return + (byte) bob_charset_next_id#54 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) bob_charset_next_id#56 ) + (byte) main::vicSelectGfxBank1_toDd001_return#3 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) main::vicSelectGfxBank1_toDd001_return#1 ) + (byte~) main::vicSelectGfxBank1_$0 ← (byte) main::vicSelectGfxBank1_toDd001_return#3 + *((const byte*) CIA2_PORT_A) ← (byte~) main::vicSelectGfxBank1_$0 + to:main::@9 +main::@9: scope:[main] from main::vicSelectGfxBank1_@1 + (byte) bob_charset_next_id#51 ← phi( main::vicSelectGfxBank1_@1/(byte) bob_charset_next_id#54 ) + (byte*) main::toD0181_screen#0 ← (const byte*) SCREEN + (byte*) main::toD0181_gfx#0 ← (const byte*) BOB_CHARSET + to:main::toD0181 +main::toD0181: scope:[main] from main::@9 + (byte) bob_charset_next_id#47 ← phi( main::@9/(byte) bob_charset_next_id#51 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@9/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@9/(byte*) main::toD0181_screen#0 ) + (word~) main::toD0181_$0 ← ((word)) (byte*) main::toD0181_screen#1 + (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (number) $3fff + (number~) main::toD0181_$2 ← (number~) main::toD0181_$1 * (number) 4 + (number~) main::toD0181_$3 ← > (number~) main::toD0181_$2 + (word~) main::toD0181_$4 ← ((word)) (byte*) main::toD0181_gfx#1 + (byte~) main::toD0181_$5 ← > (word~) main::toD0181_$4 + (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (number) 4 + (number~) main::toD0181_$7 ← (number~) main::toD0181_$6 & (number) $f + (number~) main::toD0181_$8 ← (number~) main::toD0181_$3 | (number~) main::toD0181_$7 + (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + (byte) bob_charset_next_id#41 ← phi( main::toD0181/(byte) bob_charset_next_id#47 ) + (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) + (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 + to:main::@10 +main::@10: scope:[main] from main::toD0181_@return + (byte) bob_charset_next_id#35 ← phi( main::toD0181_@return/(byte) bob_charset_next_id#41 ) + (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) + (byte~) main::$2 ← (byte) main::toD0181_return#3 + *((const byte*) D018) ← (byte~) main::$2 + (void*) memset::str#0 ← (void*)(const byte*) SCREEN + (byte) memset::c#0 ← (number) 0 + (word) memset::num#0 ← (number) $3e8 + call memset + (void*) memset::return#2 ← (void*) memset::return#1 + to:main::@12 +main::@12: scope:[main] from main::@10 + (byte) bob_charset_next_id#28 ← phi( main::@10/(byte) bob_charset_next_id#35 ) + (byte) main::sin_x_idx#0 ← (number) 0 + (byte) main::sin_y_idx#0 ← (number) $49 + to:main::@1 +main::@1: scope:[main] from main::@12 main::@15 + (byte) main::sin_y_idx#7 ← phi( main::@12/(byte) main::sin_y_idx#0 main::@15/(byte) main::sin_y_idx#1 ) + (byte) main::sin_x_idx#7 ← phi( main::@12/(byte) main::sin_x_idx#0 main::@15/(byte) main::sin_x_idx#1 ) + (byte) bob_charset_next_id#20 ← phi( main::@12/(byte) bob_charset_next_id#28 main::@15/(byte) bob_charset_next_id#29 ) + if(true) goto main::@4 + to:main::@return +main::@4: scope:[main] from main::@1 main::@4 + (byte) bob_charset_next_id#52 ← phi( main::@1/(byte) bob_charset_next_id#20 main::@4/(byte) bob_charset_next_id#52 ) + (byte) main::sin_y_idx#6 ← phi( main::@1/(byte) main::sin_y_idx#7 main::@4/(byte) main::sin_y_idx#6 ) + (byte) main::sin_x_idx#6 ← phi( main::@1/(byte) main::sin_x_idx#7 main::@4/(byte) main::sin_x_idx#6 ) + (bool~) main::$4 ← *((const byte*) RASTER) != (number) $ff + if((bool~) main::$4) goto main::@4 + to:main::@5 +main::@5: scope:[main] from main::@4 + (byte) bob_charset_next_id#48 ← phi( main::@4/(byte) bob_charset_next_id#52 ) + (byte) main::sin_y_idx#2 ← phi( main::@4/(byte) main::sin_y_idx#6 ) + (byte) main::sin_x_idx#2 ← phi( main::@4/(byte) main::sin_x_idx#6 ) + *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#2) + (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#2) + call renderBob + to:main::@13 +main::@13: scope:[main] from main::@5 + (byte) bob_charset_next_id#42 ← phi( main::@5/(byte) bob_charset_next_id#48 ) + (byte) main::sin_y_idx#3 ← phi( main::@5/(byte) main::sin_y_idx#2 ) + (byte) main::sin_x_idx#3 ← phi( main::@5/(byte) main::sin_x_idx#2 ) + (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(number) $f + (byte) main::sin_x_idx#3) + (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(number) $b + (byte) main::sin_y_idx#3) + call renderBob + to:main::@14 +main::@14: scope:[main] from main::@13 + (byte) bob_charset_next_id#36 ← phi( main::@13/(byte) bob_charset_next_id#42 ) + (byte) main::sin_y_idx#4 ← phi( main::@13/(byte) main::sin_y_idx#3 ) + (byte) main::sin_x_idx#4 ← phi( main::@13/(byte) main::sin_x_idx#3 ) + (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(number) $16 + (byte) main::sin_x_idx#4) + (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(number) $1e + (byte) main::sin_y_idx#4) + call renderBob + to:main::@15 +main::@15: scope:[main] from main::@14 + (byte) bob_charset_next_id#29 ← phi( main::@14/(byte) bob_charset_next_id#36 ) + (byte) main::sin_y_idx#5 ← phi( main::@14/(byte) main::sin_y_idx#4 ) + (byte) main::sin_x_idx#5 ← phi( main::@14/(byte) main::sin_x_idx#4 ) + (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#5 + (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#5 + *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) + to:main::@1 +main::@return: scope:[main] from main::@1 + (byte) bob_charset_next_id#11 ← phi( main::@1/(byte) bob_charset_next_id#20 ) + (byte) bob_charset_next_id#1 ← (byte) bob_charset_next_id#11 + return + to:@return + +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +renderBob: scope:[renderBob] from main::@13 main::@14 main::@5 + (byte) renderBob::ypos#3 ← phi( main::@13/(byte) renderBob::ypos#1 main::@14/(byte) renderBob::ypos#2 main::@5/(byte) renderBob::ypos#0 ) + (byte) renderBob::xpos#3 ← phi( main::@13/(byte) renderBob::xpos#1 main::@14/(byte) renderBob::xpos#2 main::@5/(byte) renderBob::xpos#0 ) + (byte~) renderBob::$0 ← (byte) renderBob::xpos#3 / (const byte) BOB_SHIFTS_X + (byte) renderBob::x_char_offset#0 ← (byte~) renderBob::$0 + (byte~) renderBob::$1 ← (byte) renderBob::ypos#3 / (const byte) BOB_SHIFTS_Y + (byte) renderBob::y_char_offset#0 ← (byte~) renderBob::$1 + (word~) renderBob::$2 ← ((word)) (byte) renderBob::y_char_offset#0 + (number~) renderBob::$3 ← (word~) renderBob::$2 * (number) $28 + (word) renderBob::y_offset#0 ← (number~) renderBob::$3 + (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 + (byte*~) renderBob::$5 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 + (byte*) renderBob::screen#0 ← (byte*~) renderBob::$5 + (number~) renderBob::$6 ← (byte) renderBob::ypos#3 & (number) 7 + (number~) renderBob::$7 ← (number~) renderBob::$6 * (const byte) BOB_SHIFTS_X + (number~) renderBob::$8 ← (byte) renderBob::xpos#3 & (number) 3 + (number~) renderBob::$9 ← (number~) renderBob::$7 + (number~) renderBob::$8 + (byte) renderBob::bob_table_idx#0 ← (number~) renderBob::$9 + *((byte*) renderBob::screen#0 + (number) 0) ← *((const byte*) BOB_TABLES+(number) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) $28) ← *((const byte*) BOB_TABLES+(number) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) $50) ← *((const byte*) BOB_TABLES+(number) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) 1) ← *((const byte*) BOB_TABLES+(number) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) $29) ← *((const byte*) BOB_TABLES+(number) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) $51) ← *((const byte*) BOB_TABLES+(number) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) 2) ← *((const byte*) BOB_TABLES+(number) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) $2a) ← *((const byte*) BOB_TABLES+(number) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + *((byte*) renderBob::screen#0 + (number) $52) ← *((const byte*) BOB_TABLES+(number) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + to:renderBob::@return +renderBob::@return: scope:[renderBob] from renderBob + return + to:@return + +(void()) prepareBobs() +prepareBobs: scope:[prepareBobs] from main + (byte) bob_charset_next_id#2 ← (number) 0 + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#0 ← (const byte*) PROTO_BOB+(number) $30 + call bobCharsetFindOrAddGlyph + (byte) bobCharsetFindOrAddGlyph::return#0 ← (byte) bobCharsetFindOrAddGlyph::return#3 + to:prepareBobs::@19 +prepareBobs::@19: scope:[prepareBobs] from prepareBobs + (byte) bob_charset_next_id#12 ← phi( prepareBobs/(byte) bob_charset_next_id#7 ) + (byte) bob_charset_next_id#3 ← (byte) bob_charset_next_id#12 + (byte) prepareBobs::bob_table_idx#0 ← (number) 0 + (byte) prepareBobs::shift_y#0 ← (number) 0 + to:prepareBobs::@1 +prepareBobs::@1: scope:[prepareBobs] from prepareBobs::@19 prepareBobs::@20 + (byte) prepareBobs::bob_table_idx#9 ← phi( prepareBobs::@19/(byte) prepareBobs::bob_table_idx#0 prepareBobs::@20/(byte) prepareBobs::bob_table_idx#12 ) + (byte) bob_charset_next_id#22 ← phi( prepareBobs::@19/(byte) bob_charset_next_id#3 prepareBobs::@20/(byte) bob_charset_next_id#30 ) + (byte) prepareBobs::shift_y#2 ← phi( prepareBobs::@19/(byte) prepareBobs::shift_y#0 prepareBobs::@20/(byte) prepareBobs::shift_y#1 ) + (bool~) prepareBobs::$1 ← (byte) prepareBobs::shift_y#2 < (const byte) BOB_SHIFTS_Y + if((bool~) prepareBobs::$1) goto prepareBobs::@2 + to:prepareBobs::@return +prepareBobs::@2: scope:[prepareBobs] from prepareBobs::@1 + (byte) bob_charset_next_id#49 ← phi( prepareBobs::@1/(byte) bob_charset_next_id#22 ) + (byte) prepareBobs::shift_y#6 ← phi( prepareBobs::@1/(byte) prepareBobs::shift_y#2 ) + (byte) prepareBobs::bob_table_idx#6 ← phi( prepareBobs::@1/(byte) prepareBobs::bob_table_idx#9 ) + (byte) prepareBobs::shift_x#0 ← (number) 0 + to:prepareBobs::@4 +prepareBobs::@4: scope:[prepareBobs] from prepareBobs::@2 prepareBobs::@23 + (byte) bob_charset_next_id#43 ← phi( prepareBobs::@2/(byte) bob_charset_next_id#49 prepareBobs::@23/(byte) bob_charset_next_id#50 ) + (byte) prepareBobs::shift_y#5 ← phi( prepareBobs::@2/(byte) prepareBobs::shift_y#6 prepareBobs::@23/(byte) prepareBobs::shift_y#7 ) + (byte) prepareBobs::bob_table_idx#4 ← phi( prepareBobs::@2/(byte) prepareBobs::bob_table_idx#6 prepareBobs::@23/(byte) prepareBobs::bob_table_idx#7 ) + (byte) prepareBobs::shift_x#2 ← phi( prepareBobs::@2/(byte) prepareBobs::shift_x#0 prepareBobs::@23/(byte) prepareBobs::shift_x#1 ) + (bool~) prepareBobs::$2 ← (byte) prepareBobs::shift_x#2 < (const byte) BOB_SHIFTS_X + if((bool~) prepareBobs::$2) goto prepareBobs::@5 + to:prepareBobs::@6 +prepareBobs::@5: scope:[prepareBobs] from prepareBobs::@4 + (byte) prepareBobs::shift_y#12 ← phi( prepareBobs::@4/(byte) prepareBobs::shift_y#5 ) + (byte) prepareBobs::shift_x#8 ← phi( prepareBobs::@4/(byte) prepareBobs::shift_x#2 ) + (byte) bob_charset_next_id#38 ← phi( prepareBobs::@4/(byte) bob_charset_next_id#43 ) + (byte) prepareBobs::bob_table_idx#2 ← phi( prepareBobs::@4/(byte) prepareBobs::bob_table_idx#4 ) + (byte*) prepareBobs::bob_glyph#0 ← (const byte*) PROTO_BOB + (byte*~) prepareBobs::$3 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#2 + (byte*) prepareBobs::bob_table#0 ← (byte*~) prepareBobs::$3 + (byte) prepareBobs::cell#0 ← (number) 0 + to:prepareBobs::@7 +prepareBobs::@6: scope:[prepareBobs] from prepareBobs::@4 + (byte) prepareBobs::bob_table_idx#13 ← phi( prepareBobs::@4/(byte) prepareBobs::bob_table_idx#4 ) + (byte) bob_charset_next_id#37 ← phi( prepareBobs::@4/(byte) bob_charset_next_id#43 ) + (byte) prepareBobs::shift_y#4 ← phi( prepareBobs::@4/(byte) prepareBobs::shift_y#5 ) + call shiftProtoBobDown + to:prepareBobs::@20 +prepareBobs::@20: scope:[prepareBobs] from prepareBobs::@6 + (byte) prepareBobs::bob_table_idx#12 ← phi( prepareBobs::@6/(byte) prepareBobs::bob_table_idx#13 ) + (byte) bob_charset_next_id#30 ← phi( prepareBobs::@6/(byte) bob_charset_next_id#37 ) + (byte) prepareBobs::shift_y#3 ← phi( prepareBobs::@6/(byte) prepareBobs::shift_y#4 ) + (byte) prepareBobs::shift_y#1 ← ++ (byte) prepareBobs::shift_y#3 + to:prepareBobs::@1 +prepareBobs::@7: scope:[prepareBobs] from prepareBobs::@21 prepareBobs::@5 + (byte) prepareBobs::shift_y#10 ← phi( prepareBobs::@21/(byte) prepareBobs::shift_y#11 prepareBobs::@5/(byte) prepareBobs::shift_y#12 ) + (byte) prepareBobs::shift_x#6 ← phi( prepareBobs::@21/(byte) prepareBobs::shift_x#7 prepareBobs::@5/(byte) prepareBobs::shift_x#8 ) + (byte*) prepareBobs::bob_table#4 ← phi( prepareBobs::@21/(byte*) prepareBobs::bob_table#1 prepareBobs::@5/(byte*) prepareBobs::bob_table#0 ) + (byte) bob_charset_next_id#31 ← phi( prepareBobs::@21/(byte) bob_charset_next_id#4 prepareBobs::@5/(byte) bob_charset_next_id#38 ) + (byte) prepareBobs::bob_table_idx#5 ← phi( prepareBobs::@21/(byte) prepareBobs::bob_table_idx#8 prepareBobs::@5/(byte) prepareBobs::bob_table_idx#2 ) + (byte*) prepareBobs::bob_glyph#4 ← phi( prepareBobs::@21/(byte*) prepareBobs::bob_glyph#1 prepareBobs::@5/(byte*) prepareBobs::bob_glyph#0 ) + (byte) prepareBobs::cell#2 ← phi( prepareBobs::@21/(byte) prepareBobs::cell#1 prepareBobs::@5/(byte) prepareBobs::cell#0 ) + (bool~) prepareBobs::$4 ← (byte) prepareBobs::cell#2 < (number) 9 + if((bool~) prepareBobs::$4) goto prepareBobs::@8 + to:prepareBobs::@9 +prepareBobs::@8: scope:[prepareBobs] from prepareBobs::@7 + (byte) prepareBobs::shift_y#13 ← phi( prepareBobs::@7/(byte) prepareBobs::shift_y#10 ) + (byte) prepareBobs::shift_x#9 ← phi( prepareBobs::@7/(byte) prepareBobs::shift_x#6 ) + (byte) prepareBobs::bob_table_idx#10 ← phi( prepareBobs::@7/(byte) prepareBobs::bob_table_idx#5 ) + (byte) prepareBobs::cell#4 ← phi( prepareBobs::@7/(byte) prepareBobs::cell#2 ) + (byte*) prepareBobs::bob_table#3 ← phi( prepareBobs::@7/(byte*) prepareBobs::bob_table#4 ) + (byte) bob_charset_next_id#21 ← phi( prepareBobs::@7/(byte) bob_charset_next_id#31 ) + (byte*) prepareBobs::bob_glyph#2 ← phi( prepareBobs::@7/(byte*) prepareBobs::bob_glyph#4 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + call bobCharsetFindOrAddGlyph + (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::return#3 + to:prepareBobs::@21 +prepareBobs::@21: scope:[prepareBobs] from prepareBobs::@8 + (byte) prepareBobs::shift_y#11 ← phi( prepareBobs::@8/(byte) prepareBobs::shift_y#13 ) + (byte) prepareBobs::shift_x#7 ← phi( prepareBobs::@8/(byte) prepareBobs::shift_x#9 ) + (byte) prepareBobs::bob_table_idx#8 ← phi( prepareBobs::@8/(byte) prepareBobs::bob_table_idx#10 ) + (byte) prepareBobs::cell#3 ← phi( prepareBobs::@8/(byte) prepareBobs::cell#4 ) + (byte*) prepareBobs::bob_glyph#3 ← phi( prepareBobs::@8/(byte*) prepareBobs::bob_glyph#2 ) + (byte*) prepareBobs::bob_table#2 ← phi( prepareBobs::@8/(byte*) prepareBobs::bob_table#3 ) + (byte) bob_charset_next_id#13 ← phi( prepareBobs::@8/(byte) bob_charset_next_id#7 ) + (byte) bobCharsetFindOrAddGlyph::return#5 ← phi( prepareBobs::@8/(byte) bobCharsetFindOrAddGlyph::return#1 ) + (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#5 + (byte) bob_charset_next_id#4 ← (byte) bob_charset_next_id#13 + *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 + (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#3 + (number) 8 + (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y + (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#3 + to:prepareBobs::@7 +prepareBobs::@9: scope:[prepareBobs] from prepareBobs::@7 + (byte) bob_charset_next_id#55 ← phi( prepareBobs::@7/(byte) bob_charset_next_id#31 ) + (byte) prepareBobs::shift_y#9 ← phi( prepareBobs::@7/(byte) prepareBobs::shift_y#10 ) + (byte) prepareBobs::shift_x#5 ← phi( prepareBobs::@7/(byte) prepareBobs::shift_x#6 ) + (byte) prepareBobs::bob_table_idx#3 ← phi( prepareBobs::@7/(byte) prepareBobs::bob_table_idx#5 ) + (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#3 + call shiftProtoBobRight + to:prepareBobs::@22 +prepareBobs::@22: scope:[prepareBobs] from prepareBobs::@9 + (byte) bob_charset_next_id#53 ← phi( prepareBobs::@9/(byte) bob_charset_next_id#55 ) + (byte) prepareBobs::shift_y#8 ← phi( prepareBobs::@9/(byte) prepareBobs::shift_y#9 ) + (byte) prepareBobs::bob_table_idx#11 ← phi( prepareBobs::@9/(byte) prepareBobs::bob_table_idx#1 ) + (byte) prepareBobs::shift_x#4 ← phi( prepareBobs::@9/(byte) prepareBobs::shift_x#5 ) + call shiftProtoBobRight + to:prepareBobs::@23 +prepareBobs::@23: scope:[prepareBobs] from prepareBobs::@22 + (byte) bob_charset_next_id#50 ← phi( prepareBobs::@22/(byte) bob_charset_next_id#53 ) + (byte) prepareBobs::shift_y#7 ← phi( prepareBobs::@22/(byte) prepareBobs::shift_y#8 ) + (byte) prepareBobs::bob_table_idx#7 ← phi( prepareBobs::@22/(byte) prepareBobs::bob_table_idx#11 ) + (byte) prepareBobs::shift_x#3 ← phi( prepareBobs::@22/(byte) prepareBobs::shift_x#4 ) + (byte) prepareBobs::shift_x#1 ← ++ (byte) prepareBobs::shift_x#3 + to:prepareBobs::@4 +prepareBobs::@return: scope:[prepareBobs] from prepareBobs::@1 + (byte) bob_charset_next_id#14 ← phi( prepareBobs::@1/(byte) bob_charset_next_id#22 ) + (byte) bob_charset_next_id#5 ← (byte) bob_charset_next_id#14 + return + to:@return + +(void()) shiftProtoBobRight() +shiftProtoBobRight: scope:[shiftProtoBobRight] from prepareBobs::@22 prepareBobs::@9 + (byte) shiftProtoBobRight::carry#0 ← (number) 0 + (byte) shiftProtoBobRight::j#0 ← (number) 0 + (byte) shiftProtoBobRight::i#0 ← (number) 0 + to:shiftProtoBobRight::@1 +shiftProtoBobRight::@1: scope:[shiftProtoBobRight] from shiftProtoBobRight shiftProtoBobRight::@8 + (byte) shiftProtoBobRight::carry#6 ← phi( shiftProtoBobRight/(byte) shiftProtoBobRight::carry#0 shiftProtoBobRight::@8/(byte) shiftProtoBobRight::carry#7 ) + (byte) shiftProtoBobRight::j#7 ← phi( shiftProtoBobRight/(byte) shiftProtoBobRight::j#0 shiftProtoBobRight::@8/(byte) shiftProtoBobRight::j#10 ) + (byte) shiftProtoBobRight::i#2 ← phi( shiftProtoBobRight/(byte) shiftProtoBobRight::i#0 shiftProtoBobRight::@8/(byte) shiftProtoBobRight::i#1 ) + (bool~) shiftProtoBobRight::$0 ← (byte) shiftProtoBobRight::i#2 < (number) 3*(number) 3*(number) 8 + if((bool~) shiftProtoBobRight::$0) goto shiftProtoBobRight::@2 + to:shiftProtoBobRight::@return +shiftProtoBobRight::@2: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1 + (byte) shiftProtoBobRight::i#9 ← phi( shiftProtoBobRight::@1/(byte) shiftProtoBobRight::i#2 ) + (byte) shiftProtoBobRight::carry#5 ← phi( shiftProtoBobRight::@1/(byte) shiftProtoBobRight::carry#6 ) + (byte) shiftProtoBobRight::j#3 ← phi( shiftProtoBobRight::@1/(byte) shiftProtoBobRight::j#7 ) + (number~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (number) 1 + (bool~) shiftProtoBobRight::$8 ← (number) 0 != (number~) shiftProtoBobRight::$1 + if((bool~) shiftProtoBobRight::$8) goto shiftProtoBobRight::@4 + to:shiftProtoBobRight::@5 +shiftProtoBobRight::@4: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 + (byte) shiftProtoBobRight::i#7 ← phi( shiftProtoBobRight::@2/(byte) shiftProtoBobRight::i#9 ) + (byte) shiftProtoBobRight::carry#3 ← phi( shiftProtoBobRight::@2/(byte) shiftProtoBobRight::carry#5 ) + (byte) shiftProtoBobRight::j#8 ← phi( shiftProtoBobRight::@2/(byte) shiftProtoBobRight::j#3 ) + (byte~) shiftProtoBobRight::$3 ← (byte) $80 + to:shiftProtoBobRight::@6 +shiftProtoBobRight::@5: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 + (byte) shiftProtoBobRight::i#8 ← phi( shiftProtoBobRight::@2/(byte) shiftProtoBobRight::i#9 ) + (byte) shiftProtoBobRight::carry#4 ← phi( shiftProtoBobRight::@2/(byte) shiftProtoBobRight::carry#5 ) + (byte) shiftProtoBobRight::j#9 ← phi( shiftProtoBobRight::@2/(byte) shiftProtoBobRight::j#3 ) + (byte~) shiftProtoBobRight::$2 ← (byte) 0 + to:shiftProtoBobRight::@6 +shiftProtoBobRight::@6: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4 shiftProtoBobRight::@5 + (byte) shiftProtoBobRight::i#6 ← phi( shiftProtoBobRight::@4/(byte) shiftProtoBobRight::i#7 shiftProtoBobRight::@5/(byte) shiftProtoBobRight::i#8 ) + (byte) shiftProtoBobRight::carry#2 ← phi( shiftProtoBobRight::@4/(byte) shiftProtoBobRight::carry#3 shiftProtoBobRight::@5/(byte) shiftProtoBobRight::carry#4 ) + (byte) shiftProtoBobRight::j#4 ← phi( shiftProtoBobRight::@4/(byte) shiftProtoBobRight::j#8 shiftProtoBobRight::@5/(byte) shiftProtoBobRight::j#9 ) + (byte~) shiftProtoBobRight::$4 ← phi( shiftProtoBobRight::@4/(byte~) shiftProtoBobRight::$3 shiftProtoBobRight::@5/(byte~) shiftProtoBobRight::$2 ) + (byte) shiftProtoBobRight::new_carry#0 ← (byte~) shiftProtoBobRight::$4 + (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#4) >> (number) 1 + (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2 + *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#4) ← (byte~) shiftProtoBobRight::$6 + (byte) shiftProtoBobRight::carry#1 ← (byte) shiftProtoBobRight::new_carry#0 + (bool~) shiftProtoBobRight::$7 ← (byte) shiftProtoBobRight::j#4 >= (number) $30 + if((bool~) shiftProtoBobRight::$7) goto shiftProtoBobRight::@7 + to:shiftProtoBobRight::@13 +shiftProtoBobRight::@7: scope:[shiftProtoBobRight] from shiftProtoBobRight::@6 + (byte) shiftProtoBobRight::carry#9 ← phi( shiftProtoBobRight::@6/(byte) shiftProtoBobRight::carry#1 ) + (byte) shiftProtoBobRight::i#5 ← phi( shiftProtoBobRight::@6/(byte) shiftProtoBobRight::i#6 ) + (byte) shiftProtoBobRight::j#5 ← phi( shiftProtoBobRight::@6/(byte) shiftProtoBobRight::j#4 ) + (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#5 - (number) $2f + to:shiftProtoBobRight::@8 +shiftProtoBobRight::@13: scope:[shiftProtoBobRight] from shiftProtoBobRight::@6 + (byte) shiftProtoBobRight::carry#8 ← phi( shiftProtoBobRight::@6/(byte) shiftProtoBobRight::carry#1 ) + (byte) shiftProtoBobRight::i#4 ← phi( shiftProtoBobRight::@6/(byte) shiftProtoBobRight::i#6 ) + (byte) shiftProtoBobRight::j#6 ← phi( shiftProtoBobRight::@6/(byte) shiftProtoBobRight::j#4 ) + (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#6 + (number) $18 + to:shiftProtoBobRight::@8 +shiftProtoBobRight::@8: scope:[shiftProtoBobRight] from shiftProtoBobRight::@13 shiftProtoBobRight::@7 + (byte) shiftProtoBobRight::carry#7 ← phi( shiftProtoBobRight::@13/(byte) shiftProtoBobRight::carry#8 shiftProtoBobRight::@7/(byte) shiftProtoBobRight::carry#9 ) + (byte) shiftProtoBobRight::j#10 ← phi( shiftProtoBobRight::@13/(byte) shiftProtoBobRight::j#2 shiftProtoBobRight::@7/(byte) shiftProtoBobRight::j#1 ) + (byte) shiftProtoBobRight::i#3 ← phi( shiftProtoBobRight::@13/(byte) shiftProtoBobRight::i#4 shiftProtoBobRight::@7/(byte) shiftProtoBobRight::i#5 ) + (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#3 + to:shiftProtoBobRight::@1 +shiftProtoBobRight::@return: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1 + return + to:@return + +(void()) shiftProtoBobDown() +shiftProtoBobDown: scope:[shiftProtoBobDown] from prepareBobs::@6 + (byte) shiftProtoBobDown::i#0 ← (number) $17 + to:shiftProtoBobDown::@1 +shiftProtoBobDown::@1: scope:[shiftProtoBobDown] from shiftProtoBobDown shiftProtoBobDown::@2 + (byte) shiftProtoBobDown::i#2 ← phi( shiftProtoBobDown/(byte) shiftProtoBobDown::i#0 shiftProtoBobDown::@2/(byte) shiftProtoBobDown::i#1 ) + (bool~) shiftProtoBobDown::$0 ← (byte) shiftProtoBobDown::i#2 > (number) 0 + if((bool~) shiftProtoBobDown::$0) goto shiftProtoBobDown::@2 + to:shiftProtoBobDown::@3 +shiftProtoBobDown::@2: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1 + (byte) shiftProtoBobDown::i#3 ← phi( shiftProtoBobDown::@1/(byte) shiftProtoBobDown::i#2 ) + *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#3) ← *((const byte*) PROTO_BOB+(number) $17 + (byte) shiftProtoBobDown::i#3) + *((const byte*) PROTO_BOB+(number) $18 + (byte) shiftProtoBobDown::i#3) ← *((const byte*) PROTO_BOB+(number) $2f + (byte) shiftProtoBobDown::i#3) + *((const byte*) PROTO_BOB+(number) $30 + (byte) shiftProtoBobDown::i#3) ← (number) 0 + (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#3 + to:shiftProtoBobDown::@1 +shiftProtoBobDown::@3: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1 + *((const byte*) PROTO_BOB + (number) 0) ← (number) 0 + *((const byte*) PROTO_BOB + (number) $18) ← (number) 0 + *((const byte*) PROTO_BOB + (number) $30) ← (number) 0 + to:shiftProtoBobDown::@return +shiftProtoBobDown::@return: scope:[shiftProtoBobDown] from shiftProtoBobDown::@3 + return + to:@return +@13: scope:[] from @begin + (byte) bob_charset_next_id#6 ← (byte) 0 + to:@14 + +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +bobCharsetFindOrAddGlyph: scope:[bobCharsetFindOrAddGlyph] from prepareBobs prepareBobs::@8 + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 ← phi( prepareBobs/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#0 prepareBobs::@8/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ) + (byte) bob_charset_next_id#23 ← phi( prepareBobs/(byte) bob_charset_next_id#2 prepareBobs::@8/(byte) bob_charset_next_id#21 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#0 ← (const byte*) BOB_CHARSET + (byte) bobCharsetFindOrAddGlyph::glyph_id#0 ← (number) 0 + to:bobCharsetFindOrAddGlyph::@1 +bobCharsetFindOrAddGlyph::@1: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph bobCharsetFindOrAddGlyph::@16 + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#9 ← phi( bobCharsetFindOrAddGlyph/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::@16/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#11 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#12 ← phi( bobCharsetFindOrAddGlyph/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#0 bobCharsetFindOrAddGlyph::@16/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ) + (byte) bob_charset_next_id#15 ← phi( bobCharsetFindOrAddGlyph/(byte) bob_charset_next_id#23 bobCharsetFindOrAddGlyph::@16/(byte) bob_charset_next_id#24 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#2 ← phi( bobCharsetFindOrAddGlyph/(byte) bobCharsetFindOrAddGlyph::glyph_id#0 bobCharsetFindOrAddGlyph::@16/(byte) bobCharsetFindOrAddGlyph::glyph_id#1 ) + (bool~) bobCharsetFindOrAddGlyph::$0 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#2 != (byte) bob_charset_next_id#15 + if((bool~) bobCharsetFindOrAddGlyph::$0) goto bobCharsetFindOrAddGlyph::@2 + to:bobCharsetFindOrAddGlyph::@3 +bobCharsetFindOrAddGlyph::@2: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 + (byte) bob_charset_next_id#44 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) bob_charset_next_id#15 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#12 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) bobCharsetFindOrAddGlyph::glyph_id#2 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 ← phi( bobCharsetFindOrAddGlyph::@1/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#9 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#8 ← phi( bobCharsetFindOrAddGlyph::@1/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#12 ) + (byte) bobCharsetFindOrAddGlyph::found#0 ← (number) 1 + (byte) bobCharsetFindOrAddGlyph::i#0 ← (number) 0 + to:bobCharsetFindOrAddGlyph::@4 +bobCharsetFindOrAddGlyph::@3: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 + (byte) bobCharsetFindOrAddGlyph::glyph_id#11 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) bobCharsetFindOrAddGlyph::glyph_id#2 ) + (byte) bob_charset_next_id#34 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) bob_charset_next_id#15 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 ← phi( bobCharsetFindOrAddGlyph::@1/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#12 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#8 ← phi( bobCharsetFindOrAddGlyph::@1/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#9 ) + (byte) bobCharsetFindOrAddGlyph::i1#0 ← (number) 0 + to:bobCharsetFindOrAddGlyph::@20 +bobCharsetFindOrAddGlyph::@4: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2 bobCharsetFindOrAddGlyph::@7 + (byte) bob_charset_next_id#40 ← phi( bobCharsetFindOrAddGlyph::@2/(byte) bob_charset_next_id#44 bobCharsetFindOrAddGlyph::@7/(byte) bob_charset_next_id#45 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#9 ← phi( bobCharsetFindOrAddGlyph::@2/(byte) bobCharsetFindOrAddGlyph::glyph_id#12 bobCharsetFindOrAddGlyph::@7/(byte) bobCharsetFindOrAddGlyph::glyph_id#13 ) + (byte) bobCharsetFindOrAddGlyph::found#3 ← phi( bobCharsetFindOrAddGlyph::@2/(byte) bobCharsetFindOrAddGlyph::found#0 bobCharsetFindOrAddGlyph::@7/(byte) bobCharsetFindOrAddGlyph::found#4 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#4 ← phi( bobCharsetFindOrAddGlyph::@2/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 bobCharsetFindOrAddGlyph::@7/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#7 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#5 ← phi( bobCharsetFindOrAddGlyph::@2/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#8 bobCharsetFindOrAddGlyph::@7/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#9 ) + (byte) bobCharsetFindOrAddGlyph::i#2 ← phi( bobCharsetFindOrAddGlyph::@2/(byte) bobCharsetFindOrAddGlyph::i#0 bobCharsetFindOrAddGlyph::@7/(byte) bobCharsetFindOrAddGlyph::i#1 ) + (bool~) bobCharsetFindOrAddGlyph::$1 ← (byte) bobCharsetFindOrAddGlyph::i#2 < (number) 8 + if((bool~) bobCharsetFindOrAddGlyph::$1) goto bobCharsetFindOrAddGlyph::@5 + to:bobCharsetFindOrAddGlyph::@8 +bobCharsetFindOrAddGlyph::@5: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@4 + (byte) bob_charset_next_id#46 ← phi( bobCharsetFindOrAddGlyph::@4/(byte) bob_charset_next_id#40 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#14 ← phi( bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::glyph_id#9 ) + (byte) bobCharsetFindOrAddGlyph::found#5 ← phi( bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::found#3 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 ← phi( bobCharsetFindOrAddGlyph::@4/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#4 ) + (byte) bobCharsetFindOrAddGlyph::i#3 ← phi( bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::i#2 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 ← phi( bobCharsetFindOrAddGlyph::@4/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#5 ) + (bool~) bobCharsetFindOrAddGlyph::$2 ← *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 + (byte) bobCharsetFindOrAddGlyph::i#3) != *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 + (byte) bobCharsetFindOrAddGlyph::i#3) + (bool~) bobCharsetFindOrAddGlyph::$3 ← ! (bool~) bobCharsetFindOrAddGlyph::$2 + if((bool~) bobCharsetFindOrAddGlyph::$3) goto bobCharsetFindOrAddGlyph::@7 + to:bobCharsetFindOrAddGlyph::@11 +bobCharsetFindOrAddGlyph::@7: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 + (byte) bob_charset_next_id#45 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bob_charset_next_id#46 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#13 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bobCharsetFindOrAddGlyph::glyph_id#14 ) + (byte) bobCharsetFindOrAddGlyph::found#4 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bobCharsetFindOrAddGlyph::found#5 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#7 ← phi( bobCharsetFindOrAddGlyph::@5/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#9 ← phi( bobCharsetFindOrAddGlyph::@5/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 ) + (byte) bobCharsetFindOrAddGlyph::i#4 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bobCharsetFindOrAddGlyph::i#3 ) + (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#4 + to:bobCharsetFindOrAddGlyph::@4 +bobCharsetFindOrAddGlyph::@11: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#13 ← phi( bobCharsetFindOrAddGlyph::@5/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 ) + (byte) bob_charset_next_id#39 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bob_charset_next_id#46 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#10 ← phi( bobCharsetFindOrAddGlyph::@5/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#8 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bobCharsetFindOrAddGlyph::glyph_id#14 ) + (byte) bobCharsetFindOrAddGlyph::found#1 ← (number) 0 + to:bobCharsetFindOrAddGlyph::@8 +bobCharsetFindOrAddGlyph::@8: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@11 bobCharsetFindOrAddGlyph::@4 + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#12 ← phi( bobCharsetFindOrAddGlyph::@11/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#13 bobCharsetFindOrAddGlyph::@4/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#4 ) + (byte) bob_charset_next_id#32 ← phi( bobCharsetFindOrAddGlyph::@11/(byte) bob_charset_next_id#39 bobCharsetFindOrAddGlyph::@4/(byte) bob_charset_next_id#40 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#6 ← phi( bobCharsetFindOrAddGlyph::@11/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#10 bobCharsetFindOrAddGlyph::@4/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#5 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#6 ← phi( bobCharsetFindOrAddGlyph::@11/(byte) bobCharsetFindOrAddGlyph::glyph_id#8 bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::glyph_id#9 ) + (byte) bobCharsetFindOrAddGlyph::found#2 ← phi( bobCharsetFindOrAddGlyph::@11/(byte) bobCharsetFindOrAddGlyph::found#1 bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::found#3 ) + (bool~) bobCharsetFindOrAddGlyph::$6 ← (number) 0 != (byte) bobCharsetFindOrAddGlyph::found#2 + (bool~) bobCharsetFindOrAddGlyph::$4 ← ! (bool~) bobCharsetFindOrAddGlyph::$6 + if((bool~) bobCharsetFindOrAddGlyph::$4) goto bobCharsetFindOrAddGlyph::@16 + to:bobCharsetFindOrAddGlyph::@14 +bobCharsetFindOrAddGlyph::@16: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@8 + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#11 ← phi( bobCharsetFindOrAddGlyph::@8/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#12 ) + (byte) bob_charset_next_id#24 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bob_charset_next_id#32 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#3 ← phi( bobCharsetFindOrAddGlyph::@8/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#6 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#3 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bobCharsetFindOrAddGlyph::glyph_id#6 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#3 + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#3 + (number) 8 + to:bobCharsetFindOrAddGlyph::@1 +bobCharsetFindOrAddGlyph::@14: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@8 + (byte) bob_charset_next_id#25 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bob_charset_next_id#32 ) + (byte) bobCharsetFindOrAddGlyph::glyph_id#4 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bobCharsetFindOrAddGlyph::glyph_id#6 ) + (byte) bobCharsetFindOrAddGlyph::return#2 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#4 + to:bobCharsetFindOrAddGlyph::@return +bobCharsetFindOrAddGlyph::@return: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@14 bobCharsetFindOrAddGlyph::@22 + (byte) bob_charset_next_id#16 ← phi( bobCharsetFindOrAddGlyph::@14/(byte) bob_charset_next_id#25 bobCharsetFindOrAddGlyph::@22/(byte) bob_charset_next_id#8 ) + (byte) bobCharsetFindOrAddGlyph::return#6 ← phi( bobCharsetFindOrAddGlyph::@14/(byte) bobCharsetFindOrAddGlyph::return#2 bobCharsetFindOrAddGlyph::@22/(byte) bobCharsetFindOrAddGlyph::return#4 ) + (byte) bobCharsetFindOrAddGlyph::return#3 ← (byte) bobCharsetFindOrAddGlyph::return#6 + (byte) bob_charset_next_id#7 ← (byte) bob_charset_next_id#16 + return + to:@return +bobCharsetFindOrAddGlyph::@20: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@21 bobCharsetFindOrAddGlyph::@3 + (byte) bobCharsetFindOrAddGlyph::glyph_id#7 ← phi( bobCharsetFindOrAddGlyph::@21/(byte) bobCharsetFindOrAddGlyph::glyph_id#10 bobCharsetFindOrAddGlyph::@3/(byte) bobCharsetFindOrAddGlyph::glyph_id#11 ) + (byte) bob_charset_next_id#26 ← phi( bobCharsetFindOrAddGlyph::@21/(byte) bob_charset_next_id#33 bobCharsetFindOrAddGlyph::@3/(byte) bob_charset_next_id#34 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#7 ← phi( bobCharsetFindOrAddGlyph::@21/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#4 bobCharsetFindOrAddGlyph::@3/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#5 ← phi( bobCharsetFindOrAddGlyph::@21/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#3 bobCharsetFindOrAddGlyph::@3/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#8 ) + (byte) bobCharsetFindOrAddGlyph::i1#2 ← phi( bobCharsetFindOrAddGlyph::@21/(byte) bobCharsetFindOrAddGlyph::i1#1 bobCharsetFindOrAddGlyph::@3/(byte) bobCharsetFindOrAddGlyph::i1#0 ) + (bool~) bobCharsetFindOrAddGlyph::$5 ← (byte) bobCharsetFindOrAddGlyph::i1#2 < (number) 8 + if((bool~) bobCharsetFindOrAddGlyph::$5) goto bobCharsetFindOrAddGlyph::@21 + to:bobCharsetFindOrAddGlyph::@22 +bobCharsetFindOrAddGlyph::@21: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@20 + (byte) bobCharsetFindOrAddGlyph::glyph_id#10 ← phi( bobCharsetFindOrAddGlyph::@20/(byte) bobCharsetFindOrAddGlyph::glyph_id#7 ) + (byte) bob_charset_next_id#33 ← phi( bobCharsetFindOrAddGlyph::@20/(byte) bob_charset_next_id#26 ) + (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#4 ← phi( bobCharsetFindOrAddGlyph::@20/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#7 ) + (byte) bobCharsetFindOrAddGlyph::i1#3 ← phi( bobCharsetFindOrAddGlyph::@20/(byte) bobCharsetFindOrAddGlyph::i1#2 ) + (byte*) bobCharsetFindOrAddGlyph::bob_glyph#3 ← phi( bobCharsetFindOrAddGlyph::@20/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#5 ) + *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#4 + (byte) bobCharsetFindOrAddGlyph::i1#3) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#3 + (byte) bobCharsetFindOrAddGlyph::i1#3) + (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#3 + to:bobCharsetFindOrAddGlyph::@20 +bobCharsetFindOrAddGlyph::@22: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@20 + (byte) bobCharsetFindOrAddGlyph::glyph_id#5 ← phi( bobCharsetFindOrAddGlyph::@20/(byte) bobCharsetFindOrAddGlyph::glyph_id#7 ) + (byte) bob_charset_next_id#17 ← phi( bobCharsetFindOrAddGlyph::@20/(byte) bob_charset_next_id#26 ) + (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#17 + (byte) bobCharsetFindOrAddGlyph::return#4 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#5 + to:bobCharsetFindOrAddGlyph::@return +@14: scope:[] from @13 + (byte) bob_charset_next_id#27 ← phi( @13/(byte) bob_charset_next_id#6 ) + call main + to:@15 +@15: scope:[] from @14 + (byte) bob_charset_next_id#18 ← phi( @14/(byte) bob_charset_next_id#1 ) + (byte) bob_charset_next_id#9 ← (byte) bob_charset_next_id#18 + to:@end +@end: scope:[] from @15 + +SYMBOL TABLE SSA +(label) @13 +(label) @14 +(label) @15 +(label) @begin +(label) @end +(const byte*) BOB_CHARSET = (byte*)(number) $6000 +(const byte) BOB_SHIFTS_X = (number) 4 +(const byte) BOB_SHIFTS_Y = (number) 8 +(const byte) BOB_SUBTABLE_SIZE = (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y +(const byte*) BOB_TABLES = { fill( 9*8*4, 0) } +(const byte*) BORDERCOL = (byte*)(number) $d020 +(const byte*) CIA2_PORT_A = (byte*)(number) $dd00 +(const byte*) CIA2_PORT_A_DDR = (byte*)(number) $dd02 +(const byte*) D018 = (byte*)(number) $d018 +(const byte*) PROTO_BOB = kickasm {{ .var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + }} +(const byte*) RASTER = (byte*)(number) $d012 +(const byte*) SCREEN = (byte*)(number) $4000 +(const byte*) SIN_X_TAB = kickasm {{ .fill $200, 75.5+75.5*sin(i*2*PI/256) }} +(const byte*) SIN_Y_TAB = kickasm {{ .fill $200, 91.5+91.5*sin(i*2*PI/256) }} +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +(bool~) bobCharsetFindOrAddGlyph::$0 +(bool~) bobCharsetFindOrAddGlyph::$1 +(bool~) bobCharsetFindOrAddGlyph::$2 +(bool~) bobCharsetFindOrAddGlyph::$3 +(bool~) bobCharsetFindOrAddGlyph::$4 +(bool~) bobCharsetFindOrAddGlyph::$5 +(bool~) bobCharsetFindOrAddGlyph::$6 +(label) bobCharsetFindOrAddGlyph::@1 +(label) bobCharsetFindOrAddGlyph::@11 +(label) bobCharsetFindOrAddGlyph::@14 +(label) bobCharsetFindOrAddGlyph::@16 +(label) bobCharsetFindOrAddGlyph::@2 +(label) bobCharsetFindOrAddGlyph::@20 +(label) bobCharsetFindOrAddGlyph::@21 +(label) bobCharsetFindOrAddGlyph::@22 +(label) bobCharsetFindOrAddGlyph::@3 +(label) bobCharsetFindOrAddGlyph::@4 +(label) bobCharsetFindOrAddGlyph::@5 +(label) bobCharsetFindOrAddGlyph::@7 +(label) bobCharsetFindOrAddGlyph::@8 +(label) bobCharsetFindOrAddGlyph::@return +(byte*) bobCharsetFindOrAddGlyph::bob_glyph +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#0 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#11 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#12 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#13 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#3 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#4 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#5 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#7 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#8 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#9 +(byte) bobCharsetFindOrAddGlyph::found +(byte) bobCharsetFindOrAddGlyph::found#0 +(byte) bobCharsetFindOrAddGlyph::found#1 +(byte) bobCharsetFindOrAddGlyph::found#2 +(byte) bobCharsetFindOrAddGlyph::found#3 +(byte) bobCharsetFindOrAddGlyph::found#4 +(byte) bobCharsetFindOrAddGlyph::found#5 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#10 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#12 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#3 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#4 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#5 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#6 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#7 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#8 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#9 +(byte) bobCharsetFindOrAddGlyph::glyph_id +(byte) bobCharsetFindOrAddGlyph::glyph_id#0 +(byte) bobCharsetFindOrAddGlyph::glyph_id#1 +(byte) bobCharsetFindOrAddGlyph::glyph_id#10 +(byte) bobCharsetFindOrAddGlyph::glyph_id#11 +(byte) bobCharsetFindOrAddGlyph::glyph_id#12 +(byte) bobCharsetFindOrAddGlyph::glyph_id#13 +(byte) bobCharsetFindOrAddGlyph::glyph_id#14 +(byte) bobCharsetFindOrAddGlyph::glyph_id#2 +(byte) bobCharsetFindOrAddGlyph::glyph_id#3 +(byte) bobCharsetFindOrAddGlyph::glyph_id#4 +(byte) bobCharsetFindOrAddGlyph::glyph_id#5 +(byte) bobCharsetFindOrAddGlyph::glyph_id#6 +(byte) bobCharsetFindOrAddGlyph::glyph_id#7 +(byte) bobCharsetFindOrAddGlyph::glyph_id#8 +(byte) bobCharsetFindOrAddGlyph::glyph_id#9 +(byte) bobCharsetFindOrAddGlyph::i +(byte) bobCharsetFindOrAddGlyph::i#0 +(byte) bobCharsetFindOrAddGlyph::i#1 +(byte) bobCharsetFindOrAddGlyph::i#2 +(byte) bobCharsetFindOrAddGlyph::i#3 +(byte) bobCharsetFindOrAddGlyph::i#4 +(byte) bobCharsetFindOrAddGlyph::i1 +(byte) bobCharsetFindOrAddGlyph::i1#0 +(byte) bobCharsetFindOrAddGlyph::i1#1 +(byte) bobCharsetFindOrAddGlyph::i1#2 +(byte) bobCharsetFindOrAddGlyph::i1#3 +(byte) bobCharsetFindOrAddGlyph::return +(byte) bobCharsetFindOrAddGlyph::return#0 +(byte) bobCharsetFindOrAddGlyph::return#1 +(byte) bobCharsetFindOrAddGlyph::return#2 +(byte) bobCharsetFindOrAddGlyph::return#3 +(byte) bobCharsetFindOrAddGlyph::return#4 +(byte) bobCharsetFindOrAddGlyph::return#5 +(byte) bobCharsetFindOrAddGlyph::return#6 +(byte) bob_charset_next_id +(byte) bob_charset_next_id#0 +(byte) bob_charset_next_id#1 +(byte) bob_charset_next_id#10 +(byte) bob_charset_next_id#11 +(byte) bob_charset_next_id#12 +(byte) bob_charset_next_id#13 +(byte) bob_charset_next_id#14 +(byte) bob_charset_next_id#15 +(byte) bob_charset_next_id#16 +(byte) bob_charset_next_id#17 +(byte) bob_charset_next_id#18 +(byte) bob_charset_next_id#19 +(byte) bob_charset_next_id#2 +(byte) bob_charset_next_id#20 +(byte) bob_charset_next_id#21 +(byte) bob_charset_next_id#22 +(byte) bob_charset_next_id#23 +(byte) bob_charset_next_id#24 +(byte) bob_charset_next_id#25 +(byte) bob_charset_next_id#26 +(byte) bob_charset_next_id#27 +(byte) bob_charset_next_id#28 +(byte) bob_charset_next_id#29 +(byte) bob_charset_next_id#3 +(byte) bob_charset_next_id#30 +(byte) bob_charset_next_id#31 +(byte) bob_charset_next_id#32 +(byte) bob_charset_next_id#33 +(byte) bob_charset_next_id#34 +(byte) bob_charset_next_id#35 +(byte) bob_charset_next_id#36 +(byte) bob_charset_next_id#37 +(byte) bob_charset_next_id#38 +(byte) bob_charset_next_id#39 +(byte) bob_charset_next_id#4 +(byte) bob_charset_next_id#40 +(byte) bob_charset_next_id#41 +(byte) bob_charset_next_id#42 +(byte) bob_charset_next_id#43 +(byte) bob_charset_next_id#44 +(byte) bob_charset_next_id#45 +(byte) bob_charset_next_id#46 +(byte) bob_charset_next_id#47 +(byte) bob_charset_next_id#48 +(byte) bob_charset_next_id#49 +(byte) bob_charset_next_id#5 +(byte) bob_charset_next_id#50 +(byte) bob_charset_next_id#51 +(byte) bob_charset_next_id#52 +(byte) bob_charset_next_id#53 +(byte) bob_charset_next_id#54 +(byte) bob_charset_next_id#55 +(byte) bob_charset_next_id#56 +(byte) bob_charset_next_id#57 +(byte) bob_charset_next_id#58 +(byte) bob_charset_next_id#6 +(byte) bob_charset_next_id#7 +(byte) bob_charset_next_id#8 +(byte) bob_charset_next_id#9 +(void()) main() +(byte~) main::$2 +(bool~) main::$4 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@4 +(label) main::@5 +(label) main::@9 +(label) main::@return +(byte) main::sin_x_idx +(byte) main::sin_x_idx#0 +(byte) main::sin_x_idx#1 +(byte) main::sin_x_idx#2 +(byte) main::sin_x_idx#3 +(byte) main::sin_x_idx#4 +(byte) main::sin_x_idx#5 +(byte) main::sin_x_idx#6 +(byte) main::sin_x_idx#7 +(byte) main::sin_y_idx +(byte) main::sin_y_idx#0 +(byte) main::sin_y_idx#1 +(byte) main::sin_y_idx#2 +(byte) main::sin_y_idx#3 +(byte) main::sin_y_idx#4 +(byte) main::sin_y_idx#5 +(byte) main::sin_y_idx#6 +(byte) main::sin_y_idx#7 +(label) main::toD0181 +(word~) main::toD0181_$0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$2 +(number~) main::toD0181_$3 +(word~) main::toD0181_$4 +(byte~) main::toD0181_$5 +(number~) main::toD0181_$6 +(number~) main::toD0181_$7 +(number~) main::toD0181_$8 +(label) main::toD0181_@return +(byte*) main::toD0181_gfx +(byte*) main::toD0181_gfx#0 +(byte*) main::toD0181_gfx#1 +(byte) main::toD0181_return +(byte) main::toD0181_return#0 +(byte) main::toD0181_return#1 +(byte) main::toD0181_return#2 +(byte) main::toD0181_return#3 +(byte*) main::toD0181_screen +(byte*) main::toD0181_screen#0 +(byte*) main::toD0181_screen#1 +(label) main::vicSelectGfxBank1 +(byte~) main::vicSelectGfxBank1_$0 +(label) main::vicSelectGfxBank1_@1 +(byte*) main::vicSelectGfxBank1_gfx +(byte*) main::vicSelectGfxBank1_gfx#0 +(byte*) main::vicSelectGfxBank1_gfx#1 +(label) main::vicSelectGfxBank1_toDd001 +(word~) main::vicSelectGfxBank1_toDd001_$0 +(byte~) main::vicSelectGfxBank1_toDd001_$1 +(number~) main::vicSelectGfxBank1_toDd001_$2 +(number~) main::vicSelectGfxBank1_toDd001_$3 +(label) main::vicSelectGfxBank1_toDd001_@return +(byte*) main::vicSelectGfxBank1_toDd001_gfx +(byte*) main::vicSelectGfxBank1_toDd001_gfx#0 +(byte*) main::vicSelectGfxBank1_toDd001_gfx#1 +(byte) main::vicSelectGfxBank1_toDd001_return +(byte) main::vicSelectGfxBank1_toDd001_return#0 +(byte) main::vicSelectGfxBank1_toDd001_return#1 +(byte) main::vicSelectGfxBank1_toDd001_return#2 +(byte) main::vicSelectGfxBank1_toDd001_return#3 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(bool~) memset::$0 +(bool~) memset::$1 +(byte*~) memset::$2 +(byte*~) memset::$3 +(bool~) memset::$4 +(label) memset::@1 +(label) memset::@2 +(label) memset::@4 +(label) memset::@5 +(label) memset::@return +(byte) memset::c +(byte) memset::c#0 +(byte) memset::c#1 +(byte) memset::c#2 +(byte) memset::c#3 +(byte) memset::c#4 +(byte*) memset::dst +(byte*) memset::dst#0 +(byte*) memset::dst#1 +(byte*) memset::dst#2 +(byte*) memset::dst#3 +(byte*) memset::end +(byte*) memset::end#0 +(byte*) memset::end#1 +(byte*) memset::end#2 +(word) memset::num +(word) memset::num#0 +(word) memset::num#1 +(word) memset::num#2 +(void*) memset::return +(void*) memset::return#0 +(void*) memset::return#1 +(void*) memset::return#2 +(void*) memset::return#3 +(void*) memset::str +(void*) memset::str#0 +(void*) memset::str#1 +(void*) memset::str#2 +(void*) memset::str#3 +(void*) memset::str#4 +(void*) memset::str#5 +(void()) prepareBobs() +(bool~) prepareBobs::$1 +(bool~) prepareBobs::$2 +(byte*~) prepareBobs::$3 +(bool~) prepareBobs::$4 +(byte~) prepareBobs::$5 +(label) prepareBobs::@1 +(label) prepareBobs::@19 +(label) prepareBobs::@2 +(label) prepareBobs::@20 +(label) prepareBobs::@21 +(label) prepareBobs::@22 +(label) prepareBobs::@23 +(label) prepareBobs::@4 +(label) prepareBobs::@5 +(label) prepareBobs::@6 +(label) prepareBobs::@7 +(label) prepareBobs::@8 +(label) prepareBobs::@9 +(label) prepareBobs::@return +(byte*) prepareBobs::bob_glyph +(byte*) prepareBobs::bob_glyph#0 +(byte*) prepareBobs::bob_glyph#1 +(byte*) prepareBobs::bob_glyph#2 +(byte*) prepareBobs::bob_glyph#3 +(byte*) prepareBobs::bob_glyph#4 +(byte*) prepareBobs::bob_table +(byte*) prepareBobs::bob_table#0 +(byte*) prepareBobs::bob_table#1 +(byte*) prepareBobs::bob_table#2 +(byte*) prepareBobs::bob_table#3 +(byte*) prepareBobs::bob_table#4 +(byte) prepareBobs::bob_table_idx +(byte) prepareBobs::bob_table_idx#0 +(byte) prepareBobs::bob_table_idx#1 +(byte) prepareBobs::bob_table_idx#10 +(byte) prepareBobs::bob_table_idx#11 +(byte) prepareBobs::bob_table_idx#12 +(byte) prepareBobs::bob_table_idx#13 +(byte) prepareBobs::bob_table_idx#2 +(byte) prepareBobs::bob_table_idx#3 +(byte) prepareBobs::bob_table_idx#4 +(byte) prepareBobs::bob_table_idx#5 +(byte) prepareBobs::bob_table_idx#6 +(byte) prepareBobs::bob_table_idx#7 +(byte) prepareBobs::bob_table_idx#8 +(byte) prepareBobs::bob_table_idx#9 +(byte) prepareBobs::cell +(byte) prepareBobs::cell#0 +(byte) prepareBobs::cell#1 +(byte) prepareBobs::cell#2 +(byte) prepareBobs::cell#3 +(byte) prepareBobs::cell#4 +(byte) prepareBobs::shift_x +(byte) prepareBobs::shift_x#0 +(byte) prepareBobs::shift_x#1 +(byte) prepareBobs::shift_x#2 +(byte) prepareBobs::shift_x#3 +(byte) prepareBobs::shift_x#4 +(byte) prepareBobs::shift_x#5 +(byte) prepareBobs::shift_x#6 +(byte) prepareBobs::shift_x#7 +(byte) prepareBobs::shift_x#8 +(byte) prepareBobs::shift_x#9 +(byte) prepareBobs::shift_y +(byte) prepareBobs::shift_y#0 +(byte) prepareBobs::shift_y#1 +(byte) prepareBobs::shift_y#10 +(byte) prepareBobs::shift_y#11 +(byte) prepareBobs::shift_y#12 +(byte) prepareBobs::shift_y#13 +(byte) prepareBobs::shift_y#2 +(byte) prepareBobs::shift_y#3 +(byte) prepareBobs::shift_y#4 +(byte) prepareBobs::shift_y#5 +(byte) prepareBobs::shift_y#6 +(byte) prepareBobs::shift_y#7 +(byte) prepareBobs::shift_y#8 +(byte) prepareBobs::shift_y#9 +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +(byte~) renderBob::$0 +(byte~) renderBob::$1 +(word~) renderBob::$2 +(number~) renderBob::$3 +(byte*~) renderBob::$4 +(byte*~) renderBob::$5 +(number~) renderBob::$6 +(number~) renderBob::$7 +(number~) renderBob::$8 +(number~) renderBob::$9 +(label) renderBob::@return +(byte) renderBob::bob_table_idx +(byte) renderBob::bob_table_idx#0 +(byte*) renderBob::screen +(byte*) renderBob::screen#0 +(byte) renderBob::x_char_offset +(byte) renderBob::x_char_offset#0 +(byte) renderBob::xpos +(byte) renderBob::xpos#0 +(byte) renderBob::xpos#1 +(byte) renderBob::xpos#2 +(byte) renderBob::xpos#3 +(byte) renderBob::y_char_offset +(byte) renderBob::y_char_offset#0 +(word) renderBob::y_offset +(word) renderBob::y_offset#0 +(byte) renderBob::ypos +(byte) renderBob::ypos#0 +(byte) renderBob::ypos#1 +(byte) renderBob::ypos#2 +(byte) renderBob::ypos#3 +(void()) shiftProtoBobDown() +(bool~) shiftProtoBobDown::$0 +(label) shiftProtoBobDown::@1 +(label) shiftProtoBobDown::@2 +(label) shiftProtoBobDown::@3 +(label) shiftProtoBobDown::@return +(byte) shiftProtoBobDown::i +(byte) shiftProtoBobDown::i#0 +(byte) shiftProtoBobDown::i#1 +(byte) shiftProtoBobDown::i#2 +(byte) shiftProtoBobDown::i#3 +(void()) shiftProtoBobRight() +(bool~) shiftProtoBobRight::$0 +(number~) shiftProtoBobRight::$1 +(byte~) shiftProtoBobRight::$2 +(byte~) shiftProtoBobRight::$3 +(byte~) shiftProtoBobRight::$4 +(byte~) shiftProtoBobRight::$5 +(byte~) shiftProtoBobRight::$6 +(bool~) shiftProtoBobRight::$7 +(bool~) shiftProtoBobRight::$8 +(label) shiftProtoBobRight::@1 +(label) shiftProtoBobRight::@13 +(label) shiftProtoBobRight::@2 +(label) shiftProtoBobRight::@4 +(label) shiftProtoBobRight::@5 +(label) shiftProtoBobRight::@6 +(label) shiftProtoBobRight::@7 +(label) shiftProtoBobRight::@8 +(label) shiftProtoBobRight::@return +(byte) shiftProtoBobRight::carry +(byte) shiftProtoBobRight::carry#0 +(byte) shiftProtoBobRight::carry#1 +(byte) shiftProtoBobRight::carry#2 +(byte) shiftProtoBobRight::carry#3 +(byte) shiftProtoBobRight::carry#4 +(byte) shiftProtoBobRight::carry#5 +(byte) shiftProtoBobRight::carry#6 +(byte) shiftProtoBobRight::carry#7 +(byte) shiftProtoBobRight::carry#8 +(byte) shiftProtoBobRight::carry#9 +(byte) shiftProtoBobRight::i +(byte) shiftProtoBobRight::i#0 +(byte) shiftProtoBobRight::i#1 +(byte) shiftProtoBobRight::i#2 +(byte) shiftProtoBobRight::i#3 +(byte) shiftProtoBobRight::i#4 +(byte) shiftProtoBobRight::i#5 +(byte) shiftProtoBobRight::i#6 +(byte) shiftProtoBobRight::i#7 +(byte) shiftProtoBobRight::i#8 +(byte) shiftProtoBobRight::i#9 +(byte) shiftProtoBobRight::j +(byte) shiftProtoBobRight::j#0 +(byte) shiftProtoBobRight::j#1 +(byte) shiftProtoBobRight::j#10 +(byte) shiftProtoBobRight::j#2 +(byte) shiftProtoBobRight::j#3 +(byte) shiftProtoBobRight::j#4 +(byte) shiftProtoBobRight::j#5 +(byte) shiftProtoBobRight::j#6 +(byte) shiftProtoBobRight::j#7 +(byte) shiftProtoBobRight::j#8 +(byte) shiftProtoBobRight::j#9 +(byte) shiftProtoBobRight::new_carry +(byte) shiftProtoBobRight::new_carry#0 + +Adding number conversion cast (unumber) 0 in (bool~) memset::$0 ← (word) memset::num#1 > (number) 0 +Adding number conversion cast (unumber) 3 in *((const byte*) CIA2_PORT_A_DDR) ← (number) 3 +Adding number conversion cast (unumber) $40 in (number~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (number) $40 +Adding number conversion cast (unumber) main::vicSelectGfxBank1_toDd001_$2 in (number~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (unumber)(number) $40 +Adding number conversion cast (unumber) 3 in (number~) main::vicSelectGfxBank1_toDd001_$3 ← (number) 3 ^ (unumber~) main::vicSelectGfxBank1_toDd001_$2 +Adding number conversion cast (unumber) main::vicSelectGfxBank1_toDd001_$3 in (number~) main::vicSelectGfxBank1_toDd001_$3 ← (unumber)(number) 3 ^ (unumber~) main::vicSelectGfxBank1_toDd001_$2 +Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (number) $3fff +Adding number conversion cast (unumber) main::toD0181_$1 in (number~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (unumber)(number) $3fff +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$1 * (number) 4 +Adding number conversion cast (unumber) main::toD0181_$2 in (number~) main::toD0181_$2 ← (unumber~) main::toD0181_$1 * (unumber)(number) 4 +Adding number conversion cast (unumber) main::toD0181_$3 in (number~) main::toD0181_$3 ← > (unumber~) main::toD0181_$2 +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (number) 4 +Adding number conversion cast (unumber) main::toD0181_$6 in (number~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (unumber)(number) 4 +Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (number) $f +Adding number conversion cast (unumber) main::toD0181_$7 in (number~) main::toD0181_$7 ← (unumber~) main::toD0181_$6 & (unumber)(number) $f +Adding number conversion cast (unumber) main::toD0181_$8 in (number~) main::toD0181_$8 ← (unumber~) main::toD0181_$3 | (unumber~) main::toD0181_$7 +Adding number conversion cast (unumber) 0 in (byte) memset::c#0 ← (number) 0 +Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 +Adding number conversion cast (unumber) 0 in (byte) main::sin_x_idx#0 ← (number) 0 +Adding number conversion cast (unumber) $49 in (byte) main::sin_y_idx#0 ← (number) $49 +Adding number conversion cast (unumber) $ff in (bool~) main::$4 ← *((const byte*) RASTER) != (number) $ff +Adding number conversion cast (unumber) $f in (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(number) $f + (byte) main::sin_x_idx#3) +Adding number conversion cast (unumber) $b in (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(number) $b + (byte) main::sin_y_idx#3) +Adding number conversion cast (unumber) $16 in (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(number) $16 + (byte) main::sin_x_idx#4) +Adding number conversion cast (unumber) $1e in (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(number) $1e + (byte) main::sin_y_idx#4) +Adding number conversion cast (unumber) $28 in (number~) renderBob::$3 ← (word~) renderBob::$2 * (number) $28 +Adding number conversion cast (unumber) renderBob::$3 in (number~) renderBob::$3 ← (word~) renderBob::$2 * (unumber)(number) $28 +Adding number conversion cast (unumber) 7 in (number~) renderBob::$6 ← (byte) renderBob::ypos#3 & (number) 7 +Adding number conversion cast (unumber) renderBob::$6 in (number~) renderBob::$6 ← (byte) renderBob::ypos#3 & (unumber)(number) 7 +Adding number conversion cast (unumber) renderBob::$7 in (number~) renderBob::$7 ← (unumber~) renderBob::$6 * (const byte) BOB_SHIFTS_X +Adding number conversion cast (unumber) 3 in (number~) renderBob::$8 ← (byte) renderBob::xpos#3 & (number) 3 +Adding number conversion cast (unumber) renderBob::$8 in (number~) renderBob::$8 ← (byte) renderBob::xpos#3 & (unumber)(number) 3 +Adding number conversion cast (unumber) renderBob::$9 in (number~) renderBob::$9 ← (unumber~) renderBob::$7 + (unumber~) renderBob::$8 +Adding number conversion cast (unumber) 0*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) 0) ← *((const byte*) BOB_TABLES+(number) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 0 in *((byte*) renderBob::screen#0 + (number) 0) ← *((const byte*) BOB_TABLES+(unumber)(number) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 0 in *((byte*) renderBob::screen#0 + (number) 0) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 1*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) $28) ← *((const byte*) BOB_TABLES+(number) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 1 in *((byte*) renderBob::screen#0 + (number) $28) ← *((const byte*) BOB_TABLES+(unumber)(number) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) $28 in *((byte*) renderBob::screen#0 + (number) $28) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 2*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) $50) ← *((const byte*) BOB_TABLES+(number) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 2 in *((byte*) renderBob::screen#0 + (number) $50) ← *((const byte*) BOB_TABLES+(unumber)(number) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) $50 in *((byte*) renderBob::screen#0 + (number) $50) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 3*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) 1) ← *((const byte*) BOB_TABLES+(number) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 3 in *((byte*) renderBob::screen#0 + (number) 1) ← *((const byte*) BOB_TABLES+(unumber)(number) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 1 in *((byte*) renderBob::screen#0 + (number) 1) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 4*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) $29) ← *((const byte*) BOB_TABLES+(number) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 4 in *((byte*) renderBob::screen#0 + (number) $29) ← *((const byte*) BOB_TABLES+(unumber)(number) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) $29 in *((byte*) renderBob::screen#0 + (number) $29) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 5*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) $51) ← *((const byte*) BOB_TABLES+(number) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 5 in *((byte*) renderBob::screen#0 + (number) $51) ← *((const byte*) BOB_TABLES+(unumber)(number) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) $51 in *((byte*) renderBob::screen#0 + (number) $51) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 6*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) 2) ← *((const byte*) BOB_TABLES+(number) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 6 in *((byte*) renderBob::screen#0 + (number) 2) ← *((const byte*) BOB_TABLES+(unumber)(number) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 2 in *((byte*) renderBob::screen#0 + (number) 2) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 7*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) $2a) ← *((const byte*) BOB_TABLES+(number) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 7 in *((byte*) renderBob::screen#0 + (number) $2a) ← *((const byte*) BOB_TABLES+(unumber)(number) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) $2a in *((byte*) renderBob::screen#0 + (number) $2a) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 8*BOB_SUBTABLE_SIZE in *((byte*) renderBob::screen#0 + (number) $52) ← *((const byte*) BOB_TABLES+(number) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 8 in *((byte*) renderBob::screen#0 + (number) $52) ← *((const byte*) BOB_TABLES+(unumber)(number) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) $52 in *((byte*) renderBob::screen#0 + (number) $52) ← *((const byte*) BOB_TABLES+(unumber)(unumber)(number) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Adding number conversion cast (unumber) 0 in (byte) bob_charset_next_id#2 ← (number) 0 +Adding number conversion cast (unumber) $30 in (byte*) bobCharsetFindOrAddGlyph::bob_glyph#0 ← (const byte*) PROTO_BOB+(number) $30 +Adding number conversion cast (unumber) 0 in (byte) prepareBobs::bob_table_idx#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) prepareBobs::shift_y#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) prepareBobs::shift_x#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) prepareBobs::cell#0 ← (number) 0 +Adding number conversion cast (unumber) 9 in (bool~) prepareBobs::$4 ← (byte) prepareBobs::cell#2 < (number) 9 +Adding number conversion cast (unumber) 8 in (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#3 + (number) 8 +Adding number conversion cast (unumber) 0 in (byte) shiftProtoBobRight::carry#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) shiftProtoBobRight::j#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) shiftProtoBobRight::i#0 ← (number) 0 +Adding number conversion cast (unumber) 3*3*8 in (bool~) shiftProtoBobRight::$0 ← (byte) shiftProtoBobRight::i#2 < (number) 3*(number) 3*(number) 8 +Adding number conversion cast (unumber) 1 in (number~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (number) 1 +Adding number conversion cast (unumber) shiftProtoBobRight::$1 in (number~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in (bool~) shiftProtoBobRight::$8 ← (number) 0 != (unumber~) shiftProtoBobRight::$1 +Adding number conversion cast (unumber) 1 in (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#4) >> (number) 1 +Adding number conversion cast (unumber) $30 in (bool~) shiftProtoBobRight::$7 ← (byte) shiftProtoBobRight::j#4 >= (number) $30 +Adding number conversion cast (unumber) $2f in (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#5 - (number) $2f +Adding number conversion cast (unumber) $18 in (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#6 + (number) $18 +Adding number conversion cast (unumber) $17 in (byte) shiftProtoBobDown::i#0 ← (number) $17 +Adding number conversion cast (unumber) 0 in (bool~) shiftProtoBobDown::$0 ← (byte) shiftProtoBobDown::i#2 > (number) 0 +Adding number conversion cast (unumber) $17 in *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#3) ← *((const byte*) PROTO_BOB+(number) $17 + (byte) shiftProtoBobDown::i#3) +Adding number conversion cast (unumber) $2f in *((const byte*) PROTO_BOB+(number) $18 + (byte) shiftProtoBobDown::i#3) ← *((const byte*) PROTO_BOB+(number) $2f + (byte) shiftProtoBobDown::i#3) +Adding number conversion cast (unumber) $18 in *((const byte*) PROTO_BOB+(number) $18 + (byte) shiftProtoBobDown::i#3) ← *((const byte*) PROTO_BOB+(unumber)(number) $2f + (byte) shiftProtoBobDown::i#3) +Adding number conversion cast (unumber) 0 in *((const byte*) PROTO_BOB+(number) $30 + (byte) shiftProtoBobDown::i#3) ← (number) 0 +Adding number conversion cast (unumber) $30 in *((const byte*) PROTO_BOB+(number) $30 + (byte) shiftProtoBobDown::i#3) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) PROTO_BOB + (number) 0) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) PROTO_BOB + (number) 0) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) PROTO_BOB + (number) $18) ← (number) 0 +Adding number conversion cast (unumber) $18 in *((const byte*) PROTO_BOB + (number) $18) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) PROTO_BOB + (number) $30) ← (number) 0 +Adding number conversion cast (unumber) $30 in *((const byte*) PROTO_BOB + (number) $30) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in (byte) bobCharsetFindOrAddGlyph::glyph_id#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) bobCharsetFindOrAddGlyph::found#0 ← (number) 1 +Adding number conversion cast (unumber) 0 in (byte) bobCharsetFindOrAddGlyph::i#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) bobCharsetFindOrAddGlyph::i1#0 ← (number) 0 +Adding number conversion cast (unumber) 8 in (bool~) bobCharsetFindOrAddGlyph::$1 ← (byte) bobCharsetFindOrAddGlyph::i#2 < (number) 8 +Adding number conversion cast (unumber) 0 in (byte) bobCharsetFindOrAddGlyph::found#1 ← (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) bobCharsetFindOrAddGlyph::$6 ← (number) 0 != (byte) bobCharsetFindOrAddGlyph::found#2 +Adding number conversion cast (unumber) 8 in (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#3 + (number) 8 +Adding number conversion cast (unumber) 8 in (bool~) bobCharsetFindOrAddGlyph::$5 ← (byte) bobCharsetFindOrAddGlyph::i1#2 < (number) 8 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte*~) memset::$2 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast *((const byte*) CIA2_PORT_A_DDR) ← (unumber)(number) 3 +Inlining cast (word~) main::vicSelectGfxBank1_toDd001_$0 ← (word)(byte*) main::vicSelectGfxBank1_toDd001_gfx#1 +Inlining cast (word~) main::toD0181_$0 ← (word)(byte*) main::toD0181_screen#1 +Inlining cast (word~) main::toD0181_$4 ← (word)(byte*) main::toD0181_gfx#1 +Inlining cast (byte) memset::c#0 ← (unumber)(number) 0 +Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 +Inlining cast (byte) main::sin_x_idx#0 ← (unumber)(number) 0 +Inlining cast (byte) main::sin_y_idx#0 ← (unumber)(number) $49 +Inlining cast (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 +Inlining cast (byte) bob_charset_next_id#2 ← (unumber)(number) 0 +Inlining cast (byte) prepareBobs::bob_table_idx#0 ← (unumber)(number) 0 +Inlining cast (byte) prepareBobs::shift_y#0 ← (unumber)(number) 0 +Inlining cast (byte) prepareBobs::shift_x#0 ← (unumber)(number) 0 +Inlining cast (byte) prepareBobs::cell#0 ← (unumber)(number) 0 +Inlining cast (byte) shiftProtoBobRight::carry#0 ← (unumber)(number) 0 +Inlining cast (byte) shiftProtoBobRight::j#0 ← (unumber)(number) 0 +Inlining cast (byte) shiftProtoBobRight::i#0 ← (unumber)(number) 0 +Inlining cast (byte) shiftProtoBobDown::i#0 ← (unumber)(number) $17 +Inlining cast *((const byte*) PROTO_BOB+(unumber)(number) $30 + (byte) shiftProtoBobDown::i#3) ← (unumber)(number) 0 +Inlining cast *((const byte*) PROTO_BOB + (unumber)(number) 0) ← (unumber)(number) 0 +Inlining cast *((const byte*) PROTO_BOB + (unumber)(number) $18) ← (unumber)(number) 0 +Inlining cast *((const byte*) PROTO_BOB + (unumber)(number) $30) ← (unumber)(number) 0 +Inlining cast (byte) bobCharsetFindOrAddGlyph::glyph_id#0 ← (unumber)(number) 0 +Inlining cast (byte) bobCharsetFindOrAddGlyph::found#0 ← (unumber)(number) 1 +Inlining cast (byte) bobCharsetFindOrAddGlyph::i#0 ← (unumber)(number) 0 +Inlining cast (byte) bobCharsetFindOrAddGlyph::i1#0 ← (unumber)(number) 0 +Inlining cast (byte) bobCharsetFindOrAddGlyph::found#1 ← (unumber)(number) 0 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 53266 +Simplifying constant pointer cast (byte*) 53280 +Simplifying constant pointer cast (byte*) 53272 +Simplifying constant pointer cast (byte*) 56576 +Simplifying constant pointer cast (byte*) 56578 +Simplifying constant pointer cast (byte*) 16384 +Simplifying constant pointer cast (byte*) 24576 +Simplifying constant integer cast 0 +Simplifying constant integer cast 3 +Simplifying constant integer cast $40 +Simplifying constant integer cast 3 +Simplifying constant integer cast $3fff +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast $f +Simplifying constant integer cast 0 +Simplifying constant integer cast $3e8 +Simplifying constant integer cast 0 +Simplifying constant integer cast $49 +Simplifying constant integer cast $ff +Simplifying constant integer cast $f +Simplifying constant integer cast $b +Simplifying constant integer cast $16 +Simplifying constant integer cast $1e +Simplifying constant integer cast $28 +Simplifying constant integer cast 7 +Simplifying constant integer cast 3 +Simplifying constant integer cast (unumber)(number) 0*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast (unumber)(number) 1*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 1 +Simplifying constant integer cast $28 +Simplifying constant integer cast (unumber)(number) 2*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 2 +Simplifying constant integer cast $50 +Simplifying constant integer cast (unumber)(number) 3*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 3 +Simplifying constant integer cast 1 +Simplifying constant integer cast (unumber)(number) 4*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 4 +Simplifying constant integer cast $29 +Simplifying constant integer cast (unumber)(number) 5*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 5 +Simplifying constant integer cast $51 +Simplifying constant integer cast (unumber)(number) 6*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 6 +Simplifying constant integer cast 2 +Simplifying constant integer cast (unumber)(number) 7*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 7 +Simplifying constant integer cast $2a +Simplifying constant integer cast (unumber)(number) 8*(const byte) BOB_SUBTABLE_SIZE +Simplifying constant integer cast 8 +Simplifying constant integer cast $52 +Simplifying constant integer cast 0 +Simplifying constant integer cast $30 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 9 +Simplifying constant integer cast 8 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast $30 +Simplifying constant integer cast $2f +Simplifying constant integer cast $18 +Simplifying constant integer cast $17 +Simplifying constant integer cast 0 +Simplifying constant integer cast $17 +Simplifying constant integer cast $2f +Simplifying constant integer cast $18 +Simplifying constant integer cast 0 +Simplifying constant integer cast $30 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $18 +Simplifying constant integer cast 0 +Simplifying constant integer cast $30 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 8 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (word) $3fff +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $f +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $3e8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $49 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) $f +Finalized unsigned number type (byte) $b +Finalized unsigned number type (byte) $16 +Finalized unsigned number type (byte) $1e +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $28 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $50 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $29 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) $51 +Finalized unsigned number type (byte) 6 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) $2a +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $52 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $30 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 9 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $30 +Finalized unsigned number type (byte) $2f +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) $17 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $17 +Finalized unsigned number type (byte) $2f +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $30 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $30 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$2 ← (byte~) main::vicSelectGfxBank1_toDd001_$1 / (byte) $40 +Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$3 ← (byte) 3 ^ (byte~) main::vicSelectGfxBank1_toDd001_$2 +Inferred type updated to word in (unumber~) main::toD0181_$1 ← (word~) main::toD0181_$0 & (word) $3fff +Inferred type updated to word in (unumber~) main::toD0181_$2 ← (word~) main::toD0181_$1 * (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$3 ← > (word~) main::toD0181_$2 +Inferred type updated to byte in (unumber~) main::toD0181_$6 ← (byte~) main::toD0181_$5 / (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$7 ← (byte~) main::toD0181_$6 & (byte) $f +Inferred type updated to byte in (unumber~) main::toD0181_$8 ← (byte~) main::toD0181_$3 | (byte~) main::toD0181_$7 +Inferred type updated to word in (unumber~) renderBob::$3 ← (word~) renderBob::$2 * (byte) $28 +Inferred type updated to byte in (unumber~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 +Inferred type updated to byte in (unumber~) renderBob::$7 ← (byte~) renderBob::$6 * (const byte) BOB_SHIFTS_X +Inferred type updated to byte in (unumber~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 +Inferred type updated to byte in (unumber~) renderBob::$9 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 +Inferred type updated to byte in (unumber~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 +Inversing boolean not [2] (bool~) memset::$1 ← (word) memset::num#1 <= (byte) 0 from [1] (bool~) memset::$0 ← (word) memset::num#1 > (byte) 0 +Inversing boolean not [225] (bool~) bobCharsetFindOrAddGlyph::$3 ← *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 + (byte) bobCharsetFindOrAddGlyph::i#3) == *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 + (byte) bobCharsetFindOrAddGlyph::i#3) from [224] (bool~) bobCharsetFindOrAddGlyph::$2 ← *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 + (byte) bobCharsetFindOrAddGlyph::i#3) != *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 + (byte) bobCharsetFindOrAddGlyph::i#3) +Inversing boolean not [233] (bool~) bobCharsetFindOrAddGlyph::$4 ← (byte) 0 == (byte) bobCharsetFindOrAddGlyph::found#2 from [232] (bool~) bobCharsetFindOrAddGlyph::$6 ← (byte) 0 != (byte) bobCharsetFindOrAddGlyph::found#2 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (void*) memset::return#0 = (void*) memset::str#1 (void*) memset::return#3 (void*) memset::return#1 +Alias (void*) memset::str#2 = (void*) memset::str#3 +Alias (word) memset::num#1 = (word) memset::num#2 +Alias (byte) memset::c#3 = (byte) memset::c#4 +Alias (byte*) memset::end#0 = (byte*~) memset::$3 +Alias (byte) memset::c#1 = (byte) memset::c#2 +Alias (byte*) memset::dst#2 = (byte*) memset::dst#3 +Alias (byte*) memset::end#1 = (byte*) memset::end#2 +Alias (void*) memset::str#4 = (void*) memset::str#5 +Alias (byte) bob_charset_next_id#0 = (byte) bob_charset_next_id#10 (byte) bob_charset_next_id#58 (byte) bob_charset_next_id#57 (byte) bob_charset_next_id#56 (byte) bob_charset_next_id#54 (byte) bob_charset_next_id#51 (byte) bob_charset_next_id#47 (byte) bob_charset_next_id#41 (byte) bob_charset_next_id#35 (byte) bob_charset_next_id#28 +Alias (byte*) main::vicSelectGfxBank1_gfx#0 = (byte*) main::vicSelectGfxBank1_gfx#1 (byte*) main::vicSelectGfxBank1_toDd001_gfx#0 (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 +Alias (byte) main::vicSelectGfxBank1_toDd001_return#0 = (byte~) main::vicSelectGfxBank1_toDd001_$3 (byte) main::vicSelectGfxBank1_toDd001_return#2 (byte) main::vicSelectGfxBank1_toDd001_return#1 (byte) main::vicSelectGfxBank1_toDd001_return#3 (byte~) main::vicSelectGfxBank1_$0 +Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 +Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 +Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$2 +Alias (byte) main::sin_x_idx#2 = (byte) main::sin_x_idx#6 (byte) main::sin_x_idx#3 (byte) main::sin_x_idx#4 (byte) main::sin_x_idx#5 +Alias (byte) main::sin_y_idx#2 = (byte) main::sin_y_idx#6 (byte) main::sin_y_idx#3 (byte) main::sin_y_idx#4 (byte) main::sin_y_idx#5 +Alias (byte) bob_charset_next_id#29 = (byte) bob_charset_next_id#48 (byte) bob_charset_next_id#52 (byte) bob_charset_next_id#42 (byte) bob_charset_next_id#36 +Alias (byte) bob_charset_next_id#1 = (byte) bob_charset_next_id#11 (byte) bob_charset_next_id#20 +Alias (byte) renderBob::x_char_offset#0 = (byte~) renderBob::$0 +Alias (byte) renderBob::y_char_offset#0 = (byte~) renderBob::$1 +Alias (word) renderBob::y_offset#0 = (word~) renderBob::$3 +Alias (byte*) renderBob::screen#0 = (byte*~) renderBob::$5 +Alias (byte) renderBob::bob_table_idx#0 = (byte~) renderBob::$9 +Alias (byte) bob_charset_next_id#12 = (byte) bob_charset_next_id#3 +Alias (byte) prepareBobs::bob_table_idx#6 = (byte) prepareBobs::bob_table_idx#9 +Alias (byte) prepareBobs::shift_y#2 = (byte) prepareBobs::shift_y#6 +Alias (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#49 (byte) bob_charset_next_id#22 (byte) bob_charset_next_id#5 +Alias (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#2 (byte) prepareBobs::bob_table_idx#4 (byte) prepareBobs::bob_table_idx#13 +Alias (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#38 (byte) bob_charset_next_id#43 (byte) bob_charset_next_id#37 +Alias (byte) prepareBobs::shift_x#2 = (byte) prepareBobs::shift_x#8 +Alias (byte) prepareBobs::shift_y#12 = (byte) prepareBobs::shift_y#5 (byte) prepareBobs::shift_y#4 (byte) prepareBobs::shift_y#3 +Alias (byte*) prepareBobs::bob_table#0 = (byte*~) prepareBobs::$3 +Alias (byte*) prepareBobs::bob_glyph#2 = (byte*) prepareBobs::bob_glyph#4 (byte*) prepareBobs::bob_glyph#3 +Alias (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#31 (byte) bob_charset_next_id#55 (byte) bob_charset_next_id#53 (byte) bob_charset_next_id#50 +Alias (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#3 (byte*) prepareBobs::bob_table#4 +Alias (byte) prepareBobs::cell#2 = (byte) prepareBobs::cell#4 (byte) prepareBobs::cell#3 +Alias (byte) prepareBobs::bob_table_idx#10 = (byte) prepareBobs::bob_table_idx#5 (byte) prepareBobs::bob_table_idx#8 (byte) prepareBobs::bob_table_idx#3 +Alias (byte) prepareBobs::shift_x#3 = (byte) prepareBobs::shift_x#9 (byte) prepareBobs::shift_x#6 (byte) prepareBobs::shift_x#7 (byte) prepareBobs::shift_x#5 (byte) prepareBobs::shift_x#4 +Alias (byte) prepareBobs::shift_y#10 = (byte) prepareBobs::shift_y#13 (byte) prepareBobs::shift_y#11 (byte) prepareBobs::shift_y#9 (byte) prepareBobs::shift_y#8 (byte) prepareBobs::shift_y#7 +Alias (byte) bobCharsetFindOrAddGlyph::return#1 = (byte) bobCharsetFindOrAddGlyph::return#5 +Alias (byte) bob_charset_next_id#13 = (byte) bob_charset_next_id#4 +Alias (byte) prepareBobs::bob_table_idx#1 = (byte) prepareBobs::bob_table_idx#11 (byte) prepareBobs::bob_table_idx#7 +Alias (byte) shiftProtoBobRight::j#3 = (byte) shiftProtoBobRight::j#7 (byte) shiftProtoBobRight::j#8 (byte) shiftProtoBobRight::j#9 +Alias (byte) shiftProtoBobRight::carry#3 = (byte) shiftProtoBobRight::carry#5 (byte) shiftProtoBobRight::carry#6 (byte) shiftProtoBobRight::carry#4 +Alias (byte) shiftProtoBobRight::i#2 = (byte) shiftProtoBobRight::i#9 (byte) shiftProtoBobRight::i#7 (byte) shiftProtoBobRight::i#8 +Alias (byte) shiftProtoBobRight::carry#1 = (byte) shiftProtoBobRight::new_carry#0 (byte~) shiftProtoBobRight::$4 (byte) shiftProtoBobRight::carry#9 (byte) shiftProtoBobRight::carry#8 +Alias (byte) shiftProtoBobRight::j#4 = (byte) shiftProtoBobRight::j#5 (byte) shiftProtoBobRight::j#6 +Alias (byte) shiftProtoBobRight::i#4 = (byte) shiftProtoBobRight::i#5 (byte) shiftProtoBobRight::i#6 +Alias (byte) shiftProtoBobDown::i#2 = (byte) shiftProtoBobDown::i#3 +Alias (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#8 (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#12 +Alias (byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#9 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#8 +Alias (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) bobCharsetFindOrAddGlyph::glyph_id#12 (byte) bobCharsetFindOrAddGlyph::glyph_id#2 +Alias (byte) bob_charset_next_id#15 = (byte) bob_charset_next_id#44 (byte) bob_charset_next_id#34 +Alias (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#10 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#2 (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#5 (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#9 +Alias (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) bobCharsetFindOrAddGlyph::i#3 (byte) bobCharsetFindOrAddGlyph::i#4 +Alias (byte*) bobCharsetFindOrAddGlyph::bob_glyph#13 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#2 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#4 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#7 +Alias (byte) bobCharsetFindOrAddGlyph::found#3 = (byte) bobCharsetFindOrAddGlyph::found#5 (byte) bobCharsetFindOrAddGlyph::found#4 +Alias (byte) bobCharsetFindOrAddGlyph::glyph_id#13 = (byte) bobCharsetFindOrAddGlyph::glyph_id#14 (byte) bobCharsetFindOrAddGlyph::glyph_id#9 (byte) bobCharsetFindOrAddGlyph::glyph_id#8 +Alias (byte) bob_charset_next_id#39 = (byte) bob_charset_next_id#46 (byte) bob_charset_next_id#40 (byte) bob_charset_next_id#45 +Alias (byte) bobCharsetFindOrAddGlyph::glyph_id#3 = (byte) bobCharsetFindOrAddGlyph::glyph_id#6 (byte) bobCharsetFindOrAddGlyph::glyph_id#4 (byte) bobCharsetFindOrAddGlyph::return#2 +Alias (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#3 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#6 +Alias (byte) bob_charset_next_id#24 = (byte) bob_charset_next_id#32 (byte) bob_charset_next_id#25 +Alias (byte*) bobCharsetFindOrAddGlyph::bob_glyph#11 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#12 +Alias (byte) bobCharsetFindOrAddGlyph::return#3 = (byte) bobCharsetFindOrAddGlyph::return#6 +Alias (byte) bob_charset_next_id#16 = (byte) bob_charset_next_id#7 +Alias (byte*) bobCharsetFindOrAddGlyph::bob_glyph#3 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#5 +Alias (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) bobCharsetFindOrAddGlyph::i1#3 +Alias (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#4 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#7 +Alias (byte) bob_charset_next_id#17 = (byte) bob_charset_next_id#33 (byte) bob_charset_next_id#26 +Alias (byte) bobCharsetFindOrAddGlyph::glyph_id#10 = (byte) bobCharsetFindOrAddGlyph::glyph_id#7 (byte) bobCharsetFindOrAddGlyph::glyph_id#5 (byte) bobCharsetFindOrAddGlyph::return#4 +Alias (byte) bob_charset_next_id#27 = (byte) bob_charset_next_id#6 +Alias (byte) bob_charset_next_id#18 = (byte) bob_charset_next_id#9 +Successful SSA optimization Pass2AliasElimination +Alias (byte) shiftProtoBobRight::j#3 = (byte) shiftProtoBobRight::j#4 +Alias (byte) shiftProtoBobRight::carry#2 = (byte) shiftProtoBobRight::carry#3 +Alias (byte) shiftProtoBobRight::i#2 = (byte) shiftProtoBobRight::i#4 (byte) shiftProtoBobRight::i#3 +Alias (byte) shiftProtoBobRight::carry#1 = (byte) shiftProtoBobRight::carry#7 +Alias (byte) bobCharsetFindOrAddGlyph::glyph_id#13 = (byte) bobCharsetFindOrAddGlyph::glyph_id#3 +Alias (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#10 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#3 +Alias (byte) bob_charset_next_id#24 = (byte) bob_charset_next_id#39 +Alias (byte*) bobCharsetFindOrAddGlyph::bob_glyph#11 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#13 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (word) memset::num#1 (word) memset::num#0 +Identical Phi Values (void*) memset::str#2 (void*) memset::str#0 +Identical Phi Values (byte) memset::c#3 (byte) memset::c#0 +Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 +Identical Phi Values (void*) memset::str#4 (void*) memset::str#2 +Identical Phi Values (byte) memset::c#1 (byte) memset::c#3 +Identical Phi Values (byte) bob_charset_next_id#19 (byte) bob_charset_next_id#27 +Identical Phi Values (byte) bob_charset_next_id#0 (byte) bob_charset_next_id#14 +Identical Phi Values (byte) main::sin_x_idx#2 (byte) main::sin_x_idx#7 +Identical Phi Values (byte) main::sin_y_idx#2 (byte) main::sin_y_idx#7 +Identical Phi Values (byte) bob_charset_next_id#29 (byte) bob_charset_next_id#1 +Identical Phi Values (byte) bob_charset_next_id#12 (byte) bob_charset_next_id#16 +Identical Phi Values (byte) prepareBobs::bob_table_idx#10 (byte) prepareBobs::bob_table_idx#12 +Identical Phi Values (byte) prepareBobs::shift_x#3 (byte) prepareBobs::shift_x#2 +Identical Phi Values (byte) prepareBobs::shift_y#10 (byte) prepareBobs::shift_y#12 +Identical Phi Values (byte) bob_charset_next_id#13 (byte) bob_charset_next_id#16 +Identical Phi Values (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#10 (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 +Identical Phi Values (byte*) bobCharsetFindOrAddGlyph::bob_glyph#11 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 +Identical Phi Values (byte) bobCharsetFindOrAddGlyph::found#3 (byte) bobCharsetFindOrAddGlyph::found#0 +Identical Phi Values (byte) bobCharsetFindOrAddGlyph::glyph_id#13 (byte) bobCharsetFindOrAddGlyph::glyph_id#11 +Identical Phi Values (byte) bob_charset_next_id#24 (byte) bob_charset_next_id#15 +Identical Phi Values (byte*) bobCharsetFindOrAddGlyph::bob_glyph#3 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 +Identical Phi Values (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#4 (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 +Identical Phi Values (byte) bob_charset_next_id#17 (byte) bob_charset_next_id#15 +Identical Phi Values (byte) bobCharsetFindOrAddGlyph::glyph_id#10 (byte) bobCharsetFindOrAddGlyph::glyph_id#11 +Identical Phi Values (byte) bob_charset_next_id#18 (byte) bob_charset_next_id#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 +Identical Phi Values (byte) bob_charset_next_id#1 (byte) bob_charset_next_id#14 +Identical Phi Values (byte) prepareBobs::shift_y#12 (byte) prepareBobs::shift_y#2 +Identical Phi Values (byte) bob_charset_next_id#15 (byte) bob_charset_next_id#23 +Identical Phi Values (byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 +Identical Phi Values (byte) bobCharsetFindOrAddGlyph::return#3 (byte) bobCharsetFindOrAddGlyph::glyph_id#11 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) main::$4 [70] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) prepareBobs::$1 [127] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 +Simple Condition (bool~) prepareBobs::$2 [132] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@5 +Simple Condition (bool~) prepareBobs::$4 [144] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@8 +Simple Condition (bool~) shiftProtoBobRight::$0 [171] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 +Simple Condition (bool~) shiftProtoBobRight::$8 [175] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@4 +Simple Condition (bool~) shiftProtoBobRight::$7 [187] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@7 +Simple Condition (bool~) shiftProtoBobDown::$0 [198] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$0 [214] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$1 [222] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@5 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$3 [226] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@7 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$4 [234] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@16 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$5 [246] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@21 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) main::vicSelectGfxBank1_gfx#0 = SCREEN +Constant (const byte*) main::toD0181_screen#0 = SCREEN +Constant (const byte*) main::toD0181_gfx#0 = BOB_CHARSET +Constant (const void*) memset::str#0 = (void*)SCREEN +Constant (const byte) memset::c#0 = 0 +Constant (const word) memset::num#0 = $3e8 +Constant (const byte) main::sin_x_idx#0 = 0 +Constant (const byte) main::sin_y_idx#0 = $49 +Constant (const byte) bob_charset_next_id#2 = 0 +Constant (const byte*) bobCharsetFindOrAddGlyph::bob_glyph#0 = PROTO_BOB+$30 +Constant (const byte) prepareBobs::bob_table_idx#0 = 0 +Constant (const byte) prepareBobs::shift_y#0 = 0 +Constant (const byte) prepareBobs::shift_x#0 = 0 +Constant (const byte*) prepareBobs::bob_glyph#0 = PROTO_BOB +Constant (const byte) prepareBobs::cell#0 = 0 +Constant (const byte) shiftProtoBobRight::carry#0 = 0 +Constant (const byte) shiftProtoBobRight::j#0 = 0 +Constant (const byte) shiftProtoBobRight::i#0 = 0 +Constant (const byte) shiftProtoBobRight::$3 = $80 +Constant (const byte) shiftProtoBobRight::$2 = 0 +Constant (const byte) shiftProtoBobDown::i#0 = $17 +Constant (const byte) bob_charset_next_id#27 = 0 +Constant (const byte*) bobCharsetFindOrAddGlyph::glyph_cursor#0 = BOB_CHARSET +Constant (const byte) bobCharsetFindOrAddGlyph::glyph_id#0 = 0 +Constant (const byte) bobCharsetFindOrAddGlyph::found#0 = 1 +Constant (const byte) bobCharsetFindOrAddGlyph::i#0 = 0 +Constant (const byte) bobCharsetFindOrAddGlyph::i1#0 = 0 +Constant (const byte) bobCharsetFindOrAddGlyph::found#1 = 0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte*) memset::$2 = (byte*)memset::str#0 +Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 +Constant (const word) main::vicSelectGfxBank1_toDd001_$0 = (word)main::vicSelectGfxBank1_gfx#0 +Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 +Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 +Constant (const void*) memset::return#2 = memset::str#0 +Successful SSA optimization Pass2ConstantIdentification +if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [67] if(true) goto main::@4 +Successful SSA optimization Pass2ConstantIfs +Simplifying constant evaluating to zero (byte) 0*(const byte) BOB_SUBTABLE_SIZE in [107] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero BOB_TABLES in [107] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0 + (byte) renderBob::bob_table_idx#0) +Simplifying expression containing zero renderBob::screen#0 in [107] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) +Simplifying expression containing zero PROTO_BOB in [204] *((const byte*) PROTO_BOB + (byte) 0) ← (byte) 0 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused variable (byte) bobCharsetFindOrAddGlyph::return#0 and assignment [59] (byte) bobCharsetFindOrAddGlyph::return#0 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11 +Eliminating unused constant (const void*) memset::return#2 +Eliminating unused constant (const byte) bob_charset_next_id#27 +Successful SSA optimization PassNEliminateUnusedVars +Removing unused block main::@return +Successful SSA optimization Pass2EliminateUnusedBlocks +Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 +Constant right-side identified [8] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 +Constant right-side identified [12] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [15] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 +Constant (const byte) main::vicSelectGfxBank1_toDd001_$1 = >main::vicSelectGfxBank1_toDd001_$0 +Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff +Constant (const byte) main::toD0181_$5 = >main::toD0181_$4 +Successful SSA optimization Pass2ConstantIdentification +Simplifying constant evaluating to zero (const word) main::toD0181_$0&(word) $3fff in +Successful SSA optimization PassNSimplifyConstantZero +Eliminating unused constant (const word) main::toD0181_$0 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const byte*) main::toD0181_screen#0 +Successful SSA optimization PassNEliminateUnusedVars +Constant right-side identified [7] (byte~) main::vicSelectGfxBank1_toDd001_$2 ← (const byte) main::vicSelectGfxBank1_toDd001_$1 / (byte) $40 +Constant right-side identified [10] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 +Constant right-side identified [12] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::vicSelectGfxBank1_toDd001_$2 = main::vicSelectGfxBank1_toDd001_$1/$40 +Constant (const word) main::toD0181_$2 = main::toD0181_$1*4 +Constant (const byte) main::toD0181_$6 = main::toD0181_$5/4 +Successful SSA optimization Pass2ConstantIdentification +Simplifying constant evaluating to zero (const word) main::toD0181_$1*(byte) 4 in +Successful SSA optimization PassNSimplifyConstantZero +Eliminating unused constant (const word) main::toD0181_$1 +Successful SSA optimization PassNEliminateUnusedVars +Constant right-side identified [7] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2 +Constant right-side identified [9] (byte~) main::toD0181_$3 ← > (const word) main::toD0181_$2 +Constant right-side identified [10] (byte~) main::toD0181_$7 ← (const byte) main::toD0181_$6 & (byte) $f +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::vicSelectGfxBank1_toDd001_return#0 = 3^main::vicSelectGfxBank1_toDd001_$2 +Constant (const byte) main::toD0181_$3 = >main::toD0181_$2 +Constant (const byte) main::toD0181_$7 = main::toD0181_$6&$f +Successful SSA optimization Pass2ConstantIdentification +Simplifying constant evaluating to zero >(const word) main::toD0181_$2 in +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero main::toD0181_$7 in [11] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused constant (const word) main::toD0181_$2 +Eliminating unused constant (const byte) main::toD0181_$3 +Successful SSA optimization PassNEliminateUnusedVars +Constant (const byte) main::toD0181_return#0 = main::toD0181_$7 +Successful SSA optimization Pass2ConstantIdentification +Rewriting division to use shift [26] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 / (const byte) BOB_SHIFTS_X +Rewriting division to use shift [27] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 / (const byte) BOB_SHIFTS_Y +Rewriting multiplication to use shift and addition[29] (word) renderBob::y_offset#0 ← (word~) renderBob::$2 * (byte) $28 +Rewriting multiplication to use shift [33] (byte~) renderBob::$7 ← (byte~) renderBob::$6 * (const byte) BOB_SHIFTS_X +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings (const byte*) memset::dst#0 +Inlining constant with var siblings (const byte) main::sin_x_idx#0 +Inlining constant with var siblings (const byte) main::sin_y_idx#0 +Inlining constant with var siblings (const byte) prepareBobs::bob_table_idx#0 +Inlining constant with var siblings (const byte) prepareBobs::shift_y#0 +Inlining constant with var siblings (const byte) prepareBobs::shift_x#0 +Inlining constant with var siblings (const byte*) prepareBobs::bob_glyph#0 +Inlining constant with var siblings (const byte) prepareBobs::cell#0 +Inlining constant with var siblings (const byte) shiftProtoBobRight::carry#0 +Inlining constant with var siblings (const byte) shiftProtoBobRight::j#0 +Inlining constant with var siblings (const byte) shiftProtoBobRight::i#0 +Inlining constant with var siblings (const byte) shiftProtoBobDown::i#0 +Inlining constant with var siblings (const byte*) bobCharsetFindOrAddGlyph::bob_glyph#0 +Inlining constant with var siblings (const byte*) bobCharsetFindOrAddGlyph::glyph_cursor#0 +Inlining constant with var siblings (const byte) bobCharsetFindOrAddGlyph::glyph_id#0 +Inlining constant with var siblings (const byte) bobCharsetFindOrAddGlyph::found#0 +Inlining constant with var siblings (const byte) bobCharsetFindOrAddGlyph::i#0 +Inlining constant with var siblings (const byte) bobCharsetFindOrAddGlyph::i1#0 +Inlining constant with var siblings (const byte) bobCharsetFindOrAddGlyph::found#1 +Inlining constant with var siblings (const byte) bob_charset_next_id#2 +Constant inlined main::toD0181_gfx#0 = (const byte*) BOB_CHARSET +Constant inlined bobCharsetFindOrAddGlyph::glyph_cursor#0 = (const byte*) BOB_CHARSET +Constant inlined prepareBobs::bob_table_idx#0 = (byte) 0 +Constant inlined shiftProtoBobRight::i#0 = (byte) 0 +Constant inlined shiftProtoBobRight::j#0 = (byte) 0 +Constant inlined main::sin_x_idx#0 = (byte) 0 +Constant inlined bobCharsetFindOrAddGlyph::found#1 = (byte) 0 +Constant inlined bobCharsetFindOrAddGlyph::found#0 = (byte) 1 +Constant inlined bobCharsetFindOrAddGlyph::i#0 = (byte) 0 +Constant inlined bobCharsetFindOrAddGlyph::glyph_id#0 = (byte) 0 +Constant inlined memset::$2 = (byte*)(const void*) memset::str#0 +Constant inlined bob_charset_next_id#2 = (byte) 0 +Constant inlined prepareBobs::bob_glyph#0 = (const byte*) PROTO_BOB +Constant inlined shiftProtoBobRight::$2 = (byte) 0 +Constant inlined shiftProtoBobDown::i#0 = (byte) $17 +Constant inlined shiftProtoBobRight::$3 = (byte) $80 +Constant inlined prepareBobs::shift_y#0 = (byte) 0 +Constant inlined main::toD0181_$7 = >(word)(const byte*) BOB_CHARSET/(byte) 4&(byte) $f +Constant inlined prepareBobs::shift_x#0 = (byte) 0 +Constant inlined shiftProtoBobRight::carry#0 = (byte) 0 +Constant inlined main::vicSelectGfxBank1_toDd001_$0 = (word)(const byte*) SCREEN +Constant inlined main::toD0181_$6 = >(word)(const byte*) BOB_CHARSET/(byte) 4 +Constant inlined main::toD0181_$5 = >(word)(const byte*) BOB_CHARSET +Constant inlined main::toD0181_$4 = (word)(const byte*) BOB_CHARSET +Constant inlined main::vicSelectGfxBank1_toDd001_$2 = >(word)(const byte*) SCREEN/(byte) $40 +Constant inlined main::vicSelectGfxBank1_toDd001_$1 = >(word)(const byte*) SCREEN +Constant inlined main::sin_y_idx#0 = (byte) $49 +Constant inlined bobCharsetFindOrAddGlyph::bob_glyph#0 = (const byte*) PROTO_BOB+(byte) $30 +Constant inlined prepareBobs::cell#0 = (byte) 0 +Constant inlined main::vicSelectGfxBank1_gfx#0 = (const byte*) SCREEN +Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0 +Constant inlined bobCharsetFindOrAddGlyph::i1#0 = (byte) 0 +Successful SSA optimization Pass2ConstantInlining +Consolidated array index constant in *(PROTO_BOB+$18) +Consolidated array index constant in *(PROTO_BOB+$30) +Successful SSA optimization Pass2ConstantAdditionElimination +Alias (word) renderBob::y_offset#0 = (word~) renderBob::$12 +Successful SSA optimization Pass2AliasElimination +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @13 +Adding NOP phi() at start of @14 +Adding NOP phi() at start of @15 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@11 +Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001 +Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001_@return +Adding NOP phi() at start of main::@9 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::toD0181_@return +Adding NOP phi() at start of main::@12 +Adding NOP phi() at start of memset +Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of memset::@1 +Adding NOP phi() at start of prepareBobs +Adding NOP phi() at start of prepareBobs::@6 +Adding NOP phi() at start of prepareBobs::@22 +Adding NOP phi() at start of bobCharsetFindOrAddGlyph::@3 +Adding NOP phi() at start of bobCharsetFindOrAddGlyph::@2 +Adding NOP phi() at start of bobCharsetFindOrAddGlyph::@11 +Adding NOP phi() at start of shiftProtoBobRight +Adding NOP phi() at start of shiftProtoBobRight::@5 +Adding NOP phi() at start of shiftProtoBobRight::@4 +Adding NOP phi() at start of shiftProtoBobDown +CALL GRAPH +Calls in [] to main:3 +Calls in [main] to prepareBobs:7 memset:17 renderBob:26 renderBob:31 renderBob:36 +Calls in [prepareBobs] to bobCharsetFindOrAddGlyph:75 shiftProtoBobDown:85 shiftProtoBobRight:96 shiftProtoBobRight:98 bobCharsetFindOrAddGlyph:106 + +Created 29 initial phi equivalence classes +Coalesced [24] renderBob::xpos#6 ← renderBob::xpos#0 +Coalesced [25] renderBob::ypos#6 ← renderBob::ypos#0 +Coalesced [29] renderBob::xpos#4 ← renderBob::xpos#1 +Coalesced [30] renderBob::ypos#4 ← renderBob::ypos#1 +Coalesced [34] renderBob::xpos#5 ← renderBob::xpos#2 +Coalesced [35] renderBob::ypos#5 ← renderBob::ypos#2 +Coalesced [40] main::sin_x_idx#8 ← main::sin_x_idx#1 +Coalesced [41] main::sin_y_idx#8 ← main::sin_y_idx#1 +Coalesced [73] memset::dst#4 ← memset::dst#1 +Coalesced [76] bob_charset_next_id#59 ← bob_charset_next_id#16 +Coalesced [80] prepareBobs::bob_table_idx#15 ← prepareBobs::bob_table_idx#6 +Coalesced [81] bob_charset_next_id#61 ← bob_charset_next_id#14 +Coalesced [87] prepareBobs::shift_y#14 ← prepareBobs::shift_y#1 +Coalesced (already) [88] bob_charset_next_id#60 ← bob_charset_next_id#30 +Coalesced (already) [89] prepareBobs::bob_table_idx#14 ← prepareBobs::bob_table_idx#12 +Coalesced [91] bob_charset_next_id#64 ← bob_charset_next_id#30 +Coalesced [92] prepareBobs::bob_table#6 ← prepareBobs::bob_table#0 +Coalesced [100] prepareBobs::shift_x#10 ← prepareBobs::shift_x#1 +Coalesced [101] prepareBobs::bob_table_idx#16 ← prepareBobs::bob_table_idx#1 +Coalesced (already) [102] bob_charset_next_id#62 ← bob_charset_next_id#21 +Coalesced [104] bob_charset_next_id#65 ← bob_charset_next_id#21 +Coalesced [105] bobCharsetFindOrAddGlyph::bob_glyph#14 ← bobCharsetFindOrAddGlyph::bob_glyph#1 +Coalesced [113] prepareBobs::cell#5 ← prepareBobs::cell#1 +Coalesced [114] prepareBobs::bob_glyph#5 ← prepareBobs::bob_glyph#1 +Coalesced (already) [115] bob_charset_next_id#63 ← bob_charset_next_id#16 +Coalesced [116] prepareBobs::bob_table#5 ← prepareBobs::bob_table#1 +Coalesced [124] bob_charset_next_id#67 ← bob_charset_next_id#8 +Coalesced [129] bobCharsetFindOrAddGlyph::i1#4 ← bobCharsetFindOrAddGlyph::i1#1 +Coalesced (already) [135] bob_charset_next_id#66 ← bob_charset_next_id#23 +Coalesced [138] bobCharsetFindOrAddGlyph::glyph_id#15 ← bobCharsetFindOrAddGlyph::glyph_id#1 +Coalesced [139] bobCharsetFindOrAddGlyph::glyph_cursor#13 ← bobCharsetFindOrAddGlyph::glyph_cursor#1 +Coalesced [143] bobCharsetFindOrAddGlyph::i#5 ← bobCharsetFindOrAddGlyph::i#1 +Coalesced [157] shiftProtoBobRight::j#12 ← shiftProtoBobRight::j#2 +Coalesced [160] shiftProtoBobRight::i#10 ← shiftProtoBobRight::i#1 +Coalesced [161] shiftProtoBobRight::j#11 ← shiftProtoBobRight::j#10 +Not coalescing [162] shiftProtoBobRight::carry#10 ← shiftProtoBobRight::carry#1 +Coalesced [164] shiftProtoBobRight::j#13 ← shiftProtoBobRight::j#1 +Coalesced [177] shiftProtoBobDown::i#4 ← shiftProtoBobDown::i#1 +Coalesced down to 23 phi equivalence classes +Culled Empty Block (label) @13 +Culled Empty Block (label) @15 +Culled Empty Block (label) main::@11 +Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@return +Culled Empty Block (label) main::@9 +Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) main::@12 +Culled Empty Block (label) memset::@2 +Culled Empty Block (label) memset::@1 +Culled Empty Block (label) prepareBobs::@19 +Culled Empty Block (label) prepareBobs::@2 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@3 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@2 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@14 +Culled Empty Block (label) bobCharsetFindOrAddGlyph::@11 +Culled Empty Block (label) shiftProtoBobRight::@5 +Renumbering block @14 to @1 +Renumbering block memset::@4 to memset::@1 +Renumbering block memset::@5 to memset::@2 +Renumbering block main::@4 to main::@2 +Renumbering block main::@5 to main::@3 +Renumbering block main::@10 to main::@4 +Renumbering block main::@13 to main::@5 +Renumbering block main::@14 to main::@6 +Renumbering block main::@15 to main::@7 +Renumbering block prepareBobs::@4 to prepareBobs::@2 +Renumbering block prepareBobs::@5 to prepareBobs::@3 +Renumbering block prepareBobs::@6 to prepareBobs::@4 +Renumbering block prepareBobs::@7 to prepareBobs::@5 +Renumbering block prepareBobs::@8 to prepareBobs::@6 +Renumbering block prepareBobs::@9 to prepareBobs::@7 +Renumbering block prepareBobs::@20 to prepareBobs::@8 +Renumbering block prepareBobs::@21 to prepareBobs::@9 +Renumbering block prepareBobs::@22 to prepareBobs::@10 +Renumbering block prepareBobs::@23 to prepareBobs::@11 +Renumbering block shiftProtoBobRight::@4 to shiftProtoBobRight::@3 +Renumbering block shiftProtoBobRight::@6 to shiftProtoBobRight::@4 +Renumbering block shiftProtoBobRight::@7 to shiftProtoBobRight::@5 +Renumbering block shiftProtoBobRight::@8 to shiftProtoBobRight::@6 +Renumbering block shiftProtoBobRight::@13 to shiftProtoBobRight::@7 +Renumbering block bobCharsetFindOrAddGlyph::@4 to bobCharsetFindOrAddGlyph::@2 +Renumbering block bobCharsetFindOrAddGlyph::@5 to bobCharsetFindOrAddGlyph::@3 +Renumbering block bobCharsetFindOrAddGlyph::@7 to bobCharsetFindOrAddGlyph::@4 +Renumbering block bobCharsetFindOrAddGlyph::@8 to bobCharsetFindOrAddGlyph::@5 +Renumbering block bobCharsetFindOrAddGlyph::@16 to bobCharsetFindOrAddGlyph::@6 +Renumbering block bobCharsetFindOrAddGlyph::@20 to bobCharsetFindOrAddGlyph::@7 +Renumbering block bobCharsetFindOrAddGlyph::@21 to bobCharsetFindOrAddGlyph::@8 +Renumbering block bobCharsetFindOrAddGlyph::@22 to bobCharsetFindOrAddGlyph::@9 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of memset +Adding NOP phi() at start of prepareBobs +Adding NOP phi() at start of prepareBobs::@4 +Adding NOP phi() at start of prepareBobs::@10 +Adding NOP phi() at start of shiftProtoBobRight +Adding NOP phi() at start of shiftProtoBobRight::@3 +Adding NOP phi() at start of shiftProtoBobDown + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() + +(void()) main() +main: scope:[main] from @1 + [4] phi() + [5] call prepareBobs + to:main::vicSelectGfxBank1 +main::vicSelectGfxBank1: scope:[main] from main + [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 + to:main::vicSelectGfxBank1_toDd001 +main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1 + [7] phi() + to:main::vicSelectGfxBank1_@1 +main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001 + [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 + to:main::toD0181 +main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1 + [9] phi() + to:main::@4 +main::@4: scope:[main] from main::toD0181 + [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 + [11] call memset + to:main::@1 +main::@1: scope:[main] from main::@4 main::@7 + [12] (byte) main::sin_y_idx#7 ← phi( main::@4/(byte) $49 main::@7/(byte) main::sin_y_idx#1 ) + [12] (byte) main::sin_x_idx#7 ← phi( main::@4/(byte) 0 main::@7/(byte) main::sin_x_idx#1 ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 + [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 + [14] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + [15] (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#7) + [16] (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#7) + [17] call renderBob + to:main::@5 +main::@5: scope:[main] from main::@3 + [18] (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(byte) $f + (byte) main::sin_x_idx#7) + [19] (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(byte) $b + (byte) main::sin_y_idx#7) + [20] call renderBob + to:main::@6 +main::@6: scope:[main] from main::@5 + [21] (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(byte) $16 + (byte) main::sin_x_idx#7) + [22] (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(byte) $1e + (byte) main::sin_y_idx#7) + [23] call renderBob + to:main::@7 +main::@7: scope:[main] from main::@6 + [24] (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#7 + [25] (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#7 + [26] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) + to:main::@1 + +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +renderBob: scope:[renderBob] from main::@3 main::@5 main::@6 + [27] (byte) renderBob::ypos#3 ← phi( main::@5/(byte) renderBob::ypos#1 main::@6/(byte) renderBob::ypos#2 main::@3/(byte) renderBob::ypos#0 ) + [27] (byte) renderBob::xpos#3 ← phi( main::@5/(byte) renderBob::xpos#1 main::@6/(byte) renderBob::xpos#2 main::@3/(byte) renderBob::xpos#0 ) + [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 + [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 + [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 + [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 + [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 + [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 + [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 + [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 + [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 + [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 + [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 + [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 + [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) + [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) + to:renderBob::@return +renderBob::@return: scope:[renderBob] from renderBob + [49] return + to:@return + +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +memset: scope:[memset] from main::@4 + [50] phi() + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@2 + [51] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 ) + [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 + [53] return + to:@return +memset::@2: scope:[memset] from memset::@1 + [54] *((byte*) memset::dst#2) ← (const byte) memset::c#0 + [55] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + to:memset::@1 + +(void()) prepareBobs() +prepareBobs: scope:[prepareBobs] from main + [56] phi() + [57] call bobCharsetFindOrAddGlyph + to:prepareBobs::@1 +prepareBobs::@1: scope:[prepareBobs] from prepareBobs prepareBobs::@8 + [58] (byte) prepareBobs::bob_table_idx#6 ← phi( prepareBobs/(byte) 0 prepareBobs::@8/(byte) prepareBobs::bob_table_idx#12 ) + [58] (byte) bob_charset_next_id#14 ← phi( prepareBobs/(byte) bob_charset_next_id#16 prepareBobs::@8/(byte) bob_charset_next_id#30 ) + [58] (byte) prepareBobs::shift_y#2 ← phi( prepareBobs/(byte) 0 prepareBobs::@8/(byte) prepareBobs::shift_y#1 ) + [59] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 + to:prepareBobs::@return +prepareBobs::@return: scope:[prepareBobs] from prepareBobs::@1 + [60] return + to:@return +prepareBobs::@2: scope:[prepareBobs] from prepareBobs::@1 prepareBobs::@11 + [61] (byte) bob_charset_next_id#30 ← phi( prepareBobs::@1/(byte) bob_charset_next_id#14 prepareBobs::@11/(byte) bob_charset_next_id#21 ) + [61] (byte) prepareBobs::bob_table_idx#12 ← phi( prepareBobs::@1/(byte) prepareBobs::bob_table_idx#6 prepareBobs::@11/(byte) prepareBobs::bob_table_idx#1 ) + [61] (byte) prepareBobs::shift_x#2 ← phi( prepareBobs::@1/(byte) 0 prepareBobs::@11/(byte) prepareBobs::shift_x#1 ) + [62] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@3 + to:prepareBobs::@4 +prepareBobs::@4: scope:[prepareBobs] from prepareBobs::@2 + [63] phi() + [64] call shiftProtoBobDown + to:prepareBobs::@8 +prepareBobs::@8: scope:[prepareBobs] from prepareBobs::@4 + [65] (byte) prepareBobs::shift_y#1 ← ++ (byte) prepareBobs::shift_y#2 + to:prepareBobs::@1 +prepareBobs::@3: scope:[prepareBobs] from prepareBobs::@2 + [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 + to:prepareBobs::@5 +prepareBobs::@5: scope:[prepareBobs] from prepareBobs::@3 prepareBobs::@9 + [67] (byte*) prepareBobs::bob_table#2 ← phi( prepareBobs::@9/(byte*) prepareBobs::bob_table#1 prepareBobs::@3/(byte*) prepareBobs::bob_table#0 ) + [67] (byte) bob_charset_next_id#21 ← phi( prepareBobs::@9/(byte) bob_charset_next_id#16 prepareBobs::@3/(byte) bob_charset_next_id#30 ) + [67] (byte*) prepareBobs::bob_glyph#2 ← phi( prepareBobs::@9/(byte*) prepareBobs::bob_glyph#1 prepareBobs::@3/(const byte*) PROTO_BOB ) + [67] (byte) prepareBobs::cell#2 ← phi( prepareBobs::@9/(byte) prepareBobs::cell#1 prepareBobs::@3/(byte) 0 ) + [68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6 + to:prepareBobs::@7 +prepareBobs::@7: scope:[prepareBobs] from prepareBobs::@5 + [69] (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#12 + [70] call shiftProtoBobRight + to:prepareBobs::@10 +prepareBobs::@10: scope:[prepareBobs] from prepareBobs::@7 + [71] phi() + [72] call shiftProtoBobRight + to:prepareBobs::@11 +prepareBobs::@11: scope:[prepareBobs] from prepareBobs::@10 + [73] (byte) prepareBobs::shift_x#1 ← ++ (byte) prepareBobs::shift_x#2 + to:prepareBobs::@2 +prepareBobs::@6: scope:[prepareBobs] from prepareBobs::@5 + [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + [75] call bobCharsetFindOrAddGlyph + [76] (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11 + to:prepareBobs::@9 +prepareBobs::@9: scope:[prepareBobs] from prepareBobs::@6 + [77] (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#1 + [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 + [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 + [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y + [81] (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#2 + to:prepareBobs::@5 + +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +bobCharsetFindOrAddGlyph: scope:[bobCharsetFindOrAddGlyph] from prepareBobs prepareBobs::@6 + [82] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 ← phi( prepareBobs/(const byte*) PROTO_BOB+(byte) $30 prepareBobs::@6/(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ) + [82] (byte) bob_charset_next_id#23 ← phi( prepareBobs/(byte) 0 prepareBobs::@6/(byte) bob_charset_next_id#21 ) + to:bobCharsetFindOrAddGlyph::@1 +bobCharsetFindOrAddGlyph::@1: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph bobCharsetFindOrAddGlyph::@6 + [83] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 ← phi( bobCharsetFindOrAddGlyph/(const byte*) BOB_CHARSET bobCharsetFindOrAddGlyph::@6/(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ) + [83] (byte) bobCharsetFindOrAddGlyph::glyph_id#11 ← phi( bobCharsetFindOrAddGlyph/(byte) 0 bobCharsetFindOrAddGlyph::@6/(byte) bobCharsetFindOrAddGlyph::glyph_id#1 ) + [84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 + to:bobCharsetFindOrAddGlyph::@7 +bobCharsetFindOrAddGlyph::@7: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 bobCharsetFindOrAddGlyph::@8 + [85] (byte) bobCharsetFindOrAddGlyph::i1#2 ← phi( bobCharsetFindOrAddGlyph::@8/(byte) bobCharsetFindOrAddGlyph::i1#1 bobCharsetFindOrAddGlyph::@1/(byte) 0 ) + [86] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@8 + to:bobCharsetFindOrAddGlyph::@9 +bobCharsetFindOrAddGlyph::@9: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@7 + [87] (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#23 + to:bobCharsetFindOrAddGlyph::@return +bobCharsetFindOrAddGlyph::@return: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 bobCharsetFindOrAddGlyph::@9 + [88] (byte) bob_charset_next_id#16 ← phi( bobCharsetFindOrAddGlyph::@5/(byte) bob_charset_next_id#23 bobCharsetFindOrAddGlyph::@9/(byte) bob_charset_next_id#8 ) + [89] return + to:@return +bobCharsetFindOrAddGlyph::@8: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@7 + [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) + [91] (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#2 + to:bobCharsetFindOrAddGlyph::@7 +bobCharsetFindOrAddGlyph::@2: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@1 bobCharsetFindOrAddGlyph::@4 + [92] (byte) bobCharsetFindOrAddGlyph::i#2 ← phi( bobCharsetFindOrAddGlyph::@1/(byte) 0 bobCharsetFindOrAddGlyph::@4/(byte) bobCharsetFindOrAddGlyph::i#1 ) + [93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3 + to:bobCharsetFindOrAddGlyph::@5 +bobCharsetFindOrAddGlyph::@3: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2 + [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 + to:bobCharsetFindOrAddGlyph::@5 +bobCharsetFindOrAddGlyph::@5: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@2 bobCharsetFindOrAddGlyph::@3 + [95] (byte) bobCharsetFindOrAddGlyph::found#2 ← phi( bobCharsetFindOrAddGlyph::@3/(byte) 0 bobCharsetFindOrAddGlyph::@2/(byte) 1 ) + [96] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@6 + to:bobCharsetFindOrAddGlyph::@return +bobCharsetFindOrAddGlyph::@6: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@5 + [97] (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#11 + [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 + to:bobCharsetFindOrAddGlyph::@1 +bobCharsetFindOrAddGlyph::@4: scope:[bobCharsetFindOrAddGlyph] from bobCharsetFindOrAddGlyph::@3 + [99] (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#2 + to:bobCharsetFindOrAddGlyph::@2 + +(void()) shiftProtoBobRight() +shiftProtoBobRight: scope:[shiftProtoBobRight] from prepareBobs::@10 prepareBobs::@7 + [100] phi() + to:shiftProtoBobRight::@1 +shiftProtoBobRight::@1: scope:[shiftProtoBobRight] from shiftProtoBobRight shiftProtoBobRight::@6 + [101] (byte) shiftProtoBobRight::carry#2 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::carry#10 ) + [101] (byte) shiftProtoBobRight::j#3 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::j#10 ) + [101] (byte) shiftProtoBobRight::i#2 ← phi( shiftProtoBobRight/(byte) 0 shiftProtoBobRight::@6/(byte) shiftProtoBobRight::i#1 ) + [102] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 + to:shiftProtoBobRight::@return +shiftProtoBobRight::@return: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1 + [103] return + to:@return +shiftProtoBobRight::@2: scope:[shiftProtoBobRight] from shiftProtoBobRight::@1 + [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 + [105] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@3 + to:shiftProtoBobRight::@4 +shiftProtoBobRight::@3: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 + [106] phi() + to:shiftProtoBobRight::@4 +shiftProtoBobRight::@4: scope:[shiftProtoBobRight] from shiftProtoBobRight::@2 shiftProtoBobRight::@3 + [107] (byte) shiftProtoBobRight::carry#1 ← phi( shiftProtoBobRight::@3/(byte) $80 shiftProtoBobRight::@2/(byte) 0 ) + [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 + [109] (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2 + [110] *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) ← (byte~) shiftProtoBobRight::$6 + [111] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@5 + to:shiftProtoBobRight::@7 +shiftProtoBobRight::@7: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4 + [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 + to:shiftProtoBobRight::@6 +shiftProtoBobRight::@6: scope:[shiftProtoBobRight] from shiftProtoBobRight::@5 shiftProtoBobRight::@7 + [113] (byte) shiftProtoBobRight::j#10 ← phi( shiftProtoBobRight::@7/(byte) shiftProtoBobRight::j#2 shiftProtoBobRight::@5/(byte) shiftProtoBobRight::j#1 ) + [114] (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#2 + [115] (byte) shiftProtoBobRight::carry#10 ← (byte) shiftProtoBobRight::carry#1 + to:shiftProtoBobRight::@1 +shiftProtoBobRight::@5: scope:[shiftProtoBobRight] from shiftProtoBobRight::@4 + [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f + to:shiftProtoBobRight::@6 + +(void()) shiftProtoBobDown() +shiftProtoBobDown: scope:[shiftProtoBobDown] from prepareBobs::@4 + [117] phi() + to:shiftProtoBobDown::@1 +shiftProtoBobDown::@1: scope:[shiftProtoBobDown] from shiftProtoBobDown shiftProtoBobDown::@2 + [118] (byte) shiftProtoBobDown::i#2 ← phi( shiftProtoBobDown/(byte) $17 shiftProtoBobDown::@2/(byte) shiftProtoBobDown::i#1 ) + [119] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 + to:shiftProtoBobDown::@3 +shiftProtoBobDown::@3: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1 + [120] *((const byte*) PROTO_BOB) ← (byte) 0 + [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 + [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 + to:shiftProtoBobDown::@return +shiftProtoBobDown::@return: scope:[shiftProtoBobDown] from shiftProtoBobDown::@3 + [123] return + to:@return +shiftProtoBobDown::@2: scope:[shiftProtoBobDown] from shiftProtoBobDown::@1 + [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) + [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) + [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 + [127] (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#2 + to:shiftProtoBobDown::@1 + + +VARIABLE REGISTER WEIGHTS +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +(byte*) bobCharsetFindOrAddGlyph::bob_glyph +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 2002.0 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 7400.200000000001 +(byte) bobCharsetFindOrAddGlyph::found +(byte) bobCharsetFindOrAddGlyph::found#2 10001.0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 20002.0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 10000.307692307691 +(byte) bobCharsetFindOrAddGlyph::glyph_id +(byte) bobCharsetFindOrAddGlyph::glyph_id#1 10001.0 +(byte) bobCharsetFindOrAddGlyph::glyph_id#11 1937.75 +(byte) bobCharsetFindOrAddGlyph::i +(byte) bobCharsetFindOrAddGlyph::i#1 200002.0 +(byte) bobCharsetFindOrAddGlyph::i#2 166668.3333333333 +(byte) bobCharsetFindOrAddGlyph::i1 +(byte) bobCharsetFindOrAddGlyph::i1#1 20002.0 +(byte) bobCharsetFindOrAddGlyph::i1#2 16668.333333333332 +(byte) bobCharsetFindOrAddGlyph::return +(byte) bobCharsetFindOrAddGlyph::return#1 2002.0 +(byte) bob_charset_next_id +(byte) bob_charset_next_id#14 12.0 +(byte) bob_charset_next_id#16 1100.6000000000001 +(byte) bob_charset_next_id#21 275.5 +(byte) bob_charset_next_id#23 1400.3333333333335 +(byte) bob_charset_next_id#30 37.33333333333333 +(byte) bob_charset_next_id#8 4.0 +(void()) main() +(byte) main::sin_x_idx +(byte) main::sin_x_idx#1 7.333333333333333 +(byte) main::sin_x_idx#7 4.583333333333333 +(byte) main::sin_y_idx +(byte) main::sin_y_idx#1 11.0 +(byte) main::sin_y_idx#7 4.230769230769231 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(byte*) main::toD0181_screen +(byte*) main::vicSelectGfxBank1_gfx +(byte*) main::vicSelectGfxBank1_toDd001_gfx +(byte) main::vicSelectGfxBank1_toDd001_return +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(byte) memset::c +(byte*) memset::dst +(byte*) memset::dst#1 22.0 +(byte*) memset::dst#2 14.666666666666666 +(byte*) memset::end +(word) memset::num +(void*) memset::return +(void*) memset::str +(void()) prepareBobs() +(byte~) prepareBobs::$5 2002.0 +(byte*) prepareBobs::bob_glyph +(byte*) prepareBobs::bob_glyph#1 667.3333333333334 +(byte*) prepareBobs::bob_glyph#2 429.0 +(byte*) prepareBobs::bob_table +(byte*) prepareBobs::bob_table#0 202.0 +(byte*) prepareBobs::bob_table#1 1001.0 +(byte*) prepareBobs::bob_table#2 388.0 +(byte) prepareBobs::bob_table_idx +(byte) prepareBobs::bob_table_idx#1 40.4 +(byte) prepareBobs::bob_table_idx#12 20.3125 +(byte) prepareBobs::bob_table_idx#6 11.0 +(byte) prepareBobs::cell +(byte) prepareBobs::cell#1 2002.0 +(byte) prepareBobs::cell#2 333.6666666666667 +(byte) prepareBobs::shift_x +(byte) prepareBobs::shift_x#1 202.0 +(byte) prepareBobs::shift_x#2 17.823529411764707 +(byte) prepareBobs::shift_y +(byte) prepareBobs::shift_y#1 22.0 +(byte) prepareBobs::shift_y#2 1.5 +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +(word~) renderBob::$10 4.0 +(word~) renderBob::$11 4.0 +(word~) renderBob::$2 3.0 +(byte*~) renderBob::$4 4.0 +(byte~) renderBob::$6 4.0 +(byte~) renderBob::$7 2.0 +(byte~) renderBob::$8 4.0 +(byte) renderBob::bob_table_idx +(byte) renderBob::bob_table_idx#0 2.2222222222222228 +(byte*) renderBob::screen +(byte*) renderBob::screen#0 1.5384615384615383 +(byte) renderBob::x_char_offset +(byte) renderBob::x_char_offset#0 0.5714285714285714 +(byte) renderBob::xpos +(byte) renderBob::xpos#0 11.0 +(byte) renderBob::xpos#1 11.0 +(byte) renderBob::xpos#2 11.0 +(byte) renderBob::xpos#3 3.3636363636363633 +(byte) renderBob::y_char_offset +(byte) renderBob::y_char_offset#0 2.0 +(word) renderBob::y_offset +(word) renderBob::y_offset#0 4.0 +(byte) renderBob::ypos +(byte) renderBob::ypos#0 22.0 +(byte) renderBob::ypos#1 22.0 +(byte) renderBob::ypos#2 22.0 +(byte) renderBob::ypos#3 4.111111111111112 +(void()) shiftProtoBobDown() +(byte) shiftProtoBobDown::i +(byte) shiftProtoBobDown::i#1 202.0 +(byte) shiftProtoBobDown::i#2 161.6 +(void()) shiftProtoBobRight() +(byte~) shiftProtoBobRight::$1 2002.0 +(byte~) shiftProtoBobRight::$5 2002.0 +(byte~) shiftProtoBobRight::$6 2002.0 +(byte) shiftProtoBobRight::carry +(byte) shiftProtoBobRight::carry#1 111.22222222222223 +(byte) shiftProtoBobRight::carry#10 2002.0 +(byte) shiftProtoBobRight::carry#2 286.0 +(byte) shiftProtoBobRight::i +(byte) shiftProtoBobRight::i#1 1001.0 +(byte) shiftProtoBobRight::i#2 231.0 +(byte) shiftProtoBobRight::j +(byte) shiftProtoBobRight::j#1 2002.0 +(byte) shiftProtoBobRight::j#10 1001.0 +(byte) shiftProtoBobRight::j#2 2002.0 +(byte) shiftProtoBobRight::j#3 700.7 +(byte) shiftProtoBobRight::new_carry + +Initial phi equivalence classes +[ main::sin_x_idx#7 main::sin_x_idx#1 ] +[ main::sin_y_idx#7 main::sin_y_idx#1 ] +[ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +[ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] +[ memset::dst#2 memset::dst#1 ] +[ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +[ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +[ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +[ prepareBobs::cell#2 prepareBobs::cell#1 ] +[ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] +[ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] +[ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +[ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] +[ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +[ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] +[ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +[ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +[ bobCharsetFindOrAddGlyph::found#2 ] +[ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] +[ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] +[ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] +[ shiftProtoBobRight::carry#1 ] +[ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +Added variable renderBob::x_char_offset#0 to zero page equivalence class [ renderBob::x_char_offset#0 ] +Added variable renderBob::y_char_offset#0 to zero page equivalence class [ renderBob::y_char_offset#0 ] +Added variable renderBob::$2 to zero page equivalence class [ renderBob::$2 ] +Added variable renderBob::$10 to zero page equivalence class [ renderBob::$10 ] +Added variable renderBob::$11 to zero page equivalence class [ renderBob::$11 ] +Added variable renderBob::y_offset#0 to zero page equivalence class [ renderBob::y_offset#0 ] +Added variable renderBob::$4 to zero page equivalence class [ renderBob::$4 ] +Added variable renderBob::screen#0 to zero page equivalence class [ renderBob::screen#0 ] +Added variable renderBob::$6 to zero page equivalence class [ renderBob::$6 ] +Added variable renderBob::$7 to zero page equivalence class [ renderBob::$7 ] +Added variable renderBob::$8 to zero page equivalence class [ renderBob::$8 ] +Added variable renderBob::bob_table_idx#0 to zero page equivalence class [ renderBob::bob_table_idx#0 ] +Added variable bobCharsetFindOrAddGlyph::return#1 to zero page equivalence class [ bobCharsetFindOrAddGlyph::return#1 ] +Added variable prepareBobs::$5 to zero page equivalence class [ prepareBobs::$5 ] +Added variable shiftProtoBobRight::$1 to zero page equivalence class [ shiftProtoBobRight::$1 ] +Added variable shiftProtoBobRight::$5 to zero page equivalence class [ shiftProtoBobRight::$5 ] +Added variable shiftProtoBobRight::$6 to zero page equivalence class [ shiftProtoBobRight::$6 ] +Complete equivalence classes +[ main::sin_x_idx#7 main::sin_x_idx#1 ] +[ main::sin_y_idx#7 main::sin_y_idx#1 ] +[ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +[ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] +[ memset::dst#2 memset::dst#1 ] +[ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +[ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +[ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +[ prepareBobs::cell#2 prepareBobs::cell#1 ] +[ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] +[ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] +[ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +[ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] +[ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +[ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] +[ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +[ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +[ bobCharsetFindOrAddGlyph::found#2 ] +[ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] +[ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] +[ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] +[ shiftProtoBobRight::carry#1 ] +[ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +[ renderBob::x_char_offset#0 ] +[ renderBob::y_char_offset#0 ] +[ renderBob::$2 ] +[ renderBob::$10 ] +[ renderBob::$11 ] +[ renderBob::y_offset#0 ] +[ renderBob::$4 ] +[ renderBob::screen#0 ] +[ renderBob::$6 ] +[ renderBob::$7 ] +[ renderBob::$8 ] +[ renderBob::bob_table_idx#0 ] +[ bobCharsetFindOrAddGlyph::return#1 ] +[ prepareBobs::$5 ] +[ shiftProtoBobRight::$1 ] +[ shiftProtoBobRight::$5 ] +[ shiftProtoBobRight::$6 ] +Allocated zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] +Allocated zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] +Allocated zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +Allocated zp[1]:5 [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] +Allocated zp[2]:6 [ memset::dst#2 memset::dst#1 ] +Allocated zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Allocated zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +Allocated zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +Allocated zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] +Allocated zp[2]:12 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] +Allocated zp[2]:14 [ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] +Allocated zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Allocated zp[2]:17 [ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] +Allocated zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Allocated zp[2]:20 [ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] +Allocated zp[1]:22 [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +Allocated zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Allocated zp[1]:24 [ bobCharsetFindOrAddGlyph::found#2 ] +Allocated zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] +Allocated zp[1]:26 [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] +Allocated zp[1]:27 [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] +Allocated zp[1]:28 [ shiftProtoBobRight::carry#1 ] +Allocated zp[1]:29 [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +Allocated zp[1]:30 [ renderBob::x_char_offset#0 ] +Allocated zp[1]:31 [ renderBob::y_char_offset#0 ] +Allocated zp[2]:32 [ renderBob::$2 ] +Allocated zp[2]:34 [ renderBob::$10 ] +Allocated zp[2]:36 [ renderBob::$11 ] +Allocated zp[2]:38 [ renderBob::y_offset#0 ] +Allocated zp[2]:40 [ renderBob::$4 ] +Allocated zp[2]:42 [ renderBob::screen#0 ] +Allocated zp[1]:44 [ renderBob::$6 ] +Allocated zp[1]:45 [ renderBob::$7 ] +Allocated zp[1]:46 [ renderBob::$8 ] +Allocated zp[1]:47 [ renderBob::bob_table_idx#0 ] +Allocated zp[1]:48 [ bobCharsetFindOrAddGlyph::return#1 ] +Allocated zp[1]:49 [ prepareBobs::$5 ] +Allocated zp[1]:50 [ shiftProtoBobRight::$1 ] +Allocated zp[1]:51 [ shiftProtoBobRight::$5 ] +Allocated zp[1]:52 [ shiftProtoBobRight::$6 ] + +INITIAL ASM +Target platform is c64basic / MOS6502X + // File Comments +// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations) + // Upstart +.pc = $801 "Basic" +:BasicUpstart(__bbegin) +.pc = $80d "Program" + // Global Constants & labels + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label D018 = $d018 + // CIA#2 Port A: Serial bus, RS-232, VIC memory bank + .label CIA2_PORT_A = $dd00 + // CIA #2 Port A data direction register. + .label CIA2_PORT_A_DDR = $dd02 + // The screen + .label SCREEN = $4000 + // The charset that will receive the shifted bobs + .label BOB_CHARSET = $6000 + // The number of different X-shifts + .const BOB_SHIFTS_X = 4 + // The number of different Y-shifts + .const BOB_SHIFTS_Y = 8 + // The size of a sub-table of BOB_TABLES + .const BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y + // BOB charset ID of the next glyph to be added + .label bob_charset_next_id = $10 + // @begin +__bbegin: + // [1] phi from @begin to @1 [phi:@begin->@1] +__b1_from___bbegin: + jmp __b1 + // @1 +__b1: + // [2] call main + // [4] phi from @1 to main [phi:@1->main] +main_from___b1: + jsr main + // [3] phi from @1 to @end [phi:@1->@end] +__bend_from___b1: + jmp __bend + // @end +__bend: + // main +main: { + .const vicSelectGfxBank1_toDd001_return = 3^(>SCREEN)/$40 + .const toD0181_return = (>BOB_CHARSET)/4&$f + /* + // Display some BOBs + char* screen = SCREEN; + char bob_table_idx = 0; + for(char i:0..7) { + for(char j:0..3) { + screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen += 120; + bob_table_idx++; + } + screen -= (120*4)-3; + } + */ + .label sin_x_idx = 2 + .label sin_y_idx = 3 + // [5] call prepareBobs + // [56] phi from main to prepareBobs [phi:main->prepareBobs] + prepareBobs_from_main: + jsr prepareBobs + jmp vicSelectGfxBank1 + // main::vicSelectGfxBank1 + vicSelectGfxBank1: + // [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 + lda #3 + sta CIA2_PORT_A_DDR + // [7] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001] + vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: + jmp vicSelectGfxBank1_toDd001 + // main::vicSelectGfxBank1_toDd001 + vicSelectGfxBank1_toDd001: + jmp vicSelectGfxBank1___b1 + // main::vicSelectGfxBank1_@1 + vicSelectGfxBank1___b1: + // [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + lda #vicSelectGfxBank1_toDd001_return + sta CIA2_PORT_A + // [9] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181] + toD0181_from_vicSelectGfxBank1___b1: + jmp toD0181 + // main::toD0181 + toD0181: + jmp __b4 + // main::@4 + __b4: + // [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + // [11] call memset + // [50] phi from main::@4 to memset [phi:main::@4->memset] + memset_from___b4: + jsr memset + // [12] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + __b1_from___b4: + // [12] phi (byte) main::sin_y_idx#7 = (byte) $49 [phi:main::@4->main::@1#0] -- vbuz1=vbuc1 + lda #$49 + sta.z sin_y_idx + // [12] phi (byte) main::sin_x_idx#7 = (byte) 0 [phi:main::@4->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z sin_x_idx + jmp __b1 + // main::@1 + __b1: + jmp __b2 + // main::@2 + __b2: + // [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda #$ff + cmp RASTER + bne __b2 + jmp __b3 + // main::@3 + __b3: + // [14] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDERCOL + // [15] (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB,y + sta.z renderBob.xpos + // [16] (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_y_idx + lda SIN_Y_TAB,y + sta.z renderBob.ypos + // [17] call renderBob + // [27] phi from main::@3 to renderBob [phi:main::@3->renderBob] + renderBob_from___b3: + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#0 [phi:main::@3->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#0 [phi:main::@3->renderBob#1] -- register_copy + jsr renderBob + jmp __b5 + // main::@5 + __b5: + // [18] (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(byte) $f + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB+$f,y + sta.z renderBob.xpos + // [19] (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(byte) $b + (byte) main::sin_y_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_y_idx + lda SIN_Y_TAB+$b,y + sta.z renderBob.ypos + // [20] call renderBob + // [27] phi from main::@5 to renderBob [phi:main::@5->renderBob] + renderBob_from___b5: + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#1 [phi:main::@5->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#1 [phi:main::@5->renderBob#1] -- register_copy + jsr renderBob + jmp __b6 + // main::@6 + __b6: + // [21] (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(byte) $16 + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB+$16,y + sta.z renderBob.xpos + // [22] (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(byte) $1e + (byte) main::sin_y_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_y_idx + lda SIN_Y_TAB+$1e,y + sta.z renderBob.ypos + // [23] call renderBob + // [27] phi from main::@6 to renderBob [phi:main::@6->renderBob] + renderBob_from___b6: + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#2 [phi:main::@6->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#2 [phi:main::@6->renderBob#1] -- register_copy + jsr renderBob + jmp __b7 + // main::@7 + __b7: + // [24] (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#7 -- vbuz1=_inc_vbuz1 + inc.z sin_x_idx + // [25] (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#7 -- vbuz1=_inc_vbuz1 + inc.z sin_y_idx + // [26] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDERCOL + // [12] phi from main::@7 to main::@1 [phi:main::@7->main::@1] + __b1_from___b7: + // [12] phi (byte) main::sin_y_idx#7 = (byte) main::sin_y_idx#1 [phi:main::@7->main::@1#0] -- register_copy + // [12] phi (byte) main::sin_x_idx#7 = (byte) main::sin_x_idx#1 [phi:main::@7->main::@1#1] -- register_copy + jmp __b1 +} + // renderBob +// Render a single BOB at a given x/y-position +// X-position is 0-151. Each x-position is 2 pixels wide. +// Y-position is 0-183. Each y-position is 1 pixel high. +// renderBob(byte zeropage(4) xpos, byte zeropage(5) ypos) +renderBob: { + .label __2 = $20 + .label __4 = $28 + .label __6 = $2c + .label __7 = $2d + .label __8 = $2e + .label xpos = 4 + .label ypos = 5 + .label x_char_offset = $1e + .label y_char_offset = $1f + .label y_offset = $26 + .label screen = $2a + .label bob_table_idx = $2f + .label __10 = $22 + .label __11 = $24 + // [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 -- vbuz1=vbuz2_ror_2 + lda.z xpos + lsr + lsr + sta.z x_char_offset + // [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 -- vbuz1=vbuz2_ror_3 + lda.z ypos + lsr + lsr + lsr + sta.z y_char_offset + // [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 -- vwuz1=_word_vbuz2 + lda.z y_char_offset + sta.z __2 + lda #0 + sta.z __2+1 + // [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 -- vwuz1=vwuz2_rol_2 + lda.z __2 + asl + sta.z __10 + lda.z __2+1 + rol + sta.z __10+1 + asl.z __10 + rol.z __10+1 + // [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 -- vwuz1=vwuz2_plus_vwuz3 + lda.z __10 + clc + adc.z __2 + sta.z __11 + lda.z __10+1 + adc.z __2+1 + sta.z __11+1 + // [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda.z __11 + asl + sta.z y_offset + lda.z __11+1 + rol + sta.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + // [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 -- pbuz1=pbuc1_plus_vwuz2 + lda.z y_offset + clc + adc #SCREEN + sta.z __4+1 + // [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 -- pbuz1=pbuz2_plus_vbuz3 + lda.z x_char_offset + clc + adc.z __4 + sta.z screen + lda #0 + adc.z __4+1 + sta.z screen+1 + // [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + lda #7 + and.z ypos + sta.z __6 + // [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 -- vbuz1=vbuz2_rol_2 + lda.z __6 + asl + asl + sta.z __7 + // [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 + lda #3 + and.z xpos + sta.z __8 + // [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 -- vbuz1=vbuz2_plus_vbuz3 + lda.z __7 + clc + adc.z __8 + sta.z bob_table_idx + // [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES,y + ldy #0 + sta (screen),y + // [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,y + ldy #$28 + sta (screen),y + // [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,y + ldy #$50 + sta (screen),y + // [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,y + ldy #1 + sta (screen),y + // [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,y + ldy #$29 + sta (screen),y + // [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,y + ldy #$51 + sta (screen),y + // [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,y + ldy #2 + sta (screen),y + // [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,y + ldy #$2a + sta (screen),y + // [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 + ldy.z bob_table_idx + lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,y + ldy #$52 + sta (screen),y + jmp __breturn + // renderBob::@return + __breturn: + // [49] return + rts +} + // memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .label str = SCREEN + .const c = 0 + .const num = $3e8 + .label end = str+num + .label dst = 6 + // [51] phi from memset to memset::@1 [phi:memset->memset::@1] + __b1_from_memset: + // [51] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + lda #str + sta.z dst+1 + jmp __b1 + // memset::@1 + __b1: + // [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + lda.z dst+1 + cmp #>end + bne __b2 + lda.z dst + cmp #memset::@1] + __b1_from___b2: + // [51] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy + jmp __b1 +} + // prepareBobs +// Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES +// Modifies PROTO_BOB by shifting it around +prepareBobs: { + .label __5 = $31 + .label bob_table = $e + .label shift_y = 8 + // Populate charset and tables + .label bob_glyph = $c + .label cell = $b + .label bob_table_idx = 9 + .label shift_x = $a + // [57] call bobCharsetFindOrAddGlyph + // [82] phi from prepareBobs to bobCharsetFindOrAddGlyph [phi:prepareBobs->bobCharsetFindOrAddGlyph] + bobCharsetFindOrAddGlyph_from_prepareBobs: + // [82] phi (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 = (const byte*) PROTO_BOB+(byte) $30 [phi:prepareBobs->bobCharsetFindOrAddGlyph#0] -- pbuz1=pbuc1 + lda #PROTO_BOB+$30 + sta.z bobCharsetFindOrAddGlyph.bob_glyph+1 + // [82] phi (byte) bob_charset_next_id#23 = (byte) 0 [phi:prepareBobs->bobCharsetFindOrAddGlyph#1] -- vbuz1=vbuc1 + lda #0 + sta.z bob_charset_next_id + jsr bobCharsetFindOrAddGlyph + // [58] phi from prepareBobs to prepareBobs::@1 [phi:prepareBobs->prepareBobs::@1] + __b1_from_prepareBobs: + // [58] phi (byte) prepareBobs::bob_table_idx#6 = (byte) 0 [phi:prepareBobs->prepareBobs::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z bob_table_idx + // [58] phi (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#16 [phi:prepareBobs->prepareBobs::@1#1] -- register_copy + // [58] phi (byte) prepareBobs::shift_y#2 = (byte) 0 [phi:prepareBobs->prepareBobs::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z shift_y + jmp __b1 + // prepareBobs::@1 + __b1: + // [59] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z shift_y + cmp #BOB_SHIFTS_Y + bcc __b2_from___b1 + jmp __breturn + // prepareBobs::@return + __breturn: + // [60] return + rts + // [61] phi from prepareBobs::@1 to prepareBobs::@2 [phi:prepareBobs::@1->prepareBobs::@2] + __b2_from___b1: + // [61] phi (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#14 [phi:prepareBobs::@1->prepareBobs::@2#0] -- register_copy + // [61] phi (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#6 [phi:prepareBobs::@1->prepareBobs::@2#1] -- register_copy + // [61] phi (byte) prepareBobs::shift_x#2 = (byte) 0 [phi:prepareBobs::@1->prepareBobs::@2#2] -- vbuz1=vbuc1 + lda #0 + sta.z shift_x + jmp __b2 + // prepareBobs::@2 + __b2: + // [62] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z shift_x + cmp #BOB_SHIFTS_X + bcc __b3 + // [63] phi from prepareBobs::@2 to prepareBobs::@4 [phi:prepareBobs::@2->prepareBobs::@4] + __b4_from___b2: + jmp __b4 + // prepareBobs::@4 + __b4: + // [64] call shiftProtoBobDown + // [117] phi from prepareBobs::@4 to shiftProtoBobDown [phi:prepareBobs::@4->shiftProtoBobDown] + shiftProtoBobDown_from___b4: + jsr shiftProtoBobDown + jmp __b8 + // prepareBobs::@8 + __b8: + // [65] (byte) prepareBobs::shift_y#1 ← ++ (byte) prepareBobs::shift_y#2 -- vbuz1=_inc_vbuz1 + inc.z shift_y + // [58] phi from prepareBobs::@8 to prepareBobs::@1 [phi:prepareBobs::@8->prepareBobs::@1] + __b1_from___b8: + // [58] phi (byte) prepareBobs::bob_table_idx#6 = (byte) prepareBobs::bob_table_idx#12 [phi:prepareBobs::@8->prepareBobs::@1#0] -- register_copy + // [58] phi (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#30 [phi:prepareBobs::@8->prepareBobs::@1#1] -- register_copy + // [58] phi (byte) prepareBobs::shift_y#2 = (byte) prepareBobs::shift_y#1 [phi:prepareBobs::@8->prepareBobs::@1#2] -- register_copy + jmp __b1 + // prepareBobs::@3 + __b3: + // [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 -- pbuz1=pbuc1_plus_vbuz2 + lda.z bob_table_idx + clc + adc #BOB_TABLES + adc #0 + sta.z bob_table+1 + // [67] phi from prepareBobs::@3 to prepareBobs::@5 [phi:prepareBobs::@3->prepareBobs::@5] + __b5_from___b3: + // [67] phi (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#0 [phi:prepareBobs::@3->prepareBobs::@5#0] -- register_copy + // [67] phi (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#30 [phi:prepareBobs::@3->prepareBobs::@5#1] -- register_copy + // [67] phi (byte*) prepareBobs::bob_glyph#2 = (const byte*) PROTO_BOB [phi:prepareBobs::@3->prepareBobs::@5#2] -- pbuz1=pbuc1 + lda #PROTO_BOB + sta.z bob_glyph+1 + // [67] phi (byte) prepareBobs::cell#2 = (byte) 0 [phi:prepareBobs::@3->prepareBobs::@5#3] -- vbuz1=vbuc1 + lda #0 + sta.z cell + jmp __b5 + // prepareBobs::@5 + __b5: + // [68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6 -- vbuz1_lt_vbuc1_then_la1 + lda.z cell + cmp #9 + bcc __b6 + jmp __b7 + // prepareBobs::@7 + __b7: + // [69] (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#12 -- vbuz1=_inc_vbuz1 + inc.z bob_table_idx + // [70] call shiftProtoBobRight + // [100] phi from prepareBobs::@7 to shiftProtoBobRight [phi:prepareBobs::@7->shiftProtoBobRight] + shiftProtoBobRight_from___b7: + jsr shiftProtoBobRight + // [71] phi from prepareBobs::@7 to prepareBobs::@10 [phi:prepareBobs::@7->prepareBobs::@10] + __b10_from___b7: + jmp __b10 + // prepareBobs::@10 + __b10: + // [72] call shiftProtoBobRight + // [100] phi from prepareBobs::@10 to shiftProtoBobRight [phi:prepareBobs::@10->shiftProtoBobRight] + shiftProtoBobRight_from___b10: + jsr shiftProtoBobRight + jmp __b11 + // prepareBobs::@11 + __b11: + // [73] (byte) prepareBobs::shift_x#1 ← ++ (byte) prepareBobs::shift_x#2 -- vbuz1=_inc_vbuz1 + inc.z shift_x + // [61] phi from prepareBobs::@11 to prepareBobs::@2 [phi:prepareBobs::@11->prepareBobs::@2] + __b2_from___b11: + // [61] phi (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#21 [phi:prepareBobs::@11->prepareBobs::@2#0] -- register_copy + // [61] phi (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#1 [phi:prepareBobs::@11->prepareBobs::@2#1] -- register_copy + // [61] phi (byte) prepareBobs::shift_x#2 = (byte) prepareBobs::shift_x#1 [phi:prepareBobs::@11->prepareBobs::@2#2] -- register_copy + jmp __b2 + // prepareBobs::@6 + __b6: + // [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 -- pbuz1=pbuz2 + lda.z bob_glyph + sta.z bobCharsetFindOrAddGlyph.bob_glyph + lda.z bob_glyph+1 + sta.z bobCharsetFindOrAddGlyph.bob_glyph+1 + // [75] call bobCharsetFindOrAddGlyph + // [82] phi from prepareBobs::@6 to bobCharsetFindOrAddGlyph [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph] + bobCharsetFindOrAddGlyph_from___b6: + // [82] phi (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph#0] -- register_copy + // [82] phi (byte) bob_charset_next_id#23 = (byte) bob_charset_next_id#21 [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph#1] -- register_copy + jsr bobCharsetFindOrAddGlyph + // [76] (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11 -- vbuz1=vbuz2 + lda.z bobCharsetFindOrAddGlyph.glyph_id + sta.z bobCharsetFindOrAddGlyph.return + jmp __b9 + // prepareBobs::@9 + __b9: + // [77] (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#1 -- vbuz1=vbuz2 + lda.z bobCharsetFindOrAddGlyph.return + sta.z __5 + // [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 -- _deref_pbuz1=vbuz2 + // Look for an existing char in BOB_CHARSET + lda.z __5 + ldy #0 + sta (bob_table),y + // [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + // Move to the next glyph + lda #8 + clc + adc.z bob_glyph + sta.z bob_glyph + bcc !+ + inc.z bob_glyph+1 + !: + // [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y -- pbuz1=pbuz1_plus_vbuc1 + // Move to the next sub-table + lda #BOB_SHIFTS_X*BOB_SHIFTS_Y + clc + adc.z bob_table + sta.z bob_table + bcc !+ + inc.z bob_table+1 + !: + // [81] (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#2 -- vbuz1=_inc_vbuz1 + inc.z cell + // [67] phi from prepareBobs::@9 to prepareBobs::@5 [phi:prepareBobs::@9->prepareBobs::@5] + __b5_from___b9: + // [67] phi (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#1 [phi:prepareBobs::@9->prepareBobs::@5#0] -- register_copy + // [67] phi (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#16 [phi:prepareBobs::@9->prepareBobs::@5#1] -- register_copy + // [67] phi (byte*) prepareBobs::bob_glyph#2 = (byte*) prepareBobs::bob_glyph#1 [phi:prepareBobs::@9->prepareBobs::@5#2] -- register_copy + // [67] phi (byte) prepareBobs::cell#2 = (byte) prepareBobs::cell#1 [phi:prepareBobs::@9->prepareBobs::@5#3] -- register_copy + jmp __b5 +} + // bobCharsetFindOrAddGlyph +// Looks through BOB_CHARSET to find the passed bob glyph if present. +// If not present it is added +// Returns the glyph ID +// bobCharsetFindOrAddGlyph(byte* zeropage($11) bob_glyph) +bobCharsetFindOrAddGlyph: { + .label bob_glyph = $11 + .label return = $30 + .label i = $17 + .label glyph_id = $13 + .label glyph_cursor = $14 + .label i1 = $16 + .label found = $18 + // [83] phi from bobCharsetFindOrAddGlyph to bobCharsetFindOrAddGlyph::@1 [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1] + __b1_from_bobCharsetFindOrAddGlyph: + // [83] phi (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (const byte*) BOB_CHARSET [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1#0] -- pbuz1=pbuc1 + lda #BOB_CHARSET + sta.z glyph_cursor+1 + // [83] phi (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) 0 [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z glyph_id + jmp __b1 + // bobCharsetFindOrAddGlyph::@1 + __b1: + // [84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 -- vbuz1_neq_vbuz2_then_la1 + lda.z glyph_id + cmp.z bob_charset_next_id + bne __b2_from___b1 + // [85] phi from bobCharsetFindOrAddGlyph::@1 to bobCharsetFindOrAddGlyph::@7 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@7] + __b7_from___b1: + // [85] phi (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@7#0] -- vbuz1=vbuc1 + lda #0 + sta.z i1 + jmp __b7 + // Not found - add it + // bobCharsetFindOrAddGlyph::@7 + __b7: + // [86] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@8 -- vbuz1_lt_vbuc1_then_la1 + lda.z i1 + cmp #8 + bcc __b8 + jmp __b9 + // bobCharsetFindOrAddGlyph::@9 + __b9: + // [87] (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#23 -- vbuz1=_inc_vbuz1 + inc.z bob_charset_next_id + // [88] phi from bobCharsetFindOrAddGlyph::@5 bobCharsetFindOrAddGlyph::@9 to bobCharsetFindOrAddGlyph::@return [phi:bobCharsetFindOrAddGlyph::@5/bobCharsetFindOrAddGlyph::@9->bobCharsetFindOrAddGlyph::@return] + __breturn_from___b5: + __breturn_from___b9: + // [88] phi (byte) bob_charset_next_id#16 = (byte) bob_charset_next_id#23 [phi:bobCharsetFindOrAddGlyph::@5/bobCharsetFindOrAddGlyph::@9->bobCharsetFindOrAddGlyph::@return#0] -- register_copy + jmp __breturn + // bobCharsetFindOrAddGlyph::@return + __breturn: + // [89] return + rts + // bobCharsetFindOrAddGlyph::@8 + __b8: + // [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) -- pbuz1_derefidx_vbuz2=pbuz3_derefidx_vbuz2 + ldy.z i1 + lda (bob_glyph),y + ldy.z i1 + sta (glyph_cursor),y + // [91] (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#2 -- vbuz1=_inc_vbuz1 + inc.z i1 + // [85] phi from bobCharsetFindOrAddGlyph::@8 to bobCharsetFindOrAddGlyph::@7 [phi:bobCharsetFindOrAddGlyph::@8->bobCharsetFindOrAddGlyph::@7] + __b7_from___b8: + // [85] phi (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) bobCharsetFindOrAddGlyph::i1#1 [phi:bobCharsetFindOrAddGlyph::@8->bobCharsetFindOrAddGlyph::@7#0] -- register_copy + jmp __b7 + // [92] phi from bobCharsetFindOrAddGlyph::@1 to bobCharsetFindOrAddGlyph::@2 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@2] + __b2_from___b1: + // [92] phi (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b2 + // bobCharsetFindOrAddGlyph::@2 + __b2: + // [93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #8 + bcc __b3 + // [95] phi from bobCharsetFindOrAddGlyph::@2 to bobCharsetFindOrAddGlyph::@5 [phi:bobCharsetFindOrAddGlyph::@2->bobCharsetFindOrAddGlyph::@5] + __b5_from___b2: + // [95] phi (byte) bobCharsetFindOrAddGlyph::found#2 = (byte) 1 [phi:bobCharsetFindOrAddGlyph::@2->bobCharsetFindOrAddGlyph::@5#0] -- vbuz1=vbuc1 + lda #1 + sta.z found + jmp __b5 + // bobCharsetFindOrAddGlyph::@3 + __b3: + // [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 -- pbuz1_derefidx_vbuz2_eq_pbuz3_derefidx_vbuz2_then_la1 + ldy.z i + lda (glyph_cursor),y + tax + lda (bob_glyph),y + tay + sty.z $ff + cpx.z $ff + beq __b4 + // [95] phi from bobCharsetFindOrAddGlyph::@3 to bobCharsetFindOrAddGlyph::@5 [phi:bobCharsetFindOrAddGlyph::@3->bobCharsetFindOrAddGlyph::@5] + __b5_from___b3: + // [95] phi (byte) bobCharsetFindOrAddGlyph::found#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@3->bobCharsetFindOrAddGlyph::@5#0] -- vbuz1=vbuc1 + lda #0 + sta.z found + jmp __b5 + // bobCharsetFindOrAddGlyph::@5 + __b5: + // [96] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@6 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp.z found + beq __b6 + jmp __breturn_from___b5 + // bobCharsetFindOrAddGlyph::@6 + __b6: + // [97] (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#11 -- vbuz1=_inc_vbuz1 + inc.z glyph_id + // [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + lda #8 + clc + adc.z glyph_cursor + sta.z glyph_cursor + bcc !+ + inc.z glyph_cursor+1 + !: + // [83] phi from bobCharsetFindOrAddGlyph::@6 to bobCharsetFindOrAddGlyph::@1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1] + __b1_from___b6: + // [83] phi (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1#0] -- register_copy + // [83] phi (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) bobCharsetFindOrAddGlyph::glyph_id#1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1#1] -- register_copy + jmp __b1 + // bobCharsetFindOrAddGlyph::@4 + __b4: + // [99] (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [92] phi from bobCharsetFindOrAddGlyph::@4 to bobCharsetFindOrAddGlyph::@2 [phi:bobCharsetFindOrAddGlyph::@4->bobCharsetFindOrAddGlyph::@2] + __b2_from___b4: + // [92] phi (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) bobCharsetFindOrAddGlyph::i#1 [phi:bobCharsetFindOrAddGlyph::@4->bobCharsetFindOrAddGlyph::@2#0] -- register_copy + jmp __b2 +} + // shiftProtoBobRight +// Shift PROTO_BOB right one X pixel +shiftProtoBobRight: { + .label __1 = $32 + .label __5 = $33 + .label __6 = $34 + .label carry = $1c + .label j = $1a + .label i = $19 + .label carry_1 = $1b + // [101] phi from shiftProtoBobRight to shiftProtoBobRight::@1 [phi:shiftProtoBobRight->shiftProtoBobRight::@1] + __b1_from_shiftProtoBobRight: + // [101] phi (byte) shiftProtoBobRight::carry#2 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z carry_1 + // [101] phi (byte) shiftProtoBobRight::j#3 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z j + // [101] phi (byte) shiftProtoBobRight::i#2 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b1 + // shiftProtoBobRight::@1 + __b1: + // [102] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #3*3*8 + bcc __b2 + jmp __breturn + // shiftProtoBobRight::@return + __breturn: + // [103] return + rts + // shiftProtoBobRight::@2 + __b2: + // [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 -- vbuz1=pbuc1_derefidx_vbuz2_band_vbuc2 + lda #1 + ldy.z j + and PROTO_BOB,y + sta.z __1 + // [105] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@3 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z __1 + bne __b3_from___b2 + // [107] phi from shiftProtoBobRight::@2 to shiftProtoBobRight::@4 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@4] + __b4_from___b2: + // [107] phi (byte) shiftProtoBobRight::carry#1 = (byte) 0 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@4#0] -- vbuz1=vbuc1 + lda #0 + sta.z carry + jmp __b4 + // [106] phi from shiftProtoBobRight::@2 to shiftProtoBobRight::@3 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@3] + __b3_from___b2: + jmp __b3 + // shiftProtoBobRight::@3 + __b3: + // [107] phi from shiftProtoBobRight::@3 to shiftProtoBobRight::@4 [phi:shiftProtoBobRight::@3->shiftProtoBobRight::@4] + __b4_from___b3: + // [107] phi (byte) shiftProtoBobRight::carry#1 = (byte) $80 [phi:shiftProtoBobRight::@3->shiftProtoBobRight::@4#0] -- vbuz1=vbuc1 + lda #$80 + sta.z carry + jmp __b4 + // shiftProtoBobRight::@4 + __b4: + // [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 -- vbuz1=pbuc1_derefidx_vbuz2_ror_1 + ldy.z j + lda PROTO_BOB,y + lsr + sta.z __5 + // [109] (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2 -- vbuz1=vbuz2_bor_vbuz3 + lda.z __5 + ora.z carry_1 + sta.z __6 + // [110] *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) ← (byte~) shiftProtoBobRight::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + // Shift value and add old carry + lda.z __6 + ldy.z j + sta PROTO_BOB,y + // [111] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@5 -- vbuz1_ge_vbuc1_then_la1 + // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) + lda.z j + cmp #$30 + bcs __b5 + jmp __b7 + // shiftProtoBobRight::@7 + __b7: + // [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + lax.z j + axs #-[$18] + stx.z j + // [113] phi from shiftProtoBobRight::@5 shiftProtoBobRight::@7 to shiftProtoBobRight::@6 [phi:shiftProtoBobRight::@5/shiftProtoBobRight::@7->shiftProtoBobRight::@6] + __b6_from___b5: + __b6_from___b7: + // [113] phi (byte) shiftProtoBobRight::j#10 = (byte) shiftProtoBobRight::j#1 [phi:shiftProtoBobRight::@5/shiftProtoBobRight::@7->shiftProtoBobRight::@6#0] -- register_copy + jmp __b6 + // shiftProtoBobRight::@6 + __b6: + // [114] (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [115] (byte) shiftProtoBobRight::carry#10 ← (byte) shiftProtoBobRight::carry#1 -- vbuz1=vbuz2 + lda.z carry + sta.z carry_1 + // [101] phi from shiftProtoBobRight::@6 to shiftProtoBobRight::@1 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1] + __b1_from___b6: + // [101] phi (byte) shiftProtoBobRight::carry#2 = (byte) shiftProtoBobRight::carry#10 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#0] -- register_copy + // [101] phi (byte) shiftProtoBobRight::j#3 = (byte) shiftProtoBobRight::j#10 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#1] -- register_copy + // [101] phi (byte) shiftProtoBobRight::i#2 = (byte) shiftProtoBobRight::i#1 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#2] -- register_copy + jmp __b1 + // shiftProtoBobRight::@5 + __b5: + // [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f -- vbuz1=vbuz1_minus_vbuc1 + lax.z j + axs #$2f + stx.z j + jmp __b6_from___b5 +} + // shiftProtoBobDown +// Shift PROTO_BOB down one Y pixel +// At the same time restore PROTO_BOB X by shifting 8 pixels left +shiftProtoBobDown: { + .label i = $1d + // [118] phi from shiftProtoBobDown to shiftProtoBobDown::@1 [phi:shiftProtoBobDown->shiftProtoBobDown::@1] + __b1_from_shiftProtoBobDown: + // [118] phi (byte) shiftProtoBobDown::i#2 = (byte) $17 [phi:shiftProtoBobDown->shiftProtoBobDown::@1#0] -- vbuz1=vbuc1 + lda #$17 + sta.z i + jmp __b1 + // shiftProtoBobDown::@1 + __b1: + // [119] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 -- vbuz1_gt_0_then_la1 + lda.z i + bne __b2 + jmp __b3 + // shiftProtoBobDown::@3 + __b3: + // [120] *((const byte*) PROTO_BOB) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB + // [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB+$18 + // [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB+$30 + jmp __breturn + // shiftProtoBobDown::@return + __breturn: + // [123] return + rts + // shiftProtoBobDown::@2 + __b2: + // [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + ldy.z i + lda PROTO_BOB+$17,y + sta PROTO_BOB,y + // [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + ldy.z i + lda PROTO_BOB+$2f,y + sta PROTO_BOB+$18,y + // [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z i + sta PROTO_BOB+$30,y + // [127] (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#2 -- vbuz1=_dec_vbuz1 + dec.z i + // [118] phi from shiftProtoBobDown::@2 to shiftProtoBobDown::@1 [phi:shiftProtoBobDown::@2->shiftProtoBobDown::@1] + __b1_from___b2: + // [118] phi (byte) shiftProtoBobDown::i#2 = (byte) shiftProtoBobDown::i#1 [phi:shiftProtoBobDown::@2->shiftProtoBobDown::@1#0] -- register_copy + jmp __b1 +} + // File Data + // The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars) + // The chars are layout as follows with data in chars 0, 1, 3, 4 initially + // 0 3 6 + // 1 4 7 + // 2 5 8 +PROTO_BOB: +.var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + + // Sine used for the X-coordinate +SIN_X_TAB: +.fill $200, 75.5+75.5*sin(i*2*PI/256) + // Sine used for the Y-coordinate +SIN_Y_TAB: +.fill $200, 91.5+91.5*sin(i*2*PI/256) + // Tables containing the char to use for a specific cell of a shifted BOB. + // char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x]; + BOB_TABLES: .fill 9*8*4, 0 + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ main::sin_x_idx#7 main::sin_y_idx#7 ] ( main:2 [ main::sin_x_idx#7 main::sin_y_idx#7 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] +Statement [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:5 [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] +Statement [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:30 [ renderBob::x_char_offset#0 ] +Statement [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] ) always clobbers reg byte a +Statement [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] ) always clobbers reg byte a +Statement [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] ) always clobbers reg byte a +Statement [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] ) always clobbers reg byte a +Statement [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] ) always clobbers reg byte a +Statement [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] ) always clobbers reg byte a +Statement [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 [ renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] ) always clobbers reg byte a +Statement [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 [ renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] ) always clobbers reg byte a +Statement [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 [ renderBob::screen#0 renderBob::$7 renderBob::$8 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::$7 renderBob::$8 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::$7 renderBob::$8 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::$7 renderBob::$8 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:45 [ renderBob::$7 ] +Statement [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a +Statement [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:47 [ renderBob::bob_table_idx#0 ] +Removing always clobbered register reg byte y as potential for zp[1]:47 [ renderBob::bob_table_idx#0 ] +Statement [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 ] ) always clobbers reg byte a reg byte y +Statement [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::memset:11 [ memset::dst#2 ] ) always clobbers reg byte a +Statement [54] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::memset:11 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::bob_table#0 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::bob_table#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Removing always clobbered register reg byte a as potential for zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +Statement [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 bob_charset_next_id#21 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::bob_glyph#1 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 bob_charset_next_id#21 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::bob_glyph#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] +Statement [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Removing always clobbered register reg byte y as potential for zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] +Statement [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_table#2 prepareBobs::bob_glyph#1 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_table#2 prepareBobs::bob_glyph#1 ] ) always clobbers reg byte a +Statement [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#1 prepareBobs::bob_table#1 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#1 prepareBobs::bob_table#1 ] ) always clobbers reg byte a +Statement [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i1#2 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i1#2 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i1#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:22 [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:22 [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +Statement [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] ) always clobbers reg byte a reg byte x reg byte y +Removing always clobbered register reg byte x as potential for zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Removing always clobbered register reg byte a as potential for zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +Removing always clobbered register reg byte x as potential for zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] +Statement [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 [ bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_id#1 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_id#1 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_id#1 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] ) always clobbers reg byte a +Statement [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 [ shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::$1 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::$1 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:26 [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:27 [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] +Statement [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 [ shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::$5 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::$5 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::$5 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:28 [ shiftProtoBobRight::carry#1 ] +Statement [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 [ shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#2 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#2 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#2 ] ) always clobbers reg byte a +Statement [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f [ shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#1 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#1 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#1 ] ) always clobbers reg byte a +Statement [120] *((const byte*) PROTO_BOB) ← (byte) 0 [ ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 ] ) always clobbers reg byte a +Statement [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 [ ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 ] ) always clobbers reg byte a +Statement [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 [ ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 ] ) always clobbers reg byte a +Statement [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) [ shiftProtoBobDown::i#2 ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 shiftProtoBobDown::i#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:29 [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +Statement [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) [ shiftProtoBobDown::i#2 ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 shiftProtoBobDown::i#2 ] ) always clobbers reg byte a +Statement [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 [ shiftProtoBobDown::i#2 ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 shiftProtoBobDown::i#2 ] ) always clobbers reg byte a +Statement [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ main::sin_x_idx#7 main::sin_y_idx#7 ] ( main:2 [ main::sin_x_idx#7 main::sin_y_idx#7 ] ) always clobbers reg byte a +Statement [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 ] ) always clobbers reg byte a +Statement [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_char_offset#0 ] ) always clobbers reg byte a +Statement [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 ] ) always clobbers reg byte a +Statement [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$2 renderBob::$10 ] ) always clobbers reg byte a +Statement [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$11 ] ) always clobbers reg byte a +Statement [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::y_offset#0 ] ) always clobbers reg byte a +Statement [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::x_char_offset#0 renderBob::$4 ] ) always clobbers reg byte a +Statement [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 [ renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::ypos#3 renderBob::screen#0 ] ) always clobbers reg byte a +Statement [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 [ renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$6 ] ) always clobbers reg byte a +Statement [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 [ renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::xpos#3 renderBob::screen#0 renderBob::$7 ] ) always clobbers reg byte a +Statement [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 [ renderBob::screen#0 renderBob::$7 renderBob::$8 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::$7 renderBob::$8 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::$7 renderBob::$8 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::$7 renderBob::$8 ] ) always clobbers reg byte a +Statement [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a +Statement [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ renderBob::screen#0 renderBob::bob_table_idx#0 ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 renderBob::screen#0 renderBob::bob_table_idx#0 ] ) always clobbers reg byte a reg byte y +Statement [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) [ ] ( main:2::renderBob:17 [ main::sin_x_idx#7 main::sin_y_idx#7 ] main:2::renderBob:20 [ main::sin_x_idx#7 main::sin_y_idx#7 ] main:2::renderBob:23 [ main::sin_x_idx#7 main::sin_y_idx#7 ] ) always clobbers reg byte a reg byte y +Statement [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 [ memset::dst#2 ] ( main:2::memset:11 [ memset::dst#2 ] ) always clobbers reg byte a +Statement [54] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::dst#2 ] ( main:2::memset:11 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [59] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 [ prepareBobs::shift_y#2 bob_charset_next_id#14 prepareBobs::bob_table_idx#6 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#14 prepareBobs::bob_table_idx#6 ] ) always clobbers reg byte a +Statement [62] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@3 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 ] ) always clobbers reg byte a +Statement [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::bob_table#0 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::bob_table#0 ] ) always clobbers reg byte a +Statement [68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 bob_charset_next_id#21 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 bob_charset_next_id#21 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 ] ) always clobbers reg byte a +Statement [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 bob_charset_next_id#21 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::bob_glyph#1 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 bob_charset_next_id#21 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::bob_glyph#1 ] ) always clobbers reg byte a +Statement [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 ] ) always clobbers reg byte y +Statement [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_table#2 prepareBobs::bob_glyph#1 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_table#2 prepareBobs::bob_glyph#1 ] ) always clobbers reg byte a +Statement [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#1 prepareBobs::bob_table#1 ] ( main:2::prepareBobs:5 [ prepareBobs::shift_y#2 bob_charset_next_id#16 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#1 prepareBobs::bob_table#1 ] ) always clobbers reg byte a +Statement [84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 ] ) always clobbers reg byte a +Statement [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i1#2 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i1#2 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i1#2 ] ) always clobbers reg byte a reg byte y +Statement [93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] ) always clobbers reg byte a +Statement [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bobCharsetFindOrAddGlyph::glyph_id#11 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::i#2 ] ) always clobbers reg byte a reg byte x reg byte y +Statement [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 [ bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_id#1 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] ( main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:57 [ bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_id#1 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] main:2::prepareBobs:5::bobCharsetFindOrAddGlyph:75 [ prepareBobs::shift_y#2 prepareBobs::bob_table_idx#12 prepareBobs::shift_x#2 prepareBobs::cell#2 prepareBobs::bob_glyph#2 prepareBobs::bob_table#2 bob_charset_next_id#23 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::glyph_id#1 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] ) always clobbers reg byte a +Statement [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 [ shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::$1 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::$1 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::$1 ] ) always clobbers reg byte a +Statement [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 [ shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::$5 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::$5 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::j#3 shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::$5 ] ) always clobbers reg byte a +Statement [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 [ shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#2 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#2 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#2 ] ) always clobbers reg byte a +Statement [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f [ shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#1 ] ( main:2::prepareBobs:5::shiftProtoBobRight:70 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#1 ] main:2::prepareBobs:5::shiftProtoBobRight:72 [ prepareBobs::shift_y#2 prepareBobs::shift_x#2 prepareBobs::bob_table_idx#1 bob_charset_next_id#21 shiftProtoBobRight::i#2 shiftProtoBobRight::carry#1 shiftProtoBobRight::j#1 ] ) always clobbers reg byte a +Statement [120] *((const byte*) PROTO_BOB) ← (byte) 0 [ ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 ] ) always clobbers reg byte a +Statement [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 [ ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 ] ) always clobbers reg byte a +Statement [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 [ ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 ] ) always clobbers reg byte a +Statement [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) [ shiftProtoBobDown::i#2 ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 shiftProtoBobDown::i#2 ] ) always clobbers reg byte a +Statement [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) [ shiftProtoBobDown::i#2 ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 shiftProtoBobDown::i#2 ] ) always clobbers reg byte a +Statement [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 [ shiftProtoBobDown::i#2 ] ( main:2::prepareBobs:5::shiftProtoBobDown:64 [ prepareBobs::shift_y#2 bob_charset_next_id#30 prepareBobs::bob_table_idx#12 shiftProtoBobDown::i#2 ] ) always clobbers reg byte a +Potential registers zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] : zp[1]:2 , reg byte x , +Potential registers zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] : zp[1]:3 , reg byte x , +Potential registers zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] : zp[1]:4 , reg byte x , reg byte y , +Potential registers zp[1]:5 [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] : zp[1]:5 , reg byte x , reg byte y , +Potential registers zp[2]:6 [ memset::dst#2 memset::dst#1 ] : zp[2]:6 , +Potential registers zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] : zp[1]:8 , +Potential registers zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] : zp[1]:9 , +Potential registers zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] : zp[1]:10 , +Potential registers zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] : zp[1]:11 , +Potential registers zp[2]:12 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] : zp[2]:12 , +Potential registers zp[2]:14 [ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] : zp[2]:14 , +Potential registers zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] : zp[1]:16 , +Potential registers zp[2]:17 [ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] : zp[2]:17 , +Potential registers zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] : zp[1]:19 , +Potential registers zp[2]:20 [ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] : zp[2]:20 , +Potential registers zp[1]:22 [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] : zp[1]:22 , reg byte x , +Potential registers zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] : zp[1]:23 , +Potential registers zp[1]:24 [ bobCharsetFindOrAddGlyph::found#2 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] : zp[1]:25 , reg byte x , reg byte y , +Potential registers zp[1]:26 [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] : zp[1]:26 , reg byte x , reg byte y , +Potential registers zp[1]:27 [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] : zp[1]:27 , reg byte x , reg byte y , +Potential registers zp[1]:28 [ shiftProtoBobRight::carry#1 ] : zp[1]:28 , reg byte x , reg byte y , +Potential registers zp[1]:29 [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] : zp[1]:29 , reg byte x , reg byte y , +Potential registers zp[1]:30 [ renderBob::x_char_offset#0 ] : zp[1]:30 , reg byte x , reg byte y , +Potential registers zp[1]:31 [ renderBob::y_char_offset#0 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:32 [ renderBob::$2 ] : zp[2]:32 , +Potential registers zp[2]:34 [ renderBob::$10 ] : zp[2]:34 , +Potential registers zp[2]:36 [ renderBob::$11 ] : zp[2]:36 , +Potential registers zp[2]:38 [ renderBob::y_offset#0 ] : zp[2]:38 , +Potential registers zp[2]:40 [ renderBob::$4 ] : zp[2]:40 , +Potential registers zp[2]:42 [ renderBob::screen#0 ] : zp[2]:42 , +Potential registers zp[1]:44 [ renderBob::$6 ] : zp[1]:44 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:45 [ renderBob::$7 ] : zp[1]:45 , reg byte x , reg byte y , +Potential registers zp[1]:46 [ renderBob::$8 ] : zp[1]:46 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:47 [ renderBob::bob_table_idx#0 ] : zp[1]:47 , reg byte x , +Potential registers zp[1]:48 [ bobCharsetFindOrAddGlyph::return#1 ] : zp[1]:48 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:49 [ prepareBobs::$5 ] : zp[1]:49 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:50 [ shiftProtoBobRight::$1 ] : zp[1]:50 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:51 [ shiftProtoBobRight::$5 ] : zp[1]:51 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:52 [ shiftProtoBobRight::$6 ] : zp[1]:52 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [bobCharsetFindOrAddGlyph] 366,670.33: zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] 36,670.33: zp[1]:22 [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] 30,002.31: zp[2]:20 [ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] 11,938.75: zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] 10,001: zp[1]:24 [ bobCharsetFindOrAddGlyph::found#2 ] 9,402.2: zp[2]:17 [ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] 2,002: zp[1]:48 [ bobCharsetFindOrAddGlyph::return#1 ] +Uplift Scope [shiftProtoBobRight] 5,705.7: zp[1]:26 [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] 2,288: zp[1]:27 [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] 2,002: zp[1]:50 [ shiftProtoBobRight::$1 ] 2,002: zp[1]:51 [ shiftProtoBobRight::$5 ] 2,002: zp[1]:52 [ shiftProtoBobRight::$6 ] 1,232: zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] 111.22: zp[1]:28 [ shiftProtoBobRight::carry#1 ] +Uplift Scope [prepareBobs] 2,335.67: zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] 2,002: zp[1]:49 [ prepareBobs::$5 ] 1,591: zp[2]:14 [ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] 1,096.33: zp[2]:12 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] 219.82: zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] 71.71: zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] 23.5: zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Uplift Scope [] 2,829.77: zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Uplift Scope [shiftProtoBobDown] 363.6: zp[1]:29 [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +Uplift Scope [renderBob] 70.11: zp[1]:5 [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] 36.36: zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] 4: zp[2]:34 [ renderBob::$10 ] 4: zp[2]:36 [ renderBob::$11 ] 4: zp[2]:38 [ renderBob::y_offset#0 ] 4: zp[2]:40 [ renderBob::$4 ] 4: zp[1]:44 [ renderBob::$6 ] 4: zp[1]:46 [ renderBob::$8 ] 3: zp[2]:32 [ renderBob::$2 ] 2.22: zp[1]:47 [ renderBob::bob_table_idx#0 ] 2: zp[1]:31 [ renderBob::y_char_offset#0 ] 2: zp[1]:45 [ renderBob::$7 ] 1.54: zp[2]:42 [ renderBob::screen#0 ] 0.57: zp[1]:30 [ renderBob::x_char_offset#0 ] +Uplift Scope [memset] 36.67: zp[2]:6 [ memset::dst#2 memset::dst#1 ] +Uplift Scope [main] 15.23: zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] 11.92: zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] + +Uplifting [bobCharsetFindOrAddGlyph] best 6349481 combination zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] reg byte x [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] zp[2]:20 [ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] reg byte a [ bobCharsetFindOrAddGlyph::found#2 ] zp[2]:17 [ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] reg byte a [ bobCharsetFindOrAddGlyph::return#1 ] +Uplifting [shiftProtoBobRight] best 6311481 combination reg byte x [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] reg byte y [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] reg byte a [ shiftProtoBobRight::$1 ] reg byte a [ shiftProtoBobRight::$5 ] zp[1]:52 [ shiftProtoBobRight::$6 ] zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] zp[1]:28 [ shiftProtoBobRight::carry#1 ] +Limited combination testing to 100 combinations of 5184 possible. +Uplifting [prepareBobs] best 6305481 combination zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] reg byte a [ prepareBobs::$5 ] zp[2]:14 [ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] zp[2]:12 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Uplifting [] best 6305481 combination zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Uplifting [shiftProtoBobDown] best 6303881 combination reg byte x [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +Uplifting [renderBob] best 6303777 combination reg byte x [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] zp[2]:34 [ renderBob::$10 ] zp[2]:36 [ renderBob::$11 ] zp[2]:38 [ renderBob::y_offset#0 ] zp[2]:40 [ renderBob::$4 ] reg byte a [ renderBob::$6 ] reg byte a [ renderBob::$8 ] zp[2]:32 [ renderBob::$2 ] zp[1]:47 [ renderBob::bob_table_idx#0 ] zp[1]:31 [ renderBob::y_char_offset#0 ] zp[1]:45 [ renderBob::$7 ] zp[2]:42 [ renderBob::screen#0 ] zp[1]:30 [ renderBob::x_char_offset#0 ] +Limited combination testing to 100 combinations of 10368 possible. +Uplifting [memset] best 6303777 combination zp[2]:6 [ memset::dst#2 memset::dst#1 ] +Uplifting [main] best 6303777 combination zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] +Attempting to uplift remaining variables inzp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Uplifting [bobCharsetFindOrAddGlyph] best 6303777 combination zp[1]:23 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Attempting to uplift remaining variables inzp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Uplifting [bobCharsetFindOrAddGlyph] best 6303777 combination zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Attempting to uplift remaining variables inzp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Uplifting [] best 6303777 combination zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +Attempting to uplift remaining variables inzp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] +Uplifting [prepareBobs] best 6303777 combination zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] +Attempting to uplift remaining variables inzp[1]:52 [ shiftProtoBobRight::$6 ] +Uplifting [shiftProtoBobRight] best 6297777 combination reg byte a [ shiftProtoBobRight::$6 ] +Attempting to uplift remaining variables inzp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] +Uplifting [shiftProtoBobRight] best 6297777 combination zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] +Attempting to uplift remaining variables inzp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +Uplifting [prepareBobs] best 6297777 combination zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] +Attempting to uplift remaining variables inzp[1]:28 [ shiftProtoBobRight::carry#1 ] +Uplifting [shiftProtoBobRight] best 6297777 combination zp[1]:28 [ shiftProtoBobRight::carry#1 ] +Attempting to uplift remaining variables inzp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +Uplifting [prepareBobs] best 6297777 combination zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] +Attempting to uplift remaining variables inzp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +Uplifting [renderBob] best 6297777 combination zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +Attempting to uplift remaining variables inzp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Uplifting [prepareBobs] best 6297777 combination zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] +Attempting to uplift remaining variables inzp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] +Uplifting [main] best 6297777 combination zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] +Attempting to uplift remaining variables inzp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] +Uplifting [main] best 6297777 combination zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] +Attempting to uplift remaining variables inzp[1]:47 [ renderBob::bob_table_idx#0 ] +Uplifting [renderBob] best 6297749 combination reg byte x [ renderBob::bob_table_idx#0 ] +Attempting to uplift remaining variables inzp[1]:31 [ renderBob::y_char_offset#0 ] +Uplifting [renderBob] best 6297743 combination reg byte a [ renderBob::y_char_offset#0 ] +Attempting to uplift remaining variables inzp[1]:45 [ renderBob::$7 ] +Uplifting [renderBob] best 6297743 combination zp[1]:45 [ renderBob::$7 ] +Attempting to uplift remaining variables inzp[1]:30 [ renderBob::x_char_offset#0 ] +Uplifting [renderBob] best 6297741 combination reg byte y [ renderBob::x_char_offset#0 ] +Coalescing zero page register [ zp[2]:12 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 ] ] with [ zp[2]:17 [ bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] ] - score: 1 +Coalescing zero page register [ zp[2]:32 [ renderBob::$2 ] ] with [ zp[2]:36 [ renderBob::$11 ] ] - score: 1 +Coalescing zero page register [ zp[2]:38 [ renderBob::y_offset#0 ] ] with [ zp[2]:40 [ renderBob::$4 ] ] - score: 1 +Coalescing zero page register [ zp[2]:32 [ renderBob::$2 renderBob::$11 ] ] with [ zp[2]:38 [ renderBob::y_offset#0 renderBob::$4 ] ] - score: 1 +Coalescing zero page register [ zp[2]:32 [ renderBob::$2 renderBob::$11 renderBob::y_offset#0 renderBob::$4 ] ] with [ zp[2]:42 [ renderBob::screen#0 ] ] - score: 1 +Coalescing zero page register [ zp[1]:8 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 ] ] with [ zp[1]:2 [ main::sin_x_idx#7 main::sin_x_idx#1 ] ] +Coalescing zero page register [ zp[1]:9 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 ] ] with [ zp[1]:3 [ main::sin_y_idx#7 main::sin_y_idx#1 ] ] +Coalescing zero page register [ zp[1]:10 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 ] ] with [ zp[1]:4 [ renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] ] +Coalescing zero page register [ zp[2]:12 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 ] ] with [ zp[2]:6 [ memset::dst#2 memset::dst#1 ] ] +Coalescing zero page register [ zp[1]:25 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 ] ] with [ zp[1]:11 [ prepareBobs::cell#2 prepareBobs::cell#1 ] ] +Coalescing zero page register [ zp[1]:28 [ shiftProtoBobRight::carry#1 ] ] with [ zp[1]:19 [ bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] ] +Coalescing zero page register [ zp[2]:32 [ renderBob::$2 renderBob::$11 renderBob::y_offset#0 renderBob::$4 renderBob::screen#0 ] ] with [ zp[2]:14 [ prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] ] +Coalescing zero page register [ zp[2]:34 [ renderBob::$10 ] ] with [ zp[2]:20 [ bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] ] +Coalescing zero page register [ zp[1]:45 [ renderBob::$7 ] ] with [ zp[1]:16 [ bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] ] +Allocated (was zp[1]:8) zp[1]:2 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 main::sin_x_idx#7 main::sin_x_idx#1 ] +Allocated (was zp[1]:9) zp[1]:3 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 main::sin_y_idx#7 main::sin_y_idx#1 ] +Allocated (was zp[1]:10) zp[1]:4 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +Allocated (was zp[2]:12) zp[2]:5 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 memset::dst#2 memset::dst#1 ] +Allocated (was zp[1]:23) zp[1]:7 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +Allocated (was zp[1]:25) zp[1]:8 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 prepareBobs::cell#2 prepareBobs::cell#1 ] +Allocated (was zp[1]:28) zp[1]:9 [ shiftProtoBobRight::carry#1 bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +Allocated (was zp[2]:32) zp[2]:10 [ renderBob::$2 renderBob::$11 renderBob::y_offset#0 renderBob::$4 renderBob::screen#0 prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] +Allocated (was zp[2]:34) zp[2]:12 [ renderBob::$10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] +Allocated (was zp[1]:45) zp[1]:14 [ renderBob::$7 bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations) + // Upstart +.pc = $801 "Basic" +:BasicUpstart(__bbegin) +.pc = $80d "Program" + // Global Constants & labels + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label D018 = $d018 + // CIA#2 Port A: Serial bus, RS-232, VIC memory bank + .label CIA2_PORT_A = $dd00 + // CIA #2 Port A data direction register. + .label CIA2_PORT_A_DDR = $dd02 + // The screen + .label SCREEN = $4000 + // The charset that will receive the shifted bobs + .label BOB_CHARSET = $6000 + // The number of different X-shifts + .const BOB_SHIFTS_X = 4 + // The number of different Y-shifts + .const BOB_SHIFTS_Y = 8 + // The size of a sub-table of BOB_TABLES + .const BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y + // BOB charset ID of the next glyph to be added + .label bob_charset_next_id = $e + // @begin +__bbegin: + // [1] phi from @begin to @1 [phi:@begin->@1] +__b1_from___bbegin: + jmp __b1 + // @1 +__b1: + // [2] call main + // [4] phi from @1 to main [phi:@1->main] +main_from___b1: + jsr main + // [3] phi from @1 to @end [phi:@1->@end] +__bend_from___b1: + jmp __bend + // @end +__bend: + // main +main: { + .const vicSelectGfxBank1_toDd001_return = 3^(>SCREEN)/$40 + .const toD0181_return = (>BOB_CHARSET)/4&$f + /* + // Display some BOBs + char* screen = SCREEN; + char bob_table_idx = 0; + for(char i:0..7) { + for(char j:0..3) { + screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen += 120; + bob_table_idx++; + } + screen -= (120*4)-3; + } + */ + .label sin_x_idx = 2 + .label sin_y_idx = 3 + // [5] call prepareBobs + // [56] phi from main to prepareBobs [phi:main->prepareBobs] + prepareBobs_from_main: + jsr prepareBobs + jmp vicSelectGfxBank1 + // main::vicSelectGfxBank1 + vicSelectGfxBank1: + // [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 + lda #3 + sta CIA2_PORT_A_DDR + // [7] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001] + vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: + jmp vicSelectGfxBank1_toDd001 + // main::vicSelectGfxBank1_toDd001 + vicSelectGfxBank1_toDd001: + jmp vicSelectGfxBank1___b1 + // main::vicSelectGfxBank1_@1 + vicSelectGfxBank1___b1: + // [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + lda #vicSelectGfxBank1_toDd001_return + sta CIA2_PORT_A + // [9] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181] + toD0181_from_vicSelectGfxBank1___b1: + jmp toD0181 + // main::toD0181 + toD0181: + jmp __b4 + // main::@4 + __b4: + // [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + // [11] call memset + // [50] phi from main::@4 to memset [phi:main::@4->memset] + memset_from___b4: + jsr memset + // [12] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + __b1_from___b4: + // [12] phi (byte) main::sin_y_idx#7 = (byte) $49 [phi:main::@4->main::@1#0] -- vbuz1=vbuc1 + lda #$49 + sta.z sin_y_idx + // [12] phi (byte) main::sin_x_idx#7 = (byte) 0 [phi:main::@4->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z sin_x_idx + jmp __b1 + // main::@1 + __b1: + jmp __b2 + // main::@2 + __b2: + // [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda #$ff + cmp RASTER + bne __b2 + jmp __b3 + // main::@3 + __b3: + // [14] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDERCOL + // [15] (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB,y + sta.z renderBob.xpos + // [16] (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#7) -- vbuxx=pbuc1_derefidx_vbuz1 + ldy.z sin_y_idx + ldx SIN_Y_TAB,y + // [17] call renderBob + // [27] phi from main::@3 to renderBob [phi:main::@3->renderBob] + renderBob_from___b3: + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#0 [phi:main::@3->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#0 [phi:main::@3->renderBob#1] -- register_copy + jsr renderBob + jmp __b5 + // main::@5 + __b5: + // [18] (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(byte) $f + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB+$f,y + sta.z renderBob.xpos + // [19] (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(byte) $b + (byte) main::sin_y_idx#7) -- vbuxx=pbuc1_derefidx_vbuz1 + ldy.z sin_y_idx + ldx SIN_Y_TAB+$b,y + // [20] call renderBob + // [27] phi from main::@5 to renderBob [phi:main::@5->renderBob] + renderBob_from___b5: + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#1 [phi:main::@5->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#1 [phi:main::@5->renderBob#1] -- register_copy + jsr renderBob + jmp __b6 + // main::@6 + __b6: + // [21] (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(byte) $16 + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB+$16,y + sta.z renderBob.xpos + // [22] (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(byte) $1e + (byte) main::sin_y_idx#7) -- vbuxx=pbuc1_derefidx_vbuz1 + ldy.z sin_y_idx + ldx SIN_Y_TAB+$1e,y + // [23] call renderBob + // [27] phi from main::@6 to renderBob [phi:main::@6->renderBob] + renderBob_from___b6: + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#2 [phi:main::@6->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#2 [phi:main::@6->renderBob#1] -- register_copy + jsr renderBob + jmp __b7 + // main::@7 + __b7: + // [24] (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#7 -- vbuz1=_inc_vbuz1 + inc.z sin_x_idx + // [25] (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#7 -- vbuz1=_inc_vbuz1 + inc.z sin_y_idx + // [26] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDERCOL + // [12] phi from main::@7 to main::@1 [phi:main::@7->main::@1] + __b1_from___b7: + // [12] phi (byte) main::sin_y_idx#7 = (byte) main::sin_y_idx#1 [phi:main::@7->main::@1#0] -- register_copy + // [12] phi (byte) main::sin_x_idx#7 = (byte) main::sin_x_idx#1 [phi:main::@7->main::@1#1] -- register_copy + jmp __b1 +} + // renderBob +// Render a single BOB at a given x/y-position +// X-position is 0-151. Each x-position is 2 pixels wide. +// Y-position is 0-183. Each y-position is 1 pixel high. +// renderBob(byte zeropage(4) xpos, byte register(X) ypos) +renderBob: { + .label __2 = $a + .label __4 = $a + .label __7 = $e + .label xpos = 4 + .label y_offset = $a + .label screen = $a + .label __10 = $c + .label __11 = $a + // [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 -- vbuyy=vbuz1_ror_2 + lda.z xpos + lsr + lsr + tay + // [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 -- vbuaa=vbuxx_ror_3 + txa + lsr + lsr + lsr + // [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 -- vwuz1=_word_vbuaa + sta.z __2 + lda #0 + sta.z __2+1 + // [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 -- vwuz1=vwuz2_rol_2 + lda.z __2 + asl + sta.z __10 + lda.z __2+1 + rol + sta.z __10+1 + asl.z __10 + rol.z __10+1 + // [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 -- vwuz1=vwuz2_plus_vwuz1 + lda.z __11 + clc + adc.z __10 + sta.z __11 + lda.z __11+1 + adc.z __10+1 + sta.z __11+1 + // [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 -- vwuz1=vwuz1_rol_3 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + // [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda.z __4 + adc #SCREEN + sta.z __4+1 + // [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 -- pbuz1=pbuz1_plus_vbuyy + tya + clc + adc.z screen + sta.z screen + bcc !+ + inc.z screen+1 + !: + // [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + // [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 -- vbuz1=vbuaa_rol_2 + asl + asl + sta.z __7 + // [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 -- vbuaa=vbuz1_band_vbuc1 + lda #3 + and.z xpos + // [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 -- vbuxx=vbuz1_plus_vbuaa + clc + adc.z __7 + tax + // [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda BOB_TABLES,x + ldy #0 + sta (screen),y + // [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,x + ldy #$28 + sta (screen),y + // [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,x + ldy #$50 + sta (screen),y + // [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,x + ldy #1 + sta (screen),y + // [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,x + ldy #$29 + sta (screen),y + // [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,x + ldy #$51 + sta (screen),y + // [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,x + ldy #2 + sta (screen),y + // [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,x + ldy #$2a + sta (screen),y + // [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,x + ldy #$52 + sta (screen),y + jmp __breturn + // renderBob::@return + __breturn: + // [49] return + rts +} + // memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .label str = SCREEN + .const c = 0 + .const num = $3e8 + .label end = str+num + .label dst = 5 + // [51] phi from memset to memset::@1 [phi:memset->memset::@1] + __b1_from_memset: + // [51] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + lda #str + sta.z dst+1 + jmp __b1 + // memset::@1 + __b1: + // [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + lda.z dst+1 + cmp #>end + bne __b2 + lda.z dst + cmp #memset::@1] + __b1_from___b2: + // [51] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy + jmp __b1 +} + // prepareBobs +// Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES +// Modifies PROTO_BOB by shifting it around +prepareBobs: { + .label bob_table = $a + .label shift_y = 2 + // Populate charset and tables + .label bob_glyph = 5 + .label cell = 8 + .label bob_table_idx = 3 + .label shift_x = 4 + // [57] call bobCharsetFindOrAddGlyph + // [82] phi from prepareBobs to bobCharsetFindOrAddGlyph [phi:prepareBobs->bobCharsetFindOrAddGlyph] + bobCharsetFindOrAddGlyph_from_prepareBobs: + // [82] phi (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 = (const byte*) PROTO_BOB+(byte) $30 [phi:prepareBobs->bobCharsetFindOrAddGlyph#0] -- pbuz1=pbuc1 + lda #PROTO_BOB+$30 + sta.z bobCharsetFindOrAddGlyph.bob_glyph+1 + // [82] phi (byte) bob_charset_next_id#23 = (byte) 0 [phi:prepareBobs->bobCharsetFindOrAddGlyph#1] -- vbuz1=vbuc1 + lda #0 + sta.z bob_charset_next_id + jsr bobCharsetFindOrAddGlyph + // [58] phi from prepareBobs to prepareBobs::@1 [phi:prepareBobs->prepareBobs::@1] + __b1_from_prepareBobs: + // [58] phi (byte) prepareBobs::bob_table_idx#6 = (byte) 0 [phi:prepareBobs->prepareBobs::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z bob_table_idx + // [58] phi (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#16 [phi:prepareBobs->prepareBobs::@1#1] -- register_copy + // [58] phi (byte) prepareBobs::shift_y#2 = (byte) 0 [phi:prepareBobs->prepareBobs::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z shift_y + jmp __b1 + // prepareBobs::@1 + __b1: + // [59] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z shift_y + cmp #BOB_SHIFTS_Y + bcc __b2_from___b1 + jmp __breturn + // prepareBobs::@return + __breturn: + // [60] return + rts + // [61] phi from prepareBobs::@1 to prepareBobs::@2 [phi:prepareBobs::@1->prepareBobs::@2] + __b2_from___b1: + // [61] phi (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#14 [phi:prepareBobs::@1->prepareBobs::@2#0] -- register_copy + // [61] phi (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#6 [phi:prepareBobs::@1->prepareBobs::@2#1] -- register_copy + // [61] phi (byte) prepareBobs::shift_x#2 = (byte) 0 [phi:prepareBobs::@1->prepareBobs::@2#2] -- vbuz1=vbuc1 + lda #0 + sta.z shift_x + jmp __b2 + // prepareBobs::@2 + __b2: + // [62] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z shift_x + cmp #BOB_SHIFTS_X + bcc __b3 + // [63] phi from prepareBobs::@2 to prepareBobs::@4 [phi:prepareBobs::@2->prepareBobs::@4] + __b4_from___b2: + jmp __b4 + // prepareBobs::@4 + __b4: + // [64] call shiftProtoBobDown + // [117] phi from prepareBobs::@4 to shiftProtoBobDown [phi:prepareBobs::@4->shiftProtoBobDown] + shiftProtoBobDown_from___b4: + jsr shiftProtoBobDown + jmp __b8 + // prepareBobs::@8 + __b8: + // [65] (byte) prepareBobs::shift_y#1 ← ++ (byte) prepareBobs::shift_y#2 -- vbuz1=_inc_vbuz1 + inc.z shift_y + // [58] phi from prepareBobs::@8 to prepareBobs::@1 [phi:prepareBobs::@8->prepareBobs::@1] + __b1_from___b8: + // [58] phi (byte) prepareBobs::bob_table_idx#6 = (byte) prepareBobs::bob_table_idx#12 [phi:prepareBobs::@8->prepareBobs::@1#0] -- register_copy + // [58] phi (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#30 [phi:prepareBobs::@8->prepareBobs::@1#1] -- register_copy + // [58] phi (byte) prepareBobs::shift_y#2 = (byte) prepareBobs::shift_y#1 [phi:prepareBobs::@8->prepareBobs::@1#2] -- register_copy + jmp __b1 + // prepareBobs::@3 + __b3: + // [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 -- pbuz1=pbuc1_plus_vbuz2 + lda.z bob_table_idx + clc + adc #BOB_TABLES + adc #0 + sta.z bob_table+1 + // [67] phi from prepareBobs::@3 to prepareBobs::@5 [phi:prepareBobs::@3->prepareBobs::@5] + __b5_from___b3: + // [67] phi (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#0 [phi:prepareBobs::@3->prepareBobs::@5#0] -- register_copy + // [67] phi (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#30 [phi:prepareBobs::@3->prepareBobs::@5#1] -- register_copy + // [67] phi (byte*) prepareBobs::bob_glyph#2 = (const byte*) PROTO_BOB [phi:prepareBobs::@3->prepareBobs::@5#2] -- pbuz1=pbuc1 + lda #PROTO_BOB + sta.z bob_glyph+1 + // [67] phi (byte) prepareBobs::cell#2 = (byte) 0 [phi:prepareBobs::@3->prepareBobs::@5#3] -- vbuz1=vbuc1 + lda #0 + sta.z cell + jmp __b5 + // prepareBobs::@5 + __b5: + // [68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6 -- vbuz1_lt_vbuc1_then_la1 + lda.z cell + cmp #9 + bcc __b6 + jmp __b7 + // prepareBobs::@7 + __b7: + // [69] (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#12 -- vbuz1=_inc_vbuz1 + inc.z bob_table_idx + // [70] call shiftProtoBobRight + // [100] phi from prepareBobs::@7 to shiftProtoBobRight [phi:prepareBobs::@7->shiftProtoBobRight] + shiftProtoBobRight_from___b7: + jsr shiftProtoBobRight + // [71] phi from prepareBobs::@7 to prepareBobs::@10 [phi:prepareBobs::@7->prepareBobs::@10] + __b10_from___b7: + jmp __b10 + // prepareBobs::@10 + __b10: + // [72] call shiftProtoBobRight + // [100] phi from prepareBobs::@10 to shiftProtoBobRight [phi:prepareBobs::@10->shiftProtoBobRight] + shiftProtoBobRight_from___b10: + jsr shiftProtoBobRight + jmp __b11 + // prepareBobs::@11 + __b11: + // [73] (byte) prepareBobs::shift_x#1 ← ++ (byte) prepareBobs::shift_x#2 -- vbuz1=_inc_vbuz1 + inc.z shift_x + // [61] phi from prepareBobs::@11 to prepareBobs::@2 [phi:prepareBobs::@11->prepareBobs::@2] + __b2_from___b11: + // [61] phi (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#21 [phi:prepareBobs::@11->prepareBobs::@2#0] -- register_copy + // [61] phi (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#1 [phi:prepareBobs::@11->prepareBobs::@2#1] -- register_copy + // [61] phi (byte) prepareBobs::shift_x#2 = (byte) prepareBobs::shift_x#1 [phi:prepareBobs::@11->prepareBobs::@2#2] -- register_copy + jmp __b2 + // prepareBobs::@6 + __b6: + // [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + // [75] call bobCharsetFindOrAddGlyph + // [82] phi from prepareBobs::@6 to bobCharsetFindOrAddGlyph [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph] + bobCharsetFindOrAddGlyph_from___b6: + // [82] phi (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph#0] -- register_copy + // [82] phi (byte) bob_charset_next_id#23 = (byte) bob_charset_next_id#21 [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph#1] -- register_copy + jsr bobCharsetFindOrAddGlyph + // [76] (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11 -- vbuaa=vbuz1 + lda.z bobCharsetFindOrAddGlyph.glyph_id + jmp __b9 + // prepareBobs::@9 + __b9: + // [77] (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#1 + // [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 -- _deref_pbuz1=vbuaa + // Look for an existing char in BOB_CHARSET + ldy #0 + sta (bob_table),y + // [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + // Move to the next glyph + lda #8 + clc + adc.z bob_glyph + sta.z bob_glyph + bcc !+ + inc.z bob_glyph+1 + !: + // [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y -- pbuz1=pbuz1_plus_vbuc1 + // Move to the next sub-table + lda #BOB_SHIFTS_X*BOB_SHIFTS_Y + clc + adc.z bob_table + sta.z bob_table + bcc !+ + inc.z bob_table+1 + !: + // [81] (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#2 -- vbuz1=_inc_vbuz1 + inc.z cell + // [67] phi from prepareBobs::@9 to prepareBobs::@5 [phi:prepareBobs::@9->prepareBobs::@5] + __b5_from___b9: + // [67] phi (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#1 [phi:prepareBobs::@9->prepareBobs::@5#0] -- register_copy + // [67] phi (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#16 [phi:prepareBobs::@9->prepareBobs::@5#1] -- register_copy + // [67] phi (byte*) prepareBobs::bob_glyph#2 = (byte*) prepareBobs::bob_glyph#1 [phi:prepareBobs::@9->prepareBobs::@5#2] -- register_copy + // [67] phi (byte) prepareBobs::cell#2 = (byte) prepareBobs::cell#1 [phi:prepareBobs::@9->prepareBobs::@5#3] -- register_copy + jmp __b5 +} + // bobCharsetFindOrAddGlyph +// Looks through BOB_CHARSET to find the passed bob glyph if present. +// If not present it is added +// Returns the glyph ID +// bobCharsetFindOrAddGlyph(byte* zeropage(5) bob_glyph) +bobCharsetFindOrAddGlyph: { + .label bob_glyph = 5 + .label i = 7 + .label glyph_id = 9 + .label glyph_cursor = $c + // [83] phi from bobCharsetFindOrAddGlyph to bobCharsetFindOrAddGlyph::@1 [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1] + __b1_from_bobCharsetFindOrAddGlyph: + // [83] phi (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (const byte*) BOB_CHARSET [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1#0] -- pbuz1=pbuc1 + lda #BOB_CHARSET + sta.z glyph_cursor+1 + // [83] phi (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) 0 [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z glyph_id + jmp __b1 + // bobCharsetFindOrAddGlyph::@1 + __b1: + // [84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 -- vbuz1_neq_vbuz2_then_la1 + lda.z glyph_id + cmp.z bob_charset_next_id + bne __b2_from___b1 + // [85] phi from bobCharsetFindOrAddGlyph::@1 to bobCharsetFindOrAddGlyph::@7 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@7] + __b7_from___b1: + // [85] phi (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@7#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b7 + // Not found - add it + // bobCharsetFindOrAddGlyph::@7 + __b7: + // [86] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@8 -- vbuxx_lt_vbuc1_then_la1 + cpx #8 + bcc __b8 + jmp __b9 + // bobCharsetFindOrAddGlyph::@9 + __b9: + // [87] (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#23 -- vbuz1=_inc_vbuz1 + inc.z bob_charset_next_id + // [88] phi from bobCharsetFindOrAddGlyph::@5 bobCharsetFindOrAddGlyph::@9 to bobCharsetFindOrAddGlyph::@return [phi:bobCharsetFindOrAddGlyph::@5/bobCharsetFindOrAddGlyph::@9->bobCharsetFindOrAddGlyph::@return] + __breturn_from___b5: + __breturn_from___b9: + // [88] phi (byte) bob_charset_next_id#16 = (byte) bob_charset_next_id#23 [phi:bobCharsetFindOrAddGlyph::@5/bobCharsetFindOrAddGlyph::@9->bobCharsetFindOrAddGlyph::@return#0] -- register_copy + jmp __breturn + // bobCharsetFindOrAddGlyph::@return + __breturn: + // [89] return + rts + // bobCharsetFindOrAddGlyph::@8 + __b8: + // [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) -- pbuz1_derefidx_vbuxx=pbuz2_derefidx_vbuxx + stx.z $ff + txa + tay + lda (bob_glyph),y + ldy.z $ff + sta (glyph_cursor),y + // [91] (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#2 -- vbuxx=_inc_vbuxx + inx + // [85] phi from bobCharsetFindOrAddGlyph::@8 to bobCharsetFindOrAddGlyph::@7 [phi:bobCharsetFindOrAddGlyph::@8->bobCharsetFindOrAddGlyph::@7] + __b7_from___b8: + // [85] phi (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) bobCharsetFindOrAddGlyph::i1#1 [phi:bobCharsetFindOrAddGlyph::@8->bobCharsetFindOrAddGlyph::@7#0] -- register_copy + jmp __b7 + // [92] phi from bobCharsetFindOrAddGlyph::@1 to bobCharsetFindOrAddGlyph::@2 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@2] + __b2_from___b1: + // [92] phi (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b2 + // bobCharsetFindOrAddGlyph::@2 + __b2: + // [93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #8 + bcc __b3 + // [95] phi from bobCharsetFindOrAddGlyph::@2 to bobCharsetFindOrAddGlyph::@5 [phi:bobCharsetFindOrAddGlyph::@2->bobCharsetFindOrAddGlyph::@5] + __b5_from___b2: + // [95] phi (byte) bobCharsetFindOrAddGlyph::found#2 = (byte) 1 [phi:bobCharsetFindOrAddGlyph::@2->bobCharsetFindOrAddGlyph::@5#0] -- vbuaa=vbuc1 + lda #1 + jmp __b5 + // bobCharsetFindOrAddGlyph::@3 + __b3: + // [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 -- pbuz1_derefidx_vbuz2_eq_pbuz3_derefidx_vbuz2_then_la1 + ldy.z i + lda (glyph_cursor),y + tax + lda (bob_glyph),y + tay + sty.z $ff + cpx.z $ff + beq __b4 + // [95] phi from bobCharsetFindOrAddGlyph::@3 to bobCharsetFindOrAddGlyph::@5 [phi:bobCharsetFindOrAddGlyph::@3->bobCharsetFindOrAddGlyph::@5] + __b5_from___b3: + // [95] phi (byte) bobCharsetFindOrAddGlyph::found#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@3->bobCharsetFindOrAddGlyph::@5#0] -- vbuaa=vbuc1 + lda #0 + jmp __b5 + // bobCharsetFindOrAddGlyph::@5 + __b5: + // [96] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@6 -- vbuc1_eq_vbuaa_then_la1 + cmp #0 + beq __b6 + jmp __breturn_from___b5 + // bobCharsetFindOrAddGlyph::@6 + __b6: + // [97] (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#11 -- vbuz1=_inc_vbuz1 + inc.z glyph_id + // [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + lda #8 + clc + adc.z glyph_cursor + sta.z glyph_cursor + bcc !+ + inc.z glyph_cursor+1 + !: + // [83] phi from bobCharsetFindOrAddGlyph::@6 to bobCharsetFindOrAddGlyph::@1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1] + __b1_from___b6: + // [83] phi (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1#0] -- register_copy + // [83] phi (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) bobCharsetFindOrAddGlyph::glyph_id#1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1#1] -- register_copy + jmp __b1 + // bobCharsetFindOrAddGlyph::@4 + __b4: + // [99] (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [92] phi from bobCharsetFindOrAddGlyph::@4 to bobCharsetFindOrAddGlyph::@2 [phi:bobCharsetFindOrAddGlyph::@4->bobCharsetFindOrAddGlyph::@2] + __b2_from___b4: + // [92] phi (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) bobCharsetFindOrAddGlyph::i#1 [phi:bobCharsetFindOrAddGlyph::@4->bobCharsetFindOrAddGlyph::@2#0] -- register_copy + jmp __b2 +} + // shiftProtoBobRight +// Shift PROTO_BOB right one X pixel +shiftProtoBobRight: { + .label carry = 9 + .label i = 8 + // [101] phi from shiftProtoBobRight to shiftProtoBobRight::@1 [phi:shiftProtoBobRight->shiftProtoBobRight::@1] + __b1_from_shiftProtoBobRight: + // [101] phi (byte) shiftProtoBobRight::carry#2 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#0] -- vbuyy=vbuc1 + ldy #0 + // [101] phi (byte) shiftProtoBobRight::j#3 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#1] -- vbuxx=vbuc1 + ldx #0 + // [101] phi (byte) shiftProtoBobRight::i#2 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#2] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b1 + // shiftProtoBobRight::@1 + __b1: + // [102] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #3*3*8 + bcc __b2 + jmp __breturn + // shiftProtoBobRight::@return + __breturn: + // [103] return + rts + // shiftProtoBobRight::@2 + __b2: + // [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 -- vbuaa=pbuc1_derefidx_vbuxx_band_vbuc2 + lda #1 + and PROTO_BOB,x + // [105] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@3 -- vbuc1_neq_vbuaa_then_la1 + cmp #0 + bne __b3_from___b2 + // [107] phi from shiftProtoBobRight::@2 to shiftProtoBobRight::@4 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@4] + __b4_from___b2: + // [107] phi (byte) shiftProtoBobRight::carry#1 = (byte) 0 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@4#0] -- vbuz1=vbuc1 + lda #0 + sta.z carry + jmp __b4 + // [106] phi from shiftProtoBobRight::@2 to shiftProtoBobRight::@3 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@3] + __b3_from___b2: + jmp __b3 + // shiftProtoBobRight::@3 + __b3: + // [107] phi from shiftProtoBobRight::@3 to shiftProtoBobRight::@4 [phi:shiftProtoBobRight::@3->shiftProtoBobRight::@4] + __b4_from___b3: + // [107] phi (byte) shiftProtoBobRight::carry#1 = (byte) $80 [phi:shiftProtoBobRight::@3->shiftProtoBobRight::@4#0] -- vbuz1=vbuc1 + lda #$80 + sta.z carry + jmp __b4 + // shiftProtoBobRight::@4 + __b4: + // [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 -- vbuaa=pbuc1_derefidx_vbuxx_ror_1 + lda PROTO_BOB,x + lsr + // [109] (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2 -- vbuaa=vbuaa_bor_vbuyy + sty.z $ff + ora.z $ff + // [110] *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) ← (byte~) shiftProtoBobRight::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // Shift value and add old carry + sta PROTO_BOB,x + // [111] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@5 -- vbuxx_ge_vbuc1_then_la1 + // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) + cpx #$30 + bcs __b5 + jmp __b7 + // shiftProtoBobRight::@7 + __b7: + // [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 -- vbuxx=vbuxx_plus_vbuc1 + txa + axs #-[$18] + // [113] phi from shiftProtoBobRight::@5 shiftProtoBobRight::@7 to shiftProtoBobRight::@6 [phi:shiftProtoBobRight::@5/shiftProtoBobRight::@7->shiftProtoBobRight::@6] + __b6_from___b5: + __b6_from___b7: + // [113] phi (byte) shiftProtoBobRight::j#10 = (byte) shiftProtoBobRight::j#1 [phi:shiftProtoBobRight::@5/shiftProtoBobRight::@7->shiftProtoBobRight::@6#0] -- register_copy + jmp __b6 + // shiftProtoBobRight::@6 + __b6: + // [114] (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [115] (byte) shiftProtoBobRight::carry#10 ← (byte) shiftProtoBobRight::carry#1 -- vbuyy=vbuz1 + ldy.z carry + // [101] phi from shiftProtoBobRight::@6 to shiftProtoBobRight::@1 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1] + __b1_from___b6: + // [101] phi (byte) shiftProtoBobRight::carry#2 = (byte) shiftProtoBobRight::carry#10 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#0] -- register_copy + // [101] phi (byte) shiftProtoBobRight::j#3 = (byte) shiftProtoBobRight::j#10 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#1] -- register_copy + // [101] phi (byte) shiftProtoBobRight::i#2 = (byte) shiftProtoBobRight::i#1 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#2] -- register_copy + jmp __b1 + // shiftProtoBobRight::@5 + __b5: + // [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f -- vbuxx=vbuxx_minus_vbuc1 + txa + axs #$2f + jmp __b6_from___b5 +} + // shiftProtoBobDown +// Shift PROTO_BOB down one Y pixel +// At the same time restore PROTO_BOB X by shifting 8 pixels left +shiftProtoBobDown: { + // [118] phi from shiftProtoBobDown to shiftProtoBobDown::@1 [phi:shiftProtoBobDown->shiftProtoBobDown::@1] + __b1_from_shiftProtoBobDown: + // [118] phi (byte) shiftProtoBobDown::i#2 = (byte) $17 [phi:shiftProtoBobDown->shiftProtoBobDown::@1#0] -- vbuxx=vbuc1 + ldx #$17 + jmp __b1 + // shiftProtoBobDown::@1 + __b1: + // [119] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 -- vbuxx_gt_0_then_la1 + cpx #0 + bne __b2 + jmp __b3 + // shiftProtoBobDown::@3 + __b3: + // [120] *((const byte*) PROTO_BOB) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB + // [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB+$18 + // [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB+$30 + jmp __breturn + // shiftProtoBobDown::@return + __breturn: + // [123] return + rts + // shiftProtoBobDown::@2 + __b2: + // [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda PROTO_BOB+$17,x + sta PROTO_BOB,x + // [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda PROTO_BOB+$2f,x + sta PROTO_BOB+$18,x + // [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta PROTO_BOB+$30,x + // [127] (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#2 -- vbuxx=_dec_vbuxx + dex + // [118] phi from shiftProtoBobDown::@2 to shiftProtoBobDown::@1 [phi:shiftProtoBobDown::@2->shiftProtoBobDown::@1] + __b1_from___b2: + // [118] phi (byte) shiftProtoBobDown::i#2 = (byte) shiftProtoBobDown::i#1 [phi:shiftProtoBobDown::@2->shiftProtoBobDown::@1#0] -- register_copy + jmp __b1 +} + // File Data + // The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars) + // The chars are layout as follows with data in chars 0, 1, 3, 4 initially + // 0 3 6 + // 1 4 7 + // 2 5 8 +PROTO_BOB: +.var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + + // Sine used for the X-coordinate +SIN_X_TAB: +.fill $200, 75.5+75.5*sin(i*2*PI/256) + // Sine used for the Y-coordinate +SIN_Y_TAB: +.fill $200, 91.5+91.5*sin(i*2*PI/256) + // Tables containing the char to use for a specific cell of a shifted BOB. + // char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x]; + BOB_TABLES: .fill 9*8*4, 0 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __b1 +Removing instruction jmp __bend +Removing instruction jmp vicSelectGfxBank1 +Removing instruction jmp vicSelectGfxBank1_toDd001 +Removing instruction jmp vicSelectGfxBank1___b1 +Removing instruction jmp toD0181 +Removing instruction jmp __b4 +Removing instruction jmp __b1 +Removing instruction jmp __b2 +Removing instruction jmp __b3 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp __b7 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b2 +Removing instruction jmp __b4 +Removing instruction jmp __b8 +Removing instruction jmp __b5 +Removing instruction jmp __b7 +Removing instruction jmp __b10 +Removing instruction jmp __b11 +Removing instruction jmp __b9 +Removing instruction jmp __b1 +Removing instruction jmp __b7 +Removing instruction jmp __b9 +Removing instruction jmp __breturn +Removing instruction jmp __b2 +Removing instruction jmp __b5 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b7 +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction ldy.z $ff +Replacing instruction lda #0 with TXA +Removing instruction lda #0 +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label __bbegin with __b1 +Replacing label __b1 with __b2 +Replacing label __breturn_from___b5 with __breturn +Replacing label __b3_from___b2 with __b3 +Replacing label __b6_from___b5 with __b6 +Removing instruction __bbegin: +Removing instruction __b1_from___bbegin: +Removing instruction main_from___b1: +Removing instruction __bend_from___b1: +Removing instruction vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: +Removing instruction vicSelectGfxBank1_toDd001: +Removing instruction toD0181_from_vicSelectGfxBank1___b1: +Removing instruction toD0181: +Removing instruction __b1: +Removing instruction __b4_from___b2: +Removing instruction shiftProtoBobDown_from___b4: +Removing instruction __b10_from___b7: +Removing instruction shiftProtoBobRight_from___b10: +Removing instruction bobCharsetFindOrAddGlyph_from___b6: +Removing instruction __breturn_from___b5: +Removing instruction __breturn_from___b9: +Removing instruction __b3_from___b2: +Removing instruction __b4_from___b3: +Removing instruction __b6_from___b5: +Removing instruction __b6_from___b7: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __bend: +Removing instruction prepareBobs_from_main: +Removing instruction vicSelectGfxBank1: +Removing instruction vicSelectGfxBank1___b1: +Removing instruction __b4: +Removing instruction memset_from___b4: +Removing instruction __b1_from___b4: +Removing instruction __b3: +Removing instruction renderBob_from___b3: +Removing instruction __b5: +Removing instruction renderBob_from___b5: +Removing instruction __b6: +Removing instruction renderBob_from___b6: +Removing instruction __b7: +Removing instruction __b1_from___b7: +Removing instruction __breturn: +Removing instruction __b1_from_memset: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Removing instruction bobCharsetFindOrAddGlyph_from_prepareBobs: +Removing instruction __b1_from_prepareBobs: +Removing instruction __breturn: +Removing instruction __b4: +Removing instruction __b8: +Removing instruction __b1_from___b8: +Removing instruction __b5_from___b3: +Removing instruction __b7: +Removing instruction shiftProtoBobRight_from___b7: +Removing instruction __b10: +Removing instruction __b11: +Removing instruction __b2_from___b11: +Removing instruction __b9: +Removing instruction __b5_from___b9: +Removing instruction __b1_from_bobCharsetFindOrAddGlyph: +Removing instruction __b7_from___b1: +Removing instruction __b9: +Removing instruction __b7_from___b8: +Removing instruction __b5_from___b2: +Removing instruction __b5_from___b3: +Removing instruction __b1_from___b6: +Removing instruction __b2_from___b4: +Removing instruction __b1_from_shiftProtoBobRight: +Removing instruction __breturn: +Removing instruction __b4_from___b2: +Removing instruction __b7: +Removing instruction __b1_from___b6: +Removing instruction __b1_from_shiftProtoBobDown: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Replacing jump to rts with rts in jmp __breturn +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label __b2_from___b1 to b1 +Relabelling long label __b2_from___b1 to b1 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction __b1: +Removing instruction __breturn: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(const byte*) BOB_CHARSET = (byte*) 24576 +(const byte) BOB_SHIFTS_X = (number) 4 +(const byte) BOB_SHIFTS_Y = (number) 8 +(const byte) BOB_SUBTABLE_SIZE = (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y +(const byte*) BOB_TABLES = { fill( 9*8*4, 0) } +(const byte*) BORDERCOL = (byte*) 53280 +(const byte*) CIA2_PORT_A = (byte*) 56576 +(const byte*) CIA2_PORT_A_DDR = (byte*) 56578 +(const byte*) D018 = (byte*) 53272 +(const byte*) PROTO_BOB = kickasm {{ .var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + }} +(const byte*) RASTER = (byte*) 53266 +(const byte*) SCREEN = (byte*) 16384 +(const byte*) SIN_X_TAB = kickasm {{ .fill $200, 75.5+75.5*sin(i*2*PI/256) }} +(const byte*) SIN_Y_TAB = kickasm {{ .fill $200, 91.5+91.5*sin(i*2*PI/256) }} +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +(label) bobCharsetFindOrAddGlyph::@1 +(label) bobCharsetFindOrAddGlyph::@2 +(label) bobCharsetFindOrAddGlyph::@3 +(label) bobCharsetFindOrAddGlyph::@4 +(label) bobCharsetFindOrAddGlyph::@5 +(label) bobCharsetFindOrAddGlyph::@6 +(label) bobCharsetFindOrAddGlyph::@7 +(label) bobCharsetFindOrAddGlyph::@8 +(label) bobCharsetFindOrAddGlyph::@9 +(label) bobCharsetFindOrAddGlyph::@return +(byte*) bobCharsetFindOrAddGlyph::bob_glyph +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 bob_glyph zp[2]:5 2002.0 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 bob_glyph zp[2]:5 7400.200000000001 +(byte) bobCharsetFindOrAddGlyph::found +(byte) bobCharsetFindOrAddGlyph::found#2 reg byte a 10001.0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 glyph_cursor zp[2]:12 20002.0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 glyph_cursor zp[2]:12 10000.307692307691 +(byte) bobCharsetFindOrAddGlyph::glyph_id +(byte) bobCharsetFindOrAddGlyph::glyph_id#1 glyph_id zp[1]:9 10001.0 +(byte) bobCharsetFindOrAddGlyph::glyph_id#11 glyph_id zp[1]:9 1937.75 +(byte) bobCharsetFindOrAddGlyph::i +(byte) bobCharsetFindOrAddGlyph::i#1 i zp[1]:7 200002.0 +(byte) bobCharsetFindOrAddGlyph::i#2 i zp[1]:7 166668.3333333333 +(byte) bobCharsetFindOrAddGlyph::i1 +(byte) bobCharsetFindOrAddGlyph::i1#1 reg byte x 20002.0 +(byte) bobCharsetFindOrAddGlyph::i1#2 reg byte x 16668.333333333332 +(byte) bobCharsetFindOrAddGlyph::return +(byte) bobCharsetFindOrAddGlyph::return#1 reg byte a 2002.0 +(byte) bob_charset_next_id +(byte) bob_charset_next_id#14 bob_charset_next_id zp[1]:14 12.0 +(byte) bob_charset_next_id#16 bob_charset_next_id zp[1]:14 1100.6000000000001 +(byte) bob_charset_next_id#21 bob_charset_next_id zp[1]:14 275.5 +(byte) bob_charset_next_id#23 bob_charset_next_id zp[1]:14 1400.3333333333335 +(byte) bob_charset_next_id#30 bob_charset_next_id zp[1]:14 37.33333333333333 +(byte) bob_charset_next_id#8 bob_charset_next_id zp[1]:14 4.0 +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(byte) main::sin_x_idx +(byte) main::sin_x_idx#1 sin_x_idx zp[1]:2 7.333333333333333 +(byte) main::sin_x_idx#7 sin_x_idx zp[1]:2 4.583333333333333 +(byte) main::sin_y_idx +(byte) main::sin_y_idx#1 sin_y_idx zp[1]:3 11.0 +(byte) main::sin_y_idx#7 sin_y_idx zp[1]:3 4.230769230769231 +(label) main::toD0181 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) BOB_CHARSET/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(label) main::vicSelectGfxBank1 +(label) main::vicSelectGfxBank1_@1 +(byte*) main::vicSelectGfxBank1_gfx +(label) main::vicSelectGfxBank1_toDd001 +(byte*) main::vicSelectGfxBank1_toDd001_gfx +(byte) main::vicSelectGfxBank1_toDd001_return +(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) SCREEN/(byte) $40 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(label) memset::@1 +(label) memset::@2 +(label) memset::@return +(byte) memset::c +(const byte) memset::c#0 c = (byte) 0 +(byte*) memset::dst +(byte*) memset::dst#1 dst zp[2]:5 22.0 +(byte*) memset::dst#2 dst zp[2]:5 14.666666666666666 +(byte*) memset::end +(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 +(word) memset::num +(const word) memset::num#0 num = (word) $3e8 +(void*) memset::return +(void*) memset::str +(const void*) memset::str#0 str = (void*)(const byte*) SCREEN +(void()) prepareBobs() +(byte~) prepareBobs::$5 reg byte a 2002.0 +(label) prepareBobs::@1 +(label) prepareBobs::@10 +(label) prepareBobs::@11 +(label) prepareBobs::@2 +(label) prepareBobs::@3 +(label) prepareBobs::@4 +(label) prepareBobs::@5 +(label) prepareBobs::@6 +(label) prepareBobs::@7 +(label) prepareBobs::@8 +(label) prepareBobs::@9 +(label) prepareBobs::@return +(byte*) prepareBobs::bob_glyph +(byte*) prepareBobs::bob_glyph#1 bob_glyph zp[2]:5 667.3333333333334 +(byte*) prepareBobs::bob_glyph#2 bob_glyph zp[2]:5 429.0 +(byte*) prepareBobs::bob_table +(byte*) prepareBobs::bob_table#0 bob_table zp[2]:10 202.0 +(byte*) prepareBobs::bob_table#1 bob_table zp[2]:10 1001.0 +(byte*) prepareBobs::bob_table#2 bob_table zp[2]:10 388.0 +(byte) prepareBobs::bob_table_idx +(byte) prepareBobs::bob_table_idx#1 bob_table_idx zp[1]:3 40.4 +(byte) prepareBobs::bob_table_idx#12 bob_table_idx zp[1]:3 20.3125 +(byte) prepareBobs::bob_table_idx#6 bob_table_idx zp[1]:3 11.0 +(byte) prepareBobs::cell +(byte) prepareBobs::cell#1 cell zp[1]:8 2002.0 +(byte) prepareBobs::cell#2 cell zp[1]:8 333.6666666666667 +(byte) prepareBobs::shift_x +(byte) prepareBobs::shift_x#1 shift_x zp[1]:4 202.0 +(byte) prepareBobs::shift_x#2 shift_x zp[1]:4 17.823529411764707 +(byte) prepareBobs::shift_y +(byte) prepareBobs::shift_y#1 shift_y zp[1]:2 22.0 +(byte) prepareBobs::shift_y#2 shift_y zp[1]:2 1.5 +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +(word~) renderBob::$10 zp[2]:12 4.0 +(word~) renderBob::$11 zp[2]:10 4.0 +(word~) renderBob::$2 zp[2]:10 3.0 +(byte*~) renderBob::$4 zp[2]:10 4.0 +(byte~) renderBob::$6 reg byte a 4.0 +(byte~) renderBob::$7 zp[1]:14 2.0 +(byte~) renderBob::$8 reg byte a 4.0 +(label) renderBob::@return +(byte) renderBob::bob_table_idx +(byte) renderBob::bob_table_idx#0 reg byte x 2.2222222222222228 +(byte*) renderBob::screen +(byte*) renderBob::screen#0 screen zp[2]:10 1.5384615384615383 +(byte) renderBob::x_char_offset +(byte) renderBob::x_char_offset#0 reg byte y 0.5714285714285714 +(byte) renderBob::xpos +(byte) renderBob::xpos#0 xpos zp[1]:4 11.0 +(byte) renderBob::xpos#1 xpos zp[1]:4 11.0 +(byte) renderBob::xpos#2 xpos zp[1]:4 11.0 +(byte) renderBob::xpos#3 xpos zp[1]:4 3.3636363636363633 +(byte) renderBob::y_char_offset +(byte) renderBob::y_char_offset#0 reg byte a 2.0 +(word) renderBob::y_offset +(word) renderBob::y_offset#0 y_offset zp[2]:10 4.0 +(byte) renderBob::ypos +(byte) renderBob::ypos#0 reg byte x 22.0 +(byte) renderBob::ypos#1 reg byte x 22.0 +(byte) renderBob::ypos#2 reg byte x 22.0 +(byte) renderBob::ypos#3 reg byte x 4.111111111111112 +(void()) shiftProtoBobDown() +(label) shiftProtoBobDown::@1 +(label) shiftProtoBobDown::@2 +(label) shiftProtoBobDown::@3 +(label) shiftProtoBobDown::@return +(byte) shiftProtoBobDown::i +(byte) shiftProtoBobDown::i#1 reg byte x 202.0 +(byte) shiftProtoBobDown::i#2 reg byte x 161.6 +(void()) shiftProtoBobRight() +(byte~) shiftProtoBobRight::$1 reg byte a 2002.0 +(byte~) shiftProtoBobRight::$5 reg byte a 2002.0 +(byte~) shiftProtoBobRight::$6 reg byte a 2002.0 +(label) shiftProtoBobRight::@1 +(label) shiftProtoBobRight::@2 +(label) shiftProtoBobRight::@3 +(label) shiftProtoBobRight::@4 +(label) shiftProtoBobRight::@5 +(label) shiftProtoBobRight::@6 +(label) shiftProtoBobRight::@7 +(label) shiftProtoBobRight::@return +(byte) shiftProtoBobRight::carry +(byte) shiftProtoBobRight::carry#1 carry zp[1]:9 111.22222222222223 +(byte) shiftProtoBobRight::carry#10 reg byte y 2002.0 +(byte) shiftProtoBobRight::carry#2 reg byte y 286.0 +(byte) shiftProtoBobRight::i +(byte) shiftProtoBobRight::i#1 i zp[1]:8 1001.0 +(byte) shiftProtoBobRight::i#2 i zp[1]:8 231.0 +(byte) shiftProtoBobRight::j +(byte) shiftProtoBobRight::j#1 reg byte x 2002.0 +(byte) shiftProtoBobRight::j#10 reg byte x 1001.0 +(byte) shiftProtoBobRight::j#2 reg byte x 2002.0 +(byte) shiftProtoBobRight::j#3 reg byte x 700.7 +(byte) shiftProtoBobRight::new_carry + +reg byte x [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] +zp[1]:2 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 main::sin_x_idx#7 main::sin_x_idx#1 ] +zp[1]:3 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 main::sin_y_idx#7 main::sin_y_idx#1 ] +zp[1]:4 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +zp[2]:5 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 memset::dst#2 memset::dst#1 ] +reg byte x [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +zp[1]:7 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +reg byte a [ bobCharsetFindOrAddGlyph::found#2 ] +zp[1]:8 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 prepareBobs::cell#2 prepareBobs::cell#1 ] +reg byte x [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] +reg byte y [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] +zp[1]:9 [ shiftProtoBobRight::carry#1 bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +reg byte x [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +reg byte y [ renderBob::x_char_offset#0 ] +reg byte a [ renderBob::y_char_offset#0 ] +zp[2]:10 [ renderBob::$2 renderBob::$11 renderBob::y_offset#0 renderBob::$4 renderBob::screen#0 prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] +zp[2]:12 [ renderBob::$10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] +reg byte a [ renderBob::$6 ] +zp[1]:14 [ renderBob::$7 bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +reg byte a [ renderBob::$8 ] +reg byte x [ renderBob::bob_table_idx#0 ] +reg byte a [ bobCharsetFindOrAddGlyph::return#1 ] +reg byte a [ prepareBobs::$5 ] +reg byte a [ shiftProtoBobRight::$1 ] +reg byte a [ shiftProtoBobRight::$5 ] +reg byte a [ shiftProtoBobRight::$6 ] + + +FINAL ASSEMBLER +Score: 5836895 + + // File Comments +// Pre-calculated bobs inside a charset (pre-mpved to all x/y-combinations) + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label D018 = $d018 + // CIA#2 Port A: Serial bus, RS-232, VIC memory bank + .label CIA2_PORT_A = $dd00 + // CIA #2 Port A data direction register. + .label CIA2_PORT_A_DDR = $dd02 + // The screen + .label SCREEN = $4000 + // The charset that will receive the shifted bobs + .label BOB_CHARSET = $6000 + // The number of different X-shifts + .const BOB_SHIFTS_X = 4 + // The number of different Y-shifts + .const BOB_SHIFTS_Y = 8 + // The size of a sub-table of BOB_TABLES + .const BOB_SUBTABLE_SIZE = BOB_SHIFTS_X*BOB_SHIFTS_Y + // BOB charset ID of the next glyph to be added + .label bob_charset_next_id = $e + // @begin + // [1] phi from @begin to @1 [phi:@begin->@1] + // @1 + // [2] call main + // [4] phi from @1 to main [phi:@1->main] + // [3] phi from @1 to @end [phi:@1->@end] + // @end + // main +main: { + .const vicSelectGfxBank1_toDd001_return = 3^(>SCREEN)/$40 + .const toD0181_return = (>BOB_CHARSET)/4&$f + /* + // Display some BOBs + char* screen = SCREEN; + char bob_table_idx = 0; + for(char i:0..7) { + for(char j:0..3) { + screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx]; + screen += 120; + bob_table_idx++; + } + screen -= (120*4)-3; + } + */ + .label sin_x_idx = 2 + .label sin_y_idx = 3 + // prepareBobs() + // [5] call prepareBobs + // [56] phi from main to prepareBobs [phi:main->prepareBobs] + jsr prepareBobs + // main::vicSelectGfxBank1 + // *CIA2_PORT_A_DDR = %00000011 + // [6] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 + lda #3 + sta CIA2_PORT_A_DDR + // [7] phi from main::vicSelectGfxBank1 to main::vicSelectGfxBank1_toDd001 [phi:main::vicSelectGfxBank1->main::vicSelectGfxBank1_toDd001] + // main::vicSelectGfxBank1_toDd001 + // main::vicSelectGfxBank1_@1 + // *CIA2_PORT_A = toDd00(gfx) + // [8] *((const byte*) CIA2_PORT_A) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + lda #vicSelectGfxBank1_toDd001_return + sta CIA2_PORT_A + // [9] phi from main::vicSelectGfxBank1_@1 to main::toD0181 [phi:main::vicSelectGfxBank1_@1->main::toD0181] + // main::toD0181 + // main::@4 + // *D018 = toD018(SCREEN, BOB_CHARSET) + // [10] *((const byte*) D018) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + // memset(SCREEN, 0x00, 1000) + // [11] call memset + // [50] phi from main::@4 to memset [phi:main::@4->memset] + jsr memset + // [12] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + // [12] phi (byte) main::sin_y_idx#7 = (byte) $49 [phi:main::@4->main::@1#0] -- vbuz1=vbuc1 + lda #$49 + sta.z sin_y_idx + // [12] phi (byte) main::sin_x_idx#7 = (byte) 0 [phi:main::@4->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z sin_x_idx + // main::@1 + // main::@2 + __b2: + // while (*RASTER!=$ff) + // [13] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + lda #$ff + cmp RASTER + bne __b2 + // main::@3 + // (*BORDERCOL)++; + // [14] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDERCOL + // renderBob((SIN_X_TAB)[sin_x_idx], (SIN_Y_TAB)[sin_y_idx]) + // [15] (byte) renderBob::xpos#0 ← *((const byte*) SIN_X_TAB + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB,y + sta.z renderBob.xpos + // [16] (byte) renderBob::ypos#0 ← *((const byte*) SIN_Y_TAB + (byte) main::sin_y_idx#7) -- vbuxx=pbuc1_derefidx_vbuz1 + ldy.z sin_y_idx + ldx SIN_Y_TAB,y + // [17] call renderBob + // [27] phi from main::@3 to renderBob [phi:main::@3->renderBob] + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#0 [phi:main::@3->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#0 [phi:main::@3->renderBob#1] -- register_copy + jsr renderBob + // main::@5 + // renderBob((SIN_X_TAB+15)[sin_x_idx], (SIN_Y_TAB+11)[sin_y_idx]) + // [18] (byte) renderBob::xpos#1 ← *((const byte*) SIN_X_TAB+(byte) $f + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB+$f,y + sta.z renderBob.xpos + // [19] (byte) renderBob::ypos#1 ← *((const byte*) SIN_Y_TAB+(byte) $b + (byte) main::sin_y_idx#7) -- vbuxx=pbuc1_derefidx_vbuz1 + ldy.z sin_y_idx + ldx SIN_Y_TAB+$b,y + // [20] call renderBob + // [27] phi from main::@5 to renderBob [phi:main::@5->renderBob] + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#1 [phi:main::@5->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#1 [phi:main::@5->renderBob#1] -- register_copy + jsr renderBob + // main::@6 + // renderBob((SIN_X_TAB+22)[sin_x_idx], (SIN_Y_TAB+30)[sin_y_idx]) + // [21] (byte) renderBob::xpos#2 ← *((const byte*) SIN_X_TAB+(byte) $16 + (byte) main::sin_x_idx#7) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z sin_x_idx + lda SIN_X_TAB+$16,y + sta.z renderBob.xpos + // [22] (byte) renderBob::ypos#2 ← *((const byte*) SIN_Y_TAB+(byte) $1e + (byte) main::sin_y_idx#7) -- vbuxx=pbuc1_derefidx_vbuz1 + ldy.z sin_y_idx + ldx SIN_Y_TAB+$1e,y + // [23] call renderBob + // [27] phi from main::@6 to renderBob [phi:main::@6->renderBob] + // [27] phi (byte) renderBob::ypos#3 = (byte) renderBob::ypos#2 [phi:main::@6->renderBob#0] -- register_copy + // [27] phi (byte) renderBob::xpos#3 = (byte) renderBob::xpos#2 [phi:main::@6->renderBob#1] -- register_copy + jsr renderBob + // main::@7 + // sin_x_idx++; + // [24] (byte) main::sin_x_idx#1 ← ++ (byte) main::sin_x_idx#7 -- vbuz1=_inc_vbuz1 + inc.z sin_x_idx + // sin_y_idx++; + // [25] (byte) main::sin_y_idx#1 ← ++ (byte) main::sin_y_idx#7 -- vbuz1=_inc_vbuz1 + inc.z sin_y_idx + // (*BORDERCOL)--; + // [26] *((const byte*) BORDERCOL) ← -- *((const byte*) BORDERCOL) -- _deref_pbuc1=_dec__deref_pbuc1 + dec BORDERCOL + // [12] phi from main::@7 to main::@1 [phi:main::@7->main::@1] + // [12] phi (byte) main::sin_y_idx#7 = (byte) main::sin_y_idx#1 [phi:main::@7->main::@1#0] -- register_copy + // [12] phi (byte) main::sin_x_idx#7 = (byte) main::sin_x_idx#1 [phi:main::@7->main::@1#1] -- register_copy + jmp __b2 +} + // renderBob +// Render a single BOB at a given x/y-position +// X-position is 0-151. Each x-position is 2 pixels wide. +// Y-position is 0-183. Each y-position is 1 pixel high. +// renderBob(byte zeropage(4) xpos, byte register(X) ypos) +renderBob: { + .label __2 = $a + .label __4 = $a + .label __7 = $e + .label xpos = 4 + .label y_offset = $a + .label screen = $a + .label __10 = $c + .label __11 = $a + // x_char_offset = xpos/BOB_SHIFTS_X + // [28] (byte) renderBob::x_char_offset#0 ← (byte) renderBob::xpos#3 >> (byte) 2 -- vbuyy=vbuz1_ror_2 + lda.z xpos + lsr + lsr + tay + // y_char_offset = ypos/BOB_SHIFTS_Y + // [29] (byte) renderBob::y_char_offset#0 ← (byte) renderBob::ypos#3 >> (byte) 3 -- vbuaa=vbuxx_ror_3 + txa + lsr + lsr + lsr + // (unsigned int)y_char_offset + // [30] (word~) renderBob::$2 ← (word)(byte) renderBob::y_char_offset#0 -- vwuz1=_word_vbuaa + sta.z __2 + lda #0 + sta.z __2+1 + // y_offset = (unsigned int)y_char_offset*40 + // [31] (word~) renderBob::$10 ← (word~) renderBob::$2 << (byte) 2 -- vwuz1=vwuz2_rol_2 + lda.z __2 + asl + sta.z __10 + lda.z __2+1 + rol + sta.z __10+1 + asl.z __10 + rol.z __10+1 + // [32] (word~) renderBob::$11 ← (word~) renderBob::$10 + (word~) renderBob::$2 -- vwuz1=vwuz2_plus_vwuz1 + lda.z __11 + clc + adc.z __10 + sta.z __11 + lda.z __11+1 + adc.z __10+1 + sta.z __11+1 + // [33] (word) renderBob::y_offset#0 ← (word~) renderBob::$11 << (byte) 3 -- vwuz1=vwuz1_rol_3 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + asl.z y_offset + rol.z y_offset+1 + // SCREEN+y_offset + // [34] (byte*~) renderBob::$4 ← (const byte*) SCREEN + (word) renderBob::y_offset#0 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda.z __4 + adc #SCREEN + sta.z __4+1 + // screen = SCREEN+y_offset+x_char_offset + // [35] (byte*) renderBob::screen#0 ← (byte*~) renderBob::$4 + (byte) renderBob::x_char_offset#0 -- pbuz1=pbuz1_plus_vbuyy + tya + clc + adc.z screen + sta.z screen + bcc !+ + inc.z screen+1 + !: + // ypos&7 + // [36] (byte~) renderBob::$6 ← (byte) renderBob::ypos#3 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + // (ypos&7)*BOB_SHIFTS_X + // [37] (byte~) renderBob::$7 ← (byte~) renderBob::$6 << (byte) 2 -- vbuz1=vbuaa_rol_2 + asl + asl + sta.z __7 + // xpos&3 + // [38] (byte~) renderBob::$8 ← (byte) renderBob::xpos#3 & (byte) 3 -- vbuaa=vbuz1_band_vbuc1 + lda #3 + and.z xpos + // bob_table_idx = (ypos&7)*BOB_SHIFTS_X+(xpos&3) + // [39] (byte) renderBob::bob_table_idx#0 ← (byte~) renderBob::$7 + (byte~) renderBob::$8 -- vbuxx=vbuz1_plus_vbuaa + clc + adc.z __7 + tax + // screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [40] *((byte*) renderBob::screen#0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda BOB_TABLES,x + ldy #0 + sta (screen),y + // screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [41] *((byte*) renderBob::screen#0 + (byte) $28) ← *((const byte*) BOB_TABLES+(byte) 1*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,x + ldy #$28 + sta (screen),y + // screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [42] *((byte*) renderBob::screen#0 + (byte) $50) ← *((const byte*) BOB_TABLES+(byte) 2*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,x + ldy #$50 + sta (screen),y + // screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [43] *((byte*) renderBob::screen#0 + (byte) 1) ← *((const byte*) BOB_TABLES+(byte) 3*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,x + ldy #1 + sta (screen),y + // screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [44] *((byte*) renderBob::screen#0 + (byte) $29) ← *((const byte*) BOB_TABLES+(byte) 4*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,x + ldy #$29 + sta (screen),y + // screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [45] *((byte*) renderBob::screen#0 + (byte) $51) ← *((const byte*) BOB_TABLES+(byte) 5*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,x + ldy #$51 + sta (screen),y + // screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [46] *((byte*) renderBob::screen#0 + (byte) 2) ← *((const byte*) BOB_TABLES+(byte) 6*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,x + ldy #2 + sta (screen),y + // screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [47] *((byte*) renderBob::screen#0 + (byte) $2a) ← *((const byte*) BOB_TABLES+(byte) 7*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,x + ldy #$2a + sta (screen),y + // screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx] + // [48] *((byte*) renderBob::screen#0 + (byte) $52) ← *((const byte*) BOB_TABLES+(byte) 8*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) -- pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx + lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,x + ldy #$52 + sta (screen),y + // renderBob::@return + // } + // [49] return + rts +} + // memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +memset: { + .label str = SCREEN + .const c = 0 + .const num = $3e8 + .label end = str+num + .label dst = 5 + // [51] phi from memset to memset::@1 [phi:memset->memset::@1] + // [51] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 + lda #str + sta.z dst+1 + // memset::@1 + __b1: + // for(char* dst = str; dst!=end; dst++) + // [52] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2 -- pbuz1_neq_pbuc1_then_la1 + lda.z dst+1 + cmp #>end + bne __b2 + lda.z dst + cmp #memset::@1] + // [51] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@2->memset::@1#0] -- register_copy + jmp __b1 +} + // prepareBobs +// Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES +// Modifies PROTO_BOB by shifting it around +prepareBobs: { + .label bob_table = $a + .label shift_y = 2 + // Populate charset and tables + .label bob_glyph = 5 + .label cell = 8 + .label bob_table_idx = 3 + .label shift_x = 4 + // bobCharsetFindOrAddGlyph(PROTO_BOB+48) + // [57] call bobCharsetFindOrAddGlyph + // [82] phi from prepareBobs to bobCharsetFindOrAddGlyph [phi:prepareBobs->bobCharsetFindOrAddGlyph] + // [82] phi (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 = (const byte*) PROTO_BOB+(byte) $30 [phi:prepareBobs->bobCharsetFindOrAddGlyph#0] -- pbuz1=pbuc1 + lda #PROTO_BOB+$30 + sta.z bobCharsetFindOrAddGlyph.bob_glyph+1 + // [82] phi (byte) bob_charset_next_id#23 = (byte) 0 [phi:prepareBobs->bobCharsetFindOrAddGlyph#1] -- vbuz1=vbuc1 + lda #0 + sta.z bob_charset_next_id + jsr bobCharsetFindOrAddGlyph + // [58] phi from prepareBobs to prepareBobs::@1 [phi:prepareBobs->prepareBobs::@1] + // [58] phi (byte) prepareBobs::bob_table_idx#6 = (byte) 0 [phi:prepareBobs->prepareBobs::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z bob_table_idx + // [58] phi (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#16 [phi:prepareBobs->prepareBobs::@1#1] -- register_copy + // [58] phi (byte) prepareBobs::shift_y#2 = (byte) 0 [phi:prepareBobs->prepareBobs::@1#2] -- vbuz1=vbuc1 + sta.z shift_y + // prepareBobs::@1 + __b1: + // for(char shift_y=0;shift_yprepareBobs::@2] + b1: + // [61] phi (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#14 [phi:prepareBobs::@1->prepareBobs::@2#0] -- register_copy + // [61] phi (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#6 [phi:prepareBobs::@1->prepareBobs::@2#1] -- register_copy + // [61] phi (byte) prepareBobs::shift_x#2 = (byte) 0 [phi:prepareBobs::@1->prepareBobs::@2#2] -- vbuz1=vbuc1 + lda #0 + sta.z shift_x + // prepareBobs::@2 + __b2: + // for(char shift_x=0;shift_xprepareBobs::@4] + // prepareBobs::@4 + // shiftProtoBobDown() + // [64] call shiftProtoBobDown + // [117] phi from prepareBobs::@4 to shiftProtoBobDown [phi:prepareBobs::@4->shiftProtoBobDown] + jsr shiftProtoBobDown + // prepareBobs::@8 + // for(char shift_y=0;shift_yprepareBobs::@1] + // [58] phi (byte) prepareBobs::bob_table_idx#6 = (byte) prepareBobs::bob_table_idx#12 [phi:prepareBobs::@8->prepareBobs::@1#0] -- register_copy + // [58] phi (byte) bob_charset_next_id#14 = (byte) bob_charset_next_id#30 [phi:prepareBobs::@8->prepareBobs::@1#1] -- register_copy + // [58] phi (byte) prepareBobs::shift_y#2 = (byte) prepareBobs::shift_y#1 [phi:prepareBobs::@8->prepareBobs::@1#2] -- register_copy + jmp __b1 + // prepareBobs::@3 + __b3: + // bob_table = BOB_TABLES + bob_table_idx + // [66] (byte*) prepareBobs::bob_table#0 ← (const byte*) BOB_TABLES + (byte) prepareBobs::bob_table_idx#12 -- pbuz1=pbuc1_plus_vbuz2 + lda.z bob_table_idx + clc + adc #BOB_TABLES + adc #0 + sta.z bob_table+1 + // [67] phi from prepareBobs::@3 to prepareBobs::@5 [phi:prepareBobs::@3->prepareBobs::@5] + // [67] phi (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#0 [phi:prepareBobs::@3->prepareBobs::@5#0] -- register_copy + // [67] phi (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#30 [phi:prepareBobs::@3->prepareBobs::@5#1] -- register_copy + // [67] phi (byte*) prepareBobs::bob_glyph#2 = (const byte*) PROTO_BOB [phi:prepareBobs::@3->prepareBobs::@5#2] -- pbuz1=pbuc1 + lda #PROTO_BOB + sta.z bob_glyph+1 + // [67] phi (byte) prepareBobs::cell#2 = (byte) 0 [phi:prepareBobs::@3->prepareBobs::@5#3] -- vbuz1=vbuc1 + lda #0 + sta.z cell + // prepareBobs::@5 + __b5: + // for(char cell = 0; cell<9; cell++) + // [68] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@6 -- vbuz1_lt_vbuc1_then_la1 + lda.z cell + cmp #9 + bcc __b6 + // prepareBobs::@7 + // bob_table_idx++; + // [69] (byte) prepareBobs::bob_table_idx#1 ← ++ (byte) prepareBobs::bob_table_idx#12 -- vbuz1=_inc_vbuz1 + inc.z bob_table_idx + // shiftProtoBobRight() + // [70] call shiftProtoBobRight + // [100] phi from prepareBobs::@7 to shiftProtoBobRight [phi:prepareBobs::@7->shiftProtoBobRight] + jsr shiftProtoBobRight + // [71] phi from prepareBobs::@7 to prepareBobs::@10 [phi:prepareBobs::@7->prepareBobs::@10] + // prepareBobs::@10 + // shiftProtoBobRight() + // [72] call shiftProtoBobRight + // [100] phi from prepareBobs::@10 to shiftProtoBobRight [phi:prepareBobs::@10->shiftProtoBobRight] + jsr shiftProtoBobRight + // prepareBobs::@11 + // for(char shift_x=0;shift_xprepareBobs::@2] + // [61] phi (byte) bob_charset_next_id#30 = (byte) bob_charset_next_id#21 [phi:prepareBobs::@11->prepareBobs::@2#0] -- register_copy + // [61] phi (byte) prepareBobs::bob_table_idx#12 = (byte) prepareBobs::bob_table_idx#1 [phi:prepareBobs::@11->prepareBobs::@2#1] -- register_copy + // [61] phi (byte) prepareBobs::shift_x#2 = (byte) prepareBobs::shift_x#1 [phi:prepareBobs::@11->prepareBobs::@2#2] -- register_copy + jmp __b2 + // prepareBobs::@6 + __b6: + // bobCharsetFindOrAddGlyph(bob_glyph) + // [74] (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + // [75] call bobCharsetFindOrAddGlyph + // [82] phi from prepareBobs::@6 to bobCharsetFindOrAddGlyph [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph] + // [82] phi (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 = (byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph#0] -- register_copy + // [82] phi (byte) bob_charset_next_id#23 = (byte) bob_charset_next_id#21 [phi:prepareBobs::@6->bobCharsetFindOrAddGlyph#1] -- register_copy + jsr bobCharsetFindOrAddGlyph + // bobCharsetFindOrAddGlyph(bob_glyph) + // [76] (byte) bobCharsetFindOrAddGlyph::return#1 ← (byte) bobCharsetFindOrAddGlyph::glyph_id#11 -- vbuaa=vbuz1 + lda.z bobCharsetFindOrAddGlyph.glyph_id + // prepareBobs::@9 + // [77] (byte~) prepareBobs::$5 ← (byte) bobCharsetFindOrAddGlyph::return#1 + // *bob_table = bobCharsetFindOrAddGlyph(bob_glyph) + // [78] *((byte*) prepareBobs::bob_table#2) ← (byte~) prepareBobs::$5 -- _deref_pbuz1=vbuaa + // Look for an existing char in BOB_CHARSET + ldy #0 + sta (bob_table),y + // bob_glyph+=8 + // [79] (byte*) prepareBobs::bob_glyph#1 ← (byte*) prepareBobs::bob_glyph#2 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + // Move to the next glyph + lda #8 + clc + adc.z bob_glyph + sta.z bob_glyph + bcc !+ + inc.z bob_glyph+1 + !: + // bob_table += BOB_SHIFTS_X*BOB_SHIFTS_Y + // [80] (byte*) prepareBobs::bob_table#1 ← (byte*) prepareBobs::bob_table#2 + (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y -- pbuz1=pbuz1_plus_vbuc1 + // Move to the next sub-table + lda #BOB_SHIFTS_X*BOB_SHIFTS_Y + clc + adc.z bob_table + sta.z bob_table + bcc !+ + inc.z bob_table+1 + !: + // for(char cell = 0; cell<9; cell++) + // [81] (byte) prepareBobs::cell#1 ← ++ (byte) prepareBobs::cell#2 -- vbuz1=_inc_vbuz1 + inc.z cell + // [67] phi from prepareBobs::@9 to prepareBobs::@5 [phi:prepareBobs::@9->prepareBobs::@5] + // [67] phi (byte*) prepareBobs::bob_table#2 = (byte*) prepareBobs::bob_table#1 [phi:prepareBobs::@9->prepareBobs::@5#0] -- register_copy + // [67] phi (byte) bob_charset_next_id#21 = (byte) bob_charset_next_id#16 [phi:prepareBobs::@9->prepareBobs::@5#1] -- register_copy + // [67] phi (byte*) prepareBobs::bob_glyph#2 = (byte*) prepareBobs::bob_glyph#1 [phi:prepareBobs::@9->prepareBobs::@5#2] -- register_copy + // [67] phi (byte) prepareBobs::cell#2 = (byte) prepareBobs::cell#1 [phi:prepareBobs::@9->prepareBobs::@5#3] -- register_copy + jmp __b5 +} + // bobCharsetFindOrAddGlyph +// Looks through BOB_CHARSET to find the passed bob glyph if present. +// If not present it is added +// Returns the glyph ID +// bobCharsetFindOrAddGlyph(byte* zeropage(5) bob_glyph) +bobCharsetFindOrAddGlyph: { + .label bob_glyph = 5 + .label i = 7 + .label glyph_id = 9 + .label glyph_cursor = $c + // [83] phi from bobCharsetFindOrAddGlyph to bobCharsetFindOrAddGlyph::@1 [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1] + // [83] phi (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (const byte*) BOB_CHARSET [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1#0] -- pbuz1=pbuc1 + lda #BOB_CHARSET + sta.z glyph_cursor+1 + // [83] phi (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) 0 [phi:bobCharsetFindOrAddGlyph->bobCharsetFindOrAddGlyph::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z glyph_id + // bobCharsetFindOrAddGlyph::@1 + __b1: + // while(glyph_id!=bob_charset_next_id) + // [84] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 -- vbuz1_neq_vbuz2_then_la1 + lda.z glyph_id + cmp.z bob_charset_next_id + bne b1 + // [85] phi from bobCharsetFindOrAddGlyph::@1 to bobCharsetFindOrAddGlyph::@7 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@7] + // [85] phi (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@7#0] -- vbuxx=vbuc1 + ldx #0 + // Not found - add it + // bobCharsetFindOrAddGlyph::@7 + __b7: + // for(char i=0;i<8;i++) + // [86] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@8 -- vbuxx_lt_vbuc1_then_la1 + cpx #8 + bcc __b8 + // bobCharsetFindOrAddGlyph::@9 + // bob_charset_next_id++; + // [87] (byte) bob_charset_next_id#8 ← ++ (byte) bob_charset_next_id#23 -- vbuz1=_inc_vbuz1 + inc.z bob_charset_next_id + // [88] phi from bobCharsetFindOrAddGlyph::@5 bobCharsetFindOrAddGlyph::@9 to bobCharsetFindOrAddGlyph::@return [phi:bobCharsetFindOrAddGlyph::@5/bobCharsetFindOrAddGlyph::@9->bobCharsetFindOrAddGlyph::@return] + // [88] phi (byte) bob_charset_next_id#16 = (byte) bob_charset_next_id#23 [phi:bobCharsetFindOrAddGlyph::@5/bobCharsetFindOrAddGlyph::@9->bobCharsetFindOrAddGlyph::@return#0] -- register_copy + // bobCharsetFindOrAddGlyph::@return + // } + // [89] return + rts + // bobCharsetFindOrAddGlyph::@8 + __b8: + // glyph_cursor[i]=bob_glyph[i] + // [90] *((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i1#2) ← *((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i1#2) -- pbuz1_derefidx_vbuxx=pbuz2_derefidx_vbuxx + stx.z $ff + txa + tay + lda (bob_glyph),y + sta (glyph_cursor),y + // for(char i=0;i<8;i++) + // [91] (byte) bobCharsetFindOrAddGlyph::i1#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i1#2 -- vbuxx=_inc_vbuxx + inx + // [85] phi from bobCharsetFindOrAddGlyph::@8 to bobCharsetFindOrAddGlyph::@7 [phi:bobCharsetFindOrAddGlyph::@8->bobCharsetFindOrAddGlyph::@7] + // [85] phi (byte) bobCharsetFindOrAddGlyph::i1#2 = (byte) bobCharsetFindOrAddGlyph::i1#1 [phi:bobCharsetFindOrAddGlyph::@8->bobCharsetFindOrAddGlyph::@7#0] -- register_copy + jmp __b7 + // [92] phi from bobCharsetFindOrAddGlyph::@1 to bobCharsetFindOrAddGlyph::@2 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@2] + b1: + // [92] phi (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@1->bobCharsetFindOrAddGlyph::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + // bobCharsetFindOrAddGlyph::@2 + __b2: + // for(char i=0;i<8;i++) + // [93] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #8 + bcc __b3 + // [95] phi from bobCharsetFindOrAddGlyph::@2 to bobCharsetFindOrAddGlyph::@5 [phi:bobCharsetFindOrAddGlyph::@2->bobCharsetFindOrAddGlyph::@5] + // [95] phi (byte) bobCharsetFindOrAddGlyph::found#2 = (byte) 1 [phi:bobCharsetFindOrAddGlyph::@2->bobCharsetFindOrAddGlyph::@5#0] -- vbuaa=vbuc1 + lda #1 + jmp __b5 + // bobCharsetFindOrAddGlyph::@3 + __b3: + // if(glyph_cursor[i]!=bob_glyph[i]) + // [94] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@4 -- pbuz1_derefidx_vbuz2_eq_pbuz3_derefidx_vbuz2_then_la1 + ldy.z i + lda (glyph_cursor),y + tax + lda (bob_glyph),y + tay + sty.z $ff + cpx.z $ff + beq __b4 + // [95] phi from bobCharsetFindOrAddGlyph::@3 to bobCharsetFindOrAddGlyph::@5 [phi:bobCharsetFindOrAddGlyph::@3->bobCharsetFindOrAddGlyph::@5] + // [95] phi (byte) bobCharsetFindOrAddGlyph::found#2 = (byte) 0 [phi:bobCharsetFindOrAddGlyph::@3->bobCharsetFindOrAddGlyph::@5#0] -- vbuaa=vbuc1 + lda #0 + // bobCharsetFindOrAddGlyph::@5 + __b5: + // if(found) + // [96] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@6 -- vbuc1_eq_vbuaa_then_la1 + cmp #0 + beq __b6 + rts + // bobCharsetFindOrAddGlyph::@6 + __b6: + // glyph_id++; + // [97] (byte) bobCharsetFindOrAddGlyph::glyph_id#1 ← ++ (byte) bobCharsetFindOrAddGlyph::glyph_id#11 -- vbuz1=_inc_vbuz1 + inc.z glyph_id + // glyph_cursor +=8 + // [98] (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 ← (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) 8 -- pbuz1=pbuz1_plus_vbuc1 + lda #8 + clc + adc.z glyph_cursor + sta.z glyph_cursor + bcc !+ + inc.z glyph_cursor+1 + !: + // [83] phi from bobCharsetFindOrAddGlyph::@6 to bobCharsetFindOrAddGlyph::@1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1] + // [83] phi (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 = (byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1#0] -- register_copy + // [83] phi (byte) bobCharsetFindOrAddGlyph::glyph_id#11 = (byte) bobCharsetFindOrAddGlyph::glyph_id#1 [phi:bobCharsetFindOrAddGlyph::@6->bobCharsetFindOrAddGlyph::@1#1] -- register_copy + jmp __b1 + // bobCharsetFindOrAddGlyph::@4 + __b4: + // for(char i=0;i<8;i++) + // [99] (byte) bobCharsetFindOrAddGlyph::i#1 ← ++ (byte) bobCharsetFindOrAddGlyph::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [92] phi from bobCharsetFindOrAddGlyph::@4 to bobCharsetFindOrAddGlyph::@2 [phi:bobCharsetFindOrAddGlyph::@4->bobCharsetFindOrAddGlyph::@2] + // [92] phi (byte) bobCharsetFindOrAddGlyph::i#2 = (byte) bobCharsetFindOrAddGlyph::i#1 [phi:bobCharsetFindOrAddGlyph::@4->bobCharsetFindOrAddGlyph::@2#0] -- register_copy + jmp __b2 +} + // shiftProtoBobRight +// Shift PROTO_BOB right one X pixel +shiftProtoBobRight: { + .label carry = 9 + .label i = 8 + // [101] phi from shiftProtoBobRight to shiftProtoBobRight::@1 [phi:shiftProtoBobRight->shiftProtoBobRight::@1] + // [101] phi (byte) shiftProtoBobRight::carry#2 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#0] -- vbuyy=vbuc1 + ldy #0 + // [101] phi (byte) shiftProtoBobRight::j#3 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#1] -- vbuxx=vbuc1 + ldx #0 + // [101] phi (byte) shiftProtoBobRight::i#2 = (byte) 0 [phi:shiftProtoBobRight->shiftProtoBobRight::@1#2] -- vbuz1=vbuc1 + txa + sta.z i + // shiftProtoBobRight::@1 + __b1: + // for(char i=0;i<3*3*8;i++) + // [102] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #3*3*8 + bcc __b2 + // shiftProtoBobRight::@return + // } + // [103] return + rts + // shiftProtoBobRight::@2 + __b2: + // PROTO_BOB[j]&1 + // [104] (byte~) shiftProtoBobRight::$1 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) & (byte) 1 -- vbuaa=pbuc1_derefidx_vbuxx_band_vbuc2 + lda #1 + and PROTO_BOB,x + // (PROTO_BOB[j]&1)?0x80ub:0ub + // [105] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@3 -- vbuc1_neq_vbuaa_then_la1 + cmp #0 + bne __b3 + // [107] phi from shiftProtoBobRight::@2 to shiftProtoBobRight::@4 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@4] + // [107] phi (byte) shiftProtoBobRight::carry#1 = (byte) 0 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@4#0] -- vbuz1=vbuc1 + lda #0 + sta.z carry + jmp __b4 + // [106] phi from shiftProtoBobRight::@2 to shiftProtoBobRight::@3 [phi:shiftProtoBobRight::@2->shiftProtoBobRight::@3] + // shiftProtoBobRight::@3 + __b3: + // [107] phi from shiftProtoBobRight::@3 to shiftProtoBobRight::@4 [phi:shiftProtoBobRight::@3->shiftProtoBobRight::@4] + // [107] phi (byte) shiftProtoBobRight::carry#1 = (byte) $80 [phi:shiftProtoBobRight::@3->shiftProtoBobRight::@4#0] -- vbuz1=vbuc1 + lda #$80 + sta.z carry + // shiftProtoBobRight::@4 + __b4: + // PROTO_BOB[j]>>1 + // [108] (byte~) shiftProtoBobRight::$5 ← *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) >> (byte) 1 -- vbuaa=pbuc1_derefidx_vbuxx_ror_1 + lda PROTO_BOB,x + lsr + // PROTO_BOB[j]>>1 | carry + // [109] (byte~) shiftProtoBobRight::$6 ← (byte~) shiftProtoBobRight::$5 | (byte) shiftProtoBobRight::carry#2 -- vbuaa=vbuaa_bor_vbuyy + sty.z $ff + ora.z $ff + // PROTO_BOB[j] = PROTO_BOB[j]>>1 | carry + // [110] *((const byte*) PROTO_BOB + (byte) shiftProtoBobRight::j#3) ← (byte~) shiftProtoBobRight::$6 -- pbuc1_derefidx_vbuxx=vbuaa + // Shift value and add old carry + sta PROTO_BOB,x + // if(j>=48) + // [111] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@5 -- vbuxx_ge_vbuc1_then_la1 + // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) + cpx #$30 + bcs __b5 + // shiftProtoBobRight::@7 + // j+=24 + // [112] (byte) shiftProtoBobRight::j#2 ← (byte) shiftProtoBobRight::j#3 + (byte) $18 -- vbuxx=vbuxx_plus_vbuc1 + txa + axs #-[$18] + // [113] phi from shiftProtoBobRight::@5 shiftProtoBobRight::@7 to shiftProtoBobRight::@6 [phi:shiftProtoBobRight::@5/shiftProtoBobRight::@7->shiftProtoBobRight::@6] + // [113] phi (byte) shiftProtoBobRight::j#10 = (byte) shiftProtoBobRight::j#1 [phi:shiftProtoBobRight::@5/shiftProtoBobRight::@7->shiftProtoBobRight::@6#0] -- register_copy + // shiftProtoBobRight::@6 + __b6: + // for(char i=0;i<3*3*8;i++) + // [114] (byte) shiftProtoBobRight::i#1 ← ++ (byte) shiftProtoBobRight::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [115] (byte) shiftProtoBobRight::carry#10 ← (byte) shiftProtoBobRight::carry#1 -- vbuyy=vbuz1 + ldy.z carry + // [101] phi from shiftProtoBobRight::@6 to shiftProtoBobRight::@1 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1] + // [101] phi (byte) shiftProtoBobRight::carry#2 = (byte) shiftProtoBobRight::carry#10 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#0] -- register_copy + // [101] phi (byte) shiftProtoBobRight::j#3 = (byte) shiftProtoBobRight::j#10 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#1] -- register_copy + // [101] phi (byte) shiftProtoBobRight::i#2 = (byte) shiftProtoBobRight::i#1 [phi:shiftProtoBobRight::@6->shiftProtoBobRight::@1#2] -- register_copy + jmp __b1 + // shiftProtoBobRight::@5 + __b5: + // j-=47 + // [116] (byte) shiftProtoBobRight::j#1 ← (byte) shiftProtoBobRight::j#3 - (byte) $2f -- vbuxx=vbuxx_minus_vbuc1 + txa + axs #$2f + jmp __b6 +} + // shiftProtoBobDown +// Shift PROTO_BOB down one Y pixel +// At the same time restore PROTO_BOB X by shifting 8 pixels left +shiftProtoBobDown: { + // [118] phi from shiftProtoBobDown to shiftProtoBobDown::@1 [phi:shiftProtoBobDown->shiftProtoBobDown::@1] + // [118] phi (byte) shiftProtoBobDown::i#2 = (byte) $17 [phi:shiftProtoBobDown->shiftProtoBobDown::@1#0] -- vbuxx=vbuc1 + ldx #$17 + // shiftProtoBobDown::@1 + __b1: + // for(char i=23;i>0;i--) + // [119] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 -- vbuxx_gt_0_then_la1 + cpx #0 + bne __b2 + // shiftProtoBobDown::@3 + // PROTO_BOB[0] = 0 + // [120] *((const byte*) PROTO_BOB) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PROTO_BOB + // PROTO_BOB[24] = 0 + // [121] *((const byte*) PROTO_BOB+(byte) $18) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta PROTO_BOB+$18 + // PROTO_BOB[48] = 0 + // [122] *((const byte*) PROTO_BOB+(byte) $30) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta PROTO_BOB+$30 + // shiftProtoBobDown::@return + // } + // [123] return + rts + // shiftProtoBobDown::@2 + __b2: + // PROTO_BOB[i] = (PROTO_BOB+23)[i] + // [124] *((const byte*) PROTO_BOB + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $17 + (byte) shiftProtoBobDown::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda PROTO_BOB+$17,x + sta PROTO_BOB,x + // (PROTO_BOB+24)[i] = (PROTO_BOB+47)[i] + // [125] *((const byte*) PROTO_BOB+(byte) $18 + (byte) shiftProtoBobDown::i#2) ← *((const byte*) PROTO_BOB+(byte) $2f + (byte) shiftProtoBobDown::i#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda PROTO_BOB+$2f,x + sta PROTO_BOB+$18,x + // (PROTO_BOB+48)[i] = 0x00 + // [126] *((const byte*) PROTO_BOB+(byte) $30 + (byte) shiftProtoBobDown::i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta PROTO_BOB+$30,x + // for(char i=23;i>0;i--) + // [127] (byte) shiftProtoBobDown::i#1 ← -- (byte) shiftProtoBobDown::i#2 -- vbuxx=_dec_vbuxx + dex + // [118] phi from shiftProtoBobDown::@2 to shiftProtoBobDown::@1 [phi:shiftProtoBobDown::@2->shiftProtoBobDown::@1] + // [118] phi (byte) shiftProtoBobDown::i#2 = (byte) shiftProtoBobDown::i#1 [phi:shiftProtoBobDown::@2->shiftProtoBobDown::@1#0] -- register_copy + jmp __b1 +} + // File Data + // The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars) + // The chars are layout as follows with data in chars 0, 1, 3, 4 initially + // 0 3 6 + // 1 4 7 + // 2 5 8 +PROTO_BOB: +.var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + + // Sine used for the X-coordinate +SIN_X_TAB: +.fill $200, 75.5+75.5*sin(i*2*PI/256) + // Sine used for the Y-coordinate +SIN_Y_TAB: +.fill $200, 91.5+91.5*sin(i*2*PI/256) + // Tables containing the char to use for a specific cell of a shifted BOB. + // char_id = BOB_TABLES[cell*BOB_SUBTABLE_SIZE + shift_y*BOB_SHIFTS_X + shift_x]; + BOB_TABLES: .fill 9*8*4, 0 + diff --git a/src/test/ref/complex/prebob/prebob.sym b/src/test/ref/complex/prebob/prebob.sym new file mode 100644 index 000000000..88deeb032 --- /dev/null +++ b/src/test/ref/complex/prebob/prebob.sym @@ -0,0 +1,223 @@ +(label) @1 +(label) @begin +(label) @end +(const byte*) BOB_CHARSET = (byte*) 24576 +(const byte) BOB_SHIFTS_X = (number) 4 +(const byte) BOB_SHIFTS_Y = (number) 8 +(const byte) BOB_SUBTABLE_SIZE = (const byte) BOB_SHIFTS_X*(const byte) BOB_SHIFTS_Y +(const byte*) BOB_TABLES = { fill( 9*8*4, 0) } +(const byte*) BORDERCOL = (byte*) 53280 +(const byte*) CIA2_PORT_A = (byte*) 56576 +(const byte*) CIA2_PORT_A_DDR = (byte*) 56578 +(const byte*) D018 = (byte*) 53272 +(const byte*) PROTO_BOB = kickasm {{ .var pic = LoadPicture("smiley.png", List().add($000000, $ffffff)) + .for (var x=0;x<3; x++) + .for (var y=0; y<24; y++) + .byte pic.getSinglecolorByte(x,y) + }} +(const byte*) RASTER = (byte*) 53266 +(const byte*) SCREEN = (byte*) 16384 +(const byte*) SIN_X_TAB = kickasm {{ .fill $200, 75.5+75.5*sin(i*2*PI/256) }} +(const byte*) SIN_Y_TAB = kickasm {{ .fill $200, 91.5+91.5*sin(i*2*PI/256) }} +(byte()) bobCharsetFindOrAddGlyph((byte*) bobCharsetFindOrAddGlyph::bob_glyph) +(label) bobCharsetFindOrAddGlyph::@1 +(label) bobCharsetFindOrAddGlyph::@2 +(label) bobCharsetFindOrAddGlyph::@3 +(label) bobCharsetFindOrAddGlyph::@4 +(label) bobCharsetFindOrAddGlyph::@5 +(label) bobCharsetFindOrAddGlyph::@6 +(label) bobCharsetFindOrAddGlyph::@7 +(label) bobCharsetFindOrAddGlyph::@8 +(label) bobCharsetFindOrAddGlyph::@9 +(label) bobCharsetFindOrAddGlyph::@return +(byte*) bobCharsetFindOrAddGlyph::bob_glyph +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#1 bob_glyph zp[2]:5 2002.0 +(byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 bob_glyph zp[2]:5 7400.200000000001 +(byte) bobCharsetFindOrAddGlyph::found +(byte) bobCharsetFindOrAddGlyph::found#2 reg byte a 10001.0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#1 glyph_cursor zp[2]:12 20002.0 +(byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 glyph_cursor zp[2]:12 10000.307692307691 +(byte) bobCharsetFindOrAddGlyph::glyph_id +(byte) bobCharsetFindOrAddGlyph::glyph_id#1 glyph_id zp[1]:9 10001.0 +(byte) bobCharsetFindOrAddGlyph::glyph_id#11 glyph_id zp[1]:9 1937.75 +(byte) bobCharsetFindOrAddGlyph::i +(byte) bobCharsetFindOrAddGlyph::i#1 i zp[1]:7 200002.0 +(byte) bobCharsetFindOrAddGlyph::i#2 i zp[1]:7 166668.3333333333 +(byte) bobCharsetFindOrAddGlyph::i1 +(byte) bobCharsetFindOrAddGlyph::i1#1 reg byte x 20002.0 +(byte) bobCharsetFindOrAddGlyph::i1#2 reg byte x 16668.333333333332 +(byte) bobCharsetFindOrAddGlyph::return +(byte) bobCharsetFindOrAddGlyph::return#1 reg byte a 2002.0 +(byte) bob_charset_next_id +(byte) bob_charset_next_id#14 bob_charset_next_id zp[1]:14 12.0 +(byte) bob_charset_next_id#16 bob_charset_next_id zp[1]:14 1100.6000000000001 +(byte) bob_charset_next_id#21 bob_charset_next_id zp[1]:14 275.5 +(byte) bob_charset_next_id#23 bob_charset_next_id zp[1]:14 1400.3333333333335 +(byte) bob_charset_next_id#30 bob_charset_next_id zp[1]:14 37.33333333333333 +(byte) bob_charset_next_id#8 bob_charset_next_id zp[1]:14 4.0 +(void()) main() +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(byte) main::sin_x_idx +(byte) main::sin_x_idx#1 sin_x_idx zp[1]:2 7.333333333333333 +(byte) main::sin_x_idx#7 sin_x_idx zp[1]:2 4.583333333333333 +(byte) main::sin_y_idx +(byte) main::sin_y_idx#1 sin_y_idx zp[1]:3 11.0 +(byte) main::sin_y_idx#7 sin_y_idx zp[1]:3 4.230769230769231 +(label) main::toD0181 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) BOB_CHARSET/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(label) main::vicSelectGfxBank1 +(label) main::vicSelectGfxBank1_@1 +(byte*) main::vicSelectGfxBank1_gfx +(label) main::vicSelectGfxBank1_toDd001 +(byte*) main::vicSelectGfxBank1_toDd001_gfx +(byte) main::vicSelectGfxBank1_toDd001_return +(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) SCREEN/(byte) $40 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(label) memset::@1 +(label) memset::@2 +(label) memset::@return +(byte) memset::c +(const byte) memset::c#0 c = (byte) 0 +(byte*) memset::dst +(byte*) memset::dst#1 dst zp[2]:5 22.0 +(byte*) memset::dst#2 dst zp[2]:5 14.666666666666666 +(byte*) memset::end +(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0 +(word) memset::num +(const word) memset::num#0 num = (word) $3e8 +(void*) memset::return +(void*) memset::str +(const void*) memset::str#0 str = (void*)(const byte*) SCREEN +(void()) prepareBobs() +(byte~) prepareBobs::$5 reg byte a 2002.0 +(label) prepareBobs::@1 +(label) prepareBobs::@10 +(label) prepareBobs::@11 +(label) prepareBobs::@2 +(label) prepareBobs::@3 +(label) prepareBobs::@4 +(label) prepareBobs::@5 +(label) prepareBobs::@6 +(label) prepareBobs::@7 +(label) prepareBobs::@8 +(label) prepareBobs::@9 +(label) prepareBobs::@return +(byte*) prepareBobs::bob_glyph +(byte*) prepareBobs::bob_glyph#1 bob_glyph zp[2]:5 667.3333333333334 +(byte*) prepareBobs::bob_glyph#2 bob_glyph zp[2]:5 429.0 +(byte*) prepareBobs::bob_table +(byte*) prepareBobs::bob_table#0 bob_table zp[2]:10 202.0 +(byte*) prepareBobs::bob_table#1 bob_table zp[2]:10 1001.0 +(byte*) prepareBobs::bob_table#2 bob_table zp[2]:10 388.0 +(byte) prepareBobs::bob_table_idx +(byte) prepareBobs::bob_table_idx#1 bob_table_idx zp[1]:3 40.4 +(byte) prepareBobs::bob_table_idx#12 bob_table_idx zp[1]:3 20.3125 +(byte) prepareBobs::bob_table_idx#6 bob_table_idx zp[1]:3 11.0 +(byte) prepareBobs::cell +(byte) prepareBobs::cell#1 cell zp[1]:8 2002.0 +(byte) prepareBobs::cell#2 cell zp[1]:8 333.6666666666667 +(byte) prepareBobs::shift_x +(byte) prepareBobs::shift_x#1 shift_x zp[1]:4 202.0 +(byte) prepareBobs::shift_x#2 shift_x zp[1]:4 17.823529411764707 +(byte) prepareBobs::shift_y +(byte) prepareBobs::shift_y#1 shift_y zp[1]:2 22.0 +(byte) prepareBobs::shift_y#2 shift_y zp[1]:2 1.5 +(void()) renderBob((byte) renderBob::xpos , (byte) renderBob::ypos) +(word~) renderBob::$10 zp[2]:12 4.0 +(word~) renderBob::$11 zp[2]:10 4.0 +(word~) renderBob::$2 zp[2]:10 3.0 +(byte*~) renderBob::$4 zp[2]:10 4.0 +(byte~) renderBob::$6 reg byte a 4.0 +(byte~) renderBob::$7 zp[1]:14 2.0 +(byte~) renderBob::$8 reg byte a 4.0 +(label) renderBob::@return +(byte) renderBob::bob_table_idx +(byte) renderBob::bob_table_idx#0 reg byte x 2.2222222222222228 +(byte*) renderBob::screen +(byte*) renderBob::screen#0 screen zp[2]:10 1.5384615384615383 +(byte) renderBob::x_char_offset +(byte) renderBob::x_char_offset#0 reg byte y 0.5714285714285714 +(byte) renderBob::xpos +(byte) renderBob::xpos#0 xpos zp[1]:4 11.0 +(byte) renderBob::xpos#1 xpos zp[1]:4 11.0 +(byte) renderBob::xpos#2 xpos zp[1]:4 11.0 +(byte) renderBob::xpos#3 xpos zp[1]:4 3.3636363636363633 +(byte) renderBob::y_char_offset +(byte) renderBob::y_char_offset#0 reg byte a 2.0 +(word) renderBob::y_offset +(word) renderBob::y_offset#0 y_offset zp[2]:10 4.0 +(byte) renderBob::ypos +(byte) renderBob::ypos#0 reg byte x 22.0 +(byte) renderBob::ypos#1 reg byte x 22.0 +(byte) renderBob::ypos#2 reg byte x 22.0 +(byte) renderBob::ypos#3 reg byte x 4.111111111111112 +(void()) shiftProtoBobDown() +(label) shiftProtoBobDown::@1 +(label) shiftProtoBobDown::@2 +(label) shiftProtoBobDown::@3 +(label) shiftProtoBobDown::@return +(byte) shiftProtoBobDown::i +(byte) shiftProtoBobDown::i#1 reg byte x 202.0 +(byte) shiftProtoBobDown::i#2 reg byte x 161.6 +(void()) shiftProtoBobRight() +(byte~) shiftProtoBobRight::$1 reg byte a 2002.0 +(byte~) shiftProtoBobRight::$5 reg byte a 2002.0 +(byte~) shiftProtoBobRight::$6 reg byte a 2002.0 +(label) shiftProtoBobRight::@1 +(label) shiftProtoBobRight::@2 +(label) shiftProtoBobRight::@3 +(label) shiftProtoBobRight::@4 +(label) shiftProtoBobRight::@5 +(label) shiftProtoBobRight::@6 +(label) shiftProtoBobRight::@7 +(label) shiftProtoBobRight::@return +(byte) shiftProtoBobRight::carry +(byte) shiftProtoBobRight::carry#1 carry zp[1]:9 111.22222222222223 +(byte) shiftProtoBobRight::carry#10 reg byte y 2002.0 +(byte) shiftProtoBobRight::carry#2 reg byte y 286.0 +(byte) shiftProtoBobRight::i +(byte) shiftProtoBobRight::i#1 i zp[1]:8 1001.0 +(byte) shiftProtoBobRight::i#2 i zp[1]:8 231.0 +(byte) shiftProtoBobRight::j +(byte) shiftProtoBobRight::j#1 reg byte x 2002.0 +(byte) shiftProtoBobRight::j#10 reg byte x 1001.0 +(byte) shiftProtoBobRight::j#2 reg byte x 2002.0 +(byte) shiftProtoBobRight::j#3 reg byte x 700.7 +(byte) shiftProtoBobRight::new_carry + +reg byte x [ renderBob::ypos#3 renderBob::ypos#1 renderBob::ypos#2 renderBob::ypos#0 ] +zp[1]:2 [ prepareBobs::shift_y#2 prepareBobs::shift_y#1 main::sin_x_idx#7 main::sin_x_idx#1 ] +zp[1]:3 [ prepareBobs::bob_table_idx#6 prepareBobs::bob_table_idx#12 prepareBobs::bob_table_idx#1 main::sin_y_idx#7 main::sin_y_idx#1 ] +zp[1]:4 [ prepareBobs::shift_x#2 prepareBobs::shift_x#1 renderBob::xpos#3 renderBob::xpos#1 renderBob::xpos#2 renderBob::xpos#0 ] +zp[2]:5 [ prepareBobs::bob_glyph#2 prepareBobs::bob_glyph#1 bobCharsetFindOrAddGlyph::bob_glyph#10 bobCharsetFindOrAddGlyph::bob_glyph#1 memset::dst#2 memset::dst#1 ] +reg byte x [ bobCharsetFindOrAddGlyph::i1#2 bobCharsetFindOrAddGlyph::i1#1 ] +zp[1]:7 [ bobCharsetFindOrAddGlyph::i#2 bobCharsetFindOrAddGlyph::i#1 ] +reg byte a [ bobCharsetFindOrAddGlyph::found#2 ] +zp[1]:8 [ shiftProtoBobRight::i#2 shiftProtoBobRight::i#1 prepareBobs::cell#2 prepareBobs::cell#1 ] +reg byte x [ shiftProtoBobRight::j#3 shiftProtoBobRight::j#10 shiftProtoBobRight::j#2 shiftProtoBobRight::j#1 ] +reg byte y [ shiftProtoBobRight::carry#2 shiftProtoBobRight::carry#10 ] +zp[1]:9 [ shiftProtoBobRight::carry#1 bobCharsetFindOrAddGlyph::glyph_id#11 bobCharsetFindOrAddGlyph::glyph_id#1 ] +reg byte x [ shiftProtoBobDown::i#2 shiftProtoBobDown::i#1 ] +reg byte y [ renderBob::x_char_offset#0 ] +reg byte a [ renderBob::y_char_offset#0 ] +zp[2]:10 [ renderBob::$2 renderBob::$11 renderBob::y_offset#0 renderBob::$4 renderBob::screen#0 prepareBobs::bob_table#2 prepareBobs::bob_table#1 prepareBobs::bob_table#0 ] +zp[2]:12 [ renderBob::$10 bobCharsetFindOrAddGlyph::glyph_cursor#11 bobCharsetFindOrAddGlyph::glyph_cursor#1 ] +reg byte a [ renderBob::$6 ] +zp[1]:14 [ renderBob::$7 bob_charset_next_id#23 bob_charset_next_id#14 bob_charset_next_id#16 bob_charset_next_id#30 bob_charset_next_id#21 bob_charset_next_id#8 ] +reg byte a [ renderBob::$8 ] +reg byte x [ renderBob::bob_table_idx#0 ] +reg byte a [ bobCharsetFindOrAddGlyph::return#1 ] +reg byte a [ prepareBobs::$5 ] +reg byte a [ shiftProtoBobRight::$1 ] +reg byte a [ shiftProtoBobRight::$5 ] +reg byte a [ shiftProtoBobRight::$6 ]