diff --git a/src/main/fragment/vdsz1=vdsz1_rol_3.asm b/src/main/fragment/vdsz1=vdsz1_rol_3.asm new file mode 100644 index 000000000..01c402bd9 --- /dev/null +++ b/src/main/fragment/vdsz1=vdsz1_rol_3.asm @@ -0,0 +1,12 @@ +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 diff --git a/src/main/fragment/vdsz1=vdsz1_rol_4.asm b/src/main/fragment/vdsz1=vdsz1_rol_4.asm new file mode 100644 index 000000000..54e12b3b4 --- /dev/null +++ b/src/main/fragment/vdsz1=vdsz1_rol_4.asm @@ -0,0 +1,16 @@ +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 diff --git a/src/main/fragment/vdsz1=vdsz2_rol_4.asm b/src/main/fragment/vdsz1=vdsz2_rol_4.asm new file mode 100644 index 000000000..b97c8b414 --- /dev/null +++ b/src/main/fragment/vdsz1=vdsz2_rol_4.asm @@ -0,0 +1,24 @@ +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 \ No newline at end of file diff --git a/src/main/fragment/vdsz1=vdsz2_ror_1.asm b/src/main/fragment/vdsz1=vdsz2_ror_1.asm new file mode 100644 index 000000000..741bc3842 --- /dev/null +++ b/src/main/fragment/vdsz1=vdsz2_ror_1.asm @@ -0,0 +1,13 @@ +lda {z2}+3 +cmp #$80 +ror +sta {z1}+3 +lda {z2}+2 +ror +sta {z1}+2 +lda {z2}+1 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} \ No newline at end of file diff --git a/src/main/fragment/vwsz1=_deref_pwsc1.asm b/src/main/fragment/vwsz1=_deref_pwsc1.asm new file mode 100644 index 000000000..1f588b460 --- /dev/null +++ b/src/main/fragment/vwsz1=_deref_pwsc1.asm @@ -0,0 +1,4 @@ +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=_deref_pwsz1_plus_vwsc1.asm b/src/main/fragment/vwsz1=_deref_pwsz1_plus_vwsc1.asm new file mode 100644 index 000000000..42160c964 --- /dev/null +++ b/src/main/fragment/vwsz1=_deref_pwsz1_plus_vwsc1.asm @@ -0,0 +1,11 @@ +ldy #0 +lda ({z1}),y +clc +adc #<{c1} +pha +iny +lda ({z1}),y +adc #>{c1} +sta {z1}+1 +pla +sta {z1} \ No newline at end of file diff --git a/src/main/fragment/vwsz1=_deref_pwsz2_plus_vwsc1.asm b/src/main/fragment/vwsz1=_deref_pwsz2_plus_vwsc1.asm new file mode 100644 index 000000000..ab4a9351d --- /dev/null +++ b/src/main/fragment/vwsz1=_deref_pwsz2_plus_vwsc1.asm @@ -0,0 +1,9 @@ +ldy #0 +lda ({z2}),y +clc +adc #<{c1} +sta {z1} +iny +lda ({z2}),y +adc #>{c1} +sta {z1}+1 diff --git a/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm b/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm new file mode 100644 index 000000000..94a4667d1 --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz1_plus_vbuz2.asm @@ -0,0 +1,7 @@ +clc +lda {z1} +adc {z1} +sta {z1} +lda {z1}+1 +adc #0 +sta {z1}+1 \ No newline at end of file diff --git a/src/main/fragment/vwsz1=vwsz1_ror_2.asm b/src/main/fragment/vwsz1=vwsz1_ror_2.asm new file mode 100644 index 000000000..5bad97f11 --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz1_ror_2.asm @@ -0,0 +1,9 @@ +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} + diff --git a/src/main/fragment/vwsz1=vwsz1_ror_4.asm b/src/main/fragment/vwsz1=vwsz1_ror_4.asm new file mode 100644 index 000000000..a28f0928a --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz1_ror_4.asm @@ -0,0 +1,17 @@ +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} + diff --git a/src/main/fragment/vwsz1=vwsz1_ror_5.asm b/src/main/fragment/vwsz1=vwsz1_ror_5.asm new file mode 100644 index 000000000..cfcaf6714 --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz1_ror_5.asm @@ -0,0 +1,21 @@ +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} + diff --git a/src/main/fragment/vwsz1=vwsz2_ror_2.asm b/src/main/fragment/vwsz1=vwsz2_ror_2.asm new file mode 100644 index 000000000..4fb8fcf4f --- /dev/null +++ b/src/main/fragment/vwsz1=vwsz2_ror_2.asm @@ -0,0 +1,11 @@ +lda {z2}+1 +cmp #$80 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} diff --git a/src/main/fragment/vwsz1_lt_vwsc1_then_la1.asm b/src/main/fragment/vwsz1_lt_vwsc1_then_la1.asm new file mode 100644 index 000000000..66be6c4c3 --- /dev/null +++ b/src/main/fragment/vwsz1_lt_vwsc1_then_la1.asm @@ -0,0 +1,8 @@ +lda {z1} +cmp #<{c1} +lda {z1}+1 +sbc #>{c1} +bvc !+ +eor #$80 +!: +bmi {la1} \ No newline at end of file diff --git a/src/main/fragment/vwuz1=vwuc1_plus__hi_vdsz2.asm b/src/main/fragment/vwuz1=vwuc1_plus__hi_vdsz2.asm new file mode 100644 index 000000000..e2a7d8062 --- /dev/null +++ b/src/main/fragment/vwuz1=vwuc1_plus__hi_vdsz2.asm @@ -0,0 +1,7 @@ +clc +lda #<{c1} +adc {z2}+2 +sta {z1} +lda #>{c1} +adc {z2}+3 +sta {z1}+1 diff --git a/src/main/fragment/vwuz1=vwuc1_plus__hi_vduz2.asm b/src/main/fragment/vwuz1=vwuc1_plus__hi_vduz2.asm new file mode 100644 index 000000000..e2a7d8062 --- /dev/null +++ b/src/main/fragment/vwuz1=vwuc1_plus__hi_vduz2.asm @@ -0,0 +1,7 @@ +clc +lda #<{c1} +adc {z2}+2 +sta {z1} +lda #>{c1} +adc {z2}+3 +sta {z1}+1 diff --git a/src/main/fragment/vwuz1=vwuz1_ror_5.asm b/src/main/fragment/vwuz1=vwuz1_ror_5.asm new file mode 100644 index 000000000..e86b85438 --- /dev/null +++ b/src/main/fragment/vwuz1=vwuz1_ror_5.asm @@ -0,0 +1,10 @@ +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} diff --git a/src/main/fragment/vwuz1=vwuz2_rol_5.asm b/src/main/fragment/vwuz1=vwuz2_rol_5.asm new file mode 100644 index 000000000..638680604 --- /dev/null +++ b/src/main/fragment/vwuz1=vwuz2_rol_5.asm @@ -0,0 +1,14 @@ +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 diff --git a/src/main/fragment/vwuz1=vwuz2_ror_4.asm b/src/main/fragment/vwuz1=vwuz2_ror_4.asm index 7bda81a62..657c1129b 100644 --- a/src/main/fragment/vwuz1=vwuz2_ror_4.asm +++ b/src/main/fragment/vwuz1=vwuz2_ror_4.asm @@ -1,10 +1,12 @@ lda {z2}+1 +lsr sta {z1}+1 lda {z2} +ror sta {z1} -ldy #4 -!: lsr {z1}+1 ror {z1} -dey -bne !- \ No newline at end of file +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} \ No newline at end of file diff --git a/src/main/fragment/vwuz1=vwuz2_ror_5.asm b/src/main/fragment/vwuz1=vwuz2_ror_5.asm new file mode 100644 index 000000000..8d996b98f --- /dev/null +++ b/src/main/fragment/vwuz1=vwuz2_ror_5.asm @@ -0,0 +1,14 @@ +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} \ No newline at end of file diff --git a/src/main/fragment/vwuz1=vwuz2_ror_6.asm b/src/main/fragment/vwuz1=vwuz2_ror_6.asm index eb8904c63..532e3dedd 100644 --- a/src/main/fragment/vwuz1=vwuz2_ror_6.asm +++ b/src/main/fragment/vwuz1=vwuz2_ror_6.asm @@ -1,10 +1,16 @@ lda {z2}+1 +lsr sta {z1}+1 lda {z2} +ror sta {z1} -ldy #6 -!: lsr {z1}+1 ror {z1} -dey -bne !- \ No newline at end of file +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} \ No newline at end of file diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index a92c191ca..974ba58f0 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -36,8 +36,18 @@ public class TestPrograms { } @Test - public void testBitmapPlot() throws IOException, URISyntaxException { - compileAndCompare("bitmap-plot", log()); + public void testBitmapPlot2() throws IOException, URISyntaxException { + compileAndCompare("bitmap-plot-2", log()); + } + + @Test + public void testBitmapPlot1() throws IOException, URISyntaxException { + compileAndCompare("bitmap-plot-1"); + } + + @Test + public void testBitmapPlot0() throws IOException, URISyntaxException { + compileAndCompare("bitmap-plot-0"); } @Test diff --git a/src/test/kc/bitmap-plot.kc b/src/test/kc/bitmap-plot-0.kc similarity index 98% rename from src/test/kc/bitmap-plot.kc rename to src/test/kc/bitmap-plot-0.kc index d236724cd..0ddc2f76b 100644 --- a/src/test/kc/bitmap-plot.kc +++ b/src/test/kc/bitmap-plot-0.kc @@ -1,4 +1,5 @@ // Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots simple plots import "c64" import "bitmap2" diff --git a/src/test/kc/bitmap-plot-1.kc b/src/test/kc/bitmap-plot-1.kc new file mode 100644 index 000000000..cf2056413 --- /dev/null +++ b/src/test/kc/bitmap-plot-1.kc @@ -0,0 +1,66 @@ +// Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots a fullscreen elipsis +import "c64" +import "sinus" +import "multiply" +import "bitmap2" + +byte* BITMAP = 0x2000; +byte* SCREEN = 0x0400; + +byte[0x100] plots_per_frame; + +align(0x100) signed word[512] SINUS; + +void main() { + sin16s_gen2(SINUS, 512, -0x1001, 0x1001); + bitmap_init(BITMAP, SCREEN); + bitmap_clear(BLACK, WHITE); + *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3; + *D018 = toD018(SCREEN, BITMAP); + init_irq(); + word idx_x = 0; + word idx_y = 0x80; + while(true) { + signed word cos_x = SINUS[idx_x]; + signed dword xpos = mul16s(160, cos_x); + word x = (word)(160 + >(xpos<<4)); + signed word sin_y = SINUS[idx_y]; + signed dword ypos = mul16s(100, sin_y); + word y = (word)(100 + >(ypos<<4)); + bitmap_plot(x, (byte)y); + if(++idx_x==512) idx_x = 0; + if(++idx_y==512) idx_y = 0; + plots_per_frame[frame_cnt]++; + } +} + +// Counts frames - updated by the IRQ +volatile byte frame_cnt = 1; + +// Setup the IRQ +void init_irq() { + asm { sei } + // Disable kernal & basic + *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK; + *PROCPORT = PROCPORT_RAM_IO; + // Disable CIA 1 Timer IRQ + *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR; + // Set raster line to $100 + *VIC_CONTROL |=$80; + *RASTER = $00; + // Enable Raster Interrupt + *IRQ_ENABLE = IRQ_RASTER; + // Set the IRQ routine + *HARDWARE_IRQ = &irq; + asm { cli } +} + +// Interrupt Routine counting frames +interrupt(hardware_clobber) void irq() { + *BGCOL = WHITE; + if(frame_cnt) frame_cnt++; + *BGCOL = BLACK; + // Acknowledge the IRQ + *IRQ_STATUS = IRQ_RASTER; +} \ No newline at end of file diff --git a/src/test/kc/bitmap-plot-2.kc b/src/test/kc/bitmap-plot-2.kc new file mode 100644 index 000000000..392df2f37 --- /dev/null +++ b/src/test/kc/bitmap-plot-2.kc @@ -0,0 +1,75 @@ +// Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots a spiral +import "c64" +import "sinus" +import "multiply" +import "bitmap2" + +byte* BITMAP = 0x2000; +byte* SCREEN = 0x0400; + +byte[0x100] plots_per_frame; + +align(0x100) signed word[512] SINUS; + +void main() { + sin16s_gen2(SINUS, 512, -0x1001, 0x1001); + bitmap_init(BITMAP, SCREEN); + bitmap_clear(BLACK, WHITE); + *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3; + *D018 = toD018(SCREEN, BITMAP); + init_irq(); + word idx_x = 0; + word idx_y = 0x80; + signed word r = 0; + byte r_add = 4; + while(true) { + signed word cos_x = SINUS[idx_x]; + signed dword xpos = mul16s(r, cos_x); + word x = (word)(160 + ((signed word)>xpos)>>2); + signed word sin_y = SINUS[idx_y]; + signed dword ypos = mul16s(r, sin_y); + word y = (word)(100 + ((signed word)>ypos)>>2); + bitmap_plot(x, (byte)y); + plots_per_frame[frame_cnt]++; + idx_x += r_add; + if(idx_x>=512) idx_x = 0; + idx_y += r_add; + if(idx_y>=512) idx_y = 0; + r += r_add; + //if((idx_x==0) && (r_add!=1)) r_add /= 2; + if(r>=512*12+256) break; + } + while(true) + (*BORDERCOL)++; +} + +// Counts frames - updated by the IRQ +volatile byte frame_cnt = 1; + +// Setup the IRQ +void init_irq() { + asm { sei } + // Disable kernal & basic + *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK; + *PROCPORT = PROCPORT_RAM_IO; + // Disable CIA 1 Timer IRQ + *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR; + // Set raster line to $100 + *VIC_CONTROL |=$80; + *RASTER = $00; + // Enable Raster Interrupt + *IRQ_ENABLE = IRQ_RASTER; + // Set the IRQ routine + *HARDWARE_IRQ = &irq; + asm { cli } +} + +// Interrupt Routine counting frames +interrupt(hardware_clobber) void irq() { + *BGCOL = WHITE; + if(frame_cnt) frame_cnt++; + *BGCOL = BLACK; + // Acknowledge the IRQ + *IRQ_STATUS = IRQ_RASTER; +} \ No newline at end of file diff --git a/src/test/kc/examples/sinplotter/sine-plotter.kc b/src/test/kc/examples/sinplotter/sine-plotter.kc index 747b6370c..2af317e3f 100644 --- a/src/test/kc/examples/sinplotter/sine-plotter.kc +++ b/src/test/kc/examples/sinplotter/sine-plotter.kc @@ -30,9 +30,8 @@ void main() { *D016 = VIC_CSEL; *D018 = toD018(SCREEN, BITMAP); - memset(SCREEN, WHITE, 1000); - bitmap_init(BITMAP); - bitmap_clear(); + bitmap_init(BITMAP, SCREEN); + bitmap_clear(BLACK, WHITE); sin16s_gen2(sin, SIN_SIZE, -320, 320); render_sine(); while(true) { diff --git a/src/test/ref/bitmap-plot.asm b/src/test/ref/bitmap-plot-0.asm similarity index 99% rename from src/test/ref/bitmap-plot.asm rename to src/test/ref/bitmap-plot-0.asm index 544f77ab2..1791ded0c 100644 --- a/src/test/ref/bitmap-plot.asm +++ b/src/test/ref/bitmap-plot-0.asm @@ -1,4 +1,5 @@ // Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots simple plots .pc = $801 "Basic" :BasicUpstart(bbegin) .pc = $80d "Program" diff --git a/src/test/ref/bitmap-plot.cfg b/src/test/ref/bitmap-plot-0.cfg similarity index 100% rename from src/test/ref/bitmap-plot.cfg rename to src/test/ref/bitmap-plot-0.cfg diff --git a/src/test/ref/bitmap-plot.log b/src/test/ref/bitmap-plot-0.log similarity index 99% rename from src/test/ref/bitmap-plot.log rename to src/test/ref/bitmap-plot-0.log index b2f2fdc66..cee21276a 100644 --- a/src/test/ref/bitmap-plot.log +++ b/src/test/ref/bitmap-plot-0.log @@ -1830,6 +1830,7 @@ Allocated zp ZP_BYTE:36 [ bitmap_init::$6 ] INITIAL ASM //SEG0 File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots simple plots //SEG1 Basic Upstart .pc = $801 "Basic" :BasicUpstart(bbegin) @@ -2586,6 +2587,7 @@ Removing interrupt register storage ldy #00 in SEG162 [85] return - exit interr ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots simple plots //SEG1 Basic Upstart .pc = $801 "Basic" :BasicUpstart(bbegin) @@ -3450,6 +3452,7 @@ Score: 3136 //SEG0 File Comments // Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots simple plots //SEG1 Basic Upstart .pc = $801 "Basic" :BasicUpstart(bbegin) diff --git a/src/test/ref/bitmap-plot.sym b/src/test/ref/bitmap-plot-0.sym similarity index 100% rename from src/test/ref/bitmap-plot.sym rename to src/test/ref/bitmap-plot-0.sym diff --git a/src/test/ref/bitmap-plot-2.asm b/src/test/ref/bitmap-plot-2.asm new file mode 100644 index 000000000..5777cbf91 --- /dev/null +++ b/src/test/ref/bitmap-plot-2.asm @@ -0,0 +1,934 @@ +// Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots a spiral +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" + .const SIZEOF_SIGNED_WORD = 2 + // Processor port data direction register + .label PROCPORT_DDR = 0 + // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written + .const PROCPORT_DDR_MEMORY_MASK = 7 + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 I/O in $D000 + .const PROCPORT_RAM_IO = $35 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label VIC_CONTROL = $d011 + .label D011 = $d011 + .const VIC_BMM = $20 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label D018 = $d018 + // VIC II IRQ Status Register + .label IRQ_STATUS = $d019 + // VIC II IRQ Enable Register + .label IRQ_ENABLE = $d01a + // Bits for the IRQ Status/Enable Registers + .const IRQ_RASTER = 1 + // CIA#1 Interrupt Status & Control Register + .label CIA1_INTERRUPT = $dc0d + // Value that disables all CIA interrupts when stored to the CIA Interrupt registers + .const CIA_INTERRUPT_CLEAR = $7f + // The vector used when the HARDWARE serves IRQ interrupts + .label HARDWARE_IRQ = $fffe + // The colors of the C64 + .const BLACK = 0 + .const WHITE = 1 + // PI*2 in u[4.28] format + .const PI2_u4f28 = $6487ed51 + // PI in u[4.28] format + .const PI_u4f28 = $3243f6a9 + // PI/2 in u[4.28] format + .const PI_HALF_u4f28 = $1921fb54 + .label BITMAP = $2000 + .label SCREEN = $400 + .label rem16u = $2b + .label frame_cnt = $31 +bbegin: + // Counts frames - updated by the IRQ + lda #1 + sta frame_cnt + jsr main + rts +main: { + .const r_add = 4 + .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f + .label _9 = $32 + .label _11 = $32 + .label _15 = $34 + .label _17 = $34 + .label _18 = $34 + .label _28 = 8 + .label _29 = 8 + .label cos_x = 8 + .label xpos = $a + .label sin_y = 8 + .label ypos = $a + .label idx_x = 2 + .label idx_y = 6 + .label r = 4 + .label _30 = 8 + .label _31 = 8 + jsr sin16s_gen2 + jsr bitmap_init + jsr bitmap_clear + lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 + sta D011 + lda #toD0181_return + sta D018 + jsr init_irq + lda #$80 + sta idx_y + lda #0 + sta idx_y+1 + sta r + sta r+1 + sta idx_x + sta idx_x+1 + b2: + lda idx_x + asl + sta _28 + lda idx_x+1 + rol + sta _28+1 + clc + lda _30 + adc #SINUS + sta _30+1 + ldy #0 + lda (cos_x),y + tax + iny + lda (cos_x),y + stx cos_x + sta cos_x+1 + jsr mul16s + lda xpos+2 + sta _9 + lda xpos+3 + sta _9+1 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + clc + lda bitmap_plot.x + adc #<$a0 + sta bitmap_plot.x + lda bitmap_plot.x+1 + adc #>$a0 + sta bitmap_plot.x+1 + lda idx_y + asl + sta _29 + lda idx_y+1 + rol + sta _29+1 + clc + lda _31 + adc #SINUS + sta _31+1 + ldy #0 + lda (sin_y),y + tax + iny + lda (sin_y),y + stx sin_y + sta sin_y+1 + jsr mul16s + lda ypos+2 + sta _15 + lda ypos+3 + sta _15+1 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + lda #$64 + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda _18 + adc $fe + sta _18 + lda _18+1 + adc $ff + sta _18+1 + lda _18 + jsr bitmap_plot + ldx frame_cnt + inc plots_per_frame,x + lda #r_add + clc + adc idx_x + sta idx_x + bcc !+ + inc idx_x+1 + !: + lda idx_x+1 + cmp #>$200 + bcc b3 + bne !+ + lda idx_x + cmp #<$200 + bcc b3 + !: + lda #0 + sta idx_x + sta idx_x+1 + b3: + lda #r_add + clc + adc idx_y + sta idx_y + bcc !+ + inc idx_y+1 + !: + lda idx_y+1 + cmp #>$200 + bcc b4 + bne !+ + lda idx_y + cmp #<$200 + bcc b4 + !: + lda #0 + sta idx_y + sta idx_y+1 + b4: + lda #r_add + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda r + adc $fe + sta r + lda r+1 + adc $ff + sta r+1 + lda r + cmp #<$200*$c+$100 + lda r+1 + sbc #>$200*$c+$100 + bvc !+ + eor #$80 + !: + bpl b5 + jmp b2 + b5: + inc BORDERCOL + jmp b5 +} +// Plot a single dot in the bitmap +// bitmap_plot(signed word zeropage($32) x, byte register(A) y) +bitmap_plot: { + .label _1 = $38 + .label plotter = $36 + .label x = $32 + .label _3 = $36 + tay + lda bitmap_plot_yhi,y + sta _3+1 + lda bitmap_plot_ylo,y + sta _3 + lda x + and #<$fff8 + sta _1 + lda x+1 + and #>$fff8 + sta _1+1 + lda plotter + clc + adc _1 + sta plotter + lda plotter+1 + adc _1+1 + sta plotter+1 + lda x + tay + lda bitmap_plot_bit,y + ldy #0 + ora (plotter),y + sta (plotter),y + rts +} +// Multiply of two signed words to a signed double word +// Fixes offsets introduced by using unsigned multiplication +// mul16s(signed word zeropage(4) a, signed word zeropage(8) b) +mul16s: { + .label _9 = $3a + .label _13 = $3c + .label _16 = $3a + .label _17 = $3c + .label m = $a + .label return = $a + .label a = 4 + .label b = 8 + lda b + sta mul16u.mb + lda b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + lda a + sta mul16u.a + lda a+1 + sta mul16u.a+1 + jsr mul16u + lda a+1 + bpl b1 + lda m+2 + sta _9 + lda m+3 + sta _9+1 + lda _16 + sec + sbc b + sta _16 + lda _16+1 + sbc b+1 + sta _16+1 + lda _16 + sta m+2 + lda _16+1 + sta m+3 + b1: + lda b+1 + bpl b2 + lda m+2 + sta _13 + lda m+3 + sta _13+1 + lda _17 + sec + sbc a + sta _17 + lda _17+1 + sbc a+1 + sta _17+1 + lda _17 + sta m+2 + lda _17+1 + sta m+3 + b2: + rts +} +// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word +// mul16u(word zeropage($10) a, word zeropage($e) b) +mul16u: { + .label mb = $12 + .label a = $10 + .label res = $a + .label return = $a + .label b = $e + lda #0 + sta res + sta res+1 + sta res+2 + sta res+3 + b1: + lda a + bne b2 + lda a+1 + bne b2 + rts + b2: + lda a + and #1 + cmp #0 + beq b3 + lda res + clc + adc mb + sta res + lda res+1 + adc mb+1 + sta res+1 + lda res+2 + adc mb+2 + sta res+2 + lda res+3 + adc mb+3 + sta res+3 + b3: + lsr a+1 + ror a + asl mb + rol mb+1 + rol mb+2 + rol mb+3 + jmp b1 +} +// Setup the IRQ +init_irq: { + sei + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + lda #PROCPORT_RAM_IO + sta PROCPORT + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + // Set raster line to $100 + lda #$80 + ora VIC_CONTROL + sta VIC_CONTROL + lda #0 + sta RASTER + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + // Set the IRQ routine + lda #irq + sta HARDWARE_IRQ+1 + cli + rts +} +// Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with +bitmap_clear: { + .const col = WHITE*$10 + ldx #col + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + lda #SCREEN + sta memset.str+1 + jsr memset + ldx #0 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + lda #BITMAP + sta memset.str+1 + jsr memset + rts +} +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($16) str, byte register(X) c, word zeropage($18) num) +memset: { + .label end = $18 + .label dst = $16 + .label str = $16 + .label num = $18 + lda end + clc + adc str + sta end + lda end+1 + adc str+1 + sta end+1 + b1: + txa + ldy #0 + sta (dst),y + inc dst + bne !+ + inc dst+1 + !: + lda dst+1 + cmp end+1 + bne b1 + lda dst + cmp end + bne b1 + rts +} +// Initialize bitmap plotting tables +bitmap_init: { + .label _7 = $3e + .label yoffs = $1a + ldx #0 + lda #$80 + b1: + sta bitmap_plot_bit,x + lsr + cmp #0 + bne b2 + lda #$80 + b2: + inx + cpx #0 + bne b1 + lda #BITMAP + sta yoffs+1 + ldx #0 + b3: + lda #7 + sax _7 + lda yoffs + ora _7 + sta bitmap_plot_ylo,x + lda yoffs+1 + sta bitmap_plot_yhi,x + lda #7 + cmp _7 + bne b4 + clc + lda yoffs + adc #<$28*8 + sta yoffs + lda yoffs+1 + adc #>$28*8 + sta yoffs+1 + b4: + inx + cpx #0 + bne b3 + rts +} +// Generate signed word sinus table - with values in the range min-max. +// sintab - the table to generate into +// wavelength - the number of sinus points in a total sinus wavelength (the size of the table) +// sin16s_gen2(signed word* zeropage($20) sintab) +sin16s_gen2: { + .label wavelength = $200 + .const min = -$1001 + .const max = $1001 + .const ampl = max-min + .label _5 = $a + .label _6 = $43 + .label step = $3f + .label sintab = $20 + .label x = $1c + .label i = $22 + jsr div32u16u + lda #0 + sta i + sta i+1 + lda #SINUS + sta sintab+1 + lda #0 + sta x + sta x+1 + sta x+2 + sta x+3 + // u[4.28] + b1: + lda x + sta sin16s.x + lda x+1 + sta sin16s.x+1 + lda x+2 + sta sin16s.x+2 + lda x+3 + sta sin16s.x+3 + jsr sin16s + lda #ampl + sta mul16s.b+1 + jsr mul16s + lda _5+2 + sta _6 + lda _5+3 + sta _6+1 + ldy #0 + lda _6 + sta (sintab),y + iny + lda _6+1 + sta (sintab),y + lda #SIZEOF_SIGNED_WORD + clc + adc sintab + sta sintab + bcc !+ + inc sintab+1 + !: + lda x + clc + adc step + sta x + lda x+1 + adc step+1 + sta x+1 + lda x+2 + adc step+2 + sta x+2 + lda x+3 + adc step+3 + sta x+3 + inc i + bne !+ + inc i+1 + !: + lda i+1 + cmp #>wavelength + bcc b1 + bne !+ + lda i + cmp #PI_u4f28>>$10 + bcc b4 + bne !+ + lda x+2 + cmp #>$10 + bcc b4 + bne !+ + lda x+1 + cmp #>PI_u4f28 + bcc b4 + bne !+ + lda x + cmp #PI_u4f28 + sta x+1 + lda x+2 + sbc #>$10 + sta x+2 + lda x+3 + sbc #>PI_u4f28>>$10 + sta x+3 + lda #1 + sta isUpper + jmp b1 + b4: + lda #0 + sta isUpper + b1: + lda x+3 + cmp #>PI_HALF_u4f28>>$10 + bcc b2 + bne !+ + lda x+2 + cmp #>$10 + bcc b2 + bne !+ + lda x+1 + cmp #>PI_HALF_u4f28 + bcc b2 + bne !+ + lda x + cmp #PI_u4f28 + sbc x+1 + sta x+1 + lda #>$10 + sbc x+2 + sta x+2 + lda #>PI_u4f28>>$10 + sbc x+3 + sta x+3 + b2: + ldy #3 + !: + asl _4 + rol _4+1 + rol _4+2 + rol _4+3 + dey + bne !- + lda _4+2 + sta x1 + lda _4+3 + sta x1+1 + lda x1 + sta mulu16_sel.v1 + lda x1+1 + sta mulu16_sel.v1+1 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + ldx #0 + jsr mulu16_sel + lda mulu16_sel.return + sta x2 + lda mulu16_sel.return+1 + sta x2+1 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + ldx #1 + jsr mulu16_sel + lda mulu16_sel.return + sta mulu16_sel.return_1 + lda mulu16_sel.return+1 + sta mulu16_sel.return_1+1 + ldx #1 + lda #<$10000/6 + sta mulu16_sel.v2 + lda #>$10000/6 + sta mulu16_sel.v2+1 + jsr mulu16_sel + lda x1 + sec + sbc x3_6 + sta usinx + lda x1+1 + sbc x3_6+1 + sta usinx+1 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + ldx #0 + jsr mulu16_sel + lda mulu16_sel.return + sta mulu16_sel.return_10 + lda mulu16_sel.return+1 + sta mulu16_sel.return_10+1 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + ldx #0 + jsr mulu16_sel + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lda usinx + clc + adc x5_128 + sta usinx + lda usinx+1 + adc x5_128+1 + sta usinx+1 + lda isUpper + cmp #0 + beq b3 + sec + lda #0 + sbc sinx + sta sinx + lda #0 + sbc sinx+1 + sta sinx+1 + b3: + rts +} +// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. +// The select parameter indicates how many of the highest bits of the 32-bit result to skip +// mulu16_sel(word zeropage($29) v1, word zeropage($e) v2, byte register(X) select) +mulu16_sel: { + .label _0 = $a + .label _1 = $a + .label v1 = $29 + .label v2 = $e + .label return = $47 + .label return_1 = $29 + .label return_10 = $29 + lda v1 + sta mul16u.a + lda v1+1 + sta mul16u.a+1 + lda mul16u.b + sta mul16u.mb + lda mul16u.b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + jsr mul16u + cpx #0 + beq !e+ + !: + asl _1 + rol _1+1 + rol _1+2 + rol _1+3 + dex + bne !- + !e: + lda _1+2 + sta return + lda _1+3 + sta return+1 + rts +} +// Divide unsigned 32-bit dword dividend with a 16-bit word divisor +// The 16-bit word remainder can be found in rem16u after the division +div32u16u: { + .label quotient_hi = $49 + .label quotient_lo = $2f + .label return = $3f + lda #>$10 + sta divr16u.dividend + lda #>PI2_u4f28>>$10 + sta divr16u.dividend+1 + lda #0 + sta divr16u.rem + sta divr16u.rem+1 + jsr divr16u + lda divr16u.return + sta quotient_hi + lda divr16u.return+1 + sta quotient_hi+1 + lda #PI2_u4f28&$ffff + sta divr16u.dividend+1 + jsr divr16u + lda quotient_hi + sta return+2 + lda quotient_hi+1 + sta return+3 + lda quotient_lo + sta return + lda quotient_lo+1 + sta return+1 + rts +} +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage($2d) dividend, word zeropage($2b) rem) +divr16u: { + .label rem = $2b + .label dividend = $2d + .label quotient = $2f + .label return = $2f + ldx #0 + txa + sta quotient + sta quotient+1 + b1: + asl rem + rol rem+1 + lda dividend+1 + and #$80 + cmp #0 + beq b2 + lda #1 + ora rem + sta rem + b2: + asl dividend + rol dividend+1 + asl quotient + rol quotient+1 + lda rem+1 + cmp #>sin16s_gen2.wavelength + bcc b3 + bne !+ + lda rem + cmp #sin16s_gen2.wavelength + sta rem+1 + b3: + inx + cpx #$10 + bne b1 + rts +} +// Interrupt Routine counting frames +irq: { + sta rega+1 + lda #WHITE + sta BGCOL + lda #0 + cmp frame_cnt + beq b1 + inc frame_cnt + b1: + lda #BLACK + sta BGCOL + // Acknowledge the IRQ + lda #IRQ_RASTER + sta IRQ_STATUS + rega: + lda #00 + rti +} + // Tables for the plotter - initialized by calling bitmap_init(); + bitmap_plot_ylo: .fill $100, 0 + bitmap_plot_yhi: .fill $100, 0 + bitmap_plot_bit: .fill $100, 0 + plots_per_frame: .fill $100, 0 + .align $100 + SINUS: .fill 2*$200, 0 diff --git a/src/test/ref/bitmap-plot-2.cfg b/src/test/ref/bitmap-plot-2.cfg new file mode 100644 index 000000000..7410b3261 --- /dev/null +++ b/src/test/ref/bitmap-plot-2.cfg @@ -0,0 +1,433 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] (byte) frame_cnt#0 ← (byte) 1 + to:@2 +@2: scope:[] from @1 + [2] phi() + [3] call main + to:@end +@end: scope:[] from @2 + [4] phi() +main: scope:[main] from @2 + [5] phi() + [6] call sin16s_gen2 + to:main::@7 +main::@7: scope:[main] from main + [7] phi() + [8] call bitmap_init + to:main::@8 +main::@8: scope:[main] from main::@7 + [9] phi() + [10] call bitmap_clear + to:main::@9 +main::@9: scope:[main] from main::@8 + [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 + to:main::toD0181 +main::toD0181: scope:[main] from main::@9 + [12] phi() + to:main::@6 +main::@6: scope:[main] from main::toD0181 + [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + [14] call init_irq + to:main::@1 +main::@1: scope:[main] from main::@4 main::@6 + [15] (word) main::idx_y#3 ← phi( main::@6/(byte) $80 main::@4/(word) main::idx_y#10 ) + [15] (signed word) main::r#10 ← phi( main::@6/(signed byte) 0 main::@4/(signed word) main::r#1 ) + [15] (word) main::idx_x#3 ← phi( main::@6/(byte) 0 main::@4/(word) main::idx_x#10 ) + to:main::@2 +main::@2: scope:[main] from main::@1 + [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 + [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 + [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) + [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 + [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + [21] call mul16s + [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 + [24] (word~) main::$9 ← > (signed dword) main::xpos#0 + [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 + [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 + [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 + [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 + [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) + [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 + [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + [32] call mul16s + [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 + to:main::@11 +main::@11: scope:[main] from main::@10 + [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 + [35] (word~) main::$15 ← > (signed dword) main::ypos#0 + [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 + [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 + [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 + [39] call bitmap_plot + to:main::@12 +main::@12: scope:[main] from main::@11 + [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) + [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 + [42] if((word) main::idx_x#1<(word) $200) goto main::@13 + to:main::@3 +main::@13: scope:[main] from main::@12 + [43] phi() + to:main::@3 +main::@3: scope:[main] from main::@12 main::@13 + [44] (word) main::idx_x#10 ← phi( main::@12/(byte) 0 main::@13/(word) main::idx_x#1 ) + [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 + [46] if((word) main::idx_y#1<(word) $200) goto main::@14 + to:main::@4 +main::@14: scope:[main] from main::@3 + [47] phi() + to:main::@4 +main::@4: scope:[main] from main::@14 main::@3 + [48] (word) main::idx_y#10 ← phi( main::@3/(byte) 0 main::@14/(word) main::idx_y#1 ) + [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 + [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 + to:main::@1 +main::@5: scope:[main] from main::@4 main::@5 + [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + to:main::@5 +bitmap_plot: scope:[bitmap_plot] from main::@11 + [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) + [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 + [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 + [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 + [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) + to:bitmap_plot::@return +bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot + [57] return + to:@return +mul16s: scope:[mul16s] from main::@10 main::@2 sin16s_gen2::@3 + [58] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@10/(signed word) mul16s::b#2 sin16s_gen2::@3/(const signed word) sin16s_gen2::ampl#0 ) + [58] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@10/(signed word) mul16s::a#2 sin16s_gen2::@3/(signed word) mul16s::a#0 ) + [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 + [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 + [61] call mul16u + [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + to:mul16s::@5 +mul16s::@5: scope:[mul16s] from mul16s + [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 + to:mul16s::@3 +mul16s::@3: scope:[mul16s] from mul16s::@5 + [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 + [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 + [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 + to:mul16s::@1 +mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@5 + [68] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 ) + [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 + to:mul16s::@4 +mul16s::@4: scope:[mul16s] from mul16s::@1 + [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 + [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 + [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 + to:mul16s::@2 +mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 + [73] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 ) + [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + to:mul16s::@return +mul16s::@return: scope:[mul16s] from mul16s::@2 + [75] return + to:@return +mul16u: scope:[mul16u] from mul16s mulu16_sel + [76] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) + [76] (dword) mul16u::mb#0 ← phi( mul16s/(dword~) mul16u::mb#6 mulu16_sel/(word) mul16u::b#1 ) + to:mul16u::@1 +mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 + [77] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) + [77] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) + [77] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) + [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 + to:mul16u::@return +mul16u::@return: scope:[mul16u] from mul16u::@1 + [79] return + to:@return +mul16u::@2: scope:[mul16u] from mul16u::@1 + [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 + [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 + to:mul16u::@4 +mul16u::@4: scope:[mul16u] from mul16u::@2 + [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 + to:mul16u::@3 +mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 + [83] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) + [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 + [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 + to:mul16u::@1 +init_irq: scope:[init_irq] from main::@6 + asm { sei } + [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 + [91] *((const byte*) RASTER#0) ← (byte) 0 + [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() + asm { cli } + to:init_irq::@return +init_irq::@return: scope:[init_irq] from init_irq + [95] return + to:@return +bitmap_clear: scope:[bitmap_clear] from main::@8 + [96] phi() + [97] call memset + to:bitmap_clear::@1 +bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear + [98] phi() + [99] call memset + to:bitmap_clear::@return +bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 + [100] return + to:@return +memset: scope:[memset] from bitmap_clear bitmap_clear::@1 + [101] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [101] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) + [101] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) + [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 + [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + [104] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) + [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 + [108] return + to:@return +bitmap_init: scope:[bitmap_init] from main::@7 + [109] phi() + to:bitmap_init::@1 +bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 + [110] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [110] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + to:bitmap_init::@2 +bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 + [114] phi() + to:bitmap_init::@2 +bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 + [115] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + to:bitmap_init::@3 +bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 + [118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + to:bitmap_init::@5 +bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 + [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + to:bitmap_init::@4 +bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 + [127] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + to:bitmap_init::@return +bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 + [130] return + to:@return +sin16s_gen2: scope:[sin16s_gen2] from main + [131] phi() + [132] call div32u16u + [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:sin16s_gen2::@2 +sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 + [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + to:sin16s_gen2::@1 +sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 + [135] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [135] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [135] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [137] call sin16s + [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + to:sin16s_gen2::@3 +sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 + [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [140] call mul16s + [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + to:sin16s_gen2::@4 +sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 + [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 + [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + to:sin16s_gen2::@return +sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 + [149] return + to:@return +sin16s: scope:[sin16s] from sin16s_gen2::@1 + [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + to:sin16s::@4 +sin16s::@4: scope:[sin16s] from sin16s + [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + to:sin16s::@1 +sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 + [152] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [152] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + to:sin16s::@5 +sin16s::@5: scope:[sin16s] from sin16s::@1 + [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + to:sin16s::@2 +sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 + [155] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [160] call mulu16_sel + [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + to:sin16s::@7 +sin16s::@7: scope:[sin16s] from sin16s::@2 + [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [165] call mulu16_sel + [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + to:sin16s::@8 +sin16s::@8: scope:[sin16s] from sin16s::@7 + [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [169] call mulu16_sel + [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + to:sin16s::@9 +sin16s::@9: scope:[sin16s] from sin16s::@8 + [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [175] call mulu16_sel + [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + to:sin16s::@10 +sin16s::@10: scope:[sin16s] from sin16s::@9 + [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [180] call mulu16_sel + [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + to:sin16s::@11 +sin16s::@11: scope:[sin16s] from sin16s::@10 + [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + to:sin16s::@6 +sin16s::@6: scope:[sin16s] from sin16s::@11 + [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + to:sin16s::@3 +sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 + [187] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + to:sin16s::@return +sin16s::@return: scope:[sin16s] from sin16s::@3 + [188] return + to:@return +sin16s::@12: scope:[sin16s] from sin16s::@11 + [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + to:sin16s::@3 +mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 + [190] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [190] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [190] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [193] call mul16u + [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + to:mulu16_sel::@1 +mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel + [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + to:mulu16_sel::@return +mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 + [198] return + to:@return +div32u16u: scope:[div32u16u] from sin16s_gen2 + [199] phi() + [200] call divr16u + [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@1 +div32u16u::@1: scope:[div32u16u] from div32u16u + [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [203] (word) divr16u::rem#4 ← (word) rem16u#1 + [204] call divr16u + [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u::@1 + [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@2 + [208] return + to:@return +divr16u: scope:[divr16u] from div32u16u div32u16u::@1 + [209] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [209] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [210] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [210] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [210] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [210] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [216] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [220] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + to:divr16u::@3 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [222] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [222] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [225] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [226] return + to:@return +irq: scope:[irq] from + [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + to:irq::@2 +irq::@2: scope:[irq] from irq + [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + to:irq::@1 +irq::@1: scope:[irq] from irq irq::@2 + [230] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + to:irq::@return +irq::@return: scope:[irq] from irq::@1 + [233] return + to:@return diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log new file mode 100644 index 000000000..a8a683c67 --- /dev/null +++ b/src/test/ref/bitmap-plot-2.log @@ -0,0 +1,10217 @@ +Resolved forward reference frame_cnt to (byte) frame_cnt +Resolved forward reference irq to interrupt(HARDWARE_CLOBBER)(void()) irq() +Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0 +Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1 +Adding pointer type conversion cast (byte*) CHARGEN in (byte*) CHARGEN ← (number) $d000 +Adding pointer type conversion cast (byte*) SPRITES_XPOS in (byte*) SPRITES_XPOS ← (number) $d000 +Adding pointer type conversion cast (byte*) SPRITES_YPOS in (byte*) SPRITES_YPOS ← (number) $d001 +Adding pointer type conversion cast (byte*) SPRITES_XMSB in (byte*) SPRITES_XMSB ← (number) $d010 +Adding pointer type conversion cast (byte*) RASTER in (byte*) RASTER ← (number) $d012 +Adding pointer type conversion cast (byte*) SPRITES_ENABLE in (byte*) SPRITES_ENABLE ← (number) $d015 +Adding pointer type conversion cast (byte*) SPRITES_EXPAND_Y in (byte*) SPRITES_EXPAND_Y ← (number) $d017 +Adding pointer type conversion cast (byte*) SPRITES_PRIORITY in (byte*) SPRITES_PRIORITY ← (number) $d01b +Adding pointer type conversion cast (byte*) SPRITES_MC in (byte*) SPRITES_MC ← (number) $d01c +Adding pointer type conversion cast (byte*) SPRITES_EXPAND_X in (byte*) SPRITES_EXPAND_X ← (number) $d01d +Adding pointer type conversion cast (byte*) BORDERCOL in (byte*) BORDERCOL ← (number) $d020 +Adding pointer type conversion cast (byte*) BGCOL in (byte*) BGCOL ← (number) $d021 +Adding pointer type conversion cast (byte*) BGCOL1 in (byte*) BGCOL1 ← (number) $d021 +Adding pointer type conversion cast (byte*) BGCOL2 in (byte*) BGCOL2 ← (number) $d022 +Adding pointer type conversion cast (byte*) BGCOL3 in (byte*) BGCOL3 ← (number) $d023 +Adding pointer type conversion cast (byte*) BGCOL4 in (byte*) BGCOL4 ← (number) $d024 +Adding pointer type conversion cast (byte*) SPRITES_MC1 in (byte*) SPRITES_MC1 ← (number) $d025 +Adding pointer type conversion cast (byte*) SPRITES_MC2 in (byte*) SPRITES_MC2 ← (number) $d026 +Adding pointer type conversion cast (byte*) SPRITES_COLS in (byte*) SPRITES_COLS ← (number) $d027 +Adding pointer type conversion cast (byte*) VIC_CONTROL in (byte*) VIC_CONTROL ← (number) $d011 +Adding pointer type conversion cast (byte*) D011 in (byte*) D011 ← (number) $d011 +Adding pointer type conversion cast (byte*) VIC_CONTROL2 in (byte*) VIC_CONTROL2 ← (number) $d016 +Adding pointer type conversion cast (byte*) D016 in (byte*) D016 ← (number) $d016 +Adding pointer type conversion cast (byte*) D018 in (byte*) D018 ← (number) $d018 +Adding pointer type conversion cast (byte*) VIC_MEMORY in (byte*) VIC_MEMORY ← (number) $d018 +Adding pointer type conversion cast (byte*) LIGHTPEN_X in (byte*) LIGHTPEN_X ← (number) $d013 +Adding pointer type conversion cast (byte*) LIGHTPEN_Y in (byte*) LIGHTPEN_Y ← (number) $d014 +Adding pointer type conversion cast (byte*) IRQ_STATUS in (byte*) IRQ_STATUS ← (number) $d019 +Adding pointer type conversion cast (byte*) IRQ_ENABLE in (byte*) IRQ_ENABLE ← (number) $d01a +Adding pointer type conversion cast (byte*) COLS in (byte*) COLS ← (number) $d800 +Adding pointer type conversion cast (byte*) CIA1_PORT_A in (byte*) CIA1_PORT_A ← (number) $dc00 +Adding pointer type conversion cast (byte*) CIA1_PORT_B in (byte*) CIA1_PORT_B ← (number) $dc01 +Adding pointer type conversion cast (byte*) CIA1_PORT_A_DDR in (byte*) CIA1_PORT_A_DDR ← (number) $dc02 +Adding pointer type conversion cast (byte*) CIA1_PORT_B_DDR in (byte*) CIA1_PORT_B_DDR ← (number) $dc03 +Adding pointer type conversion cast (byte*) CIA1_INTERRUPT in (byte*) CIA1_INTERRUPT ← (number) $dc0d +Adding pointer type conversion cast (byte*) CIA2_PORT_A in (byte*) CIA2_PORT_A ← (number) $dd00 +Adding pointer type conversion cast (byte*) CIA2_PORT_B in (byte*) CIA2_PORT_B ← (number) $dd01 +Adding pointer type conversion cast (byte*) CIA2_PORT_A_DDR in (byte*) CIA2_PORT_A_DDR ← (number) $dd02 +Adding pointer type conversion cast (byte*) CIA2_PORT_B_DDR in (byte*) CIA2_PORT_B_DDR ← (number) $dd03 +Adding pointer type conversion cast (byte*) CIA2_INTERRUPT in (byte*) CIA2_INTERRUPT ← (number) $dd0d +Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_IRQ ← (number) $314 +Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe +Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo } +Adding pointer type conversion cast to void pointer (byte*) memcpy::source in (byte*) memcpy::src ← (void*) memcpy::source +Adding pointer type conversion cast to void pointer (byte*) memcpy::destination in (byte*) memcpy::dst ← (void*) memcpy::destination +Adding pointer type conversion cast to void pointer (byte*) memset::str in (byte*) memset::dst ← (void*) memset::str +Adding void pointer type conversion cast (void*) bitmap_screen in (void*~) bitmap_clear::$2 ← call memset (byte*) bitmap_screen (byte) bitmap_clear::col (word) $3e8 +Adding void pointer type conversion cast (void*) bitmap_gfx in (void*~) bitmap_clear::$3 ← call memset (byte*) bitmap_gfx (number) 0 (word) $1f40 +Adding pointer type conversion cast (byte*) BITMAP in (byte*) BITMAP ← (number) $2000 +Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400 +Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab +Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab +Fixing pointer array-indexing *((signed word[$200]) SINUS + (word) main::idx_x) +Fixing pointer array-indexing *((signed word[$200]) SINUS + (word) main::idx_y) +Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src) +Warning! Adding boolean cast to non-boolean sub-expression (byte) frame_cnt +Identified constant variable (byte*) BITMAP +Identified constant variable (byte*) SCREEN +Identified constant variable (byte) main::r_add +Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx +Inlined call (byte~) main::$6 ← call toD018 (byte*) SCREEN (byte*) BITMAP +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) divr16u::@7 +Culled Empty Block (label) @7 +Culled Empty Block (label) @8 +Culled Empty Block (label) div32u16u::@1 +Culled Empty Block (label) @9 +Culled Empty Block (label) @10 +Culled Empty Block (label) @11 +Culled Empty Block (label) @12 +Culled Empty Block (label) @13 +Culled Empty Block (label) @14 +Culled Empty Block (label) @15 +Culled Empty Block (label) mul16u::@5 +Culled Empty Block (label) mul16u::@6 +Culled Empty Block (label) mul16u::@8 +Culled Empty Block (label) mul16u::@9 +Culled Empty Block (label) @16 +Culled Empty Block (label) mul16s::@5 +Culled Empty Block (label) @18 +Culled Empty Block (label) sin16s_gen2::@2 +Culled Empty Block (label) @19 +Culled Empty Block (label) @20 +Culled Empty Block (label) sin16s::@7 +Culled Empty Block (label) @21 +Culled Empty Block (label) @22 +Culled Empty Block (label) mulu16_sel::@1 +Culled Empty Block (label) @23 +Culled Empty Block (label) @24 +Culled Empty Block (label) @25 +Culled Empty Block (label) @26 +Culled Empty Block (label) memset::@3 +Culled Empty Block (label) @27 +Culled Empty Block (label) bitmap_init::@8 +Culled Empty Block (label) @29 +Culled Empty Block (label) @30 +Culled Empty Block (label) main::toD0181_@1 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@3 +Culled Empty Block (label) main::@9 +Culled Empty Block (label) main::@6 +Culled Empty Block (label) main::@12 +Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::@13 +Culled Empty Block (label) main::@14 +Culled Empty Block (label) main::@18 +Culled Empty Block (label) main::@17 +Culled Empty Block (label) main::@19 +Culled Empty Block (label) main::@20 +Culled Empty Block (label) @33 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + (byte*) PROCPORT_DDR#0 ← ((byte*)) (number) 0 + (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 + (byte*) PROCPORT#0 ← ((byte*)) (number) 1 + (byte) PROCPORT_RAM_IO#0 ← (number) $35 + (byte*) RASTER#0 ← ((byte*)) (number) $d012 + (byte*) BORDERCOL#0 ← ((byte*)) (number) $d020 + (byte*) BGCOL#0 ← ((byte*)) (number) $d021 + (byte*) VIC_CONTROL#0 ← ((byte*)) (number) $d011 + (byte*) D011#0 ← ((byte*)) (number) $d011 + (byte) VIC_BMM#0 ← (number) $20 + (byte) VIC_DEN#0 ← (number) $10 + (byte) VIC_RSEL#0 ← (number) 8 + (byte*) D018#0 ← ((byte*)) (number) $d018 + (byte*) IRQ_STATUS#0 ← ((byte*)) (number) $d019 + (byte*) IRQ_ENABLE#0 ← ((byte*)) (number) $d01a + (byte) IRQ_RASTER#0 ← (number) 1 + (byte*) CIA1_INTERRUPT#0 ← ((byte*)) (number) $dc0d + (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f + (void()**) HARDWARE_IRQ#0 ← ((void()**)) (number) $fffe + (byte) BLACK#0 ← (number) 0 + (byte) WHITE#0 ← (number) 1 + to:@6 +@6: scope:[] from @begin + (word) rem16u#0 ← (number) 0 + to:@17 +divr16u: scope:[divr16u] from div32u16u div32u16u::@2 + (word) divr16u::divisor#6 ← phi( div32u16u/(word) divr16u::divisor#0 div32u16u::@2/(word) divr16u::divisor#1 ) + (word) divr16u::dividend#5 ← phi( div32u16u/(word) divr16u::dividend#1 div32u16u::@2/(word) divr16u::dividend#2 ) + (word) divr16u::rem#10 ← phi( div32u16u/(word) divr16u::rem#3 div32u16u::@2/(word) divr16u::rem#4 ) + (word) divr16u::quotient#0 ← (number) 0 + (byte) divr16u::i#0 ← (byte) 0 + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + (byte) divr16u::i#5 ← phi( divr16u/(byte) divr16u::i#0 divr16u::@3/(byte) divr16u::i#1 ) + (word) divr16u::divisor#4 ← phi( divr16u/(word) divr16u::divisor#6 divr16u::@3/(word) divr16u::divisor#7 ) + (word) divr16u::quotient#6 ← phi( divr16u/(word) divr16u::quotient#0 divr16u::@3/(word) divr16u::quotient#8 ) + (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#6 ) + (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + (word~) divr16u::$0 ← (word) divr16u::rem#5 << (number) 1 + (word) divr16u::rem#0 ← (word~) divr16u::$0 + (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + (number~) divr16u::$2 ← (byte~) divr16u::$1 & (number) $80 + (bool~) divr16u::$3 ← (number~) divr16u::$2 != (number) 0 + (bool~) divr16u::$4 ← ! (bool~) divr16u::$3 + if((bool~) divr16u::$4) goto divr16u::@2 + to:divr16u::@4 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + (byte) divr16u::i#3 ← phi( divr16u::@1/(byte) divr16u::i#5 divr16u::@4/(byte) divr16u::i#6 ) + (word) divr16u::divisor#2 ← phi( divr16u::@1/(word) divr16u::divisor#4 divr16u::@4/(word) divr16u::divisor#5 ) + (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + (word) divr16u::quotient#3 ← phi( divr16u::@1/(word) divr16u::quotient#6 divr16u::@4/(word) divr16u::quotient#7 ) + (word) divr16u::dividend#4 ← phi( divr16u::@1/(word) divr16u::dividend#3 divr16u::@4/(word) divr16u::dividend#7 ) + (word~) divr16u::$6 ← (word) divr16u::dividend#4 << (number) 1 + (word) divr16u::dividend#0 ← (word~) divr16u::$6 + (word~) divr16u::$7 ← (word) divr16u::quotient#3 << (number) 1 + (word) divr16u::quotient#1 ← (word~) divr16u::$7 + (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 + (bool~) divr16u::$9 ← ! (bool~) divr16u::$8 + if((bool~) divr16u::$9) goto divr16u::@3 + to:divr16u::@5 +divr16u::@4: scope:[divr16u] from divr16u::@1 + (byte) divr16u::i#6 ← phi( divr16u::@1/(byte) divr16u::i#5 ) + (word) divr16u::divisor#5 ← phi( divr16u::@1/(word) divr16u::divisor#4 ) + (word) divr16u::quotient#7 ← phi( divr16u::@1/(word) divr16u::quotient#6 ) + (word) divr16u::dividend#7 ← phi( divr16u::@1/(word) divr16u::dividend#3 ) + (word) divr16u::rem#7 ← phi( divr16u::@1/(word) divr16u::rem#0 ) + (number~) divr16u::$5 ← (word) divr16u::rem#7 | (number) 1 + (word) divr16u::rem#1 ← (number~) divr16u::$5 + to:divr16u::@2 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + (word) divr16u::divisor#7 ← phi( divr16u::@2/(word) divr16u::divisor#2 divr16u::@5/(word) divr16u::divisor#3 ) + (word) divr16u::quotient#8 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + (word) divr16u::dividend#6 ← phi( divr16u::@2/(word) divr16u::dividend#0 divr16u::@5/(word) divr16u::dividend#8 ) + (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + (byte) divr16u::i#2 ← phi( divr16u::@2/(byte) divr16u::i#3 divr16u::@5/(byte) divr16u::i#4 ) + (byte) divr16u::i#1 ← (byte) divr16u::i#2 + rangenext(0,$f) + (bool~) divr16u::$11 ← (byte) divr16u::i#1 != rangelast(0,$f) + if((bool~) divr16u::$11) goto divr16u::@1 + to:divr16u::@6 +divr16u::@5: scope:[divr16u] from divr16u::@2 + (word) divr16u::dividend#8 ← phi( divr16u::@2/(word) divr16u::dividend#0 ) + (byte) divr16u::i#4 ← phi( divr16u::@2/(byte) divr16u::i#3 ) + (word) divr16u::divisor#3 ← phi( divr16u::@2/(word) divr16u::divisor#2 ) + (word) divr16u::rem#8 ← phi( divr16u::@2/(word) divr16u::rem#6 ) + (word) divr16u::quotient#4 ← phi( divr16u::@2/(word) divr16u::quotient#1 ) + (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#4 + (word~) divr16u::$10 ← (word) divr16u::rem#8 - (word) divr16u::divisor#3 + (word) divr16u::rem#2 ← (word~) divr16u::$10 + to:divr16u::@3 +divr16u::@6: scope:[divr16u] from divr16u::@3 + (word) divr16u::quotient#5 ← phi( divr16u::@3/(word) divr16u::quotient#8 ) + (word) divr16u::rem#9 ← phi( divr16u::@3/(word) divr16u::rem#11 ) + (word) rem16u#1 ← (word) divr16u::rem#9 + (word) divr16u::return#0 ← (word) divr16u::quotient#5 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + (word) rem16u#11 ← phi( divr16u::@6/(word) rem16u#1 ) + (word) divr16u::return#4 ← phi( divr16u::@6/(word) divr16u::return#0 ) + (word) divr16u::return#1 ← (word) divr16u::return#4 + (word) rem16u#2 ← (word) rem16u#11 + return + to:@return +div32u16u: scope:[div32u16u] from sin16s_gen2 + (word) rem16u#20 ← phi( sin16s_gen2/(word) rem16u#21 ) + (word) div32u16u::divisor#1 ← phi( sin16s_gen2/(word) div32u16u::divisor#0 ) + (dword) div32u16u::dividend#1 ← phi( sin16s_gen2/(dword) div32u16u::dividend#0 ) + (word~) div32u16u::$0 ← > (dword) div32u16u::dividend#1 + (word) divr16u::dividend#1 ← (word~) div32u16u::$0 + (word) divr16u::divisor#0 ← (word) div32u16u::divisor#1 + (word) divr16u::rem#3 ← (number) 0 + call divr16u + (word) divr16u::return#2 ← (word) divr16u::return#1 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u + (word) div32u16u::divisor#2 ← phi( div32u16u/(word) div32u16u::divisor#1 ) + (dword) div32u16u::dividend#2 ← phi( div32u16u/(dword) div32u16u::dividend#1 ) + (word) rem16u#12 ← phi( div32u16u/(word) rem16u#2 ) + (word) divr16u::return#5 ← phi( div32u16u/(word) divr16u::return#2 ) + (word~) div32u16u::$1 ← (word) divr16u::return#5 + (word) rem16u#3 ← (word) rem16u#12 + (word) div32u16u::quotient_hi#0 ← (word~) div32u16u::$1 + (word~) div32u16u::$2 ← < (dword) div32u16u::dividend#2 + (word) divr16u::dividend#2 ← (word~) div32u16u::$2 + (word) divr16u::divisor#1 ← (word) div32u16u::divisor#2 + (word) divr16u::rem#4 ← (word) rem16u#3 + call divr16u + (word) divr16u::return#3 ← (word) divr16u::return#1 + to:div32u16u::@3 +div32u16u::@3: scope:[div32u16u] from div32u16u::@2 + (word) div32u16u::quotient_hi#1 ← phi( div32u16u::@2/(word) div32u16u::quotient_hi#0 ) + (word) rem16u#13 ← phi( div32u16u::@2/(word) rem16u#2 ) + (word) divr16u::return#6 ← phi( div32u16u::@2/(word) divr16u::return#3 ) + (word~) div32u16u::$3 ← (word) divr16u::return#6 + (word) rem16u#4 ← (word) rem16u#13 + (word) div32u16u::quotient_lo#0 ← (word~) div32u16u::$3 + (dword) div32u16u::quotient#0 ← ((dword)) { (word) div32u16u::quotient_hi#1, (word) div32u16u::quotient_lo#0 } + (dword) div32u16u::return#0 ← (dword) div32u16u::quotient#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@3 + (word) rem16u#14 ← phi( div32u16u::@3/(word) rem16u#4 ) + (dword) div32u16u::return#3 ← phi( div32u16u::@3/(dword) div32u16u::return#0 ) + (dword) div32u16u::return#1 ← (dword) div32u16u::return#3 + (word) rem16u#5 ← (word) rem16u#14 + return + to:@return +mul16u: scope:[mul16u] from mul16s mulu16_sel + (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mulu16_sel/(word) mul16u::a#2 ) + (word) mul16u::b#2 ← phi( mul16s/(word) mul16u::b#0 mulu16_sel/(word) mul16u::b#1 ) + (dword) mul16u::res#0 ← (number) 0 + (dword) mul16u::mb#0 ← (word) mul16u::b#2 + to:mul16u::@1 +mul16u::@1: scope:[mul16u] from mul16u mul16u::@4 + (dword) mul16u::mb#5 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@4/(dword) mul16u::mb#1 ) + (dword) mul16u::res#4 ← phi( mul16u/(dword) mul16u::res#0 mul16u::@4/(dword) mul16u::res#6 ) + (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@4/(word) mul16u::a#0 ) + (bool~) mul16u::$0 ← (word) mul16u::a#3 != (number) 0 + if((bool~) mul16u::$0) goto mul16u::@2 + to:mul16u::@3 +mul16u::@2: scope:[mul16u] from mul16u::@1 + (dword) mul16u::res#5 ← phi( mul16u::@1/(dword) mul16u::res#4 ) + (dword) mul16u::mb#4 ← phi( mul16u::@1/(dword) mul16u::mb#5 ) + (word) mul16u::a#4 ← phi( mul16u::@1/(word) mul16u::a#3 ) + (number~) mul16u::$1 ← (word) mul16u::a#4 & (number) 1 + (bool~) mul16u::$2 ← (number~) mul16u::$1 != (number) 0 + (bool~) mul16u::$3 ← ! (bool~) mul16u::$2 + if((bool~) mul16u::$3) goto mul16u::@4 + to:mul16u::@7 +mul16u::@3: scope:[mul16u] from mul16u::@1 + (dword) mul16u::res#2 ← phi( mul16u::@1/(dword) mul16u::res#4 ) + (dword) mul16u::return#0 ← (dword) mul16u::res#2 + to:mul16u::@return +mul16u::@4: scope:[mul16u] from mul16u::@2 mul16u::@7 + (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#5 mul16u::@7/(dword) mul16u::res#1 ) + (dword) mul16u::mb#2 ← phi( mul16u::@2/(dword) mul16u::mb#4 mul16u::@7/(dword) mul16u::mb#3 ) + (word) mul16u::a#5 ← phi( mul16u::@2/(word) mul16u::a#4 mul16u::@7/(word) mul16u::a#7 ) + (word~) mul16u::$5 ← (word) mul16u::a#5 >> (number) 1 + (word) mul16u::a#0 ← (word~) mul16u::$5 + (dword~) mul16u::$6 ← (dword) mul16u::mb#2 << (number) 1 + (dword) mul16u::mb#1 ← (dword~) mul16u::$6 + to:mul16u::@1 +mul16u::@7: scope:[mul16u] from mul16u::@2 + (word) mul16u::a#7 ← phi( mul16u::@2/(word) mul16u::a#4 ) + (dword) mul16u::mb#3 ← phi( mul16u::@2/(dword) mul16u::mb#4 ) + (dword) mul16u::res#3 ← phi( mul16u::@2/(dword) mul16u::res#5 ) + (dword~) mul16u::$4 ← (dword) mul16u::res#3 + (dword) mul16u::mb#3 + (dword) mul16u::res#1 ← (dword~) mul16u::$4 + to:mul16u::@4 +mul16u::@return: scope:[mul16u] from mul16u::@3 + (dword) mul16u::return#4 ← phi( mul16u::@3/(dword) mul16u::return#0 ) + (dword) mul16u::return#1 ← (dword) mul16u::return#4 + return + to:@return +mul16s: scope:[mul16s] from main::@2 main::@26 sin16s_gen2::@4 + (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@26/(signed word) mul16s::b#2 sin16s_gen2::@4/(signed word) mul16s::b#0 ) + (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@26/(signed word) mul16s::a#2 sin16s_gen2::@4/(signed word) mul16s::a#0 ) + (word~) mul16s::$0 ← ((word)) (signed word) mul16s::a#3 + (word~) mul16s::$1 ← ((word)) (signed word) mul16s::b#3 + (word) mul16u::a#1 ← (word~) mul16s::$0 + (word) mul16u::b#0 ← (word~) mul16s::$1 + call mul16u + (dword) mul16u::return#2 ← (dword) mul16u::return#1 + to:mul16s::@6 +mul16s::@6: scope:[mul16s] from mul16s + (signed word) mul16s::b#6 ← phi( mul16s/(signed word) mul16s::b#3 ) + (signed word) mul16s::a#4 ← phi( mul16s/(signed word) mul16s::a#3 ) + (dword) mul16u::return#5 ← phi( mul16s/(dword) mul16u::return#2 ) + (dword~) mul16s::$2 ← (dword) mul16u::return#5 + (dword) mul16s::m#0 ← (dword~) mul16s::$2 + (bool~) mul16s::$3 ← (signed word) mul16s::a#4 < (number) 0 + (bool~) mul16s::$4 ← ! (bool~) mul16s::$3 + if((bool~) mul16s::$4) goto mul16s::@1 + to:mul16s::@3 +mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@6 + (signed word) mul16s::a#6 ← phi( mul16s::@3/(signed word) mul16s::a#7 mul16s::@6/(signed word) mul16s::a#4 ) + (dword) mul16s::m#6 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@6/(dword) mul16s::m#0 ) + (signed word) mul16s::b#4 ← phi( mul16s::@3/(signed word) mul16s::b#5 mul16s::@6/(signed word) mul16s::b#6 ) + (bool~) mul16s::$5 ← (signed word) mul16s::b#4 < (number) 0 + (bool~) mul16s::$6 ← ! (bool~) mul16s::$5 + if((bool~) mul16s::$6) goto mul16s::@2 + to:mul16s::@4 +mul16s::@3: scope:[mul16s] from mul16s::@6 + (signed word) mul16s::a#7 ← phi( mul16s::@6/(signed word) mul16s::a#4 ) + (signed word) mul16s::b#5 ← phi( mul16s::@6/(signed word) mul16s::b#6 ) + (dword) mul16s::m#3 ← phi( mul16s::@6/(dword) mul16s::m#0 ) + (word~) mul16s::$9 ← > (dword) mul16s::m#3 + (word~) mul16s::$10 ← ((word)) (signed word) mul16s::b#5 + (word~) mul16s::$11 ← (word~) mul16s::$9 - (word~) mul16s::$10 + (word~) mul16s::$16 ← (word~) mul16s::$11 + (dword) mul16s::m#1 ← (dword) mul16s::m#3 hi= (word~) mul16s::$16 + to:mul16s::@1 +mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 + (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#6 mul16s::@4/(dword) mul16s::m#2 ) + (signed dword~) mul16s::$7 ← ((signed dword)) (dword) mul16s::m#4 + (signed dword) mul16s::return#0 ← (signed dword~) mul16s::$7 + to:mul16s::@return +mul16s::@4: scope:[mul16s] from mul16s::@1 + (signed word) mul16s::a#5 ← phi( mul16s::@1/(signed word) mul16s::a#6 ) + (dword) mul16s::m#5 ← phi( mul16s::@1/(dword) mul16s::m#6 ) + (word~) mul16s::$13 ← > (dword) mul16s::m#5 + (word~) mul16s::$14 ← ((word)) (signed word) mul16s::a#5 + (word~) mul16s::$15 ← (word~) mul16s::$13 - (word~) mul16s::$14 + (word~) mul16s::$17 ← (word~) mul16s::$15 + (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 + to:mul16s::@2 +mul16s::@return: scope:[mul16s] from mul16s::@2 + (signed dword) mul16s::return#5 ← phi( mul16s::@2/(signed dword) mul16s::return#0 ) + (signed dword) mul16s::return#1 ← (signed dword) mul16s::return#5 + return + to:@return +@17: scope:[] from @6 + (word) rem16u#40 ← phi( @6/(word) rem16u#0 ) + (dword) PI2_u4f28#0 ← (number) $6487ed51 + (dword) PI_u4f28#0 ← (number) $3243f6a9 + (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 + to:@28 +sin16s_gen2: scope:[sin16s_gen2] from main + (signed word*) sin16s_gen2::sintab#6 ← phi( main/(signed word*) sin16s_gen2::sintab#1 ) + (word) rem16u#21 ← phi( main/(word) rem16u#23 ) + (word) sin16s_gen2::wavelength#1 ← phi( main/(word) sin16s_gen2::wavelength#0 ) + (signed word) sin16s_gen2::min#1 ← phi( main/(signed word) sin16s_gen2::min#0 ) + (signed word) sin16s_gen2::max#1 ← phi( main/(signed word) sin16s_gen2::max#0 ) + (signed word~) sin16s_gen2::$0 ← (signed word) sin16s_gen2::max#1 - (signed word) sin16s_gen2::min#1 + (signed word) sin16s_gen2::ampl#0 ← (signed word~) sin16s_gen2::$0 + (signed word~) sin16s_gen2::$1 ← (signed word) sin16s_gen2::ampl#0 >> (number) 1 + (signed word~) sin16s_gen2::$2 ← (signed word) sin16s_gen2::min#1 + (signed word~) sin16s_gen2::$1 + (signed word) sin16s_gen2::offs#0 ← (signed word~) sin16s_gen2::$2 + (dword) div32u16u::dividend#0 ← (dword) PI2_u4f28#0 + (word) div32u16u::divisor#0 ← (word) sin16s_gen2::wavelength#1 + call div32u16u + (dword) div32u16u::return#2 ← (dword) div32u16u::return#1 + to:sin16s_gen2::@3 +sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2 + (word) sin16s_gen2::wavelength#5 ← phi( sin16s_gen2/(word) sin16s_gen2::wavelength#1 ) + (signed word*) sin16s_gen2::sintab#5 ← phi( sin16s_gen2/(signed word*) sin16s_gen2::sintab#6 ) + (signed word) sin16s_gen2::offs#4 ← phi( sin16s_gen2/(signed word) sin16s_gen2::offs#0 ) + (signed word) sin16s_gen2::ampl#3 ← phi( sin16s_gen2/(signed word) sin16s_gen2::ampl#0 ) + (word) rem16u#15 ← phi( sin16s_gen2/(word) rem16u#5 ) + (dword) div32u16u::return#4 ← phi( sin16s_gen2/(dword) div32u16u::return#2 ) + (dword~) sin16s_gen2::$3 ← (dword) div32u16u::return#4 + (word) rem16u#6 ← (word) rem16u#15 + (dword) sin16s_gen2::step#0 ← (dword~) sin16s_gen2::$3 + (dword) sin16s_gen2::x#0 ← (number) 0 + (word) sin16s_gen2::i#0 ← (number) 0 + to:sin16s_gen2::@1 +sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@3 sin16s_gen2::@5 + (word) rem16u#31 ← phi( sin16s_gen2::@3/(word) rem16u#6 sin16s_gen2::@5/(word) rem16u#22 ) + (word) sin16s_gen2::wavelength#4 ← phi( sin16s_gen2::@3/(word) sin16s_gen2::wavelength#5 sin16s_gen2::@5/(word) sin16s_gen2::wavelength#2 ) + (word) sin16s_gen2::i#4 ← phi( sin16s_gen2::@3/(word) sin16s_gen2::i#0 sin16s_gen2::@5/(word) sin16s_gen2::i#1 ) + (dword) sin16s_gen2::step#3 ← phi( sin16s_gen2::@3/(dword) sin16s_gen2::step#0 sin16s_gen2::@5/(dword) sin16s_gen2::step#1 ) + (signed word*) sin16s_gen2::sintab#4 ← phi( sin16s_gen2::@3/(signed word*) sin16s_gen2::sintab#5 sin16s_gen2::@5/(signed word*) sin16s_gen2::sintab#0 ) + (signed word) sin16s_gen2::offs#3 ← phi( sin16s_gen2::@3/(signed word) sin16s_gen2::offs#4 sin16s_gen2::@5/(signed word) sin16s_gen2::offs#1 ) + (signed word) sin16s_gen2::ampl#2 ← phi( sin16s_gen2::@3/(signed word) sin16s_gen2::ampl#3 sin16s_gen2::@5/(signed word) sin16s_gen2::ampl#4 ) + (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@3/(dword) sin16s_gen2::x#0 sin16s_gen2::@5/(dword) sin16s_gen2::x#1 ) + (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + call sin16s + (signed word) sin16s::return#0 ← (signed word) sin16s::return#2 + to:sin16s_gen2::@4 +sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@1 + (word) rem16u#26 ← phi( sin16s_gen2::@1/(word) rem16u#31 ) + (word) sin16s_gen2::wavelength#3 ← phi( sin16s_gen2::@1/(word) sin16s_gen2::wavelength#4 ) + (word) sin16s_gen2::i#3 ← phi( sin16s_gen2::@1/(word) sin16s_gen2::i#4 ) + (dword) sin16s_gen2::step#2 ← phi( sin16s_gen2::@1/(dword) sin16s_gen2::step#3 ) + (dword) sin16s_gen2::x#4 ← phi( sin16s_gen2::@1/(dword) sin16s_gen2::x#2 ) + (signed word*) sin16s_gen2::sintab#3 ← phi( sin16s_gen2::@1/(signed word*) sin16s_gen2::sintab#4 ) + (signed word) sin16s_gen2::offs#2 ← phi( sin16s_gen2::@1/(signed word) sin16s_gen2::offs#3 ) + (signed word) sin16s_gen2::ampl#1 ← phi( sin16s_gen2::@1/(signed word) sin16s_gen2::ampl#2 ) + (signed word) sin16s::return#3 ← phi( sin16s_gen2::@1/(signed word) sin16s::return#0 ) + (signed word~) sin16s_gen2::$4 ← (signed word) sin16s::return#3 + (signed word) mul16s::a#0 ← (signed word~) sin16s_gen2::$4 + (signed word) mul16s::b#0 ← (signed word) sin16s_gen2::ampl#1 + call mul16s + (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#1 + to:sin16s_gen2::@5 +sin16s_gen2::@5: scope:[sin16s_gen2] from sin16s_gen2::@4 + (signed word) sin16s_gen2::ampl#4 ← phi( sin16s_gen2::@4/(signed word) sin16s_gen2::ampl#1 ) + (word) rem16u#22 ← phi( sin16s_gen2::@4/(word) rem16u#26 ) + (word) sin16s_gen2::wavelength#2 ← phi( sin16s_gen2::@4/(word) sin16s_gen2::wavelength#3 ) + (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@4/(word) sin16s_gen2::i#3 ) + (dword) sin16s_gen2::step#1 ← phi( sin16s_gen2::@4/(dword) sin16s_gen2::step#2 ) + (dword) sin16s_gen2::x#3 ← phi( sin16s_gen2::@4/(dword) sin16s_gen2::x#4 ) + (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#3 ) + (signed word) sin16s_gen2::offs#1 ← phi( sin16s_gen2::@4/(signed word) sin16s_gen2::offs#2 ) + (signed dword) mul16s::return#6 ← phi( sin16s_gen2::@4/(signed dword) mul16s::return#2 ) + (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#6 + (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + (signed word~) sin16s_gen2::$7 ← ((signed word)) (word~) sin16s_gen2::$6 + (signed word~) sin16s_gen2::$8 ← (signed word) sin16s_gen2::offs#1 + (signed word~) sin16s_gen2::$7 + *((signed word*) sin16s_gen2::sintab#2) ← (signed word~) sin16s_gen2::$8 + (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + (dword~) sin16s_gen2::$9 ← (dword) sin16s_gen2::x#3 + (dword) sin16s_gen2::step#1 + (dword) sin16s_gen2::x#1 ← (dword~) sin16s_gen2::$9 + (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + (bool~) sin16s_gen2::$10 ← (word) sin16s_gen2::i#1 < (word) sin16s_gen2::wavelength#2 + if((bool~) sin16s_gen2::$10) goto sin16s_gen2::@1 + to:sin16s_gen2::@return +sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@5 + (word) rem16u#16 ← phi( sin16s_gen2::@5/(word) rem16u#22 ) + (word) rem16u#7 ← (word) rem16u#16 + return + to:@return +sin16s: scope:[sin16s] from sin16s_gen2::@1 + (dword) sin16s::x#3 ← phi( sin16s_gen2::@1/(dword) sin16s::x#0 ) + (byte) sin16s::isUpper#0 ← (number) 0 + (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 + (bool~) sin16s::$1 ← ! (bool~) sin16s::$0 + if((bool~) sin16s::$1) goto sin16s::@1 + to:sin16s::@4 +sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 + (byte) sin16s::isUpper#8 ← phi( sin16s/(byte) sin16s::isUpper#0 sin16s::@4/(byte) sin16s::isUpper#1 ) + (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#3 sin16s::@4/(dword) sin16s::x#1 ) + (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 + (bool~) sin16s::$3 ← ! (bool~) sin16s::$2 + if((bool~) sin16s::$3) goto sin16s::@2 + to:sin16s::@5 +sin16s::@4: scope:[sin16s] from sin16s + (dword) sin16s::x#5 ← phi( sin16s/(dword) sin16s::x#3 ) + (dword~) sin16s::$17 ← (dword) sin16s::x#5 - (dword) PI_u4f28#0 + (dword) sin16s::x#1 ← (dword~) sin16s::$17 + (byte) sin16s::isUpper#1 ← (number) 1 + to:sin16s::@1 +sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 + (byte) sin16s::isUpper#7 ← phi( sin16s::@1/(byte) sin16s::isUpper#8 sin16s::@5/(byte) sin16s::isUpper#9 ) + (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (number) 3 + (word~) sin16s::$5 ← > (dword~) sin16s::$4 + (word) sin16s::x1#0 ← (word~) sin16s::$5 + (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + (byte) mulu16_sel::select#0 ← (number) 0 + call mulu16_sel + (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#6 + to:sin16s::@8 +sin16s::@8: scope:[sin16s] from sin16s::@2 + (byte) sin16s::isUpper#6 ← phi( sin16s::@2/(byte) sin16s::isUpper#7 ) + (word) sin16s::x1#1 ← phi( sin16s::@2/(word) sin16s::x1#0 ) + (word) mulu16_sel::return#7 ← phi( sin16s::@2/(word) mulu16_sel::return#0 ) + (word~) sin16s::$6 ← (word) mulu16_sel::return#7 + (word) sin16s::x2#0 ← (word~) sin16s::$6 + (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + (word) mulu16_sel::v2#1 ← (word) sin16s::x1#1 + (byte) mulu16_sel::select#1 ← (number) 1 + call mulu16_sel + (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#6 + to:sin16s::@9 +sin16s::@9: scope:[sin16s] from sin16s::@8 + (byte) sin16s::isUpper#5 ← phi( sin16s::@8/(byte) sin16s::isUpper#6 ) + (word) sin16s::x1#4 ← phi( sin16s::@8/(word) sin16s::x1#1 ) + (word) mulu16_sel::return#8 ← phi( sin16s::@8/(word) mulu16_sel::return#1 ) + (word~) sin16s::$7 ← (word) mulu16_sel::return#8 + (word) sin16s::x3#0 ← (word~) sin16s::$7 + (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + (word) mulu16_sel::v2#2 ← (number) $10000/(number) 6 + (byte) mulu16_sel::select#2 ← (number) 1 + call mulu16_sel + (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#6 + to:sin16s::@10 +sin16s::@10: scope:[sin16s] from sin16s::@9 + (byte) sin16s::isUpper#4 ← phi( sin16s::@9/(byte) sin16s::isUpper#5 ) + (word) sin16s::x3#1 ← phi( sin16s::@9/(word) sin16s::x3#0 ) + (word) sin16s::x1#2 ← phi( sin16s::@9/(word) sin16s::x1#4 ) + (word) mulu16_sel::return#9 ← phi( sin16s::@9/(word) mulu16_sel::return#2 ) + (word~) sin16s::$8 ← (word) mulu16_sel::return#9 + (word) sin16s::x3_6#0 ← (word~) sin16s::$8 + (word~) sin16s::$9 ← (word) sin16s::x1#2 - (word) sin16s::x3_6#0 + (word) sin16s::usinx#0 ← (word~) sin16s::$9 + (word) mulu16_sel::v1#3 ← (word) sin16s::x3#1 + (word) mulu16_sel::v2#3 ← (word) sin16s::x1#2 + (byte) mulu16_sel::select#3 ← (number) 0 + call mulu16_sel + (word) mulu16_sel::return#3 ← (word) mulu16_sel::return#6 + to:sin16s::@11 +sin16s::@11: scope:[sin16s] from sin16s::@10 + (byte) sin16s::isUpper#3 ← phi( sin16s::@10/(byte) sin16s::isUpper#4 ) + (word) sin16s::usinx#4 ← phi( sin16s::@10/(word) sin16s::usinx#0 ) + (word) sin16s::x1#3 ← phi( sin16s::@10/(word) sin16s::x1#2 ) + (word) mulu16_sel::return#10 ← phi( sin16s::@10/(word) mulu16_sel::return#3 ) + (word~) sin16s::$10 ← (word) mulu16_sel::return#10 + (word) sin16s::x4#0 ← (word~) sin16s::$10 + (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + (word) mulu16_sel::v2#4 ← (word) sin16s::x1#3 + (byte) mulu16_sel::select#4 ← (number) 0 + call mulu16_sel + (word) mulu16_sel::return#4 ← (word) mulu16_sel::return#6 + to:sin16s::@12 +sin16s::@12: scope:[sin16s] from sin16s::@11 + (byte) sin16s::isUpper#2 ← phi( sin16s::@11/(byte) sin16s::isUpper#3 ) + (word) sin16s::usinx#2 ← phi( sin16s::@11/(word) sin16s::usinx#4 ) + (word) mulu16_sel::return#11 ← phi( sin16s::@11/(word) mulu16_sel::return#4 ) + (word~) sin16s::$11 ← (word) mulu16_sel::return#11 + (word) sin16s::x5#0 ← (word~) sin16s::$11 + (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4 + (word) sin16s::x5_128#0 ← (word~) sin16s::$12 + (word~) sin16s::$13 ← (word) sin16s::usinx#2 + (word) sin16s::x5_128#0 + (word) sin16s::usinx#1 ← (word~) sin16s::$13 + (signed word~) sin16s::$14 ← ((signed word)) (word) sin16s::usinx#1 + (signed word) sin16s::sinx#0 ← (signed word~) sin16s::$14 + (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0 + (bool~) sin16s::$16 ← ! (bool~) sin16s::$15 + if((bool~) sin16s::$16) goto sin16s::@3 + to:sin16s::@6 +sin16s::@5: scope:[sin16s] from sin16s::@1 + (byte) sin16s::isUpper#9 ← phi( sin16s::@1/(byte) sin16s::isUpper#8 ) + (dword) sin16s::x#7 ← phi( sin16s::@1/(dword) sin16s::x#4 ) + (dword~) sin16s::$18 ← (dword) PI_u4f28#0 - (dword) sin16s::x#7 + (dword) sin16s::x#2 ← (dword~) sin16s::$18 + to:sin16s::@2 +sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 + (signed word) sin16s::sinx#2 ← phi( sin16s::@12/(signed word) sin16s::sinx#0 sin16s::@6/(signed word) sin16s::sinx#1 ) + (signed word) sin16s::return#1 ← (signed word) sin16s::sinx#2 + to:sin16s::@return +sin16s::@6: scope:[sin16s] from sin16s::@12 + (word) sin16s::usinx#3 ← phi( sin16s::@12/(word) sin16s::usinx#1 ) + (signed word~) sin16s::$19 ← ((signed word)) (word) sin16s::usinx#3 + (signed word~) sin16s::$20 ← - (signed word~) sin16s::$19 + (signed word) sin16s::sinx#1 ← (signed word~) sin16s::$20 + to:sin16s::@3 +sin16s::@return: scope:[sin16s] from sin16s::@3 + (signed word) sin16s::return#4 ← phi( sin16s::@3/(signed word) sin16s::return#1 ) + (signed word) sin16s::return#2 ← (signed word) sin16s::return#4 + return + to:@return +mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@11 sin16s::@2 sin16s::@8 sin16s::@9 + (byte) mulu16_sel::select#6 ← phi( sin16s::@10/(byte) mulu16_sel::select#3 sin16s::@11/(byte) mulu16_sel::select#4 sin16s::@2/(byte) mulu16_sel::select#0 sin16s::@8/(byte) mulu16_sel::select#1 sin16s::@9/(byte) mulu16_sel::select#2 ) + (word) mulu16_sel::v2#5 ← phi( sin16s::@10/(word) mulu16_sel::v2#3 sin16s::@11/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@8/(word) mulu16_sel::v2#1 sin16s::@9/(word) mulu16_sel::v2#2 ) + (word) mulu16_sel::v1#5 ← phi( sin16s::@10/(word) mulu16_sel::v1#3 sin16s::@11/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@8/(word) mulu16_sel::v1#1 sin16s::@9/(word) mulu16_sel::v1#2 ) + (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + call mul16u + (dword) mul16u::return#3 ← (dword) mul16u::return#1 + to:mulu16_sel::@2 +mulu16_sel::@2: scope:[mulu16_sel] from mulu16_sel + (byte) mulu16_sel::select#5 ← phi( mulu16_sel/(byte) mulu16_sel::select#6 ) + (dword) mul16u::return#6 ← phi( mulu16_sel/(dword) mul16u::return#3 ) + (dword~) mulu16_sel::$0 ← (dword) mul16u::return#6 + (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + (word~) mulu16_sel::$2 ← > (dword~) mulu16_sel::$1 + (word) mulu16_sel::return#5 ← (word~) mulu16_sel::$2 + to:mulu16_sel::@return +mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 + (word) mulu16_sel::return#12 ← phi( mulu16_sel::@2/(word) mulu16_sel::return#5 ) + (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 + return + to:@return +memset: scope:[memset] from bitmap_clear bitmap_clear::@1 + (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) + (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) + (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 + (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 + (byte*) memset::end#0 ← (byte*~) memset::$1 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) + (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) + (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) + (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + *((byte*) memset::dst#2) ← (byte) memset::c#2 + (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$2) goto memset::@1 + to:memset::@2 +memset::@2: scope:[memset] from memset::@1 + (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) + (void*) memset::return#0 ← (void*) memset::str#3 + to:memset::@return +memset::@return: scope:[memset] from memset::@2 + (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (void*) memset::return#1 ← (void*) memset::return#4 + return + to:@return +@28: scope:[] from @17 + (word) rem16u#36 ← phi( @17/(word) rem16u#40 ) + (byte*) bitmap_screen#0 ← (byte*) 0 + (byte*) bitmap_gfx#0 ← (byte*) 0 + (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } + (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } + (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } + to:@31 +bitmap_init: scope:[bitmap_init] from main::@22 + (byte*) bitmap_init::screen#1 ← phi( main::@22/(byte*) bitmap_init::screen#0 ) + (byte*) bitmap_init::gfx#1 ← phi( main::@22/(byte*) bitmap_init::gfx#0 ) + (byte*) bitmap_gfx#1 ← (byte*) bitmap_init::gfx#1 + (byte*) bitmap_screen#1 ← (byte*) bitmap_init::screen#1 + (byte) bitmap_init::bits#0 ← (number) $80 + (byte) bitmap_init::x#0 ← (byte) 0 + to:bitmap_init::@1 +bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 + (byte*) bitmap_screen#31 ← phi( bitmap_init/(byte*) bitmap_screen#1 bitmap_init::@2/(byte*) bitmap_screen#27 ) + (byte*) bitmap_gfx#32 ← phi( bitmap_init/(byte*) bitmap_gfx#1 bitmap_init::@2/(byte*) bitmap_gfx#28 ) + (byte*) bitmap_init::gfx#4 ← phi( bitmap_init/(byte*) bitmap_init::gfx#1 bitmap_init::@2/(byte*) bitmap_init::gfx#3 ) + (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) bitmap_init::x#0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) bitmap_init::bits#0 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + *((byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 + (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 + (bool~) bitmap_init::$1 ← ! (bool~) bitmap_init::$0 + if((bool~) bitmap_init::$1) goto bitmap_init::@2 + to:bitmap_init::@3 +bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@3 + (byte*) bitmap_screen#27 ← phi( bitmap_init::@1/(byte*) bitmap_screen#31 bitmap_init::@3/(byte*) bitmap_screen#32 ) + (byte*) bitmap_gfx#28 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#32 bitmap_init::@3/(byte*) bitmap_gfx#33 ) + (byte*) bitmap_init::gfx#3 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 bitmap_init::@3/(byte*) bitmap_init::gfx#5 ) + (byte) bitmap_init::bits#4 ← phi( bitmap_init::@1/(byte) bitmap_init::bits#1 bitmap_init::@3/(byte) bitmap_init::bits#2 ) + (byte) bitmap_init::x#3 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 bitmap_init::@3/(byte) bitmap_init::x#4 ) + (byte) bitmap_init::x#1 ← (byte) bitmap_init::x#3 + rangenext(0,$ff) + (bool~) bitmap_init::$2 ← (byte) bitmap_init::x#1 != rangelast(0,$ff) + if((bool~) bitmap_init::$2) goto bitmap_init::@1 + to:bitmap_init::@4 +bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@1 + (byte*) bitmap_screen#32 ← phi( bitmap_init::@1/(byte*) bitmap_screen#31 ) + (byte*) bitmap_gfx#33 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#32 ) + (byte*) bitmap_init::gfx#5 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 ) + (byte) bitmap_init::x#4 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 ) + (byte) bitmap_init::bits#2 ← (number) $80 + to:bitmap_init::@2 +bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@2 + (byte*) bitmap_screen#22 ← phi( bitmap_init::@2/(byte*) bitmap_screen#27 ) + (byte*) bitmap_gfx#23 ← phi( bitmap_init::@2/(byte*) bitmap_gfx#28 ) + (byte*) bitmap_init::gfx#2 ← phi( bitmap_init::@2/(byte*) bitmap_init::gfx#3 ) + (byte*) bitmap_init::yoffs#0 ← (byte*) bitmap_init::gfx#2 + (byte) bitmap_init::y#0 ← (byte) 0 + to:bitmap_init::@5 +bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@4 bitmap_init::@6 + (byte*) bitmap_screen#15 ← phi( bitmap_init::@4/(byte*) bitmap_screen#22 bitmap_init::@6/(byte*) bitmap_screen#11 ) + (byte*) bitmap_gfx#16 ← phi( bitmap_init::@4/(byte*) bitmap_gfx#23 bitmap_init::@6/(byte*) bitmap_gfx#11 ) + (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 ) + (byte) bitmap_init::y#2 ← phi( bitmap_init::@4/(byte) bitmap_init::y#0 bitmap_init::@6/(byte) bitmap_init::y#1 ) + (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7 + (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + (number~) bitmap_init::$5 ← (number~) bitmap_init::$3 | (byte~) bitmap_init::$4 + *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (number~) bitmap_init::$5 + (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (number) 7 + (bool~) bitmap_init::$8 ← (number~) bitmap_init::$7 == (number) 7 + (bool~) bitmap_init::$9 ← ! (bool~) bitmap_init::$8 + if((bool~) bitmap_init::$9) goto bitmap_init::@6 + to:bitmap_init::@7 +bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@7 + (byte*) bitmap_screen#11 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 bitmap_init::@7/(byte*) bitmap_screen#16 ) + (byte*) bitmap_gfx#11 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 bitmap_init::@7/(byte*) bitmap_gfx#17 ) + (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 bitmap_init::@7/(byte*) bitmap_init::yoffs#1 ) + (byte) bitmap_init::y#3 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 bitmap_init::@7/(byte) bitmap_init::y#4 ) + (byte) bitmap_init::y#1 ← (byte) bitmap_init::y#3 + rangenext(0,$ff) + (bool~) bitmap_init::$11 ← (byte) bitmap_init::y#1 != rangelast(0,$ff) + if((bool~) bitmap_init::$11) goto bitmap_init::@5 + to:bitmap_init::@return +bitmap_init::@7: scope:[bitmap_init] from bitmap_init::@5 + (byte*) bitmap_screen#16 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 ) + (byte*) bitmap_gfx#17 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 ) + (byte) bitmap_init::y#4 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 ) + (byte*) bitmap_init::yoffs#3 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 ) + (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8 + (byte*) bitmap_init::yoffs#1 ← (byte*~) bitmap_init::$10 + to:bitmap_init::@6 +bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 + (byte*) bitmap_screen#6 ← phi( bitmap_init::@6/(byte*) bitmap_screen#11 ) + (byte*) bitmap_gfx#6 ← phi( bitmap_init::@6/(byte*) bitmap_gfx#11 ) + (byte*) bitmap_gfx#2 ← (byte*) bitmap_gfx#6 + (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 + return + to:@return +bitmap_clear: scope:[bitmap_clear] from main::@23 + (byte*) bitmap_gfx#12 ← phi( main::@23/(byte*) bitmap_gfx#3 ) + (byte*) bitmap_screen#7 ← phi( main::@23/(byte*) bitmap_screen#3 ) + (byte) bitmap_clear::bgcol#1 ← phi( main::@23/(byte) bitmap_clear::bgcol#0 ) + (byte) bitmap_clear::fgcol#1 ← phi( main::@23/(byte) bitmap_clear::fgcol#0 ) + (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10 + (number~) bitmap_clear::$1 ← (number~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 + (byte) bitmap_clear::col#0 ← (number~) bitmap_clear::$1 + (void*) memset::str#0 ← (void*)(byte*) bitmap_screen#7 + (byte) memset::c#0 ← (byte) bitmap_clear::col#0 + (word) memset::num#0 ← (word) $3e8 + call memset + (void*) memset::return#2 ← (void*) memset::return#1 + to:bitmap_clear::@1 +bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear + (byte*) bitmap_gfx#7 ← phi( bitmap_clear/(byte*) bitmap_gfx#12 ) + (void*) memset::str#1 ← (void*)(byte*) bitmap_gfx#7 + (byte) memset::c#1 ← (number) 0 + (word) memset::num#1 ← (word) $1f40 + call memset + (void*) memset::return#3 ← (void*) memset::return#1 + to:bitmap_clear::@2 +bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 + to:bitmap_clear::@return +bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 + return + to:@return +bitmap_plot: scope:[bitmap_plot] from main::@27 + (word) bitmap_plot::x#1 ← phi( main::@27/(word) bitmap_plot::x#0 ) + (byte) bitmap_plot::y#1 ← phi( main::@27/(byte) bitmap_plot::y#0 ) + (byte*~) bitmap_plot::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#1), *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#1) } + (byte*) bitmap_plot::plotter#0 ← (byte*~) bitmap_plot::$0 + (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (number) $fff8 + (byte*) bitmap_plot::plotter#1 ← (byte*) bitmap_plot::plotter#0 + (number~) bitmap_plot::$1 + (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#1 + *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) + to:bitmap_plot::@return +bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot + return + to:@return +@31: scope:[] from @28 + (byte*) bitmap_screen#26 ← phi( @28/(byte*) bitmap_screen#0 ) + (byte*) bitmap_gfx#27 ← phi( @28/(byte*) bitmap_gfx#0 ) + (word) rem16u#35 ← phi( @28/(word) rem16u#36 ) + (byte*) BITMAP#0 ← ((byte*)) (number) $2000 + (byte*) SCREEN#0 ← ((byte*)) (number) $400 + (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } + (signed word[$200]) SINUS#0 ← { fill( $200, 0) } + to:@32 +main: scope:[main] from @34 + (byte) frame_cnt#24 ← phi( @34/(byte) frame_cnt#8 ) + (byte*) bitmap_screen#17 ← phi( @34/(byte*) bitmap_screen#14 ) + (byte*) bitmap_gfx#18 ← phi( @34/(byte*) bitmap_gfx#15 ) + (word) rem16u#23 ← phi( @34/(word) rem16u#25 ) + (signed word*) sin16s_gen2::sintab#1 ← (signed word[$200]) SINUS#0 + (word) sin16s_gen2::wavelength#0 ← (number) $200 + (signed word) sin16s_gen2::min#0 ← (number) -$1001 + (signed word) sin16s_gen2::max#0 ← (number) $1001 + call sin16s_gen2 + to:main::@22 +main::@22: scope:[main] from main + (byte) frame_cnt#23 ← phi( main/(byte) frame_cnt#24 ) + (byte*) bitmap_screen#12 ← phi( main/(byte*) bitmap_screen#17 ) + (byte*) bitmap_gfx#13 ← phi( main/(byte*) bitmap_gfx#18 ) + (word) rem16u#17 ← phi( main/(word) rem16u#7 ) + (word) rem16u#8 ← (word) rem16u#17 + (byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0 + (byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0 + call bitmap_init + to:main::@23 +main::@23: scope:[main] from main::@22 + (byte) frame_cnt#22 ← phi( main::@22/(byte) frame_cnt#23 ) + (word) rem16u#47 ← phi( main::@22/(word) rem16u#8 ) + (byte*) bitmap_screen#8 ← phi( main::@22/(byte*) bitmap_screen#2 ) + (byte*) bitmap_gfx#8 ← phi( main::@22/(byte*) bitmap_gfx#2 ) + (byte*) bitmap_gfx#3 ← (byte*) bitmap_gfx#8 + (byte*) bitmap_screen#3 ← (byte*) bitmap_screen#8 + (byte) bitmap_clear::bgcol#0 ← (byte) BLACK#0 + (byte) bitmap_clear::fgcol#0 ← (byte) WHITE#0 + call bitmap_clear + to:main::@24 +main::@24: scope:[main] from main::@23 + (byte) frame_cnt#21 ← phi( main::@23/(byte) frame_cnt#22 ) + (byte*) bitmap_screen#37 ← phi( main::@23/(byte*) bitmap_screen#3 ) + (byte*) bitmap_gfx#38 ← phi( main::@23/(byte*) bitmap_gfx#3 ) + (word) rem16u#45 ← phi( main::@23/(word) rem16u#47 ) + (byte~) main::$3 ← (byte) VIC_BMM#0 | (byte) VIC_DEN#0 + (byte~) main::$4 ← (byte~) main::$3 | (byte) VIC_RSEL#0 + (number~) main::$5 ← (byte~) main::$4 | (number) 3 + *((byte*) D011#0) ← (number~) main::$5 + (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0 + (byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0 + to:main::toD0181 +main::toD0181: scope:[main] from main::@24 + (byte) frame_cnt#20 ← phi( main::@24/(byte) frame_cnt#21 ) + (byte*) bitmap_screen#35 ← phi( main::@24/(byte*) bitmap_screen#37 ) + (byte*) bitmap_gfx#36 ← phi( main::@24/(byte*) bitmap_gfx#38 ) + (word) rem16u#43 ← phi( main::@24/(word) rem16u#45 ) + (byte*) main::toD0181_gfx#1 ← phi( main::@24/(byte*) main::toD0181_gfx#0 ) + (byte*) main::toD0181_screen#1 ← phi( main::@24/(byte*) main::toD0181_screen#0 ) + (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 + (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff + (number~) main::toD0181_$2#0 ← (number~) main::toD0181_$1#0 * (number) 4 + (number~) main::toD0181_$3#0 ← > (number~) main::toD0181_$2#0 + (word~) main::toD0181_$4#0 ← ((word)) (byte*) main::toD0181_gfx#1 + (byte~) main::toD0181_$5#0 ← > (word~) main::toD0181_$4#0 + (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4 + (number~) main::toD0181_$7#0 ← (number~) main::toD0181_$6#0 & (number) $f + (number~) main::toD0181_$8#0 ← (number~) main::toD0181_$3#0 | (number~) main::toD0181_$7#0 + (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0 + to:main::toD0181_@return +main::toD0181_@return: scope:[main] from main::toD0181 + (byte) frame_cnt#18 ← phi( main::toD0181/(byte) frame_cnt#20 ) + (byte*) bitmap_screen#33 ← phi( main::toD0181/(byte*) bitmap_screen#35 ) + (byte*) bitmap_gfx#34 ← phi( main::toD0181/(byte*) bitmap_gfx#36 ) + (word) rem16u#41 ← phi( main::toD0181/(word) rem16u#43 ) + (byte) main::toD0181_return#2 ← phi( main::toD0181/(byte) main::toD0181_return#0 ) + (byte) main::toD0181_return#1 ← (byte) main::toD0181_return#2 + to:main::@21 +main::@21: scope:[main] from main::toD0181_@return + (byte) frame_cnt#15 ← phi( main::toD0181_@return/(byte) frame_cnt#18 ) + (byte*) bitmap_screen#28 ← phi( main::toD0181_@return/(byte*) bitmap_screen#33 ) + (byte*) bitmap_gfx#29 ← phi( main::toD0181_@return/(byte*) bitmap_gfx#34 ) + (word) rem16u#37 ← phi( main::toD0181_@return/(word) rem16u#41 ) + (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) + (byte~) main::$6 ← (byte) main::toD0181_return#3 + *((byte*) D018#0) ← (byte~) main::$6 + call init_irq + to:main::@25 +main::@25: scope:[main] from main::@21 + (byte) frame_cnt#13 ← phi( main::@21/(byte) frame_cnt#15 ) + (byte*) bitmap_screen#23 ← phi( main::@21/(byte*) bitmap_screen#28 ) + (byte*) bitmap_gfx#24 ← phi( main::@21/(byte*) bitmap_gfx#29 ) + (word) rem16u#32 ← phi( main::@21/(word) rem16u#37 ) + (word) main::idx_x#0 ← (number) 0 + (word) main::idx_y#0 ← (number) $80 + (signed word) main::r#0 ← (number) 0 + (byte) main::r_add#0 ← (number) 4 + to:main::@1 +main::@1: scope:[main] from main::@25 main::@5 + (byte) frame_cnt#12 ← phi( main::@25/(byte) frame_cnt#13 main::@5/(byte) frame_cnt#14 ) + (byte*) bitmap_screen#18 ← phi( main::@25/(byte*) bitmap_screen#23 main::@5/(byte*) bitmap_screen#20 ) + (byte*) bitmap_gfx#19 ← phi( main::@25/(byte*) bitmap_gfx#24 main::@5/(byte*) bitmap_gfx#21 ) + (word) rem16u#27 ← phi( main::@25/(word) rem16u#32 main::@5/(word) rem16u#29 ) + (word) main::idx_y#8 ← phi( main::@25/(word) main::idx_y#0 main::@5/(word) main::idx_y#10 ) + (signed word) main::r#5 ← phi( main::@25/(signed word) main::r#0 main::@5/(signed word) main::r#1 ) + (word) main::idx_x#5 ← phi( main::@25/(word) main::idx_x#0 main::@5/(word) main::idx_x#7 ) + if(true) goto main::@2 + to:main::@15 +main::@2: scope:[main] from main::@1 + (byte*) bitmap_screen#38 ← phi( main::@1/(byte*) bitmap_screen#18 ) + (byte*) bitmap_gfx#39 ← phi( main::@1/(byte*) bitmap_gfx#19 ) + (word) rem16u#46 ← phi( main::@1/(word) rem16u#27 ) + (byte) frame_cnt#11 ← phi( main::@1/(byte) frame_cnt#12 ) + (word) main::idx_y#5 ← phi( main::@1/(word) main::idx_y#8 ) + (signed word) main::r#2 ← phi( main::@1/(signed word) main::r#5 ) + (word) main::idx_x#3 ← phi( main::@1/(word) main::idx_x#5 ) + (word~) main::$28 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD + (signed word) main::cos_x#0 ← *((signed word[$200]) SINUS#0 + (word~) main::$28) + (signed word) mul16s::a#1 ← (signed word) main::r#2 + (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + call mul16s + (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#1 + to:main::@26 +main::@26: scope:[main] from main::@2 + (byte*) bitmap_screen#36 ← phi( main::@2/(byte*) bitmap_screen#38 ) + (byte*) bitmap_gfx#37 ← phi( main::@2/(byte*) bitmap_gfx#39 ) + (word) rem16u#44 ← phi( main::@2/(word) rem16u#46 ) + (word) main::idx_x#8 ← phi( main::@2/(word) main::idx_x#3 ) + (byte) frame_cnt#10 ← phi( main::@2/(byte) frame_cnt#11 ) + (signed word) main::r#3 ← phi( main::@2/(signed word) main::r#2 ) + (word) main::idx_y#3 ← phi( main::@2/(word) main::idx_y#5 ) + (signed dword) mul16s::return#7 ← phi( main::@2/(signed dword) mul16s::return#3 ) + (signed dword~) main::$8 ← (signed dword) mul16s::return#7 + (signed dword) main::xpos#0 ← (signed dword~) main::$8 + (word~) main::$9 ← > (signed dword) main::xpos#0 + (signed word~) main::$10 ← ((signed word)) (word~) main::$9 + (signed word~) main::$11 ← (signed word~) main::$10 >> (number) 2 + (number~) main::$12 ← (number) $a0 + (signed word~) main::$11 + (word~) main::$13 ← ((word)) (number~) main::$12 + (word) main::x#0 ← (word~) main::$13 + (word~) main::$29 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD + (signed word) main::sin_y#0 ← *((signed word[$200]) SINUS#0 + (word~) main::$29) + (signed word) mul16s::a#2 ← (signed word) main::r#3 + (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + call mul16s + (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#1 + to:main::@27 +main::@27: scope:[main] from main::@26 + (byte*) bitmap_screen#34 ← phi( main::@26/(byte*) bitmap_screen#36 ) + (byte*) bitmap_gfx#35 ← phi( main::@26/(byte*) bitmap_gfx#37 ) + (word) rem16u#42 ← phi( main::@26/(word) rem16u#44 ) + (signed word) main::r#10 ← phi( main::@26/(signed word) main::r#3 ) + (word) main::idx_y#9 ← phi( main::@26/(word) main::idx_y#3 ) + (word) main::idx_x#6 ← phi( main::@26/(word) main::idx_x#8 ) + (byte) frame_cnt#7 ← phi( main::@26/(byte) frame_cnt#10 ) + (word) main::x#1 ← phi( main::@26/(word) main::x#0 ) + (signed dword) mul16s::return#8 ← phi( main::@26/(signed dword) mul16s::return#4 ) + (signed dword~) main::$14 ← (signed dword) mul16s::return#8 + (signed dword) main::ypos#0 ← (signed dword~) main::$14 + (word~) main::$15 ← > (signed dword) main::ypos#0 + (signed word~) main::$16 ← ((signed word)) (word~) main::$15 + (signed word~) main::$17 ← (signed word~) main::$16 >> (number) 2 + (number~) main::$18 ← (number) $64 + (signed word~) main::$17 + (word~) main::$19 ← ((word)) (number~) main::$18 + (word) main::y#0 ← (word~) main::$19 + (byte~) main::$20 ← ((byte)) (word) main::y#0 + (word) bitmap_plot::x#0 ← (word) main::x#1 + (byte) bitmap_plot::y#0 ← (byte~) main::$20 + call bitmap_plot + to:main::@28 +main::@28: scope:[main] from main::@27 + (byte*) bitmap_screen#30 ← phi( main::@27/(byte*) bitmap_screen#34 ) + (byte*) bitmap_gfx#31 ← phi( main::@27/(byte*) bitmap_gfx#35 ) + (word) rem16u#39 ← phi( main::@27/(word) rem16u#42 ) + (signed word) main::r#9 ← phi( main::@27/(signed word) main::r#10 ) + (word) main::idx_y#7 ← phi( main::@27/(word) main::idx_y#9 ) + (word) main::idx_x#4 ← phi( main::@27/(word) main::idx_x#6 ) + (byte) frame_cnt#3 ← phi( main::@27/(byte) frame_cnt#7 ) + *((byte[$100]) plots_per_frame#0 + (byte) frame_cnt#3) ← ++ *((byte[$100]) plots_per_frame#0 + (byte) frame_cnt#3) + (word) main::idx_x#1 ← (word) main::idx_x#4 + (byte) main::r_add#0 + (bool~) main::$22 ← (word) main::idx_x#1 >= (number) $200 + (bool~) main::$23 ← ! (bool~) main::$22 + if((bool~) main::$23) goto main::@4 + to:main::@10 +main::@4: scope:[main] from main::@10 main::@28 + (byte) frame_cnt#17 ← phi( main::@10/(byte) frame_cnt#19 main::@28/(byte) frame_cnt#3 ) + (byte*) bitmap_screen#25 ← phi( main::@10/(byte*) bitmap_screen#29 main::@28/(byte*) bitmap_screen#30 ) + (byte*) bitmap_gfx#26 ← phi( main::@10/(byte*) bitmap_gfx#30 main::@28/(byte*) bitmap_gfx#31 ) + (word) rem16u#34 ← phi( main::@10/(word) rem16u#38 main::@28/(word) rem16u#39 ) + (word) main::idx_x#10 ← phi( main::@10/(word) main::idx_x#2 main::@28/(word) main::idx_x#1 ) + (signed word) main::r#7 ← phi( main::@10/(signed word) main::r#8 main::@28/(signed word) main::r#9 ) + (word) main::idx_y#4 ← phi( main::@10/(word) main::idx_y#6 main::@28/(word) main::idx_y#7 ) + (word) main::idx_y#1 ← (word) main::idx_y#4 + (byte) main::r_add#0 + (bool~) main::$24 ← (word) main::idx_y#1 >= (number) $200 + (bool~) main::$25 ← ! (bool~) main::$24 + if((bool~) main::$25) goto main::@5 + to:main::@11 +main::@10: scope:[main] from main::@28 + (byte) frame_cnt#19 ← phi( main::@28/(byte) frame_cnt#3 ) + (byte*) bitmap_screen#29 ← phi( main::@28/(byte*) bitmap_screen#30 ) + (byte*) bitmap_gfx#30 ← phi( main::@28/(byte*) bitmap_gfx#31 ) + (word) rem16u#38 ← phi( main::@28/(word) rem16u#39 ) + (signed word) main::r#8 ← phi( main::@28/(signed word) main::r#9 ) + (word) main::idx_y#6 ← phi( main::@28/(word) main::idx_y#7 ) + (word) main::idx_x#2 ← (number) 0 + to:main::@4 +main::@5: scope:[main] from main::@11 main::@4 + (byte) frame_cnt#14 ← phi( main::@11/(byte) frame_cnt#16 main::@4/(byte) frame_cnt#17 ) + (word) main::idx_y#10 ← phi( main::@11/(word) main::idx_y#2 main::@4/(word) main::idx_y#1 ) + (byte*) bitmap_screen#20 ← phi( main::@11/(byte*) bitmap_screen#24 main::@4/(byte*) bitmap_screen#25 ) + (byte*) bitmap_gfx#21 ← phi( main::@11/(byte*) bitmap_gfx#25 main::@4/(byte*) bitmap_gfx#26 ) + (word) rem16u#29 ← phi( main::@11/(word) rem16u#33 main::@4/(word) rem16u#34 ) + (word) main::idx_x#7 ← phi( main::@11/(word) main::idx_x#9 main::@4/(word) main::idx_x#10 ) + (signed word) main::r#4 ← phi( main::@11/(signed word) main::r#6 main::@4/(signed word) main::r#7 ) + (signed word) main::r#1 ← (signed word) main::r#4 + (byte) main::r_add#0 + (bool~) main::$26 ← (signed word) main::r#1 >= (number) $200*(number) $c+(number) $100 + (bool~) main::$27 ← ! (bool~) main::$26 + if((bool~) main::$27) goto main::@1 + to:main::@15 +main::@11: scope:[main] from main::@4 + (byte) frame_cnt#16 ← phi( main::@4/(byte) frame_cnt#17 ) + (byte*) bitmap_screen#24 ← phi( main::@4/(byte*) bitmap_screen#25 ) + (byte*) bitmap_gfx#25 ← phi( main::@4/(byte*) bitmap_gfx#26 ) + (word) rem16u#33 ← phi( main::@4/(word) rem16u#34 ) + (word) main::idx_x#9 ← phi( main::@4/(word) main::idx_x#10 ) + (signed word) main::r#6 ← phi( main::@4/(signed word) main::r#7 ) + (word) main::idx_y#2 ← (number) 0 + to:main::@5 +main::@15: scope:[main] from main::@1 main::@16 main::@5 + (byte*) bitmap_screen#13 ← phi( main::@1/(byte*) bitmap_screen#18 main::@16/(byte*) bitmap_screen#19 main::@5/(byte*) bitmap_screen#20 ) + (byte*) bitmap_gfx#14 ← phi( main::@1/(byte*) bitmap_gfx#19 main::@16/(byte*) bitmap_gfx#20 main::@5/(byte*) bitmap_gfx#21 ) + (word) rem16u#24 ← phi( main::@1/(word) rem16u#27 main::@16/(word) rem16u#28 main::@5/(word) rem16u#29 ) + if(true) goto main::@16 + to:main::@return +main::@16: scope:[main] from main::@15 + (byte*) bitmap_screen#19 ← phi( main::@15/(byte*) bitmap_screen#13 ) + (byte*) bitmap_gfx#20 ← phi( main::@15/(byte*) bitmap_gfx#14 ) + (word) rem16u#28 ← phi( main::@15/(word) rem16u#24 ) + *((byte*) BORDERCOL#0) ← ++ *((byte*) BORDERCOL#0) + to:main::@15 +main::@return: scope:[main] from main::@15 + (byte*) bitmap_screen#9 ← phi( main::@15/(byte*) bitmap_screen#13 ) + (byte*) bitmap_gfx#9 ← phi( main::@15/(byte*) bitmap_gfx#14 ) + (word) rem16u#18 ← phi( main::@15/(word) rem16u#24 ) + (word) rem16u#9 ← (word) rem16u#18 + (byte*) bitmap_gfx#4 ← (byte*) bitmap_gfx#9 + (byte*) bitmap_screen#4 ← (byte*) bitmap_screen#9 + return + to:@return +@32: scope:[] from @31 + (byte*) bitmap_screen#21 ← phi( @31/(byte*) bitmap_screen#26 ) + (byte*) bitmap_gfx#22 ← phi( @31/(byte*) bitmap_gfx#27 ) + (word) rem16u#30 ← phi( @31/(word) rem16u#35 ) + (byte) frame_cnt#0 ← (number) 1 + to:@34 +init_irq: scope:[init_irq] from main::@21 + asm { sei } + *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 + *((byte*) CIA1_INTERRUPT#0) ← (byte) CIA_INTERRUPT_CLEAR#0 + *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80 + *((byte*) RASTER#0) ← (number) 0 + *((byte*) IRQ_ENABLE#0) ← (byte) IRQ_RASTER#0 + (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() + *((void()**) HARDWARE_IRQ#0) ← (void()*~) init_irq::$0 + asm { cli } + to:init_irq::@return +init_irq::@return: scope:[init_irq] from init_irq + return + to:@return +irq: scope:[irq] from + (byte) frame_cnt#4 ← phi( @34/(byte) frame_cnt#8 ) + *((byte*) BGCOL#0) ← (byte) WHITE#0 + (bool~) irq::$1 ← (number) 0 != (byte) frame_cnt#4 + (bool~) irq::$0 ← ! (bool~) irq::$1 + if((bool~) irq::$0) goto irq::@1 + to:irq::@2 +irq::@1: scope:[irq] from irq irq::@2 + (byte) frame_cnt#9 ← phi( irq/(byte) frame_cnt#4 irq::@2/(byte) frame_cnt#1 ) + *((byte*) BGCOL#0) ← (byte) BLACK#0 + *((byte*) IRQ_STATUS#0) ← (byte) IRQ_RASTER#0 + to:irq::@return +irq::@2: scope:[irq] from irq + (byte) frame_cnt#5 ← phi( irq/(byte) frame_cnt#4 ) + (byte) frame_cnt#1 ← ++ (byte) frame_cnt#5 + to:irq::@1 +irq::@return: scope:[irq] from irq::@1 + (byte) frame_cnt#6 ← phi( irq::@1/(byte) frame_cnt#9 ) + (byte) frame_cnt#2 ← (byte) frame_cnt#6 + return + to:@return +@34: scope:[] from @32 + (byte*) bitmap_screen#14 ← phi( @32/(byte*) bitmap_screen#21 ) + (byte*) bitmap_gfx#15 ← phi( @32/(byte*) bitmap_gfx#22 ) + (word) rem16u#25 ← phi( @32/(word) rem16u#30 ) + (byte) frame_cnt#8 ← phi( @32/(byte) frame_cnt#0 ) + call main + to:@35 +@35: scope:[] from @34 + (byte*) bitmap_screen#10 ← phi( @34/(byte*) bitmap_screen#4 ) + (byte*) bitmap_gfx#10 ← phi( @34/(byte*) bitmap_gfx#4 ) + (word) rem16u#19 ← phi( @34/(word) rem16u#9 ) + (word) rem16u#10 ← (word) rem16u#19 + (byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#10 + (byte*) bitmap_screen#5 ← (byte*) bitmap_screen#10 + to:@end +@end: scope:[] from @35 + +SYMBOL TABLE SSA +(label) @17 +(label) @28 +(label) @31 +(label) @32 +(label) @34 +(label) @35 +(label) @6 +(label) @begin +(label) @end +(byte*) BGCOL +(byte*) BGCOL#0 +(byte*) BITMAP +(byte*) BITMAP#0 +(byte) BLACK +(byte) BLACK#0 +(byte*) BORDERCOL +(byte*) BORDERCOL#0 +(byte*) CIA1_INTERRUPT +(byte*) CIA1_INTERRUPT#0 +(byte) CIA_INTERRUPT_CLEAR +(byte) CIA_INTERRUPT_CLEAR#0 +(byte*) D011 +(byte*) D011#0 +(byte*) D018 +(byte*) D018#0 +(void()**) HARDWARE_IRQ +(void()**) HARDWARE_IRQ#0 +(byte*) IRQ_ENABLE +(byte*) IRQ_ENABLE#0 +(byte) IRQ_RASTER +(byte) IRQ_RASTER#0 +(byte*) IRQ_STATUS +(byte*) IRQ_STATUS#0 +(dword) PI2_u4f28 +(dword) PI2_u4f28#0 +(dword) PI_HALF_u4f28 +(dword) PI_HALF_u4f28#0 +(dword) PI_u4f28 +(dword) PI_u4f28#0 +(byte*) PROCPORT +(byte*) PROCPORT#0 +(byte*) PROCPORT_DDR +(byte*) PROCPORT_DDR#0 +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_DDR_MEMORY_MASK#0 +(byte) PROCPORT_RAM_IO +(byte) PROCPORT_RAM_IO#0 +(byte*) RASTER +(byte*) RASTER#0 +(byte*) SCREEN +(byte*) SCREEN#0 +(signed word[$200]) SINUS +(signed word[$200]) SINUS#0 +(const byte) SIZEOF_SIGNED_WORD = (byte) 2 +(byte) VIC_BMM +(byte) VIC_BMM#0 +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL#0 +(byte) VIC_DEN +(byte) VIC_DEN#0 +(byte) VIC_RSEL +(byte) VIC_RSEL#0 +(byte) WHITE +(byte) WHITE#0 +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) +(number~) bitmap_clear::$0 +(number~) bitmap_clear::$1 +(label) bitmap_clear::@1 +(label) bitmap_clear::@2 +(label) bitmap_clear::@return +(byte) bitmap_clear::bgcol +(byte) bitmap_clear::bgcol#0 +(byte) bitmap_clear::bgcol#1 +(byte) bitmap_clear::col +(byte) bitmap_clear::col#0 +(byte) bitmap_clear::fgcol +(byte) bitmap_clear::fgcol#0 +(byte) bitmap_clear::fgcol#1 +(byte*) bitmap_gfx +(byte*) bitmap_gfx#0 +(byte*) bitmap_gfx#1 +(byte*) bitmap_gfx#10 +(byte*) bitmap_gfx#11 +(byte*) bitmap_gfx#12 +(byte*) bitmap_gfx#13 +(byte*) bitmap_gfx#14 +(byte*) bitmap_gfx#15 +(byte*) bitmap_gfx#16 +(byte*) bitmap_gfx#17 +(byte*) bitmap_gfx#18 +(byte*) bitmap_gfx#19 +(byte*) bitmap_gfx#2 +(byte*) bitmap_gfx#20 +(byte*) bitmap_gfx#21 +(byte*) bitmap_gfx#22 +(byte*) bitmap_gfx#23 +(byte*) bitmap_gfx#24 +(byte*) bitmap_gfx#25 +(byte*) bitmap_gfx#26 +(byte*) bitmap_gfx#27 +(byte*) bitmap_gfx#28 +(byte*) bitmap_gfx#29 +(byte*) bitmap_gfx#3 +(byte*) bitmap_gfx#30 +(byte*) bitmap_gfx#31 +(byte*) bitmap_gfx#32 +(byte*) bitmap_gfx#33 +(byte*) bitmap_gfx#34 +(byte*) bitmap_gfx#35 +(byte*) bitmap_gfx#36 +(byte*) bitmap_gfx#37 +(byte*) bitmap_gfx#38 +(byte*) bitmap_gfx#39 +(byte*) bitmap_gfx#4 +(byte*) bitmap_gfx#5 +(byte*) bitmap_gfx#6 +(byte*) bitmap_gfx#7 +(byte*) bitmap_gfx#8 +(byte*) bitmap_gfx#9 +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) +(bool~) bitmap_init::$0 +(bool~) bitmap_init::$1 +(byte*~) bitmap_init::$10 +(bool~) bitmap_init::$11 +(bool~) bitmap_init::$2 +(number~) bitmap_init::$3 +(byte~) bitmap_init::$4 +(number~) bitmap_init::$5 +(byte~) bitmap_init::$6 +(number~) bitmap_init::$7 +(bool~) bitmap_init::$8 +(bool~) bitmap_init::$9 +(label) bitmap_init::@1 +(label) bitmap_init::@2 +(label) bitmap_init::@3 +(label) bitmap_init::@4 +(label) bitmap_init::@5 +(label) bitmap_init::@6 +(label) bitmap_init::@7 +(label) bitmap_init::@return +(byte) bitmap_init::bits +(byte) bitmap_init::bits#0 +(byte) bitmap_init::bits#1 +(byte) bitmap_init::bits#2 +(byte) bitmap_init::bits#3 +(byte) bitmap_init::bits#4 +(byte*) bitmap_init::gfx +(byte*) bitmap_init::gfx#0 +(byte*) bitmap_init::gfx#1 +(byte*) bitmap_init::gfx#2 +(byte*) bitmap_init::gfx#3 +(byte*) bitmap_init::gfx#4 +(byte*) bitmap_init::gfx#5 +(byte*) bitmap_init::screen +(byte*) bitmap_init::screen#0 +(byte*) bitmap_init::screen#1 +(byte) bitmap_init::x +(byte) bitmap_init::x#0 +(byte) bitmap_init::x#1 +(byte) bitmap_init::x#2 +(byte) bitmap_init::x#3 +(byte) bitmap_init::x#4 +(byte) bitmap_init::y +(byte) bitmap_init::y#0 +(byte) bitmap_init::y#1 +(byte) bitmap_init::y#2 +(byte) bitmap_init::y#3 +(byte) bitmap_init::y#4 +(byte*) bitmap_init::yoffs +(byte*) bitmap_init::yoffs#0 +(byte*) bitmap_init::yoffs#1 +(byte*) bitmap_init::yoffs#2 +(byte*) bitmap_init::yoffs#3 +(byte*) bitmap_init::yoffs#4 +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) +(byte*~) bitmap_plot::$0 +(number~) bitmap_plot::$1 +(byte~) bitmap_plot::$2 +(label) bitmap_plot::@return +(byte*) bitmap_plot::plotter +(byte*) bitmap_plot::plotter#0 +(byte*) bitmap_plot::plotter#1 +(word) bitmap_plot::x +(word) bitmap_plot::x#0 +(word) bitmap_plot::x#1 +(byte) bitmap_plot::y +(byte) bitmap_plot::y#0 +(byte) bitmap_plot::y#1 +(byte[$100]) bitmap_plot_bit +(byte[$100]) bitmap_plot_bit#0 +(byte[$100]) bitmap_plot_yhi +(byte[$100]) bitmap_plot_yhi#0 +(byte[$100]) bitmap_plot_ylo +(byte[$100]) bitmap_plot_ylo#0 +(byte*) bitmap_screen +(byte*) bitmap_screen#0 +(byte*) bitmap_screen#1 +(byte*) bitmap_screen#10 +(byte*) bitmap_screen#11 +(byte*) bitmap_screen#12 +(byte*) bitmap_screen#13 +(byte*) bitmap_screen#14 +(byte*) bitmap_screen#15 +(byte*) bitmap_screen#16 +(byte*) bitmap_screen#17 +(byte*) bitmap_screen#18 +(byte*) bitmap_screen#19 +(byte*) bitmap_screen#2 +(byte*) bitmap_screen#20 +(byte*) bitmap_screen#21 +(byte*) bitmap_screen#22 +(byte*) bitmap_screen#23 +(byte*) bitmap_screen#24 +(byte*) bitmap_screen#25 +(byte*) bitmap_screen#26 +(byte*) bitmap_screen#27 +(byte*) bitmap_screen#28 +(byte*) bitmap_screen#29 +(byte*) bitmap_screen#3 +(byte*) bitmap_screen#30 +(byte*) bitmap_screen#31 +(byte*) bitmap_screen#32 +(byte*) bitmap_screen#33 +(byte*) bitmap_screen#34 +(byte*) bitmap_screen#35 +(byte*) bitmap_screen#36 +(byte*) bitmap_screen#37 +(byte*) bitmap_screen#38 +(byte*) bitmap_screen#4 +(byte*) bitmap_screen#5 +(byte*) bitmap_screen#6 +(byte*) bitmap_screen#7 +(byte*) bitmap_screen#8 +(byte*) bitmap_screen#9 +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) +(word~) div32u16u::$0 +(word~) div32u16u::$1 +(word~) div32u16u::$2 +(word~) div32u16u::$3 +(label) div32u16u::@2 +(label) div32u16u::@3 +(label) div32u16u::@return +(dword) div32u16u::dividend +(dword) div32u16u::dividend#0 +(dword) div32u16u::dividend#1 +(dword) div32u16u::dividend#2 +(word) div32u16u::divisor +(word) div32u16u::divisor#0 +(word) div32u16u::divisor#1 +(word) div32u16u::divisor#2 +(dword) div32u16u::quotient +(dword) div32u16u::quotient#0 +(word) div32u16u::quotient_hi +(word) div32u16u::quotient_hi#0 +(word) div32u16u::quotient_hi#1 +(word) div32u16u::quotient_lo +(word) div32u16u::quotient_lo#0 +(dword) div32u16u::return +(dword) div32u16u::return#0 +(dword) div32u16u::return#1 +(dword) div32u16u::return#2 +(dword) div32u16u::return#3 +(dword) div32u16u::return#4 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(word~) divr16u::$0 +(byte~) divr16u::$1 +(word~) divr16u::$10 +(bool~) divr16u::$11 +(number~) divr16u::$2 +(bool~) divr16u::$3 +(bool~) divr16u::$4 +(number~) divr16u::$5 +(word~) divr16u::$6 +(word~) divr16u::$7 +(bool~) divr16u::$8 +(bool~) divr16u::$9 +(label) divr16u::@1 +(label) divr16u::@2 +(label) divr16u::@3 +(label) divr16u::@4 +(label) divr16u::@5 +(label) divr16u::@6 +(label) divr16u::@return +(word) divr16u::dividend +(word) divr16u::dividend#0 +(word) divr16u::dividend#1 +(word) divr16u::dividend#2 +(word) divr16u::dividend#3 +(word) divr16u::dividend#4 +(word) divr16u::dividend#5 +(word) divr16u::dividend#6 +(word) divr16u::dividend#7 +(word) divr16u::dividend#8 +(word) divr16u::divisor +(word) divr16u::divisor#0 +(word) divr16u::divisor#1 +(word) divr16u::divisor#2 +(word) divr16u::divisor#3 +(word) divr16u::divisor#4 +(word) divr16u::divisor#5 +(word) divr16u::divisor#6 +(word) divr16u::divisor#7 +(byte) divr16u::i +(byte) divr16u::i#0 +(byte) divr16u::i#1 +(byte) divr16u::i#2 +(byte) divr16u::i#3 +(byte) divr16u::i#4 +(byte) divr16u::i#5 +(byte) divr16u::i#6 +(word) divr16u::quotient +(word) divr16u::quotient#0 +(word) divr16u::quotient#1 +(word) divr16u::quotient#2 +(word) divr16u::quotient#3 +(word) divr16u::quotient#4 +(word) divr16u::quotient#5 +(word) divr16u::quotient#6 +(word) divr16u::quotient#7 +(word) divr16u::quotient#8 +(word) divr16u::rem +(word) divr16u::rem#0 +(word) divr16u::rem#1 +(word) divr16u::rem#10 +(word) divr16u::rem#11 +(word) divr16u::rem#2 +(word) divr16u::rem#3 +(word) divr16u::rem#4 +(word) divr16u::rem#5 +(word) divr16u::rem#6 +(word) divr16u::rem#7 +(word) divr16u::rem#8 +(word) divr16u::rem#9 +(word) divr16u::return +(word) divr16u::return#0 +(word) divr16u::return#1 +(word) divr16u::return#2 +(word) divr16u::return#3 +(word) divr16u::return#4 +(word) divr16u::return#5 +(word) divr16u::return#6 +(byte) frame_cnt +(byte) frame_cnt#0 +(byte) frame_cnt#1 +(byte) frame_cnt#10 +(byte) frame_cnt#11 +(byte) frame_cnt#12 +(byte) frame_cnt#13 +(byte) frame_cnt#14 +(byte) frame_cnt#15 +(byte) frame_cnt#16 +(byte) frame_cnt#17 +(byte) frame_cnt#18 +(byte) frame_cnt#19 +(byte) frame_cnt#2 +(byte) frame_cnt#20 +(byte) frame_cnt#21 +(byte) frame_cnt#22 +(byte) frame_cnt#23 +(byte) frame_cnt#24 +(byte) frame_cnt#3 +(byte) frame_cnt#4 +(byte) frame_cnt#5 +(byte) frame_cnt#6 +(byte) frame_cnt#7 +(byte) frame_cnt#8 +(byte) frame_cnt#9 +(void()) init_irq() +(void()*~) init_irq::$0 +(label) init_irq::@return +interrupt(HARDWARE_CLOBBER)(void()) irq() +(bool~) irq::$0 +(bool~) irq::$1 +(label) irq::@1 +(label) irq::@2 +(label) irq::@return +(void()) main() +(signed word~) main::$10 +(signed word~) main::$11 +(number~) main::$12 +(word~) main::$13 +(signed dword~) main::$14 +(word~) main::$15 +(signed word~) main::$16 +(signed word~) main::$17 +(number~) main::$18 +(word~) main::$19 +(byte~) main::$20 +(bool~) main::$22 +(bool~) main::$23 +(bool~) main::$24 +(bool~) main::$25 +(bool~) main::$26 +(bool~) main::$27 +(word~) main::$28 +(word~) main::$29 +(byte~) main::$3 +(byte~) main::$4 +(number~) main::$5 +(byte~) main::$6 +(signed dword~) main::$8 +(word~) main::$9 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@15 +(label) main::@16 +(label) main::@2 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@26 +(label) main::@27 +(label) main::@28 +(label) main::@4 +(label) main::@5 +(label) main::@return +(signed word) main::cos_x +(signed word) main::cos_x#0 +(word) main::idx_x +(word) main::idx_x#0 +(word) main::idx_x#1 +(word) main::idx_x#10 +(word) main::idx_x#2 +(word) main::idx_x#3 +(word) main::idx_x#4 +(word) main::idx_x#5 +(word) main::idx_x#6 +(word) main::idx_x#7 +(word) main::idx_x#8 +(word) main::idx_x#9 +(word) main::idx_y +(word) main::idx_y#0 +(word) main::idx_y#1 +(word) main::idx_y#10 +(word) main::idx_y#2 +(word) main::idx_y#3 +(word) main::idx_y#4 +(word) main::idx_y#5 +(word) main::idx_y#6 +(word) main::idx_y#7 +(word) main::idx_y#8 +(word) main::idx_y#9 +(signed word) main::r +(signed word) main::r#0 +(signed word) main::r#1 +(signed word) main::r#10 +(signed word) main::r#2 +(signed word) main::r#3 +(signed word) main::r#4 +(signed word) main::r#5 +(signed word) main::r#6 +(signed word) main::r#7 +(signed word) main::r#8 +(signed word) main::r#9 +(byte) main::r_add +(byte) main::r_add#0 +(signed word) main::sin_y +(signed word) main::sin_y#0 +(label) main::toD0181 +(word~) main::toD0181_$0 +(word~) main::toD0181_$0#0 +(number~) main::toD0181_$1 +(number~) main::toD0181_$1#0 +(number~) main::toD0181_$2 +(number~) main::toD0181_$2#0 +(number~) main::toD0181_$3 +(number~) main::toD0181_$3#0 +(word~) main::toD0181_$4 +(word~) main::toD0181_$4#0 +(byte~) main::toD0181_$5 +(byte~) main::toD0181_$5#0 +(number~) main::toD0181_$6 +(number~) main::toD0181_$6#0 +(number~) main::toD0181_$7 +(number~) main::toD0181_$7#0 +(number~) main::toD0181_$8 +(number~) main::toD0181_$8#0 +(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 +(word) main::x +(word) main::x#0 +(word) main::x#1 +(signed dword) main::xpos +(signed dword) main::xpos#0 +(word) main::y +(word) main::y#0 +(signed dword) main::ypos +(signed dword) main::ypos#0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(byte*~) memset::$0 +(byte*~) memset::$1 +(bool~) memset::$2 +(label) memset::@1 +(label) memset::@2 +(label) memset::@return +(byte) memset::c +(byte) memset::c#0 +(byte) memset::c#1 +(byte) memset::c#2 +(byte) memset::c#3 +(byte*) memset::dst +(byte*) memset::dst#0 +(byte*) memset::dst#1 +(byte*) memset::dst#2 +(byte*) memset::end +(byte*) memset::end#0 +(byte*) memset::end#1 +(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::return#4 +(void*) memset::str +(void*) memset::str#0 +(void*) memset::str#1 +(void*) memset::str#2 +(void*) memset::str#3 +(void*) memset::str#4 +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) +(word~) mul16s::$0 +(word~) mul16s::$1 +(word~) mul16s::$10 +(word~) mul16s::$11 +(word~) mul16s::$13 +(word~) mul16s::$14 +(word~) mul16s::$15 +(word~) mul16s::$16 +(word~) mul16s::$17 +(dword~) mul16s::$2 +(bool~) mul16s::$3 +(bool~) mul16s::$4 +(bool~) mul16s::$5 +(bool~) mul16s::$6 +(signed dword~) mul16s::$7 +(word~) mul16s::$9 +(label) mul16s::@1 +(label) mul16s::@2 +(label) mul16s::@3 +(label) mul16s::@4 +(label) mul16s::@6 +(label) mul16s::@return +(signed word) mul16s::a +(signed word) mul16s::a#0 +(signed word) mul16s::a#1 +(signed word) mul16s::a#2 +(signed word) mul16s::a#3 +(signed word) mul16s::a#4 +(signed word) mul16s::a#5 +(signed word) mul16s::a#6 +(signed word) mul16s::a#7 +(signed word) mul16s::b +(signed word) mul16s::b#0 +(signed word) mul16s::b#1 +(signed word) mul16s::b#2 +(signed word) mul16s::b#3 +(signed word) mul16s::b#4 +(signed word) mul16s::b#5 +(signed word) mul16s::b#6 +(dword) mul16s::m +(dword) mul16s::m#0 +(dword) mul16s::m#1 +(dword) mul16s::m#2 +(dword) mul16s::m#3 +(dword) mul16s::m#4 +(dword) mul16s::m#5 +(dword) mul16s::m#6 +(signed dword) mul16s::return +(signed dword) mul16s::return#0 +(signed dword) mul16s::return#1 +(signed dword) mul16s::return#2 +(signed dword) mul16s::return#3 +(signed dword) mul16s::return#4 +(signed dword) mul16s::return#5 +(signed dword) mul16s::return#6 +(signed dword) mul16s::return#7 +(signed dword) mul16s::return#8 +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) +(bool~) mul16u::$0 +(number~) mul16u::$1 +(bool~) mul16u::$2 +(bool~) mul16u::$3 +(dword~) mul16u::$4 +(word~) mul16u::$5 +(dword~) mul16u::$6 +(label) mul16u::@1 +(label) mul16u::@2 +(label) mul16u::@3 +(label) mul16u::@4 +(label) mul16u::@7 +(label) mul16u::@return +(word) mul16u::a +(word) mul16u::a#0 +(word) mul16u::a#1 +(word) mul16u::a#2 +(word) mul16u::a#3 +(word) mul16u::a#4 +(word) mul16u::a#5 +(word) mul16u::a#6 +(word) mul16u::a#7 +(word) mul16u::b +(word) mul16u::b#0 +(word) mul16u::b#1 +(word) mul16u::b#2 +(dword) mul16u::mb +(dword) mul16u::mb#0 +(dword) mul16u::mb#1 +(dword) mul16u::mb#2 +(dword) mul16u::mb#3 +(dword) mul16u::mb#4 +(dword) mul16u::mb#5 +(dword) mul16u::res +(dword) mul16u::res#0 +(dword) mul16u::res#1 +(dword) mul16u::res#2 +(dword) mul16u::res#3 +(dword) mul16u::res#4 +(dword) mul16u::res#5 +(dword) mul16u::res#6 +(dword) mul16u::return +(dword) mul16u::return#0 +(dword) mul16u::return#1 +(dword) mul16u::return#2 +(dword) mul16u::return#3 +(dword) mul16u::return#4 +(dword) mul16u::return#5 +(dword) mul16u::return#6 +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) +(dword~) mulu16_sel::$0 +(dword~) mulu16_sel::$1 +(word~) mulu16_sel::$2 +(label) mulu16_sel::@2 +(label) mulu16_sel::@return +(word) mulu16_sel::return +(word) mulu16_sel::return#0 +(word) mulu16_sel::return#1 +(word) mulu16_sel::return#10 +(word) mulu16_sel::return#11 +(word) mulu16_sel::return#12 +(word) mulu16_sel::return#2 +(word) mulu16_sel::return#3 +(word) mulu16_sel::return#4 +(word) mulu16_sel::return#5 +(word) mulu16_sel::return#6 +(word) mulu16_sel::return#7 +(word) mulu16_sel::return#8 +(word) mulu16_sel::return#9 +(byte) mulu16_sel::select +(byte) mulu16_sel::select#0 +(byte) mulu16_sel::select#1 +(byte) mulu16_sel::select#2 +(byte) mulu16_sel::select#3 +(byte) mulu16_sel::select#4 +(byte) mulu16_sel::select#5 +(byte) mulu16_sel::select#6 +(word) mulu16_sel::v1 +(word) mulu16_sel::v1#0 +(word) mulu16_sel::v1#1 +(word) mulu16_sel::v1#2 +(word) mulu16_sel::v1#3 +(word) mulu16_sel::v1#4 +(word) mulu16_sel::v1#5 +(word) mulu16_sel::v2 +(word) mulu16_sel::v2#0 +(word) mulu16_sel::v2#1 +(word) mulu16_sel::v2#2 +(word) mulu16_sel::v2#3 +(word) mulu16_sel::v2#4 +(word) mulu16_sel::v2#5 +(byte[$100]) plots_per_frame +(byte[$100]) plots_per_frame#0 +(word) rem16u +(word) rem16u#0 +(word) rem16u#1 +(word) rem16u#10 +(word) rem16u#11 +(word) rem16u#12 +(word) rem16u#13 +(word) rem16u#14 +(word) rem16u#15 +(word) rem16u#16 +(word) rem16u#17 +(word) rem16u#18 +(word) rem16u#19 +(word) rem16u#2 +(word) rem16u#20 +(word) rem16u#21 +(word) rem16u#22 +(word) rem16u#23 +(word) rem16u#24 +(word) rem16u#25 +(word) rem16u#26 +(word) rem16u#27 +(word) rem16u#28 +(word) rem16u#29 +(word) rem16u#3 +(word) rem16u#30 +(word) rem16u#31 +(word) rem16u#32 +(word) rem16u#33 +(word) rem16u#34 +(word) rem16u#35 +(word) rem16u#36 +(word) rem16u#37 +(word) rem16u#38 +(word) rem16u#39 +(word) rem16u#4 +(word) rem16u#40 +(word) rem16u#41 +(word) rem16u#42 +(word) rem16u#43 +(word) rem16u#44 +(word) rem16u#45 +(word) rem16u#46 +(word) rem16u#47 +(word) rem16u#5 +(word) rem16u#6 +(word) rem16u#7 +(word) rem16u#8 +(word) rem16u#9 +(signed word()) sin16s((dword) sin16s::x) +(bool~) sin16s::$0 +(bool~) sin16s::$1 +(word~) sin16s::$10 +(word~) sin16s::$11 +(word~) sin16s::$12 +(word~) sin16s::$13 +(signed word~) sin16s::$14 +(bool~) sin16s::$15 +(bool~) sin16s::$16 +(dword~) sin16s::$17 +(dword~) sin16s::$18 +(signed word~) sin16s::$19 +(bool~) sin16s::$2 +(signed word~) sin16s::$20 +(bool~) sin16s::$3 +(dword~) sin16s::$4 +(word~) sin16s::$5 +(word~) sin16s::$6 +(word~) sin16s::$7 +(word~) sin16s::$8 +(word~) sin16s::$9 +(label) sin16s::@1 +(label) sin16s::@10 +(label) sin16s::@11 +(label) sin16s::@12 +(label) sin16s::@2 +(label) sin16s::@3 +(label) sin16s::@4 +(label) sin16s::@5 +(label) sin16s::@6 +(label) sin16s::@8 +(label) sin16s::@9 +(label) sin16s::@return +(byte) sin16s::isUpper +(byte) sin16s::isUpper#0 +(byte) sin16s::isUpper#1 +(byte) sin16s::isUpper#2 +(byte) sin16s::isUpper#3 +(byte) sin16s::isUpper#4 +(byte) sin16s::isUpper#5 +(byte) sin16s::isUpper#6 +(byte) sin16s::isUpper#7 +(byte) sin16s::isUpper#8 +(byte) sin16s::isUpper#9 +(signed word) sin16s::return +(signed word) sin16s::return#0 +(signed word) sin16s::return#1 +(signed word) sin16s::return#2 +(signed word) sin16s::return#3 +(signed word) sin16s::return#4 +(signed word) sin16s::sinx +(signed word) sin16s::sinx#0 +(signed word) sin16s::sinx#1 +(signed word) sin16s::sinx#2 +(word) sin16s::usinx +(word) sin16s::usinx#0 +(word) sin16s::usinx#1 +(word) sin16s::usinx#2 +(word) sin16s::usinx#3 +(word) sin16s::usinx#4 +(dword) sin16s::x +(dword) sin16s::x#0 +(dword) sin16s::x#1 +(dword) sin16s::x#2 +(dword) sin16s::x#3 +(dword) sin16s::x#4 +(dword) sin16s::x#5 +(dword) sin16s::x#6 +(dword) sin16s::x#7 +(word) sin16s::x1 +(word) sin16s::x1#0 +(word) sin16s::x1#1 +(word) sin16s::x1#2 +(word) sin16s::x1#3 +(word) sin16s::x1#4 +(word) sin16s::x2 +(word) sin16s::x2#0 +(word) sin16s::x3 +(word) sin16s::x3#0 +(word) sin16s::x3#1 +(word) sin16s::x3_6 +(word) sin16s::x3_6#0 +(word) sin16s::x4 +(word) sin16s::x4#0 +(word) sin16s::x5 +(word) sin16s::x5#0 +(word) sin16s::x5_128 +(word) sin16s::x5_128#0 +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) +(signed word~) sin16s_gen2::$0 +(signed word~) sin16s_gen2::$1 +(bool~) sin16s_gen2::$10 +(signed word~) sin16s_gen2::$2 +(dword~) sin16s_gen2::$3 +(signed word~) sin16s_gen2::$4 +(signed dword~) sin16s_gen2::$5 +(word~) sin16s_gen2::$6 +(signed word~) sin16s_gen2::$7 +(signed word~) sin16s_gen2::$8 +(dword~) sin16s_gen2::$9 +(label) sin16s_gen2::@1 +(label) sin16s_gen2::@3 +(label) sin16s_gen2::@4 +(label) sin16s_gen2::@5 +(label) sin16s_gen2::@return +(signed word) sin16s_gen2::ampl +(signed word) sin16s_gen2::ampl#0 +(signed word) sin16s_gen2::ampl#1 +(signed word) sin16s_gen2::ampl#2 +(signed word) sin16s_gen2::ampl#3 +(signed word) sin16s_gen2::ampl#4 +(word) sin16s_gen2::i +(word) sin16s_gen2::i#0 +(word) sin16s_gen2::i#1 +(word) sin16s_gen2::i#2 +(word) sin16s_gen2::i#3 +(word) sin16s_gen2::i#4 +(signed word) sin16s_gen2::max +(signed word) sin16s_gen2::max#0 +(signed word) sin16s_gen2::max#1 +(signed word) sin16s_gen2::min +(signed word) sin16s_gen2::min#0 +(signed word) sin16s_gen2::min#1 +(signed word) sin16s_gen2::offs +(signed word) sin16s_gen2::offs#0 +(signed word) sin16s_gen2::offs#1 +(signed word) sin16s_gen2::offs#2 +(signed word) sin16s_gen2::offs#3 +(signed word) sin16s_gen2::offs#4 +(signed word*) sin16s_gen2::sintab +(signed word*) sin16s_gen2::sintab#0 +(signed word*) sin16s_gen2::sintab#1 +(signed word*) sin16s_gen2::sintab#2 +(signed word*) sin16s_gen2::sintab#3 +(signed word*) sin16s_gen2::sintab#4 +(signed word*) sin16s_gen2::sintab#5 +(signed word*) sin16s_gen2::sintab#6 +(dword) sin16s_gen2::step +(dword) sin16s_gen2::step#0 +(dword) sin16s_gen2::step#1 +(dword) sin16s_gen2::step#2 +(dword) sin16s_gen2::step#3 +(word) sin16s_gen2::wavelength +(word) sin16s_gen2::wavelength#0 +(word) sin16s_gen2::wavelength#1 +(word) sin16s_gen2::wavelength#2 +(word) sin16s_gen2::wavelength#3 +(word) sin16s_gen2::wavelength#4 +(word) sin16s_gen2::wavelength#5 +(dword) sin16s_gen2::x +(dword) sin16s_gen2::x#0 +(dword) sin16s_gen2::x#1 +(dword) sin16s_gen2::x#2 +(dword) sin16s_gen2::x#3 +(dword) sin16s_gen2::x#4 + +Fixing inline constructor with div32u16u::$4 ← (word)div32u16u::quotient_hi#1 dw= (word)div32u16u::quotient_lo#0 +Fixing inline constructor with bitmap_plot::$3 ← (byte)*(bitmap_plot_yhi#0 + bitmap_plot::y#1) w= (byte)*(bitmap_plot_ylo#0 + bitmap_plot::y#1) +Successful SSA optimization Pass2FixInlineConstructorsNew +Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 +Adding number conversion cast (unumber) $35 in (byte) PROCPORT_RAM_IO#0 ← (number) $35 +Adding number conversion cast (unumber) $20 in (byte) VIC_BMM#0 ← (number) $20 +Adding number conversion cast (unumber) $10 in (byte) VIC_DEN#0 ← (number) $10 +Adding number conversion cast (unumber) 8 in (byte) VIC_RSEL#0 ← (number) 8 +Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1 +Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f +Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1 +Adding number conversion cast (unumber) 0 in (word) rem16u#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (word) divr16u::quotient#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (word~) divr16u::$0 ← (word) divr16u::rem#5 << (number) 1 +Adding number conversion cast (unumber) $80 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (number) $80 +Adding number conversion cast (unumber) divr16u::$2 in (number~) divr16u::$2 ← (byte~) divr16u::$1 & (unumber)(number) $80 +Adding number conversion cast (unumber) 0 in (bool~) divr16u::$3 ← (unumber~) divr16u::$2 != (number) 0 +Adding number conversion cast (unumber) 1 in (word~) divr16u::$6 ← (word) divr16u::dividend#4 << (number) 1 +Adding number conversion cast (unumber) 1 in (word~) divr16u::$7 ← (word) divr16u::quotient#3 << (number) 1 +Adding number conversion cast (unumber) 1 in (number~) divr16u::$5 ← (word) divr16u::rem#7 | (number) 1 +Adding number conversion cast (unumber) divr16u::$5 in (number~) divr16u::$5 ← (word) divr16u::rem#7 | (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in (word) divr16u::rem#3 ← (number) 0 +Adding number conversion cast (unumber) 0 in (dword) mul16u::res#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) mul16u::$0 ← (word) mul16u::a#3 != (number) 0 +Adding number conversion cast (unumber) 1 in (number~) mul16u::$1 ← (word) mul16u::a#4 & (number) 1 +Adding number conversion cast (unumber) mul16u::$1 in (number~) mul16u::$1 ← (word) mul16u::a#4 & (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in (bool~) mul16u::$2 ← (unumber~) mul16u::$1 != (number) 0 +Adding number conversion cast (unumber) 1 in (word~) mul16u::$5 ← (word) mul16u::a#5 >> (number) 1 +Adding number conversion cast (unumber) 1 in (dword~) mul16u::$6 ← (dword) mul16u::mb#2 << (number) 1 +Adding number conversion cast (snumber) 0 in (bool~) mul16s::$3 ← (signed word) mul16s::a#4 < (number) 0 +Adding number conversion cast (snumber) 0 in (bool~) mul16s::$5 ← (signed word) mul16s::b#4 < (number) 0 +Adding number conversion cast (unumber) $6487ed51 in (dword) PI2_u4f28#0 ← (number) $6487ed51 +Adding number conversion cast (unumber) $3243f6a9 in (dword) PI_u4f28#0 ← (number) $3243f6a9 +Adding number conversion cast (unumber) $1921fb54 in (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 +Adding number conversion cast (snumber) 1 in (signed word~) sin16s_gen2::$1 ← (signed word) sin16s_gen2::ampl#0 >> (number) 1 +Adding number conversion cast (unumber) 0 in (dword) sin16s_gen2::x#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (word) sin16s_gen2::i#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) sin16s::isUpper#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) sin16s::isUpper#1 ← (number) 1 +Adding number conversion cast (unumber) 3 in (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (number) 3 +Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#0 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) mulu16_sel::select#1 ← (number) 1 +Adding number conversion cast (unumber) $10000/6 in (word) mulu16_sel::v2#2 ← (number) $10000/(number) 6 +Adding number conversion cast (unumber) 1 in (byte) mulu16_sel::select#2 ← (number) 1 +Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#3 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) mulu16_sel::select#4 ← (number) 0 +Adding number conversion cast (unumber) 4 in (word~) sin16s::$12 ← (word) sin16s::x5#0 >> (number) 4 +Adding number conversion cast (unumber) 0 in (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (number) 0 +Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#0 ← (number) $80 +Adding number conversion cast (unumber) 1 in (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (number) 1 +Adding number conversion cast (unumber) 0 in (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (number) 0 +Adding number conversion cast (unumber) $80 in (byte) bitmap_init::bits#2 ← (number) $80 +Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7 +Adding number conversion cast (unumber) bitmap_init::$3 in (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (unumber)(number) 7 +Adding number conversion cast (unumber) bitmap_init::$5 in (number~) bitmap_init::$5 ← (unumber~) bitmap_init::$3 | (byte~) bitmap_init::$4 +Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (number) 7 +Adding number conversion cast (unumber) bitmap_init::$7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (unumber)(number) 7 +Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$8 ← (unumber~) bitmap_init::$7 == (number) 7 +Adding number conversion cast (unumber) $28*8 in (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8 +Adding number conversion cast (unumber) $10 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10 +Adding number conversion cast (unumber) bitmap_clear::$0 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (unumber)(number) $10 +Adding number conversion cast (unumber) bitmap_clear::$1 in (number~) bitmap_clear::$1 ← (unumber~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 +Adding number conversion cast (unumber) 0 in (byte) memset::c#1 ← (number) 0 +Adding number conversion cast (unumber) $fff8 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (number) $fff8 +Adding number conversion cast (unumber) bitmap_plot::$1 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (unumber)(number) $fff8 +Adding number conversion cast (unumber) $200 in (word) sin16s_gen2::wavelength#0 ← (number) $200 +Adding number conversion cast (snumber) -$1001 in (signed word) sin16s_gen2::min#0 ← (number) -$1001 +Adding number conversion cast (snumber) $1001 in (signed word) sin16s_gen2::max#0 ← (number) $1001 +Adding number conversion cast (unumber) 3 in (number~) main::$5 ← (byte~) main::$4 | (number) 3 +Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte~) main::$4 | (unumber)(number) 3 +Adding number conversion cast (unumber) $3fff in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (number) $3fff +Adding number conversion cast (unumber) main::toD0181_$1#0 in (number~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (unumber)(number) $3fff +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (number) 4 +Adding number conversion cast (unumber) main::toD0181_$2#0 in (number~) main::toD0181_$2#0 ← (unumber~) main::toD0181_$1#0 * (unumber)(number) 4 +Adding number conversion cast (unumber) main::toD0181_$3#0 in (number~) main::toD0181_$3#0 ← > (unumber~) main::toD0181_$2#0 +Adding number conversion cast (unumber) 4 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (number) 4 +Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (unumber)(number) 4 +Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f +Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f +Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0 +Adding number conversion cast (unumber) 0 in (word) main::idx_x#0 ← (number) 0 +Adding number conversion cast (unumber) $80 in (word) main::idx_y#0 ← (number) $80 +Adding number conversion cast (snumber) 0 in (signed word) main::r#0 ← (number) 0 +Adding number conversion cast (unumber) 4 in (byte) main::r_add#0 ← (number) 4 +Adding number conversion cast (snumber) 2 in (signed word~) main::$11 ← (signed word~) main::$10 >> (number) 2 +Adding number conversion cast (snumber) $a0 in (number~) main::$12 ← (number) $a0 + (signed word~) main::$11 +Adding number conversion cast (snumber) main::$12 in (number~) main::$12 ← (snumber)(number) $a0 + (signed word~) main::$11 +Adding number conversion cast (snumber) 2 in (signed word~) main::$17 ← (signed word~) main::$16 >> (number) 2 +Adding number conversion cast (snumber) $64 in (number~) main::$18 ← (number) $64 + (signed word~) main::$17 +Adding number conversion cast (snumber) main::$18 in (number~) main::$18 ← (snumber)(number) $64 + (signed word~) main::$17 +Adding number conversion cast (unumber) $200 in (bool~) main::$22 ← (word) main::idx_x#1 >= (number) $200 +Adding number conversion cast (unumber) $200 in (bool~) main::$24 ← (word) main::idx_y#1 >= (number) $200 +Adding number conversion cast (unumber) 0 in (word) main::idx_x#2 ← (number) 0 +Adding number conversion cast (snumber) $200*$c+$100 in (bool~) main::$26 ← (signed word) main::r#1 >= (number) $200*(number) $c+(number) $100 +Adding number conversion cast (unumber) 0 in (word) main::idx_y#2 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) frame_cnt#0 ← (number) 1 +Adding number conversion cast (unumber) $80 in *((byte*) VIC_CONTROL#0) ← *((byte*) VIC_CONTROL#0) | (number) $80 +Adding number conversion cast (unumber) 0 in *((byte*) RASTER#0) ← (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) irq::$1 ← (number) 0 != (byte) frame_cnt#4 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0 +Inlining cast (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (unumber)(number) 7 +Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1 +Inlining cast (byte) PROCPORT_RAM_IO#0 ← (unumber)(number) $35 +Inlining cast (byte*) RASTER#0 ← (byte*)(number) $d012 +Inlining cast (byte*) BORDERCOL#0 ← (byte*)(number) $d020 +Inlining cast (byte*) BGCOL#0 ← (byte*)(number) $d021 +Inlining cast (byte*) VIC_CONTROL#0 ← (byte*)(number) $d011 +Inlining cast (byte*) D011#0 ← (byte*)(number) $d011 +Inlining cast (byte) VIC_BMM#0 ← (unumber)(number) $20 +Inlining cast (byte) VIC_DEN#0 ← (unumber)(number) $10 +Inlining cast (byte) VIC_RSEL#0 ← (unumber)(number) 8 +Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 +Inlining cast (byte*) IRQ_STATUS#0 ← (byte*)(number) $d019 +Inlining cast (byte*) IRQ_ENABLE#0 ← (byte*)(number) $d01a +Inlining cast (byte) IRQ_RASTER#0 ← (unumber)(number) 1 +Inlining cast (byte*) CIA1_INTERRUPT#0 ← (byte*)(number) $dc0d +Inlining cast (byte) CIA_INTERRUPT_CLEAR#0 ← (unumber)(number) $7f +Inlining cast (void()**) HARDWARE_IRQ#0 ← (void()**)(number) $fffe +Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 +Inlining cast (byte) WHITE#0 ← (unumber)(number) 1 +Inlining cast (word) rem16u#0 ← (unumber)(number) 0 +Inlining cast (word) divr16u::quotient#0 ← (unumber)(number) 0 +Inlining cast (word) divr16u::rem#3 ← (unumber)(number) 0 +Inlining cast (dword) mul16u::res#0 ← (unumber)(number) 0 +Inlining cast (word~) mul16s::$0 ← (word)(signed word) mul16s::a#3 +Inlining cast (word~) mul16s::$1 ← (word)(signed word) mul16s::b#3 +Inlining cast (word~) mul16s::$10 ← (word)(signed word) mul16s::b#5 +Inlining cast (signed dword~) mul16s::$7 ← (signed dword)(dword) mul16s::m#4 +Inlining cast (word~) mul16s::$14 ← (word)(signed word) mul16s::a#5 +Inlining cast (dword) PI2_u4f28#0 ← (unumber)(number) $6487ed51 +Inlining cast (dword) PI_u4f28#0 ← (unumber)(number) $3243f6a9 +Inlining cast (dword) PI_HALF_u4f28#0 ← (unumber)(number) $1921fb54 +Inlining cast (dword) sin16s_gen2::x#0 ← (unumber)(number) 0 +Inlining cast (word) sin16s_gen2::i#0 ← (unumber)(number) 0 +Inlining cast (signed word~) sin16s_gen2::$7 ← (signed word)(word~) sin16s_gen2::$6 +Inlining cast (byte) sin16s::isUpper#0 ← (unumber)(number) 0 +Inlining cast (byte) sin16s::isUpper#1 ← (unumber)(number) 1 +Inlining cast (byte) mulu16_sel::select#0 ← (unumber)(number) 0 +Inlining cast (byte) mulu16_sel::select#1 ← (unumber)(number) 1 +Inlining cast (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Inlining cast (byte) mulu16_sel::select#2 ← (unumber)(number) 1 +Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0 +Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0 +Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1 +Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3 +Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 +Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 +Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 +Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000 +Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 +Inlining cast (word) sin16s_gen2::wavelength#0 ← (unumber)(number) $200 +Inlining cast (signed word) sin16s_gen2::min#0 ← (snumber)(number) -$1001 +Inlining cast (signed word) sin16s_gen2::max#0 ← (snumber)(number) $1001 +Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 +Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 +Inlining cast (word) main::idx_x#0 ← (unumber)(number) 0 +Inlining cast (word) main::idx_y#0 ← (unumber)(number) $80 +Inlining cast (signed word) main::r#0 ← (snumber)(number) 0 +Inlining cast (byte) main::r_add#0 ← (unumber)(number) 4 +Inlining cast (signed word~) main::$10 ← (signed word)(word~) main::$9 +Inlining cast (word~) main::$13 ← (word)(snumber~) main::$12 +Inlining cast (signed word~) main::$16 ← (signed word)(word~) main::$15 +Inlining cast (word~) main::$19 ← (word)(snumber~) main::$18 +Inlining cast (byte~) main::$20 ← (byte)(word) main::y#0 +Inlining cast (word) main::idx_x#2 ← (unumber)(number) 0 +Inlining cast (word) main::idx_y#2 ← (unumber)(number) 0 +Inlining cast (byte) frame_cnt#0 ← (unumber)(number) 1 +Inlining cast *((byte*) RASTER#0) ← (unumber)(number) 0 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 0 +Simplifying constant integer cast 7 +Simplifying constant pointer cast (byte*) 1 +Simplifying constant integer cast $35 +Simplifying constant pointer cast (byte*) 53266 +Simplifying constant pointer cast (byte*) 53280 +Simplifying constant pointer cast (byte*) 53281 +Simplifying constant pointer cast (byte*) 53265 +Simplifying constant pointer cast (byte*) 53265 +Simplifying constant integer cast $20 +Simplifying constant integer cast $10 +Simplifying constant integer cast 8 +Simplifying constant pointer cast (byte*) 53272 +Simplifying constant pointer cast (byte*) 53273 +Simplifying constant pointer cast (byte*) 53274 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 56333 +Simplifying constant integer cast $7f +Simplifying constant pointer cast (void()**) 65534 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast (word) div32u16u::quotient_hi#1 +Simplifying constant integer cast (word) div32u16u::quotient_lo#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 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $6487ed51 +Simplifying constant integer cast $3243f6a9 +Simplifying constant integer cast $1921fb54 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 3 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 4 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast 7 +Simplifying constant integer cast 7 +Simplifying constant integer cast 7 +Simplifying constant integer cast $10 +Simplifying constant integer cast 0 +Simplifying constant integer cast *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#1) +Simplifying constant integer cast *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#1) +Simplifying constant integer cast $fff8 +Simplifying constant pointer cast (byte*) 8192 +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant integer cast $200 +Simplifying constant integer cast -$1001 +Simplifying constant integer cast $1001 +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 $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 4 +Simplifying constant integer cast 2 +Simplifying constant integer cast $a0 +Simplifying constant integer cast 2 +Simplifying constant integer cast $64 +Simplifying constant integer cast $200 +Simplifying constant integer cast $200 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) $35 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $7f +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) 1 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +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) 1 +Finalized signed number type (signed byte) 0 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (dword) $6487ed51 +Finalized unsigned number type (dword) $3243f6a9 +Finalized unsigned number type (dword) $1921fb54 +Finalized signed number type (signed byte) 1 +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) 3 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $fff8 +Finalized unsigned number type (word) $200 +Finalized signed number type (signed word) -$1001 +Finalized signed number type (signed word) $1001 +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 (byte) $80 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 4 +Finalized signed number type (signed byte) 2 +Finalized signed number type (signed word) $a0 +Finalized signed number type (signed byte) 2 +Finalized signed number type (signed byte) $64 +Finalized unsigned number type (word) $200 +Finalized unsigned number type (word) $200 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in (unumber~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 +Inferred type updated to word in (unumber~) divr16u::$5 ← (word) divr16u::rem#7 | (byte) 1 +Inferred type updated to byte in (unumber~) mul16u::$1 ← (word) mul16u::a#4 & (byte) 1 +Inferred type updated to byte in (unumber~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (byte) 7 +Inferred type updated to byte in (unumber~) bitmap_init::$5 ← (byte~) bitmap_init::$3 | (byte~) bitmap_init::$4 +Inferred type updated to byte in (unumber~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Inferred type updated to byte in (unumber~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (byte) $10 +Inferred type updated to byte in (unumber~) bitmap_clear::$1 ← (byte~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 +Inferred type updated to word in (unumber~) bitmap_plot::$1 ← (word) bitmap_plot::x#1 & (word) $fff8 +Inferred type updated to byte in (unumber~) main::$5 ← (byte~) main::$4 | (byte) 3 +Inferred type updated to word in (unumber~) main::toD0181_$1#0 ← (word~) main::toD0181_$0#0 & (word) $3fff +Inferred type updated to word in (unumber~) main::toD0181_$2#0 ← (word~) main::toD0181_$1#0 * (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$3#0 ← > (word~) main::toD0181_$2#0 +Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main::toD0181_$5#0 / (byte) 4 +Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f +Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 +Inferred type updated to signed word in (snumber~) main::$12 ← (signed word) $a0 + (signed word~) main::$11 +Inferred type updated to signed word in (snumber~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 +Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3 +Successful SSA optimization PassNAddTypeConversionAssignment +Inversing boolean not [31] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte) 0 from [30] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte) 0 +Inversing boolean not [39] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [38] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [96] (bool~) mul16u::$3 ← (byte~) mul16u::$1 == (byte) 0 from [95] (bool~) mul16u::$2 ← (byte~) mul16u::$1 != (byte) 0 +Inversing boolean not [122] (bool~) mul16s::$4 ← (signed word) mul16s::a#4 >= (signed byte) 0 from [121] (bool~) mul16s::$3 ← (signed word) mul16s::a#4 < (signed byte) 0 +Inversing boolean not [126] (bool~) mul16s::$6 ← (signed word) mul16s::b#4 >= (signed byte) 0 from [125] (bool~) mul16s::$5 ← (signed word) mul16s::b#4 < (signed byte) 0 +Inversing boolean not [194] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [193] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [198] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [197] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [257] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [256] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 +Inversing boolean not [314] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [313] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [334] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [333] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [464] (bool~) main::$23 ← (word) main::idx_x#1 < (word) $200 from [463] (bool~) main::$22 ← (word) main::idx_x#1 >= (word) $200 +Inversing boolean not [469] (bool~) main::$25 ← (word) main::idx_y#1 < (word) $200 from [468] (bool~) main::$24 ← (word) main::idx_y#1 >= (word) $200 +Inversing boolean not [476] (bool~) main::$27 ← (signed word) main::r#1 < (signed word)(number) $200*(number) $c+(number) $100 from [475] (bool~) main::$26 ← (signed word) main::r#1 >= (signed word)(number) $200*(number) $c+(number) $100 +Inversing boolean not [505] (bool~) irq::$0 ← (byte) 0 == (byte) frame_cnt#4 from [504] (bool~) irq::$1 ← (byte) 0 != (byte) frame_cnt#4 +Successful SSA optimization Pass2UnaryNotSimplification +Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 +Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 +Alias (word) divr16u::quotient#1 = (word~) divr16u::$7 (word) divr16u::quotient#4 +Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#7 +Alias (word) divr16u::quotient#6 = (word) divr16u::quotient#7 +Alias (word) divr16u::divisor#4 = (word) divr16u::divisor#5 +Alias (byte) divr16u::i#5 = (byte) divr16u::i#6 +Alias (word) divr16u::rem#1 = (word~) divr16u::$5 +Alias (word) divr16u::rem#6 = (word) divr16u::rem#8 +Alias (word) divr16u::divisor#2 = (word) divr16u::divisor#3 +Alias (byte) divr16u::i#3 = (byte) divr16u::i#4 +Alias (word) divr16u::rem#2 = (word~) divr16u::$10 +Alias (word) divr16u::rem#11 = (word) divr16u::rem#9 +Alias (word) divr16u::return#0 = (word) divr16u::quotient#5 (word) divr16u::quotient#8 (word) divr16u::return#4 (word) divr16u::return#1 +Alias (word) rem16u#1 = (word) rem16u#11 (word) rem16u#2 +Alias (word) divr16u::dividend#1 = (word~) div32u16u::$0 +Alias (word) divr16u::return#2 = (word) divr16u::return#5 +Alias (dword) div32u16u::dividend#1 = (dword) div32u16u::dividend#2 +Alias (word) div32u16u::divisor#1 = (word) div32u16u::divisor#2 +Alias (word) rem16u#12 = (word) rem16u#3 +Alias (word) div32u16u::quotient_hi#0 = (word~) div32u16u::$1 (word) div32u16u::quotient_hi#1 +Alias (word) divr16u::dividend#2 = (word~) div32u16u::$2 +Alias (word) divr16u::return#3 = (word) divr16u::return#6 +Alias (word) rem16u#13 = (word) rem16u#4 (word) rem16u#14 (word) rem16u#5 +Alias (word) div32u16u::quotient_lo#0 = (word~) div32u16u::$3 +Alias (dword) div32u16u::return#0 = (dword) div32u16u::quotient#0 (dword~) div32u16u::$4 (dword) div32u16u::return#3 (dword) div32u16u::return#1 +Alias (dword) mul16u::mb#0 = (word) mul16u::b#2 +Alias (word) mul16u::a#3 = (word) mul16u::a#4 (word) mul16u::a#7 +Alias (dword) mul16u::mb#3 = (dword) mul16u::mb#4 (dword) mul16u::mb#5 +Alias (dword) mul16u::res#2 = (dword) mul16u::res#5 (dword) mul16u::res#4 (dword) mul16u::return#0 (dword) mul16u::res#3 (dword) mul16u::return#4 (dword) mul16u::return#1 +Alias (word) mul16u::a#0 = (word~) mul16u::$5 +Alias (dword) mul16u::mb#1 = (dword~) mul16u::$6 +Alias (dword) mul16u::res#1 = (dword~) mul16u::$4 +Alias (word) mul16u::a#1 = (word~) mul16s::$0 +Alias (word) mul16u::b#0 = (word~) mul16s::$1 +Alias (dword) mul16u::return#2 = (dword) mul16u::return#5 +Alias (signed word) mul16s::a#3 = (signed word) mul16s::a#4 (signed word) mul16s::a#7 +Alias (signed word) mul16s::b#3 = (signed word) mul16s::b#6 (signed word) mul16s::b#5 +Alias (dword) mul16s::m#0 = (dword~) mul16s::$2 (dword) mul16s::m#3 +Alias (word~) mul16s::$16 = (word~) mul16s::$11 +Alias (signed dword) mul16s::return#0 = (signed dword~) mul16s::$7 (signed dword) mul16s::return#5 (signed dword) mul16s::return#1 +Alias (dword) mul16s::m#5 = (dword) mul16s::m#6 +Alias (signed word) mul16s::a#5 = (signed word) mul16s::a#6 +Alias (word~) mul16s::$17 = (word~) mul16s::$15 +Alias (word) rem16u#0 = (word) rem16u#40 (word) rem16u#36 (word) rem16u#35 (word) rem16u#30 (word) rem16u#25 +Alias (signed word) sin16s_gen2::ampl#0 = (signed word~) sin16s_gen2::$0 (signed word) sin16s_gen2::ampl#3 +Alias (signed word) sin16s_gen2::offs#0 = (signed word~) sin16s_gen2::$2 (signed word) sin16s_gen2::offs#4 +Alias (dword) div32u16u::return#2 = (dword) div32u16u::return#4 +Alias (signed word*) sin16s_gen2::sintab#5 = (signed word*) sin16s_gen2::sintab#6 +Alias (word) sin16s_gen2::wavelength#1 = (word) sin16s_gen2::wavelength#5 +Alias (word) rem16u#15 = (word) rem16u#6 +Alias (dword) sin16s_gen2::step#0 = (dword~) sin16s_gen2::$3 +Alias (signed word) sin16s::return#0 = (signed word) sin16s::return#3 +Alias (signed word) sin16s_gen2::ampl#1 = (signed word) sin16s_gen2::ampl#2 (signed word) sin16s_gen2::ampl#4 +Alias (signed word) sin16s_gen2::offs#1 = (signed word) sin16s_gen2::offs#2 (signed word) sin16s_gen2::offs#3 +Alias (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#3 (signed word*) sin16s_gen2::sintab#4 +Alias (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#4 (dword) sin16s_gen2::x#3 +Alias (dword) sin16s_gen2::step#1 = (dword) sin16s_gen2::step#2 (dword) sin16s_gen2::step#3 +Alias (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#3 (word) sin16s_gen2::i#4 +Alias (word) sin16s_gen2::wavelength#2 = (word) sin16s_gen2::wavelength#3 (word) sin16s_gen2::wavelength#4 +Alias (word) rem16u#16 = (word) rem16u#26 (word) rem16u#31 (word) rem16u#22 (word) rem16u#7 +Alias (signed word) mul16s::a#0 = (signed word~) sin16s_gen2::$4 +Alias (signed dword) mul16s::return#2 = (signed dword) mul16s::return#6 +Alias (dword) sin16s_gen2::x#1 = (dword~) sin16s_gen2::$9 +Alias (dword) sin16s::x#3 = (dword) sin16s::x#5 +Alias (dword) sin16s::x#1 = (dword~) sin16s::$17 +Alias (word) sin16s::x1#0 = (word~) sin16s::$5 (word) sin16s::x1#1 (word) sin16s::x1#4 (word) sin16s::x1#2 (word) sin16s::x1#3 +Alias (word) mulu16_sel::return#0 = (word) mulu16_sel::return#7 +Alias (byte) sin16s::isUpper#2 = (byte) sin16s::isUpper#6 (byte) sin16s::isUpper#7 (byte) sin16s::isUpper#5 (byte) sin16s::isUpper#4 (byte) sin16s::isUpper#3 +Alias (word) sin16s::x2#0 = (word~) sin16s::$6 +Alias (word) mulu16_sel::return#1 = (word) mulu16_sel::return#8 +Alias (word) sin16s::x3#0 = (word~) sin16s::$7 (word) sin16s::x3#1 +Alias (word) mulu16_sel::return#2 = (word) mulu16_sel::return#9 +Alias (word) sin16s::x3_6#0 = (word~) sin16s::$8 +Alias (word) sin16s::usinx#0 = (word~) sin16s::$9 (word) sin16s::usinx#4 (word) sin16s::usinx#2 +Alias (word) mulu16_sel::return#10 = (word) mulu16_sel::return#3 +Alias (word) sin16s::x4#0 = (word~) sin16s::$10 +Alias (word) mulu16_sel::return#11 = (word) mulu16_sel::return#4 +Alias (word) sin16s::x5#0 = (word~) sin16s::$11 +Alias (word) sin16s::x5_128#0 = (word~) sin16s::$12 +Alias (word) sin16s::usinx#1 = (word~) sin16s::$13 (word) sin16s::usinx#3 +Alias (signed word) sin16s::sinx#0 = (signed word~) sin16s::$14 +Alias (dword) sin16s::x#4 = (dword) sin16s::x#7 +Alias (byte) sin16s::isUpper#8 = (byte) sin16s::isUpper#9 +Alias (dword) sin16s::x#2 = (dword~) sin16s::$18 +Alias (signed word) sin16s::return#1 = (signed word) sin16s::sinx#2 (signed word) sin16s::return#4 (signed word) sin16s::return#2 +Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 +Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 +Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 +Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 +Alias (byte*) memset::end#0 = (byte*~) memset::$1 +Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 +Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 +Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 +Alias (byte*) bitmap_gfx#32 = (byte*) bitmap_gfx#33 +Alias (byte*) bitmap_screen#31 = (byte*) bitmap_screen#32 +Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#3 (byte*) bitmap_init::yoffs#0 +Alias (byte*) bitmap_gfx#23 = (byte*) bitmap_gfx#28 +Alias (byte*) bitmap_screen#22 = (byte*) bitmap_screen#27 +Alias (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#3 +Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#4 +Alias (byte*) bitmap_gfx#16 = (byte*) bitmap_gfx#17 +Alias (byte*) bitmap_screen#15 = (byte*) bitmap_screen#16 +Alias (byte*) bitmap_init::yoffs#1 = (byte*~) bitmap_init::$10 +Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#6 (byte*) bitmap_gfx#2 +Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#6 (byte*) bitmap_screen#2 +Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$1 +Alias (byte*) bitmap_gfx#12 = (byte*) bitmap_gfx#7 +Alias (byte*) bitmap_plot::plotter#0 = (byte*~) bitmap_plot::$0 +Alias (byte*) bitmap_gfx#0 = (byte*) bitmap_gfx#27 (byte*) bitmap_gfx#22 (byte*) bitmap_gfx#15 +Alias (byte*) bitmap_screen#0 = (byte*) bitmap_screen#26 (byte*) bitmap_screen#21 (byte*) bitmap_screen#14 +Alias (byte*) bitmap_gfx#13 = (byte*) bitmap_gfx#18 +Alias (byte*) bitmap_screen#12 = (byte*) bitmap_screen#17 +Alias (byte) frame_cnt#13 = (byte) frame_cnt#23 (byte) frame_cnt#24 (byte) frame_cnt#22 (byte) frame_cnt#21 (byte) frame_cnt#20 (byte) frame_cnt#18 (byte) frame_cnt#15 +Alias (word) rem16u#17 = (word) rem16u#8 (word) rem16u#47 (word) rem16u#45 (word) rem16u#43 (word) rem16u#41 (word) rem16u#37 (word) rem16u#32 +Alias (byte*) bitmap_gfx#24 = (byte*) bitmap_gfx#3 (byte*) bitmap_gfx#8 (byte*) bitmap_gfx#38 (byte*) bitmap_gfx#36 (byte*) bitmap_gfx#34 (byte*) bitmap_gfx#29 +Alias (byte*) bitmap_screen#23 = (byte*) bitmap_screen#3 (byte*) bitmap_screen#8 (byte*) bitmap_screen#37 (byte*) bitmap_screen#35 (byte*) bitmap_screen#33 (byte*) bitmap_screen#28 +Alias (byte*) main::toD0181_screen#0 = (byte*) main::toD0181_screen#1 +Alias (byte*) main::toD0181_gfx#0 = (byte*) main::toD0181_gfx#1 +Alias (byte) main::toD0181_return#0 = (byte~) main::toD0181_$8#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$6 +Alias (word) main::idx_x#3 = (word) main::idx_x#5 (word) main::idx_x#8 (word) main::idx_x#6 (word) main::idx_x#4 +Alias (signed word) main::r#10 = (signed word) main::r#2 (signed word) main::r#5 (signed word) main::r#3 (signed word) main::r#9 (signed word) main::r#8 +Alias (word) main::idx_y#3 = (word) main::idx_y#5 (word) main::idx_y#8 (word) main::idx_y#9 (word) main::idx_y#7 (word) main::idx_y#6 +Alias (byte) frame_cnt#10 = (byte) frame_cnt#11 (byte) frame_cnt#12 (byte) frame_cnt#7 (byte) frame_cnt#3 (byte) frame_cnt#19 +Alias (word) rem16u#27 = (word) rem16u#46 (word) rem16u#44 (word) rem16u#42 (word) rem16u#39 (word) rem16u#38 +Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#39 (byte*) bitmap_gfx#37 (byte*) bitmap_gfx#35 (byte*) bitmap_gfx#31 (byte*) bitmap_gfx#30 +Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#38 (byte*) bitmap_screen#36 (byte*) bitmap_screen#34 (byte*) bitmap_screen#30 (byte*) bitmap_screen#29 +Alias (signed dword) mul16s::return#3 = (signed dword) mul16s::return#7 +Alias (signed dword) main::xpos#0 = (signed dword~) main::$8 +Alias (word) main::x#0 = (word~) main::$13 (word) main::x#1 +Alias (signed dword) mul16s::return#4 = (signed dword) mul16s::return#8 +Alias (signed dword) main::ypos#0 = (signed dword~) main::$14 +Alias (word) main::y#0 = (word~) main::$19 +Alias (byte) bitmap_plot::y#0 = (byte~) main::$20 +Alias (signed word) main::r#6 = (signed word) main::r#7 +Alias (word) main::idx_x#10 = (word) main::idx_x#9 +Alias (word) rem16u#33 = (word) rem16u#34 +Alias (byte*) bitmap_gfx#25 = (byte*) bitmap_gfx#26 +Alias (byte*) bitmap_screen#24 = (byte*) bitmap_screen#25 +Alias (byte) frame_cnt#16 = (byte) frame_cnt#17 +Alias (word) rem16u#18 = (word) rem16u#28 (word) rem16u#24 (word) rem16u#9 +Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#20 (byte*) bitmap_gfx#9 (byte*) bitmap_gfx#4 +Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#19 (byte*) bitmap_screen#9 (byte*) bitmap_screen#4 +Alias (byte) frame_cnt#4 = (byte) frame_cnt#5 +Alias (byte) frame_cnt#2 = (byte) frame_cnt#6 (byte) frame_cnt#9 +Alias (byte) frame_cnt#0 = (byte) frame_cnt#8 +Alias (word) rem16u#10 = (word) rem16u#19 +Alias (byte*) bitmap_gfx#10 = (byte*) bitmap_gfx#5 +Alias (byte*) bitmap_screen#10 = (byte*) bitmap_screen#5 +Successful SSA optimization Pass2AliasElimination +Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#4 +Alias (word) divr16u::quotient#3 = (word) divr16u::quotient#6 +Alias (word) divr16u::divisor#2 = (word) divr16u::divisor#4 (word) divr16u::divisor#7 +Alias (byte) divr16u::i#2 = (byte) divr16u::i#3 (byte) divr16u::i#5 +Alias (word) divr16u::dividend#0 = (word) divr16u::dividend#6 +Alias (word) mul16u::a#3 = (word) mul16u::a#5 +Alias (dword) mul16u::mb#2 = (dword) mul16u::mb#3 +Alias (signed word) mul16s::b#3 = (signed word) mul16s::b#4 +Alias (signed word) mul16s::a#3 = (signed word) mul16s::a#5 +Alias (byte) sin16s::isUpper#2 = (byte) sin16s::isUpper#8 +Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#3 +Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#4 +Alias (byte*) bitmap_gfx#23 = (byte*) bitmap_gfx#32 +Alias (byte*) bitmap_screen#22 = (byte*) bitmap_screen#31 +Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#3 +Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#16 +Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#15 +Alias (word) main::idx_y#3 = (word) main::idx_y#4 +Alias (signed word) main::r#10 = (signed word) main::r#6 (signed word) main::r#4 +Alias (word) rem16u#27 = (word) rem16u#33 (word) rem16u#29 +Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#25 (byte*) bitmap_gfx#21 +Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#24 (byte*) bitmap_screen#20 +Alias (byte) frame_cnt#10 = (byte) frame_cnt#16 (byte) frame_cnt#14 +Alias (word) main::idx_x#10 = (word) main::idx_x#7 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (word) divr16u::divisor#2 +Self Phi Eliminated (signed word) sin16s_gen2::ampl#1 +Self Phi Eliminated (signed word) sin16s_gen2::offs#1 +Self Phi Eliminated (dword) sin16s_gen2::step#1 +Self Phi Eliminated (word) sin16s_gen2::wavelength#2 +Self Phi Eliminated (word) rem16u#16 +Self Phi Eliminated (byte) memset::c#2 +Self Phi Eliminated (byte*) memset::end#1 +Self Phi Eliminated (void*) memset::return#0 +Self Phi Eliminated (byte*) bitmap_init::gfx#2 +Self Phi Eliminated (byte*) bitmap_gfx#23 +Self Phi Eliminated (byte*) bitmap_screen#22 +Self Phi Eliminated (byte*) bitmap_gfx#11 +Self Phi Eliminated (byte*) bitmap_screen#11 +Self Phi Eliminated (word) rem16u#27 +Self Phi Eliminated (byte*) bitmap_gfx#19 +Self Phi Eliminated (byte*) bitmap_screen#18 +Self Phi Eliminated (byte) frame_cnt#10 +Self Phi Eliminated (word) rem16u#18 +Self Phi Eliminated (byte*) bitmap_gfx#14 +Self Phi Eliminated (byte*) bitmap_screen#13 +Successful SSA optimization Pass2SelfPhiElimination +Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6 +Identical Phi Values (dword) div32u16u::dividend#1 (dword) div32u16u::dividend#0 +Identical Phi Values (word) div32u16u::divisor#1 (word) div32u16u::divisor#0 +Identical Phi Values (word) rem16u#20 (word) rem16u#21 +Identical Phi Values (word) rem16u#12 (word) rem16u#1 +Identical Phi Values (word) rem16u#13 (word) rem16u#1 +Identical Phi Values (signed word) sin16s_gen2::max#1 (signed word) sin16s_gen2::max#0 +Identical Phi Values (signed word) sin16s_gen2::min#1 (signed word) sin16s_gen2::min#0 +Identical Phi Values (word) sin16s_gen2::wavelength#1 (word) sin16s_gen2::wavelength#0 +Identical Phi Values (word) rem16u#21 (word) rem16u#23 +Identical Phi Values (signed word*) sin16s_gen2::sintab#5 (signed word*) sin16s_gen2::sintab#1 +Identical Phi Values (word) rem16u#15 (word) rem16u#13 +Identical Phi Values (signed word) sin16s_gen2::ampl#1 (signed word) sin16s_gen2::ampl#0 +Identical Phi Values (signed word) sin16s_gen2::offs#1 (signed word) sin16s_gen2::offs#0 +Identical Phi Values (dword) sin16s_gen2::step#1 (dword) sin16s_gen2::step#0 +Identical Phi Values (word) sin16s_gen2::wavelength#2 (word) sin16s_gen2::wavelength#1 +Identical Phi Values (word) rem16u#16 (word) rem16u#15 +Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0 +Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 +Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 +Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 +Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 +Identical Phi Values (byte*) bitmap_gfx#23 (byte*) bitmap_gfx#1 +Identical Phi Values (byte*) bitmap_screen#22 (byte*) bitmap_screen#1 +Identical Phi Values (byte*) bitmap_gfx#11 (byte*) bitmap_gfx#23 +Identical Phi Values (byte*) bitmap_screen#11 (byte*) bitmap_screen#22 +Identical Phi Values (byte) bitmap_clear::fgcol#1 (byte) bitmap_clear::fgcol#0 +Identical Phi Values (byte) bitmap_clear::bgcol#1 (byte) bitmap_clear::bgcol#0 +Identical Phi Values (byte*) bitmap_screen#7 (byte*) bitmap_screen#23 +Identical Phi Values (byte*) bitmap_gfx#12 (byte*) bitmap_gfx#24 +Identical Phi Values (byte) bitmap_plot::y#1 (byte) bitmap_plot::y#0 +Identical Phi Values (word) bitmap_plot::x#1 (word) bitmap_plot::x#0 +Identical Phi Values (word) rem16u#23 (word) rem16u#0 +Identical Phi Values (byte*) bitmap_gfx#13 (byte*) bitmap_gfx#0 +Identical Phi Values (byte*) bitmap_screen#12 (byte*) bitmap_screen#0 +Identical Phi Values (byte) frame_cnt#13 (byte) frame_cnt#0 +Identical Phi Values (word) rem16u#17 (word) rem16u#16 +Identical Phi Values (byte*) bitmap_gfx#24 (byte*) bitmap_gfx#11 +Identical Phi Values (byte*) bitmap_screen#23 (byte*) bitmap_screen#11 +Identical Phi Values (word) rem16u#27 (word) rem16u#17 +Identical Phi Values (byte*) bitmap_gfx#19 (byte*) bitmap_gfx#24 +Identical Phi Values (byte*) bitmap_screen#18 (byte*) bitmap_screen#23 +Identical Phi Values (byte) frame_cnt#10 (byte) frame_cnt#13 +Identical Phi Values (word) rem16u#18 (word) rem16u#27 +Identical Phi Values (byte*) bitmap_gfx#14 (byte*) bitmap_gfx#19 +Identical Phi Values (byte*) bitmap_screen#13 (byte*) bitmap_screen#18 +Identical Phi Values (byte) frame_cnt#4 (byte) frame_cnt#0 +Identical Phi Values (word) rem16u#10 (word) rem16u#18 +Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 +Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [332] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Successful SSA optimization Pass2DuplicateRValueIdentification +Simple Condition (bool~) divr16u::$4 [32] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [40] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [47] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [92] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [97] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [123] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [127] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$10 [187] if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 +Simple Condition (bool~) sin16s::$1 [195] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [199] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [258] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$2 [293] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +Simple Condition (bool~) bitmap_init::$1 [315] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [319] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [335] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [339] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) main::$23 [465] if((word) main::idx_x#1<(word) $200) goto main::@4 +Simple Condition (bool~) main::$25 [470] if((word) main::idx_y#1<(word) $200) goto main::@5 +Simple Condition (bool~) main::$27 [477] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 +Simple Condition (bool~) irq::$0 [506] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [477] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@15 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Constant right-side identified [225] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [302] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [303] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [304] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [375] (byte[$100]) plots_per_frame#0 ← { fill( $100, 0) } +Constant right-side identified [376] (signed word[$200]) SINUS#0 ← { fill( $200, 0) } +Constant right-side identified [498] (void()*~) init_irq::$0 ← & interrupt(HARDWARE_CLOBBER)(void()) irq() +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 +Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 +Constant (const byte*) PROCPORT#0 = (byte*) 1 +Constant (const byte) PROCPORT_RAM_IO#0 = $35 +Constant (const byte*) RASTER#0 = (byte*) 53266 +Constant (const byte*) BORDERCOL#0 = (byte*) 53280 +Constant (const byte*) BGCOL#0 = (byte*) 53281 +Constant (const byte*) VIC_CONTROL#0 = (byte*) 53265 +Constant (const byte*) D011#0 = (byte*) 53265 +Constant (const byte) VIC_BMM#0 = $20 +Constant (const byte) VIC_DEN#0 = $10 +Constant (const byte) VIC_RSEL#0 = 8 +Constant (const byte*) D018#0 = (byte*) 53272 +Constant (const byte*) IRQ_STATUS#0 = (byte*) 53273 +Constant (const byte*) IRQ_ENABLE#0 = (byte*) 53274 +Constant (const byte) IRQ_RASTER#0 = 1 +Constant (const byte*) CIA1_INTERRUPT#0 = (byte*) 56333 +Constant (const byte) CIA_INTERRUPT_CLEAR#0 = $7f +Constant (const void()**) HARDWARE_IRQ#0 = (void()**) 65534 +Constant (const byte) BLACK#0 = 0 +Constant (const byte) WHITE#0 = 1 +Constant (const word) rem16u#0 = 0 +Constant (const word) divr16u::quotient#0 = 0 +Constant (const byte) divr16u::i#0 = 0 +Constant (const word) divr16u::rem#3 = 0 +Constant (const dword) mul16u::res#0 = 0 +Constant (const dword) PI2_u4f28#0 = $6487ed51 +Constant (const dword) PI_u4f28#0 = $3243f6a9 +Constant (const dword) PI_HALF_u4f28#0 = $1921fb54 +Constant (const dword) sin16s_gen2::x#0 = 0 +Constant (const word) sin16s_gen2::i#0 = 0 +Constant (const byte) sin16s::isUpper#0 = 0 +Constant (const byte) sin16s::isUpper#1 = 1 +Constant (const byte) mulu16_sel::select#0 = 0 +Constant (const byte) mulu16_sel::select#1 = 1 +Constant (const word) mulu16_sel::v2#2 = (unumber)$10000/6 +Constant (const byte) mulu16_sel::select#2 = 1 +Constant (const byte) mulu16_sel::select#3 = 0 +Constant (const byte) mulu16_sel::select#4 = 0 +Constant (const byte*) bitmap_screen#0 = (byte*) 0 +Constant (const byte*) bitmap_gfx#0 = (byte*) 0 +Constant (const byte[$100]) bitmap_plot_ylo#0 = { fill( $100, 0) } +Constant (const byte[$100]) bitmap_plot_yhi#0 = { fill( $100, 0) } +Constant (const byte[$100]) bitmap_plot_bit#0 = { fill( $100, 0) } +Constant (const byte) bitmap_init::bits#0 = $80 +Constant (const byte) bitmap_init::x#0 = 0 +Constant (const byte) bitmap_init::bits#2 = $80 +Constant (const byte) bitmap_init::y#0 = 0 +Constant (const word) memset::num#0 = $3e8 +Constant (const byte) memset::c#1 = 0 +Constant (const word) memset::num#1 = $1f40 +Constant (const byte*) BITMAP#0 = (byte*) 8192 +Constant (const byte*) SCREEN#0 = (byte*) 1024 +Constant (const byte[$100]) plots_per_frame#0 = { fill( $100, 0) } +Constant (const signed word[$200]) SINUS#0 = { fill( $200, 0) } +Constant (const word) sin16s_gen2::wavelength#0 = $200 +Constant (const signed word) sin16s_gen2::min#0 = -$1001 +Constant (const signed word) sin16s_gen2::max#0 = $1001 +Constant (const word) main::idx_x#0 = 0 +Constant (const word) main::idx_y#0 = $80 +Constant (const signed word) main::r#0 = 0 +Constant (const byte) main::r_add#0 = 4 +Constant (const word) main::idx_x#2 = 0 +Constant (const word) main::idx_y#2 = 0 +Constant (const void()*) init_irq::$0 = &irq +Successful SSA optimization Pass2ConstantIdentification +Constant (const dword) div32u16u::dividend#0 = PI2_u4f28#0 +Constant (const word) div32u16u::divisor#0 = sin16s_gen2::wavelength#0 +Constant (const signed word*) sin16s_gen2::sintab#1 = SINUS#0 +Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0 +Constant (const byte*) bitmap_init::screen#0 = SCREEN#0 +Constant (const byte) bitmap_clear::bgcol#0 = BLACK#0 +Constant (const byte) bitmap_clear::fgcol#0 = WHITE#0 +Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 +Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0 +Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 +Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0 +Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0 +Successful SSA optimization Pass2ConstantIdentification +Constant value identified (void*)bitmap_screen#1 in [351] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [357] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::toD0181_screen#0 in [402] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [406] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 +Successful SSA optimization Pass2ConstantValues +if() condition always true - replacing block destination [424] if(true) goto main::@2 +if() condition always true - replacing block destination [481] if(true) goto main::@16 +Successful SSA optimization Pass2ConstantIfs +Resolved ranged next value [45] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [47] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [317] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [319] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [337] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [339] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +De-inlining pointer[w] to *(pointer+w) [427] (signed word) main::cos_x#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$28) +De-inlining pointer[w] to *(pointer+w) [442] (signed word) main::sin_y#0 ← *((const signed word[$200]) SINUS#0 + (word~) main::$29) +Successful SSA optimization Pass2DeInlineWordDerefIdx +Simplifying expression containing zero bitmap_clear::$0 in [349] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused variable (void*) memset::return#2 and assignment [168] (void*) memset::return#2 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#3 and assignment [171] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused constant (const byte) bitmap_clear::bgcol#0 +Eliminating unused constant (const word) rem16u#0 +Eliminating unused constant (const byte*) bitmap_screen#0 +Eliminating unused constant (const byte*) bitmap_gfx#0 +Successful SSA optimization PassNEliminateUnusedVars +Removing unused block main::@return +Successful SSA optimization Pass2EliminateUnusedBlocks +Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 +Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1 +Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 +Successful SSA optimization Pass2InlineCast +Simplifying constant integer cast $10 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 +Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 +Successful SSA optimization Pass2AliasElimination +Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 +Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 +Constant right-side identified [59] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 +Constant right-side identified [163] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [181] (byte~) main::$3 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 +Constant (const word) divr16u::dividend#2 = > (signed byte) 1 +Constant right-side identified [171] (byte~) main::$4 ← (const byte) main::$3 | (const byte) VIC_RSEL#0 +Constant right-side identified [174] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [177] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1 +Constant (const byte) main::$4 = main::$3|VIC_RSEL#0 +Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff +Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [57] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1 +Constant right-side identified [170] (byte~) main::$5 ← (const byte) main::$4 | (byte) 3 +Constant right-side identified [172] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [174] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1 +Constant (const byte) main::$5 = main::$4|3 +Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 +Constant (const byte) main::toD0181_$6#0 = main::toD0181_$5#0/4 +Successful SSA optimization Pass2ConstantIdentification +Simplifying constant evaluating to zero (const signed word) sin16s_gen2::min#0+(const signed word) sin16s_gen2::$1 in +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero sin16s_gen2::$7 in [71] (signed word~) sin16s_gen2::$8 ← (const signed word) sin16s_gen2::offs#0 + (signed word~) sin16s_gen2::$7 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused constant (const signed word) sin16s_gen2::$1 +Eliminating unused constant (const signed word) sin16s_gen2::offs#0 +Successful SSA optimization PassNEliminateUnusedVars +Alias (signed word~) sin16s_gen2::$8 = (signed word~) sin16s_gen2::$7 +Successful SSA optimization Pass2AliasElimination +Constant right-side identified [170] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [171] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 +Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f +Successful SSA optimization Pass2ConstantIdentification +Constant right-side identified [169] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 +Successful SSA optimization Pass2ConstantIdentification +Inlining Noop Cast [38] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#3 keeping mul16s::a#3 +Inlining Noop Cast [39] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#3 keeping mul16s::b#3 +Inlining Noop Cast [47] (word~) mul16s::$10 ← (word)(signed word) mul16s::b#3 keeping mul16s::b#3 +Inlining Noop Cast [53] (word~) mul16s::$14 ← (word)(signed word) mul16s::a#3 keeping mul16s::a#3 +Inlining Noop Cast [69] (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$6 keeping sin16s_gen2::$6 +Inlining Noop Cast [110] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 +Inlining Noop Cast [114] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 +Inlining Noop Cast [127] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [129] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [159] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::$3 +Inlining Noop Cast [181] (signed word~) main::$10 ← (signed word)(word~) main::$9 keeping main::$9 +Inlining Noop Cast [184] (word) main::x#0 ← (word)(signed word~) main::$12 keeping main::$12 +Inlining Noop Cast [194] (signed word~) main::$16 ← (signed word)(word~) main::$15 keeping main::$15 +Inlining Noop Cast [197] (word) main::y#0 ← (word)(signed word~) main::$18 keeping main::$18 +Successful SSA optimization Pass2NopCastInlining +Rewriting multiplication to use shift [172] (word~) main::$28 ← (word) main::idx_x#3 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [185] (word~) main::$29 ← (word) main::idx_y#3 * (const byte) SIZEOF_SIGNED_WORD +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings (const word) divr16u::quotient#0 +Inlining constant with var siblings (const byte) divr16u::i#0 +Inlining constant with var siblings (const word) divr16u::rem#3 +Inlining constant with var siblings (const word) divr16u::divisor#0 +Inlining constant with var siblings (const word) divr16u::divisor#1 +Inlining constant with var siblings (const word) divr16u::dividend#1 +Inlining constant with var siblings (const word) divr16u::dividend#2 +Inlining constant with var siblings (const dword) mul16u::res#0 +Inlining constant with var siblings (const signed word) mul16s::b#0 +Inlining constant with var siblings (const dword) sin16s_gen2::x#0 +Inlining constant with var siblings (const word) sin16s_gen2::i#0 +Inlining constant with var siblings (const signed word*) sin16s_gen2::sintab#1 +Inlining constant with var siblings (const byte) sin16s::isUpper#0 +Inlining constant with var siblings (const byte) sin16s::isUpper#1 +Inlining constant with var siblings (const byte) mulu16_sel::select#0 +Inlining constant with var siblings (const byte) mulu16_sel::select#1 +Inlining constant with var siblings (const word) mulu16_sel::v2#2 +Inlining constant with var siblings (const byte) mulu16_sel::select#2 +Inlining constant with var siblings (const byte) mulu16_sel::select#3 +Inlining constant with var siblings (const byte) mulu16_sel::select#4 +Inlining constant with var siblings (const word) memset::num#0 +Inlining constant with var siblings (const byte) memset::c#1 +Inlining constant with var siblings (const word) memset::num#1 +Inlining constant with var siblings (const void*) memset::str#0 +Inlining constant with var siblings (const void*) memset::str#1 +Inlining constant with var siblings (const byte) memset::c#0 +Inlining constant with var siblings (const byte) bitmap_init::bits#0 +Inlining constant with var siblings (const byte) bitmap_init::x#0 +Inlining constant with var siblings (const byte) bitmap_init::bits#2 +Inlining constant with var siblings (const byte) bitmap_init::y#0 +Inlining constant with var siblings (const word) main::idx_x#0 +Inlining constant with var siblings (const word) main::idx_y#0 +Inlining constant with var siblings (const signed word) main::r#0 +Inlining constant with var siblings (const word) main::idx_x#2 +Inlining constant with var siblings (const word) main::idx_y#2 +Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0 +Constant inlined divr16u::rem#3 = (byte) 0 +Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0 +Constant inlined sin16s_gen2::i#0 = (byte) 0 +Constant inlined sin16s::isUpper#0 = (byte) 0 +Constant inlined memset::num#1 = (word) $1f40 +Constant inlined memset::num#0 = (word) $3e8 +Constant inlined mulu16_sel::select#4 = (byte) 0 +Constant inlined mulu16_sel::select#2 = (byte) 1 +Constant inlined mulu16_sel::select#3 = (byte) 0 +Constant inlined mulu16_sel::select#0 = (byte) 0 +Constant inlined sin16s::isUpper#1 = (byte) 1 +Constant inlined mulu16_sel::select#1 = (byte) 1 +Constant inlined init_irq::$0 = &interrupt(HARDWARE_CLOBBER)(void()) irq() +Constant inlined main::idx_y#2 = (byte) 0 +Constant inlined main::idx_y#0 = (byte) $80 +Constant inlined mul16s::b#0 = (const signed word) sin16s_gen2::ampl#0 +Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0 +Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff +Constant inlined main::toD0181_$7#0 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f +Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$5#0 = >(word)(const byte*) BITMAP#0 +Constant inlined sin16s_gen2::sintab#1 = (const signed word[$200]) SINUS#0 +Constant inlined memset::c#0 = (const byte) bitmap_clear::col#0 +Constant inlined bitmap_init::x#0 = (byte) 0 +Constant inlined memset::c#1 = (byte) 0 +Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 +Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0 +Constant inlined divr16u::i#0 = (byte) 0 +Constant inlined div32u16u::dividend#0 = (const dword) PI2_u4f28#0 +Constant inlined bitmap_init::bits#0 = (byte) $80 +Constant inlined bitmap_init::bits#2 = (byte) $80 +Constant inlined divr16u::quotient#0 = (byte) 0 +Constant inlined sin16s_gen2::x#0 = (byte) 0 +Constant inlined mul16u::res#0 = (byte) 0 +Constant inlined main::idx_x#2 = (byte) 0 +Constant inlined divr16u::divisor#1 = (const word) sin16s_gen2::wavelength#0 +Constant inlined divr16u::divisor#0 = (const word) sin16s_gen2::wavelength#0 +Constant inlined main::idx_x#0 = (byte) 0 +Constant inlined main::r#0 = (signed byte) 0 +Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0 +Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0 +Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0 +Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE#0 +Constant inlined divr16u::dividend#1 = >(const dword) PI2_u4f28#0 +Constant inlined divr16u::dividend#2 = <(const dword) PI2_u4f28#0 +Constant inlined main::toD0181_$6#0 = >(word)(const byte*) BITMAP#0/(byte) 4 +Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0 +Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 +Constant inlined main::toD0181_$4#0 = (word)(const byte*) BITMAP#0 +Constant inlined mulu16_sel::v2#2 = (word)(number) $10000/(number) 6 +Constant inlined main::$5 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 +Constant inlined bitmap_init::y#0 = (byte) 0 +Constant inlined main::$3 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0 +Constant inlined div32u16u::divisor#0 = (const word) sin16s_gen2::wavelength#0 +Constant inlined main::$4 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0 +Successful SSA optimization Pass2ConstantInlining +Identical Phi Values (word) divr16u::divisor#6 (const word) sin16s_gen2::wavelength#0 +Successful SSA optimization Pass2IdenticalPhiElimination +Inlining Noop Cast [185] (word) bitmap_plot::x#0 ← (word)(signed word~) main::$12 keeping bitmap_plot::x#0 +Successful SSA optimization Pass2NopCastInlining +Added new block during phi lifting divr16u::@8(between divr16u::@3 and divr16u::@1) +Added new block during phi lifting divr16u::@9(between divr16u::@1 and divr16u::@2) +Added new block during phi lifting divr16u::@10(between divr16u::@2 and divr16u::@3) +Added new block during phi lifting mul16u::@10(between mul16u::@2 and mul16u::@4) +Added new block during phi lifting mul16s::@7(between mul16s::@6 and mul16s::@1) +Added new block during phi lifting mul16s::@8(between mul16s::@1 and mul16s::@2) +Added new block during phi lifting sin16s_gen2::@6(between sin16s_gen2::@5 and sin16s_gen2::@1) +Added new block during phi lifting sin16s::@13(between sin16s and sin16s::@1) +Fixing phi predecessor for sin16s::isUpper#2 to new block ( sin16s -> sin16s::@13 ) during phi lifting. +Added new block during phi lifting sin16s::@14(between sin16s::@1 and sin16s::@2) +Added new block during phi lifting sin16s::@15(between sin16s::@12 and sin16s::@3) +Added new block during phi lifting memset::@4(between memset::@1 and memset::@1) +Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and bitmap_init::@1) +Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) +Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) +Added new block during phi lifting bitmap_init::@12(between bitmap_init::@5 and bitmap_init::@6) +Added new block during phi lifting main::@29(between main::@5 and main::@1) +Added new block during phi lifting main::@30(between main::@28 and main::@4) +Added new block during phi lifting main::@31(between main::@4 and main::@5) +Added new block during phi lifting irq::@3(between irq and irq::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @6 +Adding NOP phi() at start of @17 +Adding NOP phi() at start of @28 +Adding NOP phi() at start of @31 +Adding NOP phi() at start of @34 +Adding NOP phi() at start of @35 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@22 +Adding NOP phi() at start of main::@23 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::toD0181_@return +Adding NOP phi() at start of main::@25 +Adding NOP phi() at start of main::@10 +Adding NOP phi() at start of main::@11 +Adding NOP phi() at start of main::@15 +Adding NOP phi() at start of mul16u::@3 +Adding NOP phi() at start of bitmap_clear +Adding NOP phi() at start of bitmap_clear::@1 +Adding NOP phi() at start of bitmap_clear::@2 +Adding NOP phi() at start of memset::@2 +Adding NOP phi() at start of bitmap_init +Adding NOP phi() at start of bitmap_init::@3 +Adding NOP phi() at start of bitmap_init::@4 +Adding NOP phi() at start of sin16s_gen2 +Adding NOP phi() at start of div32u16u +CALL GRAPH +Calls in [] to main:7 +Calls in [main] to sin16s_gen2:11 bitmap_init:13 bitmap_clear:15 init_irq:20 mul16s:30 mul16s:43 bitmap_plot:50 +Calls in [mul16s] to mul16u:78 +Calls in [bitmap_clear] to memset:126 memset:128 +Calls in [sin16s_gen2] to div32u16u:172 sin16s:177 mul16s:181 +Calls in [sin16s] to mulu16_sel:208 mulu16_sel:215 mulu16_sel:220 mulu16_sel:228 mulu16_sel:235 +Calls in [mulu16_sel] to mul16u:253 +Calls in [div32u16u] to divr16u:260 divr16u:265 + +Created 45 initial phi equivalence classes +Coalesced [28] mul16s::a#8 ← mul16s::a#1 +Coalesced [29] mul16s::b#7 ← mul16s::b#1 +Coalesced [41] mul16s::a#9 ← mul16s::a#2 +Coalesced [42] mul16s::b#8 ← mul16s::b#2 +Coalesced [62] main::idx_x#11 ← main::idx_x#10 +Coalesced [63] main::r#11 ← main::r#1 +Coalesced [64] main::idx_y#11 ← main::idx_y#10 +Coalesced [67] main::idx_y#12 ← main::idx_y#1 +Coalesced [68] main::idx_x#12 ← main::idx_x#1 +Coalesced [85] mul16s::m#7 ← mul16s::m#1 +Coalesced [91] mul16s::m#10 ← mul16s::m#2 +Coalesced [95] mul16s::m#9 ← mul16s::m#5 +Coalesced [96] mul16s::m#8 ← mul16s::m#0 +Coalesced [98] mul16u::a#10 ← mul16u::a#6 +Coalesced [99] mul16u::mb#8 ← mul16u::mb#0 +Coalesced [107] mul16u::res#9 ← mul16u::res#1 +Coalesced [111] mul16u::a#11 ← mul16u::a#0 +Coalesced [112] mul16u::res#7 ← mul16u::res#6 +Coalesced [113] mul16u::mb#9 ← mul16u::mb#1 +Coalesced (already) [114] mul16u::res#8 ← mul16u::res#2 +Coalesced [140] memset::dst#4 ← memset::dst#1 +Coalesced [160] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [165] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [166] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [167] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [168] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [169] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [170] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [180] mul16s::a#10 ← mul16s::a#0 +Coalesced [191] sin16s_gen2::x#5 ← sin16s_gen2::x#1 +Coalesced [192] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 +Coalesced [193] sin16s_gen2::i#5 ← sin16s_gen2::i#1 +Coalesced [196] sin16s::x#9 ← sin16s::x#1 +Coalesced [200] sin16s::x#11 ← sin16s::x#2 +Coalesced [206] mulu16_sel::v1#8 ← mulu16_sel::v1#0 +Coalesced [207] mulu16_sel::v2#8 ← mulu16_sel::v2#0 +Coalesced [213] mulu16_sel::v1#9 ← mulu16_sel::v1#1 +Coalesced [214] mulu16_sel::v2#9 ← mulu16_sel::v2#1 +Coalesced [219] mulu16_sel::v1#10 ← mulu16_sel::v1#2 +Coalesced [226] mulu16_sel::v1#6 ← mulu16_sel::v1#3 +Coalesced [227] mulu16_sel::v2#6 ← mulu16_sel::v2#3 +Coalesced [233] mulu16_sel::v1#7 ← mulu16_sel::v1#4 +Coalesced [234] mulu16_sel::v2#7 ← mulu16_sel::v2#4 +Coalesced [242] sin16s::return#6 ← sin16s::sinx#1 +Coalesced [246] sin16s::x#10 ← sin16s::x#4 +Coalesced [247] sin16s::x#8 ← sin16s::x#0 +Coalesced [251] mul16u::mb#7 ← mul16u::b#1 +Coalesced [252] mul16u::a#9 ← mul16u::a#2 +Coalesced [264] divr16u::rem#12 ← divr16u::rem#4 +Coalesced [271] divr16u::rem#13 ← divr16u::rem#10 +Coalesced [272] divr16u::dividend#9 ← divr16u::dividend#5 +Coalesced [279] divr16u::rem#16 ← divr16u::rem#1 +Coalesced [286] divr16u::rem#18 ← divr16u::rem#2 +Coalesced [287] divr16u::return#8 ← divr16u::quotient#2 +Coalesced [293] divr16u::rem#14 ← divr16u::rem#11 +Coalesced [294] divr16u::dividend#10 ← divr16u::dividend#0 +Coalesced [295] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [296] divr16u::i#7 ← divr16u::i#1 +Coalesced [297] divr16u::rem#17 ← divr16u::rem#6 +Coalesced [298] divr16u::return#7 ← divr16u::quotient#1 +Coalesced [299] divr16u::rem#15 ← divr16u::rem#0 +Coalesced [303] frame_cnt#26 ← frame_cnt#1 +Coalesced [308] frame_cnt#25 ← frame_cnt#0 +Coalesced down to 31 phi equivalence classes +Culled Empty Block (label) @6 +Culled Empty Block (label) @17 +Culled Empty Block (label) @28 +Culled Empty Block (label) @31 +Culled Empty Block (label) @35 +Culled Empty Block (label) main::toD0181_@return +Culled Empty Block (label) main::@25 +Culled Empty Block (label) main::@10 +Culled Empty Block (label) main::@11 +Culled Empty Block (label) main::@29 +Culled Empty Block (label) main::@15 +Culled Empty Block (label) mul16s::@8 +Culled Empty Block (label) mul16s::@7 +Culled Empty Block (label) mul16u::@3 +Culled Empty Block (label) mul16u::@10 +Culled Empty Block (label) bitmap_clear::@2 +Culled Empty Block (label) memset::@2 +Culled Empty Block (label) memset::@4 +Culled Empty Block (label) bitmap_init::@3 +Culled Empty Block (label) bitmap_init::@4 +Culled Empty Block (label) bitmap_init::@11 +Culled Empty Block (label) bitmap_init::@12 +Culled Empty Block (label) bitmap_init::@9 +Culled Empty Block (label) sin16s_gen2::@6 +Culled Empty Block (label) sin16s::@14 +Culled Empty Block (label) sin16s::@13 +Culled Empty Block (label) divr16u::@8 +Culled Empty Block (label) divr16u::@10 +Culled Empty Block (label) divr16u::@9 +Culled Empty Block (label) irq::@3 +Renumbering block @32 to @1 +Renumbering block @34 to @2 +Renumbering block div32u16u::@2 to div32u16u::@1 +Renumbering block div32u16u::@3 to div32u16u::@2 +Renumbering block mul16u::@4 to mul16u::@3 +Renumbering block mul16u::@7 to mul16u::@4 +Renumbering block mul16s::@6 to mul16s::@5 +Renumbering block sin16s_gen2::@3 to sin16s_gen2::@2 +Renumbering block sin16s_gen2::@4 to sin16s_gen2::@3 +Renumbering block sin16s_gen2::@5 to sin16s_gen2::@4 +Renumbering block sin16s::@8 to sin16s::@7 +Renumbering block sin16s::@9 to sin16s::@8 +Renumbering block sin16s::@10 to sin16s::@9 +Renumbering block sin16s::@11 to sin16s::@10 +Renumbering block sin16s::@12 to sin16s::@11 +Renumbering block sin16s::@15 to sin16s::@12 +Renumbering block mulu16_sel::@2 to mulu16_sel::@1 +Renumbering block bitmap_init::@5 to bitmap_init::@3 +Renumbering block bitmap_init::@6 to bitmap_init::@4 +Renumbering block bitmap_init::@7 to bitmap_init::@5 +Renumbering block bitmap_init::@10 to bitmap_init::@6 +Renumbering block main::@4 to main::@3 +Renumbering block main::@5 to main::@4 +Renumbering block main::@16 to main::@5 +Renumbering block main::@21 to main::@6 +Renumbering block main::@22 to main::@7 +Renumbering block main::@23 to main::@8 +Renumbering block main::@24 to main::@9 +Renumbering block main::@26 to main::@10 +Renumbering block main::@27 to main::@11 +Renumbering block main::@28 to main::@12 +Renumbering block main::@30 to main::@13 +Renumbering block main::@31 to main::@14 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +Adding NOP phi() at start of main::@7 +Adding NOP phi() at start of main::@8 +Adding NOP phi() at start of main::toD0181 +Adding NOP phi() at start of main::@13 +Adding NOP phi() at start of main::@14 +Adding NOP phi() at start of bitmap_clear +Adding NOP phi() at start of bitmap_clear::@1 +Adding NOP phi() at start of bitmap_init +Adding NOP phi() at start of bitmap_init::@6 +Adding NOP phi() at start of sin16s_gen2 +Adding NOP phi() at start of div32u16u + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] (byte) frame_cnt#0 ← (byte) 1 + to:@2 +@2: scope:[] from @1 + [2] phi() + [3] call main + to:@end +@end: scope:[] from @2 + [4] phi() +main: scope:[main] from @2 + [5] phi() + [6] call sin16s_gen2 + to:main::@7 +main::@7: scope:[main] from main + [7] phi() + [8] call bitmap_init + to:main::@8 +main::@8: scope:[main] from main::@7 + [9] phi() + [10] call bitmap_clear + to:main::@9 +main::@9: scope:[main] from main::@8 + [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 + to:main::toD0181 +main::toD0181: scope:[main] from main::@9 + [12] phi() + to:main::@6 +main::@6: scope:[main] from main::toD0181 + [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 + [14] call init_irq + to:main::@1 +main::@1: scope:[main] from main::@4 main::@6 + [15] (word) main::idx_y#3 ← phi( main::@6/(byte) $80 main::@4/(word) main::idx_y#10 ) + [15] (signed word) main::r#10 ← phi( main::@6/(signed byte) 0 main::@4/(signed word) main::r#1 ) + [15] (word) main::idx_x#3 ← phi( main::@6/(byte) 0 main::@4/(word) main::idx_x#10 ) + to:main::@2 +main::@2: scope:[main] from main::@1 + [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 + [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 + [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) + [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 + [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + [21] call mul16s + [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 + to:main::@10 +main::@10: scope:[main] from main::@2 + [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 + [24] (word~) main::$9 ← > (signed dword) main::xpos#0 + [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 + [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 + [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 + [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 + [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) + [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 + [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + [32] call mul16s + [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 + to:main::@11 +main::@11: scope:[main] from main::@10 + [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 + [35] (word~) main::$15 ← > (signed dword) main::ypos#0 + [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 + [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 + [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 + [39] call bitmap_plot + to:main::@12 +main::@12: scope:[main] from main::@11 + [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) + [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 + [42] if((word) main::idx_x#1<(word) $200) goto main::@13 + to:main::@3 +main::@13: scope:[main] from main::@12 + [43] phi() + to:main::@3 +main::@3: scope:[main] from main::@12 main::@13 + [44] (word) main::idx_x#10 ← phi( main::@12/(byte) 0 main::@13/(word) main::idx_x#1 ) + [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 + [46] if((word) main::idx_y#1<(word) $200) goto main::@14 + to:main::@4 +main::@14: scope:[main] from main::@3 + [47] phi() + to:main::@4 +main::@4: scope:[main] from main::@14 main::@3 + [48] (word) main::idx_y#10 ← phi( main::@3/(byte) 0 main::@14/(word) main::idx_y#1 ) + [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 + [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 + to:main::@1 +main::@5: scope:[main] from main::@4 main::@5 + [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) + to:main::@5 +bitmap_plot: scope:[bitmap_plot] from main::@11 + [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) + [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 + [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 + [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 + [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) + to:bitmap_plot::@return +bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot + [57] return + to:@return +mul16s: scope:[mul16s] from main::@10 main::@2 sin16s_gen2::@3 + [58] (signed word) mul16s::b#3 ← phi( main::@2/(signed word) mul16s::b#1 main::@10/(signed word) mul16s::b#2 sin16s_gen2::@3/(const signed word) sin16s_gen2::ampl#0 ) + [58] (signed word) mul16s::a#3 ← phi( main::@2/(signed word) mul16s::a#1 main::@10/(signed word) mul16s::a#2 sin16s_gen2::@3/(signed word) mul16s::a#0 ) + [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 + [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 + [61] call mul16u + [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + to:mul16s::@5 +mul16s::@5: scope:[mul16s] from mul16s + [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 + to:mul16s::@3 +mul16s::@3: scope:[mul16s] from mul16s::@5 + [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 + [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 + [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 + to:mul16s::@1 +mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@5 + [68] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 ) + [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 + to:mul16s::@4 +mul16s::@4: scope:[mul16s] from mul16s::@1 + [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 + [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 + [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 + to:mul16s::@2 +mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4 + [73] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 ) + [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + to:mul16s::@return +mul16s::@return: scope:[mul16s] from mul16s::@2 + [75] return + to:@return +mul16u: scope:[mul16u] from mul16s mulu16_sel + [76] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) + [76] (dword) mul16u::mb#0 ← phi( mul16s/(dword~) mul16u::mb#6 mulu16_sel/(word) mul16u::b#1 ) + to:mul16u::@1 +mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 + [77] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) + [77] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) + [77] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) + [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 + to:mul16u::@return +mul16u::@return: scope:[mul16u] from mul16u::@1 + [79] return + to:@return +mul16u::@2: scope:[mul16u] from mul16u::@1 + [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 + [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 + to:mul16u::@4 +mul16u::@4: scope:[mul16u] from mul16u::@2 + [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 + to:mul16u::@3 +mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 + [83] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) + [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 + [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 + to:mul16u::@1 +init_irq: scope:[init_irq] from main::@6 + asm { sei } + [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 + [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 + [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 + [91] *((const byte*) RASTER#0) ← (byte) 0 + [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 + [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() + asm { cli } + to:init_irq::@return +init_irq::@return: scope:[init_irq] from init_irq + [95] return + to:@return +bitmap_clear: scope:[bitmap_clear] from main::@8 + [96] phi() + [97] call memset + to:bitmap_clear::@1 +bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear + [98] phi() + [99] call memset + to:bitmap_clear::@return +bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 + [100] return + to:@return +memset: scope:[memset] from bitmap_clear bitmap_clear::@1 + [101] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [101] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) + [101] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) + [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 + [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + [104] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) + [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 + [108] return + to:@return +bitmap_init: scope:[bitmap_init] from main::@7 + [109] phi() + to:bitmap_init::@1 +bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 + [110] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [110] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + to:bitmap_init::@2 +bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 + [114] phi() + to:bitmap_init::@2 +bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 + [115] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + to:bitmap_init::@3 +bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 + [118] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [118] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 + [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 + [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 + [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 + [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 + [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 + [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 + to:bitmap_init::@5 +bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 + [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + to:bitmap_init::@4 +bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 + [127] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + to:bitmap_init::@return +bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 + [130] return + to:@return +sin16s_gen2: scope:[sin16s_gen2] from main + [131] phi() + [132] call div32u16u + [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + to:sin16s_gen2::@2 +sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 + [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + to:sin16s_gen2::@1 +sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 + [135] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [135] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) SINUS#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [135] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [137] call sin16s + [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + to:sin16s_gen2::@3 +sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 + [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [140] call mul16s + [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + to:sin16s_gen2::@4 +sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 + [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 + [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 + to:sin16s_gen2::@return +sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 + [149] return + to:@return +sin16s: scope:[sin16s] from sin16s_gen2::@1 + [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + to:sin16s::@4 +sin16s::@4: scope:[sin16s] from sin16s + [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + to:sin16s::@1 +sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 + [152] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [152] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + to:sin16s::@5 +sin16s::@5: scope:[sin16s] from sin16s::@1 + [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + to:sin16s::@2 +sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 + [155] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [160] call mulu16_sel + [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + to:sin16s::@7 +sin16s::@7: scope:[sin16s] from sin16s::@2 + [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [165] call mulu16_sel + [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + to:sin16s::@8 +sin16s::@8: scope:[sin16s] from sin16s::@7 + [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [169] call mulu16_sel + [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + to:sin16s::@9 +sin16s::@9: scope:[sin16s] from sin16s::@8 + [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [175] call mulu16_sel + [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + to:sin16s::@10 +sin16s::@10: scope:[sin16s] from sin16s::@9 + [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [180] call mulu16_sel + [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + to:sin16s::@11 +sin16s::@11: scope:[sin16s] from sin16s::@10 + [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + to:sin16s::@6 +sin16s::@6: scope:[sin16s] from sin16s::@11 + [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + to:sin16s::@3 +sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 + [187] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + to:sin16s::@return +sin16s::@return: scope:[sin16s] from sin16s::@3 + [188] return + to:@return +sin16s::@12: scope:[sin16s] from sin16s::@11 + [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + to:sin16s::@3 +mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 + [190] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [190] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [190] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [193] call mul16u + [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + to:mulu16_sel::@1 +mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel + [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + to:mulu16_sel::@return +mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 + [198] return + to:@return +div32u16u: scope:[div32u16u] from sin16s_gen2 + [199] phi() + [200] call divr16u + [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + to:div32u16u::@1 +div32u16u::@1: scope:[div32u16u] from div32u16u + [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [203] (word) divr16u::rem#4 ← (word) rem16u#1 + [204] call divr16u + [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + to:div32u16u::@2 +div32u16u::@2: scope:[div32u16u] from div32u16u::@1 + [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + to:div32u16u::@return +div32u16u::@return: scope:[div32u16u] from div32u16u::@2 + [208] return + to:@return +divr16u: scope:[divr16u] from div32u16u div32u16u::@1 + [209] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [209] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + to:divr16u::@1 +divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 + [210] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [210] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [210] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [210] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + to:divr16u::@4 +divr16u::@4: scope:[divr16u] from divr16u::@1 + [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + to:divr16u::@2 +divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 + [216] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 + to:divr16u::@5 +divr16u::@5: scope:[divr16u] from divr16u::@2 + [220] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 + to:divr16u::@3 +divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 + [222] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [222] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + to:divr16u::@6 +divr16u::@6: scope:[divr16u] from divr16u::@3 + [225] (word) rem16u#1 ← (word) divr16u::rem#11 + to:divr16u::@return +divr16u::@return: scope:[divr16u] from divr16u::@6 + [226] return + to:@return +irq: scope:[irq] from + [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 + to:irq::@2 +irq::@2: scope:[irq] from irq + [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 + to:irq::@1 +irq::@1: scope:[irq] from irq irq::@2 + [230] (byte) frame_cnt#2 ← phi( irq/(byte) frame_cnt#0 irq::@2/(byte) frame_cnt#1 ) + [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 + [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + to:irq::@return +irq::@return: scope:[irq] from irq::@1 + [233] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(byte*) BGCOL +(byte*) BITMAP +(byte) BLACK +(byte*) BORDERCOL +(byte*) CIA1_INTERRUPT +(byte) CIA_INTERRUPT_CLEAR +(byte*) D011 +(byte*) D018 +(void()**) HARDWARE_IRQ +(byte*) IRQ_ENABLE +(byte) IRQ_RASTER +(byte*) IRQ_STATUS +(dword) PI2_u4f28 +(dword) PI_HALF_u4f28 +(dword) PI_u4f28 +(byte*) PROCPORT +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_RAM_IO +(byte*) RASTER +(byte*) SCREEN +(signed word[$200]) SINUS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte) VIC_DEN +(byte) VIC_RSEL +(byte) WHITE +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) +(byte) bitmap_clear::bgcol +(byte) bitmap_clear::col +(byte) bitmap_clear::fgcol +(byte*) bitmap_gfx +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) +(byte~) bitmap_init::$4 22.0 +(byte~) bitmap_init::$5 22.0 +(byte~) bitmap_init::$6 22.0 +(byte~) bitmap_init::$7 5.5 +(byte) bitmap_init::bits +(byte) bitmap_init::bits#1 11.0 +(byte) bitmap_init::bits#3 16.5 +(byte) bitmap_init::bits#4 7.333333333333333 +(byte*) bitmap_init::gfx +(byte*) bitmap_init::screen +(byte) bitmap_init::x +(byte) bitmap_init::x#1 16.5 +(byte) bitmap_init::x#2 5.5 +(byte) bitmap_init::y +(byte) bitmap_init::y#1 16.5 +(byte) bitmap_init::y#2 5.5 +(byte*) bitmap_init::yoffs +(byte*) bitmap_init::yoffs#1 22.0 +(byte*) bitmap_init::yoffs#2 6.875 +(byte*) bitmap_init::yoffs#4 11.0 +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) +(word~) bitmap_plot::$1 4.0 +(byte~) bitmap_plot::$2 4.0 +(word~) bitmap_plot::$3 1.0 +(byte*) bitmap_plot::plotter +(byte*) bitmap_plot::plotter#1 3.0 +(word) bitmap_plot::x +(signed word) bitmap_plot::x#0 0.6875 +(byte) bitmap_plot::y +(byte) bitmap_plot::y#0 15.0 +(byte[$100]) bitmap_plot_bit +(byte[$100]) bitmap_plot_yhi +(byte[$100]) bitmap_plot_ylo +(byte*) bitmap_screen +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) +(dword) div32u16u::dividend +(word) div32u16u::divisor +(dword) div32u16u::quotient +(word) div32u16u::quotient_hi +(word) div32u16u::quotient_hi#0 0.8 +(word) div32u16u::quotient_lo +(word) div32u16u::quotient_lo#0 4.0 +(dword) div32u16u::return +(dword) div32u16u::return#0 1.3333333333333333 +(dword) div32u16u::return#2 4.0 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(byte~) divr16u::$1 22.0 +(byte~) divr16u::$2 22.0 +(word) divr16u::dividend +(word) divr16u::dividend#0 2.75 +(word) divr16u::dividend#3 5.0 +(word) divr16u::dividend#5 2.0 +(word) divr16u::divisor +(byte) divr16u::i +(byte) divr16u::i#1 16.5 +(byte) divr16u::i#2 1.6923076923076923 +(word) divr16u::quotient +(word) divr16u::quotient#1 16.5 +(word) divr16u::quotient#2 11.0 +(word) divr16u::quotient#3 2.75 +(word) divr16u::rem +(word) divr16u::rem#0 8.25 +(word) divr16u::rem#1 22.0 +(word) divr16u::rem#10 4.0 +(word) divr16u::rem#11 11.666666666666666 +(word) divr16u::rem#2 22.0 +(word) divr16u::rem#4 4.0 +(word) divr16u::rem#5 24.0 +(word) divr16u::rem#6 11.0 +(word) divr16u::return +(word) divr16u::return#0 5.285714285714286 +(word) divr16u::return#2 4.0 +(word) divr16u::return#3 4.0 +(byte) frame_cnt +(byte) frame_cnt#0 0.6000000000000001 +(byte) frame_cnt#1 4.0 +(byte) frame_cnt#2 40.0 +(void()) init_irq() +interrupt(HARDWARE_CLOBBER)(void()) irq() +(void()) main() +(signed word~) main::$11 22.0 +(word~) main::$15 11.0 +(signed word~) main::$17 22.0 +(signed word~) main::$18 11.0 +(word~) main::$28 22.0 +(word~) main::$29 22.0 +(signed word*~) main::$30 22.0 +(signed word*~) main::$31 22.0 +(word~) main::$9 11.0 +(signed word) main::cos_x +(signed word) main::cos_x#0 11.0 +(word) main::idx_x +(word) main::idx_x#1 11.0 +(word) main::idx_x#10 3.142857142857143 +(word) main::idx_x#3 1.2692307692307692 +(word) main::idx_y +(word) main::idx_y#1 11.0 +(word) main::idx_y#10 7.333333333333333 +(word) main::idx_y#3 1.0999999999999999 +(signed word) main::r +(signed word) main::r#1 16.5 +(signed word) main::r#10 1.2941176470588236 +(byte) main::r_add +(signed word) main::sin_y +(signed word) main::sin_y#0 11.0 +(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 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(byte*) main::toD0181_screen +(word) main::x +(signed dword) main::xpos +(signed dword) main::xpos#0 22.0 +(word) main::y +(signed dword) main::ypos +(signed dword) main::ypos#0 22.0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(byte) memset::c +(byte) memset::c#3 1.5714285714285714 +(byte*) memset::dst +(byte*) memset::dst#1 16.5 +(byte*) memset::dst#2 17.5 +(byte*~) memset::dst#3 4.0 +(byte*) memset::end +(byte*) memset::end#0 2.1666666666666665 +(word) memset::num +(word) memset::num#2 2.0 +(void*) memset::return +(void*) memset::str +(void*) memset::str#2 +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) +(word~) mul16s::$13 4.0 +(word~) mul16s::$16 4.0 +(word~) mul16s::$17 4.0 +(word~) mul16s::$9 4.0 +(signed word) mul16s::a +(signed word) mul16s::a#0 22.0 +(signed word) mul16s::a#1 11.0 +(signed word) mul16s::a#2 11.0 +(signed word) mul16s::a#3 2.692307692307692 +(signed word) mul16s::b +(signed word) mul16s::b#1 22.0 +(signed word) mul16s::b#2 22.0 +(signed word) mul16s::b#3 2.1818181818181817 +(dword) mul16s::m +(dword) mul16s::m#0 2.0 +(dword) mul16s::m#1 4.0 +(dword) mul16s::m#2 4.0 +(dword) mul16s::m#4 4.0 +(dword) mul16s::m#5 2.5 +(signed dword) mul16s::return +(signed dword) mul16s::return#0 7.000000000000001 +(signed dword) mul16s::return#2 22.0 +(signed dword) mul16s::return#3 22.0 +(signed dword) mul16s::return#4 22.0 +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) +(byte~) mul16u::$1 202.0 +(word) mul16u::a +(word) mul16u::a#0 101.0 +(word) mul16u::a#2 2.0 +(word) mul16u::a#3 67.66666666666666 +(word) mul16u::a#6 6.0 +(word~) mul16u::a#8 4.0 +(word) mul16u::b +(word) mul16u::b#1 4.0 +(dword) mul16u::mb +(dword) mul16u::mb#0 6.0 +(dword) mul16u::mb#1 202.0 +(dword) mul16u::mb#2 43.57142857142858 +(dword~) mul16u::mb#6 2.0 +(dword) mul16u::res +(dword) mul16u::res#1 202.0 +(dword) mul16u::res#2 43.85714285714286 +(dword) mul16u::res#6 101.0 +(dword) mul16u::return +(dword) mul16u::return#2 4.0 +(dword) mul16u::return#3 4.0 +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) +(dword~) mulu16_sel::$0 4.0 +(dword~) mulu16_sel::$1 4.0 +(word) mulu16_sel::return +(word) mulu16_sel::return#0 4.0 +(word) mulu16_sel::return#1 4.0 +(word) mulu16_sel::return#10 4.0 +(word) mulu16_sel::return#11 4.0 +(word) mulu16_sel::return#12 1.714285714285714 +(word) mulu16_sel::return#2 4.0 +(byte) mulu16_sel::select +(byte) mulu16_sel::select#5 0.3333333333333333 +(word) mulu16_sel::v1 +(word) mulu16_sel::v1#0 2.0 +(word) mulu16_sel::v1#1 2.0 +(word) mulu16_sel::v1#2 4.0 +(word) mulu16_sel::v1#3 2.0 +(word) mulu16_sel::v1#4 2.0 +(word) mulu16_sel::v1#5 12.0 +(word) mulu16_sel::v2 +(word) mulu16_sel::v2#0 4.0 +(word) mulu16_sel::v2#1 4.0 +(word) mulu16_sel::v2#3 4.0 +(word) mulu16_sel::v2#4 4.0 +(word) mulu16_sel::v2#5 5.0 +(byte[$100]) plots_per_frame +(word) rem16u +(word) rem16u#1 0.8 +(signed word()) sin16s((dword) sin16s::x) +(dword~) sin16s::$4 4.0 +(byte) sin16s::isUpper +(byte) sin16s::isUpper#2 0.06060606060606061 +(signed word) sin16s::return +(signed word) sin16s::return#0 22.0 +(signed word) sin16s::return#1 5.0 +(signed word~) sin16s::return#5 4.0 +(signed word) sin16s::sinx +(signed word) sin16s::sinx#1 4.0 +(word) sin16s::usinx +(word) sin16s::usinx#0 0.3333333333333333 +(word) sin16s::usinx#1 1.0 +(dword) sin16s::x +(dword) sin16s::x#0 8.5 +(dword) sin16s::x#1 4.0 +(dword) sin16s::x#2 4.0 +(dword) sin16s::x#4 5.0 +(dword) sin16s::x#6 6.0 +(word) sin16s::x1 +(word) sin16s::x1#0 0.6363636363636365 +(word) sin16s::x2 +(word) sin16s::x2#0 4.0 +(word) sin16s::x3 +(word) sin16s::x3#0 1.0 +(word) sin16s::x3_6 +(word) sin16s::x3_6#0 4.0 +(word) sin16s::x4 +(word) sin16s::x4#0 4.0 +(word) sin16s::x5 +(word) sin16s::x5#0 4.0 +(word) sin16s::x5_128 +(word) sin16s::x5_128#0 4.0 +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) +(signed dword~) sin16s_gen2::$5 22.0 +(word~) sin16s_gen2::$6 11.0 +(signed word) sin16s_gen2::ampl +(word) sin16s_gen2::i +(word) sin16s_gen2::i#1 16.5 +(word) sin16s_gen2::i#2 1.8333333333333333 +(signed word) sin16s_gen2::max +(signed word) sin16s_gen2::min +(signed word) sin16s_gen2::offs +(signed word*) sin16s_gen2::sintab +(signed word*) sin16s_gen2::sintab#0 5.5 +(signed word*) sin16s_gen2::sintab#2 3.3000000000000003 +(dword) sin16s_gen2::step +(dword) sin16s_gen2::step#0 0.8666666666666666 +(word) sin16s_gen2::wavelength +(dword) sin16s_gen2::x +(dword) sin16s_gen2::x#1 7.333333333333333 +(dword) sin16s_gen2::x#2 3.0 + +Not consolidating phi with different size mul16u::mb#0 mul16u::b#1 +Initial phi equivalence classes +[ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +[ main::r#10 main::r#1 ] +[ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +[ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] +[ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] +[ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] +[ mul16u::b#1 ] +[ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +[ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] +[ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +[ memset::str#2 ] +[ memset::num#2 ] +[ memset::c#3 ] +[ memset::dst#2 memset::dst#3 memset::dst#1 ] +[ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +[ bitmap_init::x#2 bitmap_init::x#1 ] +[ bitmap_init::y#2 bitmap_init::y#1 ] +[ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +[ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +[ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +[ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +[ sin16s::isUpper#2 ] +[ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] +[ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] +[ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] +[ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +[ mulu16_sel::select#5 ] +[ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +[ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +[ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +[ divr16u::i#2 divr16u::i#1 ] +[ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Added variable main::$28 to zero page equivalence class [ main::$28 ] +Added variable main::$30 to zero page equivalence class [ main::$30 ] +Added variable main::cos_x#0 to zero page equivalence class [ main::cos_x#0 ] +Added variable mul16s::return#3 to zero page equivalence class [ mul16s::return#3 ] +Added variable main::xpos#0 to zero page equivalence class [ main::xpos#0 ] +Added variable main::$9 to zero page equivalence class [ main::$9 ] +Added variable main::$11 to zero page equivalence class [ main::$11 ] +Added variable bitmap_plot::x#0 to zero page equivalence class [ bitmap_plot::x#0 ] +Added variable main::$29 to zero page equivalence class [ main::$29 ] +Added variable main::$31 to zero page equivalence class [ main::$31 ] +Added variable main::sin_y#0 to zero page equivalence class [ main::sin_y#0 ] +Added variable mul16s::return#4 to zero page equivalence class [ mul16s::return#4 ] +Added variable main::ypos#0 to zero page equivalence class [ main::ypos#0 ] +Added variable main::$15 to zero page equivalence class [ main::$15 ] +Added variable main::$17 to zero page equivalence class [ main::$17 ] +Added variable main::$18 to zero page equivalence class [ main::$18 ] +Added variable bitmap_plot::y#0 to zero page equivalence class [ bitmap_plot::y#0 ] +Added variable bitmap_plot::$3 to zero page equivalence class [ bitmap_plot::$3 ] +Added variable bitmap_plot::$1 to zero page equivalence class [ bitmap_plot::$1 ] +Added variable bitmap_plot::plotter#1 to zero page equivalence class [ bitmap_plot::plotter#1 ] +Added variable bitmap_plot::$2 to zero page equivalence class [ bitmap_plot::$2 ] +Added variable mul16u::return#2 to zero page equivalence class [ mul16u::return#2 ] +Added variable mul16s::$9 to zero page equivalence class [ mul16s::$9 ] +Added variable mul16s::$16 to zero page equivalence class [ mul16s::$16 ] +Added variable mul16s::$13 to zero page equivalence class [ mul16s::$13 ] +Added variable mul16s::$17 to zero page equivalence class [ mul16s::$17 ] +Added variable mul16s::return#0 to zero page equivalence class [ mul16s::return#0 ] +Added variable mul16u::$1 to zero page equivalence class [ mul16u::$1 ] +Added variable memset::end#0 to zero page equivalence class [ memset::end#0 ] +Added variable bitmap_init::$7 to zero page equivalence class [ bitmap_init::$7 ] +Added variable bitmap_init::$4 to zero page equivalence class [ bitmap_init::$4 ] +Added variable bitmap_init::$5 to zero page equivalence class [ bitmap_init::$5 ] +Added variable bitmap_init::$6 to zero page equivalence class [ bitmap_init::$6 ] +Added variable div32u16u::return#2 to zero page equivalence class [ div32u16u::return#2 ] +Added variable sin16s_gen2::step#0 to zero page equivalence class [ sin16s_gen2::step#0 ] +Added variable sin16s::return#0 to zero page equivalence class [ sin16s::return#0 ] +Added variable mul16s::return#2 to zero page equivalence class [ mul16s::return#2 ] +Added variable sin16s_gen2::$5 to zero page equivalence class [ sin16s_gen2::$5 ] +Added variable sin16s_gen2::$6 to zero page equivalence class [ sin16s_gen2::$6 ] +Added variable sin16s::$4 to zero page equivalence class [ sin16s::$4 ] +Added variable sin16s::x1#0 to zero page equivalence class [ sin16s::x1#0 ] +Added variable mulu16_sel::return#0 to zero page equivalence class [ mulu16_sel::return#0 ] +Added variable sin16s::x2#0 to zero page equivalence class [ sin16s::x2#0 ] +Added variable mulu16_sel::return#1 to zero page equivalence class [ mulu16_sel::return#1 ] +Added variable sin16s::x3#0 to zero page equivalence class [ sin16s::x3#0 ] +Added variable mulu16_sel::return#2 to zero page equivalence class [ mulu16_sel::return#2 ] +Added variable sin16s::x3_6#0 to zero page equivalence class [ sin16s::x3_6#0 ] +Added variable sin16s::usinx#0 to zero page equivalence class [ sin16s::usinx#0 ] +Added variable mulu16_sel::return#10 to zero page equivalence class [ mulu16_sel::return#10 ] +Added variable sin16s::x4#0 to zero page equivalence class [ sin16s::x4#0 ] +Added variable mulu16_sel::return#11 to zero page equivalence class [ mulu16_sel::return#11 ] +Added variable sin16s::x5#0 to zero page equivalence class [ sin16s::x5#0 ] +Added variable sin16s::x5_128#0 to zero page equivalence class [ sin16s::x5_128#0 ] +Added variable sin16s::usinx#1 to zero page equivalence class [ sin16s::usinx#1 ] +Added variable mul16u::return#3 to zero page equivalence class [ mul16u::return#3 ] +Added variable mulu16_sel::$0 to zero page equivalence class [ mulu16_sel::$0 ] +Added variable mulu16_sel::$1 to zero page equivalence class [ mulu16_sel::$1 ] +Added variable mulu16_sel::return#12 to zero page equivalence class [ mulu16_sel::return#12 ] +Added variable divr16u::return#2 to zero page equivalence class [ divr16u::return#2 ] +Added variable div32u16u::quotient_hi#0 to zero page equivalence class [ div32u16u::quotient_hi#0 ] +Added variable divr16u::return#3 to zero page equivalence class [ divr16u::return#3 ] +Added variable div32u16u::quotient_lo#0 to zero page equivalence class [ div32u16u::quotient_lo#0 ] +Added variable div32u16u::return#0 to zero page equivalence class [ div32u16u::return#0 ] +Added variable divr16u::$1 to zero page equivalence class [ divr16u::$1 ] +Added variable divr16u::$2 to zero page equivalence class [ divr16u::$2 ] +Added variable rem16u#1 to zero page equivalence class [ rem16u#1 ] +Complete equivalence classes +[ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +[ main::r#10 main::r#1 ] +[ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +[ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] +[ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] +[ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] +[ mul16u::b#1 ] +[ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +[ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] +[ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +[ memset::str#2 ] +[ memset::num#2 ] +[ memset::c#3 ] +[ memset::dst#2 memset::dst#3 memset::dst#1 ] +[ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +[ bitmap_init::x#2 bitmap_init::x#1 ] +[ bitmap_init::y#2 bitmap_init::y#1 ] +[ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +[ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +[ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +[ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +[ sin16s::isUpper#2 ] +[ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] +[ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] +[ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] +[ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +[ mulu16_sel::select#5 ] +[ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +[ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +[ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +[ divr16u::i#2 divr16u::i#1 ] +[ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +[ main::$28 ] +[ main::$30 ] +[ main::cos_x#0 ] +[ mul16s::return#3 ] +[ main::xpos#0 ] +[ main::$9 ] +[ main::$11 ] +[ bitmap_plot::x#0 ] +[ main::$29 ] +[ main::$31 ] +[ main::sin_y#0 ] +[ mul16s::return#4 ] +[ main::ypos#0 ] +[ main::$15 ] +[ main::$17 ] +[ main::$18 ] +[ bitmap_plot::y#0 ] +[ bitmap_plot::$3 ] +[ bitmap_plot::$1 ] +[ bitmap_plot::plotter#1 ] +[ bitmap_plot::$2 ] +[ mul16u::return#2 ] +[ mul16s::$9 ] +[ mul16s::$16 ] +[ mul16s::$13 ] +[ mul16s::$17 ] +[ mul16s::return#0 ] +[ mul16u::$1 ] +[ memset::end#0 ] +[ bitmap_init::$7 ] +[ bitmap_init::$4 ] +[ bitmap_init::$5 ] +[ bitmap_init::$6 ] +[ div32u16u::return#2 ] +[ sin16s_gen2::step#0 ] +[ sin16s::return#0 ] +[ mul16s::return#2 ] +[ sin16s_gen2::$5 ] +[ sin16s_gen2::$6 ] +[ sin16s::$4 ] +[ sin16s::x1#0 ] +[ mulu16_sel::return#0 ] +[ sin16s::x2#0 ] +[ mulu16_sel::return#1 ] +[ sin16s::x3#0 ] +[ mulu16_sel::return#2 ] +[ sin16s::x3_6#0 ] +[ sin16s::usinx#0 ] +[ mulu16_sel::return#10 ] +[ sin16s::x4#0 ] +[ mulu16_sel::return#11 ] +[ sin16s::x5#0 ] +[ sin16s::x5_128#0 ] +[ sin16s::usinx#1 ] +[ mul16u::return#3 ] +[ mulu16_sel::$0 ] +[ mulu16_sel::$1 ] +[ mulu16_sel::return#12 ] +[ divr16u::return#2 ] +[ div32u16u::quotient_hi#0 ] +[ divr16u::return#3 ] +[ div32u16u::quotient_lo#0 ] +[ div32u16u::return#0 ] +[ divr16u::$1 ] +[ divr16u::$2 ] +[ rem16u#1 ] +Allocated zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +Allocated zp ZP_WORD:4 [ main::r#10 main::r#1 ] +Allocated zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +Allocated zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] +Allocated zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] +Allocated zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] +Allocated zp ZP_WORD:16 [ mul16u::b#1 ] +Allocated zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +Allocated zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] +Allocated zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +Allocated zp ZP_WORD:28 [ memset::str#2 ] +Allocated zp ZP_WORD:30 [ memset::num#2 ] +Allocated zp ZP_BYTE:32 [ memset::c#3 ] +Allocated zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +Allocated zp ZP_BYTE:36 [ bitmap_init::x#2 bitmap_init::x#1 ] +Allocated zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] +Allocated zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +Allocated zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +Allocated zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +Allocated zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +Allocated zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Allocated zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] +Allocated zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] +Allocated zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] +Allocated zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +Allocated zp ZP_BYTE:59 [ mulu16_sel::select#5 ] +Allocated zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] +Allocated zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +Allocated zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] +Allocated zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] +Allocated zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Allocated zp ZP_WORD:68 [ main::$28 ] +Allocated zp ZP_WORD:70 [ main::$30 ] +Allocated zp ZP_WORD:72 [ main::cos_x#0 ] +Allocated zp ZP_DWORD:74 [ mul16s::return#3 ] +Allocated zp ZP_DWORD:78 [ main::xpos#0 ] +Allocated zp ZP_WORD:82 [ main::$9 ] +Allocated zp ZP_WORD:84 [ main::$11 ] +Allocated zp ZP_WORD:86 [ bitmap_plot::x#0 ] +Allocated zp ZP_WORD:88 [ main::$29 ] +Allocated zp ZP_WORD:90 [ main::$31 ] +Allocated zp ZP_WORD:92 [ main::sin_y#0 ] +Allocated zp ZP_DWORD:94 [ mul16s::return#4 ] +Allocated zp ZP_DWORD:98 [ main::ypos#0 ] +Allocated zp ZP_WORD:102 [ main::$15 ] +Allocated zp ZP_WORD:104 [ main::$17 ] +Allocated zp ZP_WORD:106 [ main::$18 ] +Allocated zp ZP_BYTE:108 [ bitmap_plot::y#0 ] +Allocated zp ZP_WORD:109 [ bitmap_plot::$3 ] +Allocated zp ZP_WORD:111 [ bitmap_plot::$1 ] +Allocated zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] +Allocated zp ZP_BYTE:115 [ bitmap_plot::$2 ] +Allocated zp ZP_DWORD:116 [ mul16u::return#2 ] +Allocated zp ZP_WORD:120 [ mul16s::$9 ] +Allocated zp ZP_WORD:122 [ mul16s::$16 ] +Allocated zp ZP_WORD:124 [ mul16s::$13 ] +Allocated zp ZP_WORD:126 [ mul16s::$17 ] +Allocated zp ZP_DWORD:128 [ mul16s::return#0 ] +Allocated zp ZP_BYTE:132 [ mul16u::$1 ] +Allocated zp ZP_WORD:133 [ memset::end#0 ] +Allocated zp ZP_BYTE:135 [ bitmap_init::$7 ] +Allocated zp ZP_BYTE:136 [ bitmap_init::$4 ] +Allocated zp ZP_BYTE:137 [ bitmap_init::$5 ] +Allocated zp ZP_BYTE:138 [ bitmap_init::$6 ] +Allocated zp ZP_DWORD:139 [ div32u16u::return#2 ] +Allocated zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] +Allocated zp ZP_WORD:147 [ sin16s::return#0 ] +Allocated zp ZP_DWORD:149 [ mul16s::return#2 ] +Allocated zp ZP_DWORD:153 [ sin16s_gen2::$5 ] +Allocated zp ZP_WORD:157 [ sin16s_gen2::$6 ] +Allocated zp ZP_DWORD:159 [ sin16s::$4 ] +Allocated zp ZP_WORD:163 [ sin16s::x1#0 ] +Allocated zp ZP_WORD:165 [ mulu16_sel::return#0 ] +Allocated zp ZP_WORD:167 [ sin16s::x2#0 ] +Allocated zp ZP_WORD:169 [ mulu16_sel::return#1 ] +Allocated zp ZP_WORD:171 [ sin16s::x3#0 ] +Allocated zp ZP_WORD:173 [ mulu16_sel::return#2 ] +Allocated zp ZP_WORD:175 [ sin16s::x3_6#0 ] +Allocated zp ZP_WORD:177 [ sin16s::usinx#0 ] +Allocated zp ZP_WORD:179 [ mulu16_sel::return#10 ] +Allocated zp ZP_WORD:181 [ sin16s::x4#0 ] +Allocated zp ZP_WORD:183 [ mulu16_sel::return#11 ] +Allocated zp ZP_WORD:185 [ sin16s::x5#0 ] +Allocated zp ZP_WORD:187 [ sin16s::x5_128#0 ] +Allocated zp ZP_WORD:189 [ sin16s::usinx#1 ] +Allocated zp ZP_DWORD:191 [ mul16u::return#3 ] +Allocated zp ZP_DWORD:195 [ mulu16_sel::$0 ] +Allocated zp ZP_DWORD:199 [ mulu16_sel::$1 ] +Allocated zp ZP_WORD:203 [ mulu16_sel::return#12 ] +Allocated zp ZP_WORD:205 [ divr16u::return#2 ] +Allocated zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] +Allocated zp ZP_WORD:209 [ divr16u::return#3 ] +Allocated zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] +Allocated zp ZP_DWORD:213 [ div32u16u::return#0 ] +Allocated zp ZP_BYTE:217 [ divr16u::$1 ] +Allocated zp ZP_BYTE:218 [ divr16u::$2 ] +Allocated zp ZP_WORD:219 [ rem16u#1 ] + +INITIAL ASM +//SEG0 File Comments +// Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots a spiral +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_SIGNED_WORD = 2 + // Processor port data direction register + .label PROCPORT_DDR = 0 + // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written + .const PROCPORT_DDR_MEMORY_MASK = 7 + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 I/O in $D000 + .const PROCPORT_RAM_IO = $35 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label VIC_CONTROL = $d011 + .label D011 = $d011 + .const VIC_BMM = $20 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label D018 = $d018 + // VIC II IRQ Status Register + .label IRQ_STATUS = $d019 + // VIC II IRQ Enable Register + .label IRQ_ENABLE = $d01a + // Bits for the IRQ Status/Enable Registers + .const IRQ_RASTER = 1 + // CIA#1 Interrupt Status & Control Register + .label CIA1_INTERRUPT = $dc0d + // Value that disables all CIA interrupts when stored to the CIA Interrupt registers + .const CIA_INTERRUPT_CLEAR = $7f + // The vector used when the HARDWARE serves IRQ interrupts + .label HARDWARE_IRQ = $fffe + // The colors of the C64 + .const BLACK = 0 + .const WHITE = 1 + // PI*2 in u[4.28] format + .const PI2_u4f28 = $6487ed51 + // PI in u[4.28] format + .const PI_u4f28 = $3243f6a9 + // PI/2 in u[4.28] format + .const PI_HALF_u4f28 = $1921fb54 + .label BITMAP = $2000 + .label SCREEN = $400 + .label rem16u = $db + .label frame_cnt = $43 +//SEG3 @begin +bbegin: + jmp b1 +//SEG4 @1 +b1: +//SEG5 [1] (byte) frame_cnt#0 ← (byte) 1 -- vbuz1=vbuc1 + // Counts frames - updated by the IRQ + lda #1 + sta frame_cnt +//SEG6 [2] phi from @1 to @2 [phi:@1->@2] +b2_from_b1: + jmp b2 +//SEG7 @2 +b2: +//SEG8 [3] call main +//SEG9 [5] phi from @2 to main [phi:@2->main] +main_from_b2: + jsr main +//SEG10 [4] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG11 @end +bend: +//SEG12 main +main: { + .const r_add = 4 + .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f + .label _9 = $52 + .label _11 = $54 + .label _15 = $66 + .label _17 = $68 + .label _18 = $6a + .label _28 = $44 + .label _29 = $58 + .label cos_x = $48 + .label xpos = $4e + .label sin_y = $5c + .label ypos = $62 + .label idx_x = 2 + .label idx_y = 6 + .label r = 4 + .label _30 = $46 + .label _31 = $5a + //SEG13 [6] call sin16s_gen2 + //SEG14 [131] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + sin16s_gen2_from_main: + jsr sin16s_gen2 + //SEG15 [7] phi from main to main::@7 [phi:main->main::@7] + b7_from_main: + jmp b7 + //SEG16 main::@7 + b7: + //SEG17 [8] call bitmap_init + //SEG18 [109] phi from main::@7 to bitmap_init [phi:main::@7->bitmap_init] + bitmap_init_from_b7: + jsr bitmap_init + //SEG19 [9] phi from main::@7 to main::@8 [phi:main::@7->main::@8] + b8_from_b7: + jmp b8 + //SEG20 main::@8 + b8: + //SEG21 [10] call bitmap_clear + //SEG22 [96] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear] + bitmap_clear_from_b8: + jsr bitmap_clear + jmp b9 + //SEG23 main::@9 + b9: + //SEG24 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 + lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 + sta D011 + //SEG25 [12] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181] + toD0181_from_b9: + jmp toD0181 + //SEG26 main::toD0181 + toD0181: + jmp b6 + //SEG27 main::@6 + b6: + //SEG28 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG29 [14] call init_irq + jsr init_irq + //SEG30 [15] phi from main::@6 to main::@1 [phi:main::@6->main::@1] + b1_from_b6: + //SEG31 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@6->main::@1#0] -- vwuz1=vbuc1 + lda #$80 + sta idx_y + lda #0 + sta idx_y+1 + //SEG32 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@6->main::@1#1] -- vwsz1=vbsc1 + lda #0 + sta r + lda #0 + sta r+1 + //SEG33 [15] phi (word) main::idx_x#3 = (byte) 0 [phi:main::@6->main::@1#2] -- vwuz1=vbuc1 + lda #0 + sta idx_x + lda #0 + sta idx_x+1 + jmp b1 + //SEG34 main::@1 + b1: + jmp b2 + //SEG35 main::@2 + b2: + //SEG36 [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda idx_x + asl + sta _28 + lda idx_x+1 + rol + sta _28+1 + //SEG37 [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 -- pwsz1=pwsc1_plus_vwuz2 + lda _28 + clc + adc #SINUS + sta _30+1 + //SEG38 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) -- vwsz1=_deref_pwsz2 + ldy #0 + lda (_30),y + sta cos_x + iny + lda (_30),y + sta cos_x+1 + //SEG39 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 -- vwsz1=vwsz2 + lda r + sta mul16s.a + lda r+1 + sta mul16s.a+1 + //SEG40 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 -- vwsz1=vwsz2 + lda cos_x + sta mul16s.b + lda cos_x+1 + sta mul16s.b+1 + //SEG41 [21] call mul16s + //SEG42 [58] phi from main::@2 to mul16s [phi:main::@2->mul16s] + mul16s_from_b2: + //SEG43 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy + //SEG44 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy + jsr mul16s + //SEG45 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + lda mul16s.return + sta mul16s.return_3 + lda mul16s.return+1 + sta mul16s.return_3+1 + lda mul16s.return+2 + sta mul16s.return_3+2 + lda mul16s.return+3 + sta mul16s.return_3+3 + jmp b10 + //SEG46 main::@10 + b10: + //SEG47 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 -- vdsz1=vdsz2 + lda mul16s.return_3 + sta xpos + lda mul16s.return_3+1 + sta xpos+1 + lda mul16s.return_3+2 + sta xpos+2 + lda mul16s.return_3+3 + sta xpos+3 + //SEG48 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 + lda xpos+2 + sta _9 + lda xpos+3 + sta _9+1 + //SEG49 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz2_ror_2 + lda _9+1 + cmp #$80 + ror + sta _11+1 + lda _9 + ror + sta _11 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + //SEG50 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz2 + lda _11 + clc + adc #<$a0 + sta bitmap_plot.x + lda _11+1 + adc #>$a0 + sta bitmap_plot.x+1 + //SEG51 [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda idx_y + asl + sta _29 + lda idx_y+1 + rol + sta _29+1 + //SEG52 [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 -- pwsz1=pwsc1_plus_vwuz2 + lda _29 + clc + adc #SINUS + sta _31+1 + //SEG53 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) -- vwsz1=_deref_pwsz2 + ldy #0 + lda (_31),y + sta sin_y + iny + lda (_31),y + sta sin_y+1 + //SEG54 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 -- vwsz1=vwsz2 + lda r + sta mul16s.a + lda r+1 + sta mul16s.a+1 + //SEG55 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 -- vwsz1=vwsz2 + lda sin_y + sta mul16s.b + lda sin_y+1 + sta mul16s.b+1 + //SEG56 [32] call mul16s + //SEG57 [58] phi from main::@10 to mul16s [phi:main::@10->mul16s] + mul16s_from_b10: + //SEG58 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@10->mul16s#0] -- register_copy + //SEG59 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@10->mul16s#1] -- register_copy + jsr mul16s + //SEG60 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + lda mul16s.return + sta mul16s.return_4 + lda mul16s.return+1 + sta mul16s.return_4+1 + lda mul16s.return+2 + sta mul16s.return_4+2 + lda mul16s.return+3 + sta mul16s.return_4+3 + jmp b11 + //SEG61 main::@11 + b11: + //SEG62 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 -- vdsz1=vdsz2 + lda mul16s.return_4 + sta ypos + lda mul16s.return_4+1 + sta ypos+1 + lda mul16s.return_4+2 + sta ypos+2 + lda mul16s.return_4+3 + sta ypos+3 + //SEG63 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 + lda ypos+2 + sta _15 + lda ypos+3 + sta _15+1 + //SEG64 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz2_ror_2 + lda _15+1 + cmp #$80 + ror + sta _17+1 + lda _15 + ror + sta _17 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + //SEG65 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz2 + lda #$64 + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda _17 + adc $fe + sta _18 + lda _17+1 + adc $ff + sta _18+1 + //SEG66 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuz1=_byte_vwuz2 + lda _18 + sta bitmap_plot.y + //SEG67 [39] call bitmap_plot + jsr bitmap_plot + jmp b12 + //SEG68 main::@12 + b12: + //SEG69 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx frame_cnt + inc plots_per_frame,x + //SEG70 [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 + lda #r_add + clc + adc idx_x + sta idx_x + bcc !+ + inc idx_x+1 + !: + //SEG71 [42] if((word) main::idx_x#1<(word) $200) goto main::@13 -- vwuz1_lt_vwuc1_then_la1 + lda idx_x+1 + cmp #>$200 + bcc b13_from_b12 + bne !+ + lda idx_x + cmp #<$200 + bcc b13_from_b12 + !: + //SEG72 [44] phi from main::@12 to main::@3 [phi:main::@12->main::@3] + b3_from_b12: + //SEG73 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@12->main::@3#0] -- vwuz1=vbuc1 + lda #0 + sta idx_x + lda #0 + sta idx_x+1 + jmp b3 + //SEG74 [43] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + b13_from_b12: + jmp b13 + //SEG75 main::@13 + b13: + //SEG76 [44] phi from main::@13 to main::@3 [phi:main::@13->main::@3] + b3_from_b13: + //SEG77 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@13->main::@3#0] -- register_copy + jmp b3 + //SEG78 main::@3 + b3: + //SEG79 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 + lda #r_add + clc + adc idx_y + sta idx_y + bcc !+ + inc idx_y+1 + !: + //SEG80 [46] if((word) main::idx_y#1<(word) $200) goto main::@14 -- vwuz1_lt_vwuc1_then_la1 + lda idx_y+1 + cmp #>$200 + bcc b14_from_b3 + bne !+ + lda idx_y + cmp #<$200 + bcc b14_from_b3 + !: + //SEG81 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + b4_from_b3: + //SEG82 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 + lda #0 + sta idx_y + lda #0 + sta idx_y+1 + jmp b4 + //SEG83 [47] phi from main::@3 to main::@14 [phi:main::@3->main::@14] + b14_from_b3: + jmp b14 + //SEG84 main::@14 + b14: + //SEG85 [48] phi from main::@14 to main::@4 [phi:main::@14->main::@4] + b4_from_b14: + //SEG86 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@14->main::@4#0] -- register_copy + jmp b4 + //SEG87 main::@4 + b4: + //SEG88 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 -- vwsz1=vwsz1_plus_vbsc1 + lda #r_add + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda r + adc $fe + sta r + lda r+1 + adc $ff + sta r+1 + //SEG89 [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 -- vwsz1_ge_vwsc1_then_la1 + lda r + cmp #<$200*$c+$100 + lda r+1 + sbc #>$200*$c+$100 + bvc !+ + eor #$80 + !: + bpl b5 + //SEG90 [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + b1_from_b4: + //SEG91 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@4->main::@1#0] -- register_copy + //SEG92 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@4->main::@1#1] -- register_copy + //SEG93 [15] phi (word) main::idx_x#3 = (word) main::idx_x#10 [phi:main::@4->main::@1#2] -- register_copy + jmp b1 + //SEG94 main::@5 + b5: + //SEG95 [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDERCOL + jmp b5 +} +//SEG96 bitmap_plot +// Plot a single dot in the bitmap +// bitmap_plot(signed word zeropage($56) x, byte zeropage($6c) y) +bitmap_plot: { + .label _1 = $6f + .label _2 = $73 + .label plotter = $71 + .label x = $56 + .label y = $6c + .label _3 = $6d + //SEG97 [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 + ldy y + lda bitmap_plot_yhi,y + sta _3+1 + lda bitmap_plot_ylo,y + sta _3 + //SEG98 [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + lda x + and #<$fff8 + sta _1 + lda x+1 + and #>$fff8 + sta _1+1 + //SEG99 [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 + lda _3 + clc + adc _1 + sta plotter + lda _3+1 + adc _1+1 + sta plotter+1 + //SEG100 [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuz1=_lo_vwuz2 + lda x + sta _2 + //SEG101 [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 + ldy #0 + lda (plotter),y + ldy _2 + ora bitmap_plot_bit,y + ldy #0 + sta (plotter),y + jmp breturn + //SEG102 bitmap_plot::@return + breturn: + //SEG103 [57] return + rts +} +//SEG104 mul16s +// Multiply of two signed words to a signed double word +// Fixes offsets introduced by using unsigned multiplication +// mul16s(signed word zeropage(8) a, signed word zeropage($a) b) +mul16s: { + .label _9 = $78 + .label _13 = $7c + .label _16 = $7a + .label _17 = $7e + .label m = $c + .label return = $80 + .label a = 8 + .label return_2 = $95 + .label b = $a + .label return_3 = $4a + .label return_4 = $5e + //SEG105 [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 + lda b + sta mul16u.mb + lda b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + //SEG106 [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 + lda a + sta mul16u.a + lda a+1 + sta mul16u.a+1 + //SEG107 [61] call mul16u + //SEG108 [76] phi from mul16s to mul16u [phi:mul16s->mul16u] + mul16u_from_mul16s: + //SEG109 [76] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG110 [76] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy + jsr mul16u + //SEG111 [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 -- vduz1=vduz2 + lda mul16u.res + sta mul16u.return + lda mul16u.res+1 + sta mul16u.return+1 + lda mul16u.res+2 + sta mul16u.return+2 + lda mul16u.res+3 + sta mul16u.return+3 + jmp b5 + //SEG112 mul16s::@5 + b5: + //SEG113 [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 -- vduz1=vduz2 + lda mul16u.return + sta m + lda mul16u.return+1 + sta m+1 + lda mul16u.return+2 + sta m+2 + lda mul16u.return+3 + sta m+3 + //SEG114 [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + lda a+1 + bpl b1_from_b5 + jmp b3 + //SEG115 mul16s::@3 + b3: + //SEG116 [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + lda m+2 + sta _9 + lda m+3 + sta _9+1 + //SEG117 [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz2_minus_vwuz3 + lda _9 + sec + sbc b + sta _16 + lda _9+1 + sbc b+1 + sta _16+1 + //SEG118 [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + lda _16 + sta m+2 + lda _16+1 + sta m+3 + //SEG119 [68] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] + b1_from_b3: + b1_from_b5: + //SEG120 [68] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy + jmp b1 + //SEG121 mul16s::@1 + b1: + //SEG122 [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 + lda b+1 + bpl b2_from_b1 + jmp b4 + //SEG123 mul16s::@4 + b4: + //SEG124 [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 + lda m+2 + sta _13 + lda m+3 + sta _13+1 + //SEG125 [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2_minus_vwuz3 + lda _13 + sec + sbc a + sta _17 + lda _13+1 + sbc a+1 + sta _17+1 + //SEG126 [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 + lda _17 + sta m+2 + lda _17+1 + sta m+3 + //SEG127 [73] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] + b2_from_b1: + b2_from_b4: + //SEG128 [73] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy + jmp b2 + //SEG129 mul16s::@2 + b2: + //SEG130 [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 -- vdsz1=vdsz2 + lda m + sta return + lda m+1 + sta return+1 + lda m+2 + sta return+2 + lda m+3 + sta return+3 + jmp breturn + //SEG131 mul16s::@return + breturn: + //SEG132 [75] return + rts +} +//SEG133 mul16u +// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word +// mul16u(word zeropage($12) a, word zeropage($10) b) +mul16u: { + .label _1 = $84 + .label mb = $18 + .label a = $12 + .label res = $14 + .label return = $74 + .label b = $10 + .label return_3 = $bf + //SEG134 [77] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + b1_from_mul16u: + //SEG135 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG136 [77] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + lda #0 + sta res + lda #0 + sta res+1 + sta res+2 + sta res+3 + //SEG137 [77] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + jmp b1 + //SEG138 mul16u::@1 + b1: + //SEG139 [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + lda a + bne b2 + lda a+1 + bne b2 + jmp breturn + //SEG140 mul16u::@return + breturn: + //SEG141 [79] return + rts + //SEG142 mul16u::@2 + b2: + //SEG143 [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuz1=vwuz2_band_vbuc1 + lda a + and #1 + sta _1 + //SEG144 [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuz1_eq_0_then_la1 + lda _1 + cmp #0 + beq b3_from_b2 + jmp b4 + //SEG145 mul16u::@4 + b4: + //SEG146 [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + lda res + clc + adc mb + sta res + lda res+1 + adc mb+1 + sta res+1 + lda res+2 + adc mb+2 + sta res+2 + lda res+3 + adc mb+3 + sta res+3 + //SEG147 [83] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + b3_from_b2: + b3_from_b4: + //SEG148 [83] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + jmp b3 + //SEG149 mul16u::@3 + b3: + //SEG150 [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr a+1 + ror a + //SEG151 [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + asl mb + rol mb+1 + rol mb+2 + rol mb+3 + //SEG152 [77] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + b1_from_b3: + //SEG153 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG154 [77] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG155 [77] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + jmp b1 +} +//SEG156 init_irq +// Setup the IRQ +init_irq: { + //SEG157 asm { sei } + sei + //SEG158 [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG159 [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG160 [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + //SEG161 [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Set raster line to $100 + lda #$80 + ora VIC_CONTROL + sta VIC_CONTROL + //SEG162 [91] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta RASTER + //SEG163 [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + //SEG164 [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 + // Set the IRQ routine + lda #irq + sta HARDWARE_IRQ+1 + //SEG165 asm { cli } + cli + jmp breturn + //SEG166 init_irq::@return + breturn: + //SEG167 [95] return + rts +} +//SEG168 bitmap_clear +// Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with +bitmap_clear: { + .const col = WHITE*$10 + //SEG169 [97] call memset + //SEG170 [101] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + memset_from_bitmap_clear: + //SEG171 [101] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 + lda #col + sta memset.c + //SEG172 [101] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + //SEG173 [101] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memset.str+1 + jsr memset + //SEG174 [98] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + b1_from_bitmap_clear: + jmp b1 + //SEG175 bitmap_clear::@1 + b1: + //SEG176 [99] call memset + //SEG177 [101] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + memset_from_b1: + //SEG178 [101] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 + lda #0 + sta memset.c + //SEG179 [101] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + //SEG180 [101] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + lda #BITMAP + sta memset.str+1 + jsr memset + jmp breturn + //SEG181 bitmap_clear::@return + breturn: + //SEG182 [100] return + rts +} +//SEG183 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($1c) str, byte zeropage($20) c, word zeropage($1e) num) +memset: { + .label end = $85 + .label dst = $21 + .label str = $1c + .label num = $1e + .label c = $20 + //SEG184 [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + lda str + clc + adc num + sta end + lda str+1 + adc num+1 + sta end+1 + //SEG185 [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + lda str + sta dst + lda str+1 + sta dst+1 + //SEG186 [104] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + b1_from_memset: + b1_from_b1: + //SEG187 [104] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + jmp b1 + //SEG188 memset::@1 + b1: + //SEG189 [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + lda c + ldy #0 + sta (dst),y + //SEG190 [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG191 [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + lda dst+1 + cmp end+1 + bne b1_from_b1 + lda dst + cmp end + bne b1_from_b1 + jmp breturn + //SEG192 memset::@return + breturn: + //SEG193 [108] return + rts +} +//SEG194 bitmap_init +// Initialize bitmap plotting tables +bitmap_init: { + .label _4 = $88 + .label _5 = $89 + .label _6 = $8a + .label _7 = $87 + .label bits = $23 + .label x = $24 + .label y = $25 + .label yoffs = $26 + //SEG195 [110] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + b1_from_bitmap_init: + //SEG196 [110] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + lda #0 + sta x + //SEG197 [110] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + lda #$80 + sta bits + jmp b1 + //SEG198 [110] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + b1_from_b2: + //SEG199 [110] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG200 [110] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + jmp b1 + //SEG201 bitmap_init::@1 + b1: + //SEG202 [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + lda bits + ldy x + sta bitmap_plot_bit,y + //SEG203 [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + lsr bits + //SEG204 [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + lda bits + cmp #0 + bne b6_from_b1 + //SEG205 [115] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + b2_from_b1: + //SEG206 [115] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + lda #$80 + sta bits + jmp b2 + //SEG207 [114] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + b6_from_b1: + jmp b6 + //SEG208 bitmap_init::@6 + b6: + //SEG209 [115] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + b2_from_b6: + //SEG210 [115] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + jmp b2 + //SEG211 bitmap_init::@2 + b2: + //SEG212 [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG213 [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + lda x + cmp #0 + bne b1_from_b2 + //SEG214 [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + b3_from_b2: + //SEG215 [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + lda #BITMAP + sta yoffs+1 + //SEG216 [118] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + lda #0 + sta y + jmp b3 + //SEG217 [118] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + b3_from_b4: + //SEG218 [118] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG219 [118] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + jmp b3 + //SEG220 bitmap_init::@3 + b3: + //SEG221 [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + lda #7 + and y + sta _7 + //SEG222 [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + lda yoffs + sta _4 + //SEG223 [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + lda _7 + ora _4 + sta _5 + //SEG224 [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _5 + ldy y + sta bitmap_plot_ylo,y + //SEG225 [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + lda yoffs+1 + sta _6 + //SEG226 [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + lda _6 + ldy y + sta bitmap_plot_yhi,y + //SEG227 [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + lda #7 + cmp _7 + bne b4_from_b3 + jmp b5 + //SEG228 bitmap_init::@5 + b5: + //SEG229 [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + clc + lda yoffs + adc #<$28*8 + sta yoffs + lda yoffs+1 + adc #>$28*8 + sta yoffs+1 + //SEG230 [127] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + b4_from_b3: + b4_from_b5: + //SEG231 [127] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + jmp b4 + //SEG232 bitmap_init::@4 + b4: + //SEG233 [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + inc y + //SEG234 [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + lda y + cmp #0 + bne b3_from_b4 + jmp breturn + //SEG235 bitmap_init::@return + breturn: + //SEG236 [130] return + rts +} +//SEG237 sin16s_gen2 +// Generate signed word sinus table - with values in the range min-max. +// sintab - the table to generate into +// wavelength - the number of sinus points in a total sinus wavelength (the size of the table) +// sin16s_gen2(signed word* zeropage($2c) sintab) +sin16s_gen2: { + .label wavelength = $200 + .const min = -$1001 + .const max = $1001 + .const ampl = max-min + .label _5 = $99 + .label _6 = $9d + .label step = $8f + .label sintab = $2c + .label x = $28 + .label i = $2e + //SEG238 [132] call div32u16u + //SEG239 [199] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + div32u16u_from_sin16s_gen2: + jsr div32u16u + //SEG240 [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 + lda div32u16u.return + sta div32u16u.return_2 + lda div32u16u.return+1 + sta div32u16u.return_2+1 + lda div32u16u.return+2 + sta div32u16u.return_2+2 + lda div32u16u.return+3 + sta div32u16u.return_2+3 + jmp b2 + //SEG241 sin16s_gen2::@2 + b2: + //SEG242 [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 + lda div32u16u.return_2 + sta step + lda div32u16u.return_2+1 + sta step+1 + lda div32u16u.return_2+2 + sta step+2 + lda div32u16u.return_2+3 + sta step+3 + //SEG243 [135] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + b1_from_b2: + //SEG244 [135] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + lda #0 + sta i + lda #0 + sta i+1 + //SEG245 [135] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + lda #SINUS + sta sintab+1 + //SEG246 [135] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + lda #0 + sta x + lda #0 + sta x+1 + sta x+2 + sta x+3 + jmp b1 + // u[4.28] + //SEG247 [135] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + b1_from_b4: + //SEG248 [135] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG249 [135] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG250 [135] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + jmp b1 + //SEG251 sin16s_gen2::@1 + b1: + //SEG252 [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + lda x + sta sin16s.x + lda x+1 + sta sin16s.x+1 + lda x+2 + sta sin16s.x+2 + lda x+3 + sta sin16s.x+3 + //SEG253 [137] call sin16s + jsr sin16s + //SEG254 [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 + lda sin16s.return_1 + sta sin16s.return + lda sin16s.return_1+1 + sta sin16s.return+1 + jmp b3 + //SEG255 sin16s_gen2::@3 + b3: + //SEG256 [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 + lda sin16s.return + sta mul16s.a + lda sin16s.return+1 + sta mul16s.a+1 + //SEG257 [140] call mul16s + //SEG258 [58] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] + mul16s_from_b3: + //SEG259 [58] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 + lda #ampl + sta mul16s.b+1 + //SEG260 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy + jsr mul16s + //SEG261 [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + lda mul16s.return + sta mul16s.return_2 + lda mul16s.return+1 + sta mul16s.return_2+1 + lda mul16s.return+2 + sta mul16s.return_2+2 + lda mul16s.return+3 + sta mul16s.return_2+3 + jmp b4 + //SEG262 sin16s_gen2::@4 + b4: + //SEG263 [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 + lda mul16s.return_2 + sta _5 + lda mul16s.return_2+1 + sta _5+1 + lda mul16s.return_2+2 + sta _5+2 + lda mul16s.return_2+3 + sta _5+3 + //SEG264 [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + lda _5+2 + sta _6 + lda _5+3 + sta _6+1 + //SEG265 [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + ldy #0 + lda _6 + sta (sintab),y + iny + lda _6+1 + sta (sintab),y + //SEG266 [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + lda #SIZEOF_SIGNED_WORD + clc + adc sintab + sta sintab + bcc !+ + inc sintab+1 + !: + //SEG267 [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + lda x + clc + adc step + sta x + lda x+1 + adc step+1 + sta x+1 + lda x+2 + adc step+2 + sta x+2 + lda x+3 + adc step+3 + sta x+3 + //SEG268 [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + inc i + bne !+ + inc i+1 + !: + //SEG269 [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + lda i+1 + cmp #>wavelength + bcc b1_from_b4 + bne !+ + lda i + cmp #PI_u4f28>>$10 + bcc b1_from_sin16s + bne !+ + lda x+2 + cmp #>$10 + bcc b1_from_sin16s + bne !+ + lda x+1 + cmp #>PI_u4f28 + bcc b1_from_sin16s + bne !+ + lda x + cmp #PI_u4f28 + sta x+1 + lda x+2 + sbc #>$10 + sta x+2 + lda x+3 + sbc #>PI_u4f28>>$10 + sta x+3 + //SEG276 [152] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + b1_from_b4: + //SEG277 [152] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + lda #1 + sta isUpper + //SEG278 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + jmp b1 + //SEG279 [152] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + b1_from_sin16s: + //SEG280 [152] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + lda #0 + sta isUpper + //SEG281 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + jmp b1 + //SEG282 sin16s::@1 + b1: + //SEG283 [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + lda x+3 + cmp #>PI_HALF_u4f28>>$10 + bcc b2_from_b1 + bne !+ + lda x+2 + cmp #>$10 + bcc b2_from_b1 + bne !+ + lda x+1 + cmp #>PI_HALF_u4f28 + bcc b2_from_b1 + bne !+ + lda x + cmp #PI_u4f28 + sbc x+1 + sta x+1 + lda #>$10 + sbc x+2 + sta x+2 + lda #>PI_u4f28>>$10 + sbc x+3 + sta x+3 + //SEG286 [155] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + b2_from_b1: + b2_from_b5: + //SEG287 [155] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + jmp b2 + //SEG288 sin16s::@2 + b2: + //SEG289 [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 + lda x + sta _4 + lda x+1 + sta _4+1 + lda x+2 + sta _4+2 + lda x+3 + sta _4+3 + ldy #3 + !: + asl _4 + rol _4+1 + rol _4+2 + rol _4+3 + dey + bne !- + //SEG290 [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + lda _4+2 + sta x1 + lda _4+3 + sta x1+1 + //SEG291 [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v1 + lda x1+1 + sta mulu16_sel.v1+1 + //SEG292 [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG293 [160] call mulu16_sel + //SEG294 [190] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + mulu16_sel_from_b2: + //SEG295 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 + lda #0 + sta mulu16_sel.select + //SEG296 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG297 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG298 [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return_12 + sta mulu16_sel.return + lda mulu16_sel.return_12+1 + sta mulu16_sel.return+1 + jmp b7 + //SEG299 sin16s::@7 + b7: + //SEG300 [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta x2 + lda mulu16_sel.return+1 + sta x2+1 + //SEG301 [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 + lda x2 + sta mulu16_sel.v1 + lda x2+1 + sta mulu16_sel.v1+1 + //SEG302 [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG303 [165] call mulu16_sel + //SEG304 [190] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + mulu16_sel_from_b7: + //SEG305 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 + lda #1 + sta mulu16_sel.select + //SEG306 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG307 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG308 [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return_12 + sta mulu16_sel.return_1 + lda mulu16_sel.return_12+1 + sta mulu16_sel.return_1+1 + jmp b8 + //SEG309 sin16s::@8 + b8: + //SEG310 [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 + lda mulu16_sel.return_1 + sta x3 + lda mulu16_sel.return_1+1 + sta x3+1 + //SEG311 [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + lda x3 + sta mulu16_sel.v1 + lda x3+1 + sta mulu16_sel.v1+1 + //SEG312 [169] call mulu16_sel + //SEG313 [190] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + mulu16_sel_from_b8: + //SEG314 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 + lda #1 + sta mulu16_sel.select + //SEG315 [190] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + lda #<$10000/6 + sta mulu16_sel.v2 + lda #>$10000/6 + sta mulu16_sel.v2+1 + //SEG316 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG317 [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return_12 + sta mulu16_sel.return_2 + lda mulu16_sel.return_12+1 + sta mulu16_sel.return_2+1 + jmp b9 + //SEG318 sin16s::@9 + b9: + //SEG319 [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 + lda mulu16_sel.return_2 + sta x3_6 + lda mulu16_sel.return_2+1 + sta x3_6+1 + //SEG320 [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + lda x1 + sec + sbc x3_6 + sta usinx + lda x1+1 + sbc x3_6+1 + sta usinx+1 + //SEG321 [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + lda x3 + sta mulu16_sel.v1 + lda x3+1 + sta mulu16_sel.v1+1 + //SEG322 [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG323 [175] call mulu16_sel + //SEG324 [190] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + mulu16_sel_from_b9: + //SEG325 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 + lda #0 + sta mulu16_sel.select + //SEG326 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG327 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG328 [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return_12 + sta mulu16_sel.return_10 + lda mulu16_sel.return_12+1 + sta mulu16_sel.return_10+1 + jmp b10 + //SEG329 sin16s::@10 + b10: + //SEG330 [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 + lda mulu16_sel.return_10 + sta x4 + lda mulu16_sel.return_10+1 + sta x4+1 + //SEG331 [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 + lda x4 + sta mulu16_sel.v1 + lda x4+1 + sta mulu16_sel.v1+1 + //SEG332 [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG333 [180] call mulu16_sel + //SEG334 [190] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + mulu16_sel_from_b10: + //SEG335 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 + lda #0 + sta mulu16_sel.select + //SEG336 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG337 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG338 [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return_12 + sta mulu16_sel.return_11 + lda mulu16_sel.return_12+1 + sta mulu16_sel.return_11+1 + jmp b11 + //SEG339 sin16s::@11 + b11: + //SEG340 [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 + lda mulu16_sel.return_11 + sta x5 + lda mulu16_sel.return_11+1 + sta x5+1 + //SEG341 [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + lda x5+1 + lsr + sta x5_128+1 + lda x5 + ror + sta x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + //SEG342 [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 + lda usinx + clc + adc x5_128 + sta usinx_1 + lda usinx+1 + adc x5_128+1 + sta usinx_1+1 + //SEG343 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + lda isUpper + cmp #0 + beq b12 + jmp b6 + //SEG344 sin16s::@6 + b6: + //SEG345 [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 + sec + lda #0 + sbc usinx_1 + sta sinx + lda #0 + sbc usinx_1+1 + sta sinx+1 + //SEG346 [187] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + b3_from_b12: + b3_from_b6: + //SEG347 [187] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + jmp b3 + //SEG348 sin16s::@3 + b3: + jmp breturn + //SEG349 sin16s::@return + breturn: + //SEG350 [188] return + rts + //SEG351 sin16s::@12 + b12: + //SEG352 [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 + lda usinx_1 + sta return_5 + lda usinx_1+1 + sta return_5+1 + jmp b3_from_b12 +} +//SEG353 mulu16_sel +// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. +// The select parameter indicates how many of the highest bits of the 32-bit result to skip +// mulu16_sel(word zeropage($37) v1, word zeropage($39) v2, byte zeropage($3b) select) +mulu16_sel: { + .label _0 = $c3 + .label _1 = $c7 + .label v1 = $37 + .label v2 = $39 + .label return = $a5 + .label return_1 = $a9 + .label return_2 = $ad + .label return_10 = $b3 + .label return_11 = $b7 + .label select = $3b + .label return_12 = $cb + //SEG354 [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + lda v1 + sta mul16u.a + lda v1+1 + sta mul16u.a+1 + //SEG355 [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 + lda v2 + sta mul16u.b + lda v2+1 + sta mul16u.b+1 + //SEG356 [193] call mul16u + //SEG357 [76] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + mul16u_from_mulu16_sel: + //SEG358 [76] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG359 [76] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + lda mul16u.b + sta mul16u.mb + lda mul16u.b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + jsr mul16u + //SEG360 [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 + lda mul16u.res + sta mul16u.return_3 + lda mul16u.res+1 + sta mul16u.return_3+1 + lda mul16u.res+2 + sta mul16u.return_3+2 + lda mul16u.res+3 + sta mul16u.return_3+3 + jmp b1 + //SEG361 mulu16_sel::@1 + b1: + //SEG362 [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 + lda mul16u.return_3 + sta _0 + lda mul16u.return_3+1 + sta _0+1 + lda mul16u.return_3+2 + sta _0+2 + lda mul16u.return_3+3 + sta _0+3 + //SEG363 [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 + lda _0 + sta _1 + lda _0+1 + sta _1+1 + lda _0+2 + sta _1+2 + lda _0+3 + sta _1+3 + ldx select + beq !e+ + !: + asl _1 + rol _1+1 + rol _1+2 + rol _1+3 + dex + bne !- + !e: + //SEG364 [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + lda _1+2 + sta return_12 + lda _1+3 + sta return_12+1 + jmp breturn + //SEG365 mulu16_sel::@return + breturn: + //SEG366 [198] return + rts +} +//SEG367 div32u16u +// Divide unsigned 32-bit dword dividend with a 16-bit word divisor +// The 16-bit word remainder can be found in rem16u after the division +div32u16u: { + .label quotient_hi = $cf + .label quotient_lo = $d3 + .label return = $d5 + .label return_2 = $8b + //SEG368 [200] call divr16u + //SEG369 [209] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + divr16u_from_div32u16u: + //SEG370 [209] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + lda #>$10 + sta divr16u.dividend + lda #>PI2_u4f28>>$10 + sta divr16u.dividend+1 + //SEG371 [209] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + lda #0 + sta divr16u.rem + lda #0 + sta divr16u.rem+1 + jsr divr16u + //SEG372 [201] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + lda divr16u.return + sta divr16u.return_2 + lda divr16u.return+1 + sta divr16u.return_2+1 + jmp b1 + //SEG373 div32u16u::@1 + b1: + //SEG374 [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + lda divr16u.return_2 + sta quotient_hi + lda divr16u.return_2+1 + sta quotient_hi+1 + //SEG375 [203] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 + lda rem16u + sta divr16u.rem + lda rem16u+1 + sta divr16u.rem+1 + //SEG376 [204] call divr16u + //SEG377 [209] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + divr16u_from_b1: + //SEG378 [209] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + lda #PI2_u4f28&$ffff + sta divr16u.dividend+1 + //SEG379 [209] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + jsr divr16u + //SEG380 [205] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + lda divr16u.return + sta divr16u.return_3 + lda divr16u.return+1 + sta divr16u.return_3+1 + jmp b2 + //SEG381 div32u16u::@2 + b2: + //SEG382 [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 + lda divr16u.return_3 + sta quotient_lo + lda divr16u.return_3+1 + sta quotient_lo+1 + //SEG383 [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + lda quotient_hi + sta return+2 + lda quotient_hi+1 + sta return+3 + lda quotient_lo + sta return + lda quotient_lo+1 + sta return+1 + jmp breturn + //SEG384 div32u16u::@return + breturn: + //SEG385 [208] return + rts +} +//SEG386 divr16u +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage($3e) dividend, word zeropage($3c) rem) +divr16u: { + .label _1 = $d9 + .label _2 = $da + .label rem = $3c + .label dividend = $3e + .label quotient = $40 + .label i = $42 + .label return = $40 + .label return_2 = $cd + .label return_3 = $d1 + //SEG387 [210] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + b1_from_divr16u: + //SEG388 [210] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + lda #0 + sta i + //SEG389 [210] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + lda #0 + sta quotient + lda #0 + sta quotient+1 + //SEG390 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG391 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + jmp b1 + //SEG392 [210] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + b1_from_b3: + //SEG393 [210] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG394 [210] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG395 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG396 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + jmp b1 + //SEG397 divr16u::@1 + b1: + //SEG398 [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl rem + rol rem+1 + //SEG399 [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 + lda dividend+1 + sta _1 + //SEG400 [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + lda #$80 + and _1 + sta _2 + //SEG401 [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + lda _2 + cmp #0 + beq b2_from_b1 + jmp b4 + //SEG402 divr16u::@4 + b4: + //SEG403 [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + lda #1 + ora rem + sta rem + //SEG404 [216] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + b2_from_b1: + b2_from_b4: + //SEG405 [216] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + jmp b2 + //SEG406 divr16u::@2 + b2: + //SEG407 [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl dividend + rol dividend+1 + //SEG408 [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl quotient + rol quotient+1 + //SEG409 [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + lda rem+1 + cmp #>sin16s_gen2.wavelength + bcc b3_from_b2 + bne !+ + lda rem + cmp #sin16s_gen2.wavelength + sta rem+1 + //SEG413 [222] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + b3_from_b2: + b3_from_b5: + //SEG414 [222] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG415 [222] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + jmp b3 + //SEG416 divr16u::@3 + b3: + //SEG417 [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG418 [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$10 + cmp i + bne b1_from_b3 + jmp b6 + //SEG419 divr16u::@6 + b6: + //SEG420 [225] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 + lda rem + sta rem16u + lda rem+1 + sta rem16u+1 + jmp breturn + //SEG421 divr16u::@return + breturn: + //SEG422 [226] return + rts +} +//SEG423 irq +// Interrupt Routine counting frames +irq: { + //SEG424 entry interrupt(HARDWARE_CLOBBER) + sta rega+1 + stx regx+1 + sty regy+1 + //SEG425 [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + lda #WHITE + sta BGCOL + //SEG426 [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp frame_cnt + beq b1_from_irq + jmp b2 + //SEG427 irq::@2 + b2: + //SEG428 [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + inc frame_cnt + //SEG429 [230] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + b1_from_irq: + b1_from_b2: + //SEG430 [230] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + jmp b1 + //SEG431 irq::@1 + b1: + //SEG432 [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + lda #BLACK + sta BGCOL + //SEG433 [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Acknowledge the IRQ + lda #IRQ_RASTER + sta IRQ_STATUS + jmp breturn + //SEG434 irq::@return + breturn: + //SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + rega: + lda #00 + regx: + ldx #00 + regy: + ldy #00 + rti +} +//SEG436 File Data + // Tables for the plotter - initialized by calling bitmap_init(); + bitmap_plot_ylo: .fill $100, 0 + bitmap_plot_yhi: .fill $100, 0 + bitmap_plot_bit: .fill $100, 0 + plots_per_frame: .fill $100, 0 + .align $100 + SINUS: .fill 2*$200, 0 + +REGISTER UPLIFT POTENTIAL REGISTERS +Equivalence Class zp ZP_BYTE:136 [ bitmap_init::$4 ] has ALU potential. +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ) always clobbers reg byte a +Statement [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ) always clobbers reg byte a +Statement [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ) always clobbers reg byte a reg byte y +Statement [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ) always clobbers reg byte a +Statement [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ) always clobbers reg byte a +Statement [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ) always clobbers reg byte a +Statement [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ) always clobbers reg byte a +Statement [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ) always clobbers reg byte a +Statement [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ) always clobbers reg byte a +Statement [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ) always clobbers reg byte a +Statement [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ) always clobbers reg byte a +Statement [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ) always clobbers reg byte a +Statement [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ) always clobbers reg byte a reg byte y +Statement [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ) always clobbers reg byte a +Statement [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ) always clobbers reg byte a +Statement [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ) always clobbers reg byte a +Statement [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ) always clobbers reg byte a +Statement [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ) always clobbers reg byte a +Statement [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ) always clobbers reg byte a +Statement [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ) always clobbers reg byte a +Statement [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ) always clobbers reg byte a +Statement [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte x +Statement [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a +Statement [42] if((word) main::idx_x#1<(word) $200) goto main::@13 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a +Statement [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [46] if((word) main::idx_y#1<(word) $200) goto main::@14 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::$3 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 ] ) always clobbers reg byte a +Statement [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a +Statement [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a +Statement [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a +Statement [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte a reg byte y +Statement [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ) always clobbers reg byte a +Statement [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ) always clobbers reg byte a +Statement [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:59 [ mulu16_sel::select#5 ] +Statement [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [91] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:32 [ memset::c#3 ] +Statement [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ memset::c#3 ] +Statement [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] +Statement [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a +Statement [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Statement [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [201] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [203] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [205] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] +Statement [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [225] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [233] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [1] (byte) frame_cnt#0 ← (byte) 1 [ frame_cnt#0 ] ( ) always clobbers reg byte a +Statement [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ frame_cnt#0 ] ( main:3 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$28 ] ) always clobbers reg byte a +Statement [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$30 ] ) always clobbers reg byte a +Statement [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 ] ) always clobbers reg byte a reg byte y +Statement [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::cos_x#0 mul16s::a#1 ] ) always clobbers reg byte a +Statement [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#1 mul16s::b#1 ] ) always clobbers reg byte a +Statement [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#3 ] ) always clobbers reg byte a +Statement [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::xpos#0 ] ) always clobbers reg byte a +Statement [24] (word~) main::$9 ← > (signed dword) main::xpos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$9 ] ) always clobbers reg byte a +Statement [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 main::$11 ] ) always clobbers reg byte a +Statement [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 ] ) always clobbers reg byte a +Statement [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$29 ] ) always clobbers reg byte a +Statement [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$31 ] ) always clobbers reg byte a +Statement [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 ] ) always clobbers reg byte a reg byte y +Statement [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::sin_y#0 mul16s::a#2 ] ) always clobbers reg byte a +Statement [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#2 mul16s::b#2 ] ) always clobbers reg byte a +Statement [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#4 ] ) always clobbers reg byte a +Statement [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::ypos#0 ] ) always clobbers reg byte a +Statement [35] (word~) main::$15 ← > (signed dword) main::ypos#0 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$15 ] ) always clobbers reg byte a +Statement [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$17 ] ) always clobbers reg byte a +Statement [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 main::$18 ] ) always clobbers reg byte a +Statement [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::y#0 ] ) always clobbers reg byte a +Statement [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ( main:3 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte x +Statement [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a +Statement [42] if((word) main::idx_x#1<(word) $200) goto main::@13 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_y#3 main::idx_x#1 ] ) always clobbers reg byte a +Statement [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [46] if((word) main::idx_y#1<(word) $200) goto main::@14 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ( main:3 [ frame_cnt#0 main::r#10 main::idx_x#10 main::idx_y#1 ] ) always clobbers reg byte a +Statement [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ( main:3 [ frame_cnt#0 main::idx_x#10 main::r#1 main::idx_y#10 ] ) always clobbers reg byte a +Statement [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) [ bitmap_plot::x#0 bitmap_plot::$3 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 ] ) always clobbers reg byte a +Statement [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 [ bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a +Statement [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#0 bitmap_plot::plotter#1 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 bitmap_plot::plotter#1 ] ) always clobbers reg byte a +Statement [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a +Statement [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::bitmap_plot:39 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 ] ) always clobbers reg byte a reg byte y +Statement [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 ] ) always clobbers reg byte a +Statement [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 [ mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::mb#6 mul16u::a#8 ] ) always clobbers reg byte a +Statement [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::return#2 ] ) always clobbers reg byte a +Statement [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 ] ) always clobbers reg byte a +Statement [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 [ mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16s::m#1 ] ) always clobbers reg byte a +Statement [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 [ mul16s::a#3 mul16s::m#5 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 ] ) always clobbers reg byte a +Statement [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 [ mul16s::a#3 mul16s::m#5 mul16s::$13 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::m#5 mul16s::$13 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::m#5 mul16s::$13 ] ) always clobbers reg byte a +Statement [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 [ mul16s::m#5 mul16s::$17 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#5 mul16s::$17 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#5 mul16s::$17 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#5 mul16s::$17 ] ) always clobbers reg byte a +Statement [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 [ mul16s::m#2 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::m#2 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::m#2 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#2 ] ) always clobbers reg byte a +Statement [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::mul16s:21 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::return#0 ] main:3::mul16s:32 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::return#0 ] main:3::sin16s_gen2:6::mul16s:140 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::mul16s:21::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::mul16s:32::mul16u:61 [ frame_cnt#0 main::idx_x#3 main::r#10 main::idx_y#3 bitmap_plot::x#0 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::mul16s:140::mul16u:61 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#3 mul16s::b#3 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180::mul16u:193 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [91] *((const byte*) RASTER#0) ← (byte) 0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() [ ] ( main:3::init_irq:14 [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:10::memset:97 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:10::memset:99 [ frame_cnt#0 memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:8 [ frame_cnt#0 bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 div32u16u::return#2 ] ) always clobbers reg byte a +Statement [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 mul16s::a#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a +Statement [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a +Statement [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:6 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [150] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [151] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [154] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:6::sin16s:137 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:160 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:165 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:169 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:175 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:6::sin16s:137::mulu16_sel:180 [ frame_cnt#0 sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [201] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [203] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [205] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:6::div32u16u:132 [ frame_cnt#0 div32u16u::return#0 ] ) always clobbers reg byte a +Statement [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [221] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) sin16s_gen2::wavelength#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [225] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:6::div32u16u:132::divr16u:200 [ frame_cnt#0 divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:6::div32u16u:132::divr16u:204 [ frame_cnt#0 div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 [ frame_cnt#0 ] ( [ frame_cnt#0 ] ) always clobbers reg byte a +Statement [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [233] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Potential registers zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] : zp ZP_WORD:2 , +Potential registers zp ZP_WORD:4 [ main::r#10 main::r#1 ] : zp ZP_WORD:4 , +Potential registers zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] : zp ZP_WORD:6 , +Potential registers zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] : zp ZP_WORD:8 , +Potential registers zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] : zp ZP_WORD:10 , +Potential registers zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] : zp ZP_DWORD:12 , +Potential registers zp ZP_WORD:16 [ mul16u::b#1 ] : zp ZP_WORD:16 , +Potential registers zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] : zp ZP_WORD:18 , +Potential registers zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] : zp ZP_DWORD:20 , +Potential registers zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] : zp ZP_DWORD:24 , +Potential registers zp ZP_WORD:28 [ memset::str#2 ] : zp ZP_WORD:28 , +Potential registers zp ZP_WORD:30 [ memset::num#2 ] : zp ZP_WORD:30 , +Potential registers zp ZP_BYTE:32 [ memset::c#3 ] : zp ZP_BYTE:32 , reg byte x , +Potential registers zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:33 , +Potential registers zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:35 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:36 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp ZP_BYTE:37 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp ZP_WORD:38 , +Potential registers zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] : zp ZP_DWORD:40 , +Potential registers zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] : zp ZP_WORD:44 , +Potential registers zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] : zp ZP_WORD:46 , +Potential registers zp ZP_BYTE:48 [ sin16s::isUpper#2 ] : zp ZP_BYTE:48 , reg byte x , +Potential registers zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] : zp ZP_DWORD:49 , +Potential registers zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] : zp ZP_WORD:53 , +Potential registers zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] : zp ZP_WORD:55 , +Potential registers zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] : zp ZP_WORD:57 , +Potential registers zp ZP_BYTE:59 [ mulu16_sel::select#5 ] : zp ZP_BYTE:59 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] : zp ZP_WORD:60 , +Potential registers zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp ZP_WORD:62 , +Potential registers zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:64 , +Potential registers zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:66 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] : zp ZP_BYTE:67 , +Potential registers zp ZP_WORD:68 [ main::$28 ] : zp ZP_WORD:68 , +Potential registers zp ZP_WORD:70 [ main::$30 ] : zp ZP_WORD:70 , +Potential registers zp ZP_WORD:72 [ main::cos_x#0 ] : zp ZP_WORD:72 , +Potential registers zp ZP_DWORD:74 [ mul16s::return#3 ] : zp ZP_DWORD:74 , +Potential registers zp ZP_DWORD:78 [ main::xpos#0 ] : zp ZP_DWORD:78 , +Potential registers zp ZP_WORD:82 [ main::$9 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ main::$11 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ bitmap_plot::x#0 ] : zp ZP_WORD:86 , +Potential registers zp ZP_WORD:88 [ main::$29 ] : zp ZP_WORD:88 , +Potential registers zp ZP_WORD:90 [ main::$31 ] : zp ZP_WORD:90 , +Potential registers zp ZP_WORD:92 [ main::sin_y#0 ] : zp ZP_WORD:92 , +Potential registers zp ZP_DWORD:94 [ mul16s::return#4 ] : zp ZP_DWORD:94 , +Potential registers zp ZP_DWORD:98 [ main::ypos#0 ] : zp ZP_DWORD:98 , +Potential registers zp ZP_WORD:102 [ main::$15 ] : zp ZP_WORD:102 , +Potential registers zp ZP_WORD:104 [ main::$17 ] : zp ZP_WORD:104 , +Potential registers zp ZP_WORD:106 [ main::$18 ] : zp ZP_WORD:106 , +Potential registers zp ZP_BYTE:108 [ bitmap_plot::y#0 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:109 [ bitmap_plot::$3 ] : zp ZP_WORD:109 , +Potential registers zp ZP_WORD:111 [ bitmap_plot::$1 ] : zp ZP_WORD:111 , +Potential registers zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] : zp ZP_WORD:113 , +Potential registers zp ZP_BYTE:115 [ bitmap_plot::$2 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:116 [ mul16u::return#2 ] : zp ZP_DWORD:116 , +Potential registers zp ZP_WORD:120 [ mul16s::$9 ] : zp ZP_WORD:120 , +Potential registers zp ZP_WORD:122 [ mul16s::$16 ] : zp ZP_WORD:122 , +Potential registers zp ZP_WORD:124 [ mul16s::$13 ] : zp ZP_WORD:124 , +Potential registers zp ZP_WORD:126 [ mul16s::$17 ] : zp ZP_WORD:126 , +Potential registers zp ZP_DWORD:128 [ mul16s::return#0 ] : zp ZP_DWORD:128 , +Potential registers zp ZP_BYTE:132 [ mul16u::$1 ] : zp ZP_BYTE:132 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:133 [ memset::end#0 ] : zp ZP_WORD:133 , +Potential registers zp ZP_BYTE:135 [ bitmap_init::$7 ] : zp ZP_BYTE:135 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:136 [ bitmap_init::$4 ] : zp ZP_BYTE:136 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:137 [ bitmap_init::$5 ] : zp ZP_BYTE:137 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:138 [ bitmap_init::$6 ] : zp ZP_BYTE:138 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:139 [ div32u16u::return#2 ] : zp ZP_DWORD:139 , +Potential registers zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] : zp ZP_DWORD:143 , +Potential registers zp ZP_WORD:147 [ sin16s::return#0 ] : zp ZP_WORD:147 , +Potential registers zp ZP_DWORD:149 [ mul16s::return#2 ] : zp ZP_DWORD:149 , +Potential registers zp ZP_DWORD:153 [ sin16s_gen2::$5 ] : zp ZP_DWORD:153 , +Potential registers zp ZP_WORD:157 [ sin16s_gen2::$6 ] : zp ZP_WORD:157 , +Potential registers zp ZP_DWORD:159 [ sin16s::$4 ] : zp ZP_DWORD:159 , +Potential registers zp ZP_WORD:163 [ sin16s::x1#0 ] : zp ZP_WORD:163 , +Potential registers zp ZP_WORD:165 [ mulu16_sel::return#0 ] : zp ZP_WORD:165 , +Potential registers zp ZP_WORD:167 [ sin16s::x2#0 ] : zp ZP_WORD:167 , +Potential registers zp ZP_WORD:169 [ mulu16_sel::return#1 ] : zp ZP_WORD:169 , +Potential registers zp ZP_WORD:171 [ sin16s::x3#0 ] : zp ZP_WORD:171 , +Potential registers zp ZP_WORD:173 [ mulu16_sel::return#2 ] : zp ZP_WORD:173 , +Potential registers zp ZP_WORD:175 [ sin16s::x3_6#0 ] : zp ZP_WORD:175 , +Potential registers zp ZP_WORD:177 [ sin16s::usinx#0 ] : zp ZP_WORD:177 , +Potential registers zp ZP_WORD:179 [ mulu16_sel::return#10 ] : zp ZP_WORD:179 , +Potential registers zp ZP_WORD:181 [ sin16s::x4#0 ] : zp ZP_WORD:181 , +Potential registers zp ZP_WORD:183 [ mulu16_sel::return#11 ] : zp ZP_WORD:183 , +Potential registers zp ZP_WORD:185 [ sin16s::x5#0 ] : zp ZP_WORD:185 , +Potential registers zp ZP_WORD:187 [ sin16s::x5_128#0 ] : zp ZP_WORD:187 , +Potential registers zp ZP_WORD:189 [ sin16s::usinx#1 ] : zp ZP_WORD:189 , +Potential registers zp ZP_DWORD:191 [ mul16u::return#3 ] : zp ZP_DWORD:191 , +Potential registers zp ZP_DWORD:195 [ mulu16_sel::$0 ] : zp ZP_DWORD:195 , +Potential registers zp ZP_DWORD:199 [ mulu16_sel::$1 ] : zp ZP_DWORD:199 , +Potential registers zp ZP_WORD:203 [ mulu16_sel::return#12 ] : zp ZP_WORD:203 , +Potential registers zp ZP_WORD:205 [ divr16u::return#2 ] : zp ZP_WORD:205 , +Potential registers zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] : zp ZP_WORD:207 , +Potential registers zp ZP_WORD:209 [ divr16u::return#3 ] : zp ZP_WORD:209 , +Potential registers zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] : zp ZP_WORD:211 , +Potential registers zp ZP_DWORD:213 [ div32u16u::return#0 ] : zp ZP_DWORD:213 , +Potential registers zp ZP_BYTE:217 [ divr16u::$1 ] : zp ZP_BYTE:217 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:218 [ divr16u::$2 ] : zp ZP_BYTE:218 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:219 [ rem16u#1 ] : zp ZP_WORD:219 , + +REGISTER UPLIFT SCOPES +Uplift Scope [mul16u] 346.86: zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] 253.57: zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] 202: zp ZP_BYTE:132 [ mul16u::$1 ] 180.67: zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] 4: zp ZP_WORD:16 [ mul16u::b#1 ] 4: zp ZP_DWORD:116 [ mul16u::return#2 ] 4: zp ZP_DWORD:191 [ mul16u::return#3 ] +Uplift Scope [main] 22: zp ZP_WORD:68 [ main::$28 ] 22: zp ZP_WORD:70 [ main::$30 ] 22: zp ZP_DWORD:78 [ main::xpos#0 ] 22: zp ZP_WORD:84 [ main::$11 ] 22: zp ZP_WORD:88 [ main::$29 ] 22: zp ZP_WORD:90 [ main::$31 ] 22: zp ZP_DWORD:98 [ main::ypos#0 ] 22: zp ZP_WORD:104 [ main::$17 ] 19.43: zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] 17.79: zp ZP_WORD:4 [ main::r#10 main::r#1 ] 15.41: zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] 11: zp ZP_WORD:72 [ main::cos_x#0 ] 11: zp ZP_WORD:82 [ main::$9 ] 11: zp ZP_WORD:92 [ main::sin_y#0 ] 11: zp ZP_WORD:102 [ main::$15 ] 11: zp ZP_WORD:106 [ main::$18 ] +Uplift Scope [divr16u] 106.92: zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:217 [ divr16u::$1 ] 22: zp ZP_BYTE:218 [ divr16u::$2 ] 18.19: zp ZP_BYTE:66 [ divr16u::i#2 divr16u::i#1 ] 9.75: zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] 4: zp ZP_WORD:205 [ divr16u::return#2 ] 4: zp ZP_WORD:209 [ divr16u::return#3 ] +Uplift Scope [mul16s] 46.69: zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] 46.18: zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] 22: zp ZP_DWORD:74 [ mul16s::return#3 ] 22: zp ZP_DWORD:94 [ mul16s::return#4 ] 22: zp ZP_DWORD:149 [ mul16s::return#2 ] 16.5: zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] 7: zp ZP_DWORD:128 [ mul16s::return#0 ] 4: zp ZP_WORD:120 [ mul16s::$9 ] 4: zp ZP_WORD:122 [ mul16s::$16 ] 4: zp ZP_WORD:124 [ mul16s::$13 ] 4: zp ZP_WORD:126 [ mul16s::$17 ] +Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:35 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:36 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:37 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:136 [ bitmap_init::$4 ] 22: zp ZP_BYTE:137 [ bitmap_init::$5 ] 22: zp ZP_BYTE:138 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:135 [ bitmap_init::$7 ] +Uplift Scope [sin16s] 27.5: zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] 22: zp ZP_WORD:147 [ sin16s::return#0 ] 13: zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] 4: zp ZP_DWORD:159 [ sin16s::$4 ] 4: zp ZP_WORD:167 [ sin16s::x2#0 ] 4: zp ZP_WORD:175 [ sin16s::x3_6#0 ] 4: zp ZP_WORD:181 [ sin16s::x4#0 ] 4: zp ZP_WORD:185 [ sin16s::x5#0 ] 4: zp ZP_WORD:187 [ sin16s::x5_128#0 ] 1: zp ZP_WORD:171 [ sin16s::x3#0 ] 1: zp ZP_WORD:189 [ sin16s::usinx#1 ] 0.64: zp ZP_WORD:163 [ sin16s::x1#0 ] 0.33: zp ZP_WORD:177 [ sin16s::usinx#0 ] 0.06: zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Uplift Scope [mulu16_sel] 24: zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:165 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:169 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:173 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:179 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:183 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:195 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:199 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:203 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:59 [ mulu16_sel::select#5 ] +Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:153 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:157 [ sin16s_gen2::$6 ] 10.33: zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] +Uplift Scope [] 44.6: zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] 0.8: zp ZP_WORD:219 [ rem16u#1 ] +Uplift Scope [memset] 38: zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:133 [ memset::end#0 ] 2: zp ZP_WORD:30 [ memset::num#2 ] 1.57: zp ZP_BYTE:32 [ memset::c#3 ] 0: zp ZP_WORD:28 [ memset::str#2 ] +Uplift Scope [bitmap_plot] 15: zp ZP_BYTE:108 [ bitmap_plot::y#0 ] 4: zp ZP_WORD:111 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:115 [ bitmap_plot::$2 ] 3: zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:109 [ bitmap_plot::$3 ] 0.69: zp ZP_WORD:86 [ bitmap_plot::x#0 ] +Uplift Scope [div32u16u] 4: zp ZP_DWORD:139 [ div32u16u::return#2 ] 4: zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:213 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] +Uplift Scope [bitmap_clear] +Uplift Scope [init_irq] +Uplift Scope [irq] + +Uplifting [mul16u] best 26843 combination zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:24 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:18 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:16 [ mul16u::b#1 ] zp ZP_DWORD:116 [ mul16u::return#2 ] zp ZP_DWORD:191 [ mul16u::return#3 ] +Uplifting [main] best 26843 combination zp ZP_WORD:68 [ main::$28 ] zp ZP_WORD:70 [ main::$30 ] zp ZP_DWORD:78 [ main::xpos#0 ] zp ZP_WORD:84 [ main::$11 ] zp ZP_WORD:88 [ main::$29 ] zp ZP_WORD:90 [ main::$31 ] zp ZP_DWORD:98 [ main::ypos#0 ] zp ZP_WORD:104 [ main::$17 ] zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] zp ZP_WORD:4 [ main::r#10 main::r#1 ] zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] zp ZP_WORD:72 [ main::cos_x#0 ] zp ZP_WORD:82 [ main::$9 ] zp ZP_WORD:92 [ main::sin_y#0 ] zp ZP_WORD:102 [ main::$15 ] zp ZP_WORD:106 [ main::$18 ] +Uplifting [divr16u] best 26633 combination zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:62 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:205 [ divr16u::return#2 ] zp ZP_WORD:209 [ divr16u::return#3 ] +Uplifting [mul16s] best 26633 combination zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] zp ZP_DWORD:74 [ mul16s::return#3 ] zp ZP_DWORD:94 [ mul16s::return#4 ] zp ZP_DWORD:149 [ mul16s::return#2 ] zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_DWORD:128 [ mul16s::return#0 ] zp ZP_WORD:120 [ mul16s::$9 ] zp ZP_WORD:122 [ mul16s::$16 ] zp ZP_WORD:124 [ mul16s::$13 ] zp ZP_WORD:126 [ mul16s::$17 ] +Uplifting [bitmap_init] best 26123 combination zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:137 [ bitmap_init::$5 ] zp ZP_BYTE:138 [ bitmap_init::$6 ] zp ZP_BYTE:135 [ bitmap_init::$7 ] +Limited combination testing to 100 combinations of 15360 possible. +Uplifting [sin16s] best 26123 combination zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:147 [ sin16s::return#0 ] zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:159 [ sin16s::$4 ] zp ZP_WORD:167 [ sin16s::x2#0 ] zp ZP_WORD:175 [ sin16s::x3_6#0 ] zp ZP_WORD:181 [ sin16s::x4#0 ] zp ZP_WORD:185 [ sin16s::x5#0 ] zp ZP_WORD:187 [ sin16s::x5_128#0 ] zp ZP_WORD:171 [ sin16s::x3#0 ] zp ZP_WORD:189 [ sin16s::usinx#1 ] zp ZP_WORD:163 [ sin16s::x1#0 ] zp ZP_WORD:177 [ sin16s::usinx#0 ] zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 26107 combination zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:165 [ mulu16_sel::return#0 ] zp ZP_WORD:169 [ mulu16_sel::return#1 ] zp ZP_WORD:173 [ mulu16_sel::return#2 ] zp ZP_WORD:179 [ mulu16_sel::return#10 ] zp ZP_WORD:183 [ mulu16_sel::return#11 ] zp ZP_DWORD:195 [ mulu16_sel::$0 ] zp ZP_DWORD:199 [ mulu16_sel::$1 ] zp ZP_WORD:203 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 26107 combination zp ZP_DWORD:153 [ sin16s_gen2::$5 ] zp ZP_WORD:46 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:157 [ sin16s_gen2::$6 ] zp ZP_DWORD:40 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:44 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] +Uplifting [] best 26107 combination zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] zp ZP_WORD:219 [ rem16u#1 ] +Uplifting [memset] best 26091 combination zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:133 [ memset::end#0 ] zp ZP_WORD:30 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:28 [ memset::str#2 ] +Uplifting [bitmap_plot] best 26056 combination reg byte a [ bitmap_plot::y#0 ] zp ZP_WORD:111 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] zp ZP_WORD:109 [ bitmap_plot::$3 ] zp ZP_WORD:86 [ bitmap_plot::x#0 ] +Uplifting [div32u16u] best 26056 combination zp ZP_DWORD:139 [ div32u16u::return#2 ] zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:213 [ div32u16u::return#0 ] zp ZP_WORD:207 [ div32u16u::quotient_hi#0 ] +Uplifting [bitmap_clear] best 26056 combination +Uplifting [init_irq] best 26056 combination +Uplifting [irq] best 26056 combination +Attempting to uplift remaining variables inzp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Uplifting [] best 26056 combination zp ZP_BYTE:67 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:137 [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 25996 combination reg byte a [ bitmap_init::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:138 [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 25936 combination reg byte a [ bitmap_init::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:135 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 25936 combination zp ZP_BYTE:135 [ bitmap_init::$7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 25936 combination zp ZP_BYTE:48 [ sin16s::isUpper#2 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 ] ] with [ zp ZP_WORD:8 [ mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:189 [ sin16s::usinx#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:171 [ sin16s::x3#0 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:60 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:219 [ rem16u#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 ] ] with [ zp ZP_WORD:72 [ main::cos_x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 ] ] with [ zp ZP_WORD:92 [ main::sin_y#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] ] with [ zp ZP_DWORD:116 [ mul16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 ] ] with [ zp ZP_DWORD:128 [ mul16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:16 [ mul16u::b#1 ] ] with [ zp ZP_WORD:57 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:191 [ mul16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:28 [ memset::str#2 ] ] with [ zp ZP_WORD:33 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ memset::num#2 ] ] with [ zp ZP_WORD:133 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:49 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:159 [ sin16s::$4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp ZP_WORD:147 [ sin16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:167 [ sin16s::x2#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:181 [ sin16s::x4#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:205 [ divr16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:209 [ divr16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:68 [ main::$28 ] ] with [ zp ZP_WORD:70 [ main::$30 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:74 [ mul16s::return#3 ] ] with [ zp ZP_DWORD:78 [ main::xpos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ main::$9 ] ] with [ zp ZP_WORD:84 [ main::$11 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:88 [ main::$29 ] ] with [ zp ZP_WORD:90 [ main::$31 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:94 [ mul16s::return#4 ] ] with [ zp ZP_DWORD:98 [ main::ypos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:102 [ main::$15 ] ] with [ zp ZP_WORD:104 [ main::$17 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:109 [ bitmap_plot::$3 ] ] with [ zp ZP_WORD:113 [ bitmap_plot::plotter#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:120 [ mul16s::$9 ] ] with [ zp ZP_WORD:122 [ mul16s::$16 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:124 [ mul16s::$13 ] ] with [ zp ZP_WORD:126 [ mul16s::$17 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:139 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:143 [ sin16s_gen2::step#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:139 [ div32u16u::return#2 sin16s_gen2::step#0 ] ] with [ zp ZP_DWORD:213 [ div32u16u::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:149 [ mul16s::return#2 ] ] with [ zp ZP_DWORD:153 [ sin16s_gen2::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 ] ] with [ zp ZP_WORD:203 [ mulu16_sel::return#12 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:173 [ mulu16_sel::return#2 ] ] with [ zp ZP_WORD:175 [ sin16s::x3_6#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:183 [ mulu16_sel::return#11 ] ] with [ zp ZP_WORD:185 [ sin16s::x5#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:195 [ mulu16_sel::$0 ] ] with [ zp ZP_DWORD:199 [ mulu16_sel::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 ] ] with [ zp ZP_WORD:53 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 ] ] with [ zp ZP_WORD:68 [ main::$28 main::$30 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:10 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 ] ] with [ zp ZP_WORD:88 [ main::$29 main::$31 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 ] ] with [ zp ZP_DWORD:20 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] with [ zp ZP_DWORD:74 [ mul16s::return#3 main::xpos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 ] ] with [ zp ZP_DWORD:94 [ mul16s::return#4 main::ypos#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 ] ] with [ zp ZP_DWORD:149 [ mul16s::return#2 sin16s_gen2::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp ZP_WORD:169 [ mulu16_sel::return#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp ZP_WORD:179 [ mulu16_sel::return#10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:64 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:211 [ div32u16u::quotient_lo#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ main::$9 main::$11 ] ] with [ zp ZP_WORD:86 [ bitmap_plot::x#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:102 [ main::$15 main::$17 ] ] with [ zp ZP_WORD:106 [ main::$18 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp ZP_WORD:173 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp ZP_WORD:183 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] with [ zp ZP_WORD:177 [ sin16s::usinx#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:12 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 ] ] with [ zp ZP_DWORD:195 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:165 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp ZP_WORD:187 [ sin16s::x5_128#0 ] ] - score: 1 +Allocated (was zp ZP_WORD:10) zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 main::$29 main::$31 ] +Allocated (was zp ZP_DWORD:12) zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] +Allocated (was zp ZP_WORD:16) zp ZP_WORD:14 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +Allocated (was zp ZP_WORD:18) zp ZP_WORD:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +Allocated (was zp ZP_DWORD:24) zp ZP_DWORD:18 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +Allocated (was zp ZP_WORD:28) zp ZP_WORD:22 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:38) zp ZP_WORD:26 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +Allocated (was zp ZP_DWORD:40) zp ZP_DWORD:28 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +Allocated (was zp ZP_WORD:44) zp ZP_WORD:32 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +Allocated (was zp ZP_WORD:46) zp ZP_WORD:34 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +Allocated (was zp ZP_BYTE:48) zp ZP_BYTE:36 [ sin16s::isUpper#2 ] +Allocated (was zp ZP_DWORD:49) zp ZP_DWORD:37 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +Allocated (was zp ZP_WORD:55) zp ZP_WORD:41 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] +Allocated (was zp ZP_WORD:60) zp ZP_WORD:43 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +Allocated (was zp ZP_WORD:62) zp ZP_WORD:45 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +Allocated (was zp ZP_WORD:64) zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +Allocated (was zp ZP_BYTE:67) zp ZP_BYTE:49 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +Allocated (was zp ZP_WORD:82) zp ZP_WORD:50 [ main::$9 main::$11 bitmap_plot::x#0 ] +Allocated (was zp ZP_WORD:102) zp ZP_WORD:52 [ main::$15 main::$17 main::$18 ] +Allocated (was zp ZP_WORD:109) zp ZP_WORD:54 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +Allocated (was zp ZP_WORD:111) zp ZP_WORD:56 [ bitmap_plot::$1 ] +Allocated (was zp ZP_WORD:120) zp ZP_WORD:58 [ mul16s::$9 mul16s::$16 ] +Allocated (was zp ZP_WORD:124) zp ZP_WORD:60 [ mul16s::$13 mul16s::$17 ] +Allocated (was zp ZP_BYTE:135) zp ZP_BYTE:62 [ bitmap_init::$7 ] +Allocated (was zp ZP_DWORD:139) zp ZP_DWORD:63 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +Allocated (was zp ZP_WORD:157) zp ZP_WORD:67 [ sin16s_gen2::$6 ] +Allocated (was zp ZP_WORD:163) zp ZP_WORD:69 [ sin16s::x1#0 ] +Allocated (was zp ZP_WORD:165) zp ZP_WORD:71 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +Allocated (was zp ZP_WORD:207) zp ZP_WORD:73 [ div32u16u::quotient_hi#0 ] +Interrupt procedure irq clobbers ACNZ +Removing interrupt register storage stx regx+1 in SEG424 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in SEG424 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regx: in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldx #00 in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 File Comments +// Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots a spiral +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_SIGNED_WORD = 2 + // Processor port data direction register + .label PROCPORT_DDR = 0 + // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written + .const PROCPORT_DDR_MEMORY_MASK = 7 + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 I/O in $D000 + .const PROCPORT_RAM_IO = $35 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label VIC_CONTROL = $d011 + .label D011 = $d011 + .const VIC_BMM = $20 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label D018 = $d018 + // VIC II IRQ Status Register + .label IRQ_STATUS = $d019 + // VIC II IRQ Enable Register + .label IRQ_ENABLE = $d01a + // Bits for the IRQ Status/Enable Registers + .const IRQ_RASTER = 1 + // CIA#1 Interrupt Status & Control Register + .label CIA1_INTERRUPT = $dc0d + // Value that disables all CIA interrupts when stored to the CIA Interrupt registers + .const CIA_INTERRUPT_CLEAR = $7f + // The vector used when the HARDWARE serves IRQ interrupts + .label HARDWARE_IRQ = $fffe + // The colors of the C64 + .const BLACK = 0 + .const WHITE = 1 + // PI*2 in u[4.28] format + .const PI2_u4f28 = $6487ed51 + // PI in u[4.28] format + .const PI_u4f28 = $3243f6a9 + // PI/2 in u[4.28] format + .const PI_HALF_u4f28 = $1921fb54 + .label BITMAP = $2000 + .label SCREEN = $400 + .label rem16u = $2b + .label frame_cnt = $31 +//SEG3 @begin +bbegin: + jmp b1 +//SEG4 @1 +b1: +//SEG5 [1] (byte) frame_cnt#0 ← (byte) 1 -- vbuz1=vbuc1 + // Counts frames - updated by the IRQ + lda #1 + sta frame_cnt +//SEG6 [2] phi from @1 to @2 [phi:@1->@2] +b2_from_b1: + jmp b2 +//SEG7 @2 +b2: +//SEG8 [3] call main +//SEG9 [5] phi from @2 to main [phi:@2->main] +main_from_b2: + jsr main +//SEG10 [4] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG11 @end +bend: +//SEG12 main +main: { + .const r_add = 4 + .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f + .label _9 = $32 + .label _11 = $32 + .label _15 = $34 + .label _17 = $34 + .label _18 = $34 + .label _28 = 8 + .label _29 = 8 + .label cos_x = 8 + .label xpos = $a + .label sin_y = 8 + .label ypos = $a + .label idx_x = 2 + .label idx_y = 6 + .label r = 4 + .label _30 = 8 + .label _31 = 8 + //SEG13 [6] call sin16s_gen2 + //SEG14 [131] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + sin16s_gen2_from_main: + jsr sin16s_gen2 + //SEG15 [7] phi from main to main::@7 [phi:main->main::@7] + b7_from_main: + jmp b7 + //SEG16 main::@7 + b7: + //SEG17 [8] call bitmap_init + //SEG18 [109] phi from main::@7 to bitmap_init [phi:main::@7->bitmap_init] + bitmap_init_from_b7: + jsr bitmap_init + //SEG19 [9] phi from main::@7 to main::@8 [phi:main::@7->main::@8] + b8_from_b7: + jmp b8 + //SEG20 main::@8 + b8: + //SEG21 [10] call bitmap_clear + //SEG22 [96] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear] + bitmap_clear_from_b8: + jsr bitmap_clear + jmp b9 + //SEG23 main::@9 + b9: + //SEG24 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 + lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 + sta D011 + //SEG25 [12] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181] + toD0181_from_b9: + jmp toD0181 + //SEG26 main::toD0181 + toD0181: + jmp b6 + //SEG27 main::@6 + b6: + //SEG28 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG29 [14] call init_irq + jsr init_irq + //SEG30 [15] phi from main::@6 to main::@1 [phi:main::@6->main::@1] + b1_from_b6: + //SEG31 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@6->main::@1#0] -- vwuz1=vbuc1 + lda #$80 + sta idx_y + lda #0 + sta idx_y+1 + //SEG32 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@6->main::@1#1] -- vwsz1=vbsc1 + lda #0 + sta r + lda #0 + sta r+1 + //SEG33 [15] phi (word) main::idx_x#3 = (byte) 0 [phi:main::@6->main::@1#2] -- vwuz1=vbuc1 + lda #0 + sta idx_x + lda #0 + sta idx_x+1 + jmp b1 + //SEG34 main::@1 + b1: + jmp b2 + //SEG35 main::@2 + b2: + //SEG36 [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda idx_x + asl + sta _28 + lda idx_x+1 + rol + sta _28+1 + //SEG37 [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 -- pwsz1=pwsc1_plus_vwuz1 + clc + lda _30 + adc #SINUS + sta _30+1 + //SEG38 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) -- vwsz1=_deref_pwsz1 + ldy #0 + lda (cos_x),y + tax + iny + lda (cos_x),y + stx cos_x + sta cos_x+1 + //SEG39 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 + //SEG40 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + //SEG41 [21] call mul16s + //SEG42 [58] phi from main::@2 to mul16s [phi:main::@2->mul16s] + mul16s_from_b2: + //SEG43 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy + //SEG44 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy + jsr mul16s + //SEG45 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 + jmp b10 + //SEG46 main::@10 + b10: + //SEG47 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 + //SEG48 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 + lda xpos+2 + sta _9 + lda xpos+3 + sta _9+1 + //SEG49 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + //SEG50 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz1 + clc + lda bitmap_plot.x + adc #<$a0 + sta bitmap_plot.x + lda bitmap_plot.x+1 + adc #>$a0 + sta bitmap_plot.x+1 + //SEG51 [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda idx_y + asl + sta _29 + lda idx_y+1 + rol + sta _29+1 + //SEG52 [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 -- pwsz1=pwsc1_plus_vwuz1 + clc + lda _31 + adc #SINUS + sta _31+1 + //SEG53 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) -- vwsz1=_deref_pwsz1 + ldy #0 + lda (sin_y),y + tax + iny + lda (sin_y),y + stx sin_y + sta sin_y+1 + //SEG54 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 + //SEG55 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + //SEG56 [32] call mul16s + //SEG57 [58] phi from main::@10 to mul16s [phi:main::@10->mul16s] + mul16s_from_b10: + //SEG58 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@10->mul16s#0] -- register_copy + //SEG59 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@10->mul16s#1] -- register_copy + jsr mul16s + //SEG60 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 + jmp b11 + //SEG61 main::@11 + b11: + //SEG62 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 + //SEG63 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 + lda ypos+2 + sta _15 + lda ypos+3 + sta _15+1 + //SEG64 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + //SEG65 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1 + lda #$64 + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda _18 + adc $fe + sta _18 + lda _18+1 + adc $ff + sta _18+1 + //SEG66 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuaa=_byte_vwuz1 + lda _18 + //SEG67 [39] call bitmap_plot + jsr bitmap_plot + jmp b12 + //SEG68 main::@12 + b12: + //SEG69 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx frame_cnt + inc plots_per_frame,x + //SEG70 [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 + lda #r_add + clc + adc idx_x + sta idx_x + bcc !+ + inc idx_x+1 + !: + //SEG71 [42] if((word) main::idx_x#1<(word) $200) goto main::@13 -- vwuz1_lt_vwuc1_then_la1 + lda idx_x+1 + cmp #>$200 + bcc b13_from_b12 + bne !+ + lda idx_x + cmp #<$200 + bcc b13_from_b12 + !: + //SEG72 [44] phi from main::@12 to main::@3 [phi:main::@12->main::@3] + b3_from_b12: + //SEG73 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@12->main::@3#0] -- vwuz1=vbuc1 + lda #0 + sta idx_x + lda #0 + sta idx_x+1 + jmp b3 + //SEG74 [43] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + b13_from_b12: + jmp b13 + //SEG75 main::@13 + b13: + //SEG76 [44] phi from main::@13 to main::@3 [phi:main::@13->main::@3] + b3_from_b13: + //SEG77 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@13->main::@3#0] -- register_copy + jmp b3 + //SEG78 main::@3 + b3: + //SEG79 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 + lda #r_add + clc + adc idx_y + sta idx_y + bcc !+ + inc idx_y+1 + !: + //SEG80 [46] if((word) main::idx_y#1<(word) $200) goto main::@14 -- vwuz1_lt_vwuc1_then_la1 + lda idx_y+1 + cmp #>$200 + bcc b14_from_b3 + bne !+ + lda idx_y + cmp #<$200 + bcc b14_from_b3 + !: + //SEG81 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + b4_from_b3: + //SEG82 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 + lda #0 + sta idx_y + lda #0 + sta idx_y+1 + jmp b4 + //SEG83 [47] phi from main::@3 to main::@14 [phi:main::@3->main::@14] + b14_from_b3: + jmp b14 + //SEG84 main::@14 + b14: + //SEG85 [48] phi from main::@14 to main::@4 [phi:main::@14->main::@4] + b4_from_b14: + //SEG86 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@14->main::@4#0] -- register_copy + jmp b4 + //SEG87 main::@4 + b4: + //SEG88 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 -- vwsz1=vwsz1_plus_vbsc1 + lda #r_add + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda r + adc $fe + sta r + lda r+1 + adc $ff + sta r+1 + //SEG89 [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 -- vwsz1_ge_vwsc1_then_la1 + lda r + cmp #<$200*$c+$100 + lda r+1 + sbc #>$200*$c+$100 + bvc !+ + eor #$80 + !: + bpl b5 + //SEG90 [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + b1_from_b4: + //SEG91 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@4->main::@1#0] -- register_copy + //SEG92 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@4->main::@1#1] -- register_copy + //SEG93 [15] phi (word) main::idx_x#3 = (word) main::idx_x#10 [phi:main::@4->main::@1#2] -- register_copy + jmp b1 + //SEG94 main::@5 + b5: + //SEG95 [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDERCOL + jmp b5 +} +//SEG96 bitmap_plot +// Plot a single dot in the bitmap +// bitmap_plot(signed word zeropage($32) x, byte register(A) y) +bitmap_plot: { + .label _1 = $38 + .label plotter = $36 + .label x = $32 + .label _3 = $36 + //SEG97 [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa + tay + lda bitmap_plot_yhi,y + sta _3+1 + lda bitmap_plot_ylo,y + sta _3 + //SEG98 [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + lda x + and #<$fff8 + sta _1 + lda x+1 + and #>$fff8 + sta _1+1 + //SEG99 [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 + lda plotter + clc + adc _1 + sta plotter + lda plotter+1 + adc _1+1 + sta plotter+1 + //SEG100 [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 + lda x + //SEG101 [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa + tay + lda bitmap_plot_bit,y + ldy #0 + ora (plotter),y + ldy #0 + sta (plotter),y + jmp breturn + //SEG102 bitmap_plot::@return + breturn: + //SEG103 [57] return + rts +} +//SEG104 mul16s +// Multiply of two signed words to a signed double word +// Fixes offsets introduced by using unsigned multiplication +// mul16s(signed word zeropage(4) a, signed word zeropage(8) b) +mul16s: { + .label _9 = $3a + .label _13 = $3c + .label _16 = $3a + .label _17 = $3c + .label m = $a + .label return = $a + .label a = 4 + .label b = 8 + //SEG105 [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 + lda b + sta mul16u.mb + lda b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + //SEG106 [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 + lda a + sta mul16u.a + lda a+1 + sta mul16u.a+1 + //SEG107 [61] call mul16u + //SEG108 [76] phi from mul16s to mul16u [phi:mul16s->mul16u] + mul16u_from_mul16s: + //SEG109 [76] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG110 [76] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy + jsr mul16u + //SEG111 [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + jmp b5 + //SEG112 mul16s::@5 + b5: + //SEG113 [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + //SEG114 [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + lda a+1 + bpl b1_from_b5 + jmp b3 + //SEG115 mul16s::@3 + b3: + //SEG116 [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + lda m+2 + sta _9 + lda m+3 + sta _9+1 + //SEG117 [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz1_minus_vwuz2 + lda _16 + sec + sbc b + sta _16 + lda _16+1 + sbc b+1 + sta _16+1 + //SEG118 [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + lda _16 + sta m+2 + lda _16+1 + sta m+3 + //SEG119 [68] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] + b1_from_b3: + b1_from_b5: + //SEG120 [68] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy + jmp b1 + //SEG121 mul16s::@1 + b1: + //SEG122 [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 + lda b+1 + bpl b2_from_b1 + jmp b4 + //SEG123 mul16s::@4 + b4: + //SEG124 [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 + lda m+2 + sta _13 + lda m+3 + sta _13+1 + //SEG125 [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz1_minus_vwuz2 + lda _17 + sec + sbc a + sta _17 + lda _17+1 + sbc a+1 + sta _17+1 + //SEG126 [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 + lda _17 + sta m+2 + lda _17+1 + sta m+3 + //SEG127 [73] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] + b2_from_b1: + b2_from_b4: + //SEG128 [73] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy + jmp b2 + //SEG129 mul16s::@2 + b2: + //SEG130 [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + jmp breturn + //SEG131 mul16s::@return + breturn: + //SEG132 [75] return + rts +} +//SEG133 mul16u +// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word +// mul16u(word zeropage($10) a, word zeropage($e) b) +mul16u: { + .label mb = $12 + .label a = $10 + .label res = $a + .label return = $a + .label b = $e + //SEG134 [77] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + b1_from_mul16u: + //SEG135 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG136 [77] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + lda #0 + sta res + lda #0 + sta res+1 + sta res+2 + sta res+3 + //SEG137 [77] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + jmp b1 + //SEG138 mul16u::@1 + b1: + //SEG139 [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + lda a + bne b2 + lda a+1 + bne b2 + jmp breturn + //SEG140 mul16u::@return + breturn: + //SEG141 [79] return + rts + //SEG142 mul16u::@2 + b2: + //SEG143 [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 + lda a + and #1 + //SEG144 [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b3_from_b2 + jmp b4 + //SEG145 mul16u::@4 + b4: + //SEG146 [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + lda res + clc + adc mb + sta res + lda res+1 + adc mb+1 + sta res+1 + lda res+2 + adc mb+2 + sta res+2 + lda res+3 + adc mb+3 + sta res+3 + //SEG147 [83] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + b3_from_b2: + b3_from_b4: + //SEG148 [83] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + jmp b3 + //SEG149 mul16u::@3 + b3: + //SEG150 [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr a+1 + ror a + //SEG151 [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + asl mb + rol mb+1 + rol mb+2 + rol mb+3 + //SEG152 [77] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + b1_from_b3: + //SEG153 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG154 [77] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG155 [77] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + jmp b1 +} +//SEG156 init_irq +// Setup the IRQ +init_irq: { + //SEG157 asm { sei } + sei + //SEG158 [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG159 [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG160 [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + //SEG161 [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Set raster line to $100 + lda #$80 + ora VIC_CONTROL + sta VIC_CONTROL + //SEG162 [91] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta RASTER + //SEG163 [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + //SEG164 [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 + // Set the IRQ routine + lda #irq + sta HARDWARE_IRQ+1 + //SEG165 asm { cli } + cli + jmp breturn + //SEG166 init_irq::@return + breturn: + //SEG167 [95] return + rts +} +//SEG168 bitmap_clear +// Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with +bitmap_clear: { + .const col = WHITE*$10 + //SEG169 [97] call memset + //SEG170 [101] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + memset_from_bitmap_clear: + //SEG171 [101] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 + ldx #col + //SEG172 [101] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + //SEG173 [101] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memset.str+1 + jsr memset + //SEG174 [98] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + b1_from_bitmap_clear: + jmp b1 + //SEG175 bitmap_clear::@1 + b1: + //SEG176 [99] call memset + //SEG177 [101] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + memset_from_b1: + //SEG178 [101] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 + ldx #0 + //SEG179 [101] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + //SEG180 [101] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + lda #BITMAP + sta memset.str+1 + jsr memset + jmp breturn + //SEG181 bitmap_clear::@return + breturn: + //SEG182 [100] return + rts +} +//SEG183 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($16) str, byte register(X) c, word zeropage($18) num) +memset: { + .label end = $18 + .label dst = $16 + .label str = $16 + .label num = $18 + //SEG184 [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + lda end + clc + adc str + sta end + lda end+1 + adc str+1 + sta end+1 + //SEG185 [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + //SEG186 [104] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + b1_from_memset: + b1_from_b1: + //SEG187 [104] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + jmp b1 + //SEG188 memset::@1 + b1: + //SEG189 [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (dst),y + //SEG190 [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG191 [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + lda dst+1 + cmp end+1 + bne b1_from_b1 + lda dst + cmp end + bne b1_from_b1 + jmp breturn + //SEG192 memset::@return + breturn: + //SEG193 [108] return + rts +} +//SEG194 bitmap_init +// Initialize bitmap plotting tables +bitmap_init: { + .label _7 = $3e + .label yoffs = $1a + //SEG195 [110] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + b1_from_bitmap_init: + //SEG196 [110] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG197 [110] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + lda #$80 + jmp b1 + //SEG198 [110] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + b1_from_b2: + //SEG199 [110] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG200 [110] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + jmp b1 + //SEG201 bitmap_init::@1 + b1: + //SEG202 [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + sta bitmap_plot_bit,x + //SEG203 [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + lsr + //SEG204 [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b6_from_b1 + //SEG205 [115] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + b2_from_b1: + //SEG206 [115] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + lda #$80 + jmp b2 + //SEG207 [114] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + b6_from_b1: + jmp b6 + //SEG208 bitmap_init::@6 + b6: + //SEG209 [115] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + b2_from_b6: + //SEG210 [115] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + jmp b2 + //SEG211 bitmap_init::@2 + b2: + //SEG212 [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + inx + //SEG213 [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + cpx #0 + bne b1_from_b2 + //SEG214 [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + b3_from_b2: + //SEG215 [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + lda #BITMAP + sta yoffs+1 + //SEG216 [118] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + ldx #0 + jmp b3 + //SEG217 [118] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + b3_from_b4: + //SEG218 [118] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG219 [118] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + jmp b3 + //SEG220 bitmap_init::@3 + b3: + //SEG221 [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + lda #7 + sax _7 + //SEG222 [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + lda yoffs + //SEG223 [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + ora _7 + //SEG224 [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + sta bitmap_plot_ylo,x + //SEG225 [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + lda yoffs+1 + //SEG226 [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + sta bitmap_plot_yhi,x + //SEG227 [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + lda #7 + cmp _7 + bne b4_from_b3 + jmp b5 + //SEG228 bitmap_init::@5 + b5: + //SEG229 [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + clc + lda yoffs + adc #<$28*8 + sta yoffs + lda yoffs+1 + adc #>$28*8 + sta yoffs+1 + //SEG230 [127] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + b4_from_b3: + b4_from_b5: + //SEG231 [127] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + jmp b4 + //SEG232 bitmap_init::@4 + b4: + //SEG233 [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + inx + //SEG234 [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + cpx #0 + bne b3_from_b4 + jmp breturn + //SEG235 bitmap_init::@return + breturn: + //SEG236 [130] return + rts +} +//SEG237 sin16s_gen2 +// Generate signed word sinus table - with values in the range min-max. +// sintab - the table to generate into +// wavelength - the number of sinus points in a total sinus wavelength (the size of the table) +// sin16s_gen2(signed word* zeropage($20) sintab) +sin16s_gen2: { + .label wavelength = $200 + .const min = -$1001 + .const max = $1001 + .const ampl = max-min + .label _5 = $a + .label _6 = $43 + .label step = $3f + .label sintab = $20 + .label x = $1c + .label i = $22 + //SEG238 [132] call div32u16u + //SEG239 [199] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + div32u16u_from_sin16s_gen2: + jsr div32u16u + //SEG240 [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + jmp b2 + //SEG241 sin16s_gen2::@2 + b2: + //SEG242 [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + //SEG243 [135] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + b1_from_b2: + //SEG244 [135] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + lda #0 + sta i + lda #0 + sta i+1 + //SEG245 [135] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + lda #SINUS + sta sintab+1 + //SEG246 [135] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + lda #0 + sta x + lda #0 + sta x+1 + sta x+2 + sta x+3 + jmp b1 + // u[4.28] + //SEG247 [135] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + b1_from_b4: + //SEG248 [135] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG249 [135] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG250 [135] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + jmp b1 + //SEG251 sin16s_gen2::@1 + b1: + //SEG252 [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + lda x + sta sin16s.x + lda x+1 + sta sin16s.x+1 + lda x+2 + sta sin16s.x+2 + lda x+3 + sta sin16s.x+3 + //SEG253 [137] call sin16s + jsr sin16s + //SEG254 [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + jmp b3 + //SEG255 sin16s_gen2::@3 + b3: + //SEG256 [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + //SEG257 [140] call mul16s + //SEG258 [58] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] + mul16s_from_b3: + //SEG259 [58] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 + lda #ampl + sta mul16s.b+1 + //SEG260 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy + jsr mul16s + //SEG261 [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + jmp b4 + //SEG262 sin16s_gen2::@4 + b4: + //SEG263 [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + //SEG264 [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + lda _5+2 + sta _6 + lda _5+3 + sta _6+1 + //SEG265 [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + ldy #0 + lda _6 + sta (sintab),y + iny + lda _6+1 + sta (sintab),y + //SEG266 [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + lda #SIZEOF_SIGNED_WORD + clc + adc sintab + sta sintab + bcc !+ + inc sintab+1 + !: + //SEG267 [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + lda x + clc + adc step + sta x + lda x+1 + adc step+1 + sta x+1 + lda x+2 + adc step+2 + sta x+2 + lda x+3 + adc step+3 + sta x+3 + //SEG268 [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + inc i + bne !+ + inc i+1 + !: + //SEG269 [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + lda i+1 + cmp #>wavelength + bcc b1_from_b4 + bne !+ + lda i + cmp #PI_u4f28>>$10 + bcc b1_from_sin16s + bne !+ + lda x+2 + cmp #>$10 + bcc b1_from_sin16s + bne !+ + lda x+1 + cmp #>PI_u4f28 + bcc b1_from_sin16s + bne !+ + lda x + cmp #PI_u4f28 + sta x+1 + lda x+2 + sbc #>$10 + sta x+2 + lda x+3 + sbc #>PI_u4f28>>$10 + sta x+3 + //SEG276 [152] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + b1_from_b4: + //SEG277 [152] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + lda #1 + sta isUpper + //SEG278 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + jmp b1 + //SEG279 [152] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + b1_from_sin16s: + //SEG280 [152] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + lda #0 + sta isUpper + //SEG281 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + jmp b1 + //SEG282 sin16s::@1 + b1: + //SEG283 [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + lda x+3 + cmp #>PI_HALF_u4f28>>$10 + bcc b2_from_b1 + bne !+ + lda x+2 + cmp #>$10 + bcc b2_from_b1 + bne !+ + lda x+1 + cmp #>PI_HALF_u4f28 + bcc b2_from_b1 + bne !+ + lda x + cmp #PI_u4f28 + sbc x+1 + sta x+1 + lda #>$10 + sbc x+2 + sta x+2 + lda #>PI_u4f28>>$10 + sbc x+3 + sta x+3 + //SEG286 [155] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + b2_from_b1: + b2_from_b5: + //SEG287 [155] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + jmp b2 + //SEG288 sin16s::@2 + b2: + //SEG289 [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + ldy #3 + !: + asl _4 + rol _4+1 + rol _4+2 + rol _4+3 + dey + bne !- + //SEG290 [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + lda _4+2 + sta x1 + lda _4+3 + sta x1+1 + //SEG291 [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v1 + lda x1+1 + sta mulu16_sel.v1+1 + //SEG292 [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG293 [160] call mulu16_sel + //SEG294 [190] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + mulu16_sel_from_b2: + //SEG295 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #0 + //SEG296 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG297 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG298 [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + jmp b7 + //SEG299 sin16s::@7 + b7: + //SEG300 [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta x2 + lda mulu16_sel.return+1 + sta x2+1 + //SEG301 [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + //SEG302 [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG303 [165] call mulu16_sel + //SEG304 [190] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + mulu16_sel_from_b7: + //SEG305 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #1 + //SEG306 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG307 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG308 [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta mulu16_sel.return_1 + lda mulu16_sel.return+1 + sta mulu16_sel.return_1+1 + jmp b8 + //SEG309 sin16s::@8 + b8: + //SEG310 [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + //SEG311 [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + //SEG312 [169] call mulu16_sel + //SEG313 [190] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + mulu16_sel_from_b8: + //SEG314 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #1 + //SEG315 [190] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + lda #<$10000/6 + sta mulu16_sel.v2 + lda #>$10000/6 + sta mulu16_sel.v2+1 + //SEG316 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG317 [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + jmp b9 + //SEG318 sin16s::@9 + b9: + //SEG319 [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + //SEG320 [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + lda x1 + sec + sbc x3_6 + sta usinx + lda x1+1 + sbc x3_6+1 + sta usinx+1 + //SEG321 [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + //SEG322 [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG323 [175] call mulu16_sel + //SEG324 [190] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + mulu16_sel_from_b9: + //SEG325 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #0 + //SEG326 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG327 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG328 [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta mulu16_sel.return_10 + lda mulu16_sel.return+1 + sta mulu16_sel.return_10+1 + jmp b10 + //SEG329 sin16s::@10 + b10: + //SEG330 [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + //SEG331 [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + //SEG332 [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG333 [180] call mulu16_sel + //SEG334 [190] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + mulu16_sel_from_b10: + //SEG335 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #0 + //SEG336 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG337 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG338 [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + jmp b11 + //SEG339 sin16s::@11 + b11: + //SEG340 [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + //SEG341 [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + //SEG342 [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + lda usinx + clc + adc x5_128 + sta usinx + lda usinx+1 + adc x5_128+1 + sta usinx+1 + //SEG343 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + lda isUpper + cmp #0 + beq b12 + jmp b6 + //SEG344 sin16s::@6 + b6: + //SEG345 [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + sec + lda #0 + sbc sinx + sta sinx + lda #0 + sbc sinx+1 + sta sinx+1 + //SEG346 [187] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + b3_from_b12: + b3_from_b6: + //SEG347 [187] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + jmp b3 + //SEG348 sin16s::@3 + b3: + jmp breturn + //SEG349 sin16s::@return + breturn: + //SEG350 [188] return + rts + //SEG351 sin16s::@12 + b12: + //SEG352 [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + jmp b3_from_b12 +} +//SEG353 mulu16_sel +// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. +// The select parameter indicates how many of the highest bits of the 32-bit result to skip +// mulu16_sel(word zeropage($29) v1, word zeropage($e) v2, byte register(X) select) +mulu16_sel: { + .label _0 = $a + .label _1 = $a + .label v1 = $29 + .label v2 = $e + .label return = $47 + .label return_1 = $29 + .label return_10 = $29 + //SEG354 [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + lda v1 + sta mul16u.a + lda v1+1 + sta mul16u.a+1 + //SEG355 [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + //SEG356 [193] call mul16u + //SEG357 [76] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + mul16u_from_mulu16_sel: + //SEG358 [76] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG359 [76] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + lda mul16u.b + sta mul16u.mb + lda mul16u.b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + jsr mul16u + //SEG360 [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + jmp b1 + //SEG361 mulu16_sel::@1 + b1: + //SEG362 [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + //SEG363 [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + cpx #0 + beq !e+ + !: + asl _1 + rol _1+1 + rol _1+2 + rol _1+3 + dex + bne !- + !e: + //SEG364 [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + lda _1+2 + sta return + lda _1+3 + sta return+1 + jmp breturn + //SEG365 mulu16_sel::@return + breturn: + //SEG366 [198] return + rts +} +//SEG367 div32u16u +// Divide unsigned 32-bit dword dividend with a 16-bit word divisor +// The 16-bit word remainder can be found in rem16u after the division +div32u16u: { + .label quotient_hi = $49 + .label quotient_lo = $2f + .label return = $3f + //SEG368 [200] call divr16u + //SEG369 [209] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + divr16u_from_div32u16u: + //SEG370 [209] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + lda #>$10 + sta divr16u.dividend + lda #>PI2_u4f28>>$10 + sta divr16u.dividend+1 + //SEG371 [209] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + lda #0 + sta divr16u.rem + lda #0 + sta divr16u.rem+1 + jsr divr16u + //SEG372 [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + jmp b1 + //SEG373 div32u16u::@1 + b1: + //SEG374 [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + lda divr16u.return + sta quotient_hi + lda divr16u.return+1 + sta quotient_hi+1 + //SEG375 [203] (word) divr16u::rem#4 ← (word) rem16u#1 + //SEG376 [204] call divr16u + //SEG377 [209] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + divr16u_from_b1: + //SEG378 [209] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + lda #PI2_u4f28&$ffff + sta divr16u.dividend+1 + //SEG379 [209] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + jsr divr16u + //SEG380 [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + jmp b2 + //SEG381 div32u16u::@2 + b2: + //SEG382 [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + //SEG383 [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + lda quotient_hi + sta return+2 + lda quotient_hi+1 + sta return+3 + lda quotient_lo + sta return + lda quotient_lo+1 + sta return+1 + jmp breturn + //SEG384 div32u16u::@return + breturn: + //SEG385 [208] return + rts +} +//SEG386 divr16u +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage($2d) dividend, word zeropage($2b) rem) +divr16u: { + .label rem = $2b + .label dividend = $2d + .label quotient = $2f + .label return = $2f + //SEG387 [210] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + b1_from_divr16u: + //SEG388 [210] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG389 [210] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + lda #0 + sta quotient + lda #0 + sta quotient+1 + //SEG390 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG391 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + jmp b1 + //SEG392 [210] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + b1_from_b3: + //SEG393 [210] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG394 [210] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG395 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG396 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + jmp b1 + //SEG397 divr16u::@1 + b1: + //SEG398 [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl rem + rol rem+1 + //SEG399 [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + lda dividend+1 + //SEG400 [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + and #$80 + //SEG401 [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2_from_b1 + jmp b4 + //SEG402 divr16u::@4 + b4: + //SEG403 [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + lda #1 + ora rem + sta rem + //SEG404 [216] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + b2_from_b1: + b2_from_b4: + //SEG405 [216] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + jmp b2 + //SEG406 divr16u::@2 + b2: + //SEG407 [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl dividend + rol dividend+1 + //SEG408 [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl quotient + rol quotient+1 + //SEG409 [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + lda rem+1 + cmp #>sin16s_gen2.wavelength + bcc b3_from_b2 + bne !+ + lda rem + cmp #sin16s_gen2.wavelength + sta rem+1 + //SEG413 [222] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + b3_from_b2: + b3_from_b5: + //SEG414 [222] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG415 [222] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + jmp b3 + //SEG416 divr16u::@3 + b3: + //SEG417 [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG418 [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #$10 + bne b1_from_b3 + jmp b6 + //SEG419 divr16u::@6 + b6: + //SEG420 [225] (word) rem16u#1 ← (word) divr16u::rem#11 + jmp breturn + //SEG421 divr16u::@return + breturn: + //SEG422 [226] return + rts +} +//SEG423 irq +// Interrupt Routine counting frames +irq: { + //SEG424 entry interrupt(HARDWARE_CLOBBER) + sta rega+1 + //SEG425 [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + lda #WHITE + sta BGCOL + //SEG426 [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp frame_cnt + beq b1_from_irq + jmp b2 + //SEG427 irq::@2 + b2: + //SEG428 [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + inc frame_cnt + //SEG429 [230] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + b1_from_irq: + b1_from_b2: + //SEG430 [230] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + jmp b1 + //SEG431 irq::@1 + b1: + //SEG432 [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + lda #BLACK + sta BGCOL + //SEG433 [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Acknowledge the IRQ + lda #IRQ_RASTER + sta IRQ_STATUS + jmp breturn + //SEG434 irq::@return + breturn: + //SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + rega: + lda #00 + rti +} +//SEG436 File Data + // Tables for the plotter - initialized by calling bitmap_init(); + bitmap_plot_ylo: .fill $100, 0 + bitmap_plot_yhi: .fill $100, 0 + bitmap_plot_bit: .fill $100, 0 + plots_per_frame: .fill $100, 0 + .align $100 + SINUS: .fill 2*$200, 0 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp bend +Removing instruction jmp b7 +Removing instruction jmp b8 +Removing instruction jmp b9 +Removing instruction jmp toD0181 +Removing instruction jmp b6 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b10 +Removing instruction jmp b11 +Removing instruction jmp b12 +Removing instruction jmp b13 +Removing instruction jmp b3 +Removing instruction jmp b14 +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp b1 +Removing instruction jmp b4 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp b3 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b6 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b5 +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b2 +Removing instruction jmp b1 +Removing instruction jmp b3 +Removing instruction jmp b4 +Removing instruction jmp breturn +Removing instruction jmp b4 +Removing instruction jmp b1 +Removing instruction jmp b5 +Removing instruction jmp b2 +Removing instruction jmp b7 +Removing instruction jmp b8 +Removing instruction jmp b9 +Removing instruction jmp b10 +Removing instruction jmp b11 +Removing instruction jmp b6 +Removing instruction jmp b3 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b4 +Removing instruction jmp b2 +Removing instruction jmp b5 +Removing instruction jmp b3 +Removing instruction jmp b6 +Removing instruction jmp breturn +Removing instruction jmp b2 +Removing instruction jmp b1 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction ldy #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Replacing instruction lda #0 with TXA +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b13_from_b12 with b3 +Replacing label b13_from_b12 with b3 +Replacing label b14_from_b3 with b4 +Replacing label b14_from_b3 with b4 +Replacing label b1 with b2 +Replacing label b1_from_b5 with b1 +Replacing label b2_from_b1 with b2 +Replacing label b3_from_b2 with b3 +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Replacing label b6_from_b1 with b2 +Replacing label b1_from_b2 with b1 +Replacing label b4_from_b3 with b4 +Replacing label b3_from_b4 with b3 +Replacing label b1_from_b4 with b1 +Replacing label b1_from_b4 with b1 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 +Replacing label b2_from_b1 with b2 +Replacing label b3_from_b12 with b3 +Replacing label b2_from_b1 with b2 +Replacing label b3_from_b2 with b3 +Replacing label b3_from_b2 with b3 +Replacing label b1_from_b3 with b1 +Replacing label b1_from_irq with b1 +Removing instruction b1: +Removing instruction b2_from_b1: +Removing instruction main_from_b2: +Removing instruction bend_from_b2: +Removing instruction b7_from_main: +Removing instruction bitmap_init_from_b7: +Removing instruction b8_from_b7: +Removing instruction bitmap_clear_from_b8: +Removing instruction toD0181_from_b9: +Removing instruction toD0181: +Removing instruction b1: +Removing instruction b13_from_b12: +Removing instruction b13: +Removing instruction b3_from_b13: +Removing instruction b14_from_b3: +Removing instruction b14: +Removing instruction b4_from_b14: +Removing instruction b1_from_b3: +Removing instruction b1_from_b5: +Removing instruction b2_from_b1: +Removing instruction b2_from_b4: +Removing instruction breturn: +Removing instruction b3_from_b2: +Removing instruction b3_from_b4: +Removing instruction b1_from_bitmap_clear: +Removing instruction memset_from_b1: +Removing instruction b1_from_memset: +Removing instruction b1_from_b1: +Removing instruction b1_from_b2: +Removing instruction b6_from_b1: +Removing instruction b6: +Removing instruction b2_from_b6: +Removing instruction b3_from_b4: +Removing instruction b4_from_b3: +Removing instruction b4_from_b5: +Removing instruction b1_from_b2: +Removing instruction b1_from_b4: +Removing instruction mul16s_from_b3: +Removing instruction b2_from_b1: +Removing instruction b2_from_b5: +Removing instruction mulu16_sel_from_b8: +Removing instruction b3_from_b12: +Removing instruction b3_from_b6: +Removing instruction breturn: +Removing instruction b1_from_b3: +Removing instruction b2_from_b1: +Removing instruction b2_from_b4: +Removing instruction b3_from_b2: +Removing instruction b3_from_b5: +Removing instruction breturn: +Removing instruction b1_from_irq: +Removing instruction b1_from_b2: +Removing instruction breturn: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction b2: +Removing instruction bend: +Removing instruction sin16s_gen2_from_main: +Removing instruction b7: +Removing instruction b8: +Removing instruction b9: +Removing instruction b6: +Removing instruction b1_from_b6: +Removing instruction mul16s_from_b2: +Removing instruction b10: +Removing instruction mul16s_from_b10: +Removing instruction b11: +Removing instruction b12: +Removing instruction b3_from_b12: +Removing instruction b4_from_b3: +Removing instruction b1_from_b4: +Removing instruction breturn: +Removing instruction mul16u_from_mul16s: +Removing instruction b5: +Removing instruction b3: +Removing instruction b4: +Removing instruction b1_from_mul16u: +Removing instruction breturn: +Removing instruction b4: +Removing instruction b1_from_b3: +Removing instruction breturn: +Removing instruction memset_from_bitmap_clear: +Removing instruction b1: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction b1_from_bitmap_init: +Removing instruction b2_from_b1: +Removing instruction b3_from_b2: +Removing instruction b5: +Removing instruction breturn: +Removing instruction div32u16u_from_sin16s_gen2: +Removing instruction b2: +Removing instruction b3: +Removing instruction b4: +Removing instruction breturn: +Removing instruction b4: +Removing instruction b1_from_b4: +Removing instruction b5: +Removing instruction mulu16_sel_from_b2: +Removing instruction b7: +Removing instruction mulu16_sel_from_b7: +Removing instruction b8: +Removing instruction b9: +Removing instruction mulu16_sel_from_b9: +Removing instruction b10: +Removing instruction mulu16_sel_from_b10: +Removing instruction b11: +Removing instruction b6: +Removing instruction mul16u_from_mulu16_sel: +Removing instruction b1: +Removing instruction breturn: +Removing instruction divr16u_from_div32u16u: +Removing instruction b1: +Removing instruction divr16u_from_b1: +Removing instruction b2: +Removing instruction breturn: +Removing instruction b1_from_divr16u: +Removing instruction b4: +Removing instruction b5: +Removing instruction b6: +Removing instruction b2: +Succesful ASM optimization Pass5UnusedLabelElimination +Skipping double jump to b3 in beq b12 +Replacing jump to rts with rts in jmp b3 +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label b1_from_sin16s to b4 +Succesful ASM optimization Pass5RelabelLongLabels +Adding RTS to root block +Succesful ASM optimization Pass5AddMainRts +Removing instruction jmp b3 +Removing instruction jmp b4 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b1 +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b12: +Succesful ASM optimization Pass5UnusedLabelElimination +Removing unreachable instruction rts +Succesful ASM optimization Pass5UnreachableCodeElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @2 +(label) @begin +(label) @end +(byte*) BGCOL +(const byte*) BGCOL#0 BGCOL = (byte*) 53281 +(byte*) BITMAP +(const byte*) BITMAP#0 BITMAP = (byte*) 8192 +(byte) BLACK +(const byte) BLACK#0 BLACK = (byte) 0 +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280 +(byte*) CIA1_INTERRUPT +(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333 +(byte) CIA_INTERRUPT_CLEAR +(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f +(byte*) D011 +(const byte*) D011#0 D011 = (byte*) 53265 +(byte*) D018 +(const byte*) D018#0 D018 = (byte*) 53272 +(void()**) HARDWARE_IRQ +(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534 +(byte*) IRQ_ENABLE +(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274 +(byte) IRQ_RASTER +(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte) 1 +(byte*) IRQ_STATUS +(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273 +(dword) PI2_u4f28 +(const dword) PI2_u4f28#0 PI2_u4f28 = (dword) $6487ed51 +(dword) PI_HALF_u4f28 +(const dword) PI_HALF_u4f28#0 PI_HALF_u4f28 = (dword) $1921fb54 +(dword) PI_u4f28 +(const dword) PI_u4f28#0 PI_u4f28 = (dword) $3243f6a9 +(byte*) PROCPORT +(const byte*) PROCPORT#0 PROCPORT = (byte*) 1 +(byte*) PROCPORT_DDR +(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0 +(byte) PROCPORT_DDR_MEMORY_MASK +(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7 +(byte) PROCPORT_RAM_IO +(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35 +(byte*) RASTER +(const byte*) RASTER#0 RASTER = (byte*) 53266 +(byte*) SCREEN +(const byte*) SCREEN#0 SCREEN = (byte*) 1024 +(signed word[$200]) SINUS +(const signed word[$200]) SINUS#0 SINUS = { fill( $200, 0) } +(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2 +(byte) VIC_BMM +(const byte) VIC_BMM#0 VIC_BMM = (byte) $20 +(byte*) VIC_CONTROL +(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265 +(byte) VIC_DEN +(const byte) VIC_DEN#0 VIC_DEN = (byte) $10 +(byte) VIC_RSEL +(const byte) VIC_RSEL#0 VIC_RSEL = (byte) 8 +(byte) WHITE +(const byte) WHITE#0 WHITE = (byte) 1 +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) +(label) bitmap_clear::@1 +(label) bitmap_clear::@return +(byte) bitmap_clear::bgcol +(byte) bitmap_clear::col +(const byte) bitmap_clear::col#0 col = (const byte) WHITE#0*(byte) $10 +(byte) bitmap_clear::fgcol +(byte*) bitmap_gfx +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) +(byte~) bitmap_init::$4 reg byte a 22.0 +(byte~) bitmap_init::$5 reg byte a 22.0 +(byte~) bitmap_init::$6 reg byte a 22.0 +(byte~) bitmap_init::$7 $7 zp ZP_BYTE:62 5.5 +(label) bitmap_init::@1 +(label) bitmap_init::@2 +(label) bitmap_init::@3 +(label) bitmap_init::@4 +(label) bitmap_init::@5 +(label) bitmap_init::@6 +(label) bitmap_init::@return +(byte) bitmap_init::bits +(byte) bitmap_init::bits#1 reg byte a 11.0 +(byte) bitmap_init::bits#3 reg byte a 16.5 +(byte) bitmap_init::bits#4 reg byte a 7.333333333333333 +(byte*) bitmap_init::gfx +(byte*) bitmap_init::screen +(byte) bitmap_init::x +(byte) bitmap_init::x#1 reg byte x 16.5 +(byte) bitmap_init::x#2 reg byte x 5.5 +(byte) bitmap_init::y +(byte) bitmap_init::y#1 reg byte x 16.5 +(byte) bitmap_init::y#2 reg byte x 5.5 +(byte*) bitmap_init::yoffs +(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:26 22.0 +(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:26 6.875 +(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:26 11.0 +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) +(word~) bitmap_plot::$1 $1 zp ZP_WORD:56 4.0 +(byte~) bitmap_plot::$2 reg byte a 4.0 +(word~) bitmap_plot::$3 $3 zp ZP_WORD:54 1.0 +(label) bitmap_plot::@return +(byte*) bitmap_plot::plotter +(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:54 3.0 +(word) bitmap_plot::x +(signed word) bitmap_plot::x#0 x zp ZP_WORD:50 0.6875 +(byte) bitmap_plot::y +(byte) bitmap_plot::y#0 reg byte a 15.0 +(byte[$100]) bitmap_plot_bit +(const byte[$100]) bitmap_plot_bit#0 bitmap_plot_bit = { fill( $100, 0) } +(byte[$100]) bitmap_plot_yhi +(const byte[$100]) bitmap_plot_yhi#0 bitmap_plot_yhi = { fill( $100, 0) } +(byte[$100]) bitmap_plot_ylo +(const byte[$100]) bitmap_plot_ylo#0 bitmap_plot_ylo = { fill( $100, 0) } +(byte*) bitmap_screen +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) +(label) div32u16u::@1 +(label) div32u16u::@2 +(label) div32u16u::@return +(dword) div32u16u::dividend +(word) div32u16u::divisor +(dword) div32u16u::quotient +(word) div32u16u::quotient_hi +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:73 0.8 +(word) div32u16u::quotient_lo +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:47 4.0 +(dword) div32u16u::return +(dword) div32u16u::return#0 return zp ZP_DWORD:63 1.3333333333333333 +(dword) div32u16u::return#2 return zp ZP_DWORD:63 4.0 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(byte~) divr16u::$1 reg byte a 22.0 +(byte~) divr16u::$2 reg byte a 22.0 +(label) divr16u::@1 +(label) divr16u::@2 +(label) divr16u::@3 +(label) divr16u::@4 +(label) divr16u::@5 +(label) divr16u::@6 +(label) divr16u::@return +(word) divr16u::dividend +(word) divr16u::dividend#0 dividend zp ZP_WORD:45 2.75 +(word) divr16u::dividend#3 dividend zp ZP_WORD:45 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:45 2.0 +(word) divr16u::divisor +(byte) divr16u::i +(byte) divr16u::i#1 reg byte x 16.5 +(byte) divr16u::i#2 reg byte x 1.6923076923076923 +(word) divr16u::quotient +(word) divr16u::quotient#1 quotient zp ZP_WORD:47 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:47 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:47 2.75 +(word) divr16u::rem +(word) divr16u::rem#0 rem zp ZP_WORD:43 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:43 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:43 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:43 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:43 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:43 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:43 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:43 11.0 +(word) divr16u::return +(word) divr16u::return#0 return zp ZP_WORD:47 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:47 4.0 +(word) divr16u::return#3 return zp ZP_WORD:47 4.0 +(byte) frame_cnt +(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:49 0.6000000000000001 +(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:49 4.0 +(byte) frame_cnt#2 frame_cnt zp ZP_BYTE:49 40.0 +(void()) init_irq() +(label) init_irq::@return +interrupt(HARDWARE_CLOBBER)(void()) irq() +(label) irq::@1 +(label) irq::@2 +(label) irq::@return +(void()) main() +(signed word~) main::$11 $11 zp ZP_WORD:50 22.0 +(word~) main::$15 $15 zp ZP_WORD:52 11.0 +(signed word~) main::$17 $17 zp ZP_WORD:52 22.0 +(signed word~) main::$18 $18 zp ZP_WORD:52 11.0 +(word~) main::$28 $28 zp ZP_WORD:8 22.0 +(word~) main::$29 $29 zp ZP_WORD:8 22.0 +(signed word*~) main::$30 $30 zp ZP_WORD:8 22.0 +(signed word*~) main::$31 $31 zp ZP_WORD:8 22.0 +(word~) main::$9 $9 zp ZP_WORD:50 11.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(signed word) main::cos_x +(signed word) main::cos_x#0 cos_x zp ZP_WORD:8 11.0 +(word) main::idx_x +(word) main::idx_x#1 idx_x zp ZP_WORD:2 11.0 +(word) main::idx_x#10 idx_x zp ZP_WORD:2 3.142857142857143 +(word) main::idx_x#3 idx_x zp ZP_WORD:2 1.2692307692307692 +(word) main::idx_y +(word) main::idx_y#1 idx_y zp ZP_WORD:6 11.0 +(word) main::idx_y#10 idx_y zp ZP_WORD:6 7.333333333333333 +(word) main::idx_y#3 idx_y zp ZP_WORD:6 1.0999999999999999 +(signed word) main::r +(signed word) main::r#1 r zp ZP_WORD:4 16.5 +(signed word) main::r#10 r zp ZP_WORD:4 1.2941176470588236 +(byte) main::r_add +(const byte) main::r_add#0 r_add = (byte) 4 +(signed word) main::sin_y +(signed word) main::sin_y#0 sin_y zp ZP_WORD:8 11.0 +(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 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(word) main::x +(signed dword) main::xpos +(signed dword) main::xpos#0 xpos zp ZP_DWORD:10 22.0 +(word) main::y +(signed dword) main::ypos +(signed dword) main::ypos#0 ypos zp ZP_DWORD:10 22.0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(label) memset::@1 +(label) memset::@return +(byte) memset::c +(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte*) memset::dst +(byte*) memset::dst#1 dst zp ZP_WORD:22 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:22 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:22 4.0 +(byte*) memset::end +(byte*) memset::end#0 end zp ZP_WORD:24 2.1666666666666665 +(word) memset::num +(word) memset::num#2 num zp ZP_WORD:24 2.0 +(void*) memset::return +(void*) memset::str +(void*) memset::str#2 str zp ZP_WORD:22 +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) +(word~) mul16s::$13 $13 zp ZP_WORD:60 4.0 +(word~) mul16s::$16 $16 zp ZP_WORD:58 4.0 +(word~) mul16s::$17 $17 zp ZP_WORD:60 4.0 +(word~) mul16s::$9 $9 zp ZP_WORD:58 4.0 +(label) mul16s::@1 +(label) mul16s::@2 +(label) mul16s::@3 +(label) mul16s::@4 +(label) mul16s::@5 +(label) mul16s::@return +(signed word) mul16s::a +(signed word) mul16s::a#0 a zp ZP_WORD:4 22.0 +(signed word) mul16s::a#1 a zp ZP_WORD:4 11.0 +(signed word) mul16s::a#2 a zp ZP_WORD:4 11.0 +(signed word) mul16s::a#3 a zp ZP_WORD:4 2.692307692307692 +(signed word) mul16s::b +(signed word) mul16s::b#1 b zp ZP_WORD:8 22.0 +(signed word) mul16s::b#2 b zp ZP_WORD:8 22.0 +(signed word) mul16s::b#3 b zp ZP_WORD:8 2.1818181818181817 +(dword) mul16s::m +(dword) mul16s::m#0 m zp ZP_DWORD:10 2.0 +(dword) mul16s::m#1 m zp ZP_DWORD:10 4.0 +(dword) mul16s::m#2 m zp ZP_DWORD:10 4.0 +(dword) mul16s::m#4 m zp ZP_DWORD:10 4.0 +(dword) mul16s::m#5 m zp ZP_DWORD:10 2.5 +(signed dword) mul16s::return +(signed dword) mul16s::return#0 return zp ZP_DWORD:10 7.000000000000001 +(signed dword) mul16s::return#2 return zp ZP_DWORD:10 22.0 +(signed dword) mul16s::return#3 return zp ZP_DWORD:10 22.0 +(signed dword) mul16s::return#4 return zp ZP_DWORD:10 22.0 +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) +(byte~) mul16u::$1 reg byte a 202.0 +(label) mul16u::@1 +(label) mul16u::@2 +(label) mul16u::@3 +(label) mul16u::@4 +(label) mul16u::@return +(word) mul16u::a +(word) mul16u::a#0 a zp ZP_WORD:16 101.0 +(word) mul16u::a#2 a zp ZP_WORD:16 2.0 +(word) mul16u::a#3 a zp ZP_WORD:16 67.66666666666666 +(word) mul16u::a#6 a zp ZP_WORD:16 6.0 +(word~) mul16u::a#8 a zp ZP_WORD:16 4.0 +(word) mul16u::b +(word) mul16u::b#1 b zp ZP_WORD:14 4.0 +(dword) mul16u::mb +(dword) mul16u::mb#0 mb zp ZP_DWORD:18 6.0 +(dword) mul16u::mb#1 mb zp ZP_DWORD:18 202.0 +(dword) mul16u::mb#2 mb zp ZP_DWORD:18 43.57142857142858 +(dword~) mul16u::mb#6 mb zp ZP_DWORD:18 2.0 +(dword) mul16u::res +(dword) mul16u::res#1 res zp ZP_DWORD:10 202.0 +(dword) mul16u::res#2 res zp ZP_DWORD:10 43.85714285714286 +(dword) mul16u::res#6 res zp ZP_DWORD:10 101.0 +(dword) mul16u::return +(dword) mul16u::return#2 return zp ZP_DWORD:10 4.0 +(dword) mul16u::return#3 return zp ZP_DWORD:10 4.0 +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) +(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:10 4.0 +(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:10 4.0 +(label) mulu16_sel::@1 +(label) mulu16_sel::@return +(word) mulu16_sel::return +(word) mulu16_sel::return#0 return zp ZP_WORD:71 4.0 +(word) mulu16_sel::return#1 return#1 zp ZP_WORD:41 4.0 +(word) mulu16_sel::return#10 return#10 zp ZP_WORD:41 4.0 +(word) mulu16_sel::return#11 return zp ZP_WORD:71 4.0 +(word) mulu16_sel::return#12 return zp ZP_WORD:71 1.714285714285714 +(word) mulu16_sel::return#2 return zp ZP_WORD:71 4.0 +(byte) mulu16_sel::select +(byte) mulu16_sel::select#5 reg byte x 0.3333333333333333 +(word) mulu16_sel::v1 +(word) mulu16_sel::v1#0 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#1 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#2 v1 zp ZP_WORD:41 4.0 +(word) mulu16_sel::v1#3 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#4 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#5 v1 zp ZP_WORD:41 12.0 +(word) mulu16_sel::v2 +(word) mulu16_sel::v2#0 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#1 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#3 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#4 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#5 v2 zp ZP_WORD:14 5.0 +(byte[$100]) plots_per_frame +(const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) } +(word) rem16u +(word) rem16u#1 rem16u zp ZP_WORD:43 0.8 +(signed word()) sin16s((dword) sin16s::x) +(dword~) sin16s::$4 $4 zp ZP_DWORD:37 4.0 +(label) sin16s::@1 +(label) sin16s::@10 +(label) sin16s::@11 +(label) sin16s::@12 +(label) sin16s::@2 +(label) sin16s::@3 +(label) sin16s::@4 +(label) sin16s::@5 +(label) sin16s::@6 +(label) sin16s::@7 +(label) sin16s::@8 +(label) sin16s::@9 +(label) sin16s::@return +(byte) sin16s::isUpper +(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:36 0.06060606060606061 +(signed word) sin16s::return +(signed word) sin16s::return#0 return zp ZP_WORD:4 22.0 +(signed word) sin16s::return#1 return zp ZP_WORD:4 5.0 +(signed word~) sin16s::return#5 return zp ZP_WORD:4 4.0 +(signed word) sin16s::sinx +(signed word) sin16s::sinx#1 sinx zp ZP_WORD:4 4.0 +(word) sin16s::usinx +(word) sin16s::usinx#0 usinx zp ZP_WORD:4 0.3333333333333333 +(word) sin16s::usinx#1 usinx zp ZP_WORD:4 1.0 +(dword) sin16s::x +(dword) sin16s::x#0 x zp ZP_DWORD:37 8.5 +(dword) sin16s::x#1 x zp ZP_DWORD:37 4.0 +(dword) sin16s::x#2 x zp ZP_DWORD:37 4.0 +(dword) sin16s::x#4 x zp ZP_DWORD:37 5.0 +(dword) sin16s::x#6 x zp ZP_DWORD:37 6.0 +(word) sin16s::x1 +(word) sin16s::x1#0 x1 zp ZP_WORD:69 0.6363636363636365 +(word) sin16s::x2 +(word) sin16s::x2#0 x2 zp ZP_WORD:41 4.0 +(word) sin16s::x3 +(word) sin16s::x3#0 x3 zp ZP_WORD:41 1.0 +(word) sin16s::x3_6 +(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:71 4.0 +(word) sin16s::x4 +(word) sin16s::x4#0 x4 zp ZP_WORD:41 4.0 +(word) sin16s::x5 +(word) sin16s::x5#0 x5 zp ZP_WORD:71 4.0 +(word) sin16s::x5_128 +(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:71 4.0 +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) +(signed dword~) sin16s_gen2::$5 $5 zp ZP_DWORD:10 22.0 +(word~) sin16s_gen2::$6 $6 zp ZP_WORD:67 11.0 +(label) sin16s_gen2::@1 +(label) sin16s_gen2::@2 +(label) sin16s_gen2::@3 +(label) sin16s_gen2::@4 +(label) sin16s_gen2::@return +(signed word) sin16s_gen2::ampl +(const signed word) sin16s_gen2::ampl#0 ampl = (const signed word) sin16s_gen2::max#0-(const signed word) sin16s_gen2::min#0 +(word) sin16s_gen2::i +(word) sin16s_gen2::i#1 i zp ZP_WORD:34 16.5 +(word) sin16s_gen2::i#2 i zp ZP_WORD:34 1.8333333333333333 +(signed word) sin16s_gen2::max +(const signed word) sin16s_gen2::max#0 max = (signed word) $1001 +(signed word) sin16s_gen2::min +(const signed word) sin16s_gen2::min#0 min = (signed word) -$1001 +(signed word) sin16s_gen2::offs +(signed word*) sin16s_gen2::sintab +(signed word*) sin16s_gen2::sintab#0 sintab zp ZP_WORD:32 5.5 +(signed word*) sin16s_gen2::sintab#2 sintab zp ZP_WORD:32 3.3000000000000003 +(dword) sin16s_gen2::step +(dword) sin16s_gen2::step#0 step zp ZP_DWORD:63 0.8666666666666666 +(word) sin16s_gen2::wavelength +(const word) sin16s_gen2::wavelength#0 wavelength = (word) $200 +(dword) sin16s_gen2::x +(dword) sin16s_gen2::x#1 x zp ZP_DWORD:28 7.333333333333333 +(dword) sin16s_gen2::x#2 x zp ZP_DWORD:28 3.0 + +zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s::usinx#0 ] +zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 main::$29 main::$31 ] +zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] +zp ZP_WORD:14 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +zp ZP_WORD:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +zp ZP_DWORD:18 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +zp ZP_WORD:22 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +reg byte x [ memset::c#3 ] +reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] +reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] +zp ZP_WORD:26 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +zp ZP_DWORD:28 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +zp ZP_WORD:32 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +zp ZP_WORD:34 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +zp ZP_BYTE:36 [ sin16s::isUpper#2 ] +zp ZP_DWORD:37 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +zp ZP_WORD:41 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] +reg byte x [ mulu16_sel::select#5 ] +zp ZP_WORD:43 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +zp ZP_WORD:45 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +reg byte x [ divr16u::i#2 divr16u::i#1 ] +zp ZP_BYTE:49 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +zp ZP_WORD:50 [ main::$9 main::$11 bitmap_plot::x#0 ] +zp ZP_WORD:52 [ main::$15 main::$17 main::$18 ] +reg byte a [ bitmap_plot::y#0 ] +zp ZP_WORD:54 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +zp ZP_WORD:56 [ bitmap_plot::$1 ] +reg byte a [ bitmap_plot::$2 ] +zp ZP_WORD:58 [ mul16s::$9 mul16s::$16 ] +zp ZP_WORD:60 [ mul16s::$13 mul16s::$17 ] +reg byte a [ mul16u::$1 ] +zp ZP_BYTE:62 [ bitmap_init::$7 ] +reg byte a [ bitmap_init::$4 ] +reg byte a [ bitmap_init::$5 ] +reg byte a [ bitmap_init::$6 ] +zp ZP_DWORD:63 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +zp ZP_WORD:67 [ sin16s_gen2::$6 ] +zp ZP_WORD:69 [ sin16s::x1#0 ] +zp ZP_WORD:71 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +zp ZP_WORD:73 [ div32u16u::quotient_hi#0 ] +reg byte a [ divr16u::$1 ] +reg byte a [ divr16u::$2 ] + + +FINAL ASSEMBLER +Score: 20390 + +//SEG0 File Comments +// Tests the simple bitmap plotter - and counts plots per frame in an IRQ +// Plots a spiral +//SEG1 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG2 Global Constants & labels + .const SIZEOF_SIGNED_WORD = 2 + // Processor port data direction register + .label PROCPORT_DDR = 0 + // Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written + .const PROCPORT_DDR_MEMORY_MASK = 7 + // Processor Port Register controlling RAM/ROM configuration and the datasette + .label PROCPORT = 1 + // RAM in $A000, $E000 I/O in $D000 + .const PROCPORT_RAM_IO = $35 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label BGCOL = $d021 + .label VIC_CONTROL = $d011 + .label D011 = $d011 + .const VIC_BMM = $20 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label D018 = $d018 + // VIC II IRQ Status Register + .label IRQ_STATUS = $d019 + // VIC II IRQ Enable Register + .label IRQ_ENABLE = $d01a + // Bits for the IRQ Status/Enable Registers + .const IRQ_RASTER = 1 + // CIA#1 Interrupt Status & Control Register + .label CIA1_INTERRUPT = $dc0d + // Value that disables all CIA interrupts when stored to the CIA Interrupt registers + .const CIA_INTERRUPT_CLEAR = $7f + // The vector used when the HARDWARE serves IRQ interrupts + .label HARDWARE_IRQ = $fffe + // The colors of the C64 + .const BLACK = 0 + .const WHITE = 1 + // PI*2 in u[4.28] format + .const PI2_u4f28 = $6487ed51 + // PI in u[4.28] format + .const PI_u4f28 = $3243f6a9 + // PI/2 in u[4.28] format + .const PI_HALF_u4f28 = $1921fb54 + .label BITMAP = $2000 + .label SCREEN = $400 + .label rem16u = $2b + .label frame_cnt = $31 +//SEG3 @begin +bbegin: +//SEG4 @1 +//SEG5 [1] (byte) frame_cnt#0 ← (byte) 1 -- vbuz1=vbuc1 + // Counts frames - updated by the IRQ + lda #1 + sta frame_cnt +//SEG6 [2] phi from @1 to @2 [phi:@1->@2] +//SEG7 @2 +//SEG8 [3] call main +//SEG9 [5] phi from @2 to main [phi:@2->main] + jsr main + rts +//SEG10 [4] phi from @2 to @end [phi:@2->@end] +//SEG11 @end +//SEG12 main +main: { + .const r_add = 4 + .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f + .label _9 = $32 + .label _11 = $32 + .label _15 = $34 + .label _17 = $34 + .label _18 = $34 + .label _28 = 8 + .label _29 = 8 + .label cos_x = 8 + .label xpos = $a + .label sin_y = 8 + .label ypos = $a + .label idx_x = 2 + .label idx_y = 6 + .label r = 4 + .label _30 = 8 + .label _31 = 8 + //SEG13 [6] call sin16s_gen2 + //SEG14 [131] phi from main to sin16s_gen2 [phi:main->sin16s_gen2] + jsr sin16s_gen2 + //SEG15 [7] phi from main to main::@7 [phi:main->main::@7] + //SEG16 main::@7 + //SEG17 [8] call bitmap_init + //SEG18 [109] phi from main::@7 to bitmap_init [phi:main::@7->bitmap_init] + jsr bitmap_init + //SEG19 [9] phi from main::@7 to main::@8 [phi:main::@7->main::@8] + //SEG20 main::@8 + //SEG21 [10] call bitmap_clear + //SEG22 [96] phi from main::@8 to bitmap_clear [phi:main::@8->bitmap_clear] + jsr bitmap_clear + //SEG23 main::@9 + //SEG24 [11] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 -- _deref_pbuc1=vbuc2 + lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 + sta D011 + //SEG25 [12] phi from main::@9 to main::toD0181 [phi:main::@9->main::toD0181] + //SEG26 main::toD0181 + //SEG27 main::@6 + //SEG28 [13] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 + lda #toD0181_return + sta D018 + //SEG29 [14] call init_irq + jsr init_irq + //SEG30 [15] phi from main::@6 to main::@1 [phi:main::@6->main::@1] + //SEG31 [15] phi (word) main::idx_y#3 = (byte) $80 [phi:main::@6->main::@1#0] -- vwuz1=vbuc1 + lda #$80 + sta idx_y + lda #0 + sta idx_y+1 + //SEG32 [15] phi (signed word) main::r#10 = (signed byte) 0 [phi:main::@6->main::@1#1] -- vwsz1=vbsc1 + sta r + sta r+1 + //SEG33 [15] phi (word) main::idx_x#3 = (byte) 0 [phi:main::@6->main::@1#2] -- vwuz1=vbuc1 + sta idx_x + sta idx_x+1 + //SEG34 main::@1 + //SEG35 main::@2 + b2: + //SEG36 [16] (word~) main::$28 ← (word) main::idx_x#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda idx_x + asl + sta _28 + lda idx_x+1 + rol + sta _28+1 + //SEG37 [17] (signed word*~) main::$30 ← (const signed word[$200]) SINUS#0 + (word~) main::$28 -- pwsz1=pwsc1_plus_vwuz1 + clc + lda _30 + adc #SINUS + sta _30+1 + //SEG38 [18] (signed word) main::cos_x#0 ← *((signed word*~) main::$30) -- vwsz1=_deref_pwsz1 + ldy #0 + lda (cos_x),y + tax + iny + lda (cos_x),y + stx cos_x + sta cos_x+1 + //SEG39 [19] (signed word) mul16s::a#1 ← (signed word) main::r#10 + //SEG40 [20] (signed word) mul16s::b#1 ← (signed word) main::cos_x#0 + //SEG41 [21] call mul16s + //SEG42 [58] phi from main::@2 to mul16s [phi:main::@2->mul16s] + //SEG43 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#1 [phi:main::@2->mul16s#0] -- register_copy + //SEG44 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#1 [phi:main::@2->mul16s#1] -- register_copy + jsr mul16s + //SEG45 [22] (signed dword) mul16s::return#3 ← (signed dword) mul16s::return#0 + //SEG46 main::@10 + //SEG47 [23] (signed dword) main::xpos#0 ← (signed dword) mul16s::return#3 + //SEG48 [24] (word~) main::$9 ← > (signed dword) main::xpos#0 -- vwuz1=_hi_vdsz2 + lda xpos+2 + sta _9 + lda xpos+3 + sta _9+1 + //SEG49 [25] (signed word~) main::$11 ← (signed word)(word~) main::$9 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + lda _11+1 + cmp #$80 + ror _11+1 + ror _11 + //SEG50 [26] (signed word) bitmap_plot::x#0 ← (signed word) $a0 + (signed word~) main::$11 -- vwsz1=vwsc1_plus_vwsz1 + clc + lda bitmap_plot.x + adc #<$a0 + sta bitmap_plot.x + lda bitmap_plot.x+1 + adc #>$a0 + sta bitmap_plot.x+1 + //SEG51 [27] (word~) main::$29 ← (word) main::idx_y#3 << (byte) 1 -- vwuz1=vwuz2_rol_1 + lda idx_y + asl + sta _29 + lda idx_y+1 + rol + sta _29+1 + //SEG52 [28] (signed word*~) main::$31 ← (const signed word[$200]) SINUS#0 + (word~) main::$29 -- pwsz1=pwsc1_plus_vwuz1 + clc + lda _31 + adc #SINUS + sta _31+1 + //SEG53 [29] (signed word) main::sin_y#0 ← *((signed word*~) main::$31) -- vwsz1=_deref_pwsz1 + ldy #0 + lda (sin_y),y + tax + iny + lda (sin_y),y + stx sin_y + sta sin_y+1 + //SEG54 [30] (signed word) mul16s::a#2 ← (signed word) main::r#10 + //SEG55 [31] (signed word) mul16s::b#2 ← (signed word) main::sin_y#0 + //SEG56 [32] call mul16s + //SEG57 [58] phi from main::@10 to mul16s [phi:main::@10->mul16s] + //SEG58 [58] phi (signed word) mul16s::b#3 = (signed word) mul16s::b#2 [phi:main::@10->mul16s#0] -- register_copy + //SEG59 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#2 [phi:main::@10->mul16s#1] -- register_copy + jsr mul16s + //SEG60 [33] (signed dword) mul16s::return#4 ← (signed dword) mul16s::return#0 + //SEG61 main::@11 + //SEG62 [34] (signed dword) main::ypos#0 ← (signed dword) mul16s::return#4 + //SEG63 [35] (word~) main::$15 ← > (signed dword) main::ypos#0 -- vwuz1=_hi_vdsz2 + lda ypos+2 + sta _15 + lda ypos+3 + sta _15+1 + //SEG64 [36] (signed word~) main::$17 ← (signed word)(word~) main::$15 >> (signed byte) 2 -- vwsz1=vwsz1_ror_2 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + lda _17+1 + cmp #$80 + ror _17+1 + ror _17 + //SEG65 [37] (signed word~) main::$18 ← (signed byte) $64 + (signed word~) main::$17 -- vwsz1=vbsc1_plus_vwsz1 + lda #$64 + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda _18 + adc $fe + sta _18 + lda _18+1 + adc $ff + sta _18+1 + //SEG66 [38] (byte) bitmap_plot::y#0 ← (byte)(word)(signed word~) main::$18 -- vbuaa=_byte_vwuz1 + lda _18 + //SEG67 [39] call bitmap_plot + jsr bitmap_plot + //SEG68 main::@12 + //SEG69 [40] *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) ← ++ *((const byte[$100]) plots_per_frame#0 + (byte) frame_cnt#0) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + ldx frame_cnt + inc plots_per_frame,x + //SEG70 [41] (word) main::idx_x#1 ← (word) main::idx_x#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 + lda #r_add + clc + adc idx_x + sta idx_x + bcc !+ + inc idx_x+1 + !: + //SEG71 [42] if((word) main::idx_x#1<(word) $200) goto main::@13 -- vwuz1_lt_vwuc1_then_la1 + lda idx_x+1 + cmp #>$200 + bcc b3 + bne !+ + lda idx_x + cmp #<$200 + bcc b3 + !: + //SEG72 [44] phi from main::@12 to main::@3 [phi:main::@12->main::@3] + //SEG73 [44] phi (word) main::idx_x#10 = (byte) 0 [phi:main::@12->main::@3#0] -- vwuz1=vbuc1 + lda #0 + sta idx_x + sta idx_x+1 + //SEG74 [43] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + //SEG75 main::@13 + //SEG76 [44] phi from main::@13 to main::@3 [phi:main::@13->main::@3] + //SEG77 [44] phi (word) main::idx_x#10 = (word) main::idx_x#1 [phi:main::@13->main::@3#0] -- register_copy + //SEG78 main::@3 + b3: + //SEG79 [45] (word) main::idx_y#1 ← (word) main::idx_y#3 + (const byte) main::r_add#0 -- vwuz1=vwuz1_plus_vbuc1 + lda #r_add + clc + adc idx_y + sta idx_y + bcc !+ + inc idx_y+1 + !: + //SEG80 [46] if((word) main::idx_y#1<(word) $200) goto main::@14 -- vwuz1_lt_vwuc1_then_la1 + lda idx_y+1 + cmp #>$200 + bcc b4 + bne !+ + lda idx_y + cmp #<$200 + bcc b4 + !: + //SEG81 [48] phi from main::@3 to main::@4 [phi:main::@3->main::@4] + //SEG82 [48] phi (word) main::idx_y#10 = (byte) 0 [phi:main::@3->main::@4#0] -- vwuz1=vbuc1 + lda #0 + sta idx_y + sta idx_y+1 + //SEG83 [47] phi from main::@3 to main::@14 [phi:main::@3->main::@14] + //SEG84 main::@14 + //SEG85 [48] phi from main::@14 to main::@4 [phi:main::@14->main::@4] + //SEG86 [48] phi (word) main::idx_y#10 = (word) main::idx_y#1 [phi:main::@14->main::@4#0] -- register_copy + //SEG87 main::@4 + b4: + //SEG88 [49] (signed word) main::r#1 ← (signed word) main::r#10 + (const byte) main::r_add#0 -- vwsz1=vwsz1_plus_vbsc1 + lda #r_add + sta $fe + ora #$7f + bmi !+ + lda #0 + !: + sta $ff + clc + lda r + adc $fe + sta r + lda r+1 + adc $ff + sta r+1 + //SEG89 [50] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@5 -- vwsz1_ge_vwsc1_then_la1 + lda r + cmp #<$200*$c+$100 + lda r+1 + sbc #>$200*$c+$100 + bvc !+ + eor #$80 + !: + bpl b5 + //SEG90 [15] phi from main::@4 to main::@1 [phi:main::@4->main::@1] + //SEG91 [15] phi (word) main::idx_y#3 = (word) main::idx_y#10 [phi:main::@4->main::@1#0] -- register_copy + //SEG92 [15] phi (signed word) main::r#10 = (signed word) main::r#1 [phi:main::@4->main::@1#1] -- register_copy + //SEG93 [15] phi (word) main::idx_x#3 = (word) main::idx_x#10 [phi:main::@4->main::@1#2] -- register_copy + jmp b2 + //SEG94 main::@5 + b5: + //SEG95 [51] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + inc BORDERCOL + jmp b5 +} +//SEG96 bitmap_plot +// Plot a single dot in the bitmap +// bitmap_plot(signed word zeropage($32) x, byte register(A) y) +bitmap_plot: { + .label _1 = $38 + .label plotter = $36 + .label x = $32 + .label _3 = $36 + //SEG97 [52] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa + tay + lda bitmap_plot_yhi,y + sta _3+1 + lda bitmap_plot_ylo,y + sta _3 + //SEG98 [53] (word~) bitmap_plot::$1 ← (word)(signed word) bitmap_plot::x#0 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + lda x + and #<$fff8 + sta _1 + lda x+1 + and #>$fff8 + sta _1+1 + //SEG99 [54] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 + lda plotter + clc + adc _1 + sta plotter + lda plotter+1 + adc _1+1 + sta plotter+1 + //SEG100 [55] (byte~) bitmap_plot::$2 ← < (word)(signed word) bitmap_plot::x#0 -- vbuaa=_lo_vwuz1 + lda x + //SEG101 [56] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa + tay + lda bitmap_plot_bit,y + ldy #0 + ora (plotter),y + sta (plotter),y + //SEG102 bitmap_plot::@return + //SEG103 [57] return + rts +} +//SEG104 mul16s +// Multiply of two signed words to a signed double word +// Fixes offsets introduced by using unsigned multiplication +// mul16s(signed word zeropage(4) a, signed word zeropage(8) b) +mul16s: { + .label _9 = $3a + .label _13 = $3c + .label _16 = $3a + .label _17 = $3c + .label m = $a + .label return = $a + .label a = 4 + .label b = 8 + //SEG105 [59] (dword~) mul16u::mb#6 ← (word)(signed word) mul16s::b#3 -- vduz1=vwuz2 + lda b + sta mul16u.mb + lda b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + //SEG106 [60] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#3 -- vwuz1=vwuz2 + lda a + sta mul16u.a + lda a+1 + sta mul16u.a+1 + //SEG107 [61] call mul16u + //SEG108 [76] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG109 [76] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG110 [76] phi (dword) mul16u::mb#0 = (dword~) mul16u::mb#6 [phi:mul16s->mul16u#1] -- register_copy + jsr mul16u + //SEG111 [62] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + //SEG112 mul16s::@5 + //SEG113 [63] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + //SEG114 [64] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + lda a+1 + bpl b1 + //SEG115 mul16s::@3 + //SEG116 [65] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + lda m+2 + sta _9 + lda m+3 + sta _9+1 + //SEG117 [66] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#3 -- vwuz1=vwuz1_minus_vwuz2 + lda _16 + sec + sbc b + sta _16 + lda _16+1 + sbc b+1 + sta _16+1 + //SEG118 [67] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + lda _16 + sta m+2 + lda _16+1 + sta m+3 + //SEG119 [68] phi from mul16s::@3 mul16s::@5 to mul16s::@1 [phi:mul16s::@3/mul16s::@5->mul16s::@1] + //SEG120 [68] phi (dword) mul16s::m#5 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@5->mul16s::@1#0] -- register_copy + //SEG121 mul16s::@1 + b1: + //SEG122 [69] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -- vwsz1_ge_0_then_la1 + lda b+1 + bpl b2 + //SEG123 mul16s::@4 + //SEG124 [70] (word~) mul16s::$13 ← > (dword) mul16s::m#5 -- vwuz1=_hi_vduz2 + lda m+2 + sta _13 + lda m+3 + sta _13+1 + //SEG125 [71] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#3 -- vwuz1=vwuz1_minus_vwuz2 + lda _17 + sec + sbc a + sta _17 + lda _17+1 + sbc a+1 + sta _17+1 + //SEG126 [72] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17 -- vduz1=vduz1_sethi_vwuz2 + lda _17 + sta m+2 + lda _17+1 + sta m+3 + //SEG127 [73] phi from mul16s::@1 mul16s::@4 to mul16s::@2 [phi:mul16s::@1/mul16s::@4->mul16s::@2] + //SEG128 [73] phi (dword) mul16s::m#4 = (dword) mul16s::m#5 [phi:mul16s::@1/mul16s::@4->mul16s::@2#0] -- register_copy + //SEG129 mul16s::@2 + b2: + //SEG130 [74] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + //SEG131 mul16s::@return + //SEG132 [75] return + rts +} +//SEG133 mul16u +// Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word +// mul16u(word zeropage($10) a, word zeropage($e) b) +mul16u: { + .label mb = $12 + .label a = $10 + .label res = $a + .label return = $a + .label b = $e + //SEG134 [77] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + //SEG135 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG136 [77] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + lda #0 + sta res + sta res+1 + sta res+2 + sta res+3 + //SEG137 [77] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG138 mul16u::@1 + b1: + //SEG139 [78] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + lda a + bne b2 + lda a+1 + bne b2 + //SEG140 mul16u::@return + //SEG141 [79] return + rts + //SEG142 mul16u::@2 + b2: + //SEG143 [80] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 + lda a + and #1 + //SEG144 [81] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b3 + //SEG145 mul16u::@4 + //SEG146 [82] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + lda res + clc + adc mb + sta res + lda res+1 + adc mb+1 + sta res+1 + lda res+2 + adc mb+2 + sta res+2 + lda res+3 + adc mb+3 + sta res+3 + //SEG147 [83] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG148 [83] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG149 mul16u::@3 + b3: + //SEG150 [84] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + lsr a+1 + ror a + //SEG151 [85] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + asl mb + rol mb+1 + rol mb+2 + rol mb+3 + //SEG152 [77] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG153 [77] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG154 [77] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG155 [77] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + jmp b1 +} +//SEG156 init_irq +// Setup the IRQ +init_irq: { + //SEG157 asm { sei } + sei + //SEG158 [87] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG159 [88] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG160 [89] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + //SEG161 [90] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) | (byte) $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + // Set raster line to $100 + lda #$80 + ora VIC_CONTROL + sta VIC_CONTROL + //SEG162 [91] *((const byte*) RASTER#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta RASTER + //SEG163 [92] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + //SEG164 [93] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_CLOBBER)(void()) irq() -- _deref_pptc1=pprc2 + // Set the IRQ routine + lda #irq + sta HARDWARE_IRQ+1 + //SEG165 asm { cli } + cli + //SEG166 init_irq::@return + //SEG167 [95] return + rts +} +//SEG168 bitmap_clear +// Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with +bitmap_clear: { + .const col = WHITE*$10 + //SEG169 [97] call memset + //SEG170 [101] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + //SEG171 [101] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 + ldx #col + //SEG172 [101] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + //SEG173 [101] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memset.str+1 + jsr memset + //SEG174 [98] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + //SEG175 bitmap_clear::@1 + //SEG176 [99] call memset + //SEG177 [101] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + //SEG178 [101] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 + ldx #0 + //SEG179 [101] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + //SEG180 [101] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + lda #BITMAP + sta memset.str+1 + jsr memset + //SEG181 bitmap_clear::@return + //SEG182 [100] return + rts +} +//SEG183 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($16) str, byte register(X) c, word zeropage($18) num) +memset: { + .label end = $18 + .label dst = $16 + .label str = $16 + .label num = $18 + //SEG184 [102] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + lda end + clc + adc str + sta end + lda end+1 + adc str+1 + sta end+1 + //SEG185 [103] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + //SEG186 [104] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + //SEG187 [104] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + //SEG188 memset::@1 + b1: + //SEG189 [105] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (dst),y + //SEG190 [106] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG191 [107] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + lda dst+1 + cmp end+1 + bne b1 + lda dst + cmp end + bne b1 + //SEG192 memset::@return + //SEG193 [108] return + rts +} +//SEG194 bitmap_init +// Initialize bitmap plotting tables +bitmap_init: { + .label _7 = $3e + .label yoffs = $1a + //SEG195 [110] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + //SEG196 [110] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG197 [110] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + lda #$80 + //SEG198 [110] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG199 [110] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG200 [110] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG201 bitmap_init::@1 + b1: + //SEG202 [111] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + sta bitmap_plot_bit,x + //SEG203 [112] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + lsr + //SEG204 [113] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + cmp #0 + bne b2 + //SEG205 [115] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG206 [115] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + lda #$80 + //SEG207 [114] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG208 bitmap_init::@6 + //SEG209 [115] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG210 [115] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG211 bitmap_init::@2 + b2: + //SEG212 [116] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + inx + //SEG213 [117] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + cpx #0 + bne b1 + //SEG214 [118] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG215 [118] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + lda #BITMAP + sta yoffs+1 + //SEG216 [118] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + ldx #0 + //SEG217 [118] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG218 [118] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG219 [118] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG220 bitmap_init::@3 + b3: + //SEG221 [119] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + lda #7 + sax _7 + //SEG222 [120] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + lda yoffs + //SEG223 [121] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + ora _7 + //SEG224 [122] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + sta bitmap_plot_ylo,x + //SEG225 [123] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + lda yoffs+1 + //SEG226 [124] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + sta bitmap_plot_yhi,x + //SEG227 [125] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + lda #7 + cmp _7 + bne b4 + //SEG228 bitmap_init::@5 + //SEG229 [126] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + clc + lda yoffs + adc #<$28*8 + sta yoffs + lda yoffs+1 + adc #>$28*8 + sta yoffs+1 + //SEG230 [127] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG231 [127] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG232 bitmap_init::@4 + b4: + //SEG233 [128] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + inx + //SEG234 [129] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + cpx #0 + bne b3 + //SEG235 bitmap_init::@return + //SEG236 [130] return + rts +} +//SEG237 sin16s_gen2 +// Generate signed word sinus table - with values in the range min-max. +// sintab - the table to generate into +// wavelength - the number of sinus points in a total sinus wavelength (the size of the table) +// sin16s_gen2(signed word* zeropage($20) sintab) +sin16s_gen2: { + .label wavelength = $200 + .const min = -$1001 + .const max = $1001 + .const ampl = max-min + .label _5 = $a + .label _6 = $43 + .label step = $3f + .label sintab = $20 + .label x = $1c + .label i = $22 + //SEG238 [132] call div32u16u + //SEG239 [199] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + jsr div32u16u + //SEG240 [133] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + //SEG241 sin16s_gen2::@2 + //SEG242 [134] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + //SEG243 [135] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG244 [135] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + lda #0 + sta i + sta i+1 + //SEG245 [135] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) SINUS#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + lda #SINUS + sta sintab+1 + //SEG246 [135] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + lda #0 + sta x + sta x+1 + sta x+2 + sta x+3 + // u[4.28] + //SEG247 [135] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG248 [135] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG249 [135] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG250 [135] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG251 sin16s_gen2::@1 + b1: + //SEG252 [136] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + lda x + sta sin16s.x + lda x+1 + sta sin16s.x+1 + lda x+2 + sta sin16s.x+2 + lda x+3 + sta sin16s.x+3 + //SEG253 [137] call sin16s + jsr sin16s + //SEG254 [138] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + //SEG255 sin16s_gen2::@3 + //SEG256 [139] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + //SEG257 [140] call mul16s + //SEG258 [58] phi from sin16s_gen2::@3 to mul16s [phi:sin16s_gen2::@3->mul16s] + //SEG259 [58] phi (signed word) mul16s::b#3 = (const signed word) sin16s_gen2::ampl#0 [phi:sin16s_gen2::@3->mul16s#0] -- vwsz1=vwsc1 + lda #ampl + sta mul16s.b+1 + //SEG260 [58] phi (signed word) mul16s::a#3 = (signed word) mul16s::a#0 [phi:sin16s_gen2::@3->mul16s#1] -- register_copy + jsr mul16s + //SEG261 [141] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + //SEG262 sin16s_gen2::@4 + //SEG263 [142] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + //SEG264 [143] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + lda _5+2 + sta _6 + lda _5+3 + sta _6+1 + //SEG265 [144] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + ldy #0 + lda _6 + sta (sintab),y + iny + lda _6+1 + sta (sintab),y + //SEG266 [145] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + lda #SIZEOF_SIGNED_WORD + clc + adc sintab + sta sintab + bcc !+ + inc sintab+1 + !: + //SEG267 [146] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + lda x + clc + adc step + sta x + lda x+1 + adc step+1 + sta x+1 + lda x+2 + adc step+2 + sta x+2 + lda x+3 + adc step+3 + sta x+3 + //SEG268 [147] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + inc i + bne !+ + inc i+1 + !: + //SEG269 [148] if((word) sin16s_gen2::i#1<(const word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + lda i+1 + cmp #>wavelength + bcc b1 + bne !+ + lda i + cmp #PI_u4f28>>$10 + bcc b4 + bne !+ + lda x+2 + cmp #>$10 + bcc b4 + bne !+ + lda x+1 + cmp #>PI_u4f28 + bcc b4 + bne !+ + lda x + cmp #PI_u4f28 + sta x+1 + lda x+2 + sbc #>$10 + sta x+2 + lda x+3 + sbc #>PI_u4f28>>$10 + sta x+3 + //SEG276 [152] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG277 [152] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + lda #1 + sta isUpper + //SEG278 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + jmp b1 + //SEG279 [152] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + b4: + //SEG280 [152] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + lda #0 + sta isUpper + //SEG281 [152] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG282 sin16s::@1 + b1: + //SEG283 [153] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + lda x+3 + cmp #>PI_HALF_u4f28>>$10 + bcc b2 + bne !+ + lda x+2 + cmp #>$10 + bcc b2 + bne !+ + lda x+1 + cmp #>PI_HALF_u4f28 + bcc b2 + bne !+ + lda x + cmp #PI_u4f28 + sbc x+1 + sta x+1 + lda #>$10 + sbc x+2 + sta x+2 + lda #>PI_u4f28>>$10 + sbc x+3 + sta x+3 + //SEG286 [155] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG287 [155] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG288 sin16s::@2 + b2: + //SEG289 [156] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + ldy #3 + !: + asl _4 + rol _4+1 + rol _4+2 + rol _4+3 + dey + bne !- + //SEG290 [157] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + lda _4+2 + sta x1 + lda _4+3 + sta x1+1 + //SEG291 [158] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v1 + lda x1+1 + sta mulu16_sel.v1+1 + //SEG292 [159] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG293 [160] call mulu16_sel + //SEG294 [190] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG295 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #0 + //SEG296 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG297 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG298 [161] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + //SEG299 sin16s::@7 + //SEG300 [162] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta x2 + lda mulu16_sel.return+1 + sta x2+1 + //SEG301 [163] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + //SEG302 [164] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG303 [165] call mulu16_sel + //SEG304 [190] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG305 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #1 + //SEG306 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG307 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG308 [166] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta mulu16_sel.return_1 + lda mulu16_sel.return+1 + sta mulu16_sel.return_1+1 + //SEG309 sin16s::@8 + //SEG310 [167] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + //SEG311 [168] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + //SEG312 [169] call mulu16_sel + //SEG313 [190] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG314 [190] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #1 + //SEG315 [190] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + lda #<$10000/6 + sta mulu16_sel.v2 + lda #>$10000/6 + sta mulu16_sel.v2+1 + //SEG316 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG317 [170] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + //SEG318 sin16s::@9 + //SEG319 [171] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + //SEG320 [172] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + lda x1 + sec + sbc x3_6 + sta usinx + lda x1+1 + sbc x3_6+1 + sta usinx+1 + //SEG321 [173] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + //SEG322 [174] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG323 [175] call mulu16_sel + //SEG324 [190] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG325 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #0 + //SEG326 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG327 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG328 [176] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + lda mulu16_sel.return + sta mulu16_sel.return_10 + lda mulu16_sel.return+1 + sta mulu16_sel.return_10+1 + //SEG329 sin16s::@10 + //SEG330 [177] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + //SEG331 [178] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + //SEG332 [179] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + lda x1 + sta mulu16_sel.v2 + lda x1+1 + sta mulu16_sel.v2+1 + //SEG333 [180] call mulu16_sel + //SEG334 [190] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG335 [190] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + ldx #0 + //SEG336 [190] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG337 [190] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + jsr mulu16_sel + //SEG338 [181] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + //SEG339 sin16s::@11 + //SEG340 [182] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + //SEG341 [183] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + //SEG342 [184] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + lda usinx + clc + adc x5_128 + sta usinx + lda usinx+1 + adc x5_128+1 + sta usinx+1 + //SEG343 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + lda isUpper + cmp #0 + beq b3 + //SEG344 sin16s::@6 + //SEG345 [186] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + sec + lda #0 + sbc sinx + sta sinx + lda #0 + sbc sinx+1 + sta sinx+1 + //SEG346 [187] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG347 [187] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG348 sin16s::@3 + b3: + //SEG349 sin16s::@return + //SEG350 [188] return + rts + //SEG351 sin16s::@12 + //SEG352 [189] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 +} +//SEG353 mulu16_sel +// Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. +// The select parameter indicates how many of the highest bits of the 32-bit result to skip +// mulu16_sel(word zeropage($29) v1, word zeropage($e) v2, byte register(X) select) +mulu16_sel: { + .label _0 = $a + .label _1 = $a + .label v1 = $29 + .label v2 = $e + .label return = $47 + .label return_1 = $29 + .label return_10 = $29 + //SEG354 [191] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + lda v1 + sta mul16u.a + lda v1+1 + sta mul16u.a+1 + //SEG355 [192] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + //SEG356 [193] call mul16u + //SEG357 [76] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG358 [76] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG359 [76] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + lda mul16u.b + sta mul16u.mb + lda mul16u.b+1 + sta mul16u.mb+1 + lda #0 + sta mul16u.mb+2 + sta mul16u.mb+3 + jsr mul16u + //SEG360 [194] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + //SEG361 mulu16_sel::@1 + //SEG362 [195] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + //SEG363 [196] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + cpx #0 + beq !e+ + !: + asl _1 + rol _1+1 + rol _1+2 + rol _1+3 + dex + bne !- + !e: + //SEG364 [197] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + lda _1+2 + sta return + lda _1+3 + sta return+1 + //SEG365 mulu16_sel::@return + //SEG366 [198] return + rts +} +//SEG367 div32u16u +// Divide unsigned 32-bit dword dividend with a 16-bit word divisor +// The 16-bit word remainder can be found in rem16u after the division +div32u16u: { + .label quotient_hi = $49 + .label quotient_lo = $2f + .label return = $3f + //SEG368 [200] call divr16u + //SEG369 [209] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + //SEG370 [209] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + lda #>$10 + sta divr16u.dividend + lda #>PI2_u4f28>>$10 + sta divr16u.dividend+1 + //SEG371 [209] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + lda #0 + sta divr16u.rem + sta divr16u.rem+1 + jsr divr16u + //SEG372 [201] (word) divr16u::return#2 ← (word) divr16u::return#0 + //SEG373 div32u16u::@1 + //SEG374 [202] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + lda divr16u.return + sta quotient_hi + lda divr16u.return+1 + sta quotient_hi+1 + //SEG375 [203] (word) divr16u::rem#4 ← (word) rem16u#1 + //SEG376 [204] call divr16u + //SEG377 [209] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG378 [209] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + lda #PI2_u4f28&$ffff + sta divr16u.dividend+1 + //SEG379 [209] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + jsr divr16u + //SEG380 [205] (word) divr16u::return#3 ← (word) divr16u::return#0 + //SEG381 div32u16u::@2 + //SEG382 [206] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + //SEG383 [207] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + lda quotient_hi + sta return+2 + lda quotient_hi+1 + sta return+3 + lda quotient_lo + sta return + lda quotient_lo+1 + sta return+1 + //SEG384 div32u16u::@return + //SEG385 [208] return + rts +} +//SEG386 divr16u +// Performs division on two 16 bit unsigned words and an initial remainder +// Returns the quotient dividend/divisor. +// The final remainder will be set into the global variable rem16u +// Implemented using simple binary division +// divr16u(word zeropage($2d) dividend, word zeropage($2b) rem) +divr16u: { + .label rem = $2b + .label dividend = $2d + .label quotient = $2f + .label return = $2f + //SEG387 [210] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + //SEG388 [210] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG389 [210] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + txa + sta quotient + sta quotient+1 + //SEG390 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG391 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG392 [210] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG393 [210] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG394 [210] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG395 [210] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG396 [210] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG397 divr16u::@1 + b1: + //SEG398 [211] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl rem + rol rem+1 + //SEG399 [212] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + lda dividend+1 + //SEG400 [213] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + and #$80 + //SEG401 [214] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + cmp #0 + beq b2 + //SEG402 divr16u::@4 + //SEG403 [215] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + lda #1 + ora rem + sta rem + //SEG404 [216] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG405 [216] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG406 divr16u::@2 + b2: + //SEG407 [217] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl dividend + rol dividend+1 + //SEG408 [218] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + asl quotient + rol quotient+1 + //SEG409 [219] if((word) divr16u::rem#6<(const word) sin16s_gen2::wavelength#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + lda rem+1 + cmp #>sin16s_gen2.wavelength + bcc b3 + bne !+ + lda rem + cmp #sin16s_gen2.wavelength + sta rem+1 + //SEG413 [222] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG414 [222] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG415 [222] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG416 divr16u::@3 + b3: + //SEG417 [223] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG418 [224] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + cpx #$10 + bne b1 + //SEG419 divr16u::@6 + //SEG420 [225] (word) rem16u#1 ← (word) divr16u::rem#11 + //SEG421 divr16u::@return + //SEG422 [226] return + rts +} +//SEG423 irq +// Interrupt Routine counting frames +irq: { + //SEG424 entry interrupt(HARDWARE_CLOBBER) + sta rega+1 + //SEG425 [227] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + lda #WHITE + sta BGCOL + //SEG426 [228] if((byte) 0==(byte) frame_cnt#0) goto irq::@1 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp frame_cnt + beq b1 + //SEG427 irq::@2 + //SEG428 [229] (byte) frame_cnt#1 ← ++ (byte) frame_cnt#0 -- vbuz1=_inc_vbuz1 + inc frame_cnt + //SEG429 [230] phi from irq irq::@2 to irq::@1 [phi:irq/irq::@2->irq::@1] + //SEG430 [230] phi (byte) frame_cnt#2 = (byte) frame_cnt#0 [phi:irq/irq::@2->irq::@1#0] -- register_copy + //SEG431 irq::@1 + b1: + //SEG432 [231] *((const byte*) BGCOL#0) ← (const byte) BLACK#0 -- _deref_pbuc1=vbuc2 + lda #BLACK + sta BGCOL + //SEG433 [232] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Acknowledge the IRQ + lda #IRQ_RASTER + sta IRQ_STATUS + //SEG434 irq::@return + //SEG435 [233] return - exit interrupt(HARDWARE_CLOBBER) + rega: + lda #00 + rti +} +//SEG436 File Data + // Tables for the plotter - initialized by calling bitmap_init(); + bitmap_plot_ylo: .fill $100, 0 + bitmap_plot_yhi: .fill $100, 0 + bitmap_plot_bit: .fill $100, 0 + plots_per_frame: .fill $100, 0 + .align $100 + SINUS: .fill 2*$200, 0 + diff --git a/src/test/ref/bitmap-plot-2.sym b/src/test/ref/bitmap-plot-2.sym new file mode 100644 index 000000000..487afcc05 --- /dev/null +++ b/src/test/ref/bitmap-plot-2.sym @@ -0,0 +1,460 @@ +(label) @1 +(label) @2 +(label) @begin +(label) @end +(byte*) BGCOL +(const byte*) BGCOL#0 BGCOL = (byte*) 53281 +(byte*) BITMAP +(const byte*) BITMAP#0 BITMAP = (byte*) 8192 +(byte) BLACK +(const byte) BLACK#0 BLACK = (byte) 0 +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280 +(byte*) CIA1_INTERRUPT +(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333 +(byte) CIA_INTERRUPT_CLEAR +(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f +(byte*) D011 +(const byte*) D011#0 D011 = (byte*) 53265 +(byte*) D018 +(const byte*) D018#0 D018 = (byte*) 53272 +(void()**) HARDWARE_IRQ +(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534 +(byte*) IRQ_ENABLE +(const byte*) IRQ_ENABLE#0 IRQ_ENABLE = (byte*) 53274 +(byte) IRQ_RASTER +(const byte) IRQ_RASTER#0 IRQ_RASTER = (byte) 1 +(byte*) IRQ_STATUS +(const byte*) IRQ_STATUS#0 IRQ_STATUS = (byte*) 53273 +(dword) PI2_u4f28 +(const dword) PI2_u4f28#0 PI2_u4f28 = (dword) $6487ed51 +(dword) PI_HALF_u4f28 +(const dword) PI_HALF_u4f28#0 PI_HALF_u4f28 = (dword) $1921fb54 +(dword) PI_u4f28 +(const dword) PI_u4f28#0 PI_u4f28 = (dword) $3243f6a9 +(byte*) PROCPORT +(const byte*) PROCPORT#0 PROCPORT = (byte*) 1 +(byte*) PROCPORT_DDR +(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0 +(byte) PROCPORT_DDR_MEMORY_MASK +(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7 +(byte) PROCPORT_RAM_IO +(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35 +(byte*) RASTER +(const byte*) RASTER#0 RASTER = (byte*) 53266 +(byte*) SCREEN +(const byte*) SCREEN#0 SCREEN = (byte*) 1024 +(signed word[$200]) SINUS +(const signed word[$200]) SINUS#0 SINUS = { fill( $200, 0) } +(const byte) SIZEOF_SIGNED_WORD SIZEOF_SIGNED_WORD = (byte) 2 +(byte) VIC_BMM +(const byte) VIC_BMM#0 VIC_BMM = (byte) $20 +(byte*) VIC_CONTROL +(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265 +(byte) VIC_DEN +(const byte) VIC_DEN#0 VIC_DEN = (byte) $10 +(byte) VIC_RSEL +(const byte) VIC_RSEL#0 VIC_RSEL = (byte) 8 +(byte) WHITE +(const byte) WHITE#0 WHITE = (byte) 1 +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) +(label) bitmap_clear::@1 +(label) bitmap_clear::@return +(byte) bitmap_clear::bgcol +(byte) bitmap_clear::col +(const byte) bitmap_clear::col#0 col = (const byte) WHITE#0*(byte) $10 +(byte) bitmap_clear::fgcol +(byte*) bitmap_gfx +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) +(byte~) bitmap_init::$4 reg byte a 22.0 +(byte~) bitmap_init::$5 reg byte a 22.0 +(byte~) bitmap_init::$6 reg byte a 22.0 +(byte~) bitmap_init::$7 $7 zp ZP_BYTE:62 5.5 +(label) bitmap_init::@1 +(label) bitmap_init::@2 +(label) bitmap_init::@3 +(label) bitmap_init::@4 +(label) bitmap_init::@5 +(label) bitmap_init::@6 +(label) bitmap_init::@return +(byte) bitmap_init::bits +(byte) bitmap_init::bits#1 reg byte a 11.0 +(byte) bitmap_init::bits#3 reg byte a 16.5 +(byte) bitmap_init::bits#4 reg byte a 7.333333333333333 +(byte*) bitmap_init::gfx +(byte*) bitmap_init::screen +(byte) bitmap_init::x +(byte) bitmap_init::x#1 reg byte x 16.5 +(byte) bitmap_init::x#2 reg byte x 5.5 +(byte) bitmap_init::y +(byte) bitmap_init::y#1 reg byte x 16.5 +(byte) bitmap_init::y#2 reg byte x 5.5 +(byte*) bitmap_init::yoffs +(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:26 22.0 +(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:26 6.875 +(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:26 11.0 +(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y) +(word~) bitmap_plot::$1 $1 zp ZP_WORD:56 4.0 +(byte~) bitmap_plot::$2 reg byte a 4.0 +(word~) bitmap_plot::$3 $3 zp ZP_WORD:54 1.0 +(label) bitmap_plot::@return +(byte*) bitmap_plot::plotter +(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:54 3.0 +(word) bitmap_plot::x +(signed word) bitmap_plot::x#0 x zp ZP_WORD:50 0.6875 +(byte) bitmap_plot::y +(byte) bitmap_plot::y#0 reg byte a 15.0 +(byte[$100]) bitmap_plot_bit +(const byte[$100]) bitmap_plot_bit#0 bitmap_plot_bit = { fill( $100, 0) } +(byte[$100]) bitmap_plot_yhi +(const byte[$100]) bitmap_plot_yhi#0 bitmap_plot_yhi = { fill( $100, 0) } +(byte[$100]) bitmap_plot_ylo +(const byte[$100]) bitmap_plot_ylo#0 bitmap_plot_ylo = { fill( $100, 0) } +(byte*) bitmap_screen +(dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) +(label) div32u16u::@1 +(label) div32u16u::@2 +(label) div32u16u::@return +(dword) div32u16u::dividend +(word) div32u16u::divisor +(dword) div32u16u::quotient +(word) div32u16u::quotient_hi +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:73 0.8 +(word) div32u16u::quotient_lo +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:47 4.0 +(dword) div32u16u::return +(dword) div32u16u::return#0 return zp ZP_DWORD:63 1.3333333333333333 +(dword) div32u16u::return#2 return zp ZP_DWORD:63 4.0 +(word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) +(byte~) divr16u::$1 reg byte a 22.0 +(byte~) divr16u::$2 reg byte a 22.0 +(label) divr16u::@1 +(label) divr16u::@2 +(label) divr16u::@3 +(label) divr16u::@4 +(label) divr16u::@5 +(label) divr16u::@6 +(label) divr16u::@return +(word) divr16u::dividend +(word) divr16u::dividend#0 dividend zp ZP_WORD:45 2.75 +(word) divr16u::dividend#3 dividend zp ZP_WORD:45 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:45 2.0 +(word) divr16u::divisor +(byte) divr16u::i +(byte) divr16u::i#1 reg byte x 16.5 +(byte) divr16u::i#2 reg byte x 1.6923076923076923 +(word) divr16u::quotient +(word) divr16u::quotient#1 quotient zp ZP_WORD:47 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:47 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:47 2.75 +(word) divr16u::rem +(word) divr16u::rem#0 rem zp ZP_WORD:43 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:43 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:43 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:43 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:43 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:43 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:43 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:43 11.0 +(word) divr16u::return +(word) divr16u::return#0 return zp ZP_WORD:47 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:47 4.0 +(word) divr16u::return#3 return zp ZP_WORD:47 4.0 +(byte) frame_cnt +(byte) frame_cnt#0 frame_cnt zp ZP_BYTE:49 0.6000000000000001 +(byte) frame_cnt#1 frame_cnt zp ZP_BYTE:49 4.0 +(byte) frame_cnt#2 frame_cnt zp ZP_BYTE:49 40.0 +(void()) init_irq() +(label) init_irq::@return +interrupt(HARDWARE_CLOBBER)(void()) irq() +(label) irq::@1 +(label) irq::@2 +(label) irq::@return +(void()) main() +(signed word~) main::$11 $11 zp ZP_WORD:50 22.0 +(word~) main::$15 $15 zp ZP_WORD:52 11.0 +(signed word~) main::$17 $17 zp ZP_WORD:52 22.0 +(signed word~) main::$18 $18 zp ZP_WORD:52 11.0 +(word~) main::$28 $28 zp ZP_WORD:8 22.0 +(word~) main::$29 $29 zp ZP_WORD:8 22.0 +(signed word*~) main::$30 $30 zp ZP_WORD:8 22.0 +(signed word*~) main::$31 $31 zp ZP_WORD:8 22.0 +(word~) main::$9 $9 zp ZP_WORD:50 11.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(signed word) main::cos_x +(signed word) main::cos_x#0 cos_x zp ZP_WORD:8 11.0 +(word) main::idx_x +(word) main::idx_x#1 idx_x zp ZP_WORD:2 11.0 +(word) main::idx_x#10 idx_x zp ZP_WORD:2 3.142857142857143 +(word) main::idx_x#3 idx_x zp ZP_WORD:2 1.2692307692307692 +(word) main::idx_y +(word) main::idx_y#1 idx_y zp ZP_WORD:6 11.0 +(word) main::idx_y#10 idx_y zp ZP_WORD:6 7.333333333333333 +(word) main::idx_y#3 idx_y zp ZP_WORD:6 1.0999999999999999 +(signed word) main::r +(signed word) main::r#1 r zp ZP_WORD:4 16.5 +(signed word) main::r#10 r zp ZP_WORD:4 1.2941176470588236 +(byte) main::r_add +(const byte) main::r_add#0 r_add = (byte) 4 +(signed word) main::sin_y +(signed word) main::sin_y#0 sin_y zp ZP_WORD:8 11.0 +(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 +(byte*) main::toD0181_gfx +(byte) main::toD0181_return +(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f +(byte*) main::toD0181_screen +(word) main::x +(signed dword) main::xpos +(signed dword) main::xpos#0 xpos zp ZP_DWORD:10 22.0 +(word) main::y +(signed dword) main::ypos +(signed dword) main::ypos#0 ypos zp ZP_DWORD:10 22.0 +(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) +(label) memset::@1 +(label) memset::@return +(byte) memset::c +(byte) memset::c#3 reg byte x 1.5714285714285714 +(byte*) memset::dst +(byte*) memset::dst#1 dst zp ZP_WORD:22 16.5 +(byte*) memset::dst#2 dst zp ZP_WORD:22 17.5 +(byte*~) memset::dst#3 dst zp ZP_WORD:22 4.0 +(byte*) memset::end +(byte*) memset::end#0 end zp ZP_WORD:24 2.1666666666666665 +(word) memset::num +(word) memset::num#2 num zp ZP_WORD:24 2.0 +(void*) memset::return +(void*) memset::str +(void*) memset::str#2 str zp ZP_WORD:22 +(signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) +(word~) mul16s::$13 $13 zp ZP_WORD:60 4.0 +(word~) mul16s::$16 $16 zp ZP_WORD:58 4.0 +(word~) mul16s::$17 $17 zp ZP_WORD:60 4.0 +(word~) mul16s::$9 $9 zp ZP_WORD:58 4.0 +(label) mul16s::@1 +(label) mul16s::@2 +(label) mul16s::@3 +(label) mul16s::@4 +(label) mul16s::@5 +(label) mul16s::@return +(signed word) mul16s::a +(signed word) mul16s::a#0 a zp ZP_WORD:4 22.0 +(signed word) mul16s::a#1 a zp ZP_WORD:4 11.0 +(signed word) mul16s::a#2 a zp ZP_WORD:4 11.0 +(signed word) mul16s::a#3 a zp ZP_WORD:4 2.692307692307692 +(signed word) mul16s::b +(signed word) mul16s::b#1 b zp ZP_WORD:8 22.0 +(signed word) mul16s::b#2 b zp ZP_WORD:8 22.0 +(signed word) mul16s::b#3 b zp ZP_WORD:8 2.1818181818181817 +(dword) mul16s::m +(dword) mul16s::m#0 m zp ZP_DWORD:10 2.0 +(dword) mul16s::m#1 m zp ZP_DWORD:10 4.0 +(dword) mul16s::m#2 m zp ZP_DWORD:10 4.0 +(dword) mul16s::m#4 m zp ZP_DWORD:10 4.0 +(dword) mul16s::m#5 m zp ZP_DWORD:10 2.5 +(signed dword) mul16s::return +(signed dword) mul16s::return#0 return zp ZP_DWORD:10 7.000000000000001 +(signed dword) mul16s::return#2 return zp ZP_DWORD:10 22.0 +(signed dword) mul16s::return#3 return zp ZP_DWORD:10 22.0 +(signed dword) mul16s::return#4 return zp ZP_DWORD:10 22.0 +(dword()) mul16u((word) mul16u::a , (word) mul16u::b) +(byte~) mul16u::$1 reg byte a 202.0 +(label) mul16u::@1 +(label) mul16u::@2 +(label) mul16u::@3 +(label) mul16u::@4 +(label) mul16u::@return +(word) mul16u::a +(word) mul16u::a#0 a zp ZP_WORD:16 101.0 +(word) mul16u::a#2 a zp ZP_WORD:16 2.0 +(word) mul16u::a#3 a zp ZP_WORD:16 67.66666666666666 +(word) mul16u::a#6 a zp ZP_WORD:16 6.0 +(word~) mul16u::a#8 a zp ZP_WORD:16 4.0 +(word) mul16u::b +(word) mul16u::b#1 b zp ZP_WORD:14 4.0 +(dword) mul16u::mb +(dword) mul16u::mb#0 mb zp ZP_DWORD:18 6.0 +(dword) mul16u::mb#1 mb zp ZP_DWORD:18 202.0 +(dword) mul16u::mb#2 mb zp ZP_DWORD:18 43.57142857142858 +(dword~) mul16u::mb#6 mb zp ZP_DWORD:18 2.0 +(dword) mul16u::res +(dword) mul16u::res#1 res zp ZP_DWORD:10 202.0 +(dword) mul16u::res#2 res zp ZP_DWORD:10 43.85714285714286 +(dword) mul16u::res#6 res zp ZP_DWORD:10 101.0 +(dword) mul16u::return +(dword) mul16u::return#2 return zp ZP_DWORD:10 4.0 +(dword) mul16u::return#3 return zp ZP_DWORD:10 4.0 +(word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) +(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:10 4.0 +(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:10 4.0 +(label) mulu16_sel::@1 +(label) mulu16_sel::@return +(word) mulu16_sel::return +(word) mulu16_sel::return#0 return zp ZP_WORD:71 4.0 +(word) mulu16_sel::return#1 return#1 zp ZP_WORD:41 4.0 +(word) mulu16_sel::return#10 return#10 zp ZP_WORD:41 4.0 +(word) mulu16_sel::return#11 return zp ZP_WORD:71 4.0 +(word) mulu16_sel::return#12 return zp ZP_WORD:71 1.714285714285714 +(word) mulu16_sel::return#2 return zp ZP_WORD:71 4.0 +(byte) mulu16_sel::select +(byte) mulu16_sel::select#5 reg byte x 0.3333333333333333 +(word) mulu16_sel::v1 +(word) mulu16_sel::v1#0 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#1 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#2 v1 zp ZP_WORD:41 4.0 +(word) mulu16_sel::v1#3 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#4 v1 zp ZP_WORD:41 2.0 +(word) mulu16_sel::v1#5 v1 zp ZP_WORD:41 12.0 +(word) mulu16_sel::v2 +(word) mulu16_sel::v2#0 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#1 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#3 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#4 v2 zp ZP_WORD:14 4.0 +(word) mulu16_sel::v2#5 v2 zp ZP_WORD:14 5.0 +(byte[$100]) plots_per_frame +(const byte[$100]) plots_per_frame#0 plots_per_frame = { fill( $100, 0) } +(word) rem16u +(word) rem16u#1 rem16u zp ZP_WORD:43 0.8 +(signed word()) sin16s((dword) sin16s::x) +(dword~) sin16s::$4 $4 zp ZP_DWORD:37 4.0 +(label) sin16s::@1 +(label) sin16s::@10 +(label) sin16s::@11 +(label) sin16s::@12 +(label) sin16s::@2 +(label) sin16s::@3 +(label) sin16s::@4 +(label) sin16s::@5 +(label) sin16s::@6 +(label) sin16s::@7 +(label) sin16s::@8 +(label) sin16s::@9 +(label) sin16s::@return +(byte) sin16s::isUpper +(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:36 0.06060606060606061 +(signed word) sin16s::return +(signed word) sin16s::return#0 return zp ZP_WORD:4 22.0 +(signed word) sin16s::return#1 return zp ZP_WORD:4 5.0 +(signed word~) sin16s::return#5 return zp ZP_WORD:4 4.0 +(signed word) sin16s::sinx +(signed word) sin16s::sinx#1 sinx zp ZP_WORD:4 4.0 +(word) sin16s::usinx +(word) sin16s::usinx#0 usinx zp ZP_WORD:4 0.3333333333333333 +(word) sin16s::usinx#1 usinx zp ZP_WORD:4 1.0 +(dword) sin16s::x +(dword) sin16s::x#0 x zp ZP_DWORD:37 8.5 +(dword) sin16s::x#1 x zp ZP_DWORD:37 4.0 +(dword) sin16s::x#2 x zp ZP_DWORD:37 4.0 +(dword) sin16s::x#4 x zp ZP_DWORD:37 5.0 +(dword) sin16s::x#6 x zp ZP_DWORD:37 6.0 +(word) sin16s::x1 +(word) sin16s::x1#0 x1 zp ZP_WORD:69 0.6363636363636365 +(word) sin16s::x2 +(word) sin16s::x2#0 x2 zp ZP_WORD:41 4.0 +(word) sin16s::x3 +(word) sin16s::x3#0 x3 zp ZP_WORD:41 1.0 +(word) sin16s::x3_6 +(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:71 4.0 +(word) sin16s::x4 +(word) sin16s::x4#0 x4 zp ZP_WORD:41 4.0 +(word) sin16s::x5 +(word) sin16s::x5#0 x5 zp ZP_WORD:71 4.0 +(word) sin16s::x5_128 +(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:71 4.0 +(void()) sin16s_gen2((signed word*) sin16s_gen2::sintab , (word) sin16s_gen2::wavelength , (signed word) sin16s_gen2::min , (signed word) sin16s_gen2::max) +(signed dword~) sin16s_gen2::$5 $5 zp ZP_DWORD:10 22.0 +(word~) sin16s_gen2::$6 $6 zp ZP_WORD:67 11.0 +(label) sin16s_gen2::@1 +(label) sin16s_gen2::@2 +(label) sin16s_gen2::@3 +(label) sin16s_gen2::@4 +(label) sin16s_gen2::@return +(signed word) sin16s_gen2::ampl +(const signed word) sin16s_gen2::ampl#0 ampl = (const signed word) sin16s_gen2::max#0-(const signed word) sin16s_gen2::min#0 +(word) sin16s_gen2::i +(word) sin16s_gen2::i#1 i zp ZP_WORD:34 16.5 +(word) sin16s_gen2::i#2 i zp ZP_WORD:34 1.8333333333333333 +(signed word) sin16s_gen2::max +(const signed word) sin16s_gen2::max#0 max = (signed word) $1001 +(signed word) sin16s_gen2::min +(const signed word) sin16s_gen2::min#0 min = (signed word) -$1001 +(signed word) sin16s_gen2::offs +(signed word*) sin16s_gen2::sintab +(signed word*) sin16s_gen2::sintab#0 sintab zp ZP_WORD:32 5.5 +(signed word*) sin16s_gen2::sintab#2 sintab zp ZP_WORD:32 3.3000000000000003 +(dword) sin16s_gen2::step +(dword) sin16s_gen2::step#0 step zp ZP_DWORD:63 0.8666666666666666 +(word) sin16s_gen2::wavelength +(const word) sin16s_gen2::wavelength#0 wavelength = (word) $200 +(dword) sin16s_gen2::x +(dword) sin16s_gen2::x#1 x zp ZP_DWORD:28 7.333333333333333 +(dword) sin16s_gen2::x#2 x zp ZP_DWORD:28 3.0 + +zp ZP_WORD:2 [ main::idx_x#3 main::idx_x#10 main::idx_x#1 ] +zp ZP_WORD:4 [ main::r#10 main::r#1 mul16s::a#3 mul16s::a#1 mul16s::a#2 mul16s::a#0 sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s::usinx#0 ] +zp ZP_WORD:6 [ main::idx_y#3 main::idx_y#10 main::idx_y#1 ] +zp ZP_WORD:8 [ mul16s::b#3 mul16s::b#1 mul16s::b#2 main::cos_x#0 main::sin_y#0 main::$28 main::$30 main::$29 main::$31 ] +zp ZP_DWORD:10 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#3 main::xpos#0 mul16s::return#4 main::ypos#0 mul16s::return#2 sin16s_gen2::$5 mulu16_sel::$0 mulu16_sel::$1 ] +zp ZP_WORD:14 [ mul16u::b#1 mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] +zp ZP_WORD:16 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] +zp ZP_DWORD:18 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#6 mul16u::mb#1 ] +zp ZP_WORD:22 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +zp ZP_WORD:24 [ memset::num#2 memset::end#0 ] +reg byte x [ memset::c#3 ] +reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] +reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] +zp ZP_WORD:26 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +zp ZP_DWORD:28 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] +zp ZP_WORD:32 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] +zp ZP_WORD:34 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] +zp ZP_BYTE:36 [ sin16s::isUpper#2 ] +zp ZP_DWORD:37 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +zp ZP_WORD:41 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 mulu16_sel::return#10 ] +reg byte x [ mulu16_sel::select#5 ] +zp ZP_WORD:43 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +zp ZP_WORD:45 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +reg byte x [ divr16u::i#2 divr16u::i#1 ] +zp ZP_BYTE:49 [ frame_cnt#2 frame_cnt#0 frame_cnt#1 ] +zp ZP_WORD:50 [ main::$9 main::$11 bitmap_plot::x#0 ] +zp ZP_WORD:52 [ main::$15 main::$17 main::$18 ] +reg byte a [ bitmap_plot::y#0 ] +zp ZP_WORD:54 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +zp ZP_WORD:56 [ bitmap_plot::$1 ] +reg byte a [ bitmap_plot::$2 ] +zp ZP_WORD:58 [ mul16s::$9 mul16s::$16 ] +zp ZP_WORD:60 [ mul16s::$13 mul16s::$17 ] +reg byte a [ mul16u::$1 ] +zp ZP_BYTE:62 [ bitmap_init::$7 ] +reg byte a [ bitmap_init::$4 ] +reg byte a [ bitmap_init::$5 ] +reg byte a [ bitmap_init::$6 ] +zp ZP_DWORD:63 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +zp ZP_WORD:67 [ sin16s_gen2::$6 ] +zp ZP_WORD:69 [ sin16s::x1#0 ] +zp ZP_WORD:71 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +zp ZP_WORD:73 [ div32u16u::quotient_hi#0 ] +reg byte a [ divr16u::$1 ] +reg byte a [ divr16u::$2 ] diff --git a/src/test/ref/c64dtv-gfxexplorer.log b/src/test/ref/c64dtv-gfxexplorer.log index 43f6ed2c1..ddc834321 100644 --- a/src/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/ref/c64dtv-gfxexplorer.log @@ -15896,15 +15896,21 @@ gfx_mode: { sta _54+1 //SEG159 [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 -- vwuz1=vwuz2_ror_6 lda _54+1 + lsr sta _55+1 lda _54 + ror sta _55 - ldy #6 - !: lsr _55+1 ror _55 - dey - bne !- + lsr _55+1 + ror _55 + lsr _55+1 + ror _55 + lsr _55+1 + ror _55 + lsr _55+1 + ror _55 //SEG160 [98] (byte~) gfx_mode::$56 ← (byte)(word~) gfx_mode::$55 -- vbuz1=_byte_vwuz2 lda _55 sta _56 @@ -21030,10 +21036,7 @@ Statement [91] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const by Statement [94] (byte*) get_vic_screen::return#10 ← (byte*) get_vic_screen::return#5 [ keyboard_events_size#24 get_vic_screen::return#10 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 get_vic_screen::return#10 ] ) always clobbers reg byte a Statement [95] (byte*~) gfx_mode::$53 ← (byte*) get_vic_screen::return#10 [ keyboard_events_size#24 gfx_mode::$53 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$53 ] ) always clobbers reg byte a Statement [96] (word~) gfx_mode::$54 ← (word)(byte*~) gfx_mode::$53 & (word) $3fff [ keyboard_events_size#24 gfx_mode::$54 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$54 ] ) always clobbers reg byte a -Statement [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$55 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] +Statement [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$55 ] ) always clobbers reg byte a Statement [98] (byte~) gfx_mode::$56 ← (byte)(word~) gfx_mode::$55 [ keyboard_events_size#24 gfx_mode::$56 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 ] ) always clobbers reg byte a Statement [101] (byte*) get_vic_charset::return#4 ← (byte*) get_vic_charset::return#2 [ keyboard_events_size#24 gfx_mode::$56 get_vic_charset::return#4 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 get_vic_charset::return#4 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:216 [ gfx_mode::$56 ] @@ -21044,6 +21047,9 @@ Statement [105] (byte~) gfx_mode::$61 ← (byte~) gfx_mode::$60 >> (byte) 2 [ ke Statement [110] (byte*) get_vic_screen::return#11 ← (byte*) get_vic_screen::return#5 [ keyboard_events_size#24 get_vic_screen::return#11 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 get_vic_screen::return#11 ] ) always clobbers reg byte a Statement [111] (byte*) gfx_mode::vic_colors#0 ← (byte*) get_vic_screen::return#11 [ keyboard_events_size#24 gfx_mode::vic_colors#0 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::vic_colors#0 ] ) always clobbers reg byte a Statement [114] *((byte*) gfx_mode::col#2) ← *((byte*) gfx_mode::vic_colors#2) [ keyboard_events_size#24 gfx_mode::cy#4 gfx_mode::vic_colors#2 gfx_mode::col#2 gfx_mode::cx#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::cy#4 gfx_mode::vic_colors#2 gfx_mode::col#2 gfx_mode::cx#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] Removing always clobbered register reg byte y as potential for zp ZP_BYTE:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ gfx_mode::cx#2 gfx_mode::cx#1 ] @@ -21384,7 +21390,7 @@ Statement [91] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const by Statement [94] (byte*) get_vic_screen::return#10 ← (byte*) get_vic_screen::return#5 [ keyboard_events_size#24 get_vic_screen::return#10 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 get_vic_screen::return#10 ] ) always clobbers reg byte a Statement [95] (byte*~) gfx_mode::$53 ← (byte*) get_vic_screen::return#10 [ keyboard_events_size#24 gfx_mode::$53 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$53 ] ) always clobbers reg byte a Statement [96] (word~) gfx_mode::$54 ← (word)(byte*~) gfx_mode::$53 & (word) $3fff [ keyboard_events_size#24 gfx_mode::$54 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$54 ] ) always clobbers reg byte a -Statement [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$55 ] ) always clobbers reg byte a reg byte y +Statement [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$55 ] ) always clobbers reg byte a Statement [98] (byte~) gfx_mode::$56 ← (byte)(word~) gfx_mode::$55 [ keyboard_events_size#24 gfx_mode::$56 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 ] ) always clobbers reg byte a Statement [101] (byte*) get_vic_charset::return#4 ← (byte*) get_vic_charset::return#2 [ keyboard_events_size#24 gfx_mode::$56 get_vic_charset::return#4 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 get_vic_charset::return#4 ] ) always clobbers reg byte a Statement [102] (byte*~) gfx_mode::$58 ← (byte*) get_vic_charset::return#4 [ keyboard_events_size#24 gfx_mode::$56 gfx_mode::$58 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 gfx_mode::$58 ] ) always clobbers reg byte a @@ -21599,7 +21605,7 @@ Statement [91] *((const byte*) CIA2_PORT_A#0) ← (byte) 3^(byte)(word)(const by Statement [94] (byte*) get_vic_screen::return#10 ← (byte*) get_vic_screen::return#5 [ keyboard_events_size#24 get_vic_screen::return#10 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 get_vic_screen::return#10 ] ) always clobbers reg byte a Statement [95] (byte*~) gfx_mode::$53 ← (byte*) get_vic_screen::return#10 [ keyboard_events_size#24 gfx_mode::$53 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$53 ] ) always clobbers reg byte a Statement [96] (word~) gfx_mode::$54 ← (word)(byte*~) gfx_mode::$53 & (word) $3fff [ keyboard_events_size#24 gfx_mode::$54 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$54 ] ) always clobbers reg byte a -Statement [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$55 ] ) always clobbers reg byte a reg byte y +Statement [97] (word~) gfx_mode::$55 ← (word~) gfx_mode::$54 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$55 ] ) always clobbers reg byte a Statement [98] (byte~) gfx_mode::$56 ← (byte)(word~) gfx_mode::$55 [ keyboard_events_size#24 gfx_mode::$56 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 ] ) always clobbers reg byte a Statement [101] (byte*) get_vic_charset::return#4 ← (byte*) get_vic_charset::return#2 [ keyboard_events_size#24 gfx_mode::$56 get_vic_charset::return#4 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 get_vic_charset::return#4 ] ) always clobbers reg byte a Statement [102] (byte*~) gfx_mode::$58 ← (byte*) get_vic_charset::return#4 [ keyboard_events_size#24 gfx_mode::$56 gfx_mode::$58 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$56 gfx_mode::$58 ] ) always clobbers reg byte a @@ -22070,356 +22076,356 @@ Uplift Scope [gfx_init_plane_vertical2] Uplift Scope [gfx_init_plane_blank] Uplift Scope [gfx_init_plane_full] -Uplifting [keyboard_event_scan] best 15485397 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] zp ZP_BYTE:252 [ keyboard_event_scan::event_type#0 ] zp ZP_BYTE:253 [ keyboard_event_scan::$23 ] zp ZP_BYTE:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:17 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] zp ZP_BYTE:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:241 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:243 [ keyboard_event_scan::$0 ] zp ZP_BYTE:245 [ keyboard_event_scan::$3 ] zp ZP_BYTE:247 [ keyboard_event_scan::$6 ] zp ZP_BYTE:249 [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 15485435 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] zp ZP_BYTE:252 [ keyboard_event_scan::event_type#0 ] zp ZP_BYTE:253 [ keyboard_event_scan::$23 ] zp ZP_BYTE:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp ZP_BYTE:17 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] zp ZP_BYTE:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp ZP_BYTE:241 [ keyboard_event_scan::row_scan#0 ] zp ZP_BYTE:243 [ keyboard_event_scan::$0 ] zp ZP_BYTE:245 [ keyboard_event_scan::$3 ] zp ZP_BYTE:247 [ keyboard_event_scan::$6 ] zp ZP_BYTE:249 [ keyboard_event_scan::$9 ] Limited combination testing to 10 combinations of 5308416 possible. -Uplifting [] best 15485379 combination zp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] zp ZP_WORD:52 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#73 print_char_cursor#74 print_char_cursor#38 print_char_cursor#1 ] zp ZP_WORD:54 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] zp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] zp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] reg byte x [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] +Uplifting [] best 15485417 combination zp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] zp ZP_WORD:52 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#73 print_char_cursor#74 print_char_cursor#38 print_char_cursor#1 ] zp ZP_WORD:54 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] zp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] zp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] reg byte x [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] Limited combination testing to 10 combinations of 16 possible. -Uplifting [keyboard_matrix_read] best 15395376 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] zp ZP_BYTE:258 [ keyboard_matrix_read::return#0 ] +Uplifting [keyboard_matrix_read] best 15395414 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] zp ZP_BYTE:258 [ keyboard_matrix_read::return#0 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [gfx_init_plane_charset8] best 15380376 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$7 ] zp ZP_BYTE:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp ZP_BYTE:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp ZP_WORD:85 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] zp ZP_BYTE:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] zp ZP_WORD:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp ZP_BYTE:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp ZP_BYTE:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplifting [gfx_init_plane_charset8] best 15380414 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$7 ] zp ZP_BYTE:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp ZP_BYTE:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp ZP_WORD:85 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] zp ZP_BYTE:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] zp ZP_WORD:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp ZP_BYTE:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp ZP_BYTE:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Limited combination testing to 10 combinations of 1152 possible. -Uplifting [print_str_at] best 15380376 combination zp ZP_WORD:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] zp ZP_WORD:39 [ print_str_at::at#2 print_str_at::at#0 ] -Uplifting [apply_preset] best 15368043 combination reg byte y [ apply_preset::i#2 apply_preset::i#1 ] zp ZP_WORD:43 [ apply_preset::preset#14 ] reg byte a [ apply_preset::idx#0 ] +Uplifting [print_str_at] best 15380414 combination zp ZP_WORD:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] zp ZP_WORD:39 [ print_str_at::at#2 print_str_at::at#0 ] +Uplifting [apply_preset] best 15368081 combination reg byte y [ apply_preset::i#2 apply_preset::i#1 ] zp ZP_WORD:43 [ apply_preset::preset#14 ] reg byte a [ apply_preset::idx#0 ] Limited combination testing to 10 combinations of 12 possible. -Uplifting [print_str_lines] best 15356043 combination zp ZP_WORD:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ] reg byte a [ print_str_lines::ch#0 ] -Uplifting [form_mode] best 15348843 combination reg byte a [ form_mode::$36 ] reg byte x [ form_mode::i#2 form_mode::i#1 ] zp ZP_BYTE:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] +Uplifting [print_str_lines] best 15356081 combination zp ZP_WORD:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ] reg byte a [ print_str_lines::ch#0 ] +Uplifting [form_mode] best 15348881 combination reg byte a [ form_mode::$36 ] reg byte x [ form_mode::i#2 form_mode::i#1 ] zp ZP_BYTE:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] Limited combination testing to 10 combinations of 24 possible. -Uplifting [form_render_values] best 15333843 combination reg byte x [ form_render_values::idx#2 form_render_values::idx#1 ] -Uplifting [form_field_ptr] best 15330830 combination reg byte x [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] zp ZP_BYTE:265 [ form_field_ptr::x#0 ] reg byte a [ form_field_ptr::y#0 ] zp ZP_WORD:263 [ form_field_ptr::line#0 ] +Uplifting [form_render_values] best 15333881 combination reg byte x [ form_render_values::idx#2 form_render_values::idx#1 ] +Uplifting [form_field_ptr] best 15330868 combination reg byte x [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] zp ZP_BYTE:265 [ form_field_ptr::x#0 ] reg byte a [ form_field_ptr::y#0 ] zp ZP_WORD:263 [ form_field_ptr::line#0 ] Limited combination testing to 10 combinations of 24 possible. -Uplifting [form_control] best 15323821 combination reg byte a [ form_control::return#0 ] reg byte x [ form_control::return#2 ] zp ZP_BYTE:266 [ form_control::$13 ] zp ZP_BYTE:269 [ form_control::$15 ] zp ZP_BYTE:270 [ form_control::$16 ] zp ZP_BYTE:271 [ form_control::$24 ] zp ZP_BYTE:272 [ form_control::$14 ] zp ZP_BYTE:268 [ form_control::key_event#0 ] +Uplifting [form_control] best 15323859 combination reg byte a [ form_control::return#0 ] reg byte x [ form_control::return#2 ] zp ZP_BYTE:266 [ form_control::$13 ] zp ZP_BYTE:269 [ form_control::$15 ] zp ZP_BYTE:270 [ form_control::$16 ] zp ZP_BYTE:271 [ form_control::$24 ] zp ZP_BYTE:272 [ form_control::$14 ] zp ZP_BYTE:268 [ form_control::key_event#0 ] Limited combination testing to 10 combinations of 65536 possible. -Uplifting [bitmap_plot] best 15321412 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp ZP_WORD:311 [ bitmap_plot::plotter_y#0 ] zp ZP_BYTE:315 [ bitmap_plot::$1 ] zp ZP_WORD:309 [ bitmap_plot::plotter_x#0 ] zp ZP_WORD:313 [ bitmap_plot::plotter#0 ] +Uplifting [bitmap_plot] best 15321450 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp ZP_WORD:311 [ bitmap_plot::plotter_y#0 ] zp ZP_BYTE:315 [ bitmap_plot::$1 ] zp ZP_WORD:309 [ bitmap_plot::plotter_x#0 ] zp ZP_WORD:313 [ bitmap_plot::plotter#0 ] Limited combination testing to 10 combinations of 36 possible. -Uplifting [gfx_init_screen2] best 15320212 combination reg byte a [ gfx_init_screen2::$0 ] reg byte a [ gfx_init_screen2::$3 ] zp ZP_BYTE:334 [ gfx_init_screen2::$4 ] zp ZP_BYTE:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] zp ZP_BYTE:331 [ gfx_init_screen2::col#0 ] zp ZP_WORD:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 ] zp ZP_BYTE:332 [ gfx_init_screen2::col2#0 ] zp ZP_BYTE:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] +Uplifting [gfx_init_screen2] best 15320250 combination reg byte a [ gfx_init_screen2::$0 ] reg byte a [ gfx_init_screen2::$3 ] zp ZP_BYTE:334 [ gfx_init_screen2::$4 ] zp ZP_BYTE:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] zp ZP_BYTE:331 [ gfx_init_screen2::col#0 ] zp ZP_WORD:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 ] zp ZP_BYTE:332 [ gfx_init_screen2::col2#0 ] zp ZP_BYTE:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] Limited combination testing to 10 combinations of 2304 possible. -Uplifting [gfx_init_plane_8bppchunky] best 15318982 combination reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] zp ZP_WORD:94 [ gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] reg byte a [ gfx_init_plane_8bppchunky::c#0 ] zp ZP_WORD:91 [ gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 ] zp ZP_WORD:295 [ gfx_init_plane_8bppchunky::$8 ] zp ZP_BYTE:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] +Uplifting [gfx_init_plane_8bppchunky] best 15319020 combination reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] zp ZP_WORD:94 [ gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] reg byte a [ gfx_init_plane_8bppchunky::c#0 ] zp ZP_WORD:91 [ gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 ] zp ZP_WORD:295 [ gfx_init_plane_8bppchunky::$8 ] zp ZP_BYTE:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] Limited combination testing to 10 combinations of 16 possible. -Uplifting [bitmap_line_xdyi] best 15318382 combination zp ZP_BYTE:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp ZP_BYTE:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] reg byte x [ bitmap_line_xdyi::$6 ] zp ZP_BYTE:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp ZP_BYTE:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp ZP_BYTE:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp ZP_BYTE:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplifting [bitmap_line_xdyi] best 15318420 combination zp ZP_BYTE:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp ZP_BYTE:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] reg byte x [ bitmap_line_xdyi::$6 ] zp ZP_BYTE:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp ZP_BYTE:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp ZP_BYTE:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp ZP_BYTE:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [bitmap_line_xdyd] best 15317782 combination zp ZP_BYTE:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp ZP_BYTE:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] reg byte x [ bitmap_line_xdyd::$6 ] zp ZP_BYTE:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp ZP_BYTE:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp ZP_BYTE:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp ZP_BYTE:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplifting [bitmap_line_xdyd] best 15317820 combination zp ZP_BYTE:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp ZP_BYTE:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] reg byte x [ bitmap_line_xdyd::$6 ] zp ZP_BYTE:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp ZP_BYTE:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp ZP_BYTE:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp ZP_BYTE:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [bitmap_line_ydxi] best 15316776 combination zp ZP_BYTE:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte a [ bitmap_line_ydxi::$6 ] zp ZP_BYTE:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp ZP_BYTE:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp ZP_BYTE:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp ZP_BYTE:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplifting [bitmap_line_ydxi] best 15316814 combination zp ZP_BYTE:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte a [ bitmap_line_ydxi::$6 ] zp ZP_BYTE:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp ZP_BYTE:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp ZP_BYTE:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp ZP_BYTE:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [bitmap_line_ydxd] best 15315770 combination zp ZP_BYTE:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte a [ bitmap_line_ydxd::$6 ] zp ZP_BYTE:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] zp ZP_BYTE:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] zp ZP_BYTE:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] zp ZP_BYTE:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] +Uplifting [bitmap_line_ydxd] best 15315808 combination zp ZP_BYTE:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte a [ bitmap_line_ydxd::$6 ] zp ZP_BYTE:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] zp ZP_BYTE:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] zp ZP_BYTE:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] zp ZP_BYTE:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [gfx_init_screen0] best 15314570 combination reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] zp ZP_BYTE:340 [ gfx_init_screen0::$3 ] zp ZP_BYTE:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] zp ZP_WORD:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp ZP_BYTE:338 [ gfx_init_screen0::$1 ] zp ZP_BYTE:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplifting [gfx_init_screen0] best 15314608 combination reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] zp ZP_BYTE:340 [ gfx_init_screen0::$3 ] zp ZP_BYTE:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] zp ZP_WORD:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp ZP_BYTE:338 [ gfx_init_screen0::$1 ] zp ZP_BYTE:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] Limited combination testing to 10 combinations of 768 possible. -Uplifting [gfx_init_screen3] best 15313370 combination reg byte a [ gfx_init_screen3::$0 ] reg byte a [ gfx_init_screen3::$2 ] zp ZP_BYTE:329 [ gfx_init_screen3::$3 ] zp ZP_BYTE:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] zp ZP_WORD:144 [ gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] zp ZP_BYTE:327 [ gfx_init_screen3::$1 ] zp ZP_BYTE:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] +Uplifting [gfx_init_screen3] best 15313408 combination reg byte a [ gfx_init_screen3::$0 ] reg byte a [ gfx_init_screen3::$2 ] zp ZP_BYTE:329 [ gfx_init_screen3::$3 ] zp ZP_BYTE:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] zp ZP_WORD:144 [ gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] zp ZP_BYTE:327 [ gfx_init_screen3::$1 ] zp ZP_BYTE:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] Limited combination testing to 10 combinations of 768 possible. -Uplifting [gfx_init_plane_horisontal] best 15311870 combination zp ZP_WORD:77 [ gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 ] reg byte a [ gfx_init_plane_horisontal::$7 ] reg byte x [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] zp ZP_BYTE:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] +Uplifting [gfx_init_plane_horisontal] best 15311908 combination zp ZP_WORD:77 [ gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 ] reg byte a [ gfx_init_plane_horisontal::$7 ] reg byte x [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] zp ZP_BYTE:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] Limited combination testing to 10 combinations of 16 possible. -Uplifting [gfx_init_screen1] best 15310270 combination reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] reg byte a [ gfx_init_screen1::$0 ] zp ZP_BYTE:336 [ gfx_init_screen1::$1 ] zp ZP_WORD:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] zp ZP_BYTE:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] +Uplifting [gfx_init_screen1] best 15310308 combination reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] reg byte a [ gfx_init_screen1::$0 ] zp ZP_BYTE:336 [ gfx_init_screen1::$1 ] zp ZP_WORD:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] zp ZP_BYTE:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [form_set_screen] best 15308170 combination reg byte x [ form_set_screen::y#2 form_set_screen::y#1 ] reg byte a [ form_set_screen::$0 ] zp ZP_BYTE:274 [ form_set_screen::$1 ] zp ZP_WORD:47 [ form_set_screen::line#2 form_set_screen::line#1 ] +Uplifting [form_set_screen] best 15308208 combination reg byte x [ form_set_screen::y#2 form_set_screen::y#1 ] reg byte a [ form_set_screen::$0 ] zp ZP_BYTE:274 [ form_set_screen::$1 ] zp ZP_WORD:47 [ form_set_screen::line#2 form_set_screen::line#1 ] Limited combination testing to 10 combinations of 48 possible. -Uplifting [gfx_init_plane_horisontal2] best 15307170 combination reg byte a [ gfx_init_plane_horisontal2::$7 ] reg byte a [ gfx_init_plane_horisontal2::row#0 ] zp ZP_BYTE:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] zp ZP_WORD:69 [ gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] zp ZP_BYTE:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] +Uplifting [gfx_init_plane_horisontal2] best 15307208 combination reg byte a [ gfx_init_plane_horisontal2::$7 ] reg byte a [ gfx_init_plane_horisontal2::row#0 ] zp ZP_BYTE:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] zp ZP_WORD:69 [ gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] zp ZP_BYTE:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [gfx_init_charset] best 15306270 combination zp ZP_WORD:135 [ gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 ] reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] zp ZP_WORD:133 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 ] zp ZP_BYTE:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] -Uplifting [gfx_init_plane_fill] best 15305364 combination zp ZP_WORD:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] reg byte x [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ] zp ZP_BYTE:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] zp ZP_BYTE:62 [ gfx_init_plane_fill::fill#6 ] zp ZP_DWORD:278 [ gfx_init_plane_fill::$0 ] zp ZP_WORD:282 [ gfx_init_plane_fill::$1 ] reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ] zp ZP_WORD:285 [ gfx_init_plane_fill::$4 ] zp ZP_WORD:287 [ gfx_init_plane_fill::$5 ] zp ZP_WORD:289 [ gfx_init_plane_fill::gfxb#0 ] zp ZP_DWORD:58 [ gfx_init_plane_fill::plane_addr#3 ] +Uplifting [gfx_init_charset] best 15306308 combination zp ZP_WORD:135 [ gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 ] reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] zp ZP_WORD:133 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 ] zp ZP_BYTE:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] +Uplifting [gfx_init_plane_fill] best 15305402 combination zp ZP_WORD:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] reg byte x [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ] zp ZP_BYTE:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] zp ZP_BYTE:62 [ gfx_init_plane_fill::fill#6 ] zp ZP_DWORD:278 [ gfx_init_plane_fill::$0 ] zp ZP_WORD:282 [ gfx_init_plane_fill::$1 ] reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ] zp ZP_WORD:285 [ gfx_init_plane_fill::$4 ] zp ZP_WORD:287 [ gfx_init_plane_fill::$5 ] zp ZP_WORD:289 [ gfx_init_plane_fill::gfxb#0 ] zp ZP_DWORD:58 [ gfx_init_plane_fill::plane_addr#3 ] Limited combination testing to 10 combinations of 32 possible. -Uplifting [bitmap_clear] best 15304464 combination zp ZP_WORD:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp ZP_WORD:319 [ bitmap_clear::bitmap#0 ] -Uplifting [gfx_init_screen4] best 15303564 combination zp ZP_WORD:139 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 ] reg byte x [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] zp ZP_BYTE:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] -Uplifting [gfx_init_plane_vertical] best 15302664 combination zp ZP_WORD:73 [ gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 ] reg byte x [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] zp ZP_BYTE:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] -Uplifting [print_cls] best 15302664 combination zp ZP_WORD:56 [ print_cls::sc#2 print_cls::sc#0 print_cls::sc#1 ] zp ZP_WORD:276 [ print_cls::$0 ] -Uplifting [dtvSetCpuBankSegment1] best 15302525 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBankIdx#1 dtvSetCpuBankSegment1::cpuBankIdx#11 ] -Uplifting [keyboard_event_get] best 15301616 combination reg byte a [ keyboard_event_get::return#3 ] reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] zp ZP_BYTE:267 [ keyboard_event_get::return#4 ] +Uplifting [bitmap_clear] best 15304502 combination zp ZP_WORD:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp ZP_WORD:319 [ bitmap_clear::bitmap#0 ] +Uplifting [gfx_init_screen4] best 15303602 combination zp ZP_WORD:139 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 ] reg byte x [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] zp ZP_BYTE:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] +Uplifting [gfx_init_plane_vertical] best 15302702 combination zp ZP_WORD:73 [ gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 ] reg byte x [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] zp ZP_BYTE:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] +Uplifting [print_cls] best 15302702 combination zp ZP_WORD:56 [ print_cls::sc#2 print_cls::sc#0 print_cls::sc#1 ] zp ZP_WORD:276 [ print_cls::$0 ] +Uplifting [dtvSetCpuBankSegment1] best 15302563 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBankIdx#1 dtvSetCpuBankSegment1::cpuBankIdx#11 ] +Uplifting [keyboard_event_get] best 15301654 combination reg byte a [ keyboard_event_get::return#3 ] reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] zp ZP_BYTE:267 [ keyboard_event_get::return#4 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [render_preset_name] best 15301280 combination reg byte a [ render_preset_name::idx#10 render_preset_name::idx#0 render_preset_name::idx#1 ] zp ZP_WORD:35 [ render_preset_name::name#13 ] -Uplifting [bitmap_init] best 15300980 combination zp ZP_WORD:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] zp ZP_BYTE:129 [ bitmap_init::y#2 bitmap_init::y#1 ] zp ZP_BYTE:321 [ bitmap_init::$0 ] zp ZP_BYTE:323 [ bitmap_init::$7 ] zp ZP_BYTE:324 [ bitmap_init::$8 ] zp ZP_BYTE:325 [ bitmap_init::$9 ] zp ZP_BYTE:322 [ bitmap_init::$10 ] +Uplifting [render_preset_name] best 15301318 combination reg byte a [ render_preset_name::idx#10 render_preset_name::idx#0 render_preset_name::idx#1 ] zp ZP_WORD:35 [ render_preset_name::name#13 ] +Uplifting [bitmap_init] best 15301018 combination zp ZP_WORD:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] zp ZP_BYTE:129 [ bitmap_init::y#2 bitmap_init::y#1 ] zp ZP_BYTE:321 [ bitmap_init::$0 ] zp ZP_BYTE:323 [ bitmap_init::$7 ] zp ZP_BYTE:324 [ bitmap_init::$8 ] zp ZP_BYTE:325 [ bitmap_init::$9 ] zp ZP_BYTE:322 [ bitmap_init::$10 ] Limited combination testing to 10 combinations of 34560 possible. -Uplifting [keyboard_event_pressed] best 15300968 combination reg byte a [ keyboard_event_pressed::return#0 ] reg byte a [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:246 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:248 [ keyboard_event_pressed::return#3 ] zp ZP_BYTE:254 [ keyboard_event_pressed::$0 ] zp ZP_BYTE:256 [ keyboard_event_pressed::$1 ] zp ZP_BYTE:255 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:257 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:19 [ keyboard_event_pressed::keycode#4 ] +Uplifting [keyboard_event_pressed] best 15301006 combination reg byte a [ keyboard_event_pressed::return#0 ] reg byte a [ keyboard_event_pressed::return#1 ] zp ZP_BYTE:246 [ keyboard_event_pressed::return#2 ] zp ZP_BYTE:248 [ keyboard_event_pressed::return#3 ] zp ZP_BYTE:254 [ keyboard_event_pressed::$0 ] zp ZP_BYTE:256 [ keyboard_event_pressed::$1 ] zp ZP_BYTE:255 [ keyboard_event_pressed::row_bits#0 ] zp ZP_BYTE:257 [ keyboard_event_pressed::return#10 ] zp ZP_BYTE:19 [ keyboard_event_pressed::keycode#4 ] Limited combination testing to 10 combinations of 147456 possible. -Uplifting [gfx_init_vic_bitmap] best 15300968 combination zp ZP_BYTE:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] -Uplifting [get_vic_screen] best 15300947 combination reg byte a [ get_vic_screen::idx#2 get_vic_screen::idx#0 get_vic_screen::idx#1 ] zp ZP_WORD:208 [ get_vic_screen::return#10 ] zp ZP_WORD:227 [ get_vic_screen::return#11 ] zp ZP_WORD:21 [ get_vic_screen::return#5 ] -Uplifting [get_plane] best 15300899 combination reg byte a [ get_plane::idx#10 get_plane::idx#1 get_plane::idx#0 ] zp ZP_DWORD:160 [ get_plane::return#16 ] zp ZP_DWORD:185 [ get_plane::return#17 ] zp ZP_DWORD:26 [ get_plane::return#14 ] -Uplifting [bitmap_line] best 15300853 combination zp ZP_BYTE:301 [ bitmap_line::y1#0 ] zp ZP_BYTE:300 [ bitmap_line::y0#0 ] reg byte x [ bitmap_line::x1#0 ] zp ZP_BYTE:298 [ bitmap_line::x0#0 ] zp ZP_BYTE:303 [ bitmap_line::yd#2 ] zp ZP_BYTE:304 [ bitmap_line::yd#1 ] zp ZP_BYTE:306 [ bitmap_line::yd#10 ] zp ZP_BYTE:307 [ bitmap_line::yd#11 ] zp ZP_BYTE:302 [ bitmap_line::xd#2 ] zp ZP_BYTE:305 [ bitmap_line::xd#1 ] +Uplifting [gfx_init_vic_bitmap] best 15301006 combination zp ZP_BYTE:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] +Uplifting [get_vic_screen] best 15300985 combination reg byte a [ get_vic_screen::idx#2 get_vic_screen::idx#0 get_vic_screen::idx#1 ] zp ZP_WORD:208 [ get_vic_screen::return#10 ] zp ZP_WORD:227 [ get_vic_screen::return#11 ] zp ZP_WORD:21 [ get_vic_screen::return#5 ] +Uplifting [get_plane] best 15300937 combination reg byte a [ get_plane::idx#10 get_plane::idx#1 get_plane::idx#0 ] zp ZP_DWORD:160 [ get_plane::return#16 ] zp ZP_DWORD:185 [ get_plane::return#17 ] zp ZP_DWORD:26 [ get_plane::return#14 ] +Uplifting [bitmap_line] best 15300891 combination zp ZP_BYTE:301 [ bitmap_line::y1#0 ] zp ZP_BYTE:300 [ bitmap_line::y0#0 ] reg byte x [ bitmap_line::x1#0 ] zp ZP_BYTE:298 [ bitmap_line::x0#0 ] zp ZP_BYTE:303 [ bitmap_line::yd#2 ] zp ZP_BYTE:304 [ bitmap_line::yd#1 ] zp ZP_BYTE:306 [ bitmap_line::yd#10 ] zp ZP_BYTE:307 [ bitmap_line::yd#11 ] zp ZP_BYTE:302 [ bitmap_line::xd#2 ] zp ZP_BYTE:305 [ bitmap_line::xd#1 ] Limited combination testing to 10 combinations of 186624 possible. -Uplifting [get_vic_charset] best 15300844 combination zp ZP_WORD:218 [ get_vic_charset::return#4 ] reg byte a [ get_vic_charset::idx#0 ] zp ZP_WORD:23 [ get_vic_charset::return#2 ] -Uplifting [print_ln] best 15300844 combination -Uplifting [print_set_screen] best 15300844 combination -Uplifting [keyboard_init] best 15300844 combination -Uplifting [main] best 15300844 combination -Uplifting [gfx_init] best 15300844 combination -Uplifting [gfx_init_plane_vertical2] best 15300844 combination -Uplifting [gfx_init_plane_blank] best 15300844 combination -Uplifting [gfx_init_plane_full] best 15300844 combination +Uplifting [get_vic_charset] best 15300882 combination zp ZP_WORD:218 [ get_vic_charset::return#4 ] reg byte a [ get_vic_charset::idx#0 ] zp ZP_WORD:23 [ get_vic_charset::return#2 ] +Uplifting [print_ln] best 15300882 combination +Uplifting [print_set_screen] best 15300882 combination +Uplifting [keyboard_init] best 15300882 combination +Uplifting [main] best 15300882 combination +Uplifting [gfx_init] best 15300882 combination +Uplifting [gfx_init_plane_vertical2] best 15300882 combination +Uplifting [gfx_init_plane_blank] best 15300882 combination +Uplifting [gfx_init_plane_full] best 15300882 combination Attempting to uplift remaining variables inzp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] -Uplifting [] best 15300844 combination zp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] +Uplifting [] best 15300882 combination zp ZP_BYTE:18 [ keyboard_events_size#18 keyboard_events_size#109 keyboard_events_size#99 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#108 keyboard_events_size#1 keyboard_events_size#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:252 [ keyboard_event_scan::event_type#0 ] -Uplifting [keyboard_event_scan] best 14700844 combination reg byte a [ keyboard_event_scan::event_type#0 ] +Uplifting [keyboard_event_scan] best 14700882 combination reg byte a [ keyboard_event_scan::event_type#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:253 [ keyboard_event_scan::$23 ] -Uplifting [keyboard_event_scan] best 14100844 combination reg byte a [ keyboard_event_scan::$23 ] +Uplifting [keyboard_event_scan] best 14100882 combination reg byte a [ keyboard_event_scan::$23 ] Attempting to uplift remaining variables inzp ZP_BYTE:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] -Uplifting [keyboard_event_scan] best 12600844 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Uplifting [keyboard_event_scan] best 12600882 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] -Uplifting [keyboard_event_scan] best 12600844 combination zp ZP_BYTE:17 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] +Uplifting [keyboard_event_scan] best 12600882 combination zp ZP_BYTE:17 [ keyboard_event_scan::keycode#10 keyboard_event_scan::keycode#11 keyboard_event_scan::keycode#13 keyboard_event_scan::keycode#14 keyboard_event_scan::keycode#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Uplifting [keyboard_event_scan] best 12600844 combination zp ZP_BYTE:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Uplifting [keyboard_event_scan] best 12600882 combination zp ZP_BYTE:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:241 [ keyboard_event_scan::row_scan#0 ] -Uplifting [keyboard_event_scan] best 12600844 combination zp ZP_BYTE:241 [ keyboard_event_scan::row_scan#0 ] +Uplifting [keyboard_event_scan] best 12600882 combination zp ZP_BYTE:241 [ keyboard_event_scan::row_scan#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:258 [ keyboard_matrix_read::return#0 ] -Uplifting [keyboard_matrix_read] best 12570841 combination reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [keyboard_matrix_read] best 12570879 combination reg byte a [ keyboard_matrix_read::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:10 [ gfx_mode::cx#2 gfx_mode::cx#1 ] -Uplifting [gfx_mode] best 12561841 combination reg byte x [ gfx_mode::cx#2 gfx_mode::cx#1 ] +Uplifting [gfx_mode] best 12561879 combination reg byte x [ gfx_mode::cx#2 gfx_mode::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] -Uplifting [gfx_init_plane_charset8] best 12552841 combination reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +Uplifting [gfx_init_plane_charset8] best 12552879 combination reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] -Uplifting [gfx_init_plane_charset8] best 12552841 combination zp ZP_BYTE:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Uplifting [gfx_init_plane_charset8] best 12552879 combination zp ZP_BYTE:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] -Uplifting [gfx_init_plane_charset8] best 12552841 combination zp ZP_BYTE:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Uplifting [gfx_init_plane_charset8] best 12552879 combination zp ZP_BYTE:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] -Uplifting [bitmap_line_xdyi] best 12552841 combination zp ZP_BYTE:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] +Uplifting [bitmap_line_xdyi] best 12552879 combination zp ZP_BYTE:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] -Uplifting [bitmap_line_ydxi] best 12552841 combination zp ZP_BYTE:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] +Uplifting [bitmap_line_ydxi] best 12552879 combination zp ZP_BYTE:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] -Uplifting [bitmap_line_xdyd] best 12552841 combination zp ZP_BYTE:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] +Uplifting [bitmap_line_xdyd] best 12552879 combination zp ZP_BYTE:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] -Uplifting [bitmap_line_ydxd] best 12552841 combination zp ZP_BYTE:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] +Uplifting [bitmap_line_ydxd] best 12552879 combination zp ZP_BYTE:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:11 [ gfx_mode::j#2 gfx_mode::j#1 ] -Uplifting [gfx_mode] best 12551641 combination reg byte x [ gfx_mode::j#2 gfx_mode::j#1 ] +Uplifting [gfx_mode] best 12551679 combination reg byte x [ gfx_mode::j#2 gfx_mode::j#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ gfx_mode::i#2 gfx_mode::i#1 ] -Uplifting [gfx_mode] best 12550441 combination reg byte x [ gfx_mode::i#2 gfx_mode::i#1 ] +Uplifting [gfx_mode] best 12550479 combination reg byte x [ gfx_mode::i#2 gfx_mode::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] -Uplifting [] best 12550441 combination zp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +Uplifting [] best 12550479 combination zp ZP_BYTE:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] -Uplifting [bitmap_line_xdyi] best 12550441 combination zp ZP_BYTE:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] +Uplifting [bitmap_line_xdyi] best 12550479 combination zp ZP_BYTE:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] -Uplifting [bitmap_line_xdyd] best 12550441 combination zp ZP_BYTE:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] +Uplifting [bitmap_line_xdyd] best 12550479 combination zp ZP_BYTE:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] -Uplifting [form_mode] best 12550441 combination zp ZP_BYTE:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] +Uplifting [form_mode] best 12550479 combination zp ZP_BYTE:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:238 [ gfx_mode::keyboard_event#0 ] -Uplifting [gfx_mode] best 12549841 combination reg byte a [ gfx_mode::keyboard_event#0 ] +Uplifting [gfx_mode] best 12549879 combination reg byte a [ gfx_mode::keyboard_event#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:274 [ form_set_screen::$1 ] -Uplifting [form_set_screen] best 12549241 combination reg byte a [ form_set_screen::$1 ] +Uplifting [form_set_screen] best 12549279 combination reg byte a [ form_set_screen::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:329 [ gfx_init_screen3::$3 ] -Uplifting [gfx_init_screen3] best 12548641 combination reg byte a [ gfx_init_screen3::$3 ] +Uplifting [gfx_init_screen3] best 12548679 combination reg byte a [ gfx_init_screen3::$3 ] Attempting to uplift remaining variables inzp ZP_BYTE:334 [ gfx_init_screen2::$4 ] -Uplifting [gfx_init_screen2] best 12548041 combination reg byte a [ gfx_init_screen2::$4 ] +Uplifting [gfx_init_screen2] best 12548079 combination reg byte a [ gfx_init_screen2::$4 ] Attempting to uplift remaining variables inzp ZP_BYTE:336 [ gfx_init_screen1::$1 ] -Uplifting [gfx_init_screen1] best 12547441 combination reg byte a [ gfx_init_screen1::$1 ] +Uplifting [gfx_init_screen1] best 12547479 combination reg byte a [ gfx_init_screen1::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:340 [ gfx_init_screen0::$3 ] -Uplifting [gfx_init_screen0] best 12546841 combination reg byte a [ gfx_init_screen0::$3 ] +Uplifting [gfx_init_screen0] best 12546879 combination reg byte a [ gfx_init_screen0::$3 ] Attempting to uplift remaining variables inzp ZP_BYTE:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -Uplifting [gfx_init_screen3] best 12545841 combination reg byte x [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] +Uplifting [gfx_init_screen3] best 12545879 combination reg byte x [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] -Uplifting [gfx_init_screen0] best 12544841 combination reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +Uplifting [gfx_init_screen0] best 12544879 combination reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] -Uplifting [gfx_init_plane_horisontal2] best 12543941 combination reg byte x [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] +Uplifting [gfx_init_plane_horisontal2] best 12543979 combination reg byte x [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] -Uplifting [gfx_init_screen2] best 12542941 combination reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] +Uplifting [gfx_init_screen2] best 12542979 combination reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] -Uplifting [gfx_mode] best 12542941 combination zp ZP_BYTE:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] +Uplifting [gfx_mode] best 12542979 combination zp ZP_BYTE:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] -Uplifting [gfx_init_plane_charset8] best 12542941 combination zp ZP_BYTE:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Uplifting [gfx_init_plane_charset8] best 12542979 combination zp ZP_BYTE:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:331 [ gfx_init_screen2::col#0 ] -Uplifting [gfx_init_screen2] best 12542841 combination reg byte y [ gfx_init_screen2::col#0 ] +Uplifting [gfx_init_screen2] best 12542879 combination reg byte y [ gfx_init_screen2::col#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] -Uplifting [bitmap_line_xdyi] best 12542841 combination zp ZP_BYTE:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] +Uplifting [bitmap_line_xdyi] best 12542879 combination zp ZP_BYTE:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] -Uplifting [bitmap_line_ydxi] best 12542841 combination zp ZP_BYTE:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] +Uplifting [bitmap_line_ydxi] best 12542879 combination zp ZP_BYTE:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] -Uplifting [bitmap_line_xdyd] best 12542841 combination zp ZP_BYTE:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] +Uplifting [bitmap_line_xdyd] best 12542879 combination zp ZP_BYTE:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] -Uplifting [bitmap_line_ydxd] best 12542841 combination zp ZP_BYTE:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] +Uplifting [bitmap_line_ydxd] best 12542879 combination zp ZP_BYTE:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] -Uplifting [] best 12542841 combination zp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +Uplifting [] best 12542879 combination zp ZP_BYTE:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:327 [ gfx_init_screen3::$1 ] -Uplifting [gfx_init_screen3] best 12542841 combination zp ZP_BYTE:327 [ gfx_init_screen3::$1 ] +Uplifting [gfx_init_screen3] best 12542879 combination zp ZP_BYTE:327 [ gfx_init_screen3::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:332 [ gfx_init_screen2::col2#0 ] -Uplifting [gfx_init_screen2] best 12542841 combination zp ZP_BYTE:332 [ gfx_init_screen2::col2#0 ] +Uplifting [gfx_init_screen2] best 12542879 combination zp ZP_BYTE:332 [ gfx_init_screen2::col2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:338 [ gfx_init_screen0::$1 ] -Uplifting [gfx_init_screen0] best 12542841 combination zp ZP_BYTE:338 [ gfx_init_screen0::$1 ] +Uplifting [gfx_init_screen0] best 12542879 combination zp ZP_BYTE:338 [ gfx_init_screen0::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] -Uplifting [gfx_mode] best 12542822 combination reg byte x [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] +Uplifting [gfx_mode] best 12542860 combination reg byte x [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:265 [ form_field_ptr::x#0 ] -Uplifting [form_field_ptr] best 12542822 combination zp ZP_BYTE:265 [ form_field_ptr::x#0 ] +Uplifting [form_field_ptr] best 12542860 combination zp ZP_BYTE:265 [ form_field_ptr::x#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] -Uplifting [gfx_init_plane_horisontal2] best 12542822 combination zp ZP_BYTE:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] +Uplifting [gfx_init_plane_horisontal2] best 12542860 combination zp ZP_BYTE:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] -Uplifting [gfx_init_screen1] best 12542822 combination zp ZP_BYTE:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] +Uplifting [gfx_init_screen1] best 12542860 combination zp ZP_BYTE:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] -Uplifting [gfx_init_screen3] best 12542822 combination zp ZP_BYTE:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] +Uplifting [gfx_init_screen3] best 12542860 combination zp ZP_BYTE:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] -Uplifting [gfx_init_screen0] best 12542822 combination zp ZP_BYTE:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplifting [gfx_init_screen0] best 12542860 combination zp ZP_BYTE:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] -Uplifting [gfx_init_plane_horisontal] best 12542822 combination zp ZP_BYTE:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] +Uplifting [gfx_init_plane_horisontal] best 12542860 combination zp ZP_BYTE:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] -Uplifting [gfx_init_screen2] best 12542822 combination zp ZP_BYTE:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] +Uplifting [gfx_init_screen2] best 12542860 combination zp ZP_BYTE:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] -Uplifting [gfx_init_vic_bitmap] best 12542822 combination zp ZP_BYTE:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] +Uplifting [gfx_init_vic_bitmap] best 12542860 combination zp ZP_BYTE:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] -Uplifting [gfx_init_plane_8bppchunky] best 12542822 combination zp ZP_BYTE:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] +Uplifting [gfx_init_plane_8bppchunky] best 12542860 combination zp ZP_BYTE:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:129 [ bitmap_init::y#2 bitmap_init::y#1 ] -Uplifting [bitmap_init] best 12542642 combination reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] +Uplifting [bitmap_init] best 12542680 combination reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:321 [ bitmap_init::$0 ] -Uplifting [bitmap_init] best 12542602 combination reg byte a [ bitmap_init::$0 ] +Uplifting [bitmap_init] best 12542640 combination reg byte a [ bitmap_init::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:323 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 12542542 combination reg byte a [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 12542580 combination reg byte a [ bitmap_init::$7 ] Attempting to uplift remaining variables inzp ZP_BYTE:324 [ bitmap_init::$8 ] -Uplifting [bitmap_init] best 12542482 combination reg byte a [ bitmap_init::$8 ] +Uplifting [bitmap_init] best 12542520 combination reg byte a [ bitmap_init::$8 ] Attempting to uplift remaining variables inzp ZP_BYTE:325 [ bitmap_init::$9 ] -Uplifting [bitmap_init] best 12542422 combination reg byte a [ bitmap_init::$9 ] +Uplifting [bitmap_init] best 12542460 combination reg byte a [ bitmap_init::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] -Uplifting [gfx_init_plane_fill] best 12542422 combination zp ZP_BYTE:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] +Uplifting [gfx_init_plane_fill] best 12542460 combination zp ZP_BYTE:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] -Uplifting [gfx_init_plane_vertical] best 12542422 combination zp ZP_BYTE:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] +Uplifting [gfx_init_plane_vertical] best 12542460 combination zp ZP_BYTE:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Uplifting [bitmap_clear] best 12542422 combination zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] +Uplifting [bitmap_clear] best 12542460 combination zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] -Uplifting [gfx_init_screen4] best 12542422 combination zp ZP_BYTE:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] +Uplifting [gfx_init_screen4] best 12542460 combination zp ZP_BYTE:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] -Uplifting [gfx_init_charset] best 12542422 combination zp ZP_BYTE:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] +Uplifting [gfx_init_charset] best 12542460 combination zp ZP_BYTE:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] -Uplifting [bitmap_line_xdyi] best 12542422 combination zp ZP_BYTE:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] +Uplifting [bitmap_line_xdyi] best 12542460 combination zp ZP_BYTE:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] -Uplifting [bitmap_line_ydxi] best 12542422 combination zp ZP_BYTE:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] +Uplifting [bitmap_line_ydxi] best 12542460 combination zp ZP_BYTE:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] -Uplifting [bitmap_line_xdyd] best 12542422 combination zp ZP_BYTE:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] +Uplifting [bitmap_line_xdyd] best 12542460 combination zp ZP_BYTE:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] -Uplifting [bitmap_line_ydxd] best 12542422 combination zp ZP_BYTE:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] +Uplifting [bitmap_line_ydxd] best 12542460 combination zp ZP_BYTE:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] -Uplifting [gfx_init_plane_charset8] best 12542422 combination zp ZP_BYTE:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplifting [gfx_init_plane_charset8] best 12542460 combination zp ZP_BYTE:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] -Uplifting [bitmap_line_xdyi] best 12542422 combination zp ZP_BYTE:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] +Uplifting [bitmap_line_xdyi] best 12542460 combination zp ZP_BYTE:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] -Uplifting [bitmap_line_ydxi] best 12542422 combination zp ZP_BYTE:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] +Uplifting [bitmap_line_ydxi] best 12542460 combination zp ZP_BYTE:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] -Uplifting [bitmap_line_xdyd] best 12542422 combination zp ZP_BYTE:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] +Uplifting [bitmap_line_xdyd] best 12542460 combination zp ZP_BYTE:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] -Uplifting [bitmap_line_ydxd] best 12542422 combination zp ZP_BYTE:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] +Uplifting [bitmap_line_ydxd] best 12542460 combination zp ZP_BYTE:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] -Uplifting [gfx_mode] best 12542411 combination reg byte x [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] +Uplifting [gfx_mode] best 12542449 combination reg byte x [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Uplifting [bitmap_line_xdyi] best 12542411 combination zp ZP_BYTE:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplifting [bitmap_line_xdyi] best 12542449 combination zp ZP_BYTE:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] -Uplifting [bitmap_line_ydxi] best 12542411 combination zp ZP_BYTE:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplifting [bitmap_line_ydxi] best 12542449 combination zp ZP_BYTE:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] -Uplifting [bitmap_line_xdyd] best 12542411 combination zp ZP_BYTE:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplifting [bitmap_line_xdyd] best 12542449 combination zp ZP_BYTE:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] -Uplifting [bitmap_line_ydxd] best 12542411 combination zp ZP_BYTE:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] +Uplifting [bitmap_line_ydxd] best 12542449 combination zp ZP_BYTE:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:62 [ gfx_init_plane_fill::fill#6 ] -Uplifting [gfx_init_plane_fill] best 12542411 combination zp ZP_BYTE:62 [ gfx_init_plane_fill::fill#6 ] +Uplifting [gfx_init_plane_fill] best 12542449 combination zp ZP_BYTE:62 [ gfx_init_plane_fill::fill#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:322 [ bitmap_init::$10 ] -Uplifting [bitmap_init] best 12542411 combination zp ZP_BYTE:322 [ bitmap_init::$10 ] +Uplifting [bitmap_init] best 12542449 combination zp ZP_BYTE:322 [ bitmap_init::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:158 [ gfx_mode::$20 ] -Uplifting [gfx_mode] best 12542405 combination reg byte a [ gfx_mode::$20 ] +Uplifting [gfx_mode] best 12542443 combination reg byte a [ gfx_mode::$20 ] Attempting to uplift remaining variables inzp ZP_BYTE:174 [ gfx_mode::$25 ] -Uplifting [gfx_mode] best 12542399 combination reg byte a [ gfx_mode::$25 ] +Uplifting [gfx_mode] best 12542437 combination reg byte a [ gfx_mode::$25 ] Attempting to uplift remaining variables inzp ZP_BYTE:175 [ gfx_mode::$27 ] -Uplifting [gfx_mode] best 12542393 combination reg byte a [ gfx_mode::$27 ] +Uplifting [gfx_mode] best 12542431 combination reg byte a [ gfx_mode::$27 ] Attempting to uplift remaining variables inzp ZP_BYTE:178 [ gfx_mode::$29 ] -Uplifting [gfx_mode] best 12542387 combination reg byte a [ gfx_mode::$29 ] +Uplifting [gfx_mode] best 12542425 combination reg byte a [ gfx_mode::$29 ] Attempting to uplift remaining variables inzp ZP_BYTE:179 [ gfx_mode::$30 ] -Uplifting [gfx_mode] best 12542381 combination reg byte a [ gfx_mode::$30 ] +Uplifting [gfx_mode] best 12542419 combination reg byte a [ gfx_mode::$30 ] Attempting to uplift remaining variables inzp ZP_BYTE:180 [ gfx_mode::$31 ] -Uplifting [gfx_mode] best 12542375 combination reg byte a [ gfx_mode::$31 ] +Uplifting [gfx_mode] best 12542413 combination reg byte a [ gfx_mode::$31 ] Attempting to uplift remaining variables inzp ZP_BYTE:181 [ gfx_mode::$32 ] -Uplifting [gfx_mode] best 12542369 combination reg byte a [ gfx_mode::$32 ] +Uplifting [gfx_mode] best 12542407 combination reg byte a [ gfx_mode::$32 ] Attempting to uplift remaining variables inzp ZP_BYTE:182 [ gfx_mode::$33 ] -Uplifting [gfx_mode] best 12542363 combination reg byte a [ gfx_mode::$33 ] +Uplifting [gfx_mode] best 12542401 combination reg byte a [ gfx_mode::$33 ] Attempting to uplift remaining variables inzp ZP_BYTE:183 [ gfx_mode::$34 ] -Uplifting [gfx_mode] best 12542357 combination reg byte a [ gfx_mode::$34 ] +Uplifting [gfx_mode] best 12542395 combination reg byte a [ gfx_mode::$34 ] Attempting to uplift remaining variables inzp ZP_BYTE:199 [ gfx_mode::$39 ] -Uplifting [gfx_mode] best 12542351 combination reg byte a [ gfx_mode::$39 ] +Uplifting [gfx_mode] best 12542389 combination reg byte a [ gfx_mode::$39 ] Attempting to uplift remaining variables inzp ZP_BYTE:200 [ gfx_mode::$41 ] -Uplifting [gfx_mode] best 12542345 combination reg byte a [ gfx_mode::$41 ] +Uplifting [gfx_mode] best 12542383 combination reg byte a [ gfx_mode::$41 ] Attempting to uplift remaining variables inzp ZP_BYTE:203 [ gfx_mode::$43 ] -Uplifting [gfx_mode] best 12542339 combination reg byte a [ gfx_mode::$43 ] +Uplifting [gfx_mode] best 12542377 combination reg byte a [ gfx_mode::$43 ] Attempting to uplift remaining variables inzp ZP_BYTE:204 [ gfx_mode::$44 ] -Uplifting [gfx_mode] best 12542333 combination reg byte a [ gfx_mode::$44 ] +Uplifting [gfx_mode] best 12542371 combination reg byte a [ gfx_mode::$44 ] Attempting to uplift remaining variables inzp ZP_BYTE:205 [ gfx_mode::$45 ] -Uplifting [gfx_mode] best 12542327 combination reg byte a [ gfx_mode::$45 ] +Uplifting [gfx_mode] best 12542365 combination reg byte a [ gfx_mode::$45 ] Attempting to uplift remaining variables inzp ZP_BYTE:206 [ gfx_mode::$46 ] -Uplifting [gfx_mode] best 12542321 combination reg byte a [ gfx_mode::$46 ] +Uplifting [gfx_mode] best 12542359 combination reg byte a [ gfx_mode::$46 ] Attempting to uplift remaining variables inzp ZP_BYTE:207 [ gfx_mode::$47 ] -Uplifting [gfx_mode] best 12542315 combination reg byte a [ gfx_mode::$47 ] +Uplifting [gfx_mode] best 12542353 combination reg byte a [ gfx_mode::$47 ] Attempting to uplift remaining variables inzp ZP_BYTE:224 [ gfx_mode::$60 ] -Uplifting [gfx_mode] best 12542309 combination reg byte a [ gfx_mode::$60 ] +Uplifting [gfx_mode] best 12542347 combination reg byte a [ gfx_mode::$60 ] Attempting to uplift remaining variables inzp ZP_BYTE:225 [ gfx_mode::$61 ] -Uplifting [gfx_mode] best 12542303 combination reg byte a [ gfx_mode::$61 ] +Uplifting [gfx_mode] best 12542341 combination reg byte a [ gfx_mode::$61 ] Attempting to uplift remaining variables inzp ZP_BYTE:226 [ gfx_mode::$62 ] -Uplifting [gfx_mode] best 12542297 combination reg byte a [ gfx_mode::$62 ] +Uplifting [gfx_mode] best 12542335 combination reg byte a [ gfx_mode::$62 ] Attempting to uplift remaining variables inzp ZP_BYTE:229 [ gfx_mode::$64 ] -Uplifting [gfx_mode] best 12542291 combination reg byte a [ gfx_mode::$64 ] +Uplifting [gfx_mode] best 12542329 combination reg byte a [ gfx_mode::$64 ] Attempting to uplift remaining variables inzp ZP_BYTE:230 [ gfx_mode::$65 ] -Uplifting [gfx_mode] best 12542285 combination reg byte a [ gfx_mode::$65 ] +Uplifting [gfx_mode] best 12542323 combination reg byte a [ gfx_mode::$65 ] Attempting to uplift remaining variables inzp ZP_BYTE:231 [ gfx_mode::$66 ] -Uplifting [gfx_mode] best 12542279 combination reg byte a [ gfx_mode::$66 ] +Uplifting [gfx_mode] best 12542317 combination reg byte a [ gfx_mode::$66 ] Attempting to uplift remaining variables inzp ZP_BYTE:232 [ gfx_mode::$67 ] -Uplifting [gfx_mode] best 12542273 combination reg byte a [ gfx_mode::$67 ] +Uplifting [gfx_mode] best 12542311 combination reg byte a [ gfx_mode::$67 ] Attempting to uplift remaining variables inzp ZP_BYTE:233 [ gfx_mode::$68 ] -Uplifting [gfx_mode] best 12542267 combination reg byte a [ gfx_mode::$68 ] +Uplifting [gfx_mode] best 12542305 combination reg byte a [ gfx_mode::$68 ] Attempting to uplift remaining variables inzp ZP_BYTE:234 [ gfx_mode::$69 ] -Uplifting [gfx_mode] best 12542261 combination reg byte a [ gfx_mode::$69 ] +Uplifting [gfx_mode] best 12542299 combination reg byte a [ gfx_mode::$69 ] Attempting to uplift remaining variables inzp ZP_BYTE:235 [ gfx_mode::$70 ] -Uplifting [gfx_mode] best 12542255 combination reg byte a [ gfx_mode::$70 ] +Uplifting [gfx_mode] best 12542293 combination reg byte a [ gfx_mode::$70 ] Attempting to uplift remaining variables inzp ZP_BYTE:236 [ gfx_mode::$71 ] -Uplifting [gfx_mode] best 12542249 combination reg byte a [ gfx_mode::$71 ] +Uplifting [gfx_mode] best 12542287 combination reg byte a [ gfx_mode::$71 ] Attempting to uplift remaining variables inzp ZP_BYTE:243 [ keyboard_event_scan::$0 ] -Uplifting [keyboard_event_scan] best 12542243 combination reg byte a [ keyboard_event_scan::$0 ] +Uplifting [keyboard_event_scan] best 12542281 combination reg byte a [ keyboard_event_scan::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:245 [ keyboard_event_scan::$3 ] -Uplifting [keyboard_event_scan] best 12542237 combination reg byte a [ keyboard_event_scan::$3 ] +Uplifting [keyboard_event_scan] best 12542275 combination reg byte a [ keyboard_event_scan::$3 ] Attempting to uplift remaining variables inzp ZP_BYTE:246 [ keyboard_event_pressed::return#2 ] -Uplifting [keyboard_event_pressed] best 12542231 combination reg byte a [ keyboard_event_pressed::return#2 ] +Uplifting [keyboard_event_pressed] best 12542269 combination reg byte a [ keyboard_event_pressed::return#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:247 [ keyboard_event_scan::$6 ] -Uplifting [keyboard_event_scan] best 12542225 combination reg byte a [ keyboard_event_scan::$6 ] +Uplifting [keyboard_event_scan] best 12542263 combination reg byte a [ keyboard_event_scan::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:248 [ keyboard_event_pressed::return#3 ] -Uplifting [keyboard_event_pressed] best 12542219 combination reg byte a [ keyboard_event_pressed::return#3 ] +Uplifting [keyboard_event_pressed] best 12542257 combination reg byte a [ keyboard_event_pressed::return#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:249 [ keyboard_event_scan::$9 ] -Uplifting [keyboard_event_scan] best 12542213 combination reg byte a [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 12542251 combination reg byte a [ keyboard_event_scan::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:254 [ keyboard_event_pressed::$0 ] -Uplifting [keyboard_event_pressed] best 12542209 combination reg byte a [ keyboard_event_pressed::$0 ] +Uplifting [keyboard_event_pressed] best 12542247 combination reg byte a [ keyboard_event_pressed::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:256 [ keyboard_event_pressed::$1 ] -Uplifting [keyboard_event_pressed] best 12542205 combination reg byte a [ keyboard_event_pressed::$1 ] +Uplifting [keyboard_event_pressed] best 12542243 combination reg byte a [ keyboard_event_pressed::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:266 [ form_control::$13 ] -Uplifting [form_control] best 12542199 combination reg byte a [ form_control::$13 ] +Uplifting [form_control] best 12542237 combination reg byte a [ form_control::$13 ] Attempting to uplift remaining variables inzp ZP_BYTE:267 [ keyboard_event_get::return#4 ] -Uplifting [keyboard_event_get] best 12542193 combination reg byte a [ keyboard_event_get::return#4 ] +Uplifting [keyboard_event_get] best 12542231 combination reg byte a [ keyboard_event_get::return#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:269 [ form_control::$15 ] -Uplifting [form_control] best 12542187 combination reg byte a [ form_control::$15 ] +Uplifting [form_control] best 12542225 combination reg byte a [ form_control::$15 ] Attempting to uplift remaining variables inzp ZP_BYTE:270 [ form_control::$16 ] -Uplifting [form_control] best 12542183 combination reg byte a [ form_control::$16 ] +Uplifting [form_control] best 12542221 combination reg byte a [ form_control::$16 ] Attempting to uplift remaining variables inzp ZP_BYTE:271 [ form_control::$24 ] -Uplifting [form_control] best 12542179 combination reg byte a [ form_control::$24 ] +Uplifting [form_control] best 12542217 combination reg byte a [ form_control::$24 ] Attempting to uplift remaining variables inzp ZP_BYTE:272 [ form_control::$14 ] -Uplifting [form_control] best 12542173 combination reg byte a [ form_control::$14 ] +Uplifting [form_control] best 12542211 combination reg byte a [ form_control::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:315 [ bitmap_plot::$1 ] -Uplifting [bitmap_plot] best 12542167 combination reg byte a [ bitmap_plot::$1 ] +Uplifting [bitmap_plot] best 12542205 combination reg byte a [ bitmap_plot::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:268 [ form_control::key_event#0 ] -Uplifting [form_control] best 12542155 combination reg byte a [ form_control::key_event#0 ] +Uplifting [form_control] best 12542193 combination reg byte a [ form_control::key_event#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ gfx_mode::vic_control2#2 ] -Uplifting [gfx_mode] best 12542146 combination reg byte a [ gfx_mode::vic_control2#2 ] +Uplifting [gfx_mode] best 12542184 combination reg byte a [ gfx_mode::vic_control2#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:255 [ keyboard_event_pressed::row_bits#0 ] -Uplifting [keyboard_event_pressed] best 12542146 combination zp ZP_BYTE:255 [ keyboard_event_pressed::row_bits#0 ] +Uplifting [keyboard_event_pressed] best 12542184 combination zp ZP_BYTE:255 [ keyboard_event_pressed::row_bits#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:301 [ bitmap_line::y1#0 ] -Uplifting [bitmap_line] best 12542146 combination zp ZP_BYTE:301 [ bitmap_line::y1#0 ] +Uplifting [bitmap_line] best 12542184 combination zp ZP_BYTE:301 [ bitmap_line::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:300 [ bitmap_line::y0#0 ] -Uplifting [bitmap_line] best 12542146 combination zp ZP_BYTE:300 [ bitmap_line::y0#0 ] +Uplifting [bitmap_line] best 12542184 combination zp ZP_BYTE:300 [ bitmap_line::y0#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:257 [ keyboard_event_pressed::return#10 ] -Uplifting [keyboard_event_pressed] best 12542131 combination reg byte a [ keyboard_event_pressed::return#10 ] +Uplifting [keyboard_event_pressed] best 12542169 combination reg byte a [ keyboard_event_pressed::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ keyboard_event_pressed::keycode#4 ] -Uplifting [keyboard_event_pressed] best 12542131 combination zp ZP_BYTE:19 [ keyboard_event_pressed::keycode#4 ] +Uplifting [keyboard_event_pressed] best 12542169 combination zp ZP_BYTE:19 [ keyboard_event_pressed::keycode#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:298 [ bitmap_line::x0#0 ] -Uplifting [bitmap_line] best 12542131 combination zp ZP_BYTE:298 [ bitmap_line::x0#0 ] +Uplifting [bitmap_line] best 12542169 combination zp ZP_BYTE:298 [ bitmap_line::x0#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:303 [ bitmap_line::yd#2 ] -Uplifting [bitmap_line] best 12542121 combination reg byte y [ bitmap_line::yd#2 ] +Uplifting [bitmap_line] best 12542159 combination reg byte y [ bitmap_line::yd#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:304 [ bitmap_line::yd#1 ] -Uplifting [bitmap_line] best 12542111 combination reg byte y [ bitmap_line::yd#1 ] +Uplifting [bitmap_line] best 12542149 combination reg byte y [ bitmap_line::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:306 [ bitmap_line::yd#10 ] -Uplifting [bitmap_line] best 12542101 combination reg byte y [ bitmap_line::yd#10 ] +Uplifting [bitmap_line] best 12542139 combination reg byte y [ bitmap_line::yd#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:307 [ bitmap_line::yd#11 ] -Uplifting [bitmap_line] best 12542091 combination reg byte y [ bitmap_line::yd#11 ] +Uplifting [bitmap_line] best 12542129 combination reg byte y [ bitmap_line::yd#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:159 [ gfx_mode::plane_a_offs#0 ] -Uplifting [gfx_mode] best 12542089 combination reg byte x [ gfx_mode::plane_a_offs#0 ] +Uplifting [gfx_mode] best 12542127 combination reg byte x [ gfx_mode::plane_a_offs#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:184 [ gfx_mode::plane_b_offs#0 ] -Uplifting [gfx_mode] best 12542087 combination reg byte x [ gfx_mode::plane_b_offs#0 ] +Uplifting [gfx_mode] best 12542125 combination reg byte x [ gfx_mode::plane_b_offs#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:302 [ bitmap_line::xd#2 ] -Uplifting [bitmap_line] best 12542087 combination zp ZP_BYTE:302 [ bitmap_line::xd#2 ] +Uplifting [bitmap_line] best 12542125 combination zp ZP_BYTE:302 [ bitmap_line::xd#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:305 [ bitmap_line::xd#1 ] -Uplifting [bitmap_line] best 12542087 combination zp ZP_BYTE:305 [ bitmap_line::xd#1 ] +Uplifting [bitmap_line] best 12542125 combination zp ZP_BYTE:305 [ bitmap_line::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:216 [ gfx_mode::$56 ] -Uplifting [gfx_mode] best 12542087 combination zp ZP_BYTE:216 [ gfx_mode::$56 ] +Uplifting [gfx_mode] best 12542125 combination zp ZP_BYTE:216 [ gfx_mode::$56 ] Coalescing zero page register with common assignment [ zp ZP_WORD:6 [ gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 ] ] with [ zp ZP_WORD:227 [ get_vic_screen::return#11 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:21 [ get_vic_screen::return#5 ] ] with [ zp ZP_WORD:208 [ get_vic_screen::return#10 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ get_vic_charset::return#2 ] ] with [ zp ZP_WORD:218 [ get_vic_charset::return#4 ] ] - score: 1 diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.log b/src/test/ref/examples/scrolllogo/scrolllogo.log index ce7dbdbfe..dcf3b3da2 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.log +++ b/src/test/ref/examples/scrolllogo/scrolllogo.log @@ -5590,15 +5590,17 @@ sin16s: { sta x5+1 //SEG328 [170] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 + lsr sta x5_128+1 lda x5 + ror sta x5_128 - ldy #4 - !: lsr x5_128+1 ror x5_128 - dey - bne !- + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 //SEG329 [171] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc @@ -6083,7 +6085,7 @@ Statement [165] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUppe Statement [166] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a Statement [168] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [169] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [170] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [170] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [171] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [173] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [176] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -6190,7 +6192,7 @@ Statement [165] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUppe Statement [166] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a Statement [168] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [169] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [170] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [170] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [171] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [173] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [176] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:21::sin16s:103 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -6317,57 +6319,57 @@ Uplift Scope [main] 38.5: zp ZP_BYTE:2 [ main::ch#2 main::ch#1 ] Uplift Scope [] 26.12: zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] 0.8: zp ZP_WORD:177 [ rem16u#1 ] Uplift Scope [div32u16u] 4: zp ZP_DWORD:82 [ div32u16u::return#2 ] 4: zp ZP_WORD:169 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:171 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:165 [ div32u16u::quotient_hi#0 ] -Uplifting [mul16u] best 74974 combination zp ZP_DWORD:25 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:29 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:23 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:21 [ mul16u::b#1 ] zp ZP_DWORD:104 [ mul16u::return#2 ] zp ZP_DWORD:149 [ mul16u::return#3 ] -Uplifting [divr16u] best 74764 combination zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:47 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:163 [ divr16u::return#2 ] zp ZP_WORD:167 [ divr16u::return#3 ] -Uplifting [sin16s] best 74764 combination zp ZP_DWORD:34 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:90 [ sin16s::return#0 ] zp ZP_WORD:38 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:117 [ sin16s::$4 ] zp ZP_WORD:125 [ sin16s::x2#0 ] zp ZP_WORD:133 [ sin16s::x3_6#0 ] zp ZP_WORD:139 [ sin16s::x4#0 ] zp ZP_WORD:143 [ sin16s::x5#0 ] zp ZP_WORD:145 [ sin16s::x5_128#0 ] zp ZP_WORD:129 [ sin16s::x3#0 ] zp ZP_WORD:147 [ sin16s::usinx#1 ] zp ZP_WORD:121 [ sin16s::x1#0 ] zp ZP_WORD:135 [ sin16s::usinx#0 ] zp ZP_BYTE:33 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 74748 combination zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:42 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:123 [ mulu16_sel::return#0 ] zp ZP_WORD:127 [ mulu16_sel::return#1 ] zp ZP_WORD:131 [ mulu16_sel::return#2 ] zp ZP_WORD:137 [ mulu16_sel::return#10 ] zp ZP_WORD:141 [ mulu16_sel::return#11 ] zp ZP_DWORD:153 [ mulu16_sel::$0 ] zp ZP_DWORD:157 [ mulu16_sel::$1 ] zp ZP_WORD:161 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 74748 combination zp ZP_DWORD:98 [ sin16s_gen2::$5 ] zp ZP_WORD:15 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:102 [ sin16s_gen2::$6 ] zp ZP_DWORD:9 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:13 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:86 [ sin16s_gen2::step#0 ] -Uplifting [loop] best 74748 combination zp ZP_WORD:57 [ loop::$5 ] zp ZP_WORD:59 [ loop::$1 ] zp ZP_WORD:61 [ loop::xpos#0 ] -Uplifting [mul16s] best 74748 combination zp ZP_DWORD:94 [ mul16s::return#2 ] zp ZP_DWORD:17 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:112 [ mul16s::return#0 ] zp ZP_WORD:108 [ mul16s::$9 ] zp ZP_WORD:110 [ mul16s::$16 ] zp ZP_WORD:92 [ mul16s::a#0 ] -Uplifting [memset] best 74732 combination zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:179 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:52 [ memset::str#2 ] -Uplifting [main] best 74612 combination reg byte x [ main::ch#2 main::ch#1 ] -Uplifting [] best 74612 combination zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] zp ZP_WORD:177 [ rem16u#1 ] -Uplifting [div32u16u] best 74612 combination zp ZP_DWORD:82 [ div32u16u::return#2 ] zp ZP_WORD:169 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:171 [ div32u16u::return#0 ] zp ZP_WORD:165 [ div32u16u::quotient_hi#0 ] +Uplifting [mul16u] best 74992 combination zp ZP_DWORD:25 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:29 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:23 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:21 [ mul16u::b#1 ] zp ZP_DWORD:104 [ mul16u::return#2 ] zp ZP_DWORD:149 [ mul16u::return#3 ] +Uplifting [divr16u] best 74782 combination zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:49 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:47 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:163 [ divr16u::return#2 ] zp ZP_WORD:167 [ divr16u::return#3 ] +Uplifting [sin16s] best 74782 combination zp ZP_DWORD:34 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:90 [ sin16s::return#0 ] zp ZP_WORD:38 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:117 [ sin16s::$4 ] zp ZP_WORD:125 [ sin16s::x2#0 ] zp ZP_WORD:133 [ sin16s::x3_6#0 ] zp ZP_WORD:139 [ sin16s::x4#0 ] zp ZP_WORD:143 [ sin16s::x5#0 ] zp ZP_WORD:145 [ sin16s::x5_128#0 ] zp ZP_WORD:129 [ sin16s::x3#0 ] zp ZP_WORD:147 [ sin16s::usinx#1 ] zp ZP_WORD:121 [ sin16s::x1#0 ] zp ZP_WORD:135 [ sin16s::usinx#0 ] zp ZP_BYTE:33 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 74766 combination zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:42 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:123 [ mulu16_sel::return#0 ] zp ZP_WORD:127 [ mulu16_sel::return#1 ] zp ZP_WORD:131 [ mulu16_sel::return#2 ] zp ZP_WORD:137 [ mulu16_sel::return#10 ] zp ZP_WORD:141 [ mulu16_sel::return#11 ] zp ZP_DWORD:153 [ mulu16_sel::$0 ] zp ZP_DWORD:157 [ mulu16_sel::$1 ] zp ZP_WORD:161 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 74766 combination zp ZP_DWORD:98 [ sin16s_gen2::$5 ] zp ZP_WORD:15 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:102 [ sin16s_gen2::$6 ] zp ZP_DWORD:9 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:13 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:86 [ sin16s_gen2::step#0 ] +Uplifting [loop] best 74766 combination zp ZP_WORD:57 [ loop::$5 ] zp ZP_WORD:59 [ loop::$1 ] zp ZP_WORD:61 [ loop::xpos#0 ] +Uplifting [mul16s] best 74766 combination zp ZP_DWORD:94 [ mul16s::return#2 ] zp ZP_DWORD:17 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:112 [ mul16s::return#0 ] zp ZP_WORD:108 [ mul16s::$9 ] zp ZP_WORD:110 [ mul16s::$16 ] zp ZP_WORD:92 [ mul16s::a#0 ] +Uplifting [memset] best 74750 combination zp ZP_WORD:55 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:179 [ memset::end#0 ] reg byte x [ memset::c#3 ] zp ZP_WORD:52 [ memset::str#2 ] +Uplifting [main] best 74630 combination reg byte x [ main::ch#2 main::ch#1 ] +Uplifting [] best 74630 combination zp ZP_WORD:3 [ xsin_idx#11 xsin_idx#19 xsin_idx#3 ] zp ZP_WORD:177 [ rem16u#1 ] +Uplifting [div32u16u] best 74630 combination zp ZP_DWORD:82 [ div32u16u::return#2 ] zp ZP_WORD:169 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:171 [ div32u16u::return#0 ] zp ZP_WORD:165 [ div32u16u::quotient_hi#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] -Uplifting [render_logo] best 69512 combination reg byte y [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] +Uplifting [render_logo] best 69530 combination reg byte y [ render_logo::screen_idx#10 render_logo::screen_idx#4 render_logo::screen_idx#18 render_logo::screen_idx#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:8 [ render_logo::screen_idx#15 render_logo::screen_idx#21 render_logo::screen_idx#5 render_logo::screen_idx#6 ] -Uplifting [render_logo] best 64712 combination reg byte y [ render_logo::screen_idx#15 render_logo::screen_idx#21 render_logo::screen_idx#5 render_logo::screen_idx#6 ] +Uplifting [render_logo] best 64730 combination reg byte y [ render_logo::screen_idx#15 render_logo::screen_idx#21 render_logo::screen_idx#5 render_logo::screen_idx#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ render_logo::logo_idx#11 render_logo::logo_idx#14 render_logo::logo_idx#4 ] -Uplifting [render_logo] best 64712 combination zp ZP_BYTE:7 [ render_logo::logo_idx#11 render_logo::logo_idx#14 render_logo::logo_idx#4 ] +Uplifting [render_logo] best 64730 combination zp ZP_BYTE:7 [ render_logo::logo_idx#11 render_logo::logo_idx#14 render_logo::logo_idx#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ render_logo::logo_idx#10 render_logo::logo_idx#3 ] -Uplifting [render_logo] best 64712 combination zp ZP_BYTE:6 [ render_logo::logo_idx#10 render_logo::logo_idx#3 ] +Uplifting [render_logo] best 64730 combination zp ZP_BYTE:6 [ render_logo::logo_idx#10 render_logo::logo_idx#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ render_logo::$33 ] -Uplifting [render_logo] best 64312 combination reg byte a [ render_logo::$33 ] +Uplifting [render_logo] best 64330 combination reg byte a [ render_logo::$33 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ render_logo::$36 ] -Uplifting [render_logo] best 63912 combination reg byte a [ render_logo::$36 ] +Uplifting [render_logo] best 63930 combination reg byte a [ render_logo::$36 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ render_logo::$39 ] -Uplifting [render_logo] best 63512 combination reg byte a [ render_logo::$39 ] +Uplifting [render_logo] best 63530 combination reg byte a [ render_logo::$39 ] Attempting to uplift remaining variables inzp ZP_BYTE:74 [ render_logo::$42 ] -Uplifting [render_logo] best 63112 combination reg byte a [ render_logo::$42 ] +Uplifting [render_logo] best 63130 combination reg byte a [ render_logo::$42 ] Attempting to uplift remaining variables inzp ZP_BYTE:75 [ render_logo::$45 ] -Uplifting [render_logo] best 62712 combination reg byte a [ render_logo::$45 ] +Uplifting [render_logo] best 62730 combination reg byte a [ render_logo::$45 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ render_logo::$73 ] -Uplifting [render_logo] best 62312 combination reg byte a [ render_logo::$73 ] +Uplifting [render_logo] best 62330 combination reg byte a [ render_logo::$73 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ render_logo::$76 ] -Uplifting [render_logo] best 61912 combination reg byte a [ render_logo::$76 ] +Uplifting [render_logo] best 61930 combination reg byte a [ render_logo::$76 ] Attempting to uplift remaining variables inzp ZP_BYTE:79 [ render_logo::$79 ] -Uplifting [render_logo] best 61512 combination reg byte a [ render_logo::$79 ] +Uplifting [render_logo] best 61530 combination reg byte a [ render_logo::$79 ] Attempting to uplift remaining variables inzp ZP_BYTE:80 [ render_logo::$82 ] -Uplifting [render_logo] best 61112 combination reg byte a [ render_logo::$82 ] +Uplifting [render_logo] best 61130 combination reg byte a [ render_logo::$82 ] Attempting to uplift remaining variables inzp ZP_BYTE:81 [ render_logo::$85 ] -Uplifting [render_logo] best 60712 combination reg byte a [ render_logo::$85 ] +Uplifting [render_logo] best 60730 combination reg byte a [ render_logo::$85 ] Attempting to uplift remaining variables inzp ZP_BYTE:65 [ render_logo::$0 ] -Uplifting [render_logo] best 60706 combination reg byte a [ render_logo::$0 ] +Uplifting [render_logo] best 60724 combination reg byte a [ render_logo::$0 ] Attempting to uplift remaining variables inzp ZP_BYTE:66 [ render_logo::$1 ] -Uplifting [render_logo] best 60700 combination reg byte a [ render_logo::$1 ] +Uplifting [render_logo] best 60718 combination reg byte a [ render_logo::$1 ] Attempting to uplift remaining variables inzp ZP_BYTE:67 [ render_logo::$2 ] -Uplifting [render_logo] best 60694 combination reg byte a [ render_logo::$2 ] +Uplifting [render_logo] best 60712 combination reg byte a [ render_logo::$2 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ render_logo::$17 ] -Uplifting [render_logo] best 60688 combination reg byte a [ render_logo::$17 ] +Uplifting [render_logo] best 60706 combination reg byte a [ render_logo::$17 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ render_logo::x_char#0 ] -Uplifting [render_logo] best 60688 combination zp ZP_BYTE:70 [ render_logo::x_char#0 ] +Uplifting [render_logo] best 60706 combination zp ZP_BYTE:70 [ render_logo::x_char#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 60688 combination zp ZP_BYTE:33 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 60706 combination zp ZP_BYTE:33 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:38 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:147 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:129 [ sin16s::x3#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:45 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:177 [ rem16u#1 ] ] - score: 2 diff --git a/src/test/ref/examples/sinplotter/sine-plotter.asm b/src/test/ref/examples/sinplotter/sine-plotter.asm index daef90e36..9923a4b63 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.asm +++ b/src/test/ref/examples/sinplotter/sine-plotter.asm @@ -55,7 +55,6 @@ main: { sta D016 lda #toD0181_return sta D018 - jsr memset jsr bitmap_init jsr bitmap_clear jsr sin16s_gen2 @@ -174,10 +173,10 @@ render_sine: { // Plot a single dot in the bitmap // bitmap_plot(word zeropage(4) x, byte register(X) y) bitmap_plot: { - .label _1 = $34 - .label plotter = $32 + .label _1 = $33 + .label plotter = $31 .label x = 4 - .label _3 = $32 + .label _3 = $31 lda bitmap_plot_yhi,x sta _3+1 lda bitmap_plot_ylo,x @@ -248,8 +247,8 @@ sin16s_gen2: { .const max = $140 .label ampl = max-min .label _5 = $10 - .label _6 = $3a - .label step = $36 + .label _6 = $39 + .label step = $35 .label sintab = $c .label x = 8 .label i = $e @@ -326,8 +325,8 @@ sin16s_gen2: { // Fixes offsets introduced by using unsigned multiplication // mul16s(signed word zeropage($21) a) mul16s: { - .label _9 = $3c - .label _16 = $3c + .label _9 = $3b + .label _16 = $3b .label m = $10 .label return = $10 .label a = $21 @@ -418,14 +417,14 @@ sin16s: { .label _4 = $1d .label x = $1d .label return = $21 - .label x1 = $3e + .label x1 = $3d .label x2 = $23 .label x3 = $23 - .label x3_6 = $40 + .label x3_6 = $3f .label usinx = $21 .label x4 = $23 - .label x5 = $40 - .label x5_128 = $40 + .label x5 = $3f + .label x5_128 = $3f .label sinx = $21 .label isUpper = $1c lda x+3 @@ -578,13 +577,11 @@ sin16s: { cmp #0 beq b3 sec - lda sinx - eor #$ff - adc #0 + lda #0 + sbc sinx sta sinx - lda sinx+1 - eor #$ff - adc #0 + lda #0 + sbc sinx+1 sta sinx+1 b3: rts @@ -597,7 +594,7 @@ mulu16_sel: { .label _1 = $10 .label v1 = $23 .label v2 = $14 - .label return = $40 + .label return = $3f .label return_1 = $23 .label return_10 = $23 lda v1 @@ -631,9 +628,9 @@ mulu16_sel: { // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $42 + .label quotient_hi = $41 .label quotient_lo = $29 - .label return = $36 + .label return = $35 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 @@ -716,39 +713,66 @@ divr16u: { rts } // Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with bitmap_clear: { - .label bitmap = $2c - .label y = $2b - .label _3 = $2c - lda bitmap_plot_ylo - sta _3 - lda bitmap_plot_yhi - sta _3+1 - lda #0 - sta y - b1: + .const col = WHITE*$10 + ldx #col + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + lda #SCREEN + sta memset.str+1 + jsr memset ldx #0 - b2: - lda #0 - tay - sta (bitmap),y - inc bitmap + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + lda #BITMAP + sta memset.str+1 + jsr memset + rts +} +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($2b) str, byte register(X) c, word zeropage($2d) num) +memset: { + .label end = $2d + .label dst = $2b + .label str = $2b + .label num = $2d + lda end + clc + adc str + sta end + lda end+1 + adc str+1 + sta end+1 + b1: + txa + ldy #0 + sta (dst),y + inc dst bne !+ - inc bitmap+1 + inc dst+1 !: - inx - cpx #$c8 - bne b2 - inc y - lda #$28 - cmp y + lda dst+1 + cmp end+1 + bne b1 + lda dst + cmp end bne b1 rts } // Initialize bitmap plotting tables bitmap_init: { - .label _7 = $44 - .label yoffs = $2e + .label _7 = $43 + .label yoffs = $2f ldx #0 lda #$80 b1: @@ -789,32 +813,6 @@ bitmap_init: { cpx #0 bne b3 rts -} -// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -memset: { - .const num = $3e8 - .label str = SCREEN - .label end = str+num - .label dst = $30 - lda #str - sta dst+1 - b1: - lda #WHITE - ldy #0 - sta (dst),y - inc dst - bne !+ - inc dst+1 - !: - lda dst+1 - cmp #>end - bne b1 - lda dst - cmp #=(signed word) $c8) goto wrap_y::@2 + [60] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 ) + [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 to:wrap_y::@3 wrap_y::@3: scope:[wrap_y] from wrap_y::@1 wrap_y::@4 - [64] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 ) - [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 + [62] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 ) + [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 to:wrap_y::@5 wrap_y::@5: scope:[wrap_y] from wrap_y::@3 - [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 + [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 to:wrap_y::@return wrap_y::@return: scope:[wrap_y] from wrap_y::@5 - [67] return + [65] return to:@return wrap_y::@4: scope:[wrap_y] from wrap_y::@3 - [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 + [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 to:wrap_y::@3 wrap_y::@2: scope:[wrap_y] from wrap_y::@1 - [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 + [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 to:wrap_y::@1 -sin16s_gen2: scope:[sin16s_gen2] from main::@6 - [70] phi() - [71] call div32u16u - [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 +sin16s_gen2: scope:[sin16s_gen2] from main::@5 + [68] phi() + [69] call div32u16u + [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [74] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [74] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) sin#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [74] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [76] call sin16s - [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [72] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [72] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) sin#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [72] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [74] call sin16s + [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [79] call mul16s - [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [77] call mul16s + [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 - [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 - [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [86] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 + [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 + [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [84] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [88] return + [86] return to:@return mul16s: scope:[mul16s] from sin16s_gen2::@3 - [89] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 - [90] call mul16u - [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + [87] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 + [88] call mul16u + [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 to:mul16s::@4 mul16s::@4: scope:[mul16s] from mul16s - [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 + [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 to:mul16s::@3 mul16s::@3: scope:[mul16s] from mul16s::@4 - [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 - [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 - [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 + [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 + [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 + [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 to:mul16s::@1 mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@4 - [97] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 ) + [95] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 ) to:mul16s::@2 mul16s::@2: scope:[mul16s] from mul16s::@1 - [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 to:mul16s::@return mul16s::@return: scope:[mul16s] from mul16s::@2 - [99] return + [97] return to:@return mul16u: scope:[mul16u] from mul16s mulu16_sel - [100] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) - [100] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) + [98] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) + [98] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) to:mul16u::@1 mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 - [101] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) - [101] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) - [101] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) - [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 + [99] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) + [99] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) + [99] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) + [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 to:mul16u::@return mul16u::@return: scope:[mul16u] from mul16u::@1 - [103] return + [101] return to:@return mul16u::@2: scope:[mul16u] from mul16u::@1 - [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 - [105] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 + [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 + [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 to:mul16u::@4 mul16u::@4: scope:[mul16u] from mul16u::@2 - [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 + [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 to:mul16u::@3 mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 - [107] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) - [108] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 - [109] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 + [105] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) + [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 + [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 sin16s: scope:[sin16s] from sin16s_gen2::@1 - [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [111] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [112] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [112] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [110] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [110] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [114] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [115] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [120] call mulu16_sel - [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [113] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [118] call mulu16_sel + [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [125] call mulu16_sel - [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [123] call mulu16_sel + [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [129] call mulu16_sel - [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [127] call mulu16_sel + [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [135] call mulu16_sel - [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [133] call mulu16_sel + [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [140] call mulu16_sel - [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [138] call mulu16_sel + [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [145] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [147] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [145] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [148] return + [146] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [150] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [150] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [150] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [153] call mul16u - [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [148] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [148] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [148] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [151] call mul16u + [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [158] return + [156] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [159] phi() - [160] call divr16u - [161] (word) divr16u::return#2 ← (word) divr16u::return#0 + [157] phi() + [158] call divr16u + [159] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [163] (word) divr16u::rem#4 ← (word) rem16u#1 - [164] call divr16u - [165] (word) divr16u::return#3 ← (word) divr16u::return#0 + [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [161] (word) divr16u::rem#4 ← (word) rem16u#1 + [162] call divr16u + [163] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [168] return + [166] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [169] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [169] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [167] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [167] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [170] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [170] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [170] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [170] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [171] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [173] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [174] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [168] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [168] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [168] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [168] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [176] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [177] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [178] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 + [174] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [180] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [181] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 + [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [182] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [182] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [183] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [184] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [180] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [180] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [185] (word) rem16u#1 ← (word) divr16u::rem#11 + [183] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [186] return + [184] return to:@return -bitmap_clear: scope:[bitmap_clear] from main::@5 - [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) - [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 +bitmap_clear: scope:[bitmap_clear] from main::@4 + [185] phi() + [186] call memset to:bitmap_clear::@1 -bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3 - [189] (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) 0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) - [189] (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*~) bitmap_clear::bitmap#5 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#1 ) - to:bitmap_clear::@2 -bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2 - [190] (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) 0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) - [190] (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) - [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 - [192] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 - [193] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 - [194] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 - to:bitmap_clear::@3 -bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 - [195] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 - [196] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 +bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear + [187] phi() + [188] call memset to:bitmap_clear::@return -bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 +bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 + [189] return + to:@return +memset: scope:[memset] from bitmap_clear bitmap_clear::@1 + [190] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [190] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) + [190] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) + [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 + [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + [193] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) + [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 [197] return to:@return -bitmap_init: scope:[bitmap_init] from main::@4 +bitmap_init: scope:[bitmap_init] from main::@3 [198] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 @@ -427,15 +427,3 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [219] return to:@return -memset: scope:[memset] from main::@3 - [220] phi() - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [221] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@1/(byte*) memset::dst#1 ) - [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 - [223] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 - to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [225] return - to:@return diff --git a/src/test/ref/examples/sinplotter/sine-plotter.log b/src/test/ref/examples/sinplotter/sine-plotter.log index 937c2609f..806b857c2 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.log +++ b/src/test/ref/examples/sinplotter/sine-plotter.log @@ -45,14 +45,12 @@ Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWA Identified literal word (dword) { div32u16u::quotient_hi, div32u16u::quotient_lo } in (dword) div32u16u::quotient ← { (word) div32u16u::quotient_hi, (word) div32u16u::quotient_lo } Adding pointer type conversion cast to void pointer (byte*) memcpy::source in (byte*) memcpy::src ← (void*) memcpy::source Adding pointer type conversion cast to void pointer (byte*) memcpy::destination in (byte*) memcpy::dst ← (void*) memcpy::destination -Adding pointer type conversion cast to void pointer (byte*) memmove::$3 in (byte*) memmove::src ← (void*~) memmove::$3 -Adding pointer type conversion cast to void pointer (byte*) memmove::$4 in (byte*) memmove::dst ← (void*~) memmove::$4 -Adding pointer type conversion cast to void pointer (byte*) memset::$0 in (byte*) memset::end ← (void*~) memset::$0 Adding pointer type conversion cast to void pointer (byte*) memset::str in (byte*) memset::dst ← (void*) memset::str +Adding void pointer type conversion cast (void*) bitmap_screen in (void*~) bitmap_clear::$2 ← call memset (byte*) bitmap_screen (byte) bitmap_clear::col (word) $3e8 +Adding void pointer type conversion cast (void*) bitmap_gfx in (void*~) bitmap_clear::$3 ← call memset (byte*) bitmap_gfx (number) 0 (word) $1f40 Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400 Adding pointer type conversion cast (byte*) BITMAP in (byte*) BITMAP ← (number) $2000 Adding pointer type conversion cast (signed word*) sin2 in (signed word*) sin2 ← (number) $1400 -Adding void pointer type conversion cast (void*) SCREEN in (void*~) main::$5 ← call memset (byte*) SCREEN (byte) WHITE (number) $3e8 Fixing pointer increment (signed word*) sin16s_gen::sintab ← ++ (signed word*) sin16s_gen::sintab Fixing pointer increment (signed word*) sin16s_gen2::sintab ← ++ (signed word*) sin16s_gen2::sintab Fixing pointer addition (signed word*~) render_sine::$0 ← (signed word[$200]) sin + (word) render_sine::sin_idx @@ -100,11 +98,9 @@ Culled Empty Block (label) @25 Culled Empty Block (label) @26 Culled Empty Block (label) memset::@3 Culled Empty Block (label) @27 -Culled Empty Block (label) @28 Culled Empty Block (label) bitmap_init::@8 +Culled Empty Block (label) @29 Culled Empty Block (label) @30 -Culled Empty Block (label) bitmap_clear::@4 -Culled Empty Block (label) @31 Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@1 Culled Empty Block (label) main::vicSelectGfxBank1_@return Culled Empty Block (label) main::toD0181_@1 @@ -112,9 +108,9 @@ Culled Empty Block (label) main::@4 Culled Empty Block (label) main::@3 Culled Empty Block (label) main::@5 Culled Empty Block (label) main::@6 -Culled Empty Block (label) @33 +Culled Empty Block (label) @32 Culled Empty Block (label) render_sine::@4 -Culled Empty Block (label) @34 +Culled Empty Block (label) @33 Culled Empty Block (label) wrap_y::@4 Culled Empty Block (label) wrap_y::@3 Culled Empty Block (label) wrap_y::@5 @@ -140,6 +136,7 @@ CONTROL FLOW GRAPH SSA (byte*) D018#0 ← ((byte*)) (number) $d018 (byte*) CIA2_PORT_A#0 ← ((byte*)) (number) $dd00 (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (number) $dd02 + (byte) BLACK#0 ← (number) 0 (byte) WHITE#0 ← (number) 1 to:@6 @6: scope:[] from @begin @@ -374,13 +371,13 @@ mul16s::@return: scope:[mul16s] from mul16s::@2 (dword) PI2_u4f28#0 ← (number) $6487ed51 (dword) PI_u4f28#0 ← (number) $3243f6a9 (dword) PI_HALF_u4f28#0 ← (number) $1921fb54 - to:@29 -sin16s_gen2: scope:[sin16s_gen2] from main::@11 - (signed word*) sin16s_gen2::sintab#6 ← phi( main::@11/(signed word*) sin16s_gen2::sintab#1 ) - (word) rem16u#21 ← phi( main::@11/(word) rem16u#23 ) - (word) sin16s_gen2::wavelength#1 ← phi( main::@11/(word) sin16s_gen2::wavelength#0 ) - (signed word) sin16s_gen2::min#1 ← phi( main::@11/(signed word) sin16s_gen2::min#0 ) - (signed word) sin16s_gen2::max#1 ← phi( main::@11/(signed word) sin16s_gen2::max#0 ) + to:@28 +sin16s_gen2: scope:[sin16s_gen2] from main::@10 + (signed word*) sin16s_gen2::sintab#6 ← phi( main::@10/(signed word*) sin16s_gen2::sintab#1 ) + (word) rem16u#21 ← phi( main::@10/(word) rem16u#23 ) + (word) sin16s_gen2::wavelength#1 ← phi( main::@10/(word) sin16s_gen2::wavelength#0 ) + (signed word) sin16s_gen2::min#1 ← phi( main::@10/(signed word) sin16s_gen2::min#0 ) + (signed word) sin16s_gen2::max#1 ← phi( main::@10/(signed word) sin16s_gen2::max#0 ) (signed word~) sin16s_gen2::$0 ← (signed word) sin16s_gen2::max#1 - (signed word) sin16s_gen2::min#1 (signed word) sin16s_gen2::ampl#0 ← (signed word~) sin16s_gen2::$0 (signed word~) sin16s_gen2::$1 ← (signed word) sin16s_gen2::ampl#0 >> (number) 1 @@ -603,46 +600,54 @@ mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@2 (word) mulu16_sel::return#6 ← (word) mulu16_sel::return#12 return to:@return -memset: scope:[memset] from main::@8 - (byte) memset::c#2 ← phi( main::@8/(byte) memset::c#0 ) - (word) memset::num#1 ← phi( main::@8/(word) memset::num#0 ) - (void*) memset::str#1 ← phi( main::@8/(void*) memset::str#0 ) - (void*~) memset::$0 ← (void*) memset::str#1 + (word) memset::num#1 - (byte*) memset::end#0 ← ((byte*)) (void*~) memset::$0 - (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#1 +memset: scope:[memset] from bitmap_clear bitmap_clear::@1 + (byte) memset::c#3 ← phi( bitmap_clear/(byte) memset::c#0 bitmap_clear::@1/(byte) memset::c#1 ) + (word) memset::num#2 ← phi( bitmap_clear/(word) memset::num#0 bitmap_clear::@1/(word) memset::num#1 ) + (void*) memset::str#2 ← phi( bitmap_clear/(void*) memset::str#0 bitmap_clear::@1/(void*) memset::str#1 ) + (byte*~) memset::$0 ← ((byte*)) (void*) memset::str#2 + (byte*~) memset::$1 ← (byte*~) memset::$0 + (word) memset::num#2 + (byte*) memset::end#0 ← (byte*~) memset::$1 + (byte*) memset::dst#0 ← ((byte*)) (void*) memset::str#2 to:memset::@1 memset::@1: scope:[memset] from memset memset::@1 - (void*) memset::str#3 ← phi( memset/(void*) memset::str#1 memset::@1/(void*) memset::str#3 ) + (void*) memset::str#4 ← phi( memset/(void*) memset::str#2 memset::@1/(void*) memset::str#4 ) (byte*) memset::end#1 ← phi( memset/(byte*) memset::end#0 memset::@1/(byte*) memset::end#1 ) (byte*) memset::dst#2 ← phi( memset/(byte*) memset::dst#0 memset::@1/(byte*) memset::dst#1 ) - (byte) memset::c#1 ← phi( memset/(byte) memset::c#2 memset::@1/(byte) memset::c#1 ) - *((byte*) memset::dst#2) ← (byte) memset::c#1 + (byte) memset::c#2 ← phi( memset/(byte) memset::c#3 memset::@1/(byte) memset::c#2 ) + *((byte*) memset::dst#2) ← (byte) memset::c#2 (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - (bool~) memset::$1 ← (byte*) memset::dst#1 != (byte*) memset::end#1 - if((bool~) memset::$1) goto memset::@1 + (bool~) memset::$2 ← (byte*) memset::dst#1 != (byte*) memset::end#1 + if((bool~) memset::$2) goto memset::@1 to:memset::@2 memset::@2: scope:[memset] from memset::@1 - (void*) memset::str#2 ← phi( memset::@1/(void*) memset::str#3 ) - (void*) memset::return#0 ← (void*) memset::str#2 + (void*) memset::str#3 ← phi( memset::@1/(void*) memset::str#4 ) + (void*) memset::return#0 ← (void*) memset::str#3 to:memset::@return memset::@return: scope:[memset] from memset::@2 - (void*) memset::return#3 ← phi( memset::@2/(void*) memset::return#0 ) - (void*) memset::return#1 ← (void*) memset::return#3 + (void*) memset::return#4 ← phi( memset::@2/(void*) memset::return#0 ) + (void*) memset::return#1 ← (void*) memset::return#4 return to:@return -@29: scope:[] from @17 +@28: scope:[] from @17 (word) rem16u#32 ← phi( @17/(word) rem16u#34 ) + (byte*) bitmap_screen#0 ← (byte*) 0 + (byte*) bitmap_gfx#0 ← (byte*) 0 (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } - to:@32 -bitmap_init: scope:[bitmap_init] from main::@9 - (byte*) bitmap_init::bitmap#5 ← phi( main::@9/(byte*) bitmap_init::bitmap#0 ) + to:@31 +bitmap_init: scope:[bitmap_init] from main::@8 + (byte*) bitmap_init::screen#1 ← phi( main::@8/(byte*) bitmap_init::screen#0 ) + (byte*) bitmap_init::gfx#1 ← phi( main::@8/(byte*) bitmap_init::gfx#0 ) + (byte*) bitmap_gfx#1 ← (byte*) bitmap_init::gfx#1 + (byte*) bitmap_screen#1 ← (byte*) bitmap_init::screen#1 (byte) bitmap_init::bits#0 ← (number) $80 (byte) bitmap_init::x#0 ← (byte) 0 to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - (byte*) bitmap_init::bitmap#3 ← phi( bitmap_init/(byte*) bitmap_init::bitmap#5 bitmap_init::@2/(byte*) bitmap_init::bitmap#2 ) + (byte*) bitmap_screen#27 ← phi( bitmap_init/(byte*) bitmap_screen#1 bitmap_init::@2/(byte*) bitmap_screen#24 ) + (byte*) bitmap_gfx#28 ← phi( bitmap_init/(byte*) bitmap_gfx#1 bitmap_init::@2/(byte*) bitmap_gfx#25 ) + (byte*) bitmap_init::gfx#4 ← phi( bitmap_init/(byte*) bitmap_init::gfx#1 bitmap_init::@2/(byte*) bitmap_init::gfx#3 ) (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) bitmap_init::x#0 bitmap_init::@2/(byte) bitmap_init::x#1 ) (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) bitmap_init::bits#0 bitmap_init::@2/(byte) bitmap_init::bits#4 ) *((byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 @@ -652,7 +657,9 @@ bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 if((bool~) bitmap_init::$1) goto bitmap_init::@2 to:bitmap_init::@3 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@3 - (byte*) bitmap_init::bitmap#2 ← phi( bitmap_init::@1/(byte*) bitmap_init::bitmap#3 bitmap_init::@3/(byte*) bitmap_init::bitmap#4 ) + (byte*) bitmap_screen#24 ← phi( bitmap_init::@1/(byte*) bitmap_screen#27 bitmap_init::@3/(byte*) bitmap_screen#28 ) + (byte*) bitmap_gfx#25 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#28 bitmap_init::@3/(byte*) bitmap_gfx#29 ) + (byte*) bitmap_init::gfx#3 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 bitmap_init::@3/(byte*) bitmap_init::gfx#5 ) (byte) bitmap_init::bits#4 ← phi( bitmap_init::@1/(byte) bitmap_init::bits#1 bitmap_init::@3/(byte) bitmap_init::bits#2 ) (byte) bitmap_init::x#3 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 bitmap_init::@3/(byte) bitmap_init::x#4 ) (byte) bitmap_init::x#1 ← (byte) bitmap_init::x#3 + rangenext(0,$ff) @@ -660,16 +667,22 @@ bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@3 if((bool~) bitmap_init::$2) goto bitmap_init::@1 to:bitmap_init::@4 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@1 - (byte*) bitmap_init::bitmap#4 ← phi( bitmap_init::@1/(byte*) bitmap_init::bitmap#3 ) + (byte*) bitmap_screen#28 ← phi( bitmap_init::@1/(byte*) bitmap_screen#27 ) + (byte*) bitmap_gfx#29 ← phi( bitmap_init::@1/(byte*) bitmap_gfx#28 ) + (byte*) bitmap_init::gfx#5 ← phi( bitmap_init::@1/(byte*) bitmap_init::gfx#4 ) (byte) bitmap_init::x#4 ← phi( bitmap_init::@1/(byte) bitmap_init::x#2 ) (byte) bitmap_init::bits#2 ← (number) $80 to:bitmap_init::@2 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@2 - (byte*) bitmap_init::bitmap#1 ← phi( bitmap_init::@2/(byte*) bitmap_init::bitmap#2 ) - (byte*) bitmap_init::yoffs#0 ← (byte*) bitmap_init::bitmap#1 + (byte*) bitmap_screen#21 ← phi( bitmap_init::@2/(byte*) bitmap_screen#24 ) + (byte*) bitmap_gfx#22 ← phi( bitmap_init::@2/(byte*) bitmap_gfx#25 ) + (byte*) bitmap_init::gfx#2 ← phi( bitmap_init::@2/(byte*) bitmap_init::gfx#3 ) + (byte*) bitmap_init::yoffs#0 ← (byte*) bitmap_init::gfx#2 (byte) bitmap_init::y#0 ← (byte) 0 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@4 bitmap_init::@6 + (byte*) bitmap_screen#15 ← phi( bitmap_init::@4/(byte*) bitmap_screen#21 bitmap_init::@6/(byte*) bitmap_screen#11 ) + (byte*) bitmap_gfx#16 ← phi( bitmap_init::@4/(byte*) bitmap_gfx#22 bitmap_init::@6/(byte*) bitmap_gfx#11 ) (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@4/(byte*) bitmap_init::yoffs#0 bitmap_init::@6/(byte*) bitmap_init::yoffs#4 ) (byte) bitmap_init::y#2 ← phi( bitmap_init::@4/(byte) bitmap_init::y#0 bitmap_init::@6/(byte) bitmap_init::y#1 ) (number~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (number) 7 @@ -684,6 +697,8 @@ bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@4 bitmap_init::@6 if((bool~) bitmap_init::$9) goto bitmap_init::@6 to:bitmap_init::@7 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@7 + (byte*) bitmap_screen#11 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 bitmap_init::@7/(byte*) bitmap_screen#16 ) + (byte*) bitmap_gfx#11 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 bitmap_init::@7/(byte*) bitmap_gfx#17 ) (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 bitmap_init::@7/(byte*) bitmap_init::yoffs#1 ) (byte) bitmap_init::y#3 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 bitmap_init::@7/(byte) bitmap_init::y#4 ) (byte) bitmap_init::y#1 ← (byte) bitmap_init::y#3 + rangenext(0,$ff) @@ -691,42 +706,45 @@ bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@5 bitmap_init::@7 if((bool~) bitmap_init::$11) goto bitmap_init::@5 to:bitmap_init::@return bitmap_init::@7: scope:[bitmap_init] from bitmap_init::@5 + (byte*) bitmap_screen#16 ← phi( bitmap_init::@5/(byte*) bitmap_screen#15 ) + (byte*) bitmap_gfx#17 ← phi( bitmap_init::@5/(byte*) bitmap_gfx#16 ) (byte) bitmap_init::y#4 ← phi( bitmap_init::@5/(byte) bitmap_init::y#2 ) (byte*) bitmap_init::yoffs#3 ← phi( bitmap_init::@5/(byte*) bitmap_init::yoffs#2 ) (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8 (byte*) bitmap_init::yoffs#1 ← (byte*~) bitmap_init::$10 to:bitmap_init::@6 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@6 + (byte*) bitmap_screen#6 ← phi( bitmap_init::@6/(byte*) bitmap_screen#11 ) + (byte*) bitmap_gfx#6 ← phi( bitmap_init::@6/(byte*) bitmap_gfx#11 ) + (byte*) bitmap_gfx#2 ← (byte*) bitmap_gfx#6 + (byte*) bitmap_screen#2 ← (byte*) bitmap_screen#6 return to:@return -bitmap_clear: scope:[bitmap_clear] from main::@10 - (byte*~) bitmap_clear::$0 ← ((byte*)) { *((byte[$100]) bitmap_plot_yhi#0 + (number) 0), *((byte[$100]) bitmap_plot_ylo#0 + (number) 0) } - (byte*) bitmap_clear::bitmap#0 ← (byte*~) bitmap_clear::$0 - (byte) bitmap_clear::y#0 ← (byte) 0 +bitmap_clear: scope:[bitmap_clear] from main::@9 + (byte*) bitmap_gfx#12 ← phi( main::@9/(byte*) bitmap_gfx#3 ) + (byte*) bitmap_screen#7 ← phi( main::@9/(byte*) bitmap_screen#3 ) + (byte) bitmap_clear::bgcol#1 ← phi( main::@9/(byte) bitmap_clear::bgcol#0 ) + (byte) bitmap_clear::fgcol#1 ← phi( main::@9/(byte) bitmap_clear::fgcol#0 ) + (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10 + (number~) bitmap_clear::$1 ← (number~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 + (byte) bitmap_clear::col#0 ← (number~) bitmap_clear::$1 + (void*) memset::str#0 ← (void*)(byte*) bitmap_screen#7 + (byte) memset::c#0 ← (byte) bitmap_clear::col#0 + (word) memset::num#0 ← (word) $3e8 + call memset + (void*) memset::return#2 ← (void*) memset::return#1 to:bitmap_clear::@1 -bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3 - (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) bitmap_clear::y#0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) - (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#0 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#4 ) - (byte) bitmap_clear::x#0 ← (byte) 0 +bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear + (byte*) bitmap_gfx#7 ← phi( bitmap_clear/(byte*) bitmap_gfx#12 ) + (void*) memset::str#1 ← (void*)(byte*) bitmap_gfx#7 + (byte) memset::c#1 ← (number) 0 + (word) memset::num#1 ← (word) $1f40 + call memset + (void*) memset::return#3 ← (void*) memset::return#1 to:bitmap_clear::@2 -bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2 - (byte) bitmap_clear::y#3 ← phi( bitmap_clear::@1/(byte) bitmap_clear::y#4 bitmap_clear::@2/(byte) bitmap_clear::y#3 ) - (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) bitmap_clear::x#0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) - (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) - *((byte*) bitmap_clear::bitmap#2) ← (number) 0 - (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 - (byte) bitmap_clear::x#1 ← (byte) bitmap_clear::x#2 + rangenext(0,$c7) - (bool~) bitmap_clear::$1 ← (byte) bitmap_clear::x#1 != rangelast(0,$c7) - if((bool~) bitmap_clear::$1) goto bitmap_clear::@2 - to:bitmap_clear::@3 -bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 - (byte*) bitmap_clear::bitmap#4 ← phi( bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) - (byte) bitmap_clear::y#2 ← phi( bitmap_clear::@2/(byte) bitmap_clear::y#3 ) - (byte) bitmap_clear::y#1 ← (byte) bitmap_clear::y#2 + rangenext(0,$27) - (bool~) bitmap_clear::$2 ← (byte) bitmap_clear::y#1 != rangelast(0,$27) - if((bool~) bitmap_clear::$2) goto bitmap_clear::@1 +bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 to:bitmap_clear::@return -bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 +bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@2 return to:@return bitmap_plot: scope:[bitmap_plot] from render_sine::@5 render_sine::@7 @@ -742,8 +760,10 @@ bitmap_plot: scope:[bitmap_plot] from render_sine::@5 render_sine::@7 bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot return to:@return -@32: scope:[] from @29 - (word) rem16u#30 ← phi( @29/(word) rem16u#32 ) +@31: scope:[] from @28 + (word) rem16u#30 ← phi( @28/(word) rem16u#32 ) + (byte*) bitmap_screen#20 ← phi( @28/(byte*) bitmap_screen#0 ) + (byte*) bitmap_gfx#21 ← phi( @28/(byte*) bitmap_gfx#0 ) (byte*) SCREEN#0 ← ((byte*)) (number) $400 (byte*) BITMAP#0 ← ((byte*)) (number) $2000 (word) SIN_SIZE#0 ← (number) $200 @@ -753,9 +773,11 @@ bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot .word sin(toRadians([i*360]/512))*320 } }} - to:@35 -main: scope:[main] from @35 - (word) rem16u#43 ← phi( @35/(word) rem16u#25 ) + to:@34 +main: scope:[main] from @34 + (word) rem16u#42 ← phi( @34/(word) rem16u#25 ) + (byte*) bitmap_screen#33 ← phi( @34/(byte*) bitmap_screen#14 ) + (byte*) bitmap_gfx#34 ← phi( @34/(byte*) bitmap_gfx#15 ) asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 @@ -766,13 +788,17 @@ main: scope:[main] from @35 (byte*) main::vicSelectGfxBank1_gfx#0 ← (byte*) SCREEN#0 to:main::vicSelectGfxBank1 main::vicSelectGfxBank1: scope:[main] from main - (word) rem16u#42 ← phi( main/(word) rem16u#43 ) + (word) rem16u#41 ← phi( main/(word) rem16u#42 ) + (byte*) bitmap_screen#32 ← phi( main/(byte*) bitmap_screen#33 ) + (byte*) bitmap_gfx#33 ← phi( main/(byte*) bitmap_gfx#34 ) (byte*) main::vicSelectGfxBank1_gfx#1 ← phi( main/(byte*) main::vicSelectGfxBank1_gfx#0 ) *((byte*) CIA2_PORT_A_DDR#0) ← (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 - (word) rem16u#41 ← phi( main::vicSelectGfxBank1/(word) rem16u#42 ) + (word) rem16u#40 ← phi( main::vicSelectGfxBank1/(word) rem16u#41 ) + (byte*) bitmap_screen#31 ← phi( main::vicSelectGfxBank1/(byte*) bitmap_screen#32 ) + (byte*) bitmap_gfx#32 ← phi( main::vicSelectGfxBank1/(byte*) bitmap_gfx#33 ) (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 ← phi( main::vicSelectGfxBank1/(byte*) main::vicSelectGfxBank1_toDd001_gfx#0 ) (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← ((word)) (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (word~) main::vicSelectGfxBank1_toDd001_$0#0 @@ -781,24 +807,32 @@ main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1 (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (number~) main::vicSelectGfxBank1_toDd001_$3#0 to:main::vicSelectGfxBank1_toDd001_@return main::vicSelectGfxBank1_toDd001_@return: scope:[main] from main::vicSelectGfxBank1_toDd001 - (word) rem16u#40 ← phi( main::vicSelectGfxBank1_toDd001/(word) rem16u#41 ) + (word) rem16u#39 ← phi( main::vicSelectGfxBank1_toDd001/(word) rem16u#40 ) + (byte*) bitmap_screen#30 ← phi( main::vicSelectGfxBank1_toDd001/(byte*) bitmap_screen#31 ) + (byte*) bitmap_gfx#31 ← phi( main::vicSelectGfxBank1_toDd001/(byte*) bitmap_gfx#32 ) (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 - (word) rem16u#39 ← phi( main::vicSelectGfxBank1_toDd001_@return/(word) rem16u#40 ) + (word) rem16u#38 ← phi( main::vicSelectGfxBank1_toDd001_@return/(word) rem16u#39 ) + (byte*) bitmap_screen#29 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte*) bitmap_screen#30 ) + (byte*) bitmap_gfx#30 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte*) bitmap_gfx#31 ) (byte) main::vicSelectGfxBank1_toDd001_return#3 ← phi( main::vicSelectGfxBank1_toDd001_@return/(byte) main::vicSelectGfxBank1_toDd001_return#1 ) (byte~) main::vicSelectGfxBank1_$0#0 ← (byte) main::vicSelectGfxBank1_toDd001_return#3 *((byte*) CIA2_PORT_A#0) ← (byte~) main::vicSelectGfxBank1_$0#0 to:main::@7 main::@7: scope:[main] from main::vicSelectGfxBank1_@1 - (word) rem16u#38 ← phi( main::vicSelectGfxBank1_@1/(word) rem16u#39 ) + (word) rem16u#37 ← phi( main::vicSelectGfxBank1_@1/(word) rem16u#38 ) + (byte*) bitmap_screen#25 ← phi( main::vicSelectGfxBank1_@1/(byte*) bitmap_screen#29 ) + (byte*) bitmap_gfx#26 ← phi( main::vicSelectGfxBank1_@1/(byte*) bitmap_gfx#30 ) *((byte*) D016#0) ← (byte) VIC_CSEL#0 (byte*) main::toD0181_screen#0 ← (byte*) SCREEN#0 (byte*) main::toD0181_gfx#0 ← (byte*) BITMAP#0 to:main::toD0181 main::toD0181: scope:[main] from main::@7 - (word) rem16u#37 ← phi( main::@7/(word) rem16u#38 ) + (word) rem16u#36 ← phi( main::@7/(word) rem16u#37 ) + (byte*) bitmap_screen#22 ← phi( main::@7/(byte*) bitmap_screen#25 ) + (byte*) bitmap_gfx#23 ← phi( main::@7/(byte*) bitmap_gfx#26 ) (byte*) main::toD0181_gfx#1 ← phi( main::@7/(byte*) main::toD0181_gfx#0 ) (byte*) main::toD0181_screen#1 ← phi( main::@7/(byte*) main::toD0181_screen#0 ) (word~) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#1 @@ -813,60 +847,77 @@ main::toD0181: scope:[main] from main::@7 (byte) main::toD0181_return#0 ← (number~) main::toD0181_$8#0 to:main::toD0181_@return main::toD0181_@return: scope:[main] from main::toD0181 - (word) rem16u#36 ← phi( main::toD0181/(word) rem16u#37 ) + (word) rem16u#35 ← phi( main::toD0181/(word) rem16u#36 ) + (byte*) bitmap_screen#17 ← phi( main::toD0181/(byte*) bitmap_screen#22 ) + (byte*) bitmap_gfx#18 ← phi( main::toD0181/(byte*) bitmap_gfx#23 ) (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::@8 main::@8: scope:[main] from main::toD0181_@return - (word) rem16u#35 ← phi( main::toD0181_@return/(word) rem16u#36 ) + (word) rem16u#33 ← phi( main::toD0181_@return/(word) rem16u#35 ) + (byte*) bitmap_screen#12 ← phi( main::toD0181_@return/(byte*) bitmap_screen#17 ) + (byte*) bitmap_gfx#13 ← phi( main::toD0181_@return/(byte*) bitmap_gfx#18 ) (byte) main::toD0181_return#3 ← phi( main::toD0181_@return/(byte) main::toD0181_return#1 ) (byte~) main::$4 ← (byte) main::toD0181_return#3 *((byte*) D018#0) ← (byte~) main::$4 - (void*) memset::str#0 ← (void*)(byte*) SCREEN#0 - (byte) memset::c#0 ← (byte) WHITE#0 - (word) memset::num#0 ← (number) $3e8 - call memset - (void*) memset::return#2 ← (void*) memset::return#1 + (byte*) bitmap_init::gfx#0 ← (byte*) BITMAP#0 + (byte*) bitmap_init::screen#0 ← (byte*) SCREEN#0 + call bitmap_init to:main::@9 main::@9: scope:[main] from main::@8 - (word) rem16u#33 ← phi( main::@8/(word) rem16u#35 ) - (byte*) bitmap_init::bitmap#0 ← (byte*) BITMAP#0 - call bitmap_init + (word) rem16u#27 ← phi( main::@8/(word) rem16u#33 ) + (byte*) bitmap_screen#8 ← phi( main::@8/(byte*) bitmap_screen#2 ) + (byte*) bitmap_gfx#8 ← phi( main::@8/(byte*) bitmap_gfx#2 ) + (byte*) bitmap_gfx#3 ← (byte*) bitmap_gfx#8 + (byte*) bitmap_screen#3 ← (byte*) bitmap_screen#8 + (byte) bitmap_clear::bgcol#0 ← (byte) BLACK#0 + (byte) bitmap_clear::fgcol#0 ← (byte) WHITE#0 + call bitmap_clear to:main::@10 main::@10: scope:[main] from main::@9 - (word) rem16u#27 ← phi( main::@9/(word) rem16u#33 ) - call bitmap_clear - to:main::@11 -main::@11: scope:[main] from main::@10 - (word) rem16u#23 ← phi( main::@10/(word) rem16u#27 ) + (byte*) bitmap_screen#26 ← phi( main::@9/(byte*) bitmap_screen#3 ) + (byte*) bitmap_gfx#27 ← phi( main::@9/(byte*) bitmap_gfx#3 ) + (word) rem16u#23 ← phi( main::@9/(word) rem16u#27 ) (signed word*) sin16s_gen2::sintab#1 ← (signed word[$200]) sin#0 (word) sin16s_gen2::wavelength#0 ← (word) SIN_SIZE#0 (signed word) sin16s_gen2::min#0 ← (number) -$140 (signed word) sin16s_gen2::max#0 ← (number) $140 call sin16s_gen2 - to:main::@12 -main::@12: scope:[main] from main::@11 - (word) rem16u#17 ← phi( main::@11/(word) rem16u#7 ) + to:main::@11 +main::@11: scope:[main] from main::@10 + (byte*) bitmap_screen#23 ← phi( main::@10/(byte*) bitmap_screen#26 ) + (byte*) bitmap_gfx#24 ← phi( main::@10/(byte*) bitmap_gfx#27 ) + (word) rem16u#17 ← phi( main::@10/(word) rem16u#7 ) (word) rem16u#8 ← (word) rem16u#17 call render_sine - to:main::@13 -main::@13: scope:[main] from main::@12 - (word) rem16u#28 ← phi( main::@12/(word) rem16u#8 ) + to:main::@12 +main::@12: scope:[main] from main::@11 + (word) rem16u#28 ← phi( main::@11/(word) rem16u#8 ) + (byte*) bitmap_screen#18 ← phi( main::@11/(byte*) bitmap_screen#23 ) + (byte*) bitmap_gfx#19 ← phi( main::@11/(byte*) bitmap_gfx#24 ) to:main::@1 -main::@1: scope:[main] from main::@13 main::@2 - (word) rem16u#24 ← phi( main::@13/(word) rem16u#28 main::@2/(word) rem16u#29 ) +main::@1: scope:[main] from main::@12 main::@2 + (word) rem16u#24 ← phi( main::@12/(word) rem16u#28 main::@2/(word) rem16u#29 ) + (byte*) bitmap_screen#13 ← phi( main::@12/(byte*) bitmap_screen#18 main::@2/(byte*) bitmap_screen#19 ) + (byte*) bitmap_gfx#14 ← phi( main::@12/(byte*) bitmap_gfx#19 main::@2/(byte*) bitmap_gfx#20 ) if(true) goto main::@2 to:main::@return main::@2: scope:[main] from main::@1 (word) rem16u#29 ← phi( main::@1/(word) rem16u#24 ) + (byte*) bitmap_screen#19 ← phi( main::@1/(byte*) bitmap_screen#13 ) + (byte*) bitmap_gfx#20 ← phi( main::@1/(byte*) bitmap_gfx#14 ) *((byte*) BGCOL#0) ← ++ *((byte*) BGCOL#0) to:main::@1 main::@return: scope:[main] from main::@1 (word) rem16u#18 ← phi( main::@1/(word) rem16u#24 ) + (byte*) bitmap_screen#9 ← phi( main::@1/(byte*) bitmap_screen#13 ) + (byte*) bitmap_gfx#9 ← phi( main::@1/(byte*) bitmap_gfx#14 ) + (byte*) bitmap_gfx#4 ← (byte*) bitmap_gfx#9 + (byte*) bitmap_screen#4 ← (byte*) bitmap_screen#9 (word) rem16u#9 ← (word) rem16u#18 return to:@return -render_sine: scope:[render_sine] from main::@12 +render_sine: scope:[render_sine] from main::@11 (word) render_sine::xpos#0 ← (number) 0 (word) render_sine::sin_idx#0 ← (number) 0 to:render_sine::@1 @@ -964,22 +1015,28 @@ wrap_y::@return: scope:[wrap_y] from wrap_y::@9 (byte) wrap_y::return#3 ← (byte) wrap_y::return#6 return to:@return -@35: scope:[] from @32 - (word) rem16u#25 ← phi( @32/(word) rem16u#30 ) +@34: scope:[] from @31 + (word) rem16u#25 ← phi( @31/(word) rem16u#30 ) + (byte*) bitmap_screen#14 ← phi( @31/(byte*) bitmap_screen#20 ) + (byte*) bitmap_gfx#15 ← phi( @31/(byte*) bitmap_gfx#21 ) call main - to:@36 -@36: scope:[] from @35 - (word) rem16u#19 ← phi( @35/(word) rem16u#9 ) + to:@35 +@35: scope:[] from @34 + (word) rem16u#19 ← phi( @34/(word) rem16u#9 ) + (byte*) bitmap_screen#10 ← phi( @34/(byte*) bitmap_screen#4 ) + (byte*) bitmap_gfx#10 ← phi( @34/(byte*) bitmap_gfx#4 ) + (byte*) bitmap_gfx#5 ← (byte*) bitmap_gfx#10 + (byte*) bitmap_screen#5 ← (byte*) bitmap_screen#10 (word) rem16u#10 ← (word) rem16u#19 to:@end -@end: scope:[] from @36 +@end: scope:[] from @35 SYMBOL TABLE SSA (label) @17 -(label) @29 -(label) @32 +(label) @28 +(label) @31 +(label) @34 (label) @35 -(label) @36 (label) @6 (label) @begin (label) @end @@ -987,6 +1044,8 @@ SYMBOL TABLE SSA (byte*) BGCOL#0 (byte*) BITMAP (byte*) BITMAP#0 +(byte) BLACK +(byte) BLACK#0 (byte*) CIA2_PORT_A (byte*) CIA2_PORT_A#0 (byte*) CIA2_PORT_A_DDR @@ -1026,31 +1085,57 @@ SYMBOL TABLE SSA (byte) VIC_RSEL#0 (byte) WHITE (byte) WHITE#0 -(void()) bitmap_clear() -(byte*~) bitmap_clear::$0 -(bool~) bitmap_clear::$1 -(bool~) bitmap_clear::$2 +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) +(number~) bitmap_clear::$0 +(number~) bitmap_clear::$1 (label) bitmap_clear::@1 (label) bitmap_clear::@2 -(label) bitmap_clear::@3 (label) bitmap_clear::@return -(byte*) bitmap_clear::bitmap -(byte*) bitmap_clear::bitmap#0 -(byte*) bitmap_clear::bitmap#1 -(byte*) bitmap_clear::bitmap#2 -(byte*) bitmap_clear::bitmap#3 -(byte*) bitmap_clear::bitmap#4 -(byte) bitmap_clear::x -(byte) bitmap_clear::x#0 -(byte) bitmap_clear::x#1 -(byte) bitmap_clear::x#2 -(byte) bitmap_clear::y -(byte) bitmap_clear::y#0 -(byte) bitmap_clear::y#1 -(byte) bitmap_clear::y#2 -(byte) bitmap_clear::y#3 -(byte) bitmap_clear::y#4 -(void()) bitmap_init((byte*) bitmap_init::bitmap) +(byte) bitmap_clear::bgcol +(byte) bitmap_clear::bgcol#0 +(byte) bitmap_clear::bgcol#1 +(byte) bitmap_clear::col +(byte) bitmap_clear::col#0 +(byte) bitmap_clear::fgcol +(byte) bitmap_clear::fgcol#0 +(byte) bitmap_clear::fgcol#1 +(byte*) bitmap_gfx +(byte*) bitmap_gfx#0 +(byte*) bitmap_gfx#1 +(byte*) bitmap_gfx#10 +(byte*) bitmap_gfx#11 +(byte*) bitmap_gfx#12 +(byte*) bitmap_gfx#13 +(byte*) bitmap_gfx#14 +(byte*) bitmap_gfx#15 +(byte*) bitmap_gfx#16 +(byte*) bitmap_gfx#17 +(byte*) bitmap_gfx#18 +(byte*) bitmap_gfx#19 +(byte*) bitmap_gfx#2 +(byte*) bitmap_gfx#20 +(byte*) bitmap_gfx#21 +(byte*) bitmap_gfx#22 +(byte*) bitmap_gfx#23 +(byte*) bitmap_gfx#24 +(byte*) bitmap_gfx#25 +(byte*) bitmap_gfx#26 +(byte*) bitmap_gfx#27 +(byte*) bitmap_gfx#28 +(byte*) bitmap_gfx#29 +(byte*) bitmap_gfx#3 +(byte*) bitmap_gfx#30 +(byte*) bitmap_gfx#31 +(byte*) bitmap_gfx#32 +(byte*) bitmap_gfx#33 +(byte*) bitmap_gfx#34 +(byte*) bitmap_gfx#4 +(byte*) bitmap_gfx#5 +(byte*) bitmap_gfx#6 +(byte*) bitmap_gfx#7 +(byte*) bitmap_gfx#8 +(byte*) bitmap_gfx#9 +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) (bool~) bitmap_init::$0 (bool~) bitmap_init::$1 (byte*~) bitmap_init::$10 @@ -1071,19 +1156,22 @@ SYMBOL TABLE SSA (label) bitmap_init::@6 (label) bitmap_init::@7 (label) bitmap_init::@return -(byte*) bitmap_init::bitmap -(byte*) bitmap_init::bitmap#0 -(byte*) bitmap_init::bitmap#1 -(byte*) bitmap_init::bitmap#2 -(byte*) bitmap_init::bitmap#3 -(byte*) bitmap_init::bitmap#4 -(byte*) bitmap_init::bitmap#5 (byte) bitmap_init::bits (byte) bitmap_init::bits#0 (byte) bitmap_init::bits#1 (byte) bitmap_init::bits#2 (byte) bitmap_init::bits#3 (byte) bitmap_init::bits#4 +(byte*) bitmap_init::gfx +(byte*) bitmap_init::gfx#0 +(byte*) bitmap_init::gfx#1 +(byte*) bitmap_init::gfx#2 +(byte*) bitmap_init::gfx#3 +(byte*) bitmap_init::gfx#4 +(byte*) bitmap_init::gfx#5 +(byte*) bitmap_init::screen +(byte*) bitmap_init::screen#0 +(byte*) bitmap_init::screen#1 (byte) bitmap_init::x (byte) bitmap_init::x#0 (byte) bitmap_init::x#1 @@ -1124,6 +1212,41 @@ SYMBOL TABLE SSA (byte[$100]) bitmap_plot_yhi#0 (byte[$100]) bitmap_plot_ylo (byte[$100]) bitmap_plot_ylo#0 +(byte*) bitmap_screen +(byte*) bitmap_screen#0 +(byte*) bitmap_screen#1 +(byte*) bitmap_screen#10 +(byte*) bitmap_screen#11 +(byte*) bitmap_screen#12 +(byte*) bitmap_screen#13 +(byte*) bitmap_screen#14 +(byte*) bitmap_screen#15 +(byte*) bitmap_screen#16 +(byte*) bitmap_screen#17 +(byte*) bitmap_screen#18 +(byte*) bitmap_screen#19 +(byte*) bitmap_screen#2 +(byte*) bitmap_screen#20 +(byte*) bitmap_screen#21 +(byte*) bitmap_screen#22 +(byte*) bitmap_screen#23 +(byte*) bitmap_screen#24 +(byte*) bitmap_screen#25 +(byte*) bitmap_screen#26 +(byte*) bitmap_screen#27 +(byte*) bitmap_screen#28 +(byte*) bitmap_screen#29 +(byte*) bitmap_screen#3 +(byte*) bitmap_screen#30 +(byte*) bitmap_screen#31 +(byte*) bitmap_screen#32 +(byte*) bitmap_screen#33 +(byte*) bitmap_screen#4 +(byte*) bitmap_screen#5 +(byte*) bitmap_screen#6 +(byte*) bitmap_screen#7 +(byte*) bitmap_screen#8 +(byte*) bitmap_screen#9 (dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) (word~) div32u16u::$0 (word~) div32u16u::$1 @@ -1240,7 +1363,6 @@ SYMBOL TABLE SSA (label) main::@10 (label) main::@11 (label) main::@12 -(label) main::@13 (label) main::@2 (label) main::@7 (label) main::@8 @@ -1303,8 +1425,9 @@ SYMBOL TABLE SSA (byte) main::vicSelectGfxBank1_toDd001_return#2 (byte) main::vicSelectGfxBank1_toDd001_return#3 (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) -(void*~) memset::$0 -(bool~) memset::$1 +(byte*~) memset::$0 +(byte*~) memset::$1 +(bool~) memset::$2 (label) memset::@1 (label) memset::@2 (label) memset::@return @@ -1312,6 +1435,7 @@ SYMBOL TABLE SSA (byte) memset::c#0 (byte) memset::c#1 (byte) memset::c#2 +(byte) memset::c#3 (byte*) memset::dst (byte*) memset::dst#0 (byte*) memset::dst#1 @@ -1322,16 +1446,19 @@ SYMBOL TABLE SSA (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::return#4 (void*) memset::str (void*) memset::str#0 (void*) memset::str#1 (void*) memset::str#2 (void*) memset::str#3 +(void*) memset::str#4 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$0 (word~) mul16s::$1 @@ -1513,7 +1640,6 @@ SYMBOL TABLE SSA (word) rem16u#40 (word) rem16u#41 (word) rem16u#42 -(word) rem16u#43 (word) rem16u#5 (word) rem16u#6 (word) rem16u#7 @@ -1757,7 +1883,6 @@ SYMBOL TABLE SSA (signed word) wrap_y::y#9 Fixing inline constructor with div32u16u::$4 ← (word)div32u16u::quotient_hi#1 dw= (word)div32u16u::quotient_lo#0 -Fixing inline constructor with bitmap_clear::$3 ← (byte)*(bitmap_plot_yhi#0 + 0) w= (byte)*(bitmap_plot_ylo#0 + 0) Fixing inline constructor with bitmap_plot::$3 ← (byte)*(bitmap_plot_yhi#0 + bitmap_plot::y#2) w= (byte)*(bitmap_plot_ylo#0 + bitmap_plot::y#2) Successful SSA optimization Pass2FixInlineConstructorsNew Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 @@ -1766,6 +1891,7 @@ Adding number conversion cast (unumber) $20 in (byte) VIC_BMM#0 ← (number) $20 Adding number conversion cast (unumber) $10 in (byte) VIC_DEN#0 ← (number) $10 Adding number conversion cast (unumber) 8 in (byte) VIC_RSEL#0 ← (number) 8 Adding number conversion cast (unumber) 8 in (byte) VIC_CSEL#0 ← (number) 8 +Adding number conversion cast (unumber) 0 in (byte) BLACK#0 ← (number) 0 Adding number conversion cast (unumber) 1 in (byte) WHITE#0 ← (number) 1 Adding number conversion cast (unumber) 0 in (word) rem16u#0 ← (number) 0 Adding number conversion cast (unumber) 0 in (word) divr16u::quotient#0 ← (number) 0 @@ -1815,9 +1941,10 @@ Adding number conversion cast (unumber) 7 in (number~) bitmap_init::$7 ← (byte Adding number conversion cast (unumber) bitmap_init::$7 in (number~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (unumber)(number) 7 Adding number conversion cast (unumber) 7 in (bool~) bitmap_init::$8 ← (unumber~) bitmap_init::$7 == (number) 7 Adding number conversion cast (unumber) $28*8 in (byte*~) bitmap_init::$10 ← (byte*) bitmap_init::yoffs#3 + (number) $28*(number) 8 -Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_yhi#0 + (number) 0) w= (byte)*((byte[$100]) bitmap_plot_ylo#0 + (number) 0) -Adding number conversion cast (unumber) 0 in (var) bitmap_clear::$3 ← (byte)*((byte[$100]) bitmap_plot_yhi#0 + (unumber)(number) 0) w= (byte)*((byte[$100]) bitmap_plot_ylo#0 + (number) 0) -Adding number conversion cast (unumber) 0 in *((byte*) bitmap_clear::bitmap#2) ← (number) 0 +Adding number conversion cast (unumber) $10 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (number) $10 +Adding number conversion cast (unumber) bitmap_clear::$0 in (number~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (unumber)(number) $10 +Adding number conversion cast (unumber) bitmap_clear::$1 in (number~) bitmap_clear::$1 ← (unumber~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 +Adding number conversion cast (unumber) 0 in (byte) memset::c#1 ← (number) 0 Adding number conversion cast (unumber) $fff8 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (number) $fff8 Adding number conversion cast (unumber) bitmap_plot::$1 in (number~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (unumber)(number) $fff8 Adding number conversion cast (unumber) $200 in (word) SIN_SIZE#0 ← (number) $200 @@ -1838,7 +1965,6 @@ Adding number conversion cast (unumber) main::toD0181_$6#0 in (number~) main::to Adding number conversion cast (unumber) $f in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (number) $f Adding number conversion cast (unumber) main::toD0181_$7#0 in (number~) main::toD0181_$7#0 ← (unumber~) main::toD0181_$6#0 & (unumber)(number) $f Adding number conversion cast (unumber) main::toD0181_$8#0 in (number~) main::toD0181_$8#0 ← (unumber~) main::toD0181_$3#0 | (unumber~) main::toD0181_$7#0 -Adding number conversion cast (unumber) $3e8 in (word) memset::num#0 ← (number) $3e8 Adding number conversion cast (snumber) -$140 in (signed word) sin16s_gen2::min#0 ← (number) -$140 Adding number conversion cast (snumber) $140 in (signed word) sin16s_gen2::max#0 ← (number) $140 Adding number conversion cast (unumber) 0 in (word) render_sine::xpos#0 ← (number) 0 @@ -1866,6 +1992,7 @@ Inlining cast (byte) VIC_CSEL#0 ← (unumber)(number) 8 Inlining cast (byte*) D018#0 ← (byte*)(number) $d018 Inlining cast (byte*) CIA2_PORT_A#0 ← (byte*)(number) $dd00 Inlining cast (byte*) CIA2_PORT_A_DDR#0 ← (byte*)(number) $dd02 +Inlining cast (byte) BLACK#0 ← (unumber)(number) 0 Inlining cast (byte) WHITE#0 ← (unumber)(number) 1 Inlining cast (word) rem16u#0 ← (unumber)(number) 0 Inlining cast (word) divr16u::quotient#0 ← (unumber)(number) 0 @@ -1892,11 +2019,11 @@ Inlining cast (byte) mulu16_sel::select#3 ← (unumber)(number) 0 Inlining cast (byte) mulu16_sel::select#4 ← (unumber)(number) 0 Inlining cast (signed word~) sin16s::$14 ← (signed word)(word) sin16s::usinx#1 Inlining cast (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#3 -Inlining cast (byte*) memset::end#0 ← (byte*)(void*~) memset::$0 -Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#1 +Inlining cast (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 +Inlining cast (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 Inlining cast (byte) bitmap_init::bits#0 ← (unumber)(number) $80 Inlining cast (byte) bitmap_init::bits#2 ← (unumber)(number) $80 -Inlining cast *((byte*) bitmap_clear::bitmap#2) ← (unumber)(number) 0 +Inlining cast (byte) memset::c#1 ← (unumber)(number) 0 Inlining cast (byte*) SCREEN#0 ← (byte*)(number) $400 Inlining cast (byte*) BITMAP#0 ← (byte*)(number) $2000 Inlining cast (word) SIN_SIZE#0 ← (unumber)(number) $200 @@ -1905,7 +2032,6 @@ Inlining cast *((byte*) CIA2_PORT_A_DDR#0) ← (unumber)(number) 3 Inlining cast (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(byte*) main::vicSelectGfxBank1_toDd001_gfx#1 Inlining cast (word~) main::toD0181_$0#0 ← (word)(byte*) main::toD0181_screen#1 Inlining cast (word~) main::toD0181_$4#0 ← (word)(byte*) main::toD0181_gfx#1 -Inlining cast (word) memset::num#0 ← (unumber)(number) $3e8 Inlining cast (signed word) sin16s_gen2::min#0 ← (snumber)(number) -$140 Inlining cast (signed word) sin16s_gen2::max#0 ← (snumber)(number) $140 Inlining cast (word) render_sine::xpos#0 ← (unumber)(number) 0 @@ -1927,6 +2053,7 @@ Simplifying constant integer cast 8 Simplifying constant pointer cast (byte*) 53272 Simplifying constant pointer cast (byte*) 56576 Simplifying constant pointer cast (byte*) 56578 +Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 0 @@ -1970,10 +2097,7 @@ Simplifying constant integer cast $80 Simplifying constant integer cast 7 Simplifying constant integer cast 7 Simplifying constant integer cast 7 -Simplifying constant integer cast *((byte[$100]) bitmap_plot_yhi#0 + (unumber)(number) 0) -Simplifying constant integer cast 0 -Simplifying constant integer cast *((byte[$100]) bitmap_plot_ylo#0 + (unumber)(number) 0) -Simplifying constant integer cast 0 +Simplifying constant integer cast $10 Simplifying constant integer cast 0 Simplifying constant integer cast *((byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) Simplifying constant integer cast *((byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) @@ -1990,7 +2114,6 @@ Simplifying constant integer cast $3fff Simplifying constant integer cast 4 Simplifying constant integer cast 4 Simplifying constant integer cast $f -Simplifying constant integer cast $3e8 Simplifying constant integer cast -$140 Simplifying constant integer cast $140 Simplifying constant integer cast 0 @@ -2009,6 +2132,7 @@ Finalized unsigned number type (byte) $20 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 @@ -2050,8 +2174,7 @@ Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) 7 Finalized unsigned number type (byte) 7 Finalized unsigned number type (byte) 7 -Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 0 Finalized unsigned number type (word) $fff8 Finalized unsigned number type (word) $200 @@ -2063,7 +2186,6 @@ 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 (word) $3e8 Finalized signed number type (signed word) -$140 Finalized signed number type (signed word) $140 Finalized unsigned number type (byte) 0 @@ -2082,6 +2204,8 @@ Inferred type updated to byte in (unumber~) mul16u::$1 ← (word) mul16u::a#4 & Inferred type updated to byte in (unumber~) bitmap_init::$3 ← (byte) bitmap_init::y#2 & (byte) 7 Inferred type updated to byte in (unumber~) bitmap_init::$5 ← (byte~) bitmap_init::$3 | (byte~) bitmap_init::$4 Inferred type updated to byte in (unumber~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Inferred type updated to byte in (unumber~) bitmap_clear::$0 ← (byte) bitmap_clear::fgcol#1 * (byte) $10 +Inferred type updated to byte in (unumber~) bitmap_clear::$1 ← (byte~) bitmap_clear::$0 + (byte) bitmap_clear::bgcol#1 Inferred type updated to word in (unumber~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 Inferred type updated to byte in (unumber~) main::$2 ← (byte~) main::$1 | (byte) 3 Inferred type updated to byte in (unumber~) main::vicSelectGfxBank1_toDd001_$2#0 ← (byte~) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40 @@ -2093,20 +2217,19 @@ Inferred type updated to byte in (unumber~) main::toD0181_$6#0 ← (byte~) main: Inferred type updated to byte in (unumber~) main::toD0181_$7#0 ← (byte~) main::toD0181_$6#0 & (byte) $f Inferred type updated to byte in (unumber~) main::toD0181_$8#0 ← (byte~) main::toD0181_$3#0 | (byte~) main::toD0181_$7#0 Inferred type updated to signed word in (snumber~) render_sine::$4 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -Adding pointer type conversion cast (byte*) bitmap_clear::$0 in (byte*~) bitmap_clear::$0 ← (word~) bitmap_clear::$3 Adding pointer type conversion cast (byte*) bitmap_plot::$0 in (byte*~) bitmap_plot::$0 ← (word~) bitmap_plot::$3 Successful SSA optimization PassNAddTypeConversionAssignment -Inversing boolean not [25] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte) 0 from [24] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte) 0 -Inversing boolean not [33] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [32] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 -Inversing boolean not [90] (bool~) mul16u::$3 ← (byte~) mul16u::$1 == (byte) 0 from [89] (bool~) mul16u::$2 ← (byte~) mul16u::$1 != (byte) 0 -Inversing boolean not [116] (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (signed byte) 0 from [115] (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (signed byte) 0 -Inversing boolean not [120] (bool~) mul16s::$6 ← (signed word) mul16s::b#2 >= (signed byte) 0 from [119] (bool~) mul16s::$5 ← (signed word) mul16s::b#2 < (signed byte) 0 -Inversing boolean not [188] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [187] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 -Inversing boolean not [192] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [191] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 -Inversing boolean not [251] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [250] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 -Inversing boolean not [303] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [302] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 -Inversing boolean not [323] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [322] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 -Inversing boolean not [468] (bool~) render_sine::$8 ← (word) render_sine::xpos#1 != (word) $140 from [467] (bool~) render_sine::$7 ← (word) render_sine::xpos#1 == (word) $140 +Inversing boolean not [26] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte) 0 from [25] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte) 0 +Inversing boolean not [34] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [33] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [91] (bool~) mul16u::$3 ← (byte~) mul16u::$1 == (byte) 0 from [90] (bool~) mul16u::$2 ← (byte~) mul16u::$1 != (byte) 0 +Inversing boolean not [117] (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (signed byte) 0 from [116] (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (signed byte) 0 +Inversing boolean not [121] (bool~) mul16s::$6 ← (signed word) mul16s::b#2 >= (signed byte) 0 from [120] (bool~) mul16s::$5 ← (signed word) mul16s::b#2 < (signed byte) 0 +Inversing boolean not [189] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [188] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [193] (bool~) sin16s::$3 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [192] (bool~) sin16s::$2 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [252] (bool~) sin16s::$16 ← (byte) sin16s::isUpper#2 == (byte) 0 from [251] (bool~) sin16s::$15 ← (byte) sin16s::isUpper#2 != (byte) 0 +Inversing boolean not [309] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte) 0 from [308] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte) 0 +Inversing boolean not [329] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte) 7 from [328] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte) 7 +Inversing boolean not [477] (bool~) render_sine::$8 ← (word) render_sine::xpos#1 != (word) $140 from [476] (bool~) render_sine::$7 ← (word) render_sine::xpos#1 == (word) $140 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2198,24 +2321,40 @@ Alias (signed word) sin16s::sinx#1 = (signed word~) sin16s::$20 Alias (dword) mul16u::return#3 = (dword) mul16u::return#6 Alias (byte) mulu16_sel::select#5 = (byte) mulu16_sel::select#6 Alias (word) mulu16_sel::return#12 = (word) mulu16_sel::return#5 (word~) mulu16_sel::$2 (word) mulu16_sel::return#6 -Alias (void*) memset::return#0 = (void*) memset::str#2 (void*) memset::str#3 (void*) memset::return#3 (void*) memset::return#1 +Alias (byte*) memset::end#0 = (byte*~) memset::$1 +Alias (void*) memset::return#0 = (void*) memset::str#3 (void*) memset::str#4 (void*) memset::return#4 (void*) memset::return#1 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 -Alias (byte*) bitmap_init::bitmap#3 = (byte*) bitmap_init::bitmap#4 -Alias (byte*) bitmap_init::bitmap#1 = (byte*) bitmap_init::bitmap#2 (byte*) bitmap_init::yoffs#0 +Alias (byte*) bitmap_init::gfx#4 = (byte*) bitmap_init::gfx#5 +Alias (byte*) bitmap_gfx#28 = (byte*) bitmap_gfx#29 +Alias (byte*) bitmap_screen#27 = (byte*) bitmap_screen#28 +Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#3 (byte*) bitmap_init::yoffs#0 +Alias (byte*) bitmap_gfx#22 = (byte*) bitmap_gfx#25 +Alias (byte*) bitmap_screen#21 = (byte*) bitmap_screen#24 Alias (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#3 Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#4 +Alias (byte*) bitmap_gfx#16 = (byte*) bitmap_gfx#17 +Alias (byte*) bitmap_screen#15 = (byte*) bitmap_screen#16 Alias (byte*) bitmap_init::yoffs#1 = (byte*~) bitmap_init::$10 -Alias (byte*) bitmap_clear::bitmap#0 = (byte*~) bitmap_clear::$0 -Alias (byte) bitmap_clear::y#2 = (byte) bitmap_clear::y#3 -Alias (byte*) bitmap_clear::bitmap#1 = (byte*) bitmap_clear::bitmap#4 +Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#6 (byte*) bitmap_gfx#2 +Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#6 (byte*) bitmap_screen#2 +Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$1 +Alias (byte*) bitmap_gfx#12 = (byte*) bitmap_gfx#7 Alias (byte*) bitmap_plot::plotter#0 = (byte*~) bitmap_plot::$0 +Alias (byte*) bitmap_gfx#0 = (byte*) bitmap_gfx#21 (byte*) bitmap_gfx#15 +Alias (byte*) bitmap_screen#0 = (byte*) bitmap_screen#20 (byte*) bitmap_screen#14 Alias (byte*) main::vicSelectGfxBank1_gfx#0 = (byte*) main::vicSelectGfxBank1_gfx#1 (byte*) main::vicSelectGfxBank1_toDd001_gfx#0 (byte*) main::vicSelectGfxBank1_toDd001_gfx#1 -Alias (word) rem16u#23 = (word) rem16u#42 (word) rem16u#43 (word) rem16u#41 (word) rem16u#40 (word) rem16u#39 (word) rem16u#38 (word) rem16u#37 (word) rem16u#36 (word) rem16u#35 (word) rem16u#33 (word) rem16u#27 +Alias (byte*) bitmap_gfx#13 = (byte*) bitmap_gfx#33 (byte*) bitmap_gfx#34 (byte*) bitmap_gfx#32 (byte*) bitmap_gfx#31 (byte*) bitmap_gfx#30 (byte*) bitmap_gfx#26 (byte*) bitmap_gfx#23 (byte*) bitmap_gfx#18 +Alias (byte*) bitmap_screen#12 = (byte*) bitmap_screen#32 (byte*) bitmap_screen#33 (byte*) bitmap_screen#31 (byte*) bitmap_screen#30 (byte*) bitmap_screen#29 (byte*) bitmap_screen#25 (byte*) bitmap_screen#22 (byte*) bitmap_screen#17 +Alias (word) rem16u#23 = (word) rem16u#41 (word) rem16u#42 (word) rem16u#40 (word) rem16u#39 (word) rem16u#38 (word) rem16u#37 (word) rem16u#36 (word) rem16u#35 (word) rem16u#33 (word) rem16u#27 Alias (byte) main::vicSelectGfxBank1_toDd001_return#0 = (byte~) main::vicSelectGfxBank1_toDd001_$3#0 (byte) main::vicSelectGfxBank1_toDd001_return#2 (byte) main::vicSelectGfxBank1_toDd001_return#1 (byte) main::vicSelectGfxBank1_toDd001_return#3 (byte~) main::vicSelectGfxBank1_$0#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#0 (byte) main::toD0181_return#2 (byte) main::toD0181_return#1 (byte) main::toD0181_return#3 (byte~) main::$4 +Alias (byte*) bitmap_gfx#19 = (byte*) bitmap_gfx#3 (byte*) bitmap_gfx#8 (byte*) bitmap_gfx#27 (byte*) bitmap_gfx#24 +Alias (byte*) bitmap_screen#18 = (byte*) bitmap_screen#3 (byte*) bitmap_screen#8 (byte*) bitmap_screen#26 (byte*) bitmap_screen#23 Alias (word) rem16u#17 = (word) rem16u#8 (word) rem16u#28 +Alias (byte*) bitmap_gfx#14 = (byte*) bitmap_gfx#20 (byte*) bitmap_gfx#9 (byte*) bitmap_gfx#4 +Alias (byte*) bitmap_screen#13 = (byte*) bitmap_screen#19 (byte*) bitmap_screen#9 (byte*) bitmap_screen#4 Alias (word) rem16u#18 = (word) rem16u#29 (word) rem16u#24 (word) rem16u#9 Alias (byte) wrap_y::return#0 = (byte) wrap_y::return#4 Alias (word) render_sine::xpos#3 = (word) render_sine::xpos#6 (word) render_sine::xpos#7 (word) render_sine::xpos#4 (word) render_sine::xpos#5 @@ -2227,6 +2366,8 @@ Alias (byte) render_sine::ypos2#0 = (byte~) render_sine::$5 Alias (signed word) wrap_y::y#4 = (signed word) wrap_y::y#5 Alias (signed word) wrap_y::y#6 = (signed word) wrap_y::y#7 (signed word) wrap_y::y#8 Alias (byte) wrap_y::return#2 = (byte~) wrap_y::$0 (byte) wrap_y::return#6 (byte) wrap_y::return#3 +Alias (byte*) bitmap_gfx#10 = (byte*) bitmap_gfx#5 +Alias (byte*) bitmap_screen#10 = (byte*) bitmap_screen#5 Alias (word) rem16u#10 = (word) rem16u#19 Successful SSA optimization Pass2AliasElimination Alias (word) divr16u::dividend#3 = (word) divr16u::dividend#4 @@ -2240,8 +2381,12 @@ Alias (signed word) mul16s::b#1 = (signed word) mul16s::b#2 Alias (signed word) mul16s::a#1 = (signed word) mul16s::a#3 Alias (byte) sin16s::isUpper#2 = (byte) sin16s::isUpper#8 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#3 -Alias (byte*) bitmap_init::bitmap#1 = (byte*) bitmap_init::bitmap#3 +Alias (byte*) bitmap_init::gfx#2 = (byte*) bitmap_init::gfx#4 +Alias (byte*) bitmap_gfx#22 = (byte*) bitmap_gfx#28 +Alias (byte*) bitmap_screen#21 = (byte*) bitmap_screen#27 Alias (byte) bitmap_init::y#2 = (byte) bitmap_init::y#3 +Alias (byte*) bitmap_gfx#11 = (byte*) bitmap_gfx#16 +Alias (byte*) bitmap_screen#11 = (byte*) bitmap_screen#15 Alias (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#4 Successful SSA optimization Pass2AliasElimination Self Phi Eliminated (word) divr16u::divisor#2 @@ -2250,11 +2395,16 @@ Self Phi Eliminated (signed word) sin16s_gen2::offs#1 Self Phi Eliminated (dword) sin16s_gen2::step#1 Self Phi Eliminated (word) sin16s_gen2::wavelength#2 Self Phi Eliminated (word) rem16u#16 -Self Phi Eliminated (byte) memset::c#1 +Self Phi Eliminated (byte) memset::c#2 Self Phi Eliminated (byte*) memset::end#1 Self Phi Eliminated (void*) memset::return#0 -Self Phi Eliminated (byte*) bitmap_init::bitmap#1 -Self Phi Eliminated (byte) bitmap_clear::y#2 +Self Phi Eliminated (byte*) bitmap_init::gfx#2 +Self Phi Eliminated (byte*) bitmap_gfx#22 +Self Phi Eliminated (byte*) bitmap_screen#21 +Self Phi Eliminated (byte*) bitmap_gfx#11 +Self Phi Eliminated (byte*) bitmap_screen#11 +Self Phi Eliminated (byte*) bitmap_gfx#14 +Self Phi Eliminated (byte*) bitmap_screen#13 Self Phi Eliminated (word) rem16u#18 Successful SSA optimization Pass2SelfPhiElimination Identical Phi Values (word) divr16u::divisor#2 (word) divr16u::divisor#6 @@ -2277,50 +2427,61 @@ Identical Phi Values (dword) sin16s_gen2::step#1 (dword) sin16s_gen2::step#0 Identical Phi Values (word) sin16s_gen2::wavelength#2 (word) sin16s_gen2::wavelength#1 Identical Phi Values (word) rem16u#16 (word) rem16u#15 Identical Phi Values (dword) sin16s::x#3 (dword) sin16s::x#0 -Identical Phi Values (void*) memset::str#1 (void*) memset::str#0 -Identical Phi Values (word) memset::num#1 (word) memset::num#0 -Identical Phi Values (byte) memset::c#2 (byte) memset::c#0 -Identical Phi Values (byte) memset::c#1 (byte) memset::c#2 +Identical Phi Values (byte) memset::c#2 (byte) memset::c#3 Identical Phi Values (byte*) memset::end#1 (byte*) memset::end#0 -Identical Phi Values (void*) memset::return#0 (void*) memset::str#1 -Identical Phi Values (byte*) bitmap_init::bitmap#5 (byte*) bitmap_init::bitmap#0 -Identical Phi Values (byte*) bitmap_init::bitmap#1 (byte*) bitmap_init::bitmap#5 -Identical Phi Values (byte) bitmap_clear::y#2 (byte) bitmap_clear::y#4 +Identical Phi Values (void*) memset::return#0 (void*) memset::str#2 +Identical Phi Values (byte*) bitmap_init::gfx#1 (byte*) bitmap_init::gfx#0 +Identical Phi Values (byte*) bitmap_init::screen#1 (byte*) bitmap_init::screen#0 +Identical Phi Values (byte*) bitmap_init::gfx#2 (byte*) bitmap_init::gfx#1 +Identical Phi Values (byte*) bitmap_gfx#22 (byte*) bitmap_gfx#1 +Identical Phi Values (byte*) bitmap_screen#21 (byte*) bitmap_screen#1 +Identical Phi Values (byte*) bitmap_gfx#11 (byte*) bitmap_gfx#22 +Identical Phi Values (byte*) bitmap_screen#11 (byte*) bitmap_screen#21 +Identical Phi Values (byte) bitmap_clear::fgcol#1 (byte) bitmap_clear::fgcol#0 +Identical Phi Values (byte) bitmap_clear::bgcol#1 (byte) bitmap_clear::bgcol#0 +Identical Phi Values (byte*) bitmap_screen#7 (byte*) bitmap_screen#18 +Identical Phi Values (byte*) bitmap_gfx#12 (byte*) bitmap_gfx#19 +Identical Phi Values (byte*) bitmap_gfx#13 (byte*) bitmap_gfx#0 +Identical Phi Values (byte*) bitmap_screen#12 (byte*) bitmap_screen#0 Identical Phi Values (word) rem16u#23 (word) rem16u#0 +Identical Phi Values (byte*) bitmap_gfx#19 (byte*) bitmap_gfx#11 +Identical Phi Values (byte*) bitmap_screen#18 (byte*) bitmap_screen#11 Identical Phi Values (word) rem16u#17 (word) rem16u#16 +Identical Phi Values (byte*) bitmap_gfx#14 (byte*) bitmap_gfx#19 +Identical Phi Values (byte*) bitmap_screen#13 (byte*) bitmap_screen#18 Identical Phi Values (word) rem16u#18 (word) rem16u#17 +Identical Phi Values (byte*) bitmap_gfx#10 (byte*) bitmap_gfx#14 +Identical Phi Values (byte*) bitmap_screen#10 (byte*) bitmap_screen#13 Identical Phi Values (word) rem16u#10 (word) rem16u#18 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [321] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 +Identified duplicate assignment right side [327] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) divr16u::$4 [26] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [34] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [41] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [86] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [91] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 [117] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$6 [121] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$10 [181] if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -Simple Condition (bool~) sin16s::$1 [189] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [193] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [252] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$1 [286] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -Simple Condition (bool~) bitmap_init::$1 [304] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [308] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [324] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [328] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_clear::$1 [344] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 [348] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 -Simple Condition (bool~) render_sine::$8 [469] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@2 -Simple Condition (bool~) render_sine::$9 [473] if((word) render_sine::sin_idx#1<(word) SIN_SIZE#0) goto render_sine::@1 -Simple Condition (bool~) wrap_y::$1 [480] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -Simple Condition (bool~) wrap_y::$2 [485] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8 +Simple Condition (bool~) divr16u::$4 [27] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [35] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [42] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [87] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [92] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [118] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [122] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$10 [182] if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 +Simple Condition (bool~) sin16s::$1 [190] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [194] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [253] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$2 [288] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 +Simple Condition (bool~) bitmap_init::$1 [310] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [314] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [330] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [334] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) render_sine::$8 [478] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@2 +Simple Condition (bool~) render_sine::$9 [482] if((word) render_sine::sin_idx#1<(word) SIN_SIZE#0) goto render_sine::@1 +Simple Condition (bool~) wrap_y::$1 [489] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 +Simple Condition (bool~) wrap_y::$2 [494] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [219] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [293] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } -Constant right-side identified [294] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } -Constant right-side identified [295] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } -Constant right-side identified [363] (signed word[$200]) sin#0 ← { fill( $200, 0) } +Constant right-side identified [220] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [297] (byte[$100]) bitmap_plot_ylo#0 ← { fill( $100, 0) } +Constant right-side identified [298] (byte[$100]) bitmap_plot_yhi#0 ← { fill( $100, 0) } +Constant right-side identified [299] (byte[$100]) bitmap_plot_bit#0 ← { fill( $100, 0) } +Constant right-side identified [371] (signed word[$200]) sin#0 ← { fill( $200, 0) } Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2336,6 +2497,7 @@ Constant (const byte) VIC_CSEL#0 = 8 Constant (const byte*) D018#0 = (byte*) 53272 Constant (const byte*) CIA2_PORT_A#0 = (byte*) 56576 Constant (const byte*) CIA2_PORT_A_DDR#0 = (byte*) 56578 +Constant (const byte) BLACK#0 = 0 Constant (const byte) WHITE#0 = 1 Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2355,6 +2517,8 @@ Constant (const word) mulu16_sel::v2#2 = (unumber)$10000/6 Constant (const byte) mulu16_sel::select#2 = 1 Constant (const byte) mulu16_sel::select#3 = 0 Constant (const byte) mulu16_sel::select#4 = 0 +Constant (const byte*) bitmap_screen#0 = (byte*) 0 +Constant (const byte*) bitmap_gfx#0 = (byte*) 0 Constant (const byte[$100]) bitmap_plot_ylo#0 = { fill( $100, 0) } Constant (const byte[$100]) bitmap_plot_yhi#0 = { fill( $100, 0) } Constant (const byte[$100]) bitmap_plot_bit#0 = { fill( $100, 0) } @@ -2362,14 +2526,14 @@ Constant (const byte) bitmap_init::bits#0 = $80 Constant (const byte) bitmap_init::x#0 = 0 Constant (const byte) bitmap_init::bits#2 = $80 Constant (const byte) bitmap_init::y#0 = 0 -Constant (const byte) bitmap_clear::y#0 = 0 -Constant (const byte) bitmap_clear::x#0 = 0 +Constant (const word) memset::num#0 = $3e8 +Constant (const byte) memset::c#1 = 0 +Constant (const word) memset::num#1 = $1f40 Constant (const byte*) SCREEN#0 = (byte*) 1024 Constant (const byte*) BITMAP#0 = (byte*) 8192 Constant (const word) SIN_SIZE#0 = $200 Constant (const signed word[$200]) sin#0 = { fill( $200, 0) } Constant (const signed word*) sin2#0 = (signed word*) 5120 -Constant (const word) memset::num#0 = $3e8 Constant (const signed word) sin16s_gen2::min#0 = -$140 Constant (const signed word) sin16s_gen2::max#0 = $140 Constant (const word) render_sine::xpos#0 = 0 @@ -2380,83 +2544,86 @@ Constant (const dword) div32u16u::dividend#0 = PI2_u4f28#0 Constant (const byte*) main::vicSelectGfxBank1_gfx#0 = SCREEN#0 Constant (const byte*) main::toD0181_screen#0 = SCREEN#0 Constant (const byte*) main::toD0181_gfx#0 = BITMAP#0 -Constant (const byte) memset::c#0 = WHITE#0 -Constant (const byte*) bitmap_init::bitmap#0 = BITMAP#0 +Constant (const byte*) bitmap_init::gfx#0 = BITMAP#0 +Constant (const byte*) bitmap_init::screen#0 = SCREEN#0 +Constant (const byte) bitmap_clear::bgcol#0 = BLACK#0 +Constant (const byte) bitmap_clear::fgcol#0 = WHITE#0 Constant (const signed word*) sin16s_gen2::sintab#1 = sin#0 Constant (const word) sin16s_gen2::wavelength#0 = SIN_SIZE#0 Successful SSA optimization Pass2ConstantIdentification Constant (const word) div32u16u::divisor#0 = sin16s_gen2::wavelength#0 +Constant (const byte*) bitmap_gfx#1 = bitmap_init::gfx#0 +Constant (const byte*) bitmap_screen#1 = bitmap_init::screen#0 Successful SSA optimization Pass2ConstantIdentification Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0 Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (word)main::vicSelectGfxBank1_gfx#0 in [379] (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(const byte*) main::vicSelectGfxBank1_gfx#0 -Constant value identified (word)main::toD0181_screen#0 in [394] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 -Constant value identified (word)main::toD0181_gfx#0 in [398] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 -Constant value identified (void*)SCREEN#0 in [409] (void*) memset::str#0 ← (void*)(const byte*) SCREEN#0 +Constant value identified (void*)bitmap_screen#1 in [346] (void*) memset::str#0 ← (void*)(const byte*) bitmap_screen#1 +Constant value identified (void*)bitmap_gfx#1 in [352] (void*) memset::str#1 ← (void*)(const byte*) bitmap_gfx#1 +Constant value identified (word)main::vicSelectGfxBank1_gfx#0 in [387] (word~) main::vicSelectGfxBank1_toDd001_$0#0 ← (word)(const byte*) main::vicSelectGfxBank1_gfx#0 +Constant value identified (word)main::toD0181_screen#0 in [402] (word~) main::toD0181_$0#0 ← (word)(const byte*) main::toD0181_screen#0 +Constant value identified (word)main::toD0181_gfx#0 in [406] (word~) main::toD0181_$4#0 ← (word)(const byte*) main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [430] if(true) goto main::@2 +if() condition always true - replacing block destination [437] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [39] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [41] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [306] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [308] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [326] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [328] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [342] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ -Resolved ranged comparison value [344] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 -Resolved ranged next value [346] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ -Resolved ranged comparison value [348] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 -Simplifying expression containing zero bitmap_plot_yhi#0 in [333] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) 0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) 0) -Simplifying expression containing zero bitmap_plot_ylo#0 in [333] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) 0) +Resolved ranged next value [40] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [42] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [312] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [314] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [332] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [334] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [344] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (void*) memset::return#2 and assignment [207] (void*) memset::return#2 ← (void*) memset::str#0 +Eliminating unused variable (void*) memset::return#2 and assignment [167] (void*) memset::return#2 ← (void*) memset::str#2 +Eliminating unused variable (void*) memset::return#3 and assignment [170] (void*) memset::return#3 ← (void*) memset::str#2 +Eliminating unused constant (const byte) bitmap_clear::bgcol#0 Eliminating unused constant (const word) rem16u#0 +Eliminating unused constant (const byte*) bitmap_screen#0 +Eliminating unused constant (const byte*) bitmap_gfx#0 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const byte) BLACK#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::x#1!=(number) 0) goto bitmap_init::@1 Adding number conversion cast (unumber) 0 in if((byte) bitmap_init::y#1!=(number) 0) goto bitmap_init::@5 -Adding number conversion cast (unumber) $c8 in if((byte) bitmap_clear::x#1!=(number) $c8) goto bitmap_clear::@2 -Adding number conversion cast (unumber) $28 in if((byte) bitmap_clear::y#1!=(number) $28) goto bitmap_clear::@1 Successful SSA optimization PassNAddNumberTypeConversions -Inlining cast (byte*) bitmap_clear::bitmap#0 ← (byte*)(word~) bitmap_clear::$3 Inlining cast (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 Successful SSA optimization Pass2InlineCast Simplifying constant integer cast $10 Simplifying constant integer cast 0 Simplifying constant integer cast 0 -Simplifying constant integer cast $c8 -Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) $c8 -Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 +Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [58] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [184] (byte~) main::$0 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 +Constant right-side identified [162] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [182] (byte~) main::$0 ← (const byte) VIC_BMM#0 | (const byte) VIC_DEN#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = =(signed byte) 0) goto mul16s::@2 Successful SSA optimization Pass2ConstantIfs @@ -2470,32 +2637,26 @@ Successful SSA optimization Pass2EliminateUnusedBlocks Alias (dword) mul16s::m#4 = (dword) mul16s::m#5 Successful SSA optimization Pass2AliasElimination Constant right-side identified [51] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 -Constant right-side identified [123] (void*~) memset::$0 ← (const void*) memset::str#0 + (const word) memset::num#0 -Constant right-side identified [174] (byte~) main::$1 ← (const byte) main::$0 | (const byte) VIC_RSEL#0 -Constant right-side identified [178] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0 -Constant right-side identified [183] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff -Constant right-side identified [186] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 +Constant right-side identified [167] (byte~) main::$1 ← (const byte) main::$0 | (const byte) VIC_RSEL#0 +Constant right-side identified [171] (byte~) main::vicSelectGfxBank1_toDd001_$1#0 ← > (const word) main::vicSelectGfxBank1_toDd001_$0#0 +Constant right-side identified [176] (word~) main::toD0181_$1#0 ← (const word) main::toD0181_$0#0 & (word) $3fff +Constant right-side identified [179] (byte~) main::toD0181_$5#0 ← > (const word) main::toD0181_$4#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) mul16u::b#0 = (word)mul16s::b#0 Constant (const word) mul16s::$10 = (word)mul16s::b#0 Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1 -Constant (const void*) memset::$0 = memset::str#0+memset::num#0 -Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const byte) main::$1 = main::$0|VIC_RSEL#0 Constant (const byte) main::vicSelectGfxBank1_toDd001_$1#0 = >main::vicSelectGfxBank1_toDd001_$0#0 Constant (const word) main::toD0181_$1#0 = main::toD0181_$0#0&$3fff Constant (const byte) main::toD0181_$5#0 = >main::toD0181_$4#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (byte*)memset::$0 in [124] (byte*) memset::end#0 ← (byte*)(const void*) memset::$0 -Successful SSA optimization Pass2ConstantValues Constant right-side identified [48] (signed word) sin16s_gen2::offs#0 ← (const signed word) sin16s_gen2::min#0 + (const signed word) sin16s_gen2::$1 -Constant right-side identified [168] (byte~) main::$2 ← (const byte) main::$1 | (byte) 3 -Constant right-side identified [171] (byte~) main::vicSelectGfxBank1_toDd001_$2#0 ← (const byte) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40 -Constant right-side identified [175] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 -Constant right-side identified [177] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 +Constant right-side identified [163] (byte~) main::$2 ← (const byte) main::$1 | (byte) 3 +Constant right-side identified [166] (byte~) main::vicSelectGfxBank1_toDd001_$2#0 ← (const byte) main::vicSelectGfxBank1_toDd001_$1#0 / (byte) $40 +Constant right-side identified [170] (word~) main::toD0181_$2#0 ← (const word) main::toD0181_$1#0 * (byte) 4 +Constant right-side identified [172] (byte~) main::toD0181_$6#0 ← (const byte) main::toD0181_$5#0 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::offs#0 = sin16s_gen2::min#0+sin16s_gen2::$1 -Constant (const byte*) memset::end#0 = (byte*)memset::$0 Constant (const byte) main::$2 = main::$1|3 Constant (const byte) main::vicSelectGfxBank1_toDd001_$2#0 = main::vicSelectGfxBank1_toDd001_$1#0/$40 Constant (const word) main::toD0181_$2#0 = main::toD0181_$1#0*4 @@ -2505,7 +2666,7 @@ Simplifying constant evaluating to zero (const signed word) sin16s_gen2::min#0+( Simplifying constant evaluating to zero (const byte) main::vicSelectGfxBank1_toDd001_$1#0/(byte) $40 in Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero sin16s_gen2::$7 in [62] (signed word~) sin16s_gen2::$8 ← (const signed word) sin16s_gen2::offs#0 + (signed word~) sin16s_gen2::$7 -Simplifying expression containing zero 3 in [172] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2#0 +Simplifying expression containing zero 3 in [167] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const signed word) sin16s_gen2::$1 Eliminating unused constant (const signed word) sin16s_gen2::offs#0 @@ -2518,14 +2679,14 @@ Eliminating unused constant (const byte*) main::vicSelectGfxBank1_gfx#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$8 = (signed word~) sin16s_gen2::$7 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [171] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 -Constant right-side identified [172] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f +Constant right-side identified [167] (byte~) main::toD0181_$3#0 ← > (const word) main::toD0181_$2#0 +Constant right-side identified [168] (byte~) main::toD0181_$7#0 ← (const byte) main::toD0181_$6#0 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::vicSelectGfxBank1_toDd001_return#0 = 3 Constant (const byte) main::toD0181_$3#0 = >main::toD0181_$2#0 Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&$f Successful SSA optimization Pass2ConstantIdentification -Constant right-side identified [169] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 +Constant right-side identified [165] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3#0 | (const byte) main::toD0181_$7#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification @@ -2533,11 +2694,12 @@ Inlining Noop Cast [37] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0 k Inlining Noop Cast [60] (signed word~) sin16s_gen2::$8 ← (signed word)(word~) sin16s_gen2::$6 keeping sin16s_gen2::$6 Inlining Noop Cast [101] (signed word) sin16s::sinx#0 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 Inlining Noop Cast [105] (signed word~) sin16s::$19 ← (signed word)(word) sin16s::usinx#1 keeping sin16s::usinx#1 -Inlining Noop Cast [143] (byte*) bitmap_clear::bitmap#0 ← (byte*)(word~) bitmap_clear::$3 keeping bitmap_clear::$3 -Inlining Noop Cast [155] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::$3 +Inlining Noop Cast [118] (byte*~) memset::$0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [120] (byte*) memset::dst#0 ← (byte*)(void*) memset::str#2 keeping memset::str#2 +Inlining Noop Cast [151] (byte*) bitmap_plot::plotter#0 ← (byte*)(word~) bitmap_plot::$3 keeping bitmap_plot::$3 Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [177] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD -Rewriting multiplication to use shift [187] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [172] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD +Rewriting multiplication to use shift [182] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 * (const byte) SIZEOF_SIGNED_WORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const word) divr16u::quotient#0 Inlining constant with var siblings (const byte) divr16u::i#0 @@ -2559,19 +2721,26 @@ Inlining constant with var siblings (const word) mulu16_sel::v2#2 Inlining constant with var siblings (const byte) mulu16_sel::select#2 Inlining constant with var siblings (const byte) mulu16_sel::select#3 Inlining constant with var siblings (const byte) mulu16_sel::select#4 -Inlining constant with var siblings (const byte*) memset::dst#0 +Inlining constant with var siblings (const word) memset::num#0 +Inlining constant with var siblings (const byte) memset::c#1 +Inlining constant with var siblings (const word) memset::num#1 +Inlining constant with var siblings (const void*) memset::str#0 +Inlining constant with var siblings (const void*) memset::str#1 +Inlining constant with var siblings (const byte) memset::c#0 Inlining constant with var siblings (const byte) bitmap_init::bits#0 Inlining constant with var siblings (const byte) bitmap_init::x#0 Inlining constant with var siblings (const byte) bitmap_init::bits#2 Inlining constant with var siblings (const byte) bitmap_init::y#0 -Inlining constant with var siblings (const byte) bitmap_clear::y#0 -Inlining constant with var siblings (const byte) bitmap_clear::x#0 Inlining constant with var siblings (const word) render_sine::xpos#0 Inlining constant with var siblings (const word) render_sine::sin_idx#0 Inlining constant with var siblings (const word) render_sine::xpos#2 +Constant inlined bitmap_init::screen#0 = (const byte*) SCREEN#0 Constant inlined divr16u::rem#3 = (byte) 0 +Constant inlined bitmap_init::gfx#0 = (const byte*) BITMAP#0 Constant inlined sin16s_gen2::i#0 = (byte) 0 Constant inlined sin16s::isUpper#0 = (byte) 0 +Constant inlined memset::num#1 = (word) $1f40 +Constant inlined memset::num#0 = (word) $3e8 Constant inlined mul16u::b#0 = (word)(const signed word) sin16s_gen2::ampl#0 Constant inlined mulu16_sel::select#4 = (byte) 0 Constant inlined mulu16_sel::select#2 = (byte) 1 @@ -2581,17 +2750,16 @@ Constant inlined sin16s::isUpper#1 = (byte) 1 Constant inlined mulu16_sel::select#1 = (byte) 1 Constant inlined mul16s::$10 = (word)(const signed word) sin16s_gen2::ampl#0 Constant inlined mul16s::b#0 = (const signed word) sin16s_gen2::ampl#0 -Constant inlined bitmap_clear::x#0 = (byte) 0 Constant inlined sin16s_gen2::wavelength#0 = (const word) SIN_SIZE#0 +Constant inlined bitmap_gfx#1 = (const byte*) BITMAP#0 Constant inlined main::toD0181_$1#0 = (word)(const byte*) SCREEN#0&(word) $3fff Constant inlined main::toD0181_$7#0 = >(word)(const byte*) BITMAP#0/(byte) 4&(byte) $f Constant inlined main::toD0181_$3#0 = >(word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 Constant inlined main::toD0181_$5#0 = >(word)(const byte*) BITMAP#0 Constant inlined sin16s_gen2::sintab#1 = (const signed word[$200]) sin#0 -Constant inlined memset::dst#0 = (byte*)(const void*) memset::str#0 -Constant inlined memset::c#0 = (const byte) WHITE#0 +Constant inlined memset::c#0 = (const byte) bitmap_clear::col#0 Constant inlined bitmap_init::x#0 = (byte) 0 -Constant inlined bitmap_init::bitmap#0 = (const byte*) BITMAP#0 +Constant inlined memset::c#1 = (byte) 0 Constant inlined main::toD0181_screen#0 = (const byte*) SCREEN#0 Constant inlined main::toD0181_gfx#0 = (const byte*) BITMAP#0 Constant inlined divr16u::i#0 = (byte) 0 @@ -2599,18 +2767,20 @@ Constant inlined div32u16u::dividend#0 = (const dword) PI2_u4f28#0 Constant inlined bitmap_init::bits#0 = (byte) $80 Constant inlined render_sine::xpos#0 = (byte) 0 Constant inlined bitmap_init::bits#2 = (byte) $80 -Constant inlined memset::$0 = (const void*) memset::str#0+(const word) memset::num#0 Constant inlined divr16u::quotient#0 = (byte) 0 Constant inlined sin16s_gen2::x#0 = (byte) 0 Constant inlined mul16u::res#0 = (byte) 0 Constant inlined divr16u::divisor#1 = (const word) SIN_SIZE#0 Constant inlined divr16u::divisor#0 = (const word) SIN_SIZE#0 +Constant inlined memset::str#1 = (void*)(const byte*) BITMAP#0 Constant inlined render_sine::sin_idx#0 = (byte) 0 -Constant inlined bitmap_clear::y#0 = (byte) 0 +Constant inlined memset::str#0 = (void*)(const byte*) SCREEN#0 Constant inlined main::toD0181_$0#0 = (word)(const byte*) SCREEN#0 +Constant inlined bitmap_clear::fgcol#0 = (const byte) WHITE#0 Constant inlined divr16u::dividend#1 = >(const dword) PI2_u4f28#0 Constant inlined divr16u::dividend#2 = <(const dword) PI2_u4f28#0 Constant inlined main::toD0181_$6#0 = >(word)(const byte*) BITMAP#0/(byte) 4 +Constant inlined bitmap_screen#1 = (const byte*) SCREEN#0 Constant inlined main::$1 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0 Constant inlined main::toD0181_$2#0 = (word)(const byte*) SCREEN#0&(word) $3fff*(byte) 4 Constant inlined main::$2 = (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 @@ -2638,17 +2808,15 @@ Added new block during phi lifting bitmap_init::@9(between bitmap_init::@2 and b Added new block during phi lifting bitmap_init::@10(between bitmap_init::@1 and bitmap_init::@2) Added new block during phi lifting bitmap_init::@11(between bitmap_init::@6 and bitmap_init::@5) Added new block during phi lifting bitmap_init::@12(between bitmap_init::@5 and bitmap_init::@6) -Added new block during phi lifting bitmap_clear::@5(between bitmap_clear::@3 and bitmap_clear::@1) -Added new block during phi lifting bitmap_clear::@6(between bitmap_clear::@2 and bitmap_clear::@2) Added new block during phi lifting render_sine::@9(between render_sine::@2 and render_sine::@1) Added new block during phi lifting render_sine::@10(between render_sine::@8 and render_sine::@2) Added new block during phi lifting wrap_y::@14(between wrap_y::@1 and wrap_y::@7) Adding NOP phi() at start of @begin Adding NOP phi() at start of @6 Adding NOP phi() at start of @17 -Adding NOP phi() at start of @29 +Adding NOP phi() at start of @28 +Adding NOP phi() at start of @34 Adding NOP phi() at start of @35 -Adding NOP phi() at start of @36 Adding NOP phi() at start of @end Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001 Adding NOP phi() at start of main::vicSelectGfxBank1_toDd001_@return @@ -2658,104 +2826,101 @@ Adding NOP phi() at start of main::@9 Adding NOP phi() at start of main::@10 Adding NOP phi() at start of main::@11 Adding NOP phi() at start of main::@12 -Adding NOP phi() at start of main::@13 Adding NOP phi() at start of main::@1 Adding NOP phi() at start of render_sine Adding NOP phi() at start of render_sine::@3 Adding NOP phi() at start of sin16s_gen2 Adding NOP phi() at start of mul16u::@3 Adding NOP phi() at start of div32u16u +Adding NOP phi() at start of bitmap_clear +Adding NOP phi() at start of bitmap_clear::@1 +Adding NOP phi() at start of bitmap_clear::@2 +Adding NOP phi() at start of memset::@2 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@3 Adding NOP phi() at start of bitmap_init::@4 -Adding NOP phi() at start of memset -Adding NOP phi() at start of memset::@2 CALL GRAPH Calls in [] to main:6 -Calls in [main] to memset:21 bitmap_init:23 bitmap_clear:25 sin16s_gen2:27 render_sine:29 -Calls in [render_sine] to wrap_y:40 bitmap_plot:47 wrap_y:53 bitmap_plot:60 -Calls in [sin16s_gen2] to div32u16u:92 sin16s:97 mul16s:100 -Calls in [mul16s] to mul16u:114 -Calls in [sin16s] to mulu16_sel:158 mulu16_sel:165 mulu16_sel:170 mulu16_sel:178 mulu16_sel:185 -Calls in [mulu16_sel] to mul16u:203 -Calls in [div32u16u] to divr16u:210 divr16u:215 +Calls in [main] to bitmap_init:21 bitmap_clear:23 sin16s_gen2:25 render_sine:27 +Calls in [render_sine] to wrap_y:38 bitmap_plot:45 wrap_y:51 bitmap_plot:58 +Calls in [sin16s_gen2] to div32u16u:90 sin16s:95 mul16s:98 +Calls in [mul16s] to mul16u:112 +Calls in [sin16s] to mulu16_sel:156 mulu16_sel:163 mulu16_sel:168 mulu16_sel:176 mulu16_sel:183 +Calls in [mulu16_sel] to mul16u:201 +Calls in [div32u16u] to divr16u:208 divr16u:213 +Calls in [bitmap_clear] to memset:249 memset:251 -Created 45 initial phi equivalence classes -Coalesced [39] wrap_y::y#10 ← wrap_y::y#0 -Coalesced [45] bitmap_plot::y#3 ← bitmap_plot::y#0 -Coalesced [46] bitmap_plot::x#3 ← bitmap_plot::x#0 -Coalesced [52] wrap_y::y#11 ← wrap_y::y#1 -Coalesced [58] bitmap_plot::y#4 ← bitmap_plot::y#1 -Coalesced [59] bitmap_plot::x#4 ← bitmap_plot::x#1 -Coalesced [68] render_sine::sin_idx#9 ← render_sine::sin_idx#1 -Coalesced [69] render_sine::xpos#9 ← render_sine::xpos#8 -Coalesced [70] render_sine::xpos#10 ← render_sine::xpos#1 -Coalesced [79] wrap_y::y#12 ← wrap_y::y#9 -Coalesced [82] wrap_y::y#14 ← wrap_y::y#4 -Coalesced [88] wrap_y::y#15 ← wrap_y::y#3 -Coalesced [90] wrap_y::y#13 ← wrap_y::y#2 -Coalesced [110] sin16s_gen2::x#5 ← sin16s_gen2::x#1 -Coalesced [111] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 -Coalesced [112] sin16s_gen2::i#5 ← sin16s_gen2::i#1 -Coalesced [121] mul16s::m#7 ← mul16s::m#1 -Coalesced [125] mul16s::m#8 ← mul16s::m#0 -Coalesced [127] mul16u::a#10 ← mul16u::a#6 -Coalesced [128] mul16u::mb#7 ← mul16u::mb#0 -Coalesced [136] mul16u::res#9 ← mul16u::res#1 -Coalesced [140] mul16u::a#11 ← mul16u::a#0 -Coalesced [141] mul16u::res#7 ← mul16u::res#6 -Coalesced [142] mul16u::mb#8 ← mul16u::mb#1 -Coalesced (already) [143] mul16u::res#8 ← mul16u::res#2 -Coalesced [146] sin16s::x#9 ← sin16s::x#1 -Coalesced [150] sin16s::x#11 ← sin16s::x#2 -Coalesced [156] mulu16_sel::v1#8 ← mulu16_sel::v1#0 -Coalesced [157] mulu16_sel::v2#8 ← mulu16_sel::v2#0 -Coalesced [163] mulu16_sel::v1#9 ← mulu16_sel::v1#1 -Coalesced [164] mulu16_sel::v2#9 ← mulu16_sel::v2#1 -Coalesced [169] mulu16_sel::v1#10 ← mulu16_sel::v1#2 -Coalesced [176] mulu16_sel::v1#6 ← mulu16_sel::v1#3 -Coalesced [177] mulu16_sel::v2#6 ← mulu16_sel::v2#3 -Coalesced [183] mulu16_sel::v1#7 ← mulu16_sel::v1#4 -Coalesced [184] mulu16_sel::v2#7 ← mulu16_sel::v2#4 -Coalesced [192] sin16s::return#6 ← sin16s::sinx#1 -Coalesced [196] sin16s::x#10 ← sin16s::x#4 -Coalesced [197] sin16s::x#8 ← sin16s::x#0 -Coalesced [201] mul16u::mb#6 ← mul16u::b#1 -Coalesced [202] mul16u::a#9 ← mul16u::a#2 -Coalesced [214] divr16u::rem#12 ← divr16u::rem#4 -Coalesced [221] divr16u::rem#13 ← divr16u::rem#10 -Coalesced [222] divr16u::dividend#9 ← divr16u::dividend#5 -Coalesced [229] divr16u::rem#16 ← divr16u::rem#1 -Coalesced [236] divr16u::rem#18 ← divr16u::rem#2 -Coalesced [237] divr16u::return#8 ← divr16u::quotient#2 -Coalesced [243] divr16u::rem#14 ← divr16u::rem#11 -Coalesced [244] divr16u::dividend#10 ← divr16u::dividend#0 -Coalesced [245] divr16u::quotient#9 ← divr16u::return#0 -Coalesced [246] divr16u::i#7 ← divr16u::i#1 -Coalesced [247] divr16u::rem#17 ← divr16u::rem#6 -Coalesced [248] divr16u::return#7 ← divr16u::quotient#1 -Coalesced [249] divr16u::rem#15 ← divr16u::rem#0 -Coalesced [253] bitmap_clear::bitmap#7 ← bitmap_clear::bitmap#3 -Coalesced [262] bitmap_clear::bitmap#6 ← bitmap_clear::bitmap#1 -Coalesced [263] bitmap_clear::y#5 ← bitmap_clear::y#1 -Coalesced (already) [264] bitmap_clear::bitmap#8 ← bitmap_clear::bitmap#1 -Coalesced [265] bitmap_clear::x#3 ← bitmap_clear::x#1 -Coalesced [285] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [290] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [291] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [292] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [293] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [294] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [295] bitmap_init::bits#6 ← bitmap_init::bits#1 -Coalesced [303] memset::dst#3 ← memset::dst#1 +Created 44 initial phi equivalence classes +Coalesced [37] wrap_y::y#10 ← wrap_y::y#0 +Coalesced [43] bitmap_plot::y#3 ← bitmap_plot::y#0 +Coalesced [44] bitmap_plot::x#3 ← bitmap_plot::x#0 +Coalesced [50] wrap_y::y#11 ← wrap_y::y#1 +Coalesced [56] bitmap_plot::y#4 ← bitmap_plot::y#1 +Coalesced [57] bitmap_plot::x#4 ← bitmap_plot::x#1 +Coalesced [66] render_sine::sin_idx#9 ← render_sine::sin_idx#1 +Coalesced [67] render_sine::xpos#9 ← render_sine::xpos#8 +Coalesced [68] render_sine::xpos#10 ← render_sine::xpos#1 +Coalesced [77] wrap_y::y#12 ← wrap_y::y#9 +Coalesced [80] wrap_y::y#14 ← wrap_y::y#4 +Coalesced [86] wrap_y::y#15 ← wrap_y::y#3 +Coalesced [88] wrap_y::y#13 ← wrap_y::y#2 +Coalesced [108] sin16s_gen2::x#5 ← sin16s_gen2::x#1 +Coalesced [109] sin16s_gen2::sintab#7 ← sin16s_gen2::sintab#0 +Coalesced [110] sin16s_gen2::i#5 ← sin16s_gen2::i#1 +Coalesced [119] mul16s::m#7 ← mul16s::m#1 +Coalesced [123] mul16s::m#8 ← mul16s::m#0 +Coalesced [125] mul16u::a#10 ← mul16u::a#6 +Coalesced [126] mul16u::mb#7 ← mul16u::mb#0 +Coalesced [134] mul16u::res#9 ← mul16u::res#1 +Coalesced [138] mul16u::a#11 ← mul16u::a#0 +Coalesced [139] mul16u::res#7 ← mul16u::res#6 +Coalesced [140] mul16u::mb#8 ← mul16u::mb#1 +Coalesced (already) [141] mul16u::res#8 ← mul16u::res#2 +Coalesced [144] sin16s::x#9 ← sin16s::x#1 +Coalesced [148] sin16s::x#11 ← sin16s::x#2 +Coalesced [154] mulu16_sel::v1#8 ← mulu16_sel::v1#0 +Coalesced [155] mulu16_sel::v2#8 ← mulu16_sel::v2#0 +Coalesced [161] mulu16_sel::v1#9 ← mulu16_sel::v1#1 +Coalesced [162] mulu16_sel::v2#9 ← mulu16_sel::v2#1 +Coalesced [167] mulu16_sel::v1#10 ← mulu16_sel::v1#2 +Coalesced [174] mulu16_sel::v1#6 ← mulu16_sel::v1#3 +Coalesced [175] mulu16_sel::v2#6 ← mulu16_sel::v2#3 +Coalesced [181] mulu16_sel::v1#7 ← mulu16_sel::v1#4 +Coalesced [182] mulu16_sel::v2#7 ← mulu16_sel::v2#4 +Coalesced [190] sin16s::return#6 ← sin16s::sinx#1 +Coalesced [194] sin16s::x#10 ← sin16s::x#4 +Coalesced [195] sin16s::x#8 ← sin16s::x#0 +Coalesced [199] mul16u::mb#6 ← mul16u::b#1 +Coalesced [200] mul16u::a#9 ← mul16u::a#2 +Coalesced [212] divr16u::rem#12 ← divr16u::rem#4 +Coalesced [219] divr16u::rem#13 ← divr16u::rem#10 +Coalesced [220] divr16u::dividend#9 ← divr16u::dividend#5 +Coalesced [227] divr16u::rem#16 ← divr16u::rem#1 +Coalesced [234] divr16u::rem#18 ← divr16u::rem#2 +Coalesced [235] divr16u::return#8 ← divr16u::quotient#2 +Coalesced [241] divr16u::rem#14 ← divr16u::rem#11 +Coalesced [242] divr16u::dividend#10 ← divr16u::dividend#0 +Coalesced [243] divr16u::quotient#9 ← divr16u::return#0 +Coalesced [244] divr16u::i#7 ← divr16u::i#1 +Coalesced [245] divr16u::rem#17 ← divr16u::rem#6 +Coalesced [246] divr16u::return#7 ← divr16u::quotient#1 +Coalesced [247] divr16u::rem#15 ← divr16u::rem#0 +Coalesced [263] memset::dst#4 ← memset::dst#1 +Coalesced [283] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [288] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [289] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [290] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [291] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [292] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [293] bitmap_init::bits#6 ← bitmap_init::bits#1 Coalesced down to 30 phi equivalence classes Culled Empty Block (label) @6 Culled Empty Block (label) @17 -Culled Empty Block (label) @29 -Culled Empty Block (label) @36 +Culled Empty Block (label) @28 +Culled Empty Block (label) @35 Culled Empty Block (label) main::vicSelectGfxBank1_toDd001_@return Culled Empty Block (label) main::toD0181_@return -Culled Empty Block (label) main::@13 +Culled Empty Block (label) main::@12 Culled Empty Block (label) main::@1 Culled Empty Block (label) render_sine::@3 Culled Empty Block (label) render_sine::@9 @@ -2769,17 +2934,16 @@ Culled Empty Block (label) sin16s::@13 Culled Empty Block (label) divr16u::@8 Culled Empty Block (label) divr16u::@10 Culled Empty Block (label) divr16u::@9 -Culled Empty Block (label) bitmap_clear::@5 -Culled Empty Block (label) bitmap_clear::@6 +Culled Empty Block (label) bitmap_clear::@2 +Culled Empty Block (label) memset::@2 +Culled Empty Block (label) memset::@4 Culled Empty Block (label) bitmap_init::@3 Culled Empty Block (label) bitmap_init::@4 Culled Empty Block (label) bitmap_init::@11 Culled Empty Block (label) bitmap_init::@12 Culled Empty Block (label) bitmap_init::@9 -Culled Empty Block (label) memset::@2 -Culled Empty Block (label) memset::@4 -Renumbering block @32 to @1 -Renumbering block @35 to @2 +Renumbering block @31 to @1 +Renumbering block @34 to @2 Renumbering block div32u16u::@2 to div32u16u::@1 Renumbering block div32u16u::@3 to div32u16u::@2 Renumbering block mul16u::@4 to mul16u::@3 @@ -2805,7 +2969,6 @@ Renumbering block main::@8 to main::@3 Renumbering block main::@9 to main::@4 Renumbering block main::@10 to main::@5 Renumbering block main::@11 to main::@6 -Renumbering block main::@12 to main::@7 Renumbering block render_sine::@5 to render_sine::@3 Renumbering block render_sine::@6 to render_sine::@4 Renumbering block render_sine::@7 to render_sine::@5 @@ -2822,14 +2985,14 @@ Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::@4 Adding NOP phi() at start of main::@5 Adding NOP phi() at start of main::@6 -Adding NOP phi() at start of main::@7 Adding NOP phi() at start of render_sine Adding NOP phi() at start of render_sine::@7 Adding NOP phi() at start of sin16s_gen2 Adding NOP phi() at start of div32u16u +Adding NOP phi() at start of bitmap_clear +Adding NOP phi() at start of bitmap_clear::@1 Adding NOP phi() at start of bitmap_init Adding NOP phi() at start of bitmap_init::@6 -Adding NOP phi() at start of memset FINAL CONTROL FLOW GRAPH @begin: scope:[] from @@ -2870,358 +3033,358 @@ main::toD0181: scope:[main] from main::@2 to:main::@3 main::@3: scope:[main] from main::toD0181 [14] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 - [15] call memset + [15] call bitmap_init to:main::@4 main::@4: scope:[main] from main::@3 [16] phi() - [17] call bitmap_init + [17] call bitmap_clear to:main::@5 main::@5: scope:[main] from main::@4 [18] phi() - [19] call bitmap_clear + [19] call sin16s_gen2 to:main::@6 main::@6: scope:[main] from main::@5 [20] phi() - [21] call sin16s_gen2 - to:main::@7 -main::@7: scope:[main] from main::@6 - [22] phi() - [23] call render_sine + [21] call render_sine to:main::@1 -main::@1: scope:[main] from main::@1 main::@7 - [24] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) +main::@1: scope:[main] from main::@1 main::@6 + [22] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) to:main::@1 -render_sine: scope:[render_sine] from main::@7 - [25] phi() +render_sine: scope:[render_sine] from main::@6 + [23] phi() to:render_sine::@1 render_sine::@1: scope:[render_sine] from render_sine render_sine::@2 - [26] (word) render_sine::xpos#3 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::xpos#8 ) - [26] (word) render_sine::sin_idx#2 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::sin_idx#1 ) - [27] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 - [28] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 - [29] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) - [30] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 - [31] call wrap_y - [32] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 + [24] (word) render_sine::xpos#3 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::xpos#8 ) + [24] (word) render_sine::sin_idx#2 ← phi( render_sine/(byte) 0 render_sine::@2/(word) render_sine::sin_idx#1 ) + [25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 + [26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 + [27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) + [28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 + [29] call wrap_y + [30] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 to:render_sine::@3 render_sine::@3: scope:[render_sine] from render_sine::@1 - [33] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 - [34] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 - [35] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 - [36] call bitmap_plot + [31] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 + [32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 + [33] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 + [34] call bitmap_plot to:render_sine::@4 render_sine::@4: scope:[render_sine] from render_sine::@3 - [37] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 - [38] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 - [39] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) - [40] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a - [41] call wrap_y - [42] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 + [35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 + [36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 + [37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) + [38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a + [39] call wrap_y + [40] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 to:render_sine::@5 render_sine::@5: scope:[render_sine] from render_sine::@4 - [43] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 - [44] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 - [45] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 - [46] call bitmap_plot + [41] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 + [42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 + [43] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 + [44] call bitmap_plot to:render_sine::@6 render_sine::@6: scope:[render_sine] from render_sine::@5 - [47] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 - [48] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 + [45] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 + [46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 to:render_sine::@2 render_sine::@7: scope:[render_sine] from render_sine::@6 - [49] phi() + [47] phi() to:render_sine::@2 render_sine::@2: scope:[render_sine] from render_sine::@6 render_sine::@7 - [50] (word) render_sine::xpos#8 ← phi( render_sine::@6/(byte) 0 render_sine::@7/(word) render_sine::xpos#1 ) - [51] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 - [52] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 + [48] (word) render_sine::xpos#8 ← phi( render_sine::@6/(byte) 0 render_sine::@7/(word) render_sine::xpos#1 ) + [49] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 + [50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 to:render_sine::@return render_sine::@return: scope:[render_sine] from render_sine::@2 - [53] return + [51] return to:@return bitmap_plot: scope:[bitmap_plot] from render_sine::@3 render_sine::@5 - [54] (word) bitmap_plot::x#2 ← phi( render_sine::@3/(word) bitmap_plot::x#0 render_sine::@5/(word) bitmap_plot::x#1 ) - [54] (byte) bitmap_plot::y#2 ← phi( render_sine::@3/(byte) bitmap_plot::y#0 render_sine::@5/(byte) bitmap_plot::y#1 ) - [55] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) - [56] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 - [57] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 - [58] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 - [59] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) + [52] (word) bitmap_plot::x#2 ← phi( render_sine::@3/(word) bitmap_plot::x#0 render_sine::@5/(word) bitmap_plot::x#1 ) + [52] (byte) bitmap_plot::y#2 ← phi( render_sine::@3/(byte) bitmap_plot::y#0 render_sine::@5/(byte) bitmap_plot::y#1 ) + [53] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) + [54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 + [55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 + [56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 + [57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) to:bitmap_plot::@return bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot - [60] return + [58] return to:@return wrap_y: scope:[wrap_y] from render_sine::@1 render_sine::@4 - [61] (signed word) wrap_y::y#9 ← phi( render_sine::@1/(signed word) wrap_y::y#0 render_sine::@4/(signed word) wrap_y::y#1 ) + [59] (signed word) wrap_y::y#9 ← phi( render_sine::@1/(signed word) wrap_y::y#0 render_sine::@4/(signed word) wrap_y::y#1 ) to:wrap_y::@1 wrap_y::@1: scope:[wrap_y] from wrap_y wrap_y::@2 - [62] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 ) - [63] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 + [60] (signed word) wrap_y::y#4 ← phi( wrap_y/(signed word) wrap_y::y#9 wrap_y::@2/(signed word) wrap_y::y#2 ) + [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 to:wrap_y::@3 wrap_y::@3: scope:[wrap_y] from wrap_y::@1 wrap_y::@4 - [64] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 ) - [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 + [62] (signed word) wrap_y::y#6 ← phi( wrap_y::@1/(signed word) wrap_y::y#4 wrap_y::@4/(signed word) wrap_y::y#3 ) + [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 to:wrap_y::@5 wrap_y::@5: scope:[wrap_y] from wrap_y::@3 - [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 + [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 to:wrap_y::@return wrap_y::@return: scope:[wrap_y] from wrap_y::@5 - [67] return + [65] return to:@return wrap_y::@4: scope:[wrap_y] from wrap_y::@3 - [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 + [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 to:wrap_y::@3 wrap_y::@2: scope:[wrap_y] from wrap_y::@1 - [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 + [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 to:wrap_y::@1 -sin16s_gen2: scope:[sin16s_gen2] from main::@6 - [70] phi() - [71] call div32u16u - [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 +sin16s_gen2: scope:[sin16s_gen2] from main::@5 + [68] phi() + [69] call div32u16u + [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 to:sin16s_gen2::@2 sin16s_gen2::@2: scope:[sin16s_gen2] from sin16s_gen2 - [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 to:sin16s_gen2::@1 sin16s_gen2::@1: scope:[sin16s_gen2] from sin16s_gen2::@2 sin16s_gen2::@4 - [74] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) - [74] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) sin#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) - [74] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) - [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 - [76] call sin16s - [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + [72] (word) sin16s_gen2::i#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(word) sin16s_gen2::i#1 ) + [72] (signed word*) sin16s_gen2::sintab#2 ← phi( sin16s_gen2::@2/(const signed word[$200]) sin#0 sin16s_gen2::@4/(signed word*) sin16s_gen2::sintab#0 ) + [72] (dword) sin16s_gen2::x#2 ← phi( sin16s_gen2::@2/(byte) 0 sin16s_gen2::@4/(dword) sin16s_gen2::x#1 ) + [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 + [74] call sin16s + [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 to:sin16s_gen2::@3 sin16s_gen2::@3: scope:[sin16s_gen2] from sin16s_gen2::@1 - [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - [79] call mul16s - [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + [77] call mul16s + [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 to:sin16s_gen2::@4 sin16s_gen2::@4: scope:[sin16s_gen2] from sin16s_gen2::@3 - [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 - [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 - [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD - [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 - [86] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 - [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 + [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 + [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 + [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD + [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 + [84] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 + [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 to:sin16s_gen2::@return sin16s_gen2::@return: scope:[sin16s_gen2] from sin16s_gen2::@4 - [88] return + [86] return to:@return mul16s: scope:[mul16s] from sin16s_gen2::@3 - [89] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 - [90] call mul16u - [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + [87] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 + [88] call mul16u + [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 to:mul16s::@4 mul16s::@4: scope:[mul16s] from mul16s - [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 + [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 to:mul16s::@3 mul16s::@3: scope:[mul16s] from mul16s::@4 - [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 - [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 - [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 + [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 + [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 + [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 to:mul16s::@1 mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@4 - [97] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 ) + [95] (dword) mul16s::m#4 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@4/(dword) mul16s::m#0 ) to:mul16s::@2 mul16s::@2: scope:[mul16s] from mul16s::@1 - [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 to:mul16s::@return mul16s::@return: scope:[mul16s] from mul16s::@2 - [99] return + [97] return to:@return mul16u: scope:[mul16u] from mul16s mulu16_sel - [100] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) - [100] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) + [98] (word) mul16u::a#6 ← phi( mul16s/(word~) mul16u::a#8 mulu16_sel/(word) mul16u::a#2 ) + [98] (dword) mul16u::mb#0 ← phi( mul16s/(word)(const signed word) sin16s_gen2::ampl#0 mulu16_sel/(word) mul16u::b#1 ) to:mul16u::@1 mul16u::@1: scope:[mul16u] from mul16u mul16u::@3 - [101] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) - [101] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) - [101] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) - [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 + [99] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 ) + [99] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 ) + [99] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 ) + [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 to:mul16u::@return mul16u::@return: scope:[mul16u] from mul16u::@1 - [103] return + [101] return to:@return mul16u::@2: scope:[mul16u] from mul16u::@1 - [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 - [105] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 + [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 + [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 to:mul16u::@4 mul16u::@4: scope:[mul16u] from mul16u::@2 - [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 + [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 to:mul16u::@3 mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4 - [107] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) - [108] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 - [109] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 + [105] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 ) + [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 + [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 to:mul16u::@1 sin16s: scope:[sin16s] from sin16s_gen2::@1 - [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 + [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 to:sin16s::@4 sin16s::@4: scope:[sin16s] from sin16s - [111] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 + [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 to:sin16s::@1 sin16s::@1: scope:[sin16s] from sin16s sin16s::@4 - [112] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) - [112] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) - [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 + [110] (byte) sin16s::isUpper#2 ← phi( sin16s/(byte) 0 sin16s::@4/(byte) 1 ) + [110] (dword) sin16s::x#4 ← phi( sin16s/(dword) sin16s::x#0 sin16s::@4/(dword) sin16s::x#1 ) + [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 to:sin16s::@5 sin16s::@5: scope:[sin16s] from sin16s::@1 - [114] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 + [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 to:sin16s::@2 sin16s::@2: scope:[sin16s] from sin16s::@1 sin16s::@5 - [115] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) - [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 - [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 - [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 - [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 - [120] call mulu16_sel - [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + [113] (dword) sin16s::x#6 ← phi( sin16s::@1/(dword) sin16s::x#4 sin16s::@5/(dword) sin16s::x#2 ) + [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 + [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 + [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 + [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 + [118] call mulu16_sel + [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 to:sin16s::@7 sin16s::@7: scope:[sin16s] from sin16s::@2 - [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 - [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 - [125] call mulu16_sel - [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 + [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 + [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 + [123] call mulu16_sel + [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 to:sin16s::@8 sin16s::@8: scope:[sin16s] from sin16s::@7 - [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - [129] call mulu16_sel - [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + [127] call mulu16_sel + [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 to:sin16s::@9 sin16s::@9: scope:[sin16s] from sin16s::@8 - [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 - [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 - [135] call mulu16_sel - [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 + [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 + [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 + [133] call mulu16_sel + [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 to:sin16s::@10 sin16s::@10: scope:[sin16s] from sin16s::@9 - [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 - [140] call mulu16_sel - [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 + [138] call mulu16_sel + [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 to:sin16s::@11 sin16s::@11: scope:[sin16s] from sin16s::@10 - [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 - [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 - [145] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 + [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 + [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 + [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 to:sin16s::@6 sin16s::@6: scope:[sin16s] from sin16s::@11 - [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 + [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 to:sin16s::@3 sin16s::@3: scope:[sin16s] from sin16s::@12 sin16s::@6 - [147] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) + [145] (signed word) sin16s::return#1 ← phi( sin16s::@12/(signed word~) sin16s::return#5 sin16s::@6/(signed word) sin16s::sinx#1 ) to:sin16s::@return sin16s::@return: scope:[sin16s] from sin16s::@3 - [148] return + [146] return to:@return sin16s::@12: scope:[sin16s] from sin16s::@11 - [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 to:sin16s::@3 mulu16_sel: scope:[mulu16_sel] from sin16s::@10 sin16s::@2 sin16s::@7 sin16s::@8 sin16s::@9 - [150] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) - [150] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) - [150] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) - [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 - [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - [153] call mul16u - [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + [148] (byte) mulu16_sel::select#5 ← phi( sin16s::@9/(byte) 0 sin16s::@10/(byte) 0 sin16s::@2/(byte) 0 sin16s::@7/(byte) 1 sin16s::@8/(byte) 1 ) + [148] (word) mulu16_sel::v2#5 ← phi( sin16s::@9/(word) mulu16_sel::v2#3 sin16s::@10/(word) mulu16_sel::v2#4 sin16s::@2/(word) mulu16_sel::v2#0 sin16s::@7/(word) mulu16_sel::v2#1 sin16s::@8/(word)(number) $10000/(number) 6 ) + [148] (word) mulu16_sel::v1#5 ← phi( sin16s::@9/(word) mulu16_sel::v1#3 sin16s::@10/(word) mulu16_sel::v1#4 sin16s::@2/(word) mulu16_sel::v1#0 sin16s::@7/(word) mulu16_sel::v1#1 sin16s::@8/(word) mulu16_sel::v1#2 ) + [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 + [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + [151] call mul16u + [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 to:mulu16_sel::@1 mulu16_sel::@1: scope:[mulu16_sel] from mulu16_sel - [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 - [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 + [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 + [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 to:mulu16_sel::@return mulu16_sel::@return: scope:[mulu16_sel] from mulu16_sel::@1 - [158] return + [156] return to:@return div32u16u: scope:[div32u16u] from sin16s_gen2 - [159] phi() - [160] call divr16u - [161] (word) divr16u::return#2 ← (word) divr16u::return#0 + [157] phi() + [158] call divr16u + [159] (word) divr16u::return#2 ← (word) divr16u::return#0 to:div32u16u::@1 div32u16u::@1: scope:[div32u16u] from div32u16u - [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 - [163] (word) divr16u::rem#4 ← (word) rem16u#1 - [164] call divr16u - [165] (word) divr16u::return#3 ← (word) divr16u::return#0 + [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 + [161] (word) divr16u::rem#4 ← (word) rem16u#1 + [162] call divr16u + [163] (word) divr16u::return#3 ← (word) divr16u::return#0 to:div32u16u::@2 div32u16u::@2: scope:[div32u16u] from div32u16u::@1 - [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 + [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 to:div32u16u::@return div32u16u::@return: scope:[div32u16u] from div32u16u::@2 - [168] return + [166] return to:@return divr16u: scope:[divr16u] from div32u16u div32u16u::@1 - [169] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) - [169] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) + [167] (word) divr16u::dividend#5 ← phi( div32u16u/>(const dword) PI2_u4f28#0 div32u16u::@1/<(const dword) PI2_u4f28#0 ) + [167] (word) divr16u::rem#10 ← phi( div32u16u/(byte) 0 div32u16u::@1/(word) divr16u::rem#4 ) to:divr16u::@1 divr16u::@1: scope:[divr16u] from divr16u divr16u::@3 - [170] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) - [170] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) - [170] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) - [170] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) - [171] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 - [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 - [173] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 - [174] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 + [168] (byte) divr16u::i#2 ← phi( divr16u/(byte) 0 divr16u::@3/(byte) divr16u::i#1 ) + [168] (word) divr16u::quotient#3 ← phi( divr16u/(byte) 0 divr16u::@3/(word) divr16u::return#0 ) + [168] (word) divr16u::dividend#3 ← phi( divr16u/(word) divr16u::dividend#5 divr16u::@3/(word) divr16u::dividend#0 ) + [168] (word) divr16u::rem#5 ← phi( divr16u/(word) divr16u::rem#10 divr16u::@3/(word) divr16u::rem#11 ) + [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 + [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 + [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 + [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 to:divr16u::@4 divr16u::@4: scope:[divr16u] from divr16u::@1 - [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 + [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 to:divr16u::@2 divr16u::@2: scope:[divr16u] from divr16u::@1 divr16u::@4 - [176] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) - [177] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 - [178] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 - [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 + [174] (word) divr16u::rem#6 ← phi( divr16u::@1/(word) divr16u::rem#0 divr16u::@4/(word) divr16u::rem#1 ) + [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 + [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 + [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 to:divr16u::@5 divr16u::@5: scope:[divr16u] from divr16u::@2 - [180] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 - [181] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 + [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 + [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 to:divr16u::@3 divr16u::@3: scope:[divr16u] from divr16u::@2 divr16u::@5 - [182] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) - [182] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) - [183] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 - [184] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 + [180] (word) divr16u::return#0 ← phi( divr16u::@2/(word) divr16u::quotient#1 divr16u::@5/(word) divr16u::quotient#2 ) + [180] (word) divr16u::rem#11 ← phi( divr16u::@2/(word) divr16u::rem#6 divr16u::@5/(word) divr16u::rem#2 ) + [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 + [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 to:divr16u::@6 divr16u::@6: scope:[divr16u] from divr16u::@3 - [185] (word) rem16u#1 ← (word) divr16u::rem#11 + [183] (word) rem16u#1 ← (word) divr16u::rem#11 to:divr16u::@return divr16u::@return: scope:[divr16u] from divr16u::@6 - [186] return + [184] return to:@return -bitmap_clear: scope:[bitmap_clear] from main::@5 - [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) - [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 +bitmap_clear: scope:[bitmap_clear] from main::@4 + [185] phi() + [186] call memset to:bitmap_clear::@1 -bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3 - [189] (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) 0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) - [189] (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*~) bitmap_clear::bitmap#5 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#1 ) - to:bitmap_clear::@2 -bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2 - [190] (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) 0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) - [190] (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) - [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 - [192] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 - [193] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 - [194] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 - to:bitmap_clear::@3 -bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 - [195] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 - [196] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 +bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear + [187] phi() + [188] call memset to:bitmap_clear::@return -bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 +bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1 + [189] return + to:@return +memset: scope:[memset] from bitmap_clear bitmap_clear::@1 + [190] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 ) + [190] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 ) + [190] (void*) memset::str#2 ← phi( bitmap_clear/(void*)(const byte*) SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP#0 ) + [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 + [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + to:memset::@1 +memset::@1: scope:[memset] from memset memset::@1 + [193] (byte*) memset::dst#2 ← phi( memset/(byte*~) memset::dst#3 memset::@1/(byte*) memset::dst#1 ) + [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 + [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 + to:memset::@return +memset::@return: scope:[memset] from memset::@1 [197] return to:@return -bitmap_init: scope:[bitmap_init] from main::@4 +bitmap_init: scope:[bitmap_init] from main::@3 [198] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 @@ -3261,23 +3424,12 @@ bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 [219] return to:@return -memset: scope:[memset] from main::@3 - [220] phi() - to:memset::@1 -memset::@1: scope:[memset] from memset memset::@1 - [221] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@1/(byte*) memset::dst#1 ) - [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 - [223] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 - [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 - to:memset::@return -memset::@return: scope:[memset] from memset::@1 - [225] return - to:@return VARIABLE REGISTER WEIGHTS (byte*) BGCOL (byte*) BITMAP +(byte) BLACK (byte*) CIA2_PORT_A (byte*) CIA2_PORT_A_DDR (byte*) D011 @@ -3297,29 +3449,22 @@ VARIABLE REGISTER WEIGHTS (byte) VIC_DEN (byte) VIC_RSEL (byte) WHITE -(void()) bitmap_clear() -(word~) bitmap_clear::$3 2.0 -(byte*) bitmap_clear::bitmap -(byte*) bitmap_clear::bitmap#1 42.599999999999994 -(byte*) bitmap_clear::bitmap#2 157.0 -(byte*) bitmap_clear::bitmap#3 24.0 -(byte*~) bitmap_clear::bitmap#5 4.0 -(byte) bitmap_clear::x -(byte) bitmap_clear::x#1 151.5 -(byte) bitmap_clear::x#2 67.33333333333333 -(byte) bitmap_clear::y -(byte) bitmap_clear::y#1 16.5 -(byte) bitmap_clear::y#4 3.6666666666666665 -(void()) bitmap_init((byte*) bitmap_init::bitmap) +(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol) +(byte) bitmap_clear::bgcol +(byte) bitmap_clear::col +(byte) bitmap_clear::fgcol +(byte*) bitmap_gfx +(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen) (byte~) bitmap_init::$4 22.0 (byte~) bitmap_init::$5 22.0 (byte~) bitmap_init::$6 22.0 (byte~) bitmap_init::$7 5.5 -(byte*) bitmap_init::bitmap (byte) bitmap_init::bits (byte) bitmap_init::bits#1 11.0 (byte) bitmap_init::bits#3 16.5 (byte) bitmap_init::bits#4 7.333333333333333 +(byte*) bitmap_init::gfx +(byte*) bitmap_init::screen (byte) bitmap_init::x (byte) bitmap_init::x#1 16.5 (byte) bitmap_init::x#2 5.5 @@ -3347,6 +3492,7 @@ VARIABLE REGISTER WEIGHTS (byte[$100]) bitmap_plot_bit (byte[$100]) bitmap_plot_yhi (byte[$100]) bitmap_plot_ylo +(byte*) bitmap_screen (dword()) div32u16u((dword) div32u16u::dividend , (word) div32u16u::divisor) (dword) div32u16u::dividend (word) div32u16u::divisor @@ -3409,13 +3555,18 @@ VARIABLE REGISTER WEIGHTS (byte) main::vicSelectGfxBank1_toDd001_return (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) (byte) memset::c +(byte) memset::c#3 1.5714285714285714 (byte*) memset::dst (byte*) memset::dst#1 16.5 -(byte*) memset::dst#2 16.5 +(byte*) memset::dst#2 17.5 +(byte*~) memset::dst#3 4.0 (byte*) memset::end +(byte*) memset::end#0 2.1666666666666665 (word) memset::num +(word) memset::num#2 2.0 (void*) memset::return (void*) memset::str +(void*) memset::str#2 (signed dword()) mul16s((signed word) mul16s::a , (signed word) mul16s::b) (word~) mul16s::$16 4.0 (word~) mul16s::$9 4.0 @@ -3590,14 +3741,14 @@ Initial phi equivalence classes [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] -[ bitmap_clear::y#4 bitmap_clear::y#1 ] -[ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] -[ bitmap_clear::x#2 bitmap_clear::x#1 ] +[ memset::str#2 ] +[ memset::num#2 ] +[ memset::c#3 ] +[ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] [ bitmap_init::x#2 bitmap_init::x#1 ] [ bitmap_init::y#2 bitmap_init::y#1 ] [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -[ memset::dst#2 memset::dst#1 ] Added variable render_sine::$10 to zero page equivalence class [ render_sine::$10 ] Added variable render_sine::$0 to zero page equivalence class [ render_sine::$0 ] Added variable render_sine::sin_val#0 to zero page equivalence class [ render_sine::sin_val#0 ] @@ -3652,7 +3803,7 @@ Added variable div32u16u::return#0 to zero page equivalence class [ div32u16u::r Added variable divr16u::$1 to zero page equivalence class [ divr16u::$1 ] Added variable divr16u::$2 to zero page equivalence class [ divr16u::$2 ] Added variable rem16u#1 to zero page equivalence class [ rem16u#1 ] -Added variable bitmap_clear::$3 to zero page equivalence class [ bitmap_clear::$3 ] +Added variable memset::end#0 to zero page equivalence class [ memset::end#0 ] Added variable bitmap_init::$7 to zero page equivalence class [ bitmap_init::$7 ] Added variable bitmap_init::$4 to zero page equivalence class [ bitmap_init::$4 ] Added variable bitmap_init::$5 to zero page equivalence class [ bitmap_init::$5 ] @@ -3681,14 +3832,14 @@ Complete equivalence classes [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] [ divr16u::i#2 divr16u::i#1 ] -[ bitmap_clear::y#4 bitmap_clear::y#1 ] -[ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] -[ bitmap_clear::x#2 bitmap_clear::x#1 ] +[ memset::str#2 ] +[ memset::num#2 ] +[ memset::c#3 ] +[ memset::dst#2 memset::dst#3 memset::dst#1 ] [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] [ bitmap_init::x#2 bitmap_init::x#1 ] [ bitmap_init::y#2 bitmap_init::y#1 ] [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -[ memset::dst#2 memset::dst#1 ] [ render_sine::$10 ] [ render_sine::$0 ] [ render_sine::sin_val#0 ] @@ -3743,7 +3894,7 @@ Complete equivalence classes [ divr16u::$1 ] [ divr16u::$2 ] [ rem16u#1 ] -[ bitmap_clear::$3 ] +[ memset::end#0 ] [ bitmap_init::$7 ] [ bitmap_init::$4 ] [ bitmap_init::$5 ] @@ -3771,73 +3922,73 @@ Allocated zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u: Allocated zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] Allocated zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] Allocated zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] -Allocated zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Allocated zp ZP_WORD:55 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] -Allocated zp ZP_BYTE:57 [ bitmap_clear::x#2 bitmap_clear::x#1 ] -Allocated zp ZP_BYTE:58 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] -Allocated zp ZP_BYTE:59 [ bitmap_init::x#2 bitmap_init::x#1 ] -Allocated zp ZP_BYTE:60 [ bitmap_init::y#2 bitmap_init::y#1 ] -Allocated zp ZP_WORD:61 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -Allocated zp ZP_WORD:63 [ memset::dst#2 memset::dst#1 ] -Allocated zp ZP_WORD:65 [ render_sine::$10 ] -Allocated zp ZP_WORD:67 [ render_sine::$0 ] -Allocated zp ZP_WORD:69 [ render_sine::sin_val#0 ] -Allocated zp ZP_BYTE:71 [ wrap_y::return#0 ] -Allocated zp ZP_BYTE:72 [ render_sine::ypos#0 ] -Allocated zp ZP_WORD:73 [ render_sine::$11 ] -Allocated zp ZP_WORD:75 [ render_sine::$3 ] -Allocated zp ZP_WORD:77 [ render_sine::sin2_val#0 ] -Allocated zp ZP_BYTE:79 [ wrap_y::return#1 ] -Allocated zp ZP_BYTE:80 [ render_sine::ypos2#0 ] -Allocated zp ZP_WORD:81 [ bitmap_plot::$3 ] -Allocated zp ZP_WORD:83 [ bitmap_plot::$1 ] -Allocated zp ZP_WORD:85 [ bitmap_plot::plotter#1 ] -Allocated zp ZP_BYTE:87 [ bitmap_plot::$2 ] -Allocated zp ZP_BYTE:88 [ wrap_y::return#2 ] -Allocated zp ZP_DWORD:89 [ div32u16u::return#2 ] -Allocated zp ZP_DWORD:93 [ sin16s_gen2::step#0 ] -Allocated zp ZP_WORD:97 [ sin16s::return#0 ] -Allocated zp ZP_WORD:99 [ mul16s::a#0 ] -Allocated zp ZP_DWORD:101 [ mul16s::return#2 ] -Allocated zp ZP_DWORD:105 [ sin16s_gen2::$5 ] -Allocated zp ZP_WORD:109 [ sin16s_gen2::$6 ] -Allocated zp ZP_DWORD:111 [ mul16u::return#2 ] -Allocated zp ZP_WORD:115 [ mul16s::$9 ] -Allocated zp ZP_WORD:117 [ mul16s::$16 ] -Allocated zp ZP_DWORD:119 [ mul16s::return#0 ] -Allocated zp ZP_BYTE:123 [ mul16u::$1 ] -Allocated zp ZP_DWORD:124 [ sin16s::$4 ] -Allocated zp ZP_WORD:128 [ sin16s::x1#0 ] -Allocated zp ZP_WORD:130 [ mulu16_sel::return#0 ] -Allocated zp ZP_WORD:132 [ sin16s::x2#0 ] -Allocated zp ZP_WORD:134 [ mulu16_sel::return#1 ] -Allocated zp ZP_WORD:136 [ sin16s::x3#0 ] -Allocated zp ZP_WORD:138 [ mulu16_sel::return#2 ] -Allocated zp ZP_WORD:140 [ sin16s::x3_6#0 ] -Allocated zp ZP_WORD:142 [ sin16s::usinx#0 ] -Allocated zp ZP_WORD:144 [ mulu16_sel::return#10 ] -Allocated zp ZP_WORD:146 [ sin16s::x4#0 ] -Allocated zp ZP_WORD:148 [ mulu16_sel::return#11 ] -Allocated zp ZP_WORD:150 [ sin16s::x5#0 ] -Allocated zp ZP_WORD:152 [ sin16s::x5_128#0 ] -Allocated zp ZP_WORD:154 [ sin16s::usinx#1 ] -Allocated zp ZP_DWORD:156 [ mul16u::return#3 ] -Allocated zp ZP_DWORD:160 [ mulu16_sel::$0 ] -Allocated zp ZP_DWORD:164 [ mulu16_sel::$1 ] -Allocated zp ZP_WORD:168 [ mulu16_sel::return#12 ] -Allocated zp ZP_WORD:170 [ divr16u::return#2 ] -Allocated zp ZP_WORD:172 [ div32u16u::quotient_hi#0 ] -Allocated zp ZP_WORD:174 [ divr16u::return#3 ] -Allocated zp ZP_WORD:176 [ div32u16u::quotient_lo#0 ] -Allocated zp ZP_DWORD:178 [ div32u16u::return#0 ] -Allocated zp ZP_BYTE:182 [ divr16u::$1 ] -Allocated zp ZP_BYTE:183 [ divr16u::$2 ] -Allocated zp ZP_WORD:184 [ rem16u#1 ] -Allocated zp ZP_WORD:186 [ bitmap_clear::$3 ] -Allocated zp ZP_BYTE:188 [ bitmap_init::$7 ] -Allocated zp ZP_BYTE:189 [ bitmap_init::$4 ] -Allocated zp ZP_BYTE:190 [ bitmap_init::$5 ] -Allocated zp ZP_BYTE:191 [ bitmap_init::$6 ] +Allocated zp ZP_WORD:54 [ memset::str#2 ] +Allocated zp ZP_WORD:56 [ memset::num#2 ] +Allocated zp ZP_BYTE:58 [ memset::c#3 ] +Allocated zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated zp ZP_BYTE:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] +Allocated zp ZP_BYTE:62 [ bitmap_init::x#2 bitmap_init::x#1 ] +Allocated zp ZP_BYTE:63 [ bitmap_init::y#2 bitmap_init::y#1 ] +Allocated zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +Allocated zp ZP_WORD:66 [ render_sine::$10 ] +Allocated zp ZP_WORD:68 [ render_sine::$0 ] +Allocated zp ZP_WORD:70 [ render_sine::sin_val#0 ] +Allocated zp ZP_BYTE:72 [ wrap_y::return#0 ] +Allocated zp ZP_BYTE:73 [ render_sine::ypos#0 ] +Allocated zp ZP_WORD:74 [ render_sine::$11 ] +Allocated zp ZP_WORD:76 [ render_sine::$3 ] +Allocated zp ZP_WORD:78 [ render_sine::sin2_val#0 ] +Allocated zp ZP_BYTE:80 [ wrap_y::return#1 ] +Allocated zp ZP_BYTE:81 [ render_sine::ypos2#0 ] +Allocated zp ZP_WORD:82 [ bitmap_plot::$3 ] +Allocated zp ZP_WORD:84 [ bitmap_plot::$1 ] +Allocated zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] +Allocated zp ZP_BYTE:88 [ bitmap_plot::$2 ] +Allocated zp ZP_BYTE:89 [ wrap_y::return#2 ] +Allocated zp ZP_DWORD:90 [ div32u16u::return#2 ] +Allocated zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] +Allocated zp ZP_WORD:98 [ sin16s::return#0 ] +Allocated zp ZP_WORD:100 [ mul16s::a#0 ] +Allocated zp ZP_DWORD:102 [ mul16s::return#2 ] +Allocated zp ZP_DWORD:106 [ sin16s_gen2::$5 ] +Allocated zp ZP_WORD:110 [ sin16s_gen2::$6 ] +Allocated zp ZP_DWORD:112 [ mul16u::return#2 ] +Allocated zp ZP_WORD:116 [ mul16s::$9 ] +Allocated zp ZP_WORD:118 [ mul16s::$16 ] +Allocated zp ZP_DWORD:120 [ mul16s::return#0 ] +Allocated zp ZP_BYTE:124 [ mul16u::$1 ] +Allocated zp ZP_DWORD:125 [ sin16s::$4 ] +Allocated zp ZP_WORD:129 [ sin16s::x1#0 ] +Allocated zp ZP_WORD:131 [ mulu16_sel::return#0 ] +Allocated zp ZP_WORD:133 [ sin16s::x2#0 ] +Allocated zp ZP_WORD:135 [ mulu16_sel::return#1 ] +Allocated zp ZP_WORD:137 [ sin16s::x3#0 ] +Allocated zp ZP_WORD:139 [ mulu16_sel::return#2 ] +Allocated zp ZP_WORD:141 [ sin16s::x3_6#0 ] +Allocated zp ZP_WORD:143 [ sin16s::usinx#0 ] +Allocated zp ZP_WORD:145 [ mulu16_sel::return#10 ] +Allocated zp ZP_WORD:147 [ sin16s::x4#0 ] +Allocated zp ZP_WORD:149 [ mulu16_sel::return#11 ] +Allocated zp ZP_WORD:151 [ sin16s::x5#0 ] +Allocated zp ZP_WORD:153 [ sin16s::x5_128#0 ] +Allocated zp ZP_WORD:155 [ sin16s::usinx#1 ] +Allocated zp ZP_DWORD:157 [ mul16u::return#3 ] +Allocated zp ZP_DWORD:161 [ mulu16_sel::$0 ] +Allocated zp ZP_DWORD:165 [ mulu16_sel::$1 ] +Allocated zp ZP_WORD:169 [ mulu16_sel::return#12 ] +Allocated zp ZP_WORD:171 [ divr16u::return#2 ] +Allocated zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] +Allocated zp ZP_WORD:175 [ divr16u::return#3 ] +Allocated zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] +Allocated zp ZP_DWORD:179 [ div32u16u::return#0 ] +Allocated zp ZP_BYTE:183 [ divr16u::$1 ] +Allocated zp ZP_BYTE:184 [ divr16u::$2 ] +Allocated zp ZP_WORD:185 [ rem16u#1 ] +Allocated zp ZP_WORD:187 [ memset::end#0 ] +Allocated zp ZP_BYTE:189 [ bitmap_init::$7 ] +Allocated zp ZP_BYTE:190 [ bitmap_init::$4 ] +Allocated zp ZP_BYTE:191 [ bitmap_init::$5 ] +Allocated zp ZP_BYTE:192 [ bitmap_init::$6 ] INITIAL ASM //SEG0 File Comments @@ -3879,7 +4030,7 @@ INITIAL ASM .label BITMAP = $2000 .const SIN_SIZE = $200 .label sin2 = $1400 - .label rem16u = $b8 + .label rem16u = $b9 //SEG3 @begin bbegin: jmp b1 @@ -3949,91 +4100,84 @@ main: { //SEG27 [14] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG28 [15] call memset - //SEG29 [220] phi from main::@3 to memset [phi:main::@3->memset] - memset_from_b3: - jsr memset + //SEG28 [15] call bitmap_init + //SEG29 [198] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] + bitmap_init_from_b3: + jsr bitmap_init //SEG30 [16] phi from main::@3 to main::@4 [phi:main::@3->main::@4] b4_from_b3: jmp b4 //SEG31 main::@4 b4: - //SEG32 [17] call bitmap_init - //SEG33 [198] phi from main::@4 to bitmap_init [phi:main::@4->bitmap_init] - bitmap_init_from_b4: - jsr bitmap_init + //SEG32 [17] call bitmap_clear + //SEG33 [185] phi from main::@4 to bitmap_clear [phi:main::@4->bitmap_clear] + bitmap_clear_from_b4: + jsr bitmap_clear //SEG34 [18] phi from main::@4 to main::@5 [phi:main::@4->main::@5] b5_from_b4: jmp b5 //SEG35 main::@5 b5: - //SEG36 [19] call bitmap_clear - jsr bitmap_clear - //SEG37 [20] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + //SEG36 [19] call sin16s_gen2 + //SEG37 [68] phi from main::@5 to sin16s_gen2 [phi:main::@5->sin16s_gen2] + sin16s_gen2_from_b5: + jsr sin16s_gen2 + //SEG38 [20] phi from main::@5 to main::@6 [phi:main::@5->main::@6] b6_from_b5: jmp b6 - //SEG38 main::@6 + //SEG39 main::@6 b6: - //SEG39 [21] call sin16s_gen2 - //SEG40 [70] phi from main::@6 to sin16s_gen2 [phi:main::@6->sin16s_gen2] - sin16s_gen2_from_b6: - jsr sin16s_gen2 - //SEG41 [22] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - b7_from_b6: - jmp b7 - //SEG42 main::@7 - b7: - //SEG43 [23] call render_sine - //SEG44 [25] phi from main::@7 to render_sine [phi:main::@7->render_sine] - render_sine_from_b7: + //SEG40 [21] call render_sine + //SEG41 [23] phi from main::@6 to render_sine [phi:main::@6->render_sine] + render_sine_from_b6: jsr render_sine jmp b1 - //SEG45 main::@1 + //SEG42 main::@1 b1: - //SEG46 [24] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG43 [22] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BGCOL jmp b1 } -//SEG47 render_sine +//SEG44 render_sine render_sine: { - .label _0 = $43 - .label _3 = $4b - .label _10 = $41 - .label _11 = $49 - .label sin_val = $45 - .label ypos = $48 - .label sin2_val = $4d - .label ypos2 = $50 + .label _0 = $44 + .label _3 = $4c + .label _10 = $42 + .label _11 = $4a + .label sin_val = $46 + .label ypos = $49 + .label sin2_val = $4e + .label ypos2 = $51 .label xpos = 4 .label sin_idx = 2 - //SEG48 [26] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1] + //SEG45 [24] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1] b1_from_render_sine: - //SEG49 [26] phi (word) render_sine::xpos#3 = (byte) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vbuc1 + //SEG46 [24] phi (word) render_sine::xpos#3 = (byte) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vbuc1 lda #0 sta xpos lda #0 sta xpos+1 - //SEG50 [26] phi (word) render_sine::sin_idx#2 = (byte) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vbuc1 + //SEG47 [24] phi (word) render_sine::sin_idx#2 = (byte) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vbuc1 lda #0 sta sin_idx lda #0 sta sin_idx+1 jmp b1 - //SEG51 [26] phi from render_sine::@2 to render_sine::@1 [phi:render_sine::@2->render_sine::@1] + //SEG48 [24] phi from render_sine::@2 to render_sine::@1 [phi:render_sine::@2->render_sine::@1] b1_from_b2: - //SEG52 [26] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#8 [phi:render_sine::@2->render_sine::@1#0] -- register_copy - //SEG53 [26] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@2->render_sine::@1#1] -- register_copy + //SEG49 [24] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#8 [phi:render_sine::@2->render_sine::@1#0] -- register_copy + //SEG50 [24] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@2->render_sine::@1#1] -- register_copy jmp b1 - //SEG54 render_sine::@1 + //SEG51 render_sine::@1 b1: - //SEG55 [27] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG52 [25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda sin_idx asl sta _10 lda sin_idx+1 rol sta _10+1 - //SEG56 [28] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz2 + //SEG53 [26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz2 lda _10 clc adc #sin sta _0+1 - //SEG57 [29] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) -- vwsz1=_deref_pwsz2 + //SEG54 [27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) -- vwsz1=_deref_pwsz2 ldy #0 lda (_0),y sta sin_val iny lda (_0),y sta sin_val+1 - //SEG58 [30] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 -- vwsz1=vwsz2 + //SEG55 [28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 -- vwsz1=vwsz2 lda sin_val sta wrap_y.y lda sin_val+1 sta wrap_y.y+1 - //SEG59 [31] call wrap_y - //SEG60 [61] phi from render_sine::@1 to wrap_y [phi:render_sine::@1->wrap_y] + //SEG56 [29] call wrap_y + //SEG57 [59] phi from render_sine::@1 to wrap_y [phi:render_sine::@1->wrap_y] wrap_y_from_b1: - //SEG61 [61] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@1->wrap_y#0] -- register_copy + //SEG58 [59] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@1->wrap_y#0] -- register_copy jsr wrap_y - //SEG62 [32] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 -- vbuz1=vbuz2 + //SEG59 [30] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 -- vbuz1=vbuz2 lda wrap_y.return_2 sta wrap_y.return jmp b3 - //SEG63 render_sine::@3 + //SEG60 render_sine::@3 b3: - //SEG64 [33] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuz1=vbuz2 + //SEG61 [31] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuz1=vbuz2 lda wrap_y.return sta ypos - //SEG65 [34] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 -- vwuz1=vwuz2 + //SEG62 [32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 -- vwuz1=vwuz2 lda xpos sta bitmap_plot.x lda xpos+1 sta bitmap_plot.x+1 - //SEG66 [35] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 -- vbuz1=vbuz2 + //SEG63 [33] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 -- vbuz1=vbuz2 lda ypos sta bitmap_plot.y - //SEG67 [36] call bitmap_plot - //SEG68 [54] phi from render_sine::@3 to bitmap_plot [phi:render_sine::@3->bitmap_plot] + //SEG64 [34] call bitmap_plot + //SEG65 [52] phi from render_sine::@3 to bitmap_plot [phi:render_sine::@3->bitmap_plot] bitmap_plot_from_b3: - //SEG69 [54] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@3->bitmap_plot#0] -- register_copy - //SEG70 [54] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@3->bitmap_plot#1] -- register_copy + //SEG66 [52] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@3->bitmap_plot#0] -- register_copy + //SEG67 [52] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@3->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp b4 - //SEG71 render_sine::@4 + //SEG68 render_sine::@4 b4: - //SEG72 [37] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG69 [35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda sin_idx asl sta _11 lda sin_idx+1 rol sta _11+1 - //SEG73 [38] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz2 + //SEG70 [36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz2 lda _11 clc adc #sin2 sta _3+1 - //SEG74 [39] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) -- vwsz1=_deref_pwsz2 + //SEG71 [37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) -- vwsz1=_deref_pwsz2 ldy #0 lda (_3),y sta sin2_val iny lda (_3),y sta sin2_val+1 - //SEG75 [40] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz2_plus_vbsc1 + //SEG72 [38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz2_plus_vbsc1 lda #$a sta $fe ora #$7f @@ -4121,74 +4265,74 @@ render_sine: { lda sin2_val+1 adc $ff sta wrap_y.y+1 - //SEG76 [41] call wrap_y - //SEG77 [61] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y] + //SEG73 [39] call wrap_y + //SEG74 [59] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y] wrap_y_from_b4: - //SEG78 [61] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@4->wrap_y#0] -- register_copy + //SEG75 [59] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@4->wrap_y#0] -- register_copy jsr wrap_y - //SEG79 [42] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 -- vbuz1=vbuz2 + //SEG76 [40] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 -- vbuz1=vbuz2 lda wrap_y.return_2 sta wrap_y.return_1 jmp b5 - //SEG80 render_sine::@5 + //SEG77 render_sine::@5 b5: - //SEG81 [43] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuz1=vbuz2 + //SEG78 [41] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuz1=vbuz2 lda wrap_y.return_1 sta ypos2 - //SEG82 [44] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 -- vwuz1=vwuz2 + //SEG79 [42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 -- vwuz1=vwuz2 lda xpos sta bitmap_plot.x lda xpos+1 sta bitmap_plot.x+1 - //SEG83 [45] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 -- vbuz1=vbuz2 + //SEG80 [43] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 -- vbuz1=vbuz2 lda ypos2 sta bitmap_plot.y - //SEG84 [46] call bitmap_plot - //SEG85 [54] phi from render_sine::@5 to bitmap_plot [phi:render_sine::@5->bitmap_plot] + //SEG81 [44] call bitmap_plot + //SEG82 [52] phi from render_sine::@5 to bitmap_plot [phi:render_sine::@5->bitmap_plot] bitmap_plot_from_b5: - //SEG86 [54] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@5->bitmap_plot#0] -- register_copy - //SEG87 [54] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@5->bitmap_plot#1] -- register_copy + //SEG83 [52] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@5->bitmap_plot#0] -- register_copy + //SEG84 [52] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@5->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp b6 - //SEG88 render_sine::@6 + //SEG85 render_sine::@6 b6: - //SEG89 [47] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 + //SEG86 [45] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 inc xpos bne !+ inc xpos+1 !: - //SEG90 [48] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 -- vwuz1_neq_vwuc1_then_la1 + //SEG87 [46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 -- vwuz1_neq_vwuc1_then_la1 lda xpos+1 cmp #>$140 bne b7_from_b6 lda xpos cmp #<$140 bne b7_from_b6 - //SEG91 [50] phi from render_sine::@6 to render_sine::@2 [phi:render_sine::@6->render_sine::@2] + //SEG88 [48] phi from render_sine::@6 to render_sine::@2 [phi:render_sine::@6->render_sine::@2] b2_from_b6: - //SEG92 [50] phi (word) render_sine::xpos#8 = (byte) 0 [phi:render_sine::@6->render_sine::@2#0] -- vwuz1=vbuc1 + //SEG89 [48] phi (word) render_sine::xpos#8 = (byte) 0 [phi:render_sine::@6->render_sine::@2#0] -- vwuz1=vbuc1 lda #0 sta xpos lda #0 sta xpos+1 jmp b2 - //SEG93 [49] phi from render_sine::@6 to render_sine::@7 [phi:render_sine::@6->render_sine::@7] + //SEG90 [47] phi from render_sine::@6 to render_sine::@7 [phi:render_sine::@6->render_sine::@7] b7_from_b6: jmp b7 - //SEG94 render_sine::@7 + //SEG91 render_sine::@7 b7: - //SEG95 [50] phi from render_sine::@7 to render_sine::@2 [phi:render_sine::@7->render_sine::@2] + //SEG92 [48] phi from render_sine::@7 to render_sine::@2 [phi:render_sine::@7->render_sine::@2] b2_from_b7: - //SEG96 [50] phi (word) render_sine::xpos#8 = (word) render_sine::xpos#1 [phi:render_sine::@7->render_sine::@2#0] -- register_copy + //SEG93 [48] phi (word) render_sine::xpos#8 = (word) render_sine::xpos#1 [phi:render_sine::@7->render_sine::@2#0] -- register_copy jmp b2 - //SEG97 render_sine::@2 + //SEG94 render_sine::@2 b2: - //SEG98 [51] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 + //SEG95 [49] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 inc sin_idx bne !+ inc sin_idx+1 !: - //SEG99 [52] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG96 [50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 -- vwuz1_lt_vwuc1_then_la1 lda sin_idx+1 cmp #>SIN_SIZE bcc b1_from_b2 @@ -4198,35 +4342,35 @@ render_sine: { bcc b1_from_b2 !: jmp breturn - //SEG100 render_sine::@return + //SEG97 render_sine::@return breturn: - //SEG101 [53] return + //SEG98 [51] return rts } -//SEG102 bitmap_plot +//SEG99 bitmap_plot // Plot a single dot in the bitmap // bitmap_plot(word zeropage(7) x, byte zeropage(6) y) bitmap_plot: { - .label _1 = $53 - .label _2 = $57 - .label plotter = $55 + .label _1 = $54 + .label _2 = $58 + .label plotter = $56 .label x = 7 .label y = 6 - .label _3 = $51 - //SEG103 [55] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 + .label _3 = $52 + //SEG100 [53] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 ldy y lda bitmap_plot_yhi,y sta _3+1 lda bitmap_plot_ylo,y sta _3 - //SEG104 [56] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + //SEG101 [54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 lda x and #<$fff8 sta _1 lda x+1 and #>$fff8 sta _1+1 - //SEG105 [57] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 + //SEG102 [55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz2_plus_vwuz3 lda _3 clc adc _1 @@ -4234,10 +4378,10 @@ bitmap_plot: { lda _3+1 adc _1+1 sta plotter+1 - //SEG106 [58] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuz1=_lo_vwuz2 + //SEG103 [56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuz1=_lo_vwuz2 lda x sta _2 - //SEG107 [59] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 + //SEG104 [57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 ldy #0 lda (plotter),y ldy _2 @@ -4245,26 +4389,26 @@ bitmap_plot: { ldy #0 sta (plotter),y jmp breturn - //SEG108 bitmap_plot::@return + //SEG105 bitmap_plot::@return breturn: - //SEG109 [60] return + //SEG106 [58] return rts } -//SEG110 wrap_y +//SEG107 wrap_y // wrap_y(signed word zeropage(9) y) wrap_y: { .label y = 9 - .label return = $47 - .label return_1 = $4f - .label return_2 = $58 - //SEG111 [62] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1] + .label return = $48 + .label return_1 = $50 + .label return_2 = $59 + //SEG108 [60] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1] b1_from_wrap_y: b1_from_b2: - //SEG112 [62] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy + //SEG109 [60] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy jmp b1 - //SEG113 wrap_y::@1 + //SEG110 wrap_y::@1 b1: - //SEG114 [63] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 + //SEG111 [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 lda y cmp #<$c8 lda y+1 @@ -4273,30 +4417,30 @@ wrap_y: { eor #$80 !: bpl b2 - //SEG115 [64] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3] + //SEG112 [62] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3] b3_from_b1: b3_from_b4: - //SEG116 [64] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy + //SEG113 [62] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy jmp b3 - //SEG117 wrap_y::@3 + //SEG114 wrap_y::@3 b3: - //SEG118 [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 + //SEG115 [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 lda y+1 bmi b4 jmp b5 - //SEG119 wrap_y::@5 + //SEG116 wrap_y::@5 b5: - //SEG120 [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuz1=_byte_vwsz2 + //SEG117 [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuz1=_byte_vwsz2 lda y sta return_2 jmp breturn - //SEG121 wrap_y::@return + //SEG118 wrap_y::@return breturn: - //SEG122 [67] return + //SEG119 [65] return rts - //SEG123 wrap_y::@4 + //SEG120 wrap_y::@4 b4: - //SEG124 [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 + //SEG121 [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 clc lda y adc #<$c8 @@ -4305,9 +4449,9 @@ wrap_y: { adc #>$c8 sta y+1 jmp b3_from_b4 - //SEG125 wrap_y::@2 + //SEG122 wrap_y::@2 b2: - //SEG126 [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 + //SEG123 [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 lda y sec sbc #<$c8 @@ -4317,7 +4461,7 @@ wrap_y: { sta y+1 jmp b1_from_b2 } -//SEG127 sin16s_gen2 +//SEG124 sin16s_gen2 // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) @@ -4326,17 +4470,17 @@ sin16s_gen2: { .const min = -$140 .const max = $140 .label ampl = max-min - .label _5 = $69 - .label _6 = $6d - .label step = $5d + .label _5 = $6a + .label _6 = $6e + .label step = $5e .label sintab = $f .label x = $b .label i = $11 - //SEG128 [71] call div32u16u - //SEG129 [159] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + //SEG125 [69] call div32u16u + //SEG126 [157] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - //SEG130 [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 + //SEG127 [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 -- vduz1=vduz2 lda div32u16u.return sta div32u16u.return_2 lda div32u16u.return+1 @@ -4346,9 +4490,9 @@ sin16s_gen2: { lda div32u16u.return+3 sta div32u16u.return_2+3 jmp b2 - //SEG131 sin16s_gen2::@2 + //SEG128 sin16s_gen2::@2 b2: - //SEG132 [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 + //SEG129 [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 -- vduz1=vduz2 lda div32u16u.return_2 sta step lda div32u16u.return_2+1 @@ -4357,19 +4501,19 @@ sin16s_gen2: { sta step+2 lda div32u16u.return_2+3 sta step+3 - //SEG133 [74] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG130 [72] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - //SEG134 [74] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + //SEG131 [72] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #0 sta i lda #0 sta i+1 - //SEG135 [74] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) sin#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + //SEG132 [72] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) sin#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #sin sta sintab+1 - //SEG136 [74] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + //SEG133 [72] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -4378,15 +4522,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - //SEG137 [74] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG134 [72] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - //SEG138 [74] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - //SEG139 [74] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - //SEG140 [74] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG135 [72] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG136 [72] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG137 [72] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 - //SEG141 sin16s_gen2::@1 + //SEG138 sin16s_gen2::@1 b1: - //SEG142 [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + //SEG139 [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -4395,24 +4539,24 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - //SEG143 [76] call sin16s + //SEG140 [74] call sin16s jsr sin16s - //SEG144 [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 + //SEG141 [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 -- vwsz1=vwsz2 lda sin16s.return_1 sta sin16s.return lda sin16s.return_1+1 sta sin16s.return+1 jmp b3 - //SEG145 sin16s_gen2::@3 + //SEG142 sin16s_gen2::@3 b3: - //SEG146 [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 + //SEG143 [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 -- vwsz1=vwsz2 lda sin16s.return sta mul16s.a lda sin16s.return+1 sta mul16s.a+1 - //SEG147 [79] call mul16s + //SEG144 [77] call mul16s jsr mul16s - //SEG148 [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 + //SEG145 [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 -- vdsz1=vdsz2 lda mul16s.return sta mul16s.return_2 lda mul16s.return+1 @@ -4422,9 +4566,9 @@ sin16s_gen2: { lda mul16s.return+3 sta mul16s.return_2+3 jmp b4 - //SEG149 sin16s_gen2::@4 + //SEG146 sin16s_gen2::@4 b4: - //SEG150 [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 + //SEG147 [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 -- vdsz1=vdsz2 lda mul16s.return_2 sta _5 lda mul16s.return_2+1 @@ -4433,19 +4577,19 @@ sin16s_gen2: { sta _5+2 lda mul16s.return_2+3 sta _5+3 - //SEG151 [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + //SEG148 [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _6 lda _5+3 sta _6+1 - //SEG152 [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + //SEG149 [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 ldy #0 lda _6 sta (sintab),y iny lda _6+1 sta (sintab),y - //SEG153 [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + //SEG150 [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -4453,7 +4597,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - //SEG154 [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + //SEG151 [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -4467,12 +4611,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - //SEG155 [86] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + //SEG152 [84] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG156 [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG153 [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>SIN_SIZE bcc b1_from_b4 @@ -4482,32 +4626,32 @@ sin16s_gen2: { bcc b1_from_b4 !: jmp breturn - //SEG157 sin16s_gen2::@return + //SEG154 sin16s_gen2::@return breturn: - //SEG158 [88] return + //SEG155 [86] return rts } -//SEG159 mul16s +//SEG156 mul16s // Multiply of two signed words to a signed double word // Fixes offsets introduced by using unsigned multiplication -// mul16s(signed word zeropage($63) a) +// mul16s(signed word zeropage($64) a) mul16s: { - .label _9 = $73 - .label _16 = $75 + .label _9 = $74 + .label _16 = $76 .label m = $13 - .label return = $77 - .label a = $63 - .label return_2 = $65 - //SEG160 [89] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 + .label return = $78 + .label a = $64 + .label return_2 = $66 + //SEG157 [87] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 lda a sta mul16u.a lda a+1 sta mul16u.a+1 - //SEG161 [90] call mul16u - //SEG162 [100] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG158 [88] call mul16u + //SEG159 [98] phi from mul16s to mul16u [phi:mul16s->mul16u] mul16u_from_mul16s: - //SEG163 [100] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy - //SEG164 [100] phi (dword) mul16u::mb#0 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vduz1=vduc1 + //SEG160 [98] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG161 [98] phi (dword) mul16u::mb#0 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vduz1=vduc1 lda #sin16s_gen2.ampl @@ -4517,7 +4661,7 @@ mul16s: { lda #>sin16s_gen2.ampl>>$10 sta mul16u.mb+3 jsr mul16u - //SEG165 [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 -- vduz1=vduz2 + //SEG162 [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 -- vduz1=vduz2 lda mul16u.res sta mul16u.return lda mul16u.res+1 @@ -4527,9 +4671,9 @@ mul16s: { lda mul16u.res+3 sta mul16u.return+3 jmp b4 - //SEG166 mul16s::@4 + //SEG163 mul16s::@4 b4: - //SEG167 [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 -- vduz1=vduz2 + //SEG164 [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 -- vduz1=vduz2 lda mul16u.return sta m lda mul16u.return+1 @@ -4538,18 +4682,18 @@ mul16s: { sta m+2 lda mul16u.return+3 sta m+3 - //SEG168 [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + //SEG165 [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 lda a+1 bpl b1_from_b4 jmp b3 - //SEG169 mul16s::@3 + //SEG166 mul16s::@3 b3: - //SEG170 [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + //SEG167 [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 lda m+2 sta _9 lda m+3 sta _9+1 - //SEG171 [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz2_minus_vwuc1 + //SEG168 [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz2_minus_vwuc1 lda _9 sec sbc #sin16s_gen2.ampl sta _16+1 - //SEG172 [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + //SEG169 [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 lda _16 sta m+2 lda _16+1 sta m+3 - //SEG173 [97] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1] + //SEG170 [95] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1] b1_from_b3: b1_from_b4: - //SEG174 [97] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy + //SEG171 [95] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy jmp b1 - //SEG175 mul16s::@1 + //SEG172 mul16s::@1 b1: jmp b2 - //SEG176 mul16s::@2 + //SEG173 mul16s::@2 b2: - //SEG177 [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 -- vdsz1=vdsz2 + //SEG174 [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 -- vdsz1=vdsz2 lda m sta return lda m+1 @@ -4582,60 +4726,60 @@ mul16s: { lda m+3 sta return+3 jmp breturn - //SEG178 mul16s::@return + //SEG175 mul16s::@return breturn: - //SEG179 [99] return + //SEG176 [97] return rts } -//SEG180 mul16u +//SEG177 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word // mul16u(word zeropage($19) a, word zeropage($17) b) mul16u: { - .label _1 = $7b + .label _1 = $7c .label mb = $1f .label a = $19 .label res = $1b - .label return = $6f + .label return = $70 .label b = $17 - .label return_3 = $9c - //SEG181 [101] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + .label return_3 = $9d + //SEG178 [99] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] b1_from_mul16u: - //SEG182 [101] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy - //SEG183 [101] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + //SEG179 [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG180 [99] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 lda #0 sta res lda #0 sta res+1 sta res+2 sta res+3 - //SEG184 [101] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG181 [99] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy jmp b1 - //SEG185 mul16u::@1 + //SEG182 mul16u::@1 b1: - //SEG186 [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + //SEG183 [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 lda a bne b2 lda a+1 bne b2 jmp breturn - //SEG187 mul16u::@return + //SEG184 mul16u::@return breturn: - //SEG188 [103] return + //SEG185 [101] return rts - //SEG189 mul16u::@2 + //SEG186 mul16u::@2 b2: - //SEG190 [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuz1=vwuz2_band_vbuc1 + //SEG187 [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuz1=vwuz2_band_vbuc1 lda a and #1 sta _1 - //SEG191 [105] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuz1_eq_0_then_la1 + //SEG188 [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuz1_eq_0_then_la1 lda _1 cmp #0 beq b3_from_b2 jmp b4 - //SEG192 mul16u::@4 + //SEG189 mul16u::@4 b4: - //SEG193 [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + //SEG190 [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 lda res clc adc mb @@ -4649,51 +4793,51 @@ mul16u: { lda res+3 adc mb+3 sta res+3 - //SEG194 [107] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG191 [105] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] b3_from_b2: b3_from_b4: - //SEG195 [107] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG192 [105] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy jmp b3 - //SEG196 mul16u::@3 + //SEG193 mul16u::@3 b3: - //SEG197 [108] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG194 [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr a+1 ror a - //SEG198 [109] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + //SEG195 [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 asl mb rol mb+1 rol mb+2 rol mb+3 - //SEG199 [101] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG196 [99] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] b1_from_b3: - //SEG200 [101] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy - //SEG201 [101] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy - //SEG202 [101] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + //SEG197 [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG198 [99] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG199 [99] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy jmp b1 } -//SEG203 sin16s +//SEG200 sin16s // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff // sin16s(dword zeropage($24) x) sin16s: { - .label _4 = $7c + .label _4 = $7d .label x = $24 - .label return = $61 - .label x1 = $80 - .label x2 = $84 - .label x3 = $88 - .label x3_6 = $8c - .label usinx = $8e - .label x4 = $92 - .label x5 = $96 - .label x5_128 = $98 - .label usinx_1 = $9a + .label return = $62 + .label x1 = $81 + .label x2 = $85 + .label x3 = $89 + .label x3_6 = $8d + .label usinx = $8f + .label x4 = $93 + .label x5 = $97 + .label x5_128 = $99 + .label usinx_1 = $9b .label return_1 = $28 .label sinx = $28 .label isUpper = $23 .label return_5 = $28 - //SEG204 [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + //SEG201 [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -4711,9 +4855,9 @@ sin16s: { bcc b1_from_sin16s !: jmp b4 - //SEG205 sin16s::@4 + //SEG202 sin16s::@4 b4: - //SEG206 [111] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + //SEG203 [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #PI_u4f28>>$10 sta x+3 - //SEG207 [112] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG204 [110] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - //SEG208 [112] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG205 [110] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - //SEG209 [112] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + //SEG206 [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - //SEG210 [112] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + //SEG207 [110] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - //SEG211 [112] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG208 [110] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - //SEG212 [112] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG209 [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 - //SEG213 sin16s::@1 + //SEG210 sin16s::@1 b1: - //SEG214 [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + //SEG211 [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -4761,9 +4905,9 @@ sin16s: { bcc b2_from_b1 !: jmp b5 - //SEG215 sin16s::@5 + //SEG212 sin16s::@5 b5: - //SEG216 [114] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + //SEG213 [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #PI_u4f28>>$10 sbc x+3 sta x+3 - //SEG217 [115] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG214 [113] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - //SEG218 [115] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG215 [113] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 - //SEG219 sin16s::@2 + //SEG216 sin16s::@2 b2: - //SEG220 [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 + //SEG217 [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz2_rol_3 lda x sta _4 lda x+1 @@ -4801,107 +4945,107 @@ sin16s: { rol _4+3 dey bne !- - //SEG221 [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + //SEG218 [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - //SEG222 [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG219 [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - //SEG223 [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG220 [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG224 [120] call mulu16_sel - //SEG225 [150] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG221 [118] call mulu16_sel + //SEG222 [148] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - //SEG226 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG223 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - //SEG227 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - //SEG228 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + //SEG224 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG225 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG229 [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG226 [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return lda mulu16_sel.return_12+1 sta mulu16_sel.return+1 jmp b7 - //SEG230 sin16s::@7 + //SEG227 sin16s::@7 b7: - //SEG231 [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + //SEG228 [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - //SEG232 [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 + //SEG229 [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 -- vwuz1=vwuz2 lda x2 sta mulu16_sel.v1 lda x2+1 sta mulu16_sel.v1+1 - //SEG233 [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG230 [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG234 [125] call mulu16_sel - //SEG235 [150] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG231 [123] call mulu16_sel + //SEG232 [148] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - //SEG236 [150] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG233 [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - //SEG237 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - //SEG238 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + //SEG234 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG235 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG239 [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG236 [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_1 lda mulu16_sel.return_12+1 sta mulu16_sel.return_1+1 jmp b8 - //SEG240 sin16s::@8 + //SEG237 sin16s::@8 b8: - //SEG241 [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 + //SEG238 [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 -- vwuz1=vwuz2 lda mulu16_sel.return_1 sta x3 lda mulu16_sel.return_1+1 sta x3+1 - //SEG242 [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + //SEG239 [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - //SEG243 [129] call mulu16_sel - //SEG244 [150] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG240 [127] call mulu16_sel + //SEG241 [148] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - //SEG245 [150] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG242 [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuz1=vbuc1 lda #1 sta mulu16_sel.select - //SEG246 [150] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + //SEG243 [148] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - //SEG247 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + //SEG244 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG248 [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG245 [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_2 lda mulu16_sel.return_12+1 sta mulu16_sel.return_2+1 jmp b9 - //SEG249 sin16s::@9 + //SEG246 sin16s::@9 b9: - //SEG250 [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 + //SEG247 [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 -- vwuz1=vwuz2 lda mulu16_sel.return_2 sta x3_6 lda mulu16_sel.return_2+1 sta x3_6+1 - //SEG251 [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + //SEG248 [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -4909,82 +5053,84 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - //SEG252 [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 + //SEG249 [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 -- vwuz1=vwuz2 lda x3 sta mulu16_sel.v1 lda x3+1 sta mulu16_sel.v1+1 - //SEG253 [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG250 [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG254 [135] call mulu16_sel - //SEG255 [150] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG251 [133] call mulu16_sel + //SEG252 [148] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - //SEG256 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG253 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - //SEG257 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - //SEG258 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + //SEG254 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG255 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG259 [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG256 [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_10 lda mulu16_sel.return_12+1 sta mulu16_sel.return_10+1 jmp b10 - //SEG260 sin16s::@10 + //SEG257 sin16s::@10 b10: - //SEG261 [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 + //SEG258 [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 -- vwuz1=vwuz2 lda mulu16_sel.return_10 sta x4 lda mulu16_sel.return_10+1 sta x4+1 - //SEG262 [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 + //SEG259 [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 -- vwuz1=vwuz2 lda x4 sta mulu16_sel.v1 lda x4+1 sta mulu16_sel.v1+1 - //SEG263 [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG260 [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG264 [140] call mulu16_sel - //SEG265 [150] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG261 [138] call mulu16_sel + //SEG262 [148] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - //SEG266 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 + //SEG263 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuz1=vbuc1 lda #0 sta mulu16_sel.select - //SEG267 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - //SEG268 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + //SEG264 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG265 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG269 [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG266 [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return_12 sta mulu16_sel.return_11 lda mulu16_sel.return_12+1 sta mulu16_sel.return_11+1 jmp b11 - //SEG270 sin16s::@11 + //SEG267 sin16s::@11 b11: - //SEG271 [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 + //SEG268 [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 -- vwuz1=vwuz2 lda mulu16_sel.return_11 sta x5 lda mulu16_sel.return_11+1 sta x5+1 - //SEG272 [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + //SEG269 [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 + lsr sta x5_128+1 lda x5 + ror sta x5_128 - ldy #4 - !: lsr x5_128+1 ror x5_128 - dey - bne !- - //SEG273 [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 + //SEG270 [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc adc x5_128 @@ -4992,75 +5138,73 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx_1+1 - //SEG274 [145] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + //SEG271 [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 - //SEG275 sin16s::@6 + //SEG272 sin16s::@6 b6: - //SEG276 [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 + //SEG273 [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz2 sec - lda usinx_1 - eor #$ff - adc #0 + lda #0 + sbc usinx_1 sta sinx - lda usinx_1+1 - eor #$ff - adc #0 + lda #0 + sbc usinx_1+1 sta sinx+1 - //SEG277 [147] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG274 [145] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - //SEG278 [147] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG275 [145] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 - //SEG279 sin16s::@3 + //SEG276 sin16s::@3 b3: jmp breturn - //SEG280 sin16s::@return + //SEG277 sin16s::@return breturn: - //SEG281 [148] return + //SEG278 [146] return rts - //SEG282 sin16s::@12 + //SEG279 sin16s::@12 b12: - //SEG283 [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 + //SEG280 [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 -- vwsz1=vwsz2 lda usinx_1 sta return_5 lda usinx_1+1 sta return_5+1 jmp b3_from_b12 } -//SEG284 mulu16_sel +//SEG281 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip // mulu16_sel(word zeropage($2a) v1, word zeropage($2c) v2, byte zeropage($2e) select) mulu16_sel: { - .label _0 = $a0 - .label _1 = $a4 + .label _0 = $a1 + .label _1 = $a5 .label v1 = $2a .label v2 = $2c - .label return = $82 - .label return_1 = $86 - .label return_2 = $8a - .label return_10 = $90 - .label return_11 = $94 + .label return = $83 + .label return_1 = $87 + .label return_2 = $8b + .label return_10 = $91 + .label return_11 = $95 .label select = $2e - .label return_12 = $a8 - //SEG285 [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + .label return_12 = $a9 + //SEG282 [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - //SEG286 [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 + //SEG283 [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 -- vwuz1=vwuz2 lda v2 sta mul16u.b lda v2+1 sta mul16u.b+1 - //SEG287 [153] call mul16u - //SEG288 [100] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG284 [151] call mul16u + //SEG285 [98] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: - //SEG289 [100] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy - //SEG290 [100] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + //SEG286 [98] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG287 [98] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 lda mul16u.b sta mul16u.mb lda mul16u.b+1 @@ -5069,7 +5213,7 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - //SEG291 [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 + //SEG288 [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 -- vduz1=vduz2 lda mul16u.res sta mul16u.return_3 lda mul16u.res+1 @@ -5079,9 +5223,9 @@ mulu16_sel: { lda mul16u.res+3 sta mul16u.return_3+3 jmp b1 - //SEG292 mulu16_sel::@1 + //SEG289 mulu16_sel::@1 b1: - //SEG293 [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 + //SEG290 [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 -- vduz1=vduz2 lda mul16u.return_3 sta _0 lda mul16u.return_3+1 @@ -5090,7 +5234,7 @@ mulu16_sel: { sta _0+2 lda mul16u.return_3+3 sta _0+3 - //SEG294 [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 + //SEG291 [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz2_rol_vbuz3 lda _0 sta _1 lda _0+1 @@ -5109,81 +5253,81 @@ mulu16_sel: { dex bne !- !e: - //SEG295 [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + //SEG292 [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return_12 lda _1+3 sta return_12+1 jmp breturn - //SEG296 mulu16_sel::@return + //SEG293 mulu16_sel::@return breturn: - //SEG297 [158] return + //SEG294 [156] return rts } -//SEG298 div32u16u +//SEG295 div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $ac - .label quotient_lo = $b0 - .label return = $b2 - .label return_2 = $59 - //SEG299 [160] call divr16u - //SEG300 [169] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + .label quotient_hi = $ad + .label quotient_lo = $b1 + .label return = $b3 + .label return_2 = $5a + //SEG296 [158] call divr16u + //SEG297 [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - //SEG301 [169] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + //SEG298 [167] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - //SEG302 [169] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + //SEG299 [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #0 sta divr16u.rem lda #0 sta divr16u.rem+1 jsr divr16u - //SEG303 [161] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + //SEG300 [159] (word) divr16u::return#2 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_2 lda divr16u.return+1 sta divr16u.return_2+1 jmp b1 - //SEG304 div32u16u::@1 + //SEG301 div32u16u::@1 b1: - //SEG305 [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + //SEG302 [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return_2 sta quotient_hi lda divr16u.return_2+1 sta quotient_hi+1 - //SEG306 [163] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 + //SEG303 [161] (word) divr16u::rem#4 ← (word) rem16u#1 -- vwuz1=vwuz2 lda rem16u sta divr16u.rem lda rem16u+1 sta divr16u.rem+1 - //SEG307 [164] call divr16u - //SEG308 [169] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG304 [162] call divr16u + //SEG305 [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - //SEG309 [169] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + //SEG306 [167] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #PI2_u4f28&$ffff sta divr16u.dividend+1 - //SEG310 [169] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + //SEG307 [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - //SEG311 [165] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 + //SEG308 [163] (word) divr16u::return#3 ← (word) divr16u::return#0 -- vwuz1=vwuz2 lda divr16u.return sta divr16u.return_3 lda divr16u.return+1 sta divr16u.return_3+1 jmp b2 - //SEG312 div32u16u::@2 + //SEG309 div32u16u::@2 b2: - //SEG313 [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 + //SEG310 [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 -- vwuz1=vwuz2 lda divr16u.return_3 sta quotient_lo lda divr16u.return_3+1 sta quotient_lo+1 - //SEG314 [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + //SEG311 [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -5193,84 +5337,84 @@ div32u16u: { lda quotient_lo+1 sta return+1 jmp breturn - //SEG315 div32u16u::@return + //SEG312 div32u16u::@return breturn: - //SEG316 [168] return + //SEG313 [166] return rts } -//SEG317 divr16u +//SEG314 divr16u // Performs division on two 16 bit unsigned words and an initial remainder // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division // divr16u(word zeropage($31) dividend, word zeropage($2f) rem) divr16u: { - .label _1 = $b6 - .label _2 = $b7 + .label _1 = $b7 + .label _2 = $b8 .label rem = $2f .label dividend = $31 .label quotient = $33 .label i = $35 .label return = $33 - .label return_2 = $aa - .label return_3 = $ae - //SEG318 [170] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + .label return_2 = $ab + .label return_3 = $af + //SEG315 [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - //SEG319 [170] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 + //SEG316 [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG320 [170] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + //SEG317 [168] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #0 sta quotient lda #0 sta quotient+1 - //SEG321 [170] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - //SEG322 [170] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG318 [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG319 [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - //SEG323 [170] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG320 [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - //SEG324 [170] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - //SEG325 [170] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - //SEG326 [170] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - //SEG327 [170] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG321 [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG322 [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG323 [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG324 [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 - //SEG328 divr16u::@1 + //SEG325 divr16u::@1 b1: - //SEG329 [171] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG326 [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - //SEG330 [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 + //SEG327 [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuz1=_hi_vwuz2 lda dividend+1 sta _1 - //SEG331 [173] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + //SEG328 [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and _1 sta _2 - //SEG332 [174] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 + //SEG329 [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuz1_eq_0_then_la1 lda _2 cmp #0 beq b2_from_b1 jmp b4 - //SEG333 divr16u::@4 + //SEG330 divr16u::@4 b4: - //SEG334 [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + //SEG331 [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - //SEG335 [176] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG332 [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - //SEG336 [176] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG333 [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 - //SEG337 divr16u::@2 + //SEG334 divr16u::@2 b2: - //SEG338 [177] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG335 [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - //SEG339 [178] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG336 [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - //SEG340 [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + //SEG337 [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>SIN_SIZE bcc b3_from_b2 @@ -5280,14 +5424,14 @@ divr16u: { bcc b3_from_b2 !: jmp b5 - //SEG341 divr16u::@5 + //SEG338 divr16u::@5 b5: - //SEG342 [180] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + //SEG339 [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - //SEG343 [181] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 -- vwuz1=vwuz1_minus_vwuc1 + //SEG340 [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #SIN_SIZE sta rem+1 - //SEG344 [182] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG341 [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - //SEG345 [182] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - //SEG346 [182] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG342 [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG343 [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 - //SEG347 divr16u::@3 + //SEG344 divr16u::@3 b3: - //SEG348 [183] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 + //SEG345 [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG349 [184] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG346 [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp i bne b1_from_b3 jmp b6 - //SEG350 divr16u::@6 + //SEG347 divr16u::@6 b6: - //SEG351 [185] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 + //SEG348 [183] (word) rem16u#1 ← (word) divr16u::rem#11 -- vwuz1=vwuz2 lda rem sta rem16u lda rem+1 sta rem16u+1 jmp breturn - //SEG352 divr16u::@return + //SEG349 divr16u::@return breturn: - //SEG353 [186] return + //SEG350 [184] return rts } -//SEG354 bitmap_clear +//SEG351 bitmap_clear // Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with bitmap_clear: { - .label bitmap = $37 - .label x = $39 - .label y = $36 - .label _3 = $ba - //SEG355 [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 - lda bitmap_plot_ylo - sta _3 - lda bitmap_plot_yhi - sta _3+1 - //SEG356 [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 -- pbuz1=pbuz2 - lda _3 - sta bitmap - lda _3+1 - sta bitmap+1 - //SEG357 [189] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + .const col = WHITE*$10 + //SEG352 [186] call memset + //SEG353 [190] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + memset_from_bitmap_clear: + //SEG354 [190] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuz1=vbuc1 + lda #col + sta memset.c + //SEG355 [190] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + //SEG356 [190] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memset.str+1 + jsr memset + //SEG357 [187] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: - //SEG358 [189] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 - lda #0 - sta y - //SEG359 [189] phi (byte*) bitmap_clear::bitmap#3 = (byte*~) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy jmp b1 - //SEG360 [189] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] - b1_from_b3: - //SEG361 [189] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy - //SEG362 [189] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy - jmp b1 - //SEG363 bitmap_clear::@1 + //SEG358 bitmap_clear::@1 b1: - //SEG364 [190] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] - b2_from_b1: - //SEG365 [190] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuz1=vbuc1 + //SEG359 [188] call memset + //SEG360 [190] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + memset_from_b1: + //SEG361 [190] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuz1=vbuc1 lda #0 - sta x - //SEG366 [190] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy - jmp b2 - //SEG367 [190] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] - b2_from_b2: - //SEG368 [190] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy - //SEG369 [190] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy - jmp b2 - //SEG370 bitmap_clear::@2 - b2: - //SEG371 [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 - lda #0 - ldy #0 - sta (bitmap),y - //SEG372 [192] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 - inc bitmap - bne !+ - inc bitmap+1 - !: - //SEG373 [193] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuz1=_inc_vbuz1 - inc x - //SEG374 [194] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuz1_neq_vbuc1_then_la1 - lda #$c8 - cmp x - bne b2_from_b2 - jmp b3 - //SEG375 bitmap_clear::@3 - b3: - //SEG376 [195] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 - inc y - //SEG377 [196] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$28 - cmp y - bne b1_from_b3 + sta memset.c + //SEG362 [190] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + //SEG363 [190] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + lda #BITMAP + sta memset.str+1 + jsr memset jmp breturn - //SEG378 bitmap_clear::@return + //SEG364 bitmap_clear::@return breturn: - //SEG379 [197] return + //SEG365 [189] return rts } -//SEG380 bitmap_init +//SEG366 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($36) str, byte zeropage($3a) c, word zeropage($38) num) +memset: { + .label end = $bb + .label dst = $3b + .label str = $36 + .label num = $38 + .label c = $3a + //SEG367 [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz3 + lda str + clc + adc num + sta end + lda str+1 + adc num+1 + sta end+1 + //SEG368 [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 -- pbuz1=pbuz2 + lda str + sta dst + lda str+1 + sta dst+1 + //SEG369 [193] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + b1_from_memset: + b1_from_b1: + //SEG370 [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + jmp b1 + //SEG371 memset::@1 + b1: + //SEG372 [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuz2 + lda c + ldy #0 + sta (dst),y + //SEG373 [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG374 [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + lda dst+1 + cmp end+1 + bne b1_from_b1 + lda dst + cmp end + bne b1_from_b1 + jmp breturn + //SEG375 memset::@return + breturn: + //SEG376 [197] return + rts +} +//SEG377 bitmap_init // Initialize bitmap plotting tables bitmap_init: { - .label _4 = $bd - .label _5 = $be - .label _6 = $bf - .label _7 = $bc - .label bits = $3a - .label x = $3b - .label y = $3c - .label yoffs = $3d - //SEG381 [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + .label _4 = $be + .label _5 = $bf + .label _6 = $c0 + .label _7 = $bd + .label bits = $3d + .label x = $3e + .label y = $3f + .label yoffs = $40 + //SEG378 [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - //SEG382 [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + //SEG379 [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #0 sta x - //SEG383 [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + //SEG380 [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #$80 sta bits jmp b1 - //SEG384 [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG381 [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - //SEG385 [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - //SEG386 [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG382 [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG383 [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 - //SEG387 bitmap_init::@1 + //SEG384 bitmap_init::@1 b1: - //SEG388 [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG385 [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda bits ldy x sta bitmap_plot_bit,y - //SEG389 [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + //SEG386 [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr bits - //SEG390 [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + //SEG387 [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda bits cmp #0 bne b6_from_b1 - //SEG391 [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG388 [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - //SEG392 [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + //SEG389 [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta bits jmp b2 - //SEG393 [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG390 [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 - //SEG394 bitmap_init::@6 + //SEG391 bitmap_init::@6 b6: - //SEG395 [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG392 [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - //SEG396 [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG393 [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 - //SEG397 bitmap_init::@2 + //SEG394 bitmap_init::@2 b2: - //SEG398 [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + //SEG395 [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG399 [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + //SEG396 [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda x cmp #0 bne b1_from_b2 - //SEG400 [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG397 [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - //SEG401 [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + //SEG398 [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #BITMAP sta yoffs+1 - //SEG402 [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + //SEG399 [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta y jmp b3 - //SEG403 [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG400 [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - //SEG404 [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - //SEG405 [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG401 [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG402 [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 - //SEG406 bitmap_init::@3 + //SEG403 bitmap_init::@3 b3: - //SEG407 [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + //SEG404 [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and y sta _7 - //SEG408 [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + //SEG405 [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda yoffs sta _4 - //SEG409 [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 + //SEG406 [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuz1=vbuz2_bor_vbuz3 lda _7 ora _4 sta _5 - //SEG410 [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG407 [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuz1=vbuz2 lda _5 ldy y sta bitmap_plot_ylo,y - //SEG411 [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + //SEG408 [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda yoffs+1 sta _6 - //SEG412 [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG409 [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuz1=vbuz2 lda _6 ldy y sta bitmap_plot_yhi,y - //SEG413 [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + //SEG410 [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 - //SEG414 bitmap_init::@5 + //SEG411 bitmap_init::@5 b5: - //SEG415 [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + //SEG412 [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -5513,68 +5684,26 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - //SEG416 [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG413 [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - //SEG417 [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG414 [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 - //SEG418 bitmap_init::@4 + //SEG415 bitmap_init::@4 b4: - //SEG419 [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + //SEG416 [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc y - //SEG420 [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + //SEG417 [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda y cmp #0 bne b3_from_b4 jmp breturn - //SEG421 bitmap_init::@return + //SEG418 bitmap_init::@return breturn: - //SEG422 [219] return - rts -} -//SEG423 memset -// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -memset: { - .const num = $3e8 - .label str = SCREEN - .label end = str+num - .label dst = $3f - //SEG424 [221] phi from memset to memset::@1 [phi:memset->memset::@1] - b1_from_memset: - //SEG425 [221] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 - lda #str - sta dst+1 - jmp b1 - //SEG426 [221] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1] - b1_from_b1: - //SEG427 [221] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy - jmp b1 - //SEG428 memset::@1 - b1: - //SEG429 [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 -- _deref_pbuz1=vbuc1 - lda #WHITE - ldy #0 - sta (dst),y - //SEG430 [223] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 - inc dst - bne !+ - inc dst+1 - !: - //SEG431 [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 - lda dst+1 - cmp #>end - bne b1_from_b1 - lda dst - cmp #=(signed word) $c8) goto wrap_y::@2 [ wrap_y::y#4 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] ) always clobbers reg byte a -Statement [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [ wrap_y::y#6 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] ) always clobbers reg byte a -Statement [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [ wrap_y::return#2 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] ) always clobbers reg byte a -Statement [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [ wrap_y::y#3 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] ) always clobbers reg byte a -Statement [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [ wrap_y::y#2 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] ) always clobbers reg byte a -Statement [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:21 [ div32u16u::return#2 ] ) always clobbers reg byte a -Statement [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ) always clobbers reg byte a -Statement [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a -Statement [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [89] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 [ mul16s::a#0 mul16u::a#8 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#8 ] ) always clobbers reg byte a -Statement [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#0 mul16u::return#2 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::return#2 ] ) always clobbers reg byte a -Statement [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#0 mul16s::m#0 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16s::m#0 ] ) always clobbers reg byte a -Statement [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [ mul16s::m#0 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 ] ) always clobbers reg byte a -Statement [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::m#0 mul16s::$9 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 [ mul16s::m#0 mul16s::$16 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::m#1 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#1 ] ) always clobbers reg byte a -Statement [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::sin16s_gen2:21::mul16s:79::mul16u:90 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ) always clobbers reg byte a +Statement [26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$0 ] ) always clobbers reg byte a +Statement [27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ) always clobbers reg byte a reg byte y +Statement [28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ) always clobbers reg byte a +Statement [32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:73 [ render_sine::ypos#0 ] +Statement [35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ) always clobbers reg byte a +Statement [36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$3 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$3 ] ) always clobbers reg byte a +Statement [37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ) always clobbers reg byte a reg byte y +Statement [38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ) always clobbers reg byte a +Statement [42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:81 [ render_sine::ypos2#0 ] +Statement [46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ) always clobbers reg byte a +Statement [50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 [ render_sine::sin_idx#1 render_sine::xpos#8 ] ( main:3::render_sine:21 [ render_sine::sin_idx#1 render_sine::xpos#8 ] ) always clobbers reg byte a +Statement [53] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) [ bitmap_plot::x#2 bitmap_plot::$3 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 ] ) always clobbers reg byte a +Statement [54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 [ bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a +Statement [55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#2 bitmap_plot::plotter#1 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] ) always clobbers reg byte a +Statement [56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a +Statement [57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a reg byte y +Statement [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 [ wrap_y::y#4 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] ) always clobbers reg byte a +Statement [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [ wrap_y::y#6 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] ) always clobbers reg byte a +Statement [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [ wrap_y::return#2 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] ) always clobbers reg byte a +Statement [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [ wrap_y::y#3 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] ) always clobbers reg byte a +Statement [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [ wrap_y::y#2 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] ) always clobbers reg byte a +Statement [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:19 [ div32u16u::return#2 ] ) always clobbers reg byte a +Statement [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ) always clobbers reg byte a +Statement [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a +Statement [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [87] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 [ mul16s::a#0 mul16u::a#8 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#8 ] ) always clobbers reg byte a +Statement [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#0 mul16u::return#2 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::return#2 ] ) always clobbers reg byte a +Statement [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#0 mul16s::m#0 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16s::m#0 ] ) always clobbers reg byte a +Statement [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [ mul16s::m#0 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 ] ) always clobbers reg byte a +Statement [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::m#0 mul16s::$9 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 [ mul16s::m#0 mul16s::$16 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::m#1 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#1 ] ) always clobbers reg byte a +Statement [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::sin16s_gen2:19::mul16s:77::mul16u:88 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:35 [ sin16s::isUpper#2 ] Removing always clobbered register reg byte a as potential for zp ZP_BYTE:46 [ mulu16_sel::select#5 ] -Statement [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::sin16s_gen2:21::mul16s:79::mul16u:90 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::sin16s_gen2:21::mul16s:79::mul16u:90 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a -Statement [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [111] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [114] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::sin16s_gen2:19::mul16s:77::mul16u:88 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::sin16s_gen2:19::mul16s:77::mul16u:88 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp ZP_BYTE:35 [ sin16s::isUpper#2 ] -Statement [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y -Statement [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [161] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [163] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [165] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::return#0 ] ) always clobbers reg byte a -Statement [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [159] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [161] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [163] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::return#0 ] ) always clobbers reg byte a +Statement [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] -Statement [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [181] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [185] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) [ bitmap_clear::$3 ] ( main:3::bitmap_clear:19 [ bitmap_clear::$3 ] ) always clobbers reg byte a -Statement [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 [ bitmap_clear::bitmap#5 ] ( main:3::bitmap_clear:19 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a -Statement [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:3::bitmap_clear:19 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:57 [ bitmap_clear::x#2 bitmap_clear::x#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:57 [ bitmap_clear::x#2 bitmap_clear::x#1 ] -Statement [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:17 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:60 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 [ memset::dst#2 ] ( main:3::memset:15 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:3::memset:15 [ memset::dst#1 ] ) always clobbers reg byte a +Statement [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [183] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:17::memset:186 [ memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:17::memset:188 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:58 [ memset::c#3 ] +Statement [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:17::memset:186 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:17::memset:188 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:17::memset:186 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:17::memset:188 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:58 [ memset::c#3 ] +Statement [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:17::memset:186 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:17::memset:188 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:15 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:63 [ bitmap_init::y#2 bitmap_init::y#1 ] Statement [6] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [8] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3 [ ] ( main:3 [ ] ) always clobbers reg byte a @@ -5712,105 +5838,104 @@ Statement [9] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3 [ ] ( main:3 [ ] ) Statement [11] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [12] *((const byte*) D016#0) ← (const byte) VIC_CSEL#0 [ ] ( main:3 [ ] ) always clobbers reg byte a Statement [14] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 [ ] ( main:3 [ ] ) always clobbers reg byte a -Statement [27] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ) always clobbers reg byte a -Statement [28] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$0 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$0 ] ) always clobbers reg byte a -Statement [29] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ) always clobbers reg byte a reg byte y -Statement [30] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ) always clobbers reg byte a -Statement [34] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ) always clobbers reg byte a -Statement [37] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ) always clobbers reg byte a -Statement [38] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$3 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$3 ] ) always clobbers reg byte a -Statement [39] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ) always clobbers reg byte a reg byte y -Statement [40] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ) always clobbers reg byte a -Statement [44] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ) always clobbers reg byte a -Statement [48] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ( main:3::render_sine:23 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ) always clobbers reg byte a -Statement [52] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 [ render_sine::sin_idx#1 render_sine::xpos#8 ] ( main:3::render_sine:23 [ render_sine::sin_idx#1 render_sine::xpos#8 ] ) always clobbers reg byte a -Statement [55] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) [ bitmap_plot::x#2 bitmap_plot::$3 ] ( main:3::render_sine:23::bitmap_plot:36 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 ] main:3::render_sine:23::bitmap_plot:46 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 ] ) always clobbers reg byte a -Statement [56] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 [ bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::render_sine:23::bitmap_plot:36 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] main:3::render_sine:23::bitmap_plot:46 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a -Statement [57] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#2 bitmap_plot::plotter#1 ] ( main:3::render_sine:23::bitmap_plot:36 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] main:3::render_sine:23::bitmap_plot:46 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] ) always clobbers reg byte a -Statement [58] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::render_sine:23::bitmap_plot:36 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] main:3::render_sine:23::bitmap_plot:46 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a -Statement [59] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::render_sine:23::bitmap_plot:36 [ render_sine::sin_idx#2 render_sine::xpos#3 ] main:3::render_sine:23::bitmap_plot:46 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a reg byte y -Statement [63] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 [ wrap_y::y#4 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] ) always clobbers reg byte a -Statement [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [ wrap_y::y#6 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] ) always clobbers reg byte a -Statement [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [ wrap_y::return#2 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] ) always clobbers reg byte a -Statement [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [ wrap_y::y#3 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] ) always clobbers reg byte a -Statement [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [ wrap_y::y#2 ] ( main:3::render_sine:23::wrap_y:31 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] main:3::render_sine:23::wrap_y:41 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] ) always clobbers reg byte a -Statement [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:21 [ div32u16u::return#2 ] ) always clobbers reg byte a -Statement [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 ] ) always clobbers reg byte a -Statement [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a -Statement [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ) always clobbers reg byte a -Statement [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a -Statement [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a -Statement [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a -Statement [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y -Statement [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a -Statement [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:21 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a -Statement [89] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 [ mul16s::a#0 mul16u::a#8 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#8 ] ) always clobbers reg byte a -Statement [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#0 mul16u::return#2 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::return#2 ] ) always clobbers reg byte a -Statement [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#0 mul16s::m#0 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16s::m#0 ] ) always clobbers reg byte a -Statement [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [ mul16s::m#0 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 ] ) always clobbers reg byte a -Statement [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::m#0 mul16s::$9 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a -Statement [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 [ mul16s::m#0 mul16s::$16 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a -Statement [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::m#1 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#1 ] ) always clobbers reg byte a -Statement [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::sin16s_gen2:21::mul16s:79 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a -Statement [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::sin16s_gen2:21::mul16s:79::mul16u:90 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a -Statement [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::sin16s_gen2:21::mul16s:79::mul16u:90 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a -Statement [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::sin16s_gen2:21::mul16s:79::mul16u:90 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140::mul16u:153 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a -Statement [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a -Statement [111] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a -Statement [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a -Statement [114] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a -Statement [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y -Statement [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a -Statement [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a -Statement [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a -Statement [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a -Statement [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a -Statement [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a -Statement [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a -Statement [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a -Statement [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a -Statement [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a -Statement [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a -Statement [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a -Statement [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a -Statement [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a -Statement [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a -Statement [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a -Statement [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a -Statement [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a -Statement [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a -Statement [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a -Statement [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y -Statement [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a -Statement [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a -Statement [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:21::sin16s:76 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a -Statement [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a -Statement [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a -Statement [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a -Statement [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a -Statement [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:120 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:125 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:129 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:135 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:21::sin16s:76::mulu16_sel:140 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a -Statement [161] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a -Statement [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a -Statement [163] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a -Statement [165] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a -Statement [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a -Statement [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:21::div32u16u:71 [ div32u16u::return#0 ] ) always clobbers reg byte a -Statement [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a -Statement [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a -Statement [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a -Statement [181] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a -Statement [185] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:21::div32u16u:71::divr16u:160 [ divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:21::div32u16u:71::divr16u:164 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a -Statement [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) [ bitmap_clear::$3 ] ( main:3::bitmap_clear:19 [ bitmap_clear::$3 ] ) always clobbers reg byte a -Statement [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 [ bitmap_clear::bitmap#5 ] ( main:3::bitmap_clear:19 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a -Statement [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:3::bitmap_clear:19 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y -Statement [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:17 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a -Statement [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:17 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 [ memset::dst#2 ] ( main:3::memset:15 [ memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 [ memset::dst#1 ] ( main:3::memset:15 [ memset::dst#1 ] ) always clobbers reg byte a +Statement [25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$10 ] ) always clobbers reg byte a +Statement [26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$0 ] ) always clobbers reg byte a +Statement [27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin_val#0 ] ) always clobbers reg byte a reg byte y +Statement [28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#0 ] ) always clobbers reg byte a +Statement [32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos#0 bitmap_plot::x#0 ] ) always clobbers reg byte a +Statement [35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$11 ] ) always clobbers reg byte a +Statement [36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$3 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::$3 ] ) always clobbers reg byte a +Statement [37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::sin2_val#0 ] ) always clobbers reg byte a reg byte y +Statement [38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#1 ] ) always clobbers reg byte a +Statement [42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#3 render_sine::ypos2#0 bitmap_plot::x#1 ] ) always clobbers reg byte a +Statement [46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ( main:3::render_sine:21 [ render_sine::sin_idx#2 render_sine::xpos#1 ] ) always clobbers reg byte a +Statement [50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 [ render_sine::sin_idx#1 render_sine::xpos#8 ] ( main:3::render_sine:21 [ render_sine::sin_idx#1 render_sine::xpos#8 ] ) always clobbers reg byte a +Statement [53] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) [ bitmap_plot::x#2 bitmap_plot::$3 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 ] ) always clobbers reg byte a +Statement [54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 [ bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::$3 bitmap_plot::$1 ] ) always clobbers reg byte a +Statement [55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 [ bitmap_plot::x#2 bitmap_plot::plotter#1 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::x#2 bitmap_plot::plotter#1 ] ) always clobbers reg byte a +Statement [56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 [ bitmap_plot::plotter#1 bitmap_plot::$2 ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 bitmap_plot::plotter#1 bitmap_plot::$2 ] ) always clobbers reg byte a +Statement [57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) [ ] ( main:3::render_sine:21::bitmap_plot:34 [ render_sine::sin_idx#2 render_sine::xpos#3 ] main:3::render_sine:21::bitmap_plot:44 [ render_sine::sin_idx#2 render_sine::xpos#3 ] ) always clobbers reg byte a reg byte y +Statement [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 [ wrap_y::y#4 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#4 ] ) always clobbers reg byte a +Statement [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 [ wrap_y::y#6 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#6 ] ) always clobbers reg byte a +Statement [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 [ wrap_y::return#2 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::return#2 ] ) always clobbers reg byte a +Statement [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 [ wrap_y::y#3 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#3 ] ) always clobbers reg byte a +Statement [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 [ wrap_y::y#2 ] ( main:3::render_sine:21::wrap_y:29 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] main:3::render_sine:21::wrap_y:39 [ render_sine::sin_idx#2 render_sine::xpos#3 wrap_y::y#2 ] ) always clobbers reg byte a +Statement [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 [ div32u16u::return#2 ] ( main:3::sin16s_gen2:19 [ div32u16u::return#2 ] ) always clobbers reg byte a +Statement [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 [ sin16s_gen2::step#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 ] ) always clobbers reg byte a +Statement [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#0 ] ) always clobbers reg byte a +Statement [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 ] ) always clobbers reg byte a +Statement [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#2 ] ) always clobbers reg byte a +Statement [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$5 ] ) always clobbers reg byte a +Statement [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s_gen2::$6 ] ) always clobbers reg byte a +Statement [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 ] ) always clobbers reg byte a reg byte y +Statement [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::i#2 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::i#2 sin16s_gen2::x#1 sin16s_gen2::sintab#0 ] ) always clobbers reg byte a +Statement [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ( main:3::sin16s_gen2:19 [ sin16s_gen2::step#0 sin16s_gen2::x#1 sin16s_gen2::sintab#0 sin16s_gen2::i#1 ] ) always clobbers reg byte a +Statement [87] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 [ mul16s::a#0 mul16u::a#8 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#8 ] ) always clobbers reg byte a +Statement [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 [ mul16s::a#0 mul16u::return#2 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::return#2 ] ) always clobbers reg byte a +Statement [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 [ mul16s::a#0 mul16s::m#0 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16s::m#0 ] ) always clobbers reg byte a +Statement [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 [ mul16s::m#0 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 ] ) always clobbers reg byte a +Statement [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 [ mul16s::m#0 mul16s::$9 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$9 ] ) always clobbers reg byte a +Statement [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 [ mul16s::m#0 mul16s::$16 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#0 mul16s::$16 ] ) always clobbers reg byte a +Statement [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 [ mul16s::m#1 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::m#1 ] ) always clobbers reg byte a +Statement [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 [ mul16s::return#0 ] ( main:3::sin16s_gen2:19::mul16s:77 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::return#0 ] ) always clobbers reg byte a +Statement [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ( main:3::sin16s_gen2:19::mul16s:77::mul16u:88 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 ] ) always clobbers reg byte a +Statement [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 [ mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ( main:3::sin16s_gen2:19::mul16s:77::mul16u:88 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::res#2 mul16u::a#3 mul16u::mb#2 mul16u::$1 ] ) always clobbers reg byte a +Statement [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 [ mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ( main:3::sin16s_gen2:19::mul16s:77::mul16u:88 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 mul16s::a#0 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138::mul16u:151 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::a#3 mul16u::mb#2 mul16u::res#1 ] ) always clobbers reg byte a +Statement [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 [ sin16s::x#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#0 ] ) always clobbers reg byte a +Statement [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 [ sin16s::x#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#1 ] ) always clobbers reg byte a +Statement [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 [ sin16s::x#4 sin16s::isUpper#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::x#4 sin16s::isUpper#2 ] ) always clobbers reg byte a +Statement [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 [ sin16s::isUpper#2 sin16s::x#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x#2 ] ) always clobbers reg byte a +Statement [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 [ sin16s::isUpper#2 sin16s::$4 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::$4 ] ) always clobbers reg byte a reg byte y +Statement [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 [ sin16s::isUpper#2 sin16s::x1#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 ] ) always clobbers reg byte a +Statement [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 ] ) always clobbers reg byte a +Statement [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#0 mulu16_sel::v2#0 ] ) always clobbers reg byte a +Statement [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#0 ] ) always clobbers reg byte a +Statement [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x2#0 ] ) always clobbers reg byte a +Statement [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 ] ) always clobbers reg byte a +Statement [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::v1#1 mulu16_sel::v2#1 ] ) always clobbers reg byte a +Statement [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#1 ] ) always clobbers reg byte a +Statement [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 ] ) always clobbers reg byte a +Statement [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::v1#2 ] ) always clobbers reg byte a +Statement [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#2 ] ) always clobbers reg byte a +Statement [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::x3_6#0 ] ) always clobbers reg byte a +Statement [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 sin16s::usinx#0 ] ) always clobbers reg byte a +Statement [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 ] ) always clobbers reg byte a +Statement [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#3 mulu16_sel::v2#3 ] ) always clobbers reg byte a +Statement [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#10 ] ) always clobbers reg byte a +Statement [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 sin16s::x4#0 ] ) always clobbers reg byte a +Statement [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::v1#4 ] ) always clobbers reg byte a +Statement [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a +Statement [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a +Statement [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a +Statement [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a +Statement [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a +Statement [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a +Statement [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:3::sin16s_gen2:19::sin16s:74 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::return#5 ] ) always clobbers reg byte a +Statement [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 [ mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::a#2 mulu16_sel::v2#5 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 [ mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mul16u::b#1 mul16u::a#2 mulu16_sel::select#5 ] ) always clobbers reg byte a +Statement [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 [ mulu16_sel::select#5 mul16u::return#3 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mul16u::return#3 ] ) always clobbers reg byte a +Statement [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 [ mulu16_sel::select#5 mulu16_sel::$0 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::select#5 mulu16_sel::$0 ] ) always clobbers reg byte a +Statement [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 [ mulu16_sel::$1 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::$1 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::$1 ] ) always clobbers reg byte a +Statement [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 [ mulu16_sel::return#12 ] ( main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:118 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:123 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:127 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::x3#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:133 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::x1#0 sin16s::usinx#0 mulu16_sel::return#12 ] main:3::sin16s_gen2:19::sin16s:74::mulu16_sel:138 [ sin16s_gen2::step#0 sin16s_gen2::x#2 sin16s_gen2::sintab#2 sin16s_gen2::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#12 ] ) always clobbers reg byte a +Statement [159] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 rem16u#1 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ divr16u::return#2 rem16u#1 ] ) always clobbers reg byte a +Statement [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 [ div32u16u::quotient_hi#0 rem16u#1 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 rem16u#1 ] ) always clobbers reg byte a +Statement [161] (word) divr16u::rem#4 ← (word) rem16u#1 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 divr16u::rem#4 ] ) always clobbers reg byte a +Statement [163] (word) divr16u::return#3 ← (word) divr16u::return#0 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 divr16u::return#3 ] ) always clobbers reg byte a +Statement [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::quotient_hi#0 div32u16u::quotient_lo#0 ] ) always clobbers reg byte a +Statement [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 [ div32u16u::return#0 ] ( main:3::sin16s_gen2:19::div32u16u:69 [ div32u16u::return#0 ] ) always clobbers reg byte a +Statement [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#0 divr16u::$1 ] ) always clobbers reg byte a +Statement [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::dividend#3 divr16u::quotient#3 divr16u::i#2 divr16u::rem#1 ] ) always clobbers reg byte a +Statement [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::rem#6 divr16u::quotient#1 ] ) always clobbers reg byte a +Statement [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::i#2 divr16u::dividend#0 divr16u::quotient#2 divr16u::rem#2 ] ) always clobbers reg byte a +Statement [183] (word) rem16u#1 ← (word) divr16u::rem#11 [ divr16u::return#0 rem16u#1 ] ( main:3::sin16s_gen2:19::div32u16u:69::divr16u:158 [ divr16u::return#0 rem16u#1 ] main:3::sin16s_gen2:19::div32u16u:69::divr16u:162 [ div32u16u::quotient_hi#0 divr16u::return#0 rem16u#1 ] ) always clobbers reg byte a +Statement [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 [ memset::str#2 memset::c#3 memset::end#0 ] ( main:3::bitmap_clear:17::memset:186 [ memset::str#2 memset::c#3 memset::end#0 ] main:3::bitmap_clear:17::memset:188 [ memset::str#2 memset::c#3 memset::end#0 ] ) always clobbers reg byte a +Statement [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 [ memset::c#3 memset::end#0 memset::dst#3 ] ( main:3::bitmap_clear:17::memset:186 [ memset::c#3 memset::end#0 memset::dst#3 ] main:3::bitmap_clear:17::memset:188 [ memset::c#3 memset::end#0 memset::dst#3 ] ) always clobbers reg byte a +Statement [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 [ memset::c#3 memset::end#0 memset::dst#2 ] ( main:3::bitmap_clear:17::memset:186 [ memset::c#3 memset::end#0 memset::dst#2 ] main:3::bitmap_clear:17::memset:188 [ memset::c#3 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 [ memset::c#3 memset::end#0 memset::dst#1 ] ( main:3::bitmap_clear:17::memset:186 [ memset::c#3 memset::end#0 memset::dst#1 ] main:3::bitmap_clear:17::memset:188 [ memset::c#3 memset::end#0 memset::dst#1 ] ) always clobbers reg byte a +Statement [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ( main:3::bitmap_init:15 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$7 ] ) always clobbers reg byte a +Statement [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:3::bitmap_init:15 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Potential registers zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] : zp ZP_WORD:2 , Potential registers zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] : zp ZP_WORD:4 , Potential registers zp ZP_BYTE:6 [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] : zp ZP_BYTE:6 , reg byte a , reg byte x , reg byte y , @@ -5834,158 +5959,157 @@ Potential registers zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem# Potential registers zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] : zp ZP_WORD:49 , Potential registers zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] : zp ZP_WORD:51 , Potential registers zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] : zp ZP_BYTE:53 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] : zp ZP_BYTE:54 , reg byte x , -Potential registers zp ZP_WORD:55 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] : zp ZP_WORD:55 , -Potential registers zp ZP_BYTE:57 [ bitmap_clear::x#2 bitmap_clear::x#1 ] : zp ZP_BYTE:57 , reg byte x , -Potential registers zp ZP_BYTE:58 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:58 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:59 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp ZP_BYTE:59 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:60 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp ZP_BYTE:60 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:61 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp ZP_WORD:61 , -Potential registers zp ZP_WORD:63 [ memset::dst#2 memset::dst#1 ] : zp ZP_WORD:63 , -Potential registers zp ZP_WORD:65 [ render_sine::$10 ] : zp ZP_WORD:65 , -Potential registers zp ZP_WORD:67 [ render_sine::$0 ] : zp ZP_WORD:67 , -Potential registers zp ZP_WORD:69 [ render_sine::sin_val#0 ] : zp ZP_WORD:69 , -Potential registers zp ZP_BYTE:71 [ wrap_y::return#0 ] : zp ZP_BYTE:71 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:72 [ render_sine::ypos#0 ] : zp ZP_BYTE:72 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:73 [ render_sine::$11 ] : zp ZP_WORD:73 , -Potential registers zp ZP_WORD:75 [ render_sine::$3 ] : zp ZP_WORD:75 , -Potential registers zp ZP_WORD:77 [ render_sine::sin2_val#0 ] : zp ZP_WORD:77 , -Potential registers zp ZP_BYTE:79 [ wrap_y::return#1 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:80 [ render_sine::ypos2#0 ] : zp ZP_BYTE:80 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:81 [ bitmap_plot::$3 ] : zp ZP_WORD:81 , -Potential registers zp ZP_WORD:83 [ bitmap_plot::$1 ] : zp ZP_WORD:83 , -Potential registers zp ZP_WORD:85 [ bitmap_plot::plotter#1 ] : zp ZP_WORD:85 , -Potential registers zp ZP_BYTE:87 [ bitmap_plot::$2 ] : zp ZP_BYTE:87 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:88 [ wrap_y::return#2 ] : zp ZP_BYTE:88 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:89 [ div32u16u::return#2 ] : zp ZP_DWORD:89 , -Potential registers zp ZP_DWORD:93 [ sin16s_gen2::step#0 ] : zp ZP_DWORD:93 , -Potential registers zp ZP_WORD:97 [ sin16s::return#0 ] : zp ZP_WORD:97 , -Potential registers zp ZP_WORD:99 [ mul16s::a#0 ] : zp ZP_WORD:99 , -Potential registers zp ZP_DWORD:101 [ mul16s::return#2 ] : zp ZP_DWORD:101 , -Potential registers zp ZP_DWORD:105 [ sin16s_gen2::$5 ] : zp ZP_DWORD:105 , -Potential registers zp ZP_WORD:109 [ sin16s_gen2::$6 ] : zp ZP_WORD:109 , -Potential registers zp ZP_DWORD:111 [ mul16u::return#2 ] : zp ZP_DWORD:111 , -Potential registers zp ZP_WORD:115 [ mul16s::$9 ] : zp ZP_WORD:115 , -Potential registers zp ZP_WORD:117 [ mul16s::$16 ] : zp ZP_WORD:117 , -Potential registers zp ZP_DWORD:119 [ mul16s::return#0 ] : zp ZP_DWORD:119 , -Potential registers zp ZP_BYTE:123 [ mul16u::$1 ] : zp ZP_BYTE:123 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_DWORD:124 [ sin16s::$4 ] : zp ZP_DWORD:124 , -Potential registers zp ZP_WORD:128 [ sin16s::x1#0 ] : zp ZP_WORD:128 , -Potential registers zp ZP_WORD:130 [ mulu16_sel::return#0 ] : zp ZP_WORD:130 , -Potential registers zp ZP_WORD:132 [ sin16s::x2#0 ] : zp ZP_WORD:132 , -Potential registers zp ZP_WORD:134 [ mulu16_sel::return#1 ] : zp ZP_WORD:134 , -Potential registers zp ZP_WORD:136 [ sin16s::x3#0 ] : zp ZP_WORD:136 , -Potential registers zp ZP_WORD:138 [ mulu16_sel::return#2 ] : zp ZP_WORD:138 , -Potential registers zp ZP_WORD:140 [ sin16s::x3_6#0 ] : zp ZP_WORD:140 , -Potential registers zp ZP_WORD:142 [ sin16s::usinx#0 ] : zp ZP_WORD:142 , -Potential registers zp ZP_WORD:144 [ mulu16_sel::return#10 ] : zp ZP_WORD:144 , -Potential registers zp ZP_WORD:146 [ sin16s::x4#0 ] : zp ZP_WORD:146 , -Potential registers zp ZP_WORD:148 [ mulu16_sel::return#11 ] : zp ZP_WORD:148 , -Potential registers zp ZP_WORD:150 [ sin16s::x5#0 ] : zp ZP_WORD:150 , -Potential registers zp ZP_WORD:152 [ sin16s::x5_128#0 ] : zp ZP_WORD:152 , -Potential registers zp ZP_WORD:154 [ sin16s::usinx#1 ] : zp ZP_WORD:154 , -Potential registers zp ZP_DWORD:156 [ mul16u::return#3 ] : zp ZP_DWORD:156 , -Potential registers zp ZP_DWORD:160 [ mulu16_sel::$0 ] : zp ZP_DWORD:160 , -Potential registers zp ZP_DWORD:164 [ mulu16_sel::$1 ] : zp ZP_DWORD:164 , -Potential registers zp ZP_WORD:168 [ mulu16_sel::return#12 ] : zp ZP_WORD:168 , -Potential registers zp ZP_WORD:170 [ divr16u::return#2 ] : zp ZP_WORD:170 , -Potential registers zp ZP_WORD:172 [ div32u16u::quotient_hi#0 ] : zp ZP_WORD:172 , -Potential registers zp ZP_WORD:174 [ divr16u::return#3 ] : zp ZP_WORD:174 , -Potential registers zp ZP_WORD:176 [ div32u16u::quotient_lo#0 ] : zp ZP_WORD:176 , -Potential registers zp ZP_DWORD:178 [ div32u16u::return#0 ] : zp ZP_DWORD:178 , -Potential registers zp ZP_BYTE:182 [ divr16u::$1 ] : zp ZP_BYTE:182 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:183 [ divr16u::$2 ] : zp ZP_BYTE:183 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:184 [ rem16u#1 ] : zp ZP_WORD:184 , -Potential registers zp ZP_WORD:186 [ bitmap_clear::$3 ] : zp ZP_WORD:186 , -Potential registers zp ZP_BYTE:188 [ bitmap_init::$7 ] : zp ZP_BYTE:188 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:189 [ bitmap_init::$4 ] : zp ZP_BYTE:189 , reg byte a , reg byte x , reg byte y , reg byte alu , -Potential registers zp ZP_BYTE:190 [ bitmap_init::$5 ] : zp ZP_BYTE:190 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:191 [ bitmap_init::$6 ] : zp ZP_BYTE:191 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:54 [ memset::str#2 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ memset::num#2 ] : zp ZP_WORD:56 , +Potential registers zp ZP_BYTE:58 [ memset::c#3 ] : zp ZP_BYTE:58 , reg byte x , +Potential registers zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] : zp ZP_WORD:59 , +Potential registers zp ZP_BYTE:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] : zp ZP_BYTE:61 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:62 [ bitmap_init::x#2 bitmap_init::x#1 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:63 [ bitmap_init::y#2 bitmap_init::y#1 ] : zp ZP_BYTE:63 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] : zp ZP_WORD:64 , +Potential registers zp ZP_WORD:66 [ render_sine::$10 ] : zp ZP_WORD:66 , +Potential registers zp ZP_WORD:68 [ render_sine::$0 ] : zp ZP_WORD:68 , +Potential registers zp ZP_WORD:70 [ render_sine::sin_val#0 ] : zp ZP_WORD:70 , +Potential registers zp ZP_BYTE:72 [ wrap_y::return#0 ] : zp ZP_BYTE:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:73 [ render_sine::ypos#0 ] : zp ZP_BYTE:73 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:74 [ render_sine::$11 ] : zp ZP_WORD:74 , +Potential registers zp ZP_WORD:76 [ render_sine::$3 ] : zp ZP_WORD:76 , +Potential registers zp ZP_WORD:78 [ render_sine::sin2_val#0 ] : zp ZP_WORD:78 , +Potential registers zp ZP_BYTE:80 [ wrap_y::return#1 ] : zp ZP_BYTE:80 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:81 [ render_sine::ypos2#0 ] : zp ZP_BYTE:81 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:82 [ bitmap_plot::$3 ] : zp ZP_WORD:82 , +Potential registers zp ZP_WORD:84 [ bitmap_plot::$1 ] : zp ZP_WORD:84 , +Potential registers zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] : zp ZP_WORD:86 , +Potential registers zp ZP_BYTE:88 [ bitmap_plot::$2 ] : zp ZP_BYTE:88 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:89 [ wrap_y::return#2 ] : zp ZP_BYTE:89 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:90 [ div32u16u::return#2 ] : zp ZP_DWORD:90 , +Potential registers zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] : zp ZP_DWORD:94 , +Potential registers zp ZP_WORD:98 [ sin16s::return#0 ] : zp ZP_WORD:98 , +Potential registers zp ZP_WORD:100 [ mul16s::a#0 ] : zp ZP_WORD:100 , +Potential registers zp ZP_DWORD:102 [ mul16s::return#2 ] : zp ZP_DWORD:102 , +Potential registers zp ZP_DWORD:106 [ sin16s_gen2::$5 ] : zp ZP_DWORD:106 , +Potential registers zp ZP_WORD:110 [ sin16s_gen2::$6 ] : zp ZP_WORD:110 , +Potential registers zp ZP_DWORD:112 [ mul16u::return#2 ] : zp ZP_DWORD:112 , +Potential registers zp ZP_WORD:116 [ mul16s::$9 ] : zp ZP_WORD:116 , +Potential registers zp ZP_WORD:118 [ mul16s::$16 ] : zp ZP_WORD:118 , +Potential registers zp ZP_DWORD:120 [ mul16s::return#0 ] : zp ZP_DWORD:120 , +Potential registers zp ZP_BYTE:124 [ mul16u::$1 ] : zp ZP_BYTE:124 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_DWORD:125 [ sin16s::$4 ] : zp ZP_DWORD:125 , +Potential registers zp ZP_WORD:129 [ sin16s::x1#0 ] : zp ZP_WORD:129 , +Potential registers zp ZP_WORD:131 [ mulu16_sel::return#0 ] : zp ZP_WORD:131 , +Potential registers zp ZP_WORD:133 [ sin16s::x2#0 ] : zp ZP_WORD:133 , +Potential registers zp ZP_WORD:135 [ mulu16_sel::return#1 ] : zp ZP_WORD:135 , +Potential registers zp ZP_WORD:137 [ sin16s::x3#0 ] : zp ZP_WORD:137 , +Potential registers zp ZP_WORD:139 [ mulu16_sel::return#2 ] : zp ZP_WORD:139 , +Potential registers zp ZP_WORD:141 [ sin16s::x3_6#0 ] : zp ZP_WORD:141 , +Potential registers zp ZP_WORD:143 [ sin16s::usinx#0 ] : zp ZP_WORD:143 , +Potential registers zp ZP_WORD:145 [ mulu16_sel::return#10 ] : zp ZP_WORD:145 , +Potential registers zp ZP_WORD:147 [ sin16s::x4#0 ] : zp ZP_WORD:147 , +Potential registers zp ZP_WORD:149 [ mulu16_sel::return#11 ] : zp ZP_WORD:149 , +Potential registers zp ZP_WORD:151 [ sin16s::x5#0 ] : zp ZP_WORD:151 , +Potential registers zp ZP_WORD:153 [ sin16s::x5_128#0 ] : zp ZP_WORD:153 , +Potential registers zp ZP_WORD:155 [ sin16s::usinx#1 ] : zp ZP_WORD:155 , +Potential registers zp ZP_DWORD:157 [ mul16u::return#3 ] : zp ZP_DWORD:157 , +Potential registers zp ZP_DWORD:161 [ mulu16_sel::$0 ] : zp ZP_DWORD:161 , +Potential registers zp ZP_DWORD:165 [ mulu16_sel::$1 ] : zp ZP_DWORD:165 , +Potential registers zp ZP_WORD:169 [ mulu16_sel::return#12 ] : zp ZP_WORD:169 , +Potential registers zp ZP_WORD:171 [ divr16u::return#2 ] : zp ZP_WORD:171 , +Potential registers zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] : zp ZP_WORD:173 , +Potential registers zp ZP_WORD:175 [ divr16u::return#3 ] : zp ZP_WORD:175 , +Potential registers zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] : zp ZP_WORD:177 , +Potential registers zp ZP_DWORD:179 [ div32u16u::return#0 ] : zp ZP_DWORD:179 , +Potential registers zp ZP_BYTE:183 [ divr16u::$1 ] : zp ZP_BYTE:183 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:184 [ divr16u::$2 ] : zp ZP_BYTE:184 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:185 [ rem16u#1 ] : zp ZP_WORD:185 , +Potential registers zp ZP_WORD:187 [ memset::end#0 ] : zp ZP_WORD:187 , +Potential registers zp ZP_BYTE:189 [ bitmap_init::$7 ] : zp ZP_BYTE:189 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:190 [ bitmap_init::$4 ] : zp ZP_BYTE:190 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp ZP_BYTE:191 [ bitmap_init::$5 ] : zp ZP_BYTE:191 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:192 [ bitmap_init::$6 ] : zp ZP_BYTE:192 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [mul16u] 346.86: zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] 249.57: zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] 202: zp ZP_BYTE:123 [ mul16u::$1 ] 180.67: zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] 4: zp ZP_WORD:23 [ mul16u::b#1 ] 4: zp ZP_DWORD:111 [ mul16u::return#2 ] 4: zp ZP_DWORD:156 [ mul16u::return#3 ] -Uplift Scope [wrap_y] 877: zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] 22: zp ZP_BYTE:71 [ wrap_y::return#0 ] 22: zp ZP_BYTE:79 [ wrap_y::return#1 ] 6: zp ZP_BYTE:88 [ wrap_y::return#2 ] -Uplift Scope [bitmap_clear] 227.6: zp ZP_WORD:55 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] 218.83: zp ZP_BYTE:57 [ bitmap_clear::x#2 bitmap_clear::x#1 ] 20.17: zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] 2: zp ZP_WORD:186 [ bitmap_clear::$3 ] -Uplift Scope [divr16u] 106.92: zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:182 [ divr16u::$1 ] 22: zp ZP_BYTE:183 [ divr16u::$2 ] 18.19: zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] 9.75: zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] 4: zp ZP_WORD:170 [ divr16u::return#2 ] 4: zp ZP_WORD:174 [ divr16u::return#3 ] -Uplift Scope [render_sine] 22: zp ZP_WORD:65 [ render_sine::$10 ] 22: zp ZP_WORD:67 [ render_sine::$0 ] 22: zp ZP_WORD:69 [ render_sine::sin_val#0 ] 22: zp ZP_WORD:73 [ render_sine::$11 ] 22: zp ZP_WORD:75 [ render_sine::$3 ] 22: zp ZP_WORD:77 [ render_sine::sin2_val#0 ] 20.43: zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] 18.26: zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] 11: zp ZP_BYTE:72 [ render_sine::ypos#0 ] 11: zp ZP_BYTE:80 [ render_sine::ypos2#0 ] -Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:61 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:58 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:59 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:60 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:189 [ bitmap_init::$4 ] 22: zp ZP_BYTE:190 [ bitmap_init::$5 ] 22: zp ZP_BYTE:191 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:188 [ bitmap_init::$7 ] -Uplift Scope [bitmap_plot] 70: zp ZP_BYTE:6 [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] 28.5: zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] 4: zp ZP_WORD:83 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:87 [ bitmap_plot::$2 ] 3: zp ZP_WORD:85 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:81 [ bitmap_plot::$3 ] -Uplift Scope [sin16s] 27.5: zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] 22: zp ZP_WORD:97 [ sin16s::return#0 ] 13: zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] 4: zp ZP_DWORD:124 [ sin16s::$4 ] 4: zp ZP_WORD:132 [ sin16s::x2#0 ] 4: zp ZP_WORD:140 [ sin16s::x3_6#0 ] 4: zp ZP_WORD:146 [ sin16s::x4#0 ] 4: zp ZP_WORD:150 [ sin16s::x5#0 ] 4: zp ZP_WORD:152 [ sin16s::x5_128#0 ] 1: zp ZP_WORD:136 [ sin16s::x3#0 ] 1: zp ZP_WORD:154 [ sin16s::usinx#1 ] 0.64: zp ZP_WORD:128 [ sin16s::x1#0 ] 0.33: zp ZP_WORD:142 [ sin16s::usinx#0 ] 0.06: zp ZP_BYTE:35 [ sin16s::isUpper#2 ] -Uplift Scope [mulu16_sel] 24: zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:130 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:134 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:138 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:144 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:148 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:160 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:164 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:168 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:46 [ mulu16_sel::select#5 ] -Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:105 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:109 [ sin16s_gen2::$6 ] 10.33: zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:93 [ sin16s_gen2::step#0 ] -Uplift Scope [mul16s] 22: zp ZP_DWORD:101 [ mul16s::return#2 ] 10: zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] 4.33: zp ZP_DWORD:119 [ mul16s::return#0 ] 4: zp ZP_WORD:115 [ mul16s::$9 ] 4: zp ZP_WORD:117 [ mul16s::$16 ] 2.6: zp ZP_WORD:99 [ mul16s::a#0 ] -Uplift Scope [memset] 33: zp ZP_WORD:63 [ memset::dst#2 memset::dst#1 ] -Uplift Scope [div32u16u] 4: zp ZP_DWORD:89 [ div32u16u::return#2 ] 4: zp ZP_WORD:176 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:178 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:172 [ div32u16u::quotient_hi#0 ] -Uplift Scope [] 0.8: zp ZP_WORD:184 [ rem16u#1 ] +Uplift Scope [mul16u] 346.86: zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] 249.57: zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] 202: zp ZP_BYTE:124 [ mul16u::$1 ] 180.67: zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] 4: zp ZP_WORD:23 [ mul16u::b#1 ] 4: zp ZP_DWORD:112 [ mul16u::return#2 ] 4: zp ZP_DWORD:157 [ mul16u::return#3 ] +Uplift Scope [wrap_y] 877: zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] 22: zp ZP_BYTE:72 [ wrap_y::return#0 ] 22: zp ZP_BYTE:80 [ wrap_y::return#1 ] 6: zp ZP_BYTE:89 [ wrap_y::return#2 ] +Uplift Scope [divr16u] 106.92: zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] 35.54: zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] 22: zp ZP_BYTE:183 [ divr16u::$1 ] 22: zp ZP_BYTE:184 [ divr16u::$2 ] 18.19: zp ZP_BYTE:53 [ divr16u::i#2 divr16u::i#1 ] 9.75: zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] 4: zp ZP_WORD:171 [ divr16u::return#2 ] 4: zp ZP_WORD:175 [ divr16u::return#3 ] +Uplift Scope [render_sine] 22: zp ZP_WORD:66 [ render_sine::$10 ] 22: zp ZP_WORD:68 [ render_sine::$0 ] 22: zp ZP_WORD:70 [ render_sine::sin_val#0 ] 22: zp ZP_WORD:74 [ render_sine::$11 ] 22: zp ZP_WORD:76 [ render_sine::$3 ] 22: zp ZP_WORD:78 [ render_sine::sin2_val#0 ] 20.43: zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] 18.26: zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] 11: zp ZP_BYTE:73 [ render_sine::ypos#0 ] 11: zp ZP_BYTE:81 [ render_sine::ypos2#0 ] +Uplift Scope [bitmap_init] 39.88: zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 34.83: zp ZP_BYTE:61 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 22: zp ZP_BYTE:62 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp ZP_BYTE:63 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp ZP_BYTE:190 [ bitmap_init::$4 ] 22: zp ZP_BYTE:191 [ bitmap_init::$5 ] 22: zp ZP_BYTE:192 [ bitmap_init::$6 ] 5.5: zp ZP_BYTE:189 [ bitmap_init::$7 ] +Uplift Scope [bitmap_plot] 70: zp ZP_BYTE:6 [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] 28.5: zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] 4: zp ZP_WORD:84 [ bitmap_plot::$1 ] 4: zp ZP_BYTE:88 [ bitmap_plot::$2 ] 3: zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] 1: zp ZP_WORD:82 [ bitmap_plot::$3 ] +Uplift Scope [sin16s] 27.5: zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] 22: zp ZP_WORD:98 [ sin16s::return#0 ] 13: zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] 4: zp ZP_DWORD:125 [ sin16s::$4 ] 4: zp ZP_WORD:133 [ sin16s::x2#0 ] 4: zp ZP_WORD:141 [ sin16s::x3_6#0 ] 4: zp ZP_WORD:147 [ sin16s::x4#0 ] 4: zp ZP_WORD:151 [ sin16s::x5#0 ] 4: zp ZP_WORD:153 [ sin16s::x5_128#0 ] 1: zp ZP_WORD:137 [ sin16s::x3#0 ] 1: zp ZP_WORD:155 [ sin16s::usinx#1 ] 0.64: zp ZP_WORD:129 [ sin16s::x1#0 ] 0.33: zp ZP_WORD:143 [ sin16s::usinx#0 ] 0.06: zp ZP_BYTE:35 [ sin16s::isUpper#2 ] +Uplift Scope [mulu16_sel] 24: zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] 21: zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] 4: zp ZP_WORD:131 [ mulu16_sel::return#0 ] 4: zp ZP_WORD:135 [ mulu16_sel::return#1 ] 4: zp ZP_WORD:139 [ mulu16_sel::return#2 ] 4: zp ZP_WORD:145 [ mulu16_sel::return#10 ] 4: zp ZP_WORD:149 [ mulu16_sel::return#11 ] 4: zp ZP_DWORD:161 [ mulu16_sel::$0 ] 4: zp ZP_DWORD:165 [ mulu16_sel::$1 ] 1.71: zp ZP_WORD:169 [ mulu16_sel::return#12 ] 0.33: zp ZP_BYTE:46 [ mulu16_sel::select#5 ] +Uplift Scope [sin16s_gen2] 22: zp ZP_DWORD:106 [ sin16s_gen2::$5 ] 18.33: zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] 11: zp ZP_WORD:110 [ sin16s_gen2::$6 ] 10.33: zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] 8.8: zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] 0.87: zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] +Uplift Scope [mul16s] 22: zp ZP_DWORD:102 [ mul16s::return#2 ] 10: zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] 4.33: zp ZP_DWORD:120 [ mul16s::return#0 ] 4: zp ZP_WORD:116 [ mul16s::$9 ] 4: zp ZP_WORD:118 [ mul16s::$16 ] 2.6: zp ZP_WORD:100 [ mul16s::a#0 ] +Uplift Scope [memset] 38: zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] 2.17: zp ZP_WORD:187 [ memset::end#0 ] 2: zp ZP_WORD:56 [ memset::num#2 ] 1.57: zp ZP_BYTE:58 [ memset::c#3 ] 0: zp ZP_WORD:54 [ memset::str#2 ] +Uplift Scope [div32u16u] 4: zp ZP_DWORD:90 [ div32u16u::return#2 ] 4: zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] 1.33: zp ZP_DWORD:179 [ div32u16u::return#0 ] 0.8: zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] +Uplift Scope [] 0.8: zp ZP_WORD:185 [ rem16u#1 ] +Uplift Scope [bitmap_clear] Uplift Scope [main] -Uplifting [mul16u] best 36544 combination zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:23 [ mul16u::b#1 ] zp ZP_DWORD:111 [ mul16u::return#2 ] zp ZP_DWORD:156 [ mul16u::return#3 ] -Uplifting [wrap_y] best 36361 combination zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ] -Uplifting [bitmap_clear] best 35461 combination zp ZP_WORD:55 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp ZP_WORD:186 [ bitmap_clear::$3 ] -Uplifting [divr16u] best 35251 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:170 [ divr16u::return#2 ] zp ZP_WORD:174 [ divr16u::return#3 ] -Uplifting [render_sine] best 35171 combination zp ZP_WORD:65 [ render_sine::$10 ] zp ZP_WORD:67 [ render_sine::$0 ] zp ZP_WORD:69 [ render_sine::sin_val#0 ] zp ZP_WORD:73 [ render_sine::$11 ] zp ZP_WORD:75 [ render_sine::$3 ] zp ZP_WORD:77 [ render_sine::sin2_val#0 ] zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ] -Uplifting [bitmap_init] best 34661 combination zp ZP_WORD:61 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:190 [ bitmap_init::$5 ] zp ZP_BYTE:191 [ bitmap_init::$6 ] zp ZP_BYTE:188 [ bitmap_init::$7 ] +Uplifting [mul16u] best 33662 combination zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:31 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:25 [ mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 ] zp ZP_WORD:23 [ mul16u::b#1 ] zp ZP_DWORD:112 [ mul16u::return#2 ] zp ZP_DWORD:157 [ mul16u::return#3 ] +Uplifting [wrap_y] best 33479 combination zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] reg byte a [ wrap_y::return#0 ] reg byte a [ wrap_y::return#1 ] reg byte a [ wrap_y::return#2 ] +Uplifting [divr16u] best 33269 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:171 [ divr16u::return#2 ] zp ZP_WORD:175 [ divr16u::return#3 ] +Uplifting [render_sine] best 33189 combination zp ZP_WORD:66 [ render_sine::$10 ] zp ZP_WORD:68 [ render_sine::$0 ] zp ZP_WORD:70 [ render_sine::sin_val#0 ] zp ZP_WORD:74 [ render_sine::$11 ] zp ZP_WORD:76 [ render_sine::$3 ] zp ZP_WORD:78 [ render_sine::sin2_val#0 ] zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] zp ZP_WORD:2 [ render_sine::sin_idx#2 render_sine::sin_idx#1 ] reg byte x [ render_sine::ypos#0 ] reg byte x [ render_sine::ypos2#0 ] +Uplifting [bitmap_init] best 32679 combination zp ZP_WORD:64 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp ZP_BYTE:191 [ bitmap_init::$5 ] zp ZP_BYTE:192 [ bitmap_init::$6 ] zp ZP_BYTE:189 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [bitmap_plot] best 34594 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] zp ZP_WORD:83 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:85 [ bitmap_plot::plotter#1 ] zp ZP_WORD:81 [ bitmap_plot::$3 ] -Uplifting [sin16s] best 34594 combination zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:97 [ sin16s::return#0 ] zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:124 [ sin16s::$4 ] zp ZP_WORD:132 [ sin16s::x2#0 ] zp ZP_WORD:140 [ sin16s::x3_6#0 ] zp ZP_WORD:146 [ sin16s::x4#0 ] zp ZP_WORD:150 [ sin16s::x5#0 ] zp ZP_WORD:152 [ sin16s::x5_128#0 ] zp ZP_WORD:136 [ sin16s::x3#0 ] zp ZP_WORD:154 [ sin16s::usinx#1 ] zp ZP_WORD:128 [ sin16s::x1#0 ] zp ZP_WORD:142 [ sin16s::usinx#0 ] zp ZP_BYTE:35 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 34578 combination zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:130 [ mulu16_sel::return#0 ] zp ZP_WORD:134 [ mulu16_sel::return#1 ] zp ZP_WORD:138 [ mulu16_sel::return#2 ] zp ZP_WORD:144 [ mulu16_sel::return#10 ] zp ZP_WORD:148 [ mulu16_sel::return#11 ] zp ZP_DWORD:160 [ mulu16_sel::$0 ] zp ZP_DWORD:164 [ mulu16_sel::$1 ] zp ZP_WORD:168 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen2] best 34578 combination zp ZP_DWORD:105 [ sin16s_gen2::$5 ] zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:109 [ sin16s_gen2::$6 ] zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:93 [ sin16s_gen2::step#0 ] -Uplifting [mul16s] best 34578 combination zp ZP_DWORD:101 [ mul16s::return#2 ] zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:119 [ mul16s::return#0 ] zp ZP_WORD:115 [ mul16s::$9 ] zp ZP_WORD:117 [ mul16s::$16 ] zp ZP_WORD:99 [ mul16s::a#0 ] -Uplifting [memset] best 34578 combination zp ZP_WORD:63 [ memset::dst#2 memset::dst#1 ] -Uplifting [div32u16u] best 34578 combination zp ZP_DWORD:89 [ div32u16u::return#2 ] zp ZP_WORD:176 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:178 [ div32u16u::return#0 ] zp ZP_WORD:172 [ div32u16u::quotient_hi#0 ] -Uplifting [] best 34578 combination zp ZP_WORD:184 [ rem16u#1 ] -Uplifting [main] best 34578 combination -Attempting to uplift remaining variables inzp ZP_BYTE:190 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 34518 combination reg byte a [ bitmap_init::$5 ] -Attempting to uplift remaining variables inzp ZP_BYTE:191 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 34458 combination reg byte a [ bitmap_init::$6 ] -Attempting to uplift remaining variables inzp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Uplifting [bitmap_clear] best 34458 combination zp ZP_BYTE:54 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:188 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 34458 combination zp ZP_BYTE:188 [ bitmap_init::$7 ] +Uplifting [bitmap_plot] best 32612 combination reg byte x [ bitmap_plot::y#2 bitmap_plot::y#0 bitmap_plot::y#1 ] zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] zp ZP_WORD:84 [ bitmap_plot::$1 ] reg byte a [ bitmap_plot::$2 ] zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] zp ZP_WORD:82 [ bitmap_plot::$3 ] +Uplifting [sin16s] best 32612 combination zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:98 [ sin16s::return#0 ] zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:125 [ sin16s::$4 ] zp ZP_WORD:133 [ sin16s::x2#0 ] zp ZP_WORD:141 [ sin16s::x3_6#0 ] zp ZP_WORD:147 [ sin16s::x4#0 ] zp ZP_WORD:151 [ sin16s::x5#0 ] zp ZP_WORD:153 [ sin16s::x5_128#0 ] zp ZP_WORD:137 [ sin16s::x3#0 ] zp ZP_WORD:155 [ sin16s::usinx#1 ] zp ZP_WORD:129 [ sin16s::x1#0 ] zp ZP_WORD:143 [ sin16s::usinx#0 ] zp ZP_BYTE:35 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 32596 combination zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:131 [ mulu16_sel::return#0 ] zp ZP_WORD:135 [ mulu16_sel::return#1 ] zp ZP_WORD:139 [ mulu16_sel::return#2 ] zp ZP_WORD:145 [ mulu16_sel::return#10 ] zp ZP_WORD:149 [ mulu16_sel::return#11 ] zp ZP_DWORD:161 [ mulu16_sel::$0 ] zp ZP_DWORD:165 [ mulu16_sel::$1 ] zp ZP_WORD:169 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen2] best 32596 combination zp ZP_DWORD:106 [ sin16s_gen2::$5 ] zp ZP_WORD:17 [ sin16s_gen2::i#2 sin16s_gen2::i#1 ] zp ZP_WORD:110 [ sin16s_gen2::$6 ] zp ZP_DWORD:11 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] zp ZP_WORD:15 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] +Uplifting [mul16s] best 32596 combination zp ZP_DWORD:102 [ mul16s::return#2 ] zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] zp ZP_DWORD:120 [ mul16s::return#0 ] zp ZP_WORD:116 [ mul16s::$9 ] zp ZP_WORD:118 [ mul16s::$16 ] zp ZP_WORD:100 [ mul16s::a#0 ] +Uplifting [memset] best 32580 combination zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] zp ZP_WORD:187 [ memset::end#0 ] zp ZP_WORD:56 [ memset::num#2 ] reg byte x [ memset::c#3 ] zp ZP_WORD:54 [ memset::str#2 ] +Uplifting [div32u16u] best 32580 combination zp ZP_DWORD:90 [ div32u16u::return#2 ] zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:179 [ div32u16u::return#0 ] zp ZP_WORD:173 [ div32u16u::quotient_hi#0 ] +Uplifting [] best 32580 combination zp ZP_WORD:185 [ rem16u#1 ] +Uplifting [bitmap_clear] best 32580 combination +Uplifting [main] best 32580 combination +Attempting to uplift remaining variables inzp ZP_BYTE:191 [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 32520 combination reg byte a [ bitmap_init::$5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:192 [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 32460 combination reg byte a [ bitmap_init::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:189 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 32460 combination zp ZP_BYTE:189 [ bitmap_init::$7 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 34458 combination zp ZP_BYTE:35 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 32460 combination zp ZP_BYTE:35 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ render_sine::xpos#3 render_sine::xpos#8 render_sine::xpos#1 ] ] with [ zp ZP_WORD:7 [ bitmap_plot::x#2 bitmap_plot::x#0 bitmap_plot::x#1 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:154 [ sin16s::usinx#1 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:136 [ sin16s::x3#0 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:184 [ rem16u#1 ] ] - score: 2 -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] ] with [ zp ZP_WORD:69 [ render_sine::sin_val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 ] ] with [ zp ZP_WORD:77 [ render_sine::sin2_val#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] ] with [ zp ZP_DWORD:111 [ mul16u::return#2 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 ] ] with [ zp ZP_DWORD:119 [ mul16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:155 [ sin16s::usinx#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:137 [ sin16s::x3#0 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:185 [ rem16u#1 ] ] - score: 2 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 ] ] with [ zp ZP_WORD:70 [ render_sine::sin_val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 ] ] with [ zp ZP_WORD:78 [ render_sine::sin2_val#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 ] ] with [ zp ZP_DWORD:112 [ mul16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 ] ] with [ zp ZP_DWORD:120 [ mul16s::return#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ mul16u::b#1 ] ] with [ zp ZP_WORD:44 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:156 [ mul16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:124 [ sin16s::$4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp ZP_WORD:97 [ sin16s::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:132 [ sin16s::x2#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:146 [ sin16s::x4#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:170 [ divr16u::return#2 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:174 [ divr16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:55 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] ] with [ zp ZP_WORD:186 [ bitmap_clear::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ render_sine::$10 ] ] with [ zp ZP_WORD:67 [ render_sine::$0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:73 [ render_sine::$11 ] ] with [ zp ZP_WORD:75 [ render_sine::$3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:81 [ bitmap_plot::$3 ] ] with [ zp ZP_WORD:85 [ bitmap_plot::plotter#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:89 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:93 [ sin16s_gen2::step#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:89 [ div32u16u::return#2 sin16s_gen2::step#0 ] ] with [ zp ZP_DWORD:178 [ div32u16u::return#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:101 [ mul16s::return#2 ] ] with [ zp ZP_DWORD:105 [ sin16s_gen2::$5 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:115 [ mul16s::$9 ] ] with [ zp ZP_WORD:117 [ mul16s::$16 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:130 [ mulu16_sel::return#0 ] ] with [ zp ZP_WORD:168 [ mulu16_sel::return#12 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:138 [ mulu16_sel::return#2 ] ] with [ zp ZP_WORD:140 [ sin16s::x3_6#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:148 [ mulu16_sel::return#11 ] ] with [ zp ZP_WORD:150 [ sin16s::x5#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:160 [ mulu16_sel::$0 ] ] with [ zp ZP_DWORD:164 [ mulu16_sel::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 ] ] with [ zp ZP_WORD:65 [ render_sine::$10 render_sine::$0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$0 ] ] with [ zp ZP_WORD:73 [ render_sine::$11 render_sine::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] ] with [ zp ZP_DWORD:157 [ mul16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:36 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] ] with [ zp ZP_DWORD:125 [ sin16s::$4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 ] ] with [ zp ZP_WORD:98 [ sin16s::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 ] ] with [ zp ZP_WORD:133 [ sin16s::x2#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 ] ] with [ zp ZP_WORD:147 [ sin16s::x4#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] ] with [ zp ZP_WORD:171 [ divr16u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 ] ] with [ zp ZP_WORD:175 [ divr16u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ memset::str#2 ] ] with [ zp ZP_WORD:59 [ memset::dst#2 memset::dst#3 memset::dst#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ memset::num#2 ] ] with [ zp ZP_WORD:187 [ memset::end#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:66 [ render_sine::$10 ] ] with [ zp ZP_WORD:68 [ render_sine::$0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:74 [ render_sine::$11 ] ] with [ zp ZP_WORD:76 [ render_sine::$3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:82 [ bitmap_plot::$3 ] ] with [ zp ZP_WORD:86 [ bitmap_plot::plotter#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:90 [ div32u16u::return#2 ] ] with [ zp ZP_DWORD:94 [ sin16s_gen2::step#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:90 [ div32u16u::return#2 sin16s_gen2::step#0 ] ] with [ zp ZP_DWORD:179 [ div32u16u::return#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:102 [ mul16s::return#2 ] ] with [ zp ZP_DWORD:106 [ sin16s_gen2::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:116 [ mul16s::$9 ] ] with [ zp ZP_WORD:118 [ mul16s::$16 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:131 [ mulu16_sel::return#0 ] ] with [ zp ZP_WORD:169 [ mulu16_sel::return#12 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:139 [ mulu16_sel::return#2 ] ] with [ zp ZP_WORD:141 [ sin16s::x3_6#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:149 [ mulu16_sel::return#11 ] ] with [ zp ZP_WORD:151 [ sin16s::x5#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:161 [ mulu16_sel::$0 ] ] with [ zp ZP_DWORD:165 [ mulu16_sel::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 ] ] with [ zp ZP_WORD:66 [ render_sine::$10 render_sine::$0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$0 ] ] with [ zp ZP_WORD:74 [ render_sine::$11 render_sine::$3 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 ] ] with [ zp ZP_DWORD:27 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] with [ zp ZP_DWORD:101 [ mul16s::return#2 sin16s_gen2::$5 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] with [ zp ZP_WORD:99 [ mul16s::a#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 ] ] with [ zp ZP_WORD:142 [ sin16s::usinx#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp ZP_WORD:134 [ mulu16_sel::return#1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp ZP_WORD:144 [ mulu16_sel::return#10 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:176 [ div32u16u::quotient_lo#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:130 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp ZP_WORD:138 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:130 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp ZP_WORD:148 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$5 ] ] with [ zp ZP_DWORD:160 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:130 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp ZP_WORD:152 [ sin16s::x5_128#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 ] ] with [ zp ZP_DWORD:102 [ mul16s::return#2 sin16s_gen2::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 ] ] with [ zp ZP_WORD:100 [ mul16s::a#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:40 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 mul16s::a#0 ] ] with [ zp ZP_WORD:143 [ sin16s::usinx#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 ] ] with [ zp ZP_WORD:135 [ mulu16_sel::return#1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:42 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 sin16s::x3#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#1 ] ] with [ zp ZP_WORD:145 [ mulu16_sel::return#10 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 ] ] with [ zp ZP_WORD:177 [ div32u16u::quotient_lo#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:131 [ mulu16_sel::return#0 mulu16_sel::return#12 ] ] with [ zp ZP_WORD:139 [ mulu16_sel::return#2 sin16s::x3_6#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:131 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 ] ] with [ zp ZP_WORD:149 [ mulu16_sel::return#11 sin16s::x5#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_DWORD:19 [ mul16s::m#4 mul16s::m#1 mul16s::m#0 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 sin16s_gen2::$5 ] ] with [ zp ZP_DWORD:161 [ mulu16_sel::$0 mulu16_sel::$1 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:131 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 ] ] with [ zp ZP_WORD:153 [ sin16s::x5_128#0 ] ] - score: 1 Allocated (was zp ZP_WORD:9) zp ZP_WORD:6 [ wrap_y::y#6 wrap_y::y#4 wrap_y::y#9 wrap_y::y#0 wrap_y::y#1 wrap_y::y#2 wrap_y::y#3 render_sine::sin_val#0 render_sine::sin2_val#0 render_sine::$10 render_sine::$0 render_sine::$11 render_sine::$3 ] Allocated (was zp ZP_DWORD:11) zp ZP_DWORD:8 [ sin16s_gen2::x#2 sin16s_gen2::x#1 ] Allocated (was zp ZP_WORD:15) zp ZP_WORD:12 [ sin16s_gen2::sintab#2 sin16s_gen2::sintab#0 ] @@ -6001,19 +6125,18 @@ Allocated (was zp ZP_WORD:42) zp ZP_WORD:35 [ mulu16_sel::v1#5 mulu16_sel::v1#3 Allocated (was zp ZP_WORD:47) zp ZP_WORD:37 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] Allocated (was zp ZP_WORD:49) zp ZP_WORD:39 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] Allocated (was zp ZP_WORD:51) zp ZP_WORD:41 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -Allocated (was zp ZP_BYTE:54) zp ZP_BYTE:43 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Allocated (was zp ZP_WORD:55) zp ZP_WORD:44 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::$3 ] -Allocated (was zp ZP_WORD:61) zp ZP_WORD:46 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] -Allocated (was zp ZP_WORD:63) zp ZP_WORD:48 [ memset::dst#2 memset::dst#1 ] -Allocated (was zp ZP_WORD:81) zp ZP_WORD:50 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] -Allocated (was zp ZP_WORD:83) zp ZP_WORD:52 [ bitmap_plot::$1 ] -Allocated (was zp ZP_DWORD:89) zp ZP_DWORD:54 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] -Allocated (was zp ZP_WORD:109) zp ZP_WORD:58 [ sin16s_gen2::$6 ] -Allocated (was zp ZP_WORD:115) zp ZP_WORD:60 [ mul16s::$9 mul16s::$16 ] -Allocated (was zp ZP_WORD:128) zp ZP_WORD:62 [ sin16s::x1#0 ] -Allocated (was zp ZP_WORD:130) zp ZP_WORD:64 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] -Allocated (was zp ZP_WORD:172) zp ZP_WORD:66 [ div32u16u::quotient_hi#0 ] -Allocated (was zp ZP_BYTE:188) zp ZP_BYTE:68 [ bitmap_init::$7 ] +Allocated (was zp ZP_WORD:54) zp ZP_WORD:43 [ memset::str#2 memset::dst#2 memset::dst#3 memset::dst#1 ] +Allocated (was zp ZP_WORD:56) zp ZP_WORD:45 [ memset::num#2 memset::end#0 ] +Allocated (was zp ZP_WORD:64) zp ZP_WORD:47 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] +Allocated (was zp ZP_WORD:82) zp ZP_WORD:49 [ bitmap_plot::$3 bitmap_plot::plotter#1 ] +Allocated (was zp ZP_WORD:84) zp ZP_WORD:51 [ bitmap_plot::$1 ] +Allocated (was zp ZP_DWORD:90) zp ZP_DWORD:53 [ div32u16u::return#2 sin16s_gen2::step#0 div32u16u::return#0 ] +Allocated (was zp ZP_WORD:110) zp ZP_WORD:57 [ sin16s_gen2::$6 ] +Allocated (was zp ZP_WORD:116) zp ZP_WORD:59 [ mul16s::$9 mul16s::$16 ] +Allocated (was zp ZP_WORD:129) zp ZP_WORD:61 [ sin16s::x1#0 ] +Allocated (was zp ZP_WORD:131) zp ZP_WORD:63 [ mulu16_sel::return#0 mulu16_sel::return#12 mulu16_sel::return#2 sin16s::x3_6#0 mulu16_sel::return#11 sin16s::x5#0 sin16s::x5_128#0 ] +Allocated (was zp ZP_WORD:173) zp ZP_WORD:65 [ div32u16u::quotient_hi#0 ] +Allocated (was zp ZP_BYTE:189) zp ZP_BYTE:67 [ bitmap_init::$7 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -6125,52 +6248,45 @@ main: { //SEG27 [14] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 - //SEG28 [15] call memset - //SEG29 [220] phi from main::@3 to memset [phi:main::@3->memset] - memset_from_b3: - jsr memset + //SEG28 [15] call bitmap_init + //SEG29 [198] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] + bitmap_init_from_b3: + jsr bitmap_init //SEG30 [16] phi from main::@3 to main::@4 [phi:main::@3->main::@4] b4_from_b3: jmp b4 //SEG31 main::@4 b4: - //SEG32 [17] call bitmap_init - //SEG33 [198] phi from main::@4 to bitmap_init [phi:main::@4->bitmap_init] - bitmap_init_from_b4: - jsr bitmap_init + //SEG32 [17] call bitmap_clear + //SEG33 [185] phi from main::@4 to bitmap_clear [phi:main::@4->bitmap_clear] + bitmap_clear_from_b4: + jsr bitmap_clear //SEG34 [18] phi from main::@4 to main::@5 [phi:main::@4->main::@5] b5_from_b4: jmp b5 //SEG35 main::@5 b5: - //SEG36 [19] call bitmap_clear - jsr bitmap_clear - //SEG37 [20] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + //SEG36 [19] call sin16s_gen2 + //SEG37 [68] phi from main::@5 to sin16s_gen2 [phi:main::@5->sin16s_gen2] + sin16s_gen2_from_b5: + jsr sin16s_gen2 + //SEG38 [20] phi from main::@5 to main::@6 [phi:main::@5->main::@6] b6_from_b5: jmp b6 - //SEG38 main::@6 + //SEG39 main::@6 b6: - //SEG39 [21] call sin16s_gen2 - //SEG40 [70] phi from main::@6 to sin16s_gen2 [phi:main::@6->sin16s_gen2] - sin16s_gen2_from_b6: - jsr sin16s_gen2 - //SEG41 [22] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - b7_from_b6: - jmp b7 - //SEG42 main::@7 - b7: - //SEG43 [23] call render_sine - //SEG44 [25] phi from main::@7 to render_sine [phi:main::@7->render_sine] - render_sine_from_b7: + //SEG40 [21] call render_sine + //SEG41 [23] phi from main::@6 to render_sine [phi:main::@6->render_sine] + render_sine_from_b6: jsr render_sine jmp b1 - //SEG45 main::@1 + //SEG42 main::@1 b1: - //SEG46 [24] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG43 [22] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BGCOL jmp b1 } -//SEG47 render_sine +//SEG44 render_sine render_sine: { .label _0 = 6 .label _3 = 6 @@ -6180,34 +6296,34 @@ render_sine: { .label sin2_val = 6 .label xpos = 4 .label sin_idx = 2 - //SEG48 [26] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1] + //SEG45 [24] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1] b1_from_render_sine: - //SEG49 [26] phi (word) render_sine::xpos#3 = (byte) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vbuc1 + //SEG46 [24] phi (word) render_sine::xpos#3 = (byte) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vbuc1 lda #0 sta xpos lda #0 sta xpos+1 - //SEG50 [26] phi (word) render_sine::sin_idx#2 = (byte) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vbuc1 + //SEG47 [24] phi (word) render_sine::sin_idx#2 = (byte) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vbuc1 lda #0 sta sin_idx lda #0 sta sin_idx+1 jmp b1 - //SEG51 [26] phi from render_sine::@2 to render_sine::@1 [phi:render_sine::@2->render_sine::@1] + //SEG48 [24] phi from render_sine::@2 to render_sine::@1 [phi:render_sine::@2->render_sine::@1] b1_from_b2: - //SEG52 [26] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#8 [phi:render_sine::@2->render_sine::@1#0] -- register_copy - //SEG53 [26] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@2->render_sine::@1#1] -- register_copy + //SEG49 [24] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#8 [phi:render_sine::@2->render_sine::@1#0] -- register_copy + //SEG50 [24] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@2->render_sine::@1#1] -- register_copy jmp b1 - //SEG54 render_sine::@1 + //SEG51 render_sine::@1 b1: - //SEG55 [27] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG52 [25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda sin_idx asl sta _10 lda sin_idx+1 rol sta _10+1 - //SEG56 [28] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz1 + //SEG53 [26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz1 clc lda _0 adc #sin sta _0+1 - //SEG57 [29] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) -- vwsz1=_deref_pwsz1 + //SEG54 [27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) -- vwsz1=_deref_pwsz1 ldy #0 lda (sin_val),y tax @@ -6223,37 +6339,37 @@ render_sine: { lda (sin_val),y stx sin_val sta sin_val+1 - //SEG58 [30] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 - //SEG59 [31] call wrap_y - //SEG60 [61] phi from render_sine::@1 to wrap_y [phi:render_sine::@1->wrap_y] + //SEG55 [28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 + //SEG56 [29] call wrap_y + //SEG57 [59] phi from render_sine::@1 to wrap_y [phi:render_sine::@1->wrap_y] wrap_y_from_b1: - //SEG61 [61] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@1->wrap_y#0] -- register_copy + //SEG58 [59] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@1->wrap_y#0] -- register_copy jsr wrap_y - //SEG62 [32] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 + //SEG59 [30] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 jmp b3 - //SEG63 render_sine::@3 + //SEG60 render_sine::@3 b3: - //SEG64 [33] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuxx=vbuaa + //SEG61 [31] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuxx=vbuaa tax - //SEG65 [34] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 - //SEG66 [35] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 - //SEG67 [36] call bitmap_plot - //SEG68 [54] phi from render_sine::@3 to bitmap_plot [phi:render_sine::@3->bitmap_plot] + //SEG62 [32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 + //SEG63 [33] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 + //SEG64 [34] call bitmap_plot + //SEG65 [52] phi from render_sine::@3 to bitmap_plot [phi:render_sine::@3->bitmap_plot] bitmap_plot_from_b3: - //SEG69 [54] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@3->bitmap_plot#0] -- register_copy - //SEG70 [54] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@3->bitmap_plot#1] -- register_copy + //SEG66 [52] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@3->bitmap_plot#0] -- register_copy + //SEG67 [52] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@3->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp b4 - //SEG71 render_sine::@4 + //SEG68 render_sine::@4 b4: - //SEG72 [37] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG69 [35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda sin_idx asl sta _11 lda sin_idx+1 rol sta _11+1 - //SEG73 [38] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz1 + //SEG70 [36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz1 clc lda _3 adc #sin2 sta _3+1 - //SEG74 [39] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) -- vwsz1=_deref_pwsz1 + //SEG71 [37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) -- vwsz1=_deref_pwsz1 ldy #0 lda (sin2_val),y tax @@ -6269,7 +6385,7 @@ render_sine: { lda (sin2_val),y stx sin2_val sta sin2_val+1 - //SEG75 [40] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1 + //SEG72 [38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1 lda #$a sta $fe ora #$7f @@ -6284,65 +6400,65 @@ render_sine: { lda wrap_y.y+1 adc $ff sta wrap_y.y+1 - //SEG76 [41] call wrap_y - //SEG77 [61] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y] + //SEG73 [39] call wrap_y + //SEG74 [59] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y] wrap_y_from_b4: - //SEG78 [61] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@4->wrap_y#0] -- register_copy + //SEG75 [59] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@4->wrap_y#0] -- register_copy jsr wrap_y - //SEG79 [42] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 + //SEG76 [40] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 jmp b5 - //SEG80 render_sine::@5 + //SEG77 render_sine::@5 b5: - //SEG81 [43] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuxx=vbuaa + //SEG78 [41] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuxx=vbuaa tax - //SEG82 [44] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 - //SEG83 [45] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 - //SEG84 [46] call bitmap_plot - //SEG85 [54] phi from render_sine::@5 to bitmap_plot [phi:render_sine::@5->bitmap_plot] + //SEG79 [42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 + //SEG80 [43] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 + //SEG81 [44] call bitmap_plot + //SEG82 [52] phi from render_sine::@5 to bitmap_plot [phi:render_sine::@5->bitmap_plot] bitmap_plot_from_b5: - //SEG86 [54] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@5->bitmap_plot#0] -- register_copy - //SEG87 [54] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@5->bitmap_plot#1] -- register_copy + //SEG83 [52] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@5->bitmap_plot#0] -- register_copy + //SEG84 [52] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@5->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp b6 - //SEG88 render_sine::@6 + //SEG85 render_sine::@6 b6: - //SEG89 [47] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 + //SEG86 [45] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 inc xpos bne !+ inc xpos+1 !: - //SEG90 [48] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 -- vwuz1_neq_vwuc1_then_la1 + //SEG87 [46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 -- vwuz1_neq_vwuc1_then_la1 lda xpos+1 cmp #>$140 bne b7_from_b6 lda xpos cmp #<$140 bne b7_from_b6 - //SEG91 [50] phi from render_sine::@6 to render_sine::@2 [phi:render_sine::@6->render_sine::@2] + //SEG88 [48] phi from render_sine::@6 to render_sine::@2 [phi:render_sine::@6->render_sine::@2] b2_from_b6: - //SEG92 [50] phi (word) render_sine::xpos#8 = (byte) 0 [phi:render_sine::@6->render_sine::@2#0] -- vwuz1=vbuc1 + //SEG89 [48] phi (word) render_sine::xpos#8 = (byte) 0 [phi:render_sine::@6->render_sine::@2#0] -- vwuz1=vbuc1 lda #0 sta xpos lda #0 sta xpos+1 jmp b2 - //SEG93 [49] phi from render_sine::@6 to render_sine::@7 [phi:render_sine::@6->render_sine::@7] + //SEG90 [47] phi from render_sine::@6 to render_sine::@7 [phi:render_sine::@6->render_sine::@7] b7_from_b6: jmp b7 - //SEG94 render_sine::@7 + //SEG91 render_sine::@7 b7: - //SEG95 [50] phi from render_sine::@7 to render_sine::@2 [phi:render_sine::@7->render_sine::@2] + //SEG92 [48] phi from render_sine::@7 to render_sine::@2 [phi:render_sine::@7->render_sine::@2] b2_from_b7: - //SEG96 [50] phi (word) render_sine::xpos#8 = (word) render_sine::xpos#1 [phi:render_sine::@7->render_sine::@2#0] -- register_copy + //SEG93 [48] phi (word) render_sine::xpos#8 = (word) render_sine::xpos#1 [phi:render_sine::@7->render_sine::@2#0] -- register_copy jmp b2 - //SEG97 render_sine::@2 + //SEG94 render_sine::@2 b2: - //SEG98 [51] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 + //SEG95 [49] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 inc sin_idx bne !+ inc sin_idx+1 !: - //SEG99 [52] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG96 [50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 -- vwuz1_lt_vwuc1_then_la1 lda sin_idx+1 cmp #>SIN_SIZE bcc b1_from_b2 @@ -6352,32 +6468,32 @@ render_sine: { bcc b1_from_b2 !: jmp breturn - //SEG100 render_sine::@return + //SEG97 render_sine::@return breturn: - //SEG101 [53] return + //SEG98 [51] return rts } -//SEG102 bitmap_plot +//SEG99 bitmap_plot // Plot a single dot in the bitmap // bitmap_plot(word zeropage(4) x, byte register(X) y) bitmap_plot: { - .label _1 = $34 - .label plotter = $32 + .label _1 = $33 + .label plotter = $31 .label x = 4 - .label _3 = $32 - //SEG103 [55] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx + .label _3 = $31 + //SEG100 [53] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx lda bitmap_plot_yhi,x sta _3+1 lda bitmap_plot_ylo,x sta _3 - //SEG104 [56] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + //SEG101 [54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 lda x and #<$fff8 sta _1 lda x+1 and #>$fff8 sta _1+1 - //SEG105 [57] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 + //SEG102 [55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 lda plotter clc adc _1 @@ -6385,9 +6501,9 @@ bitmap_plot: { lda plotter+1 adc _1+1 sta plotter+1 - //SEG106 [58] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuaa=_lo_vwuz1 + //SEG103 [56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuaa=_lo_vwuz1 lda x - //SEG107 [59] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa + //SEG104 [57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa tay lda bitmap_plot_bit,y ldy #0 @@ -6395,23 +6511,23 @@ bitmap_plot: { ldy #0 sta (plotter),y jmp breturn - //SEG108 bitmap_plot::@return + //SEG105 bitmap_plot::@return breturn: - //SEG109 [60] return + //SEG106 [58] return rts } -//SEG110 wrap_y +//SEG107 wrap_y // wrap_y(signed word zeropage(6) y) wrap_y: { .label y = 6 - //SEG111 [62] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1] + //SEG108 [60] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1] b1_from_wrap_y: b1_from_b2: - //SEG112 [62] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy + //SEG109 [60] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy jmp b1 - //SEG113 wrap_y::@1 + //SEG110 wrap_y::@1 b1: - //SEG114 [63] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 + //SEG111 [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 lda y cmp #<$c8 lda y+1 @@ -6420,29 +6536,29 @@ wrap_y: { eor #$80 !: bpl b2 - //SEG115 [64] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3] + //SEG112 [62] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3] b3_from_b1: b3_from_b4: - //SEG116 [64] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy + //SEG113 [62] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy jmp b3 - //SEG117 wrap_y::@3 + //SEG114 wrap_y::@3 b3: - //SEG118 [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 + //SEG115 [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 lda y+1 bmi b4 jmp b5 - //SEG119 wrap_y::@5 + //SEG116 wrap_y::@5 b5: - //SEG120 [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuaa=_byte_vwsz1 + //SEG117 [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuaa=_byte_vwsz1 lda y jmp breturn - //SEG121 wrap_y::@return + //SEG118 wrap_y::@return breturn: - //SEG122 [67] return + //SEG119 [65] return rts - //SEG123 wrap_y::@4 + //SEG120 wrap_y::@4 b4: - //SEG124 [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 + //SEG121 [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 clc lda y adc #<$c8 @@ -6451,9 +6567,9 @@ wrap_y: { adc #>$c8 sta y+1 jmp b3_from_b4 - //SEG125 wrap_y::@2 + //SEG122 wrap_y::@2 b2: - //SEG126 [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 + //SEG123 [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 lda y sec sbc #<$c8 @@ -6463,7 +6579,7 @@ wrap_y: { sta y+1 jmp b1_from_b2 } -//SEG127 sin16s_gen2 +//SEG124 sin16s_gen2 // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) @@ -6473,33 +6589,33 @@ sin16s_gen2: { .const max = $140 .label ampl = max-min .label _5 = $10 - .label _6 = $3a - .label step = $36 + .label _6 = $39 + .label step = $35 .label sintab = $c .label x = 8 .label i = $e - //SEG128 [71] call div32u16u - //SEG129 [159] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + //SEG125 [69] call div32u16u + //SEG126 [157] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] div32u16u_from_sin16s_gen2: jsr div32u16u - //SEG130 [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + //SEG127 [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 jmp b2 - //SEG131 sin16s_gen2::@2 + //SEG128 sin16s_gen2::@2 b2: - //SEG132 [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - //SEG133 [74] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG129 [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + //SEG130 [72] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] b1_from_b2: - //SEG134 [74] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + //SEG131 [72] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #0 sta i lda #0 sta i+1 - //SEG135 [74] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) sin#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + //SEG132 [72] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) sin#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #sin sta sintab+1 - //SEG136 [74] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + //SEG133 [72] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x lda #0 @@ -6508,15 +6624,15 @@ sin16s_gen2: { sta x+3 jmp b1 // u[4.28] - //SEG137 [74] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG134 [72] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] b1_from_b4: - //SEG138 [74] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - //SEG139 [74] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - //SEG140 [74] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG135 [72] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG136 [72] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG137 [72] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy jmp b1 - //SEG141 sin16s_gen2::@1 + //SEG138 sin16s_gen2::@1 b1: - //SEG142 [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + //SEG139 [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -6525,33 +6641,33 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - //SEG143 [76] call sin16s + //SEG140 [74] call sin16s jsr sin16s - //SEG144 [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + //SEG141 [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 jmp b3 - //SEG145 sin16s_gen2::@3 + //SEG142 sin16s_gen2::@3 b3: - //SEG146 [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - //SEG147 [79] call mul16s + //SEG143 [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + //SEG144 [77] call mul16s jsr mul16s - //SEG148 [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + //SEG145 [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 jmp b4 - //SEG149 sin16s_gen2::@4 + //SEG146 sin16s_gen2::@4 b4: - //SEG150 [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - //SEG151 [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + //SEG147 [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + //SEG148 [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _6 lda _5+3 sta _6+1 - //SEG152 [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + //SEG149 [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 ldy #0 lda _6 sta (sintab),y iny lda _6+1 sta (sintab),y - //SEG153 [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + //SEG150 [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -6559,7 +6675,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - //SEG154 [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + //SEG151 [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -6573,12 +6689,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - //SEG155 [86] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + //SEG152 [84] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG156 [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG153 [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>SIN_SIZE bcc b1_from_b4 @@ -6588,31 +6704,31 @@ sin16s_gen2: { bcc b1_from_b4 !: jmp breturn - //SEG157 sin16s_gen2::@return + //SEG154 sin16s_gen2::@return breturn: - //SEG158 [88] return + //SEG155 [86] return rts } -//SEG159 mul16s +//SEG156 mul16s // Multiply of two signed words to a signed double word // Fixes offsets introduced by using unsigned multiplication // mul16s(signed word zeropage($21) a) mul16s: { - .label _9 = $3c - .label _16 = $3c + .label _9 = $3b + .label _16 = $3b .label m = $10 .label return = $10 .label a = $21 - //SEG160 [89] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 + //SEG157 [87] (word~) mul16u::a#8 ← (word)(signed word) mul16s::a#0 -- vwuz1=vwuz2 lda a sta mul16u.a lda a+1 sta mul16u.a+1 - //SEG161 [90] call mul16u - //SEG162 [100] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG158 [88] call mul16u + //SEG159 [98] phi from mul16s to mul16u [phi:mul16s->mul16u] mul16u_from_mul16s: - //SEG163 [100] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy - //SEG164 [100] phi (dword) mul16u::mb#0 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vduz1=vduc1 + //SEG160 [98] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG161 [98] phi (dword) mul16u::mb#0 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vduz1=vduc1 lda #sin16s_gen2.ampl @@ -6622,23 +6738,23 @@ mul16s: { lda #>sin16s_gen2.ampl>>$10 sta mul16u.mb+3 jsr mul16u - //SEG165 [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + //SEG162 [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 jmp b4 - //SEG166 mul16s::@4 + //SEG163 mul16s::@4 b4: - //SEG167 [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - //SEG168 [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + //SEG164 [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + //SEG165 [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 lda a+1 bpl b1_from_b4 jmp b3 - //SEG169 mul16s::@3 + //SEG166 mul16s::@3 b3: - //SEG170 [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + //SEG167 [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 lda m+2 sta _9 lda m+3 sta _9+1 - //SEG171 [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz1_minus_vwuc1 + //SEG168 [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz1_minus_vwuc1 lda _16 sec sbc #sin16s_gen2.ampl sta _16+1 - //SEG172 [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + //SEG169 [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 lda _16 sta m+2 lda _16+1 sta m+3 - //SEG173 [97] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1] + //SEG170 [95] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1] b1_from_b3: b1_from_b4: - //SEG174 [97] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy + //SEG171 [95] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy jmp b1 - //SEG175 mul16s::@1 + //SEG172 mul16s::@1 b1: jmp b2 - //SEG176 mul16s::@2 + //SEG173 mul16s::@2 b2: - //SEG177 [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + //SEG174 [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 jmp breturn - //SEG178 mul16s::@return + //SEG175 mul16s::@return breturn: - //SEG179 [99] return + //SEG176 [97] return rts } -//SEG180 mul16u +//SEG177 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word // mul16u(word zeropage($16) a, word zeropage($14) b) mul16u: { @@ -6677,42 +6793,42 @@ mul16u: { .label res = $10 .label return = $10 .label b = $14 - //SEG181 [101] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + //SEG178 [99] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] b1_from_mul16u: - //SEG182 [101] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy - //SEG183 [101] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + //SEG179 [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG180 [99] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 lda #0 sta res lda #0 sta res+1 sta res+2 sta res+3 - //SEG184 [101] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG181 [99] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy jmp b1 - //SEG185 mul16u::@1 + //SEG182 mul16u::@1 b1: - //SEG186 [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + //SEG183 [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 lda a bne b2 lda a+1 bne b2 jmp breturn - //SEG187 mul16u::@return + //SEG184 mul16u::@return breturn: - //SEG188 [103] return + //SEG185 [101] return rts - //SEG189 mul16u::@2 + //SEG186 mul16u::@2 b2: - //SEG190 [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 + //SEG187 [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 lda a and #1 - //SEG191 [105] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 + //SEG188 [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3_from_b2 jmp b4 - //SEG192 mul16u::@4 + //SEG189 mul16u::@4 b4: - //SEG193 [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + //SEG190 [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 lda res clc adc mb @@ -6726,29 +6842,29 @@ mul16u: { lda res+3 adc mb+3 sta res+3 - //SEG194 [107] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG191 [105] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] b3_from_b2: b3_from_b4: - //SEG195 [107] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG192 [105] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy jmp b3 - //SEG196 mul16u::@3 + //SEG193 mul16u::@3 b3: - //SEG197 [108] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG194 [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr a+1 ror a - //SEG198 [109] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + //SEG195 [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 asl mb rol mb+1 rol mb+2 rol mb+3 - //SEG199 [101] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG196 [99] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] b1_from_b3: - //SEG200 [101] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy - //SEG201 [101] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy - //SEG202 [101] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + //SEG197 [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG198 [99] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG199 [99] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy jmp b1 } -//SEG203 sin16s +//SEG200 sin16s // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff @@ -6757,17 +6873,17 @@ sin16s: { .label _4 = $1d .label x = $1d .label return = $21 - .label x1 = $3e + .label x1 = $3d .label x2 = $23 .label x3 = $23 - .label x3_6 = $40 + .label x3_6 = $3f .label usinx = $21 .label x4 = $23 - .label x5 = $40 - .label x5_128 = $40 + .label x5 = $3f + .label x5_128 = $3f .label sinx = $21 .label isUpper = $1c - //SEG204 [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + //SEG201 [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b1_from_sin16s @@ -6785,9 +6901,9 @@ sin16s: { bcc b1_from_sin16s !: jmp b4 - //SEG205 sin16s::@4 + //SEG202 sin16s::@4 b4: - //SEG206 [111] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 + //SEG203 [109] (dword) sin16s::x#1 ← (dword) sin16s::x#0 - (const dword) PI_u4f28#0 -- vduz1=vduz1_minus_vduc1 lda x sec sbc #PI_u4f28>>$10 sta x+3 - //SEG207 [112] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG204 [110] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] b1_from_b4: - //SEG208 [112] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG205 [110] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - //SEG209 [112] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + //SEG206 [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - //SEG210 [112] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + //SEG207 [110] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b1_from_sin16s: - //SEG211 [112] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG208 [110] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - //SEG212 [112] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG209 [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy jmp b1 - //SEG213 sin16s::@1 + //SEG210 sin16s::@1 b1: - //SEG214 [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + //SEG211 [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2_from_b1 @@ -6835,9 +6951,9 @@ sin16s: { bcc b2_from_b1 !: jmp b5 - //SEG215 sin16s::@5 + //SEG212 sin16s::@5 b5: - //SEG216 [114] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 + //SEG213 [112] (dword) sin16s::x#2 ← (const dword) PI_u4f28#0 - (dword) sin16s::x#4 -- vduz1=vduc1_minus_vduz1 lda #PI_u4f28>>$10 sbc x+3 sta x+3 - //SEG217 [115] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG214 [113] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] b2_from_b1: b2_from_b5: - //SEG218 [115] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG215 [113] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy jmp b2 - //SEG219 sin16s::@2 + //SEG216 sin16s::@2 b2: - //SEG220 [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + //SEG217 [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -6867,80 +6983,80 @@ sin16s: { rol _4+3 dey bne !- - //SEG221 [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + //SEG218 [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - //SEG222 [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG219 [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - //SEG223 [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG220 [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG224 [120] call mulu16_sel - //SEG225 [150] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG221 [118] call mulu16_sel + //SEG222 [148] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] mulu16_sel_from_b2: - //SEG226 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG223 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG227 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - //SEG228 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + //SEG224 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG225 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG229 [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + //SEG226 [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 jmp b7 - //SEG230 sin16s::@7 + //SEG227 sin16s::@7 b7: - //SEG231 [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + //SEG228 [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - //SEG232 [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - //SEG233 [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG229 [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + //SEG230 [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG234 [125] call mulu16_sel - //SEG235 [150] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG231 [123] call mulu16_sel + //SEG232 [148] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] mulu16_sel_from_b7: - //SEG236 [150] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG233 [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG237 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - //SEG238 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + //SEG234 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG235 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG239 [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG236 [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 sta mulu16_sel.return_1+1 jmp b8 - //SEG240 sin16s::@8 + //SEG237 sin16s::@8 b8: - //SEG241 [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - //SEG242 [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - //SEG243 [129] call mulu16_sel - //SEG244 [150] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG238 [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + //SEG239 [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + //SEG240 [127] call mulu16_sel + //SEG241 [148] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] mulu16_sel_from_b8: - //SEG245 [150] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG242 [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG246 [150] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + //SEG243 [148] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - //SEG247 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + //SEG244 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG248 [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + //SEG245 [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 jmp b9 - //SEG249 sin16s::@9 + //SEG246 sin16s::@9 b9: - //SEG250 [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - //SEG251 [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + //SEG247 [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + //SEG248 [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -6948,49 +7064,49 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - //SEG252 [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - //SEG253 [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG249 [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + //SEG250 [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG254 [135] call mulu16_sel - //SEG255 [150] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG251 [133] call mulu16_sel + //SEG252 [148] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] mulu16_sel_from_b9: - //SEG256 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG253 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG257 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - //SEG258 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + //SEG254 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG255 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG259 [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG256 [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 sta mulu16_sel.return_10+1 jmp b10 - //SEG260 sin16s::@10 + //SEG257 sin16s::@10 b10: - //SEG261 [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - //SEG262 [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - //SEG263 [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG258 [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + //SEG259 [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + //SEG260 [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG264 [140] call mulu16_sel - //SEG265 [150] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG261 [138] call mulu16_sel + //SEG262 [148] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] mulu16_sel_from_b10: - //SEG266 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG263 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG267 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - //SEG268 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + //SEG264 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG265 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG269 [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + //SEG266 [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 jmp b11 - //SEG270 sin16s::@11 + //SEG267 sin16s::@11 b11: - //SEG271 [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - //SEG272 [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + //SEG268 [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + //SEG269 [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -6999,7 +7115,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - //SEG273 [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG270 [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -7007,41 +7123,39 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx+1 - //SEG274 [145] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + //SEG271 [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b12 jmp b6 - //SEG275 sin16s::@6 + //SEG272 sin16s::@6 b6: - //SEG276 [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + //SEG273 [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec - lda sinx - eor #$ff - adc #0 + lda #0 + sbc sinx sta sinx - lda sinx+1 - eor #$ff - adc #0 + lda #0 + sbc sinx+1 sta sinx+1 - //SEG277 [147] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG274 [145] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] b3_from_b12: b3_from_b6: - //SEG278 [147] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG275 [145] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy jmp b3 - //SEG279 sin16s::@3 + //SEG276 sin16s::@3 b3: jmp breturn - //SEG280 sin16s::@return + //SEG277 sin16s::@return breturn: - //SEG281 [148] return + //SEG278 [146] return rts - //SEG282 sin16s::@12 + //SEG279 sin16s::@12 b12: - //SEG283 [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + //SEG280 [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 jmp b3_from_b12 } -//SEG284 mulu16_sel +//SEG281 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip // mulu16_sel(word zeropage($23) v1, word zeropage($14) v2, byte register(X) select) @@ -7050,20 +7164,20 @@ mulu16_sel: { .label _1 = $10 .label v1 = $23 .label v2 = $14 - .label return = $40 + .label return = $3f .label return_1 = $23 .label return_10 = $23 - //SEG285 [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + //SEG282 [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - //SEG286 [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - //SEG287 [153] call mul16u - //SEG288 [100] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG283 [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + //SEG284 [151] call mul16u + //SEG285 [98] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] mul16u_from_mulu16_sel: - //SEG289 [100] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy - //SEG290 [100] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + //SEG286 [98] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG287 [98] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 lda mul16u.b sta mul16u.mb lda mul16u.b+1 @@ -7072,12 +7186,12 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - //SEG291 [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + //SEG288 [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 jmp b1 - //SEG292 mulu16_sel::@1 + //SEG289 mulu16_sel::@1 b1: - //SEG293 [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - //SEG294 [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + //SEG290 [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + //SEG291 [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -7088,64 +7202,64 @@ mulu16_sel: { dex bne !- !e: - //SEG295 [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + //SEG292 [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 sta return+1 jmp breturn - //SEG296 mulu16_sel::@return + //SEG293 mulu16_sel::@return breturn: - //SEG297 [158] return + //SEG294 [156] return rts } -//SEG298 div32u16u +//SEG295 div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $42 + .label quotient_hi = $41 .label quotient_lo = $29 - .label return = $36 - //SEG299 [160] call divr16u - //SEG300 [169] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + .label return = $35 + //SEG296 [158] call divr16u + //SEG297 [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: - //SEG301 [169] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + //SEG298 [167] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - //SEG302 [169] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + //SEG299 [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #0 sta divr16u.rem lda #0 sta divr16u.rem+1 jsr divr16u - //SEG303 [161] (word) divr16u::return#2 ← (word) divr16u::return#0 + //SEG300 [159] (word) divr16u::return#2 ← (word) divr16u::return#0 jmp b1 - //SEG304 div32u16u::@1 + //SEG301 div32u16u::@1 b1: - //SEG305 [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + //SEG302 [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - //SEG306 [163] (word) divr16u::rem#4 ← (word) rem16u#1 - //SEG307 [164] call divr16u - //SEG308 [169] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG303 [161] (word) divr16u::rem#4 ← (word) rem16u#1 + //SEG304 [162] call divr16u + //SEG305 [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] divr16u_from_b1: - //SEG309 [169] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + //SEG306 [167] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #PI2_u4f28&$ffff sta divr16u.dividend+1 - //SEG310 [169] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + //SEG307 [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - //SEG311 [165] (word) divr16u::return#3 ← (word) divr16u::return#0 + //SEG308 [163] (word) divr16u::return#3 ← (word) divr16u::return#0 jmp b2 - //SEG312 div32u16u::@2 + //SEG309 div32u16u::@2 b2: - //SEG313 [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - //SEG314 [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + //SEG310 [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + //SEG311 [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -7155,12 +7269,12 @@ div32u16u: { lda quotient_lo+1 sta return+1 jmp breturn - //SEG315 div32u16u::@return + //SEG312 div32u16u::@return breturn: - //SEG316 [168] return + //SEG313 [166] return rts } -//SEG317 divr16u +//SEG314 divr16u // Performs division on two 16 bit unsigned words and an initial remainder // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u @@ -7171,58 +7285,58 @@ divr16u: { .label dividend = $27 .label quotient = $29 .label return = $29 - //SEG318 [170] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + //SEG315 [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: - //SEG319 [170] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + //SEG316 [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG320 [170] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + //SEG317 [168] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 lda #0 sta quotient lda #0 sta quotient+1 - //SEG321 [170] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - //SEG322 [170] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG318 [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG319 [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy jmp b1 - //SEG323 [170] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG320 [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] b1_from_b3: - //SEG324 [170] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - //SEG325 [170] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - //SEG326 [170] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - //SEG327 [170] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG321 [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG322 [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG323 [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG324 [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy jmp b1 - //SEG328 divr16u::@1 + //SEG325 divr16u::@1 b1: - //SEG329 [171] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG326 [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - //SEG330 [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + //SEG327 [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - //SEG331 [173] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + //SEG328 [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - //SEG332 [174] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + //SEG329 [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2_from_b1 jmp b4 - //SEG333 divr16u::@4 + //SEG330 divr16u::@4 b4: - //SEG334 [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + //SEG331 [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - //SEG335 [176] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG332 [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] b2_from_b1: b2_from_b4: - //SEG336 [176] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG333 [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy jmp b2 - //SEG337 divr16u::@2 + //SEG334 divr16u::@2 b2: - //SEG338 [177] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG335 [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - //SEG339 [178] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG336 [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - //SEG340 [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + //SEG337 [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>SIN_SIZE bcc b3_from_b2 @@ -7232,14 +7346,14 @@ divr16u: { bcc b3_from_b2 !: jmp b5 - //SEG341 divr16u::@5 + //SEG338 divr16u::@5 b5: - //SEG342 [180] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 + //SEG339 [178] (word) divr16u::quotient#2 ← ++ (word) divr16u::quotient#1 -- vwuz1=_inc_vwuz1 inc quotient bne !+ inc quotient+1 !: - //SEG343 [181] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 -- vwuz1=vwuz1_minus_vwuc1 + //SEG340 [179] (word) divr16u::rem#2 ← (word) divr16u::rem#6 - (const word) SIN_SIZE#0 -- vwuz1=vwuz1_minus_vwuc1 lda rem sec sbc #SIN_SIZE sta rem+1 - //SEG344 [182] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG341 [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] b3_from_b2: b3_from_b5: - //SEG345 [182] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - //SEG346 [182] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG342 [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG343 [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy jmp b3 - //SEG347 divr16u::@3 + //SEG344 divr16u::@3 b3: - //SEG348 [183] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + //SEG345 [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - //SEG349 [184] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG346 [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1_from_b3 jmp b6 - //SEG350 divr16u::@6 + //SEG347 divr16u::@6 b6: - //SEG351 [185] (word) rem16u#1 ← (word) divr16u::rem#11 + //SEG348 [183] (word) rem16u#1 ← (word) divr16u::rem#11 jmp breturn - //SEG352 divr16u::@return + //SEG349 divr16u::@return breturn: - //SEG353 [186] return + //SEG350 [184] return rts } -//SEG354 bitmap_clear +//SEG351 bitmap_clear // Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with bitmap_clear: { - .label bitmap = $2c - .label y = $2b - .label _3 = $2c - //SEG355 [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 - lda bitmap_plot_ylo - sta _3 - lda bitmap_plot_yhi - sta _3+1 - //SEG356 [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 - //SEG357 [189] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + .const col = WHITE*$10 + //SEG352 [186] call memset + //SEG353 [190] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + memset_from_bitmap_clear: + //SEG354 [190] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 + ldx #col + //SEG355 [190] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + //SEG356 [190] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memset.str+1 + jsr memset + //SEG357 [187] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] b1_from_bitmap_clear: - //SEG358 [189] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 - lda #0 - sta y - //SEG359 [189] phi (byte*) bitmap_clear::bitmap#3 = (byte*~) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy jmp b1 - //SEG360 [189] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] - b1_from_b3: - //SEG361 [189] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy - //SEG362 [189] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy - jmp b1 - //SEG363 bitmap_clear::@1 + //SEG358 bitmap_clear::@1 b1: - //SEG364 [190] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] - b2_from_b1: - //SEG365 [190] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuxx=vbuc1 + //SEG359 [188] call memset + //SEG360 [190] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + memset_from_b1: + //SEG361 [190] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - //SEG366 [190] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy - jmp b2 - //SEG367 [190] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] - b2_from_b2: - //SEG368 [190] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy - //SEG369 [190] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy - jmp b2 - //SEG370 bitmap_clear::@2 - b2: - //SEG371 [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 - lda #0 - ldy #0 - sta (bitmap),y - //SEG372 [192] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 - inc bitmap - bne !+ - inc bitmap+1 - !: - //SEG373 [193] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuxx=_inc_vbuxx - inx - //SEG374 [194] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuxx_neq_vbuc1_then_la1 - cpx #$c8 - bne b2_from_b2 - jmp b3 - //SEG375 bitmap_clear::@3 - b3: - //SEG376 [195] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 - inc y - //SEG377 [196] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$28 - cmp y - bne b1_from_b3 + //SEG362 [190] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + //SEG363 [190] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + lda #BITMAP + sta memset.str+1 + jsr memset jmp breturn - //SEG378 bitmap_clear::@return + //SEG364 bitmap_clear::@return breturn: - //SEG379 [197] return + //SEG365 [189] return rts } -//SEG380 bitmap_init +//SEG366 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($2b) str, byte register(X) c, word zeropage($2d) num) +memset: { + .label end = $2d + .label dst = $2b + .label str = $2b + .label num = $2d + //SEG367 [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + lda end + clc + adc str + sta end + lda end+1 + adc str+1 + sta end+1 + //SEG368 [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + //SEG369 [193] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + b1_from_memset: + b1_from_b1: + //SEG370 [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + jmp b1 + //SEG371 memset::@1 + b1: + //SEG372 [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (dst),y + //SEG373 [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG374 [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + lda dst+1 + cmp end+1 + bne b1_from_b1 + lda dst + cmp end + bne b1_from_b1 + jmp breturn + //SEG375 memset::@return + breturn: + //SEG376 [197] return + rts +} +//SEG377 bitmap_init // Initialize bitmap plotting tables bitmap_init: { - .label _7 = $44 - .label yoffs = $2e - //SEG381 [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + .label _7 = $43 + .label yoffs = $2f + //SEG378 [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] b1_from_bitmap_init: - //SEG382 [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + //SEG379 [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG383 [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + //SEG380 [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 jmp b1 - //SEG384 [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG381 [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] b1_from_b2: - //SEG385 [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - //SEG386 [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG382 [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG383 [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp b1 - //SEG387 bitmap_init::@1 + //SEG384 bitmap_init::@1 b1: - //SEG388 [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG385 [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - //SEG389 [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + //SEG386 [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - //SEG390 [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + //SEG387 [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b6_from_b1 - //SEG391 [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG388 [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] b2_from_b1: - //SEG392 [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + //SEG389 [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 jmp b2 - //SEG393 [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG390 [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] b6_from_b1: jmp b6 - //SEG394 bitmap_init::@6 + //SEG391 bitmap_init::@6 b6: - //SEG395 [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG392 [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] b2_from_b6: - //SEG396 [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG393 [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp b2 - //SEG397 bitmap_init::@2 + //SEG394 bitmap_init::@2 b2: - //SEG398 [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + //SEG395 [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - //SEG399 [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + //SEG396 [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1_from_b2 - //SEG400 [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG397 [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] b3_from_b2: - //SEG401 [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + //SEG398 [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #BITMAP sta yoffs+1 - //SEG402 [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + //SEG399 [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp b3 - //SEG403 [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG400 [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] b3_from_b4: - //SEG404 [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - //SEG405 [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG401 [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG402 [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp b3 - //SEG406 bitmap_init::@3 + //SEG403 bitmap_init::@3 b3: - //SEG407 [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + //SEG404 [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - //SEG408 [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + //SEG405 [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - //SEG409 [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + //SEG406 [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - //SEG410 [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG407 [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - //SEG411 [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + //SEG408 [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - //SEG412 [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG409 [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - //SEG413 [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + //SEG410 [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4_from_b3 jmp b5 - //SEG414 bitmap_init::@5 + //SEG411 bitmap_init::@5 b5: - //SEG415 [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + //SEG412 [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -7430,67 +7571,25 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - //SEG416 [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG413 [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] b4_from_b3: b4_from_b5: - //SEG417 [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG414 [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp b4 - //SEG418 bitmap_init::@4 + //SEG415 bitmap_init::@4 b4: - //SEG419 [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + //SEG416 [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - //SEG420 [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + //SEG417 [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3_from_b4 jmp breturn - //SEG421 bitmap_init::@return + //SEG418 bitmap_init::@return breturn: - //SEG422 [219] return - rts -} -//SEG423 memset -// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -memset: { - .const num = $3e8 - .label str = SCREEN - .label end = str+num - .label dst = $30 - //SEG424 [221] phi from memset to memset::@1 [phi:memset->memset::@1] - b1_from_memset: - //SEG425 [221] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 - lda #str - sta dst+1 - jmp b1 - //SEG426 [221] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1] - b1_from_b1: - //SEG427 [221] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy - jmp b1 - //SEG428 memset::@1 - b1: - //SEG429 [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 -- _deref_pbuz1=vbuc1 - lda #WHITE - ldy #0 - sta (dst),y - //SEG430 [223] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 - inc dst - bne !+ - inc dst+1 - !: - //SEG431 [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 - lda dst+1 - cmp #>end - bne b1_from_b1 - lda dst - cmp #memset] - jsr memset + //SEG28 [15] call bitmap_init + //SEG29 [198] phi from main::@3 to bitmap_init [phi:main::@3->bitmap_init] + jsr bitmap_init //SEG30 [16] phi from main::@3 to main::@4 [phi:main::@3->main::@4] //SEG31 main::@4 - //SEG32 [17] call bitmap_init - //SEG33 [198] phi from main::@4 to bitmap_init [phi:main::@4->bitmap_init] - jsr bitmap_init + //SEG32 [17] call bitmap_clear + //SEG33 [185] phi from main::@4 to bitmap_clear [phi:main::@4->bitmap_clear] + jsr bitmap_clear //SEG34 [18] phi from main::@4 to main::@5 [phi:main::@4->main::@5] //SEG35 main::@5 - //SEG36 [19] call bitmap_clear - jsr bitmap_clear - //SEG37 [20] phi from main::@5 to main::@6 [phi:main::@5->main::@6] - //SEG38 main::@6 - //SEG39 [21] call sin16s_gen2 - //SEG40 [70] phi from main::@6 to sin16s_gen2 [phi:main::@6->sin16s_gen2] + //SEG36 [19] call sin16s_gen2 + //SEG37 [68] phi from main::@5 to sin16s_gen2 [phi:main::@5->sin16s_gen2] jsr sin16s_gen2 - //SEG41 [22] phi from main::@6 to main::@7 [phi:main::@6->main::@7] - //SEG42 main::@7 - //SEG43 [23] call render_sine - //SEG44 [25] phi from main::@7 to render_sine [phi:main::@7->render_sine] + //SEG38 [20] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + //SEG39 main::@6 + //SEG40 [21] call render_sine + //SEG41 [23] phi from main::@6 to render_sine [phi:main::@6->render_sine] jsr render_sine - //SEG45 main::@1 + //SEG42 main::@1 b1: - //SEG46 [24] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 + //SEG43 [22] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0) -- _deref_pbuc1=_inc__deref_pbuc1 inc BGCOL jmp b1 } -//SEG47 render_sine +//SEG44 render_sine render_sine: { .label _0 = 6 .label _3 = 6 @@ -8362,27 +8439,27 @@ render_sine: { .label sin2_val = 6 .label xpos = 4 .label sin_idx = 2 - //SEG48 [26] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1] - //SEG49 [26] phi (word) render_sine::xpos#3 = (byte) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vbuc1 + //SEG45 [24] phi from render_sine to render_sine::@1 [phi:render_sine->render_sine::@1] + //SEG46 [24] phi (word) render_sine::xpos#3 = (byte) 0 [phi:render_sine->render_sine::@1#0] -- vwuz1=vbuc1 lda #0 sta xpos sta xpos+1 - //SEG50 [26] phi (word) render_sine::sin_idx#2 = (byte) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vbuc1 + //SEG47 [24] phi (word) render_sine::sin_idx#2 = (byte) 0 [phi:render_sine->render_sine::@1#1] -- vwuz1=vbuc1 sta sin_idx sta sin_idx+1 - //SEG51 [26] phi from render_sine::@2 to render_sine::@1 [phi:render_sine::@2->render_sine::@1] - //SEG52 [26] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#8 [phi:render_sine::@2->render_sine::@1#0] -- register_copy - //SEG53 [26] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@2->render_sine::@1#1] -- register_copy - //SEG54 render_sine::@1 + //SEG48 [24] phi from render_sine::@2 to render_sine::@1 [phi:render_sine::@2->render_sine::@1] + //SEG49 [24] phi (word) render_sine::xpos#3 = (word) render_sine::xpos#8 [phi:render_sine::@2->render_sine::@1#0] -- register_copy + //SEG50 [24] phi (word) render_sine::sin_idx#2 = (word) render_sine::sin_idx#1 [phi:render_sine::@2->render_sine::@1#1] -- register_copy + //SEG51 render_sine::@1 b1: - //SEG55 [27] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG52 [25] (word~) render_sine::$10 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda sin_idx asl sta _10 lda sin_idx+1 rol sta _10+1 - //SEG56 [28] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz1 + //SEG53 [26] (signed word*~) render_sine::$0 ← (const signed word[$200]) sin#0 + (word~) render_sine::$10 -- pwsz1=pwsc1_plus_vwuz1 clc lda _0 adc #sin sta _0+1 - //SEG57 [29] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) -- vwsz1=_deref_pwsz1 + //SEG54 [27] (signed word) render_sine::sin_val#0 ← *((signed word*~) render_sine::$0) -- vwsz1=_deref_pwsz1 ldy #0 lda (sin_val),y tax @@ -8398,31 +8475,31 @@ render_sine: { lda (sin_val),y stx sin_val sta sin_val+1 - //SEG58 [30] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 - //SEG59 [31] call wrap_y - //SEG60 [61] phi from render_sine::@1 to wrap_y [phi:render_sine::@1->wrap_y] - //SEG61 [61] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@1->wrap_y#0] -- register_copy + //SEG55 [28] (signed word) wrap_y::y#0 ← (signed word) render_sine::sin_val#0 + //SEG56 [29] call wrap_y + //SEG57 [59] phi from render_sine::@1 to wrap_y [phi:render_sine::@1->wrap_y] + //SEG58 [59] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#0 [phi:render_sine::@1->wrap_y#0] -- register_copy jsr wrap_y - //SEG62 [32] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 - //SEG63 render_sine::@3 - //SEG64 [33] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuxx=vbuaa + //SEG59 [30] (byte) wrap_y::return#0 ← (byte) wrap_y::return#2 + //SEG60 render_sine::@3 + //SEG61 [31] (byte) render_sine::ypos#0 ← (byte) wrap_y::return#0 -- vbuxx=vbuaa tax - //SEG65 [34] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 - //SEG66 [35] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 - //SEG67 [36] call bitmap_plot - //SEG68 [54] phi from render_sine::@3 to bitmap_plot [phi:render_sine::@3->bitmap_plot] - //SEG69 [54] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@3->bitmap_plot#0] -- register_copy - //SEG70 [54] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@3->bitmap_plot#1] -- register_copy + //SEG62 [32] (word) bitmap_plot::x#0 ← (word) render_sine::xpos#3 + //SEG63 [33] (byte) bitmap_plot::y#0 ← (byte) render_sine::ypos#0 + //SEG64 [34] call bitmap_plot + //SEG65 [52] phi from render_sine::@3 to bitmap_plot [phi:render_sine::@3->bitmap_plot] + //SEG66 [52] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#0 [phi:render_sine::@3->bitmap_plot#0] -- register_copy + //SEG67 [52] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#0 [phi:render_sine::@3->bitmap_plot#1] -- register_copy jsr bitmap_plot - //SEG71 render_sine::@4 - //SEG72 [37] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 + //SEG68 render_sine::@4 + //SEG69 [35] (word~) render_sine::$11 ← (word) render_sine::sin_idx#2 << (byte) 1 -- vwuz1=vwuz2_rol_1 lda sin_idx asl sta _11 lda sin_idx+1 rol sta _11+1 - //SEG73 [38] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz1 + //SEG70 [36] (signed word*~) render_sine::$3 ← (const signed word*) sin2#0 + (word~) render_sine::$11 -- pwsz1=pwsc1_plus_vwuz1 clc lda _3 adc #sin2 sta _3+1 - //SEG74 [39] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) -- vwsz1=_deref_pwsz1 + //SEG71 [37] (signed word) render_sine::sin2_val#0 ← *((signed word*~) render_sine::$3) -- vwsz1=_deref_pwsz1 ldy #0 lda (sin2_val),y tax @@ -8438,7 +8515,7 @@ render_sine: { lda (sin2_val),y stx sin2_val sta sin2_val+1 - //SEG75 [40] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1 + //SEG72 [38] (signed word) wrap_y::y#1 ← (signed word) render_sine::sin2_val#0 + (signed byte) $a -- vwsz1=vwsz1_plus_vbsc1 lda #$a sta $fe ora #$7f @@ -8453,51 +8530,51 @@ render_sine: { lda wrap_y.y+1 adc $ff sta wrap_y.y+1 - //SEG76 [41] call wrap_y - //SEG77 [61] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y] - //SEG78 [61] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@4->wrap_y#0] -- register_copy + //SEG73 [39] call wrap_y + //SEG74 [59] phi from render_sine::@4 to wrap_y [phi:render_sine::@4->wrap_y] + //SEG75 [59] phi (signed word) wrap_y::y#9 = (signed word) wrap_y::y#1 [phi:render_sine::@4->wrap_y#0] -- register_copy jsr wrap_y - //SEG79 [42] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 - //SEG80 render_sine::@5 - //SEG81 [43] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuxx=vbuaa + //SEG76 [40] (byte) wrap_y::return#1 ← (byte) wrap_y::return#2 + //SEG77 render_sine::@5 + //SEG78 [41] (byte) render_sine::ypos2#0 ← (byte) wrap_y::return#1 -- vbuxx=vbuaa tax - //SEG82 [44] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 - //SEG83 [45] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 - //SEG84 [46] call bitmap_plot - //SEG85 [54] phi from render_sine::@5 to bitmap_plot [phi:render_sine::@5->bitmap_plot] - //SEG86 [54] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@5->bitmap_plot#0] -- register_copy - //SEG87 [54] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@5->bitmap_plot#1] -- register_copy + //SEG79 [42] (word) bitmap_plot::x#1 ← (word) render_sine::xpos#3 + //SEG80 [43] (byte) bitmap_plot::y#1 ← (byte) render_sine::ypos2#0 + //SEG81 [44] call bitmap_plot + //SEG82 [52] phi from render_sine::@5 to bitmap_plot [phi:render_sine::@5->bitmap_plot] + //SEG83 [52] phi (word) bitmap_plot::x#2 = (word) bitmap_plot::x#1 [phi:render_sine::@5->bitmap_plot#0] -- register_copy + //SEG84 [52] phi (byte) bitmap_plot::y#2 = (byte) bitmap_plot::y#1 [phi:render_sine::@5->bitmap_plot#1] -- register_copy jsr bitmap_plot - //SEG88 render_sine::@6 - //SEG89 [47] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 + //SEG85 render_sine::@6 + //SEG86 [45] (word) render_sine::xpos#1 ← ++ (word) render_sine::xpos#3 -- vwuz1=_inc_vwuz1 inc xpos bne !+ inc xpos+1 !: - //SEG90 [48] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 -- vwuz1_neq_vwuc1_then_la1 + //SEG87 [46] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@7 -- vwuz1_neq_vwuc1_then_la1 lda xpos+1 cmp #>$140 bne b2 lda xpos cmp #<$140 bne b2 - //SEG91 [50] phi from render_sine::@6 to render_sine::@2 [phi:render_sine::@6->render_sine::@2] - //SEG92 [50] phi (word) render_sine::xpos#8 = (byte) 0 [phi:render_sine::@6->render_sine::@2#0] -- vwuz1=vbuc1 + //SEG88 [48] phi from render_sine::@6 to render_sine::@2 [phi:render_sine::@6->render_sine::@2] + //SEG89 [48] phi (word) render_sine::xpos#8 = (byte) 0 [phi:render_sine::@6->render_sine::@2#0] -- vwuz1=vbuc1 lda #0 sta xpos sta xpos+1 - //SEG93 [49] phi from render_sine::@6 to render_sine::@7 [phi:render_sine::@6->render_sine::@7] - //SEG94 render_sine::@7 - //SEG95 [50] phi from render_sine::@7 to render_sine::@2 [phi:render_sine::@7->render_sine::@2] - //SEG96 [50] phi (word) render_sine::xpos#8 = (word) render_sine::xpos#1 [phi:render_sine::@7->render_sine::@2#0] -- register_copy - //SEG97 render_sine::@2 + //SEG90 [47] phi from render_sine::@6 to render_sine::@7 [phi:render_sine::@6->render_sine::@7] + //SEG91 render_sine::@7 + //SEG92 [48] phi from render_sine::@7 to render_sine::@2 [phi:render_sine::@7->render_sine::@2] + //SEG93 [48] phi (word) render_sine::xpos#8 = (word) render_sine::xpos#1 [phi:render_sine::@7->render_sine::@2#0] -- register_copy + //SEG94 render_sine::@2 b2: - //SEG98 [51] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 + //SEG95 [49] (word) render_sine::sin_idx#1 ← ++ (word) render_sine::sin_idx#2 -- vwuz1=_inc_vwuz1 inc sin_idx bne !+ inc sin_idx+1 !: - //SEG99 [52] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG96 [50] if((word) render_sine::sin_idx#1<(const word) SIN_SIZE#0) goto render_sine::@1 -- vwuz1_lt_vwuc1_then_la1 lda sin_idx+1 cmp #>SIN_SIZE bcs !b1+ @@ -8510,31 +8587,31 @@ render_sine: { jmp b1 !b1: !: - //SEG100 render_sine::@return - //SEG101 [53] return + //SEG97 render_sine::@return + //SEG98 [51] return rts } -//SEG102 bitmap_plot +//SEG99 bitmap_plot // Plot a single dot in the bitmap // bitmap_plot(word zeropage(4) x, byte register(X) y) bitmap_plot: { - .label _1 = $34 - .label plotter = $32 + .label _1 = $33 + .label plotter = $31 .label x = 4 - .label _3 = $32 - //SEG103 [55] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx + .label _3 = $31 + //SEG100 [53] (word~) bitmap_plot::$3 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#2) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#2) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx lda bitmap_plot_yhi,x sta _3+1 lda bitmap_plot_ylo,x sta _3 - //SEG104 [56] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 + //SEG101 [54] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#2 & (word) $fff8 -- vwuz1=vwuz2_band_vwuc1 lda x and #<$fff8 sta _1 lda x+1 and #>$fff8 sta _1+1 - //SEG105 [57] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 + //SEG102 [55] (byte*) bitmap_plot::plotter#1 ← (byte*)(word~) bitmap_plot::$3 + (word~) bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 lda plotter clc adc _1 @@ -8542,27 +8619,27 @@ bitmap_plot: { lda plotter+1 adc _1+1 sta plotter+1 - //SEG106 [58] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuaa=_lo_vwuz1 + //SEG103 [56] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#2 -- vbuaa=_lo_vwuz1 lda x - //SEG107 [59] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa + //SEG104 [57] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2) -- _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa tay lda bitmap_plot_bit,y ldy #0 ora (plotter),y sta (plotter),y - //SEG108 bitmap_plot::@return - //SEG109 [60] return + //SEG105 bitmap_plot::@return + //SEG106 [58] return rts } -//SEG110 wrap_y +//SEG107 wrap_y // wrap_y(signed word zeropage(6) y) wrap_y: { .label y = 6 - //SEG111 [62] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1] - //SEG112 [62] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy - //SEG113 wrap_y::@1 + //SEG108 [60] phi from wrap_y wrap_y::@2 to wrap_y::@1 [phi:wrap_y/wrap_y::@2->wrap_y::@1] + //SEG109 [60] phi (signed word) wrap_y::y#4 = (signed word) wrap_y::y#9 [phi:wrap_y/wrap_y::@2->wrap_y::@1#0] -- register_copy + //SEG110 wrap_y::@1 b1: - //SEG114 [63] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 + //SEG111 [61] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -- vwsz1_ge_vwsc1_then_la1 lda y cmp #<$c8 lda y+1 @@ -8571,22 +8648,22 @@ wrap_y: { eor #$80 !: bpl b2 - //SEG115 [64] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3] - //SEG116 [64] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy - //SEG117 wrap_y::@3 + //SEG112 [62] phi from wrap_y::@1 wrap_y::@4 to wrap_y::@3 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3] + //SEG113 [62] phi (signed word) wrap_y::y#6 = (signed word) wrap_y::y#4 [phi:wrap_y::@1/wrap_y::@4->wrap_y::@3#0] -- register_copy + //SEG114 wrap_y::@3 b3: - //SEG118 [65] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 + //SEG115 [63] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@4 -- vwsz1_lt_0_then_la1 lda y+1 bmi b4 - //SEG119 wrap_y::@5 - //SEG120 [66] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuaa=_byte_vwsz1 + //SEG116 wrap_y::@5 + //SEG117 [64] (byte) wrap_y::return#2 ← (byte)(signed word) wrap_y::y#6 -- vbuaa=_byte_vwsz1 lda y - //SEG121 wrap_y::@return - //SEG122 [67] return + //SEG118 wrap_y::@return + //SEG119 [65] return rts - //SEG123 wrap_y::@4 + //SEG120 wrap_y::@4 b4: - //SEG124 [68] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 + //SEG121 [66] (signed word) wrap_y::y#3 ← (signed word) wrap_y::y#6 + (signed word) $c8 -- vwsz1=vwsz1_plus_vwsc1 clc lda y adc #<$c8 @@ -8595,9 +8672,9 @@ wrap_y: { adc #>$c8 sta y+1 jmp b3 - //SEG125 wrap_y::@2 + //SEG122 wrap_y::@2 b2: - //SEG126 [69] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 + //SEG123 [67] (signed word) wrap_y::y#2 ← (signed word) wrap_y::y#4 - (signed word) $c8 -- vwsz1=vwsz1_minus_vwsc1 lda y sec sbc #<$c8 @@ -8607,7 +8684,7 @@ wrap_y: { sta y+1 jmp b1 } -//SEG127 sin16s_gen2 +//SEG124 sin16s_gen2 // Generate signed word sinus table - with values in the range min-max. // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) @@ -8617,41 +8694,41 @@ sin16s_gen2: { .const max = $140 .label ampl = max-min .label _5 = $10 - .label _6 = $3a - .label step = $36 + .label _6 = $39 + .label step = $35 .label sintab = $c .label x = 8 .label i = $e - //SEG128 [71] call div32u16u - //SEG129 [159] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] + //SEG125 [69] call div32u16u + //SEG126 [157] phi from sin16s_gen2 to div32u16u [phi:sin16s_gen2->div32u16u] jsr div32u16u - //SEG130 [72] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 - //SEG131 sin16s_gen2::@2 - //SEG132 [73] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 - //SEG133 [74] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] - //SEG134 [74] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 + //SEG127 [70] (dword) div32u16u::return#2 ← (dword) div32u16u::return#0 + //SEG128 sin16s_gen2::@2 + //SEG129 [71] (dword) sin16s_gen2::step#0 ← (dword) div32u16u::return#2 + //SEG130 [72] phi from sin16s_gen2::@2 to sin16s_gen2::@1 [phi:sin16s_gen2::@2->sin16s_gen2::@1] + //SEG131 [72] phi (word) sin16s_gen2::i#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#0] -- vwuz1=vbuc1 lda #0 sta i sta i+1 - //SEG135 [74] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) sin#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 + //SEG132 [72] phi (signed word*) sin16s_gen2::sintab#2 = (const signed word[$200]) sin#0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#1] -- pwsz1=pwsc1 lda #sin sta sintab+1 - //SEG136 [74] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 + //SEG133 [72] phi (dword) sin16s_gen2::x#2 = (byte) 0 [phi:sin16s_gen2::@2->sin16s_gen2::@1#2] -- vduz1=vbuc1 lda #0 sta x sta x+1 sta x+2 sta x+3 // u[4.28] - //SEG137 [74] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] - //SEG138 [74] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy - //SEG139 [74] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy - //SEG140 [74] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy - //SEG141 sin16s_gen2::@1 + //SEG134 [72] phi from sin16s_gen2::@4 to sin16s_gen2::@1 [phi:sin16s_gen2::@4->sin16s_gen2::@1] + //SEG135 [72] phi (word) sin16s_gen2::i#2 = (word) sin16s_gen2::i#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#0] -- register_copy + //SEG136 [72] phi (signed word*) sin16s_gen2::sintab#2 = (signed word*) sin16s_gen2::sintab#0 [phi:sin16s_gen2::@4->sin16s_gen2::@1#1] -- register_copy + //SEG137 [72] phi (dword) sin16s_gen2::x#2 = (dword) sin16s_gen2::x#1 [phi:sin16s_gen2::@4->sin16s_gen2::@1#2] -- register_copy + //SEG138 sin16s_gen2::@1 b1: - //SEG142 [75] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 + //SEG139 [73] (dword) sin16s::x#0 ← (dword) sin16s_gen2::x#2 -- vduz1=vduz2 lda x sta sin16s.x lda x+1 @@ -8660,29 +8737,29 @@ sin16s_gen2: { sta sin16s.x+2 lda x+3 sta sin16s.x+3 - //SEG143 [76] call sin16s + //SEG140 [74] call sin16s jsr sin16s - //SEG144 [77] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 - //SEG145 sin16s_gen2::@3 - //SEG146 [78] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 - //SEG147 [79] call mul16s + //SEG141 [75] (signed word) sin16s::return#0 ← (signed word) sin16s::return#1 + //SEG142 sin16s_gen2::@3 + //SEG143 [76] (signed word) mul16s::a#0 ← (signed word) sin16s::return#0 + //SEG144 [77] call mul16s jsr mul16s - //SEG148 [80] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 - //SEG149 sin16s_gen2::@4 - //SEG150 [81] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 - //SEG151 [82] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 + //SEG145 [78] (signed dword) mul16s::return#2 ← (signed dword) mul16s::return#0 + //SEG146 sin16s_gen2::@4 + //SEG147 [79] (signed dword~) sin16s_gen2::$5 ← (signed dword) mul16s::return#2 + //SEG148 [80] (word~) sin16s_gen2::$6 ← > (signed dword~) sin16s_gen2::$5 -- vwuz1=_hi_vdsz2 lda _5+2 sta _6 lda _5+3 sta _6+1 - //SEG152 [83] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 + //SEG149 [81] *((signed word*) sin16s_gen2::sintab#2) ← (signed word)(word~) sin16s_gen2::$6 -- _deref_pwsz1=vwsz2 ldy #0 lda _6 sta (sintab),y iny lda _6+1 sta (sintab),y - //SEG153 [84] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 + //SEG150 [82] (signed word*) sin16s_gen2::sintab#0 ← (signed word*) sin16s_gen2::sintab#2 + (const byte) SIZEOF_SIGNED_WORD -- pwsz1=pwsz1_plus_vbuc1 lda #SIZEOF_SIGNED_WORD clc adc sintab @@ -8690,7 +8767,7 @@ sin16s_gen2: { bcc !+ inc sintab+1 !: - //SEG154 [85] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 + //SEG151 [83] (dword) sin16s_gen2::x#1 ← (dword) sin16s_gen2::x#2 + (dword) sin16s_gen2::step#0 -- vduz1=vduz1_plus_vduz2 lda x clc adc step @@ -8704,12 +8781,12 @@ sin16s_gen2: { lda x+3 adc step+3 sta x+3 - //SEG155 [86] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 + //SEG152 [84] (word) sin16s_gen2::i#1 ← ++ (word) sin16s_gen2::i#2 -- vwuz1=_inc_vwuz1 inc i bne !+ inc i+1 !: - //SEG156 [87] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 + //SEG153 [85] if((word) sin16s_gen2::i#1<(const word) SIN_SIZE#0) goto sin16s_gen2::@1 -- vwuz1_lt_vwuc1_then_la1 lda i+1 cmp #>SIN_SIZE bcc b1 @@ -8718,29 +8795,29 @@ sin16s_gen2: { cmp #mul16u] - //SEG163 [100] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy - //SEG164 [100] phi (dword) mul16u::mb#0 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vduz1=vduc1 + //SEG158 [88] call mul16u + //SEG159 [98] phi from mul16s to mul16u [phi:mul16s->mul16u] + //SEG160 [98] phi (word) mul16u::a#6 = (word~) mul16u::a#8 [phi:mul16s->mul16u#0] -- register_copy + //SEG161 [98] phi (dword) mul16u::mb#0 = (word)(const signed word) sin16s_gen2::ampl#0 [phi:mul16s->mul16u#1] -- vduz1=vduc1 lda #sin16s_gen2.ampl @@ -8750,19 +8827,19 @@ mul16s: { lda #>sin16s_gen2.ampl>>$10 sta mul16u.mb+3 jsr mul16u - //SEG165 [91] (dword) mul16u::return#2 ← (dword) mul16u::res#2 - //SEG166 mul16s::@4 - //SEG167 [92] (dword) mul16s::m#0 ← (dword) mul16u::return#2 - //SEG168 [93] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 + //SEG162 [89] (dword) mul16u::return#2 ← (dword) mul16u::res#2 + //SEG163 mul16s::@4 + //SEG164 [90] (dword) mul16s::m#0 ← (dword) mul16u::return#2 + //SEG165 [91] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -- vwsz1_ge_0_then_la1 lda a+1 bpl b2 - //SEG169 mul16s::@3 - //SEG170 [94] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 + //SEG166 mul16s::@3 + //SEG167 [92] (word~) mul16s::$9 ← > (dword) mul16s::m#0 -- vwuz1=_hi_vduz2 lda m+2 sta _9 lda m+3 sta _9+1 - //SEG171 [95] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz1_minus_vwuc1 + //SEG168 [93] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(const signed word) sin16s_gen2::ampl#0 -- vwuz1=vwuz1_minus_vwuc1 lda _16 sec sbc #sin16s_gen2.ampl sta _16+1 - //SEG172 [96] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 + //SEG169 [94] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16 -- vduz1=vduz1_sethi_vwuz2 lda _16 sta m+2 lda _16+1 sta m+3 - //SEG173 [97] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1] - //SEG174 [97] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy - //SEG175 mul16s::@1 - //SEG176 mul16s::@2 + //SEG170 [95] phi from mul16s::@3 mul16s::@4 to mul16s::@1 [phi:mul16s::@3/mul16s::@4->mul16s::@1] + //SEG171 [95] phi (dword) mul16s::m#4 = (dword) mul16s::m#1 [phi:mul16s::@3/mul16s::@4->mul16s::@1#0] -- register_copy + //SEG172 mul16s::@1 + //SEG173 mul16s::@2 b2: - //SEG177 [98] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 - //SEG178 mul16s::@return - //SEG179 [99] return + //SEG174 [96] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4 + //SEG175 mul16s::@return + //SEG176 [97] return rts } -//SEG180 mul16u +//SEG177 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word // mul16u(word zeropage($16) a, word zeropage($14) b) mul16u: { @@ -8794,35 +8871,35 @@ mul16u: { .label res = $10 .label return = $10 .label b = $14 - //SEG181 [101] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] - //SEG182 [101] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy - //SEG183 [101] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 + //SEG178 [99] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] + //SEG179 [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#0 [phi:mul16u->mul16u::@1#0] -- register_copy + //SEG180 [99] phi (dword) mul16u::res#2 = (byte) 0 [phi:mul16u->mul16u::@1#1] -- vduz1=vbuc1 lda #0 sta res sta res+1 sta res+2 sta res+3 - //SEG184 [101] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy - //SEG185 mul16u::@1 + //SEG181 [99] phi (word) mul16u::a#3 = (word) mul16u::a#6 [phi:mul16u->mul16u::@1#2] -- register_copy + //SEG182 mul16u::@1 b1: - //SEG186 [102] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 + //SEG183 [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -- vwuz1_neq_0_then_la1 lda a bne b2 lda a+1 bne b2 - //SEG187 mul16u::@return - //SEG188 [103] return + //SEG184 mul16u::@return + //SEG185 [101] return rts - //SEG189 mul16u::@2 + //SEG186 mul16u::@2 b2: - //SEG190 [104] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 + //SEG187 [102] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1 -- vbuaa=vwuz1_band_vbuc1 lda a and #1 - //SEG191 [105] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 + //SEG188 [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3 - //SEG192 mul16u::@4 - //SEG193 [106] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 + //SEG189 mul16u::@4 + //SEG190 [104] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2 -- vduz1=vduz1_plus_vduz2 lda res clc adc mb @@ -8836,25 +8913,25 @@ mul16u: { lda res+3 adc mb+3 sta res+3 - //SEG194 [107] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] - //SEG195 [107] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy - //SEG196 mul16u::@3 + //SEG191 [105] phi from mul16u::@2 mul16u::@4 to mul16u::@3 [phi:mul16u::@2/mul16u::@4->mul16u::@3] + //SEG192 [105] phi (dword) mul16u::res#6 = (dword) mul16u::res#2 [phi:mul16u::@2/mul16u::@4->mul16u::@3#0] -- register_copy + //SEG193 mul16u::@3 b3: - //SEG197 [108] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 + //SEG194 [106] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1 -- vwuz1=vwuz1_ror_1 lsr a+1 ror a - //SEG198 [109] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 + //SEG195 [107] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1 -- vduz1=vduz1_rol_1 asl mb rol mb+1 rol mb+2 rol mb+3 - //SEG199 [101] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] - //SEG200 [101] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy - //SEG201 [101] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy - //SEG202 [101] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy + //SEG196 [99] phi from mul16u::@3 to mul16u::@1 [phi:mul16u::@3->mul16u::@1] + //SEG197 [99] phi (dword) mul16u::mb#2 = (dword) mul16u::mb#1 [phi:mul16u::@3->mul16u::@1#0] -- register_copy + //SEG198 [99] phi (dword) mul16u::res#2 = (dword) mul16u::res#6 [phi:mul16u::@3->mul16u::@1#1] -- register_copy + //SEG199 [99] phi (word) mul16u::a#3 = (word) mul16u::a#0 [phi:mul16u::@3->mul16u::@1#2] -- register_copy jmp b1 } -//SEG203 sin16s +//SEG200 sin16s // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff @@ -8863,17 +8940,17 @@ sin16s: { .label _4 = $1d .label x = $1d .label return = $21 - .label x1 = $3e + .label x1 = $3d .label x2 = $23 .label x3 = $23 - .label x3_6 = $40 + .label x3_6 = $3f .label usinx = $21 .label x4 = $23 - .label x5 = $40 - .label x5_128 = $40 + .label x5 = $3f + .label x5_128 = $3f .label sinx = $21 .label isUpper = $1c - //SEG204 [110] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 + //SEG201 [108] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 bcc b4 @@ -8890,8 +8967,8 @@ sin16s: { cmp #PI_u4f28>>$10 sta x+3 - //SEG207 [112] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] - //SEG208 [112] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG204 [110] phi from sin16s::@4 to sin16s::@1 [phi:sin16s::@4->sin16s::@1] + //SEG205 [110] phi (byte) sin16s::isUpper#2 = (byte) 1 [phi:sin16s::@4->sin16s::@1#0] -- vbuz1=vbuc1 lda #1 sta isUpper - //SEG209 [112] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy + //SEG206 [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#1 [phi:sin16s::@4->sin16s::@1#1] -- register_copy jmp b1 - //SEG210 [112] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] + //SEG207 [110] phi from sin16s to sin16s::@1 [phi:sin16s->sin16s::@1] b4: - //SEG211 [112] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 + //SEG208 [110] phi (byte) sin16s::isUpper#2 = (byte) 0 [phi:sin16s->sin16s::@1#0] -- vbuz1=vbuc1 lda #0 sta isUpper - //SEG212 [112] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy - //SEG213 sin16s::@1 + //SEG209 [110] phi (dword) sin16s::x#4 = (dword) sin16s::x#0 [phi:sin16s->sin16s::@1#1] -- register_copy + //SEG210 sin16s::@1 b1: - //SEG214 [113] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 + //SEG211 [111] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28#0) goto sin16s::@2 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_HALF_u4f28>>$10 bcc b2 @@ -8936,8 +9013,8 @@ sin16s: { cmp #PI_u4f28>>$10 sbc x+3 sta x+3 - //SEG217 [115] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] - //SEG218 [115] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy - //SEG219 sin16s::@2 + //SEG214 [113] phi from sin16s::@1 sin16s::@5 to sin16s::@2 [phi:sin16s::@1/sin16s::@5->sin16s::@2] + //SEG215 [113] phi (dword) sin16s::x#6 = (dword) sin16s::x#4 [phi:sin16s::@1/sin16s::@5->sin16s::@2#0] -- register_copy + //SEG216 sin16s::@2 b2: - //SEG220 [116] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 + //SEG217 [114] (dword~) sin16s::$4 ← (dword) sin16s::x#6 << (byte) 3 -- vduz1=vduz1_rol_3 ldy #3 !: asl _4 @@ -8964,71 +9041,71 @@ sin16s: { rol _4+3 dey bne !- - //SEG221 [117] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 + //SEG218 [115] (word) sin16s::x1#0 ← > (dword~) sin16s::$4 -- vwuz1=_hi_vduz2 lda _4+2 sta x1 lda _4+3 sta x1+1 - //SEG222 [118] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG219 [116] (word) mulu16_sel::v1#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v1 lda x1+1 sta mulu16_sel.v1+1 - //SEG223 [119] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG220 [117] (word) mulu16_sel::v2#0 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG224 [120] call mulu16_sel - //SEG225 [150] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] - //SEG226 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG221 [118] call mulu16_sel + //SEG222 [148] phi from sin16s::@2 to mulu16_sel [phi:sin16s::@2->mulu16_sel] + //SEG223 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@2->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG227 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy - //SEG228 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy + //SEG224 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#0 [phi:sin16s::@2->mulu16_sel#1] -- register_copy + //SEG225 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#0 [phi:sin16s::@2->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG229 [121] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 - //SEG230 sin16s::@7 - //SEG231 [122] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 + //SEG226 [119] (word) mulu16_sel::return#0 ← (word) mulu16_sel::return#12 + //SEG227 sin16s::@7 + //SEG228 [120] (word) sin16s::x2#0 ← (word) mulu16_sel::return#0 -- vwuz1=vwuz2 lda mulu16_sel.return sta x2 lda mulu16_sel.return+1 sta x2+1 - //SEG232 [123] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 - //SEG233 [124] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG229 [121] (word) mulu16_sel::v1#1 ← (word) sin16s::x2#0 + //SEG230 [122] (word) mulu16_sel::v2#1 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG234 [125] call mulu16_sel - //SEG235 [150] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] - //SEG236 [150] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG231 [123] call mulu16_sel + //SEG232 [148] phi from sin16s::@7 to mulu16_sel [phi:sin16s::@7->mulu16_sel] + //SEG233 [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@7->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG237 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy - //SEG238 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy + //SEG234 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#1 [phi:sin16s::@7->mulu16_sel#1] -- register_copy + //SEG235 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#1 [phi:sin16s::@7->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG239 [126] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG236 [124] (word) mulu16_sel::return#1 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_1 lda mulu16_sel.return+1 sta mulu16_sel.return_1+1 - //SEG240 sin16s::@8 - //SEG241 [127] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 - //SEG242 [128] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 - //SEG243 [129] call mulu16_sel - //SEG244 [150] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] - //SEG245 [150] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG237 sin16s::@8 + //SEG238 [125] (word) sin16s::x3#0 ← (word) mulu16_sel::return#1 + //SEG239 [126] (word) mulu16_sel::v1#2 ← (word) sin16s::x3#0 + //SEG240 [127] call mulu16_sel + //SEG241 [148] phi from sin16s::@8 to mulu16_sel [phi:sin16s::@8->mulu16_sel] + //SEG242 [148] phi (byte) mulu16_sel::select#5 = (byte) 1 [phi:sin16s::@8->mulu16_sel#0] -- vbuxx=vbuc1 ldx #1 - //SEG246 [150] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 + //SEG243 [148] phi (word) mulu16_sel::v2#5 = (word)(number) $10000/(number) 6 [phi:sin16s::@8->mulu16_sel#1] -- vwuz1=vwuc1 lda #<$10000/6 sta mulu16_sel.v2 lda #>$10000/6 sta mulu16_sel.v2+1 - //SEG247 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy + //SEG244 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG248 [130] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 - //SEG249 sin16s::@9 - //SEG250 [131] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 - //SEG251 [132] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 + //SEG245 [128] (word) mulu16_sel::return#2 ← (word) mulu16_sel::return#12 + //SEG246 sin16s::@9 + //SEG247 [129] (word) sin16s::x3_6#0 ← (word) mulu16_sel::return#2 + //SEG248 [130] (word) sin16s::usinx#0 ← (word) sin16s::x1#0 - (word) sin16s::x3_6#0 -- vwuz1=vwuz2_minus_vwuz3 lda x1 sec sbc x3_6 @@ -9036,43 +9113,43 @@ sin16s: { lda x1+1 sbc x3_6+1 sta usinx+1 - //SEG252 [133] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 - //SEG253 [134] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG249 [131] (word) mulu16_sel::v1#3 ← (word) sin16s::x3#0 + //SEG250 [132] (word) mulu16_sel::v2#3 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG254 [135] call mulu16_sel - //SEG255 [150] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] - //SEG256 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG251 [133] call mulu16_sel + //SEG252 [148] phi from sin16s::@9 to mulu16_sel [phi:sin16s::@9->mulu16_sel] + //SEG253 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@9->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG257 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy - //SEG258 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy + //SEG254 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#3 [phi:sin16s::@9->mulu16_sel#1] -- register_copy + //SEG255 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#3 [phi:sin16s::@9->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG259 [136] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 + //SEG256 [134] (word) mulu16_sel::return#10 ← (word) mulu16_sel::return#12 -- vwuz1=vwuz2 lda mulu16_sel.return sta mulu16_sel.return_10 lda mulu16_sel.return+1 sta mulu16_sel.return_10+1 - //SEG260 sin16s::@10 - //SEG261 [137] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 - //SEG262 [138] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 - //SEG263 [139] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 + //SEG257 sin16s::@10 + //SEG258 [135] (word) sin16s::x4#0 ← (word) mulu16_sel::return#10 + //SEG259 [136] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 + //SEG260 [137] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 -- vwuz1=vwuz2 lda x1 sta mulu16_sel.v2 lda x1+1 sta mulu16_sel.v2+1 - //SEG264 [140] call mulu16_sel - //SEG265 [150] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] - //SEG266 [150] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 + //SEG261 [138] call mulu16_sel + //SEG262 [148] phi from sin16s::@10 to mulu16_sel [phi:sin16s::@10->mulu16_sel] + //SEG263 [148] phi (byte) mulu16_sel::select#5 = (byte) 0 [phi:sin16s::@10->mulu16_sel#0] -- vbuxx=vbuc1 ldx #0 - //SEG267 [150] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy - //SEG268 [150] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy + //SEG264 [148] phi (word) mulu16_sel::v2#5 = (word) mulu16_sel::v2#4 [phi:sin16s::@10->mulu16_sel#1] -- register_copy + //SEG265 [148] phi (word) mulu16_sel::v1#5 = (word) mulu16_sel::v1#4 [phi:sin16s::@10->mulu16_sel#2] -- register_copy jsr mulu16_sel - //SEG269 [141] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 - //SEG270 sin16s::@11 - //SEG271 [142] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 - //SEG272 [143] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 + //SEG266 [139] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 + //SEG267 sin16s::@11 + //SEG268 [140] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 + //SEG269 [141] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz1_ror_4 lsr x5_128+1 ror x5_128 lsr x5_128+1 @@ -9081,7 +9158,7 @@ sin16s: { ror x5_128 lsr x5_128+1 ror x5_128 - //SEG273 [144] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 + //SEG270 [142] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz1_plus_vwuz2 lda usinx clc adc x5_128 @@ -9089,32 +9166,30 @@ sin16s: { lda usinx+1 adc x5_128+1 sta usinx+1 - //SEG274 [145] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 + //SEG271 [143] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@12 -- vbuz1_eq_0_then_la1 lda isUpper cmp #0 beq b3 - //SEG275 sin16s::@6 - //SEG276 [146] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 + //SEG272 sin16s::@6 + //SEG273 [144] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 -- vwsz1=_neg_vwsz1 sec - lda sinx - eor #$ff - adc #0 + lda #0 + sbc sinx sta sinx - lda sinx+1 - eor #$ff - adc #0 + lda #0 + sbc sinx+1 sta sinx+1 - //SEG277 [147] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] - //SEG278 [147] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy - //SEG279 sin16s::@3 + //SEG274 [145] phi from sin16s::@12 sin16s::@6 to sin16s::@3 [phi:sin16s::@12/sin16s::@6->sin16s::@3] + //SEG275 [145] phi (signed word) sin16s::return#1 = (signed word~) sin16s::return#5 [phi:sin16s::@12/sin16s::@6->sin16s::@3#0] -- register_copy + //SEG276 sin16s::@3 b3: - //SEG280 sin16s::@return - //SEG281 [148] return + //SEG277 sin16s::@return + //SEG278 [146] return rts - //SEG282 sin16s::@12 - //SEG283 [149] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 + //SEG279 sin16s::@12 + //SEG280 [147] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 } -//SEG284 mulu16_sel +//SEG281 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip // mulu16_sel(word zeropage($23) v1, word zeropage($14) v2, byte register(X) select) @@ -9123,19 +9198,19 @@ mulu16_sel: { .label _1 = $10 .label v1 = $23 .label v2 = $14 - .label return = $40 + .label return = $3f .label return_1 = $23 .label return_10 = $23 - //SEG285 [151] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 + //SEG282 [149] (word) mul16u::a#2 ← (word) mulu16_sel::v1#5 -- vwuz1=vwuz2 lda v1 sta mul16u.a lda v1+1 sta mul16u.a+1 - //SEG286 [152] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 - //SEG287 [153] call mul16u - //SEG288 [100] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] - //SEG289 [100] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy - //SEG290 [100] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 + //SEG283 [150] (word) mul16u::b#1 ← (word) mulu16_sel::v2#5 + //SEG284 [151] call mul16u + //SEG285 [98] phi from mulu16_sel to mul16u [phi:mulu16_sel->mul16u] + //SEG286 [98] phi (word) mul16u::a#6 = (word) mul16u::a#2 [phi:mulu16_sel->mul16u#0] -- register_copy + //SEG287 [98] phi (dword) mul16u::mb#0 = (word) mul16u::b#1 [phi:mulu16_sel->mul16u#1] -- vduz1=vwuz2 lda mul16u.b sta mul16u.mb lda mul16u.b+1 @@ -9144,10 +9219,10 @@ mulu16_sel: { sta mul16u.mb+2 sta mul16u.mb+3 jsr mul16u - //SEG291 [154] (dword) mul16u::return#3 ← (dword) mul16u::res#2 - //SEG292 mulu16_sel::@1 - //SEG293 [155] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 - //SEG294 [156] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx + //SEG288 [152] (dword) mul16u::return#3 ← (dword) mul16u::res#2 + //SEG289 mulu16_sel::@1 + //SEG290 [153] (dword~) mulu16_sel::$0 ← (dword) mul16u::return#3 + //SEG291 [154] (dword~) mulu16_sel::$1 ← (dword~) mulu16_sel::$0 << (byte) mulu16_sel::select#5 -- vduz1=vduz1_rol_vbuxx cpx #0 beq !e+ !: @@ -9158,55 +9233,55 @@ mulu16_sel: { dex bne !- !e: - //SEG295 [157] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 + //SEG292 [155] (word) mulu16_sel::return#12 ← > (dword~) mulu16_sel::$1 -- vwuz1=_hi_vduz2 lda _1+2 sta return lda _1+3 sta return+1 - //SEG296 mulu16_sel::@return - //SEG297 [158] return + //SEG293 mulu16_sel::@return + //SEG294 [156] return rts } -//SEG298 div32u16u +//SEG295 div32u16u // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $42 + .label quotient_hi = $41 .label quotient_lo = $29 - .label return = $36 - //SEG299 [160] call divr16u - //SEG300 [169] phi from div32u16u to divr16u [phi:div32u16u->divr16u] - //SEG301 [169] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 + .label return = $35 + //SEG296 [158] call divr16u + //SEG297 [167] phi from div32u16u to divr16u [phi:div32u16u->divr16u] + //SEG298 [167] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 sta divr16u.dividend+1 - //SEG302 [169] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 + //SEG299 [167] phi (word) divr16u::rem#10 = (byte) 0 [phi:div32u16u->divr16u#1] -- vwuz1=vbuc1 lda #0 sta divr16u.rem sta divr16u.rem+1 jsr divr16u - //SEG303 [161] (word) divr16u::return#2 ← (word) divr16u::return#0 - //SEG304 div32u16u::@1 - //SEG305 [162] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 + //SEG300 [159] (word) divr16u::return#2 ← (word) divr16u::return#0 + //SEG301 div32u16u::@1 + //SEG302 [160] (word) div32u16u::quotient_hi#0 ← (word) divr16u::return#2 -- vwuz1=vwuz2 lda divr16u.return sta quotient_hi lda divr16u.return+1 sta quotient_hi+1 - //SEG306 [163] (word) divr16u::rem#4 ← (word) rem16u#1 - //SEG307 [164] call divr16u - //SEG308 [169] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] - //SEG309 [169] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 + //SEG303 [161] (word) divr16u::rem#4 ← (word) rem16u#1 + //SEG304 [162] call divr16u + //SEG305 [167] phi from div32u16u::@1 to divr16u [phi:div32u16u::@1->divr16u] + //SEG306 [167] phi (word) divr16u::dividend#5 = <(const dword) PI2_u4f28#0 [phi:div32u16u::@1->divr16u#0] -- vwuz1=vwuc1 lda #PI2_u4f28&$ffff sta divr16u.dividend+1 - //SEG310 [169] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy + //SEG307 [167] phi (word) divr16u::rem#10 = (word) divr16u::rem#4 [phi:div32u16u::@1->divr16u#1] -- register_copy jsr divr16u - //SEG311 [165] (word) divr16u::return#3 ← (word) divr16u::return#0 - //SEG312 div32u16u::@2 - //SEG313 [166] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 - //SEG314 [167] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 + //SEG308 [163] (word) divr16u::return#3 ← (word) divr16u::return#0 + //SEG309 div32u16u::@2 + //SEG310 [164] (word) div32u16u::quotient_lo#0 ← (word) divr16u::return#3 + //SEG311 [165] (dword) div32u16u::return#0 ← (word) div32u16u::quotient_hi#0 dw= (word) div32u16u::quotient_lo#0 -- vduz1=vwuz2_dword_vwuz3 lda quotient_hi sta return+2 lda quotient_hi+1 @@ -9215,11 +9290,11 @@ div32u16u: { sta return lda quotient_lo+1 sta return+1 - //SEG315 div32u16u::@return - //SEG316 [168] return + //SEG312 div32u16u::@return + //SEG313 [166] return rts } -//SEG317 divr16u +//SEG314 divr16u // Performs division on two 16 bit unsigned words and an initial remainder // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u @@ -9230,48 +9305,48 @@ divr16u: { .label dividend = $27 .label quotient = $29 .label return = $29 - //SEG318 [170] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] - //SEG319 [170] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 + //SEG315 [168] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] + //SEG316 [168] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG320 [170] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 + //SEG317 [168] phi (word) divr16u::quotient#3 = (byte) 0 [phi:divr16u->divr16u::@1#1] -- vwuz1=vbuc1 txa sta quotient sta quotient+1 - //SEG321 [170] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy - //SEG322 [170] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy - //SEG323 [170] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] - //SEG324 [170] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy - //SEG325 [170] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy - //SEG326 [170] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy - //SEG327 [170] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy - //SEG328 divr16u::@1 + //SEG318 [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#5 [phi:divr16u->divr16u::@1#2] -- register_copy + //SEG319 [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#10 [phi:divr16u->divr16u::@1#3] -- register_copy + //SEG320 [168] phi from divr16u::@3 to divr16u::@1 [phi:divr16u::@3->divr16u::@1] + //SEG321 [168] phi (byte) divr16u::i#2 = (byte) divr16u::i#1 [phi:divr16u::@3->divr16u::@1#0] -- register_copy + //SEG322 [168] phi (word) divr16u::quotient#3 = (word) divr16u::return#0 [phi:divr16u::@3->divr16u::@1#1] -- register_copy + //SEG323 [168] phi (word) divr16u::dividend#3 = (word) divr16u::dividend#0 [phi:divr16u::@3->divr16u::@1#2] -- register_copy + //SEG324 [168] phi (word) divr16u::rem#5 = (word) divr16u::rem#11 [phi:divr16u::@3->divr16u::@1#3] -- register_copy + //SEG325 divr16u::@1 b1: - //SEG329 [171] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG326 [169] (word) divr16u::rem#0 ← (word) divr16u::rem#5 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl rem rol rem+1 - //SEG330 [172] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 + //SEG327 [170] (byte~) divr16u::$1 ← > (word) divr16u::dividend#3 -- vbuaa=_hi_vwuz1 lda dividend+1 - //SEG331 [173] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 + //SEG328 [171] (byte~) divr16u::$2 ← (byte~) divr16u::$1 & (byte) $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - //SEG332 [174] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 + //SEG329 [172] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b2 - //SEG333 divr16u::@4 - //SEG334 [175] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 + //SEG330 divr16u::@4 + //SEG331 [173] (word) divr16u::rem#1 ← (word) divr16u::rem#0 | (byte) 1 -- vwuz1=vwuz1_bor_vbuc1 lda #1 ora rem sta rem - //SEG335 [176] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] - //SEG336 [176] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy - //SEG337 divr16u::@2 + //SEG332 [174] phi from divr16u::@1 divr16u::@4 to divr16u::@2 [phi:divr16u::@1/divr16u::@4->divr16u::@2] + //SEG333 [174] phi (word) divr16u::rem#6 = (word) divr16u::rem#0 [phi:divr16u::@1/divr16u::@4->divr16u::@2#0] -- register_copy + //SEG334 divr16u::@2 b2: - //SEG338 [177] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG335 [175] (word) divr16u::dividend#0 ← (word) divr16u::dividend#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl dividend rol dividend+1 - //SEG339 [178] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG336 [176] (word) divr16u::quotient#1 ← (word) divr16u::quotient#3 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl quotient rol quotient+1 - //SEG340 [179] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 + //SEG337 [177] if((word) divr16u::rem#6<(const word) SIN_SIZE#0) goto divr16u::@3 -- vwuz1_lt_vwuc1_then_la1 lda rem+1 cmp #>SIN_SIZE bcc b3 @@ -9280,13 +9355,13 @@ divr16u: { cmp #SIN_SIZE sta rem+1 - //SEG344 [182] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] - //SEG345 [182] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy - //SEG346 [182] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy - //SEG347 divr16u::@3 + //SEG341 [180] phi from divr16u::@2 divr16u::@5 to divr16u::@3 [phi:divr16u::@2/divr16u::@5->divr16u::@3] + //SEG342 [180] phi (word) divr16u::return#0 = (word) divr16u::quotient#1 [phi:divr16u::@2/divr16u::@5->divr16u::@3#0] -- register_copy + //SEG343 [180] phi (word) divr16u::rem#11 = (word) divr16u::rem#6 [phi:divr16u::@2/divr16u::@5->divr16u::@3#1] -- register_copy + //SEG344 divr16u::@3 b3: - //SEG348 [183] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx + //SEG345 [181] (byte) divr16u::i#1 ← ++ (byte) divr16u::i#2 -- vbuxx=_inc_vbuxx inx - //SEG349 [184] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG346 [182] if((byte) divr16u::i#1!=(byte) $10) goto divr16u::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$10 bne b1 - //SEG350 divr16u::@6 - //SEG351 [185] (word) rem16u#1 ← (word) divr16u::rem#11 - //SEG352 divr16u::@return - //SEG353 [186] return + //SEG347 divr16u::@6 + //SEG348 [183] (word) rem16u#1 ← (word) divr16u::rem#11 + //SEG349 divr16u::@return + //SEG350 [184] return rts } -//SEG354 bitmap_clear +//SEG351 bitmap_clear // Clear all graphics on the bitmap +// bgcol - the background color to fill the screen with +// fgcol - the foreground color to fill the screen with bitmap_clear: { - .label bitmap = $2c - .label y = $2b - .label _3 = $2c - //SEG355 [187] (word~) bitmap_clear::$3 ← *((const byte[$100]) bitmap_plot_yhi#0) w= *((const byte[$100]) bitmap_plot_ylo#0) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 - lda bitmap_plot_ylo - sta _3 - lda bitmap_plot_yhi - sta _3+1 - //SEG356 [188] (byte*~) bitmap_clear::bitmap#5 ← (byte*)(word~) bitmap_clear::$3 - //SEG357 [189] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] - //SEG358 [189] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 - lda #0 - sta y - //SEG359 [189] phi (byte*) bitmap_clear::bitmap#3 = (byte*~) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy - //SEG360 [189] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] - //SEG361 [189] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy - //SEG362 [189] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy - //SEG363 bitmap_clear::@1 - b1: - //SEG364 [190] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] - //SEG365 [190] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuxx=vbuc1 + .const col = WHITE*$10 + //SEG352 [186] call memset + //SEG353 [190] phi from bitmap_clear to memset [phi:bitmap_clear->memset] + //SEG354 [190] phi (byte) memset::c#3 = (const byte) bitmap_clear::col#0 [phi:bitmap_clear->memset#0] -- vbuxx=vbuc1 + ldx #col + //SEG355 [190] phi (word) memset::num#2 = (word) $3e8 [phi:bitmap_clear->memset#1] -- vwuz1=vwuc1 + lda #<$3e8 + sta memset.num + lda #>$3e8 + sta memset.num+1 + //SEG356 [190] phi (void*) memset::str#2 = (void*)(const byte*) SCREEN#0 [phi:bitmap_clear->memset#2] -- pvoz1=pvoc1 + lda #SCREEN + sta memset.str+1 + jsr memset + //SEG357 [187] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + //SEG358 bitmap_clear::@1 + //SEG359 [188] call memset + //SEG360 [190] phi from bitmap_clear::@1 to memset [phi:bitmap_clear::@1->memset] + //SEG361 [190] phi (byte) memset::c#3 = (byte) 0 [phi:bitmap_clear::@1->memset#0] -- vbuxx=vbuc1 ldx #0 - //SEG366 [190] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy - //SEG367 [190] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] - //SEG368 [190] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy - //SEG369 [190] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy - //SEG370 bitmap_clear::@2 - b2: - //SEG371 [191] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 - lda #0 - tay - sta (bitmap),y - //SEG372 [192] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 - inc bitmap - bne !+ - inc bitmap+1 - !: - //SEG373 [193] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuxx=_inc_vbuxx - inx - //SEG374 [194] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuxx_neq_vbuc1_then_la1 - cpx #$c8 - bne b2 - //SEG375 bitmap_clear::@3 - //SEG376 [195] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 - inc y - //SEG377 [196] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 - lda #$28 - cmp y - bne b1 - //SEG378 bitmap_clear::@return - //SEG379 [197] return + //SEG362 [190] phi (word) memset::num#2 = (word) $1f40 [phi:bitmap_clear::@1->memset#1] -- vwuz1=vwuc1 + lda #<$1f40 + sta memset.num + lda #>$1f40 + sta memset.num+1 + //SEG363 [190] phi (void*) memset::str#2 = (void*)(const byte*) BITMAP#0 [phi:bitmap_clear::@1->memset#2] -- pvoz1=pvoc1 + lda #BITMAP + sta memset.str+1 + jsr memset + //SEG364 bitmap_clear::@return + //SEG365 [189] return rts } -//SEG380 bitmap_init +//SEG366 memset +// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. +// memset(void* zeropage($2b) str, byte register(X) c, word zeropage($2d) num) +memset: { + .label end = $2d + .label dst = $2b + .label str = $2b + .label num = $2d + //SEG367 [191] (byte*) memset::end#0 ← (byte*)(void*) memset::str#2 + (word) memset::num#2 -- pbuz1=pbuz2_plus_vwuz1 + lda end + clc + adc str + sta end + lda end+1 + adc str+1 + sta end+1 + //SEG368 [192] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#2 + //SEG369 [193] phi from memset memset::@1 to memset::@1 [phi:memset/memset::@1->memset::@1] + //SEG370 [193] phi (byte*) memset::dst#2 = (byte*~) memset::dst#3 [phi:memset/memset::@1->memset::@1#0] -- register_copy + //SEG371 memset::@1 + b1: + //SEG372 [194] *((byte*) memset::dst#2) ← (byte) memset::c#3 -- _deref_pbuz1=vbuxx + txa + ldy #0 + sta (dst),y + //SEG373 [195] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + inc dst + bne !+ + inc dst+1 + !: + //SEG374 [196] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuz2_then_la1 + lda dst+1 + cmp end+1 + bne b1 + lda dst + cmp end + bne b1 + //SEG375 memset::@return + //SEG376 [197] return + rts +} +//SEG377 bitmap_init // Initialize bitmap plotting tables bitmap_init: { - .label _7 = $44 - .label yoffs = $2e - //SEG381 [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - //SEG382 [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 + .label _7 = $43 + .label yoffs = $2f + //SEG378 [199] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + //SEG379 [199] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG383 [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 + //SEG380 [199] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#1] -- vbuaa=vbuc1 lda #$80 - //SEG384 [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - //SEG385 [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - //SEG386 [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy - //SEG387 bitmap_init::@1 + //SEG381 [199] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + //SEG382 [199] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + //SEG383 [199] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + //SEG384 bitmap_init::@1 b1: - //SEG388 [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG385 [200] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_bit,x - //SEG389 [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 + //SEG386 [201] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuaa=vbuaa_ror_1 lsr - //SEG390 [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 + //SEG387 [202] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuaa_neq_0_then_la1 cmp #0 bne b2 - //SEG391 [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - //SEG392 [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 + //SEG388 [204] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + //SEG389 [204] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuaa=vbuc1 lda #$80 - //SEG393 [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] - //SEG394 bitmap_init::@6 - //SEG395 [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - //SEG396 [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy - //SEG397 bitmap_init::@2 + //SEG390 [203] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + //SEG391 bitmap_init::@6 + //SEG392 [204] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + //SEG393 [204] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + //SEG394 bitmap_init::@2 b2: - //SEG398 [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + //SEG395 [205] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - //SEG399 [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + //SEG396 [206] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne b1 - //SEG400 [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - //SEG401 [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + //SEG397 [207] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + //SEG398 [207] phi (byte*) bitmap_init::yoffs#2 = (const byte*) BITMAP#0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #BITMAP sta yoffs+1 - //SEG402 [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + //SEG399 [207] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 - //SEG403 [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - //SEG404 [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - //SEG405 [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy - //SEG406 bitmap_init::@3 + //SEG400 [207] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + //SEG401 [207] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + //SEG402 [207] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + //SEG403 bitmap_init::@3 b3: - //SEG407 [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + //SEG404 [208] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax _7 - //SEG408 [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + //SEG405 [209] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda yoffs - //SEG409 [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa + //SEG406 [210] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora _7 - //SEG410 [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG407 [211] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - //SEG411 [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + //SEG408 [212] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda yoffs+1 - //SEG412 [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG409 [213] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - //SEG413 [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + //SEG410 [214] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp _7 bne b4 - //SEG414 bitmap_init::@5 - //SEG415 [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + //SEG411 bitmap_init::@5 + //SEG412 [215] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda yoffs adc #<$28*8 @@ -9441,56 +9543,20 @@ bitmap_init: { lda yoffs+1 adc #>$28*8 sta yoffs+1 - //SEG416 [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - //SEG417 [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy - //SEG418 bitmap_init::@4 + //SEG413 [216] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + //SEG414 [216] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + //SEG415 bitmap_init::@4 b4: - //SEG419 [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + //SEG416 [217] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - //SEG420 [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + //SEG417 [218] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne b3 - //SEG421 bitmap_init::@return - //SEG422 [219] return - rts -} -//SEG423 memset -// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -memset: { - .const num = $3e8 - .label str = SCREEN - .label end = str+num - .label dst = $30 - //SEG424 [221] phi from memset to memset::@1 [phi:memset->memset::@1] - //SEG425 [221] phi (byte*) memset::dst#2 = (byte*)(const void*) memset::str#0 [phi:memset->memset::@1#0] -- pbuz1=pbuc1 - lda #str - sta dst+1 - //SEG426 [221] phi from memset::@1 to memset::@1 [phi:memset::@1->memset::@1] - //SEG427 [221] phi (byte*) memset::dst#2 = (byte*) memset::dst#1 [phi:memset::@1->memset::@1#0] -- register_copy - //SEG428 memset::@1 - b1: - //SEG429 [222] *((byte*) memset::dst#2) ← (const byte) WHITE#0 -- _deref_pbuz1=vbuc1 - lda #WHITE - ldy #0 - sta (dst),y - //SEG430 [223] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 - inc dst - bne !+ - inc dst+1 - !: - //SEG431 [224] if((byte*) memset::dst#1!=(const byte*) memset::end#0) goto memset::@1 -- pbuz1_neq_pbuc1_then_la1 - lda dst+1 - cmp #>end - bne b1 - lda dst - cmp #> (byte) 4 -- vwuz1=vwuz2_ror_4 lda val_1+1 + lsr sta _3+1 lda val_1 + ror sta _3 - ldy #4 - !: lsr _3+1 ror _3 - dey - bne !- + lsr _3+1 + ror _3 + lsr _3+1 + ror _3 //SEG417 [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz3 lda val_1 clc @@ -5699,15 +5701,17 @@ div10: { sta val_3+1 //SEG420 [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda val_3+1 + lsr sta return+1 lda val_3 + ror sta return - ldy #4 - !: lsr return+1 ror return - dey - bne !- + lsr return+1 + ror return + lsr return+1 + ror return jmp breturn //SEG421 div10::@return breturn: @@ -5976,11 +5980,11 @@ Statement [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [ div10::$ Statement [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a Statement [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a Statement [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a -Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a reg byte y +Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a Statement [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a reg byte y Statement [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a -Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a reg byte y +Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a Statement [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a Statement [194] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a Statement [195] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a @@ -6071,11 +6075,11 @@ Statement [182] (word~) div10::$0 ← (word) div10::val#4 >> (byte) 1 [ div10::$ Statement [183] (word) div10::val#0 ← (word~) div10::$0 + (byte) 1 [ div10::val#0 ] ( main:2::div10:34 [ main::u#15 div10::val#0 ] ) always clobbers reg byte a Statement [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::val#0 div10::$2 ] ( main:2::div10:34 [ main::u#15 div10::val#0 div10::$2 ] ) always clobbers reg byte a Statement [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a -Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a reg byte y +Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a Statement [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a reg byte y Statement [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a -Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a reg byte y +Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a Statement [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a Statement [194] (word) divr16u::return#2 ← (word) divr16u::return#0 [ divr16u::return#2 ] ( main:2::div16u:11 [ main::u#11 divr16u::return#2 ] ) always clobbers reg byte a Statement [195] (word) div16u::return#0 ← (word) divr16u::return#2 [ div16u::return#0 ] ( main:2::div16u:11 [ main::u#11 div16u::return#0 ] ) always clobbers reg byte a @@ -6165,56 +6169,56 @@ Uplift Scope [utoa] 57.17: zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::va Uplift Scope [Print] Uplift Scope [] -Uplifting [divr16u] best 466472 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:109 [ divr16u::return#2 ] -Uplifting [append] best 466472 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:83 [ append::return#10 ] zp ZP_WORD:85 [ append::return#4 ] zp ZP_WORD:87 [ append::return#3 ] zp ZP_WORD:89 [ append::return#2 ] -Uplifting [div10] best 466472 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:107 [ div10::return#0 ] zp ZP_WORD:91 [ div10::$0 ] zp ZP_WORD:95 [ div10::$2 ] zp ZP_WORD:99 [ div10::$3 ] zp ZP_WORD:103 [ div10::$4 ] zp ZP_WORD:105 [ div10::val#3 ] zp ZP_WORD:93 [ div10::val#0 ] zp ZP_WORD:97 [ div10::val#1 ] zp ZP_WORD:101 [ div10::val#2 ] -Uplifting [div16u] best 466472 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:111 [ div16u::return#0 ] -Uplifting [main] best 466472 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ] -Uplifting [utoa] best 466441 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:81 [ utoa::dst#3 ] -Uplifting [Print] best 466441 combination -Uplifting [] best 466441 combination +Uplifting [divr16u] best 466508 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:109 [ divr16u::return#2 ] +Uplifting [append] best 466508 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:83 [ append::return#10 ] zp ZP_WORD:85 [ append::return#4 ] zp ZP_WORD:87 [ append::return#3 ] zp ZP_WORD:89 [ append::return#2 ] +Uplifting [div10] best 466508 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:107 [ div10::return#0 ] zp ZP_WORD:91 [ div10::$0 ] zp ZP_WORD:95 [ div10::$2 ] zp ZP_WORD:99 [ div10::$3 ] zp ZP_WORD:103 [ div10::$4 ] zp ZP_WORD:105 [ div10::val#3 ] zp ZP_WORD:93 [ div10::val#0 ] zp ZP_WORD:97 [ div10::val#1 ] zp ZP_WORD:101 [ div10::val#2 ] +Uplifting [div16u] best 466508 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:111 [ div16u::return#0 ] +Uplifting [main] best 466508 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ] +Uplifting [utoa] best 466477 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:81 [ utoa::dst#3 ] +Uplifting [Print] best 466477 combination +Uplifting [] best 466477 combination Attempting to uplift remaining variables inzp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] -Uplifting [myprintf] best 466441 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] +Uplifting [myprintf] best 466477 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] -Uplifting [myprintf] best 466441 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] +Uplifting [myprintf] best 466477 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ] -Uplifting [myprintf] best 454441 combination reg byte x [ myprintf::digit#3 myprintf::digit#2 ] +Uplifting [myprintf] best 454477 combination reg byte x [ myprintf::digit#3 myprintf::digit#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] -Uplifting [myprintf] best 454441 combination zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] +Uplifting [myprintf] best 454477 combination zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:26 [ myprintf::$41 ] -Uplifting [myprintf] best 445441 combination reg byte a [ myprintf::$41 ] +Uplifting [myprintf] best 445477 combination reg byte a [ myprintf::$41 ] Attempting to uplift remaining variables inzp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] -Uplifting [myprintf] best 441691 combination reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] +Uplifting [myprintf] best 441727 combination reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] -Uplifting [myprintf] best 441691 combination zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] +Uplifting [myprintf] best 441727 combination zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] -Uplifting [myprintf] best 441691 combination zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] +Uplifting [myprintf] best 441727 combination zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ myprintf::$17 ] -Uplifting [myprintf] best 441091 combination reg byte a [ myprintf::$17 ] +Uplifting [myprintf] best 441127 combination reg byte a [ myprintf::$17 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ myprintf::$18 ] -Uplifting [myprintf] best 440491 combination reg byte a [ myprintf::$18 ] +Uplifting [myprintf] best 440527 combination reg byte a [ myprintf::$18 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ myprintf::$24 ] -Uplifting [myprintf] best 439891 combination reg byte a [ myprintf::$24 ] +Uplifting [myprintf] best 439927 combination reg byte a [ myprintf::$24 ] Attempting to uplift remaining variables inzp ZP_BYTE:75 [ myprintf::$25 ] -Uplifting [myprintf] best 439291 combination reg byte a [ myprintf::$25 ] +Uplifting [myprintf] best 439327 combination reg byte a [ myprintf::$25 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ myprintf::$31 ] -Uplifting [myprintf] best 438691 combination reg byte a [ myprintf::$31 ] +Uplifting [myprintf] best 438727 combination reg byte a [ myprintf::$31 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ myprintf::$49 ] -Uplifting [myprintf] best 438091 combination reg byte a [ myprintf::$49 ] +Uplifting [myprintf] best 438127 combination reg byte a [ myprintf::$49 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] -Uplifting [myprintf] best 438091 combination zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] +Uplifting [myprintf] best 438127 combination zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] -Uplifting [myprintf] best 438091 combination zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] +Uplifting [myprintf] best 438127 combination zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ myprintf::$23 ] -Uplifting [myprintf] best 437191 combination reg byte a [ myprintf::$23 ] +Uplifting [myprintf] best 437227 combination reg byte a [ myprintf::$23 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ myprintf::$30 ] -Uplifting [myprintf] best 436291 combination reg byte a [ myprintf::$30 ] +Uplifting [myprintf] best 436327 combination reg byte a [ myprintf::$30 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ myprintf::b#15 ] -Uplifting [myprintf] best 436191 combination reg byte x [ myprintf::b#15 ] +Uplifting [myprintf] best 436227 combination reg byte x [ myprintf::b#15 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ myprintf::b#16 ] -Uplifting [myprintf] best 436091 combination reg byte x [ myprintf::b#16 ] +Uplifting [myprintf] best 436127 combination reg byte x [ myprintf::b#16 ] Attempting to uplift remaining variables inzp ZP_BYTE:74 [ myprintf::bLen#10 ] -Uplifting [myprintf] best 435191 combination reg byte y [ myprintf::bLen#10 ] +Uplifting [myprintf] best 435227 combination reg byte y [ myprintf::bLen#10 ] Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] ] with [ zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] ] - score: 4 Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] ] with [ zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] ] - score: 3 Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::u#11 main::u#2 ] ] with [ zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] ] - score: 1 @@ -7455,15 +7459,17 @@ div10: { sta val_1+1 //SEG416 [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda val_1+1 + lsr sta _3+1 lda val_1 + ror sta _3 - ldy #4 - !: lsr _3+1 ror _3 - dey - bne !- + lsr _3+1 + ror _3 + lsr _3+1 + ror _3 //SEG417 [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 lda val_2 clc @@ -8280,7 +8286,7 @@ reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 354937 +Score: 354955 //SEG0 File Comments //SEG1 Basic Upstart @@ -9295,15 +9301,17 @@ div10: { adc val+1 sta val_1+1 //SEG416 [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 -- vwuz1=vwuz2_ror_4 + lsr sta _3+1 lda val_1 + ror sta _3 - ldy #4 - !: lsr _3+1 ror _3 - dey - bne !- + lsr _3+1 + ror _3 + lsr _3+1 + ror _3 //SEG417 [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 -- vwuz1=vwuz2_plus_vwuz1 lda val_2 clc diff --git a/src/test/ref/sinusgen16.log b/src/test/ref/sinusgen16.log index 338d30e8e..2f812f18b 100644 --- a/src/test/ref/sinusgen16.log +++ b/src/test/ref/sinusgen16.log @@ -3406,15 +3406,17 @@ sin16s: { sta x5+1 //SEG219 [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 + lsr sta x5_128+1 lda x5 + ror sta x5_128 - ldy #4 - !: lsr x5_128+1 ror x5_128 - dey - bne !- + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 //SEG220 [107] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc @@ -3892,7 +3894,7 @@ Statement [101] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUppe Statement [102] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a Statement [104] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [105] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [107] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [109] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [112] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -3969,7 +3971,7 @@ Statement [101] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUppe Statement [102] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a Statement [104] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [105] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [107] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [109] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [112] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen:5::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -4069,22 +4071,22 @@ Uplift Scope [div32u16u] 4: zp ZP_DWORD:57 [ div32u16u::return#2 ] 4: zp ZP_WORD Uplift Scope [print_sword] 9.58: zp ZP_WORD:6 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] Uplift Scope [print_word] -Uplifting [mul16u] best 26841 combination zp ZP_DWORD:36 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:40 [ mul16u::mb#2 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:34 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] zp ZP_DWORD:101 [ mul16u::return#2 ] zp ZP_WORD:44 [ mul16u::b#0 ] -Uplifting [print_str] best 26841 combination zp ZP_WORD:4 [ print_str::str#3 print_str::str#5 print_str::str#0 ] -Uplifting [divr16u] best 26631 combination zp ZP_WORD:46 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:50 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:48 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:116 [ divr16u::return#2 ] zp ZP_WORD:120 [ divr16u::return#3 ] -Uplifting [] best 26631 combination zp ZP_WORD:10 [ print_char_cursor#33 print_char_cursor#46 print_char_cursor#43 print_char_cursor#51 print_char_cursor#48 print_char_cursor#49 print_char_cursor#2 print_char_cursor#12 print_char_cursor#1 ] zp ZP_WORD:130 [ rem16u#1 ] -Uplifting [sin16s] best 26631 combination zp ZP_DWORD:23 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:65 [ sin16s::return#0 ] zp ZP_WORD:27 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:69 [ sin16s::$4 ] zp ZP_WORD:77 [ sin16s::x2#0 ] zp ZP_WORD:85 [ sin16s::x3_6#0 ] zp ZP_WORD:91 [ sin16s::x4#0 ] zp ZP_WORD:95 [ sin16s::x5#0 ] zp ZP_WORD:97 [ sin16s::x5_128#0 ] zp ZP_WORD:81 [ sin16s::x3#0 ] zp ZP_WORD:99 [ sin16s::usinx#1 ] zp ZP_WORD:73 [ sin16s::x1#0 ] zp ZP_WORD:87 [ sin16s::usinx#0 ] zp ZP_BYTE:22 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 26615 combination zp ZP_WORD:29 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:31 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:75 [ mulu16_sel::return#0 ] zp ZP_WORD:79 [ mulu16_sel::return#1 ] zp ZP_WORD:83 [ mulu16_sel::return#2 ] zp ZP_WORD:89 [ mulu16_sel::return#10 ] zp ZP_WORD:93 [ mulu16_sel::return#11 ] zp ZP_DWORD:105 [ mulu16_sel::$0 ] zp ZP_DWORD:109 [ mulu16_sel::$1 ] zp ZP_WORD:113 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [sin16s_gen] best 26615 combination zp ZP_WORD:67 [ sin16s_gen::$1 ] zp ZP_WORD:20 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:14 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:18 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:61 [ sin16s_gen::step#0 ] -Uplifting [print_cls] best 26615 combination zp ZP_WORD:12 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [main] best 26615 combination zp ZP_WORD:2 [ main::st1#2 main::st1#1 ] zp ZP_WORD:53 [ main::sw#0 ] -Uplifting [print_byte] best 26601 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] -Uplifting [print_char] best 26589 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] -Uplifting [div32u16u] best 26589 combination zp ZP_DWORD:57 [ div32u16u::return#2 ] zp ZP_WORD:122 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:124 [ div32u16u::return#0 ] zp ZP_WORD:118 [ div32u16u::quotient_hi#0 ] -Uplifting [print_sword] best 26589 combination zp ZP_WORD:6 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] -Uplifting [print_word] best 26589 combination +Uplifting [mul16u] best 26859 combination zp ZP_DWORD:36 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:40 [ mul16u::mb#2 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:34 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] zp ZP_DWORD:101 [ mul16u::return#2 ] zp ZP_WORD:44 [ mul16u::b#0 ] +Uplifting [print_str] best 26859 combination zp ZP_WORD:4 [ print_str::str#3 print_str::str#5 print_str::str#0 ] +Uplifting [divr16u] best 26649 combination zp ZP_WORD:46 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:50 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:48 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:116 [ divr16u::return#2 ] zp ZP_WORD:120 [ divr16u::return#3 ] +Uplifting [] best 26649 combination zp ZP_WORD:10 [ print_char_cursor#33 print_char_cursor#46 print_char_cursor#43 print_char_cursor#51 print_char_cursor#48 print_char_cursor#49 print_char_cursor#2 print_char_cursor#12 print_char_cursor#1 ] zp ZP_WORD:130 [ rem16u#1 ] +Uplifting [sin16s] best 26649 combination zp ZP_DWORD:23 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:65 [ sin16s::return#0 ] zp ZP_WORD:27 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:69 [ sin16s::$4 ] zp ZP_WORD:77 [ sin16s::x2#0 ] zp ZP_WORD:85 [ sin16s::x3_6#0 ] zp ZP_WORD:91 [ sin16s::x4#0 ] zp ZP_WORD:95 [ sin16s::x5#0 ] zp ZP_WORD:97 [ sin16s::x5_128#0 ] zp ZP_WORD:81 [ sin16s::x3#0 ] zp ZP_WORD:99 [ sin16s::usinx#1 ] zp ZP_WORD:73 [ sin16s::x1#0 ] zp ZP_WORD:87 [ sin16s::usinx#0 ] zp ZP_BYTE:22 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 26633 combination zp ZP_WORD:29 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:31 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:75 [ mulu16_sel::return#0 ] zp ZP_WORD:79 [ mulu16_sel::return#1 ] zp ZP_WORD:83 [ mulu16_sel::return#2 ] zp ZP_WORD:89 [ mulu16_sel::return#10 ] zp ZP_WORD:93 [ mulu16_sel::return#11 ] zp ZP_DWORD:105 [ mulu16_sel::$0 ] zp ZP_DWORD:109 [ mulu16_sel::$1 ] zp ZP_WORD:113 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [sin16s_gen] best 26633 combination zp ZP_WORD:67 [ sin16s_gen::$1 ] zp ZP_WORD:20 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:14 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:18 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:61 [ sin16s_gen::step#0 ] +Uplifting [print_cls] best 26633 combination zp ZP_WORD:12 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [main] best 26633 combination zp ZP_WORD:2 [ main::st1#2 main::st1#1 ] zp ZP_WORD:53 [ main::sw#0 ] +Uplifting [print_byte] best 26619 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte x [ print_byte::$2 ] +Uplifting [print_char] best 26607 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] +Uplifting [div32u16u] best 26607 combination zp ZP_DWORD:57 [ div32u16u::return#2 ] zp ZP_WORD:122 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:124 [ div32u16u::return#0 ] zp ZP_WORD:118 [ div32u16u::quotient_hi#0 ] +Uplifting [print_sword] best 26607 combination zp ZP_WORD:6 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] +Uplifting [print_word] best 26607 combination Attempting to uplift remaining variables inzp ZP_BYTE:22 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 26589 combination zp ZP_BYTE:22 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 26607 combination zp ZP_BYTE:22 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:27 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:99 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:81 [ sin16s::x3#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:46 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:130 [ rem16u#1 ] ] - score: 2 diff --git a/src/test/ref/sinusgen16b.asm b/src/test/ref/sinusgen16b.asm index d8d30fd9d..01dd87421 100644 --- a/src/test/ref/sinusgen16b.asm +++ b/src/test/ref/sinusgen16b.asm @@ -14,7 +14,7 @@ // PI/2 in u[4.12] format .const PI_HALF_u4f12 = $1922 .label print_line_cursor = $400 - .label rem16u = $2a + .label rem16u = $29 .label print_char_cursor = $b main: { .label wavelength = $78 @@ -194,8 +194,8 @@ print_cls: { // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) // sin16s_genb(signed word* zeropage($13) sintab) sin16s_genb: { - .label _2 = $1a - .label step = $3f + .label _2 = $19 + .label step = $3e .label sintab = $13 .label x = $f .label i = $15 @@ -262,20 +262,19 @@ sin16s_genb: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16sb(word zeropage($18) x) +// sin16sb(word zeropage($17) x) sin16sb: { - .label x = $18 - .label return = $1a - .label x1 = $18 - .label x2 = $1c - .label x3 = $1c - .label x3_6 = $43 - .label usinx = $1a - .label x4 = $1c - .label x5 = $43 - .label x5_128 = $43 - .label sinx = $1a - .label isUpper = $17 + .label x = $17 + .label return = $19 + .label x1 = $17 + .label x2 = $1b + .label x3 = $1b + .label x3_6 = $42 + .label usinx = $19 + .label x4 = $1b + .label x5 = $42 + .label x5_128 = $42 + .label sinx = $19 lda x+1 cmp #>PI_u4f12 bcc b4 @@ -291,12 +290,10 @@ sin16sb: { lda x+1 sbc #>PI_u4f12 sta x+1 - lda #1 - sta isUpper + ldy #1 jmp b1 b4: - lda #0 - sta isUpper + ldy #0 b1: lda x+1 cmp #>PI_HALF_u4f12 @@ -388,8 +385,7 @@ sin16sb: { lda usinx+1 adc x5_128+1 sta usinx+1 - lda isUpper - cmp #0 + cpy #0 beq b3 sec lda #0 @@ -403,19 +399,19 @@ sin16sb: { } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($1c) v1, word zeropage($1e) v2, byte register(X) select) +// mulu16_sel(word zeropage($1b) v1, word zeropage($1d) v2, byte register(X) select) mulu16_sel: { - .label _0 = $22 - .label _1 = $22 - .label v1 = $1c - .label v2 = $1e - .label return = $1c - .label return_11 = $43 - .label return_14 = $43 - .label return_16 = $43 - .label return_17 = $43 - .label return_18 = $43 - .label return_20 = $43 + .label _0 = $21 + .label _1 = $21 + .label v1 = $1b + .label v2 = $1d + .label return = $1b + .label return_11 = $42 + .label return_14 = $42 + .label return_16 = $42 + .label return_17 = $42 + .label return_18 = $42 + .label return_20 = $42 lda v1 sta mul16u.a lda v1+1 @@ -438,13 +434,13 @@ mulu16_sel: { rts } // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($20) a, word zeropage($1e) b) +// mul16u(word zeropage($1f) a, word zeropage($1d) b) mul16u: { - .label a = $20 - .label mb = $26 - .label res = $22 - .label b = $1e - .label return = $22 + .label a = $1f + .label mb = $25 + .label res = $21 + .label b = $1d + .label return = $21 lda b sta mb lda b+1 @@ -492,9 +488,9 @@ mul16u: { // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $45 - .label quotient_lo = $2e - .label return = $3f + .label quotient_hi = $44 + .label quotient_lo = $2d + .label return = $3e lda #>$10 sta divr16u.dividend lda #>PI2_u4f28>>$10 @@ -526,12 +522,12 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2c) dividend, word zeropage($2a) rem) +// divr16u(word zeropage($2b) dividend, word zeropage($29) rem) divr16u: { - .label rem = $2a - .label dividend = $2c - .label quotient = $2e - .label return = $2e + .label rem = $29 + .label dividend = $2b + .label quotient = $2d + .label return = $2d ldx #0 txa sta quotient @@ -579,13 +575,13 @@ divr16u: { // Generate signed (large) word sinus table - on the full -$7fff - $7fff range // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen(signed word* zeropage($34) sintab) +// sin16s_gen(signed word* zeropage($33) sintab) sin16s_gen: { - .label _1 = $3d - .label step = $3f - .label sintab = $34 - .label x = $30 - .label i = $36 + .label _1 = $3c + .label step = $3e + .label sintab = $33 + .label x = $2f + .label i = $35 jsr div32u16u lda #0 sta i @@ -653,21 +649,21 @@ sin16s_gen: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16s(dword zeropage($39) x) +// sin16s(dword zeropage($38) x) sin16s: { - .label _4 = $39 - .label x = $39 - .label return = $3d - .label x1 = $47 - .label x2 = $1c - .label x3 = $1c - .label x3_6 = $43 - .label usinx = $3d - .label x4 = $1c - .label x5 = $43 - .label x5_128 = $43 - .label sinx = $3d - .label isUpper = $38 + .label _4 = $38 + .label x = $38 + .label return = $3c + .label x1 = $46 + .label x2 = $1b + .label x3 = $1b + .label x3_6 = $42 + .label usinx = $3c + .label x4 = $1b + .label x5 = $42 + .label x5_128 = $42 + .label sinx = $3c + .label isUpper = $37 lda x+3 cmp #>PI_u4f28>>$10 bcc b4 diff --git a/src/test/ref/sinusgen16b.log b/src/test/ref/sinusgen16b.log index d380f8642..9dccdb198 100644 --- a/src/test/ref/sinusgen16b.log +++ b/src/test/ref/sinusgen16b.log @@ -4269,15 +4269,17 @@ sin16sb: { sta x5+1 //SEG228 [109] (word) sin16sb::x5_128#0 ← (word) sin16sb::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 + lsr sta x5_128+1 lda x5 + ror sta x5_128 - ldy #4 - !: lsr x5_128+1 ror x5_128 - dey - bne !- + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 //SEG229 [110] (word) sin16sb::usinx#1 ← (word) sin16sb::usinx#0 + (word) sin16sb::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc @@ -5144,15 +5146,17 @@ sin16s: { sta x5+1 //SEG427 [211] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 + lsr sta x5_128+1 lda x5 + ror sta x5_128 - ldy #4 - !: lsr x5_128+1 ror x5_128 - dey - bne !- + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 //SEG428 [212] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc @@ -5256,8 +5260,7 @@ Statement [104] (word) mulu16_sel::v1#9 ← (word) sin16sb::x4#0 [ sin16sb::isUp Statement [105] (word) mulu16_sel::v2#9 ← (word) sin16sb::x1#0 [ sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::v1#9 mulu16_sel::v2#9 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::v1#9 mulu16_sel::v2#9 ] ) always clobbers reg byte a Statement [107] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#17 [ sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [108] (word) sin16sb::x5#0 ← (word) mulu16_sel::return#11 [ sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5#0 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5#0 ] ) always clobbers reg byte a -Statement [109] (word) sin16sb::x5_128#0 ← (word) sin16sb::x5#0 >> (byte) 4 [ sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:25 [ sin16sb::isUpper#2 ] +Statement [109] (word) sin16sb::x5_128#0 ← (word) sin16sb::x5#0 >> (byte) 4 [ sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ) always clobbers reg byte a Statement [110] (word) sin16sb::usinx#1 ← (word) sin16sb::usinx#0 + (word) sin16sb::x5_128#0 [ sin16sb::isUpper#2 sin16sb::usinx#1 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#1 ] ) always clobbers reg byte a Statement [112] (signed word) sin16sb::sinx#1 ← - (signed word)(word) sin16sb::usinx#1 [ sin16sb::sinx#1 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::sinx#1 ] ) always clobbers reg byte a Statement [115] (signed word~) sin16sb::return#5 ← (signed word)(word) sin16sb::usinx#1 [ sin16sb::return#5 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::return#5 ] ) always clobbers reg byte a @@ -5320,7 +5323,7 @@ Statement [206] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ mulu16_sel::v1 Statement [207] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ mulu16_sel::v1#4 mulu16_sel::v2#4 sin16s::isUpper#2 sin16s::usinx#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 mulu16_sel::v1#4 mulu16_sel::v2#4 sin16s::isUpper#2 sin16s::usinx#0 ] ) always clobbers reg byte a Statement [209] (word) mulu16_sel::return#16 ← (word) mulu16_sel::return#17 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#16 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#16 ] ) always clobbers reg byte a Statement [210] (word) sin16s::x5#0 ← (word) mulu16_sel::return#16 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [211] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [211] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [212] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [214] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [217] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -5374,7 +5377,7 @@ Statement [104] (word) mulu16_sel::v1#9 ← (word) sin16sb::x4#0 [ sin16sb::isUp Statement [105] (word) mulu16_sel::v2#9 ← (word) sin16sb::x1#0 [ sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::v1#9 mulu16_sel::v2#9 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::v1#9 mulu16_sel::v2#9 ] ) always clobbers reg byte a Statement [107] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#17 [ sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [108] (word) sin16sb::x5#0 ← (word) mulu16_sel::return#11 [ sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5#0 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5#0 ] ) always clobbers reg byte a -Statement [109] (word) sin16sb::x5_128#0 ← (word) sin16sb::x5#0 >> (byte) 4 [ sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [109] (word) sin16sb::x5_128#0 ← (word) sin16sb::x5#0 >> (byte) 4 [ sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#0 sin16sb::x5_128#0 ] ) always clobbers reg byte a Statement [110] (word) sin16sb::usinx#1 ← (word) sin16sb::usinx#0 + (word) sin16sb::x5_128#0 [ sin16sb::isUpper#2 sin16sb::usinx#1 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::isUpper#2 sin16sb::usinx#1 ] ) always clobbers reg byte a Statement [112] (signed word) sin16sb::sinx#1 ← - (signed word)(word) sin16sb::usinx#1 [ sin16sb::sinx#1 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::sinx#1 ] ) always clobbers reg byte a Statement [115] (signed word~) sin16sb::return#5 ← (signed word)(word) sin16sb::usinx#1 [ sin16sb::return#5 ] ( main:2::sin16s_genb:7::sin16sb:68 [ sin16s_genb::step#0 sin16s_genb::x#2 sin16s_genb::sintab#2 sin16s_genb::i#2 sin16sb::return#5 ] ) always clobbers reg byte a @@ -5433,7 +5436,7 @@ Statement [206] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ mulu16_sel::v1 Statement [207] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ mulu16_sel::v1#4 mulu16_sel::v2#4 sin16s::isUpper#2 sin16s::usinx#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 mulu16_sel::v1#4 mulu16_sel::v2#4 sin16s::isUpper#2 sin16s::usinx#0 ] ) always clobbers reg byte a Statement [209] (word) mulu16_sel::return#16 ← (word) mulu16_sel::return#17 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#16 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#16 ] ) always clobbers reg byte a Statement [210] (word) sin16s::x5#0 ← (word) mulu16_sel::return#16 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [211] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [211] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [212] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [214] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [217] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen:5::sin16s:169 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -5449,7 +5452,7 @@ Potential registers zp ZP_WORD:15 [ print_cls::sc#2 print_cls::sc#1 ] : zp ZP_WO Potential registers zp ZP_DWORD:17 [ sin16s_genb::x#2 sin16s_genb::x#1 ] : zp ZP_DWORD:17 , Potential registers zp ZP_WORD:21 [ sin16s_genb::sintab#2 sin16s_genb::sintab#0 ] : zp ZP_WORD:21 , Potential registers zp ZP_WORD:23 [ sin16s_genb::i#2 sin16s_genb::i#1 ] : zp ZP_WORD:23 , -Potential registers zp ZP_BYTE:25 [ sin16sb::isUpper#2 ] : zp ZP_BYTE:25 , reg byte x , +Potential registers zp ZP_BYTE:25 [ sin16sb::isUpper#2 ] : zp ZP_BYTE:25 , reg byte x , reg byte y , Potential registers zp ZP_WORD:26 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 ] : zp ZP_WORD:26 , Potential registers zp ZP_WORD:28 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 ] : zp ZP_WORD:28 , Potential registers zp ZP_WORD:30 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 ] : zp ZP_WORD:30 , @@ -5541,28 +5544,26 @@ Uplift Scope [print_char] 14: zp ZP_BYTE:12 [ print_char::ch#3 print_char::ch#1 Uplift Scope [print_sword] 9.58: zp ZP_WORD:9 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] Uplift Scope [print_word] -Uplifting [mul16u] best 29882 combination zp ZP_DWORD:37 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:41 [ mul16u::mb#2 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:35 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] zp ZP_DWORD:113 [ mul16u::return#2 ] zp ZP_WORD:45 [ mul16u::b#0 ] -Uplifting [print_str] best 29882 combination zp ZP_WORD:7 [ print_str::str#3 print_str::str#5 print_str::str#0 ] -Uplifting [divr16u] best 29672 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:128 [ divr16u::return#2 ] zp ZP_WORD:132 [ divr16u::return#3 ] -Uplifting [] best 29672 combination zp ZP_WORD:13 [ print_char_cursor#33 print_char_cursor#46 print_char_cursor#43 print_char_cursor#51 print_char_cursor#48 print_char_cursor#49 print_char_cursor#2 print_char_cursor#12 print_char_cursor#1 ] zp ZP_WORD:142 [ rem16u#1 ] -Uplifting [mulu16_sel] best 29641 combination zp ZP_WORD:30 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 ] zp ZP_WORD:32 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 ] zp ZP_WORD:87 [ mulu16_sel::return#18 ] zp ZP_WORD:91 [ mulu16_sel::return#19 ] zp ZP_WORD:95 [ mulu16_sel::return#20 ] zp ZP_WORD:101 [ mulu16_sel::return#10 ] zp ZP_WORD:105 [ mulu16_sel::return#11 ] zp ZP_DWORD:117 [ mulu16_sel::$0 ] zp ZP_DWORD:121 [ mulu16_sel::$1 ] zp ZP_WORD:162 [ mulu16_sel::return#0 ] zp ZP_WORD:166 [ mulu16_sel::return#1 ] zp ZP_WORD:170 [ mulu16_sel::return#14 ] zp ZP_WORD:176 [ mulu16_sel::return#15 ] zp ZP_WORD:180 [ mulu16_sel::return#16 ] zp ZP_WORD:125 [ mulu16_sel::return#17 ] reg byte x [ mulu16_sel::select#10 ] -Uplifting [sin16s] best 29641 combination zp ZP_DWORD:63 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:152 [ sin16s::return#0 ] zp ZP_WORD:67 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:156 [ sin16s::$4 ] zp ZP_WORD:164 [ sin16s::x2#0 ] zp ZP_WORD:172 [ sin16s::x3_6#0 ] zp ZP_WORD:178 [ sin16s::x4#0 ] zp ZP_WORD:182 [ sin16s::x5#0 ] zp ZP_WORD:184 [ sin16s::x5_128#0 ] zp ZP_WORD:168 [ sin16s::x3#0 ] zp ZP_WORD:186 [ sin16s::usinx#1 ] zp ZP_WORD:160 [ sin16s::x1#0 ] zp ZP_WORD:174 [ sin16s::usinx#0 ] zp ZP_BYTE:62 [ sin16s::isUpper#2 ] -Uplifting [sin16sb] best 29641 combination zp ZP_WORD:26 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 ] zp ZP_WORD:81 [ sin16sb::return#0 ] zp ZP_WORD:28 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 ] zp ZP_WORD:89 [ sin16sb::x2#0 ] zp ZP_WORD:97 [ sin16sb::x3_6#0 ] zp ZP_WORD:103 [ sin16sb::x4#0 ] zp ZP_WORD:107 [ sin16sb::x5#0 ] zp ZP_WORD:109 [ sin16sb::x5_128#0 ] zp ZP_WORD:93 [ sin16sb::x3#0 ] zp ZP_WORD:111 [ sin16sb::usinx#1 ] zp ZP_WORD:85 [ sin16sb::x1#0 ] zp ZP_WORD:99 [ sin16sb::usinx#0 ] zp ZP_BYTE:25 [ sin16sb::isUpper#2 ] -Uplifting [sin16s_gen] best 29641 combination zp ZP_WORD:154 [ sin16s_gen::$1 ] zp ZP_WORD:60 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:54 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:58 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:148 [ sin16s_gen::step#0 ] -Uplifting [sin16s_genb] best 29641 combination zp ZP_WORD:83 [ sin16s_genb::$2 ] zp ZP_WORD:23 [ sin16s_genb::i#2 sin16s_genb::i#1 ] zp ZP_DWORD:17 [ sin16s_genb::x#2 sin16s_genb::x#1 ] zp ZP_WORD:21 [ sin16s_genb::sintab#2 sin16s_genb::sintab#0 ] zp ZP_DWORD:77 [ sin16s_genb::step#0 ] -Uplifting [main] best 29551 combination reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:4 [ main::st2#2 main::st2#1 ] zp ZP_WORD:2 [ main::st1#2 main::st1#1 ] zp ZP_WORD:69 [ main::sw#0 ] -Uplifting [print_cls] best 29551 combination zp ZP_WORD:15 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [print_byte] best 29543 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [div32u16u] best 29543 combination zp ZP_DWORD:73 [ div32u16u::return#3 ] zp ZP_WORD:134 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:144 [ div32u16u::return#2 ] zp ZP_DWORD:136 [ div32u16u::return#0 ] zp ZP_WORD:130 [ div32u16u::quotient_hi#0 ] -Uplifting [print_char] best 29531 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] -Uplifting [print_sword] best 29531 combination zp ZP_WORD:9 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] -Uplifting [print_word] best 29531 combination +Uplifting [mul16u] best 29918 combination zp ZP_DWORD:37 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:41 [ mul16u::mb#2 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:35 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] zp ZP_DWORD:113 [ mul16u::return#2 ] zp ZP_WORD:45 [ mul16u::b#0 ] +Uplifting [print_str] best 29918 combination zp ZP_WORD:7 [ print_str::str#3 print_str::str#5 print_str::str#0 ] +Uplifting [divr16u] best 29708 combination zp ZP_WORD:47 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:51 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:49 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] zp ZP_WORD:128 [ divr16u::return#2 ] zp ZP_WORD:132 [ divr16u::return#3 ] +Uplifting [] best 29708 combination zp ZP_WORD:13 [ print_char_cursor#33 print_char_cursor#46 print_char_cursor#43 print_char_cursor#51 print_char_cursor#48 print_char_cursor#49 print_char_cursor#2 print_char_cursor#12 print_char_cursor#1 ] zp ZP_WORD:142 [ rem16u#1 ] +Uplifting [mulu16_sel] best 29677 combination zp ZP_WORD:30 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 ] zp ZP_WORD:32 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 ] zp ZP_WORD:87 [ mulu16_sel::return#18 ] zp ZP_WORD:91 [ mulu16_sel::return#19 ] zp ZP_WORD:95 [ mulu16_sel::return#20 ] zp ZP_WORD:101 [ mulu16_sel::return#10 ] zp ZP_WORD:105 [ mulu16_sel::return#11 ] zp ZP_DWORD:117 [ mulu16_sel::$0 ] zp ZP_DWORD:121 [ mulu16_sel::$1 ] zp ZP_WORD:162 [ mulu16_sel::return#0 ] zp ZP_WORD:166 [ mulu16_sel::return#1 ] zp ZP_WORD:170 [ mulu16_sel::return#14 ] zp ZP_WORD:176 [ mulu16_sel::return#15 ] zp ZP_WORD:180 [ mulu16_sel::return#16 ] zp ZP_WORD:125 [ mulu16_sel::return#17 ] reg byte x [ mulu16_sel::select#10 ] +Uplifting [sin16s] best 29677 combination zp ZP_DWORD:63 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:152 [ sin16s::return#0 ] zp ZP_WORD:67 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:156 [ sin16s::$4 ] zp ZP_WORD:164 [ sin16s::x2#0 ] zp ZP_WORD:172 [ sin16s::x3_6#0 ] zp ZP_WORD:178 [ sin16s::x4#0 ] zp ZP_WORD:182 [ sin16s::x5#0 ] zp ZP_WORD:184 [ sin16s::x5_128#0 ] zp ZP_WORD:168 [ sin16s::x3#0 ] zp ZP_WORD:186 [ sin16s::usinx#1 ] zp ZP_WORD:160 [ sin16s::x1#0 ] zp ZP_WORD:174 [ sin16s::usinx#0 ] zp ZP_BYTE:62 [ sin16s::isUpper#2 ] +Uplifting [sin16sb] best 29668 combination zp ZP_WORD:26 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 ] zp ZP_WORD:81 [ sin16sb::return#0 ] zp ZP_WORD:28 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 ] zp ZP_WORD:89 [ sin16sb::x2#0 ] zp ZP_WORD:97 [ sin16sb::x3_6#0 ] zp ZP_WORD:103 [ sin16sb::x4#0 ] zp ZP_WORD:107 [ sin16sb::x5#0 ] zp ZP_WORD:109 [ sin16sb::x5_128#0 ] zp ZP_WORD:93 [ sin16sb::x3#0 ] zp ZP_WORD:111 [ sin16sb::usinx#1 ] zp ZP_WORD:85 [ sin16sb::x1#0 ] zp ZP_WORD:99 [ sin16sb::usinx#0 ] reg byte y [ sin16sb::isUpper#2 ] +Uplifting [sin16s_gen] best 29668 combination zp ZP_WORD:154 [ sin16s_gen::$1 ] zp ZP_WORD:60 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:54 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:58 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:148 [ sin16s_gen::step#0 ] +Uplifting [sin16s_genb] best 29668 combination zp ZP_WORD:83 [ sin16s_genb::$2 ] zp ZP_WORD:23 [ sin16s_genb::i#2 sin16s_genb::i#1 ] zp ZP_DWORD:17 [ sin16s_genb::x#2 sin16s_genb::x#1 ] zp ZP_WORD:21 [ sin16s_genb::sintab#2 sin16s_genb::sintab#0 ] zp ZP_DWORD:77 [ sin16s_genb::step#0 ] +Uplifting [main] best 29578 combination reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:4 [ main::st2#2 main::st2#1 ] zp ZP_WORD:2 [ main::st1#2 main::st1#1 ] zp ZP_WORD:69 [ main::sw#0 ] +Uplifting [print_cls] best 29578 combination zp ZP_WORD:15 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_byte] best 29570 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [div32u16u] best 29570 combination zp ZP_DWORD:73 [ div32u16u::return#3 ] zp ZP_WORD:134 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:144 [ div32u16u::return#2 ] zp ZP_DWORD:136 [ div32u16u::return#0 ] zp ZP_WORD:130 [ div32u16u::quotient_hi#0 ] +Uplifting [print_char] best 29558 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] +Uplifting [print_sword] best 29558 combination zp ZP_WORD:9 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] +Uplifting [print_word] best 29558 combination Attempting to uplift remaining variables inzp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] -Uplifting [print_byte] best 29531 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:25 [ sin16sb::isUpper#2 ] -Uplifting [sin16sb] best 29531 combination zp ZP_BYTE:25 [ sin16sb::isUpper#2 ] +Uplifting [print_byte] best 29558 combination zp ZP_BYTE:11 [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:62 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 29531 combination zp ZP_BYTE:62 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 29558 combination zp ZP_BYTE:62 [ sin16s::isUpper#2 ] Coalescing zero page register with common assignment [ zp ZP_WORD:28 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 ] ] with [ zp ZP_WORD:111 [ sin16sb::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 ] ] with [ zp ZP_WORD:93 [ sin16sb::x3#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:30 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 ] ] with [ zp ZP_WORD:168 [ sin16s::x3#0 ] ] - score: 2 @@ -5616,27 +5617,26 @@ Allocated (was zp ZP_WORD:15) zp ZP_WORD:13 [ print_cls::sc#2 print_cls::sc#1 ] Allocated (was zp ZP_DWORD:17) zp ZP_DWORD:15 [ sin16s_genb::x#2 sin16s_genb::x#1 ] Allocated (was zp ZP_WORD:21) zp ZP_WORD:19 [ sin16s_genb::sintab#2 sin16s_genb::sintab#0 ] Allocated (was zp ZP_WORD:23) zp ZP_WORD:21 [ sin16s_genb::i#2 sin16s_genb::i#1 ] -Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:23 [ sin16sb::isUpper#2 ] -Allocated (was zp ZP_WORD:26) zp ZP_WORD:24 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 sin16sb::x1#0 ] -Allocated (was zp ZP_WORD:28) zp ZP_WORD:26 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 sin16sb::usinx#1 sin16sb::return#0 sin16s_genb::$2 sin16sb::usinx#0 ] -Allocated (was zp ZP_WORD:30) zp ZP_WORD:28 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 sin16s::x3#0 sin16sb::x2#0 sin16sb::x4#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#19 mulu16_sel::return#10 mulu16_sel::return#0 mulu16_sel::return#1 mulu16_sel::return#15 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:30 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 mul16u::b#0 ] -Allocated (was zp ZP_WORD:35) zp ZP_WORD:32 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] -Allocated (was zp ZP_DWORD:37) zp ZP_DWORD:34 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 mulu16_sel::$0 mulu16_sel::$1 ] -Allocated (was zp ZP_DWORD:41) zp ZP_DWORD:38 [ mul16u::mb#2 mul16u::mb#1 ] -Allocated (was zp ZP_WORD:47) zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] -Allocated (was zp ZP_WORD:49) zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -Allocated (was zp ZP_WORD:51) zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] -Allocated (was zp ZP_DWORD:54) zp ZP_DWORD:48 [ sin16s_gen::x#2 sin16s_gen::x#1 ] -Allocated (was zp ZP_WORD:58) zp ZP_WORD:52 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] -Allocated (was zp ZP_WORD:60) zp ZP_WORD:54 [ sin16s_gen::i#2 sin16s_gen::i#1 ] -Allocated (was zp ZP_BYTE:62) zp ZP_BYTE:56 [ sin16s::isUpper#2 ] -Allocated (was zp ZP_DWORD:63) zp ZP_DWORD:57 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] -Allocated (was zp ZP_WORD:67) zp ZP_WORD:61 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s_gen::$1 sin16s::usinx#0 ] -Allocated (was zp ZP_DWORD:73) zp ZP_DWORD:63 [ div32u16u::return#3 sin16s_genb::step#0 div32u16u::return#0 div32u16u::return#2 sin16s_gen::step#0 ] -Allocated (was zp ZP_WORD:87) zp ZP_WORD:67 [ mulu16_sel::return#18 mulu16_sel::return#17 mulu16_sel::return#20 sin16sb::x3_6#0 mulu16_sel::return#11 sin16sb::x5#0 mulu16_sel::return#14 sin16s::x3_6#0 mulu16_sel::return#16 sin16s::x5#0 sin16sb::x5_128#0 sin16s::x5_128#0 ] -Allocated (was zp ZP_WORD:130) zp ZP_WORD:69 [ div32u16u::quotient_hi#0 ] -Allocated (was zp ZP_WORD:160) zp ZP_WORD:71 [ sin16s::x1#0 ] +Allocated (was zp ZP_WORD:26) zp ZP_WORD:23 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 sin16sb::x1#0 ] +Allocated (was zp ZP_WORD:28) zp ZP_WORD:25 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 sin16sb::usinx#1 sin16sb::return#0 sin16s_genb::$2 sin16sb::usinx#0 ] +Allocated (was zp ZP_WORD:30) zp ZP_WORD:27 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 sin16s::x3#0 sin16sb::x2#0 sin16sb::x4#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#19 mulu16_sel::return#10 mulu16_sel::return#0 mulu16_sel::return#1 mulu16_sel::return#15 ] +Allocated (was zp ZP_WORD:32) zp ZP_WORD:29 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 mul16u::b#0 ] +Allocated (was zp ZP_WORD:35) zp ZP_WORD:31 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] +Allocated (was zp ZP_DWORD:37) zp ZP_DWORD:33 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 mulu16_sel::$0 mulu16_sel::$1 ] +Allocated (was zp ZP_DWORD:41) zp ZP_DWORD:37 [ mul16u::mb#2 mul16u::mb#1 ] +Allocated (was zp ZP_WORD:47) zp ZP_WORD:41 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +Allocated (was zp ZP_WORD:49) zp ZP_WORD:43 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +Allocated (was zp ZP_WORD:51) zp ZP_WORD:45 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +Allocated (was zp ZP_DWORD:54) zp ZP_DWORD:47 [ sin16s_gen::x#2 sin16s_gen::x#1 ] +Allocated (was zp ZP_WORD:58) zp ZP_WORD:51 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] +Allocated (was zp ZP_WORD:60) zp ZP_WORD:53 [ sin16s_gen::i#2 sin16s_gen::i#1 ] +Allocated (was zp ZP_BYTE:62) zp ZP_BYTE:55 [ sin16s::isUpper#2 ] +Allocated (was zp ZP_DWORD:63) zp ZP_DWORD:56 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +Allocated (was zp ZP_WORD:67) zp ZP_WORD:60 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s_gen::$1 sin16s::usinx#0 ] +Allocated (was zp ZP_DWORD:73) zp ZP_DWORD:62 [ div32u16u::return#3 sin16s_genb::step#0 div32u16u::return#0 div32u16u::return#2 sin16s_gen::step#0 ] +Allocated (was zp ZP_WORD:87) zp ZP_WORD:66 [ mulu16_sel::return#18 mulu16_sel::return#17 mulu16_sel::return#20 sin16sb::x3_6#0 mulu16_sel::return#11 sin16sb::x5#0 mulu16_sel::return#14 sin16s::x3_6#0 mulu16_sel::return#16 sin16s::x5#0 sin16sb::x5_128#0 sin16s::x5_128#0 ] +Allocated (was zp ZP_WORD:130) zp ZP_WORD:68 [ div32u16u::quotient_hi#0 ] +Allocated (was zp ZP_WORD:160) zp ZP_WORD:70 [ sin16s::x1#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -5658,7 +5658,7 @@ ASSEMBLER BEFORE OPTIMIZATION // PI/2 in u[4.12] format .const PI_HALF_u4f12 = $1922 .label print_line_cursor = $400 - .label rem16u = $2a + .label rem16u = $29 .label print_char_cursor = $b //SEG3 @begin bbegin: @@ -6044,8 +6044,8 @@ print_cls: { // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) // sin16s_genb(signed word* zeropage($13) sintab) sin16s_genb: { - .label _2 = $1a - .label step = $3f + .label _2 = $19 + .label step = $3e .label sintab = $13 .label x = $f .label i = $15 @@ -6152,20 +6152,19 @@ sin16s_genb: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16sb(word zeropage($18) x) +// sin16sb(word zeropage($17) x) sin16sb: { - .label x = $18 - .label return = $1a - .label x1 = $18 - .label x2 = $1c - .label x3 = $1c - .label x3_6 = $43 - .label usinx = $1a - .label x4 = $1c - .label x5 = $43 - .label x5_128 = $43 - .label sinx = $1a - .label isUpper = $17 + .label x = $17 + .label return = $19 + .label x1 = $17 + .label x2 = $1b + .label x3 = $1b + .label x3_6 = $42 + .label usinx = $19 + .label x4 = $1b + .label x5 = $42 + .label x5_128 = $42 + .label sinx = $19 //SEG161 [77] if((word) sin16sb::x#0<(const word) PI_u4f12#0) goto sin16sb::@1 -- vwuz1_lt_vwuc1_then_la1 lda x+1 cmp #>PI_u4f12 @@ -6188,16 +6187,14 @@ sin16sb: { sta x+1 //SEG164 [79] phi from sin16sb::@4 to sin16sb::@1 [phi:sin16sb::@4->sin16sb::@1] b1_from_b4: - //SEG165 [79] phi (byte) sin16sb::isUpper#2 = (byte) 1 [phi:sin16sb::@4->sin16sb::@1#0] -- vbuz1=vbuc1 - lda #1 - sta isUpper + //SEG165 [79] phi (byte) sin16sb::isUpper#2 = (byte) 1 [phi:sin16sb::@4->sin16sb::@1#0] -- vbuyy=vbuc1 + ldy #1 //SEG166 [79] phi (word) sin16sb::x#4 = (word) sin16sb::x#1 [phi:sin16sb::@4->sin16sb::@1#1] -- register_copy jmp b1 //SEG167 [79] phi from sin16sb to sin16sb::@1 [phi:sin16sb->sin16sb::@1] b1_from_sin16sb: - //SEG168 [79] phi (byte) sin16sb::isUpper#2 = (byte) 0 [phi:sin16sb->sin16sb::@1#0] -- vbuz1=vbuc1 - lda #0 - sta isUpper + //SEG168 [79] phi (byte) sin16sb::isUpper#2 = (byte) 0 [phi:sin16sb->sin16sb::@1#0] -- vbuyy=vbuc1 + ldy #0 //SEG169 [79] phi (word) sin16sb::x#4 = (word) sin16sb::x#0 [phi:sin16sb->sin16sb::@1#1] -- register_copy jmp b1 //SEG170 sin16sb::@1 @@ -6371,9 +6368,8 @@ sin16sb: { lda usinx+1 adc x5_128+1 sta usinx+1 - //SEG230 [111] if((byte) sin16sb::isUpper#2==(byte) 0) goto sin16sb::@12 -- vbuz1_eq_0_then_la1 - lda isUpper - cmp #0 + //SEG230 [111] if((byte) sin16sb::isUpper#2==(byte) 0) goto sin16sb::@12 -- vbuyy_eq_0_then_la1 + cpy #0 beq b12 jmp b6 //SEG231 sin16sb::@6 @@ -6406,19 +6402,19 @@ sin16sb: { //SEG240 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($1c) v1, word zeropage($1e) v2, byte register(X) select) +// mulu16_sel(word zeropage($1b) v1, word zeropage($1d) v2, byte register(X) select) mulu16_sel: { - .label _0 = $22 - .label _1 = $22 - .label v1 = $1c - .label v2 = $1e - .label return = $1c - .label return_11 = $43 - .label return_14 = $43 - .label return_16 = $43 - .label return_17 = $43 - .label return_18 = $43 - .label return_20 = $43 + .label _0 = $21 + .label _1 = $21 + .label v1 = $1b + .label v2 = $1d + .label return = $1b + .label return_11 = $42 + .label return_14 = $42 + .label return_16 = $42 + .label return_17 = $42 + .label return_18 = $42 + .label return_20 = $42 //SEG241 [117] (word) mul16u::a#1 ← (word) mulu16_sel::v1#10 -- vwuz1=vwuz2 lda v1 sta mul16u.a @@ -6458,13 +6454,13 @@ mulu16_sel: { } //SEG252 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($20) a, word zeropage($1e) b) +// mul16u(word zeropage($1f) a, word zeropage($1d) b) mul16u: { - .label a = $20 - .label mb = $26 - .label res = $22 - .label b = $1e - .label return = $22 + .label a = $1f + .label mb = $25 + .label res = $21 + .label b = $1d + .label return = $21 //SEG253 [126] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] b1_from_mul16u: //SEG254 [126] phi (dword) mul16u::mb#2 = (word) mul16u::b#0 [phi:mul16u->mul16u::@1#0] -- vduz1=vwuz2 @@ -6547,9 +6543,9 @@ mul16u: { // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $45 - .label quotient_lo = $2e - .label return = $3f + .label quotient_hi = $44 + .label quotient_lo = $2d + .label return = $3e //SEG276 [136] call divr16u //SEG277 [145] phi from div32u16u to divr16u [phi:div32u16u->divr16u] divr16u_from_div32u16u: @@ -6609,12 +6605,12 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2c) dividend, word zeropage($2a) rem) +// divr16u(word zeropage($2b) dividend, word zeropage($29) rem) divr16u: { - .label rem = $2a - .label dividend = $2c - .label quotient = $2e - .label return = $2e + .label rem = $29 + .label dividend = $2b + .label quotient = $2d + .label return = $2d //SEG295 [146] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] b1_from_divr16u: //SEG296 [146] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 @@ -6718,13 +6714,13 @@ divr16u: { // Generate signed (large) word sinus table - on the full -$7fff - $7fff range // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen(signed word* zeropage($34) sintab) +// sin16s_gen(signed word* zeropage($33) sintab) sin16s_gen: { - .label _1 = $3d - .label step = $3f - .label sintab = $34 - .label x = $30 - .label i = $36 + .label _1 = $3c + .label step = $3e + .label sintab = $33 + .label x = $2f + .label i = $35 //SEG332 [164] call div32u16u //SEG333 [135] phi from sin16s_gen to div32u16u [phi:sin16s_gen->div32u16u] div32u16u_from_sin16s_gen: @@ -6832,21 +6828,21 @@ sin16s_gen: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16s(dword zeropage($39) x) +// sin16s(dword zeropage($38) x) sin16s: { - .label _4 = $39 - .label x = $39 - .label return = $3d - .label x1 = $47 - .label x2 = $1c - .label x3 = $1c - .label x3_6 = $43 - .label usinx = $3d - .label x4 = $1c - .label x5 = $43 - .label x5_128 = $43 - .label sinx = $3d - .label isUpper = $38 + .label _4 = $38 + .label x = $38 + .label return = $3c + .label x1 = $46 + .label x2 = $1b + .label x3 = $1b + .label x3_6 = $42 + .label usinx = $3c + .label x4 = $1b + .label x5 = $42 + .label x5_128 = $42 + .label sinx = $3c + .label isUpper = $37 //SEG359 [178] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 @@ -7400,13 +7396,13 @@ FINAL SYMBOL TABLE (word) div32u16u::divisor (dword) div32u16u::quotient (word) div32u16u::quotient_hi -(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:69 0.8 +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:68 0.8 (word) div32u16u::quotient_lo -(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:46 4.0 +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:45 4.0 (dword) div32u16u::return -(dword) div32u16u::return#0 return zp ZP_DWORD:63 1.5 -(dword) div32u16u::return#2 return zp ZP_DWORD:63 4.0 -(dword) div32u16u::return#3 return zp ZP_DWORD:63 4.0 +(dword) div32u16u::return#0 return zp ZP_DWORD:62 1.5 +(dword) div32u16u::return#2 return zp ZP_DWORD:62 4.0 +(dword) div32u16u::return#3 return zp ZP_DWORD:62 4.0 (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (byte~) divr16u::$1 reg byte a 22.0 (byte~) divr16u::$2 reg byte a 22.0 @@ -7418,30 +7414,30 @@ FINAL SYMBOL TABLE (label) divr16u::@6 (label) divr16u::@return (word) divr16u::dividend -(word) divr16u::dividend#0 dividend zp ZP_WORD:44 2.75 -(word) divr16u::dividend#3 dividend zp ZP_WORD:44 5.0 -(word) divr16u::dividend#5 dividend zp ZP_WORD:44 2.0 +(word) divr16u::dividend#0 dividend zp ZP_WORD:43 2.75 +(word) divr16u::dividend#3 dividend zp ZP_WORD:43 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:43 2.0 (word) divr16u::divisor (byte) divr16u::i (byte) divr16u::i#1 reg byte x 16.5 (byte) divr16u::i#2 reg byte x 1.6923076923076923 (word) divr16u::quotient -(word) divr16u::quotient#1 quotient zp ZP_WORD:46 16.5 -(word) divr16u::quotient#2 quotient zp ZP_WORD:46 11.0 -(word) divr16u::quotient#3 quotient zp ZP_WORD:46 2.75 +(word) divr16u::quotient#1 quotient zp ZP_WORD:45 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:45 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:45 2.75 (word) divr16u::rem -(word) divr16u::rem#0 rem zp ZP_WORD:42 8.25 -(word) divr16u::rem#1 rem zp ZP_WORD:42 22.0 -(word) divr16u::rem#10 rem zp ZP_WORD:42 4.0 -(word) divr16u::rem#11 rem zp ZP_WORD:42 11.666666666666666 -(word) divr16u::rem#2 rem zp ZP_WORD:42 22.0 -(word) divr16u::rem#4 rem zp ZP_WORD:42 4.0 -(word) divr16u::rem#5 rem zp ZP_WORD:42 24.0 -(word) divr16u::rem#6 rem zp ZP_WORD:42 11.0 +(word) divr16u::rem#0 rem zp ZP_WORD:41 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:41 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:41 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:41 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:41 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:41 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:41 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:41 11.0 (word) divr16u::return -(word) divr16u::return#0 return zp ZP_WORD:46 5.285714285714286 -(word) divr16u::return#2 return zp ZP_WORD:46 4.0 -(word) divr16u::return#3 return zp ZP_WORD:46 4.0 +(word) divr16u::return#0 return zp ZP_WORD:45 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:45 4.0 +(word) divr16u::return#3 return zp ZP_WORD:45 4.0 (void()) main() (label) main::@1 (label) main::@2 @@ -7478,61 +7474,61 @@ FINAL SYMBOL TABLE (label) mul16u::@4 (label) mul16u::@return (word) mul16u::a -(word) mul16u::a#0 a zp ZP_WORD:32 101.0 -(word) mul16u::a#1 a zp ZP_WORD:32 1.3333333333333333 -(word) mul16u::a#2 a zp ZP_WORD:32 67.66666666666666 +(word) mul16u::a#0 a zp ZP_WORD:31 101.0 +(word) mul16u::a#1 a zp ZP_WORD:31 1.3333333333333333 +(word) mul16u::a#2 a zp ZP_WORD:31 67.66666666666666 (word) mul16u::b -(word) mul16u::b#0 b zp ZP_WORD:30 2.0 +(word) mul16u::b#0 b zp ZP_WORD:29 2.0 (dword) mul16u::mb -(dword) mul16u::mb#1 mb zp ZP_DWORD:38 202.0 -(dword) mul16u::mb#2 mb zp ZP_DWORD:38 43.57142857142858 +(dword) mul16u::mb#1 mb zp ZP_DWORD:37 202.0 +(dword) mul16u::mb#2 mb zp ZP_DWORD:37 43.57142857142858 (dword) mul16u::res -(dword) mul16u::res#1 res zp ZP_DWORD:34 202.0 -(dword) mul16u::res#2 res zp ZP_DWORD:34 50.83333333333333 -(dword) mul16u::res#6 res zp ZP_DWORD:34 101.0 +(dword) mul16u::res#1 res zp ZP_DWORD:33 202.0 +(dword) mul16u::res#2 res zp ZP_DWORD:33 50.83333333333333 +(dword) mul16u::res#6 res zp ZP_DWORD:33 101.0 (dword) mul16u::return -(dword) mul16u::return#2 return zp ZP_DWORD:34 4.0 +(dword) mul16u::return#2 return zp ZP_DWORD:33 4.0 (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) -(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:34 4.0 -(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:34 4.0 +(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:33 4.0 +(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:33 4.0 (label) mulu16_sel::@1 (label) mulu16_sel::@return (word) mulu16_sel::return -(word) mulu16_sel::return#0 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#1 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#10 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#11 return#11 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#14 return#14 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#15 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#16 return#16 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#17 return#17 zp ZP_WORD:67 1.8333333333333335 -(word) mulu16_sel::return#18 return#18 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#19 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#20 return#20 zp ZP_WORD:67 4.0 +(word) mulu16_sel::return#0 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#1 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#10 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#11 return#11 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#14 return#14 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#15 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#16 return#16 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#17 return#17 zp ZP_WORD:66 1.8333333333333335 +(word) mulu16_sel::return#18 return#18 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#19 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#20 return#20 zp ZP_WORD:66 4.0 (byte) mulu16_sel::select (byte) mulu16_sel::select#10 reg byte x 0.3333333333333333 (word) mulu16_sel::v1 -(word) mulu16_sel::v1#0 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#1 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#10 v1 zp ZP_WORD:28 22.0 -(word) mulu16_sel::v1#2 v1 zp ZP_WORD:28 4.0 -(word) mulu16_sel::v1#3 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#4 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#5 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#6 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#7 v1 zp ZP_WORD:28 4.0 -(word) mulu16_sel::v1#8 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#9 v1 zp ZP_WORD:28 2.0 +(word) mulu16_sel::v1#0 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#1 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#10 v1 zp ZP_WORD:27 22.0 +(word) mulu16_sel::v1#2 v1 zp ZP_WORD:27 4.0 +(word) mulu16_sel::v1#3 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#4 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#5 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#6 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#7 v1 zp ZP_WORD:27 4.0 +(word) mulu16_sel::v1#8 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#9 v1 zp ZP_WORD:27 2.0 (word) mulu16_sel::v2 -(word) mulu16_sel::v2#0 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#1 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#10 v2 zp ZP_WORD:30 9.0 -(word) mulu16_sel::v2#3 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#4 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#5 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#6 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#8 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#9 v2 zp ZP_WORD:30 4.0 +(word) mulu16_sel::v2#0 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#1 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#10 v2 zp ZP_WORD:29 9.0 +(word) mulu16_sel::v2#3 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#4 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#5 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#6 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#8 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#9 v2 zp ZP_WORD:29 4.0 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 reg byte a 4.0 (byte~) print_byte::$2 reg byte a 4.0 @@ -7591,9 +7587,9 @@ FINAL SYMBOL TABLE (label) print_word::@return (word) print_word::w (word) rem16u -(word) rem16u#1 rem16u zp ZP_WORD:42 0.8 +(word) rem16u#1 rem16u zp ZP_WORD:41 0.8 (signed word()) sin16s((dword) sin16s::x) -(dword~) sin16s::$4 $4 zp ZP_DWORD:57 4.0 +(dword~) sin16s::$4 $4 zp ZP_DWORD:56 4.0 (label) sin16s::@1 (label) sin16s::@10 (label) sin16s::@11 @@ -7608,56 +7604,56 @@ FINAL SYMBOL TABLE (label) sin16s::@9 (label) sin16s::@return (byte) sin16s::isUpper -(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:56 0.06060606060606061 +(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:55 0.06060606060606061 (signed word) sin16s::return -(signed word) sin16s::return#0 return zp ZP_WORD:61 22.0 -(signed word) sin16s::return#1 return zp ZP_WORD:61 5.0 -(signed word~) sin16s::return#5 return zp ZP_WORD:61 4.0 +(signed word) sin16s::return#0 return zp ZP_WORD:60 22.0 +(signed word) sin16s::return#1 return zp ZP_WORD:60 5.0 +(signed word~) sin16s::return#5 return zp ZP_WORD:60 4.0 (signed word) sin16s::sinx -(signed word) sin16s::sinx#1 sinx zp ZP_WORD:61 4.0 +(signed word) sin16s::sinx#1 sinx zp ZP_WORD:60 4.0 (word) sin16s::usinx -(word) sin16s::usinx#0 usinx zp ZP_WORD:61 0.3333333333333333 -(word) sin16s::usinx#1 usinx zp ZP_WORD:61 1.0 +(word) sin16s::usinx#0 usinx zp ZP_WORD:60 0.3333333333333333 +(word) sin16s::usinx#1 usinx zp ZP_WORD:60 1.0 (dword) sin16s::x -(dword) sin16s::x#0 x zp ZP_DWORD:57 8.5 -(dword) sin16s::x#1 x zp ZP_DWORD:57 4.0 -(dword) sin16s::x#2 x zp ZP_DWORD:57 4.0 -(dword) sin16s::x#4 x zp ZP_DWORD:57 5.0 -(dword) sin16s::x#6 x zp ZP_DWORD:57 6.0 +(dword) sin16s::x#0 x zp ZP_DWORD:56 8.5 +(dword) sin16s::x#1 x zp ZP_DWORD:56 4.0 +(dword) sin16s::x#2 x zp ZP_DWORD:56 4.0 +(dword) sin16s::x#4 x zp ZP_DWORD:56 5.0 +(dword) sin16s::x#6 x zp ZP_DWORD:56 6.0 (word) sin16s::x1 -(word) sin16s::x1#0 x1 zp ZP_WORD:71 0.6363636363636365 +(word) sin16s::x1#0 x1 zp ZP_WORD:70 0.6363636363636365 (word) sin16s::x2 -(word) sin16s::x2#0 x2 zp ZP_WORD:28 4.0 +(word) sin16s::x2#0 x2 zp ZP_WORD:27 4.0 (word) sin16s::x3 -(word) sin16s::x3#0 x3 zp ZP_WORD:28 1.0 +(word) sin16s::x3#0 x3 zp ZP_WORD:27 1.0 (word) sin16s::x3_6 -(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:67 4.0 +(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:66 4.0 (word) sin16s::x4 -(word) sin16s::x4#0 x4 zp ZP_WORD:28 4.0 +(word) sin16s::x4#0 x4 zp ZP_WORD:27 4.0 (word) sin16s::x5 -(word) sin16s::x5#0 x5 zp ZP_WORD:67 4.0 +(word) sin16s::x5#0 x5 zp ZP_WORD:66 4.0 (word) sin16s::x5_128 -(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:67 4.0 +(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:66 4.0 (void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) -(signed word~) sin16s_gen::$1 $1 zp ZP_WORD:61 22.0 +(signed word~) sin16s_gen::$1 $1 zp ZP_WORD:60 22.0 (label) sin16s_gen::@1 (label) sin16s_gen::@2 (label) sin16s_gen::@3 (label) sin16s_gen::@return (word) sin16s_gen::i -(word) sin16s_gen::i#1 i zp ZP_WORD:54 16.5 -(word) sin16s_gen::i#2 i zp ZP_WORD:54 2.75 +(word) sin16s_gen::i#1 i zp ZP_WORD:53 16.5 +(word) sin16s_gen::i#2 i zp ZP_WORD:53 2.75 (signed word*) sin16s_gen::sintab -(signed word*) sin16s_gen::sintab#0 sintab zp ZP_WORD:52 5.5 -(signed word*) sin16s_gen::sintab#2 sintab zp ZP_WORD:52 5.5 +(signed word*) sin16s_gen::sintab#0 sintab zp ZP_WORD:51 5.5 +(signed word*) sin16s_gen::sintab#2 sintab zp ZP_WORD:51 5.5 (dword) sin16s_gen::step -(dword) sin16s_gen::step#0 step zp ZP_DWORD:63 1.1818181818181819 +(dword) sin16s_gen::step#0 step zp ZP_DWORD:62 1.1818181818181819 (word) sin16s_gen::wavelength (dword) sin16s_gen::x -(dword) sin16s_gen::x#1 x zp ZP_DWORD:48 7.333333333333333 -(dword) sin16s_gen::x#2 x zp ZP_DWORD:48 4.714285714285714 +(dword) sin16s_gen::x#1 x zp ZP_DWORD:47 7.333333333333333 +(dword) sin16s_gen::x#2 x zp ZP_DWORD:47 4.714285714285714 (void()) sin16s_genb((signed word*) sin16s_genb::sintab , (word) sin16s_genb::wavelength) -(signed word~) sin16s_genb::$2 $2 zp ZP_WORD:26 22.0 +(signed word~) sin16s_genb::$2 $2 zp ZP_WORD:25 22.0 (label) sin16s_genb::@1 (label) sin16s_genb::@2 (label) sin16s_genb::@3 @@ -7669,7 +7665,7 @@ FINAL SYMBOL TABLE (signed word*) sin16s_genb::sintab#0 sintab zp ZP_WORD:19 5.5 (signed word*) sin16s_genb::sintab#2 sintab zp ZP_WORD:19 5.5 (dword) sin16s_genb::step -(dword) sin16s_genb::step#0 step zp ZP_DWORD:63 1.1818181818181819 +(dword) sin16s_genb::step#0 step zp ZP_DWORD:62 1.1818181818181819 (word) sin16s_genb::wavelength (dword) sin16s_genb::x (dword) sin16s_genb::x#1 x zp ZP_DWORD:15 7.333333333333333 @@ -7689,36 +7685,36 @@ FINAL SYMBOL TABLE (label) sin16sb::@9 (label) sin16sb::@return (byte) sin16sb::isUpper -(byte) sin16sb::isUpper#2 isUpper zp ZP_BYTE:23 0.0625 +(byte) sin16sb::isUpper#2 reg byte y 0.0625 (signed word) sin16sb::return -(signed word) sin16sb::return#0 return zp ZP_WORD:26 22.0 -(signed word) sin16sb::return#1 return zp ZP_WORD:26 5.0 -(signed word~) sin16sb::return#5 return zp ZP_WORD:26 4.0 +(signed word) sin16sb::return#0 return zp ZP_WORD:25 22.0 +(signed word) sin16sb::return#1 return zp ZP_WORD:25 5.0 +(signed word~) sin16sb::return#5 return zp ZP_WORD:25 4.0 (signed word) sin16sb::sinx -(signed word) sin16sb::sinx#1 sinx zp ZP_WORD:26 4.0 +(signed word) sin16sb::sinx#1 sinx zp ZP_WORD:25 4.0 (word) sin16sb::usinx -(word) sin16sb::usinx#0 usinx zp ZP_WORD:26 0.3333333333333333 -(word) sin16sb::usinx#1 usinx zp ZP_WORD:26 1.0 +(word) sin16sb::usinx#0 usinx zp ZP_WORD:25 0.3333333333333333 +(word) sin16sb::usinx#1 usinx zp ZP_WORD:25 1.0 (word) sin16sb::x -(word) sin16sb::x#0 x zp ZP_WORD:24 8.5 -(word) sin16sb::x#1 x zp ZP_WORD:24 4.0 -(word) sin16sb::x#2 x zp ZP_WORD:24 4.0 -(word) sin16sb::x#4 x zp ZP_WORD:24 5.0 -(word) sin16sb::x#6 x zp ZP_WORD:24 6.0 +(word) sin16sb::x#0 x zp ZP_WORD:23 8.5 +(word) sin16sb::x#1 x zp ZP_WORD:23 4.0 +(word) sin16sb::x#2 x zp ZP_WORD:23 4.0 +(word) sin16sb::x#4 x zp ZP_WORD:23 5.0 +(word) sin16sb::x#6 x zp ZP_WORD:23 6.0 (word) sin16sb::x1 -(word) sin16sb::x1#0 x1 zp ZP_WORD:24 0.6363636363636365 +(word) sin16sb::x1#0 x1 zp ZP_WORD:23 0.6363636363636365 (word) sin16sb::x2 -(word) sin16sb::x2#0 x2 zp ZP_WORD:28 4.0 +(word) sin16sb::x2#0 x2 zp ZP_WORD:27 4.0 (word) sin16sb::x3 -(word) sin16sb::x3#0 x3 zp ZP_WORD:28 1.0 +(word) sin16sb::x3#0 x3 zp ZP_WORD:27 1.0 (word) sin16sb::x3_6 -(word) sin16sb::x3_6#0 x3_6 zp ZP_WORD:67 4.0 +(word) sin16sb::x3_6#0 x3_6 zp ZP_WORD:66 4.0 (word) sin16sb::x4 -(word) sin16sb::x4#0 x4 zp ZP_WORD:28 4.0 +(word) sin16sb::x4#0 x4 zp ZP_WORD:27 4.0 (word) sin16sb::x5 -(word) sin16sb::x5#0 x5 zp ZP_WORD:67 4.0 +(word) sin16sb::x5#0 x5 zp ZP_WORD:66 4.0 (word) sin16sb::x5_128 -(word) sin16sb::x5_128#0 x5_128 zp ZP_WORD:67 4.0 +(word) sin16sb::x5_128#0 x5_128 zp ZP_WORD:66 4.0 zp ZP_WORD:2 [ main::st1#2 main::st1#1 ] zp ZP_WORD:4 [ main::st2#2 main::st2#1 ] @@ -7732,38 +7728,38 @@ zp ZP_WORD:13 [ print_cls::sc#2 print_cls::sc#1 ] zp ZP_DWORD:15 [ sin16s_genb::x#2 sin16s_genb::x#1 ] zp ZP_WORD:19 [ sin16s_genb::sintab#2 sin16s_genb::sintab#0 ] zp ZP_WORD:21 [ sin16s_genb::i#2 sin16s_genb::i#1 ] -zp ZP_BYTE:23 [ sin16sb::isUpper#2 ] -zp ZP_WORD:24 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 sin16sb::x1#0 ] -zp ZP_WORD:26 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 sin16sb::usinx#1 sin16sb::return#0 sin16s_genb::$2 sin16sb::usinx#0 ] -zp ZP_WORD:28 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 sin16s::x3#0 sin16sb::x2#0 sin16sb::x4#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#19 mulu16_sel::return#10 mulu16_sel::return#0 mulu16_sel::return#1 mulu16_sel::return#15 ] -zp ZP_WORD:30 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 mul16u::b#0 ] +reg byte y [ sin16sb::isUpper#2 ] +zp ZP_WORD:23 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 sin16sb::x1#0 ] +zp ZP_WORD:25 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 sin16sb::usinx#1 sin16sb::return#0 sin16s_genb::$2 sin16sb::usinx#0 ] +zp ZP_WORD:27 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 sin16s::x3#0 sin16sb::x2#0 sin16sb::x4#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#19 mulu16_sel::return#10 mulu16_sel::return#0 mulu16_sel::return#1 mulu16_sel::return#15 ] +zp ZP_WORD:29 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 mul16u::b#0 ] reg byte x [ mulu16_sel::select#10 ] -zp ZP_WORD:32 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] -zp ZP_DWORD:34 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 mulu16_sel::$0 mulu16_sel::$1 ] -zp ZP_DWORD:38 [ mul16u::mb#2 mul16u::mb#1 ] -zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] -zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +zp ZP_WORD:31 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] +zp ZP_DWORD:33 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 mulu16_sel::$0 mulu16_sel::$1 ] +zp ZP_DWORD:37 [ mul16u::mb#2 mul16u::mb#1 ] +zp ZP_WORD:41 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +zp ZP_WORD:43 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +zp ZP_WORD:45 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_DWORD:48 [ sin16s_gen::x#2 sin16s_gen::x#1 ] -zp ZP_WORD:52 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] -zp ZP_WORD:54 [ sin16s_gen::i#2 sin16s_gen::i#1 ] -zp ZP_BYTE:56 [ sin16s::isUpper#2 ] -zp ZP_DWORD:57 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] -zp ZP_WORD:61 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s_gen::$1 sin16s::usinx#0 ] +zp ZP_DWORD:47 [ sin16s_gen::x#2 sin16s_gen::x#1 ] +zp ZP_WORD:51 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] +zp ZP_WORD:53 [ sin16s_gen::i#2 sin16s_gen::i#1 ] +zp ZP_BYTE:55 [ sin16s::isUpper#2 ] +zp ZP_DWORD:56 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +zp ZP_WORD:60 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s_gen::$1 sin16s::usinx#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -zp ZP_DWORD:63 [ div32u16u::return#3 sin16s_genb::step#0 div32u16u::return#0 div32u16u::return#2 sin16s_gen::step#0 ] -zp ZP_WORD:67 [ mulu16_sel::return#18 mulu16_sel::return#17 mulu16_sel::return#20 sin16sb::x3_6#0 mulu16_sel::return#11 sin16sb::x5#0 mulu16_sel::return#14 sin16s::x3_6#0 mulu16_sel::return#16 sin16s::x5#0 sin16sb::x5_128#0 sin16s::x5_128#0 ] +zp ZP_DWORD:62 [ div32u16u::return#3 sin16s_genb::step#0 div32u16u::return#0 div32u16u::return#2 sin16s_gen::step#0 ] +zp ZP_WORD:66 [ mulu16_sel::return#18 mulu16_sel::return#17 mulu16_sel::return#20 sin16sb::x3_6#0 mulu16_sel::return#11 sin16sb::x5#0 mulu16_sel::return#14 sin16s::x3_6#0 mulu16_sel::return#16 sin16s::x5#0 sin16sb::x5_128#0 sin16s::x5_128#0 ] reg byte a [ mul16u::$1 ] -zp ZP_WORD:69 [ div32u16u::quotient_hi#0 ] +zp ZP_WORD:68 [ div32u16u::quotient_hi#0 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] -zp ZP_WORD:71 [ sin16s::x1#0 ] +zp ZP_WORD:70 [ sin16s::x1#0 ] FINAL ASSEMBLER -Score: 24941 +Score: 24932 //SEG0 File Comments // Generates a 16-bit signed sinus @@ -7784,7 +7780,7 @@ Score: 24941 // PI/2 in u[4.12] format .const PI_HALF_u4f12 = $1922 .label print_line_cursor = $400 - .label rem16u = $2a + .label rem16u = $29 .label print_char_cursor = $b //SEG3 @begin //SEG4 [1] phi from @begin to @1 [phi:@begin->@1] @@ -8095,8 +8091,8 @@ print_cls: { // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) // sin16s_genb(signed word* zeropage($13) sintab) sin16s_genb: { - .label _2 = $1a - .label step = $3f + .label _2 = $19 + .label step = $3e .label sintab = $13 .label x = $f .label i = $15 @@ -8190,20 +8186,19 @@ sin16s_genb: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16sb(word zeropage($18) x) +// sin16sb(word zeropage($17) x) sin16sb: { - .label x = $18 - .label return = $1a - .label x1 = $18 - .label x2 = $1c - .label x3 = $1c - .label x3_6 = $43 - .label usinx = $1a - .label x4 = $1c - .label x5 = $43 - .label x5_128 = $43 - .label sinx = $1a - .label isUpper = $17 + .label x = $17 + .label return = $19 + .label x1 = $17 + .label x2 = $1b + .label x3 = $1b + .label x3_6 = $42 + .label usinx = $19 + .label x4 = $1b + .label x5 = $42 + .label x5_128 = $42 + .label sinx = $19 //SEG161 [77] if((word) sin16sb::x#0<(const word) PI_u4f12#0) goto sin16sb::@1 -- vwuz1_lt_vwuc1_then_la1 lda x+1 cmp #>PI_u4f12 @@ -8223,16 +8218,14 @@ sin16sb: { sbc #>PI_u4f12 sta x+1 //SEG164 [79] phi from sin16sb::@4 to sin16sb::@1 [phi:sin16sb::@4->sin16sb::@1] - //SEG165 [79] phi (byte) sin16sb::isUpper#2 = (byte) 1 [phi:sin16sb::@4->sin16sb::@1#0] -- vbuz1=vbuc1 - lda #1 - sta isUpper + //SEG165 [79] phi (byte) sin16sb::isUpper#2 = (byte) 1 [phi:sin16sb::@4->sin16sb::@1#0] -- vbuyy=vbuc1 + ldy #1 //SEG166 [79] phi (word) sin16sb::x#4 = (word) sin16sb::x#1 [phi:sin16sb::@4->sin16sb::@1#1] -- register_copy jmp b1 //SEG167 [79] phi from sin16sb to sin16sb::@1 [phi:sin16sb->sin16sb::@1] b4: - //SEG168 [79] phi (byte) sin16sb::isUpper#2 = (byte) 0 [phi:sin16sb->sin16sb::@1#0] -- vbuz1=vbuc1 - lda #0 - sta isUpper + //SEG168 [79] phi (byte) sin16sb::isUpper#2 = (byte) 0 [phi:sin16sb->sin16sb::@1#0] -- vbuyy=vbuc1 + ldy #0 //SEG169 [79] phi (word) sin16sb::x#4 = (word) sin16sb::x#0 [phi:sin16sb->sin16sb::@1#1] -- register_copy //SEG170 sin16sb::@1 b1: @@ -8385,9 +8378,8 @@ sin16sb: { lda usinx+1 adc x5_128+1 sta usinx+1 - //SEG230 [111] if((byte) sin16sb::isUpper#2==(byte) 0) goto sin16sb::@12 -- vbuz1_eq_0_then_la1 - lda isUpper - cmp #0 + //SEG230 [111] if((byte) sin16sb::isUpper#2==(byte) 0) goto sin16sb::@12 -- vbuyy_eq_0_then_la1 + cpy #0 beq b3 //SEG231 sin16sb::@6 //SEG232 [112] (signed word) sin16sb::sinx#1 ← - (signed word)(word) sin16sb::usinx#1 -- vwsz1=_neg_vwsz1 @@ -8411,19 +8403,19 @@ sin16sb: { //SEG240 mulu16_sel // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. // The select parameter indicates how many of the highest bits of the 32-bit result to skip -// mulu16_sel(word zeropage($1c) v1, word zeropage($1e) v2, byte register(X) select) +// mulu16_sel(word zeropage($1b) v1, word zeropage($1d) v2, byte register(X) select) mulu16_sel: { - .label _0 = $22 - .label _1 = $22 - .label v1 = $1c - .label v2 = $1e - .label return = $1c - .label return_11 = $43 - .label return_14 = $43 - .label return_16 = $43 - .label return_17 = $43 - .label return_18 = $43 - .label return_20 = $43 + .label _0 = $21 + .label _1 = $21 + .label v1 = $1b + .label v2 = $1d + .label return = $1b + .label return_11 = $42 + .label return_14 = $42 + .label return_16 = $42 + .label return_17 = $42 + .label return_18 = $42 + .label return_20 = $42 //SEG241 [117] (word) mul16u::a#1 ← (word) mulu16_sel::v1#10 -- vwuz1=vwuz2 lda v1 sta mul16u.a @@ -8458,13 +8450,13 @@ mulu16_sel: { } //SEG252 mul16u // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word -// mul16u(word zeropage($20) a, word zeropage($1e) b) +// mul16u(word zeropage($1f) a, word zeropage($1d) b) mul16u: { - .label a = $20 - .label mb = $26 - .label res = $22 - .label b = $1e - .label return = $22 + .label a = $1f + .label mb = $25 + .label res = $21 + .label b = $1d + .label return = $21 //SEG253 [126] phi from mul16u to mul16u::@1 [phi:mul16u->mul16u::@1] //SEG254 [126] phi (dword) mul16u::mb#2 = (word) mul16u::b#0 [phi:mul16u->mul16u::@1#0] -- vduz1=vwuz2 lda b @@ -8535,9 +8527,9 @@ mul16u: { // Divide unsigned 32-bit dword dividend with a 16-bit word divisor // The 16-bit word remainder can be found in rem16u after the division div32u16u: { - .label quotient_hi = $45 - .label quotient_lo = $2e - .label return = $3f + .label quotient_hi = $44 + .label quotient_lo = $2d + .label return = $3e //SEG276 [136] call divr16u //SEG277 [145] phi from div32u16u to divr16u [phi:div32u16u->divr16u] //SEG278 [145] phi (word) divr16u::dividend#5 = >(const dword) PI2_u4f28#0 [phi:div32u16u->divr16u#0] -- vwuz1=vwuc1 @@ -8588,12 +8580,12 @@ div32u16u: { // Returns the quotient dividend/divisor. // The final remainder will be set into the global variable rem16u // Implemented using simple binary division -// divr16u(word zeropage($2c) dividend, word zeropage($2a) rem) +// divr16u(word zeropage($2b) dividend, word zeropage($29) rem) divr16u: { - .label rem = $2a - .label dividend = $2c - .label quotient = $2e - .label return = $2e + .label rem = $29 + .label dividend = $2b + .label quotient = $2d + .label return = $2d //SEG295 [146] phi from divr16u to divr16u::@1 [phi:divr16u->divr16u::@1] //SEG296 [146] phi (byte) divr16u::i#2 = (byte) 0 [phi:divr16u->divr16u::@1#0] -- vbuxx=vbuc1 ldx #0 @@ -8678,13 +8670,13 @@ divr16u: { // Generate signed (large) word sinus table - on the full -$7fff - $7fff range // sintab - the table to generate into // wavelength - the number of sinus points in a total sinus wavelength (the size of the table) -// sin16s_gen(signed word* zeropage($34) sintab) +// sin16s_gen(signed word* zeropage($33) sintab) sin16s_gen: { - .label _1 = $3d - .label step = $3f - .label sintab = $34 - .label x = $30 - .label i = $36 + .label _1 = $3c + .label step = $3e + .label sintab = $33 + .label x = $2f + .label i = $35 //SEG332 [164] call div32u16u //SEG333 [135] phi from sin16s_gen to div32u16u [phi:sin16s_gen->div32u16u] jsr div32u16u @@ -8779,21 +8771,21 @@ sin16s_gen: { // Calculate signed word sinus sin(x) // x: unsigned dword input u[4.28] in the interval $00000000 - PI2_u4f28 // result: signed word sin(x) s[0.15] - using the full range -$7fff - $7fff -// sin16s(dword zeropage($39) x) +// sin16s(dword zeropage($38) x) sin16s: { - .label _4 = $39 - .label x = $39 - .label return = $3d - .label x1 = $47 - .label x2 = $1c - .label x3 = $1c - .label x3_6 = $43 - .label usinx = $3d - .label x4 = $1c - .label x5 = $43 - .label x5_128 = $43 - .label sinx = $3d - .label isUpper = $38 + .label _4 = $38 + .label x = $38 + .label return = $3c + .label x1 = $46 + .label x2 = $1b + .label x3 = $1b + .label x3_6 = $42 + .label usinx = $3c + .label x4 = $1b + .label x5 = $42 + .label x5_128 = $42 + .label sinx = $3c + .label isUpper = $37 //SEG359 [178] if((dword) sin16s::x#0<(const dword) PI_u4f28#0) goto sin16s::@1 -- vduz1_lt_vduc1_then_la1 lda x+3 cmp #>PI_u4f28>>$10 diff --git a/src/test/ref/sinusgen16b.sym b/src/test/ref/sinusgen16b.sym index b3a4e9001..842abac74 100644 --- a/src/test/ref/sinusgen16b.sym +++ b/src/test/ref/sinusgen16b.sym @@ -20,13 +20,13 @@ (word) div32u16u::divisor (dword) div32u16u::quotient (word) div32u16u::quotient_hi -(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:69 0.8 +(word) div32u16u::quotient_hi#0 quotient_hi zp ZP_WORD:68 0.8 (word) div32u16u::quotient_lo -(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:46 4.0 +(word) div32u16u::quotient_lo#0 quotient_lo zp ZP_WORD:45 4.0 (dword) div32u16u::return -(dword) div32u16u::return#0 return zp ZP_DWORD:63 1.5 -(dword) div32u16u::return#2 return zp ZP_DWORD:63 4.0 -(dword) div32u16u::return#3 return zp ZP_DWORD:63 4.0 +(dword) div32u16u::return#0 return zp ZP_DWORD:62 1.5 +(dword) div32u16u::return#2 return zp ZP_DWORD:62 4.0 +(dword) div32u16u::return#3 return zp ZP_DWORD:62 4.0 (word()) divr16u((word) divr16u::dividend , (word) divr16u::divisor , (word) divr16u::rem) (byte~) divr16u::$1 reg byte a 22.0 (byte~) divr16u::$2 reg byte a 22.0 @@ -38,30 +38,30 @@ (label) divr16u::@6 (label) divr16u::@return (word) divr16u::dividend -(word) divr16u::dividend#0 dividend zp ZP_WORD:44 2.75 -(word) divr16u::dividend#3 dividend zp ZP_WORD:44 5.0 -(word) divr16u::dividend#5 dividend zp ZP_WORD:44 2.0 +(word) divr16u::dividend#0 dividend zp ZP_WORD:43 2.75 +(word) divr16u::dividend#3 dividend zp ZP_WORD:43 5.0 +(word) divr16u::dividend#5 dividend zp ZP_WORD:43 2.0 (word) divr16u::divisor (byte) divr16u::i (byte) divr16u::i#1 reg byte x 16.5 (byte) divr16u::i#2 reg byte x 1.6923076923076923 (word) divr16u::quotient -(word) divr16u::quotient#1 quotient zp ZP_WORD:46 16.5 -(word) divr16u::quotient#2 quotient zp ZP_WORD:46 11.0 -(word) divr16u::quotient#3 quotient zp ZP_WORD:46 2.75 +(word) divr16u::quotient#1 quotient zp ZP_WORD:45 16.5 +(word) divr16u::quotient#2 quotient zp ZP_WORD:45 11.0 +(word) divr16u::quotient#3 quotient zp ZP_WORD:45 2.75 (word) divr16u::rem -(word) divr16u::rem#0 rem zp ZP_WORD:42 8.25 -(word) divr16u::rem#1 rem zp ZP_WORD:42 22.0 -(word) divr16u::rem#10 rem zp ZP_WORD:42 4.0 -(word) divr16u::rem#11 rem zp ZP_WORD:42 11.666666666666666 -(word) divr16u::rem#2 rem zp ZP_WORD:42 22.0 -(word) divr16u::rem#4 rem zp ZP_WORD:42 4.0 -(word) divr16u::rem#5 rem zp ZP_WORD:42 24.0 -(word) divr16u::rem#6 rem zp ZP_WORD:42 11.0 +(word) divr16u::rem#0 rem zp ZP_WORD:41 8.25 +(word) divr16u::rem#1 rem zp ZP_WORD:41 22.0 +(word) divr16u::rem#10 rem zp ZP_WORD:41 4.0 +(word) divr16u::rem#11 rem zp ZP_WORD:41 11.666666666666666 +(word) divr16u::rem#2 rem zp ZP_WORD:41 22.0 +(word) divr16u::rem#4 rem zp ZP_WORD:41 4.0 +(word) divr16u::rem#5 rem zp ZP_WORD:41 24.0 +(word) divr16u::rem#6 rem zp ZP_WORD:41 11.0 (word) divr16u::return -(word) divr16u::return#0 return zp ZP_WORD:46 5.285714285714286 -(word) divr16u::return#2 return zp ZP_WORD:46 4.0 -(word) divr16u::return#3 return zp ZP_WORD:46 4.0 +(word) divr16u::return#0 return zp ZP_WORD:45 5.285714285714286 +(word) divr16u::return#2 return zp ZP_WORD:45 4.0 +(word) divr16u::return#3 return zp ZP_WORD:45 4.0 (void()) main() (label) main::@1 (label) main::@2 @@ -98,61 +98,61 @@ (label) mul16u::@4 (label) mul16u::@return (word) mul16u::a -(word) mul16u::a#0 a zp ZP_WORD:32 101.0 -(word) mul16u::a#1 a zp ZP_WORD:32 1.3333333333333333 -(word) mul16u::a#2 a zp ZP_WORD:32 67.66666666666666 +(word) mul16u::a#0 a zp ZP_WORD:31 101.0 +(word) mul16u::a#1 a zp ZP_WORD:31 1.3333333333333333 +(word) mul16u::a#2 a zp ZP_WORD:31 67.66666666666666 (word) mul16u::b -(word) mul16u::b#0 b zp ZP_WORD:30 2.0 +(word) mul16u::b#0 b zp ZP_WORD:29 2.0 (dword) mul16u::mb -(dword) mul16u::mb#1 mb zp ZP_DWORD:38 202.0 -(dword) mul16u::mb#2 mb zp ZP_DWORD:38 43.57142857142858 +(dword) mul16u::mb#1 mb zp ZP_DWORD:37 202.0 +(dword) mul16u::mb#2 mb zp ZP_DWORD:37 43.57142857142858 (dword) mul16u::res -(dword) mul16u::res#1 res zp ZP_DWORD:34 202.0 -(dword) mul16u::res#2 res zp ZP_DWORD:34 50.83333333333333 -(dword) mul16u::res#6 res zp ZP_DWORD:34 101.0 +(dword) mul16u::res#1 res zp ZP_DWORD:33 202.0 +(dword) mul16u::res#2 res zp ZP_DWORD:33 50.83333333333333 +(dword) mul16u::res#6 res zp ZP_DWORD:33 101.0 (dword) mul16u::return -(dword) mul16u::return#2 return zp ZP_DWORD:34 4.0 +(dword) mul16u::return#2 return zp ZP_DWORD:33 4.0 (word()) mulu16_sel((word) mulu16_sel::v1 , (word) mulu16_sel::v2 , (byte) mulu16_sel::select) -(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:34 4.0 -(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:34 4.0 +(dword~) mulu16_sel::$0 $0 zp ZP_DWORD:33 4.0 +(dword~) mulu16_sel::$1 $1 zp ZP_DWORD:33 4.0 (label) mulu16_sel::@1 (label) mulu16_sel::@return (word) mulu16_sel::return -(word) mulu16_sel::return#0 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#1 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#10 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#11 return#11 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#14 return#14 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#15 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#16 return#16 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#17 return#17 zp ZP_WORD:67 1.8333333333333335 -(word) mulu16_sel::return#18 return#18 zp ZP_WORD:67 4.0 -(word) mulu16_sel::return#19 return zp ZP_WORD:28 4.0 -(word) mulu16_sel::return#20 return#20 zp ZP_WORD:67 4.0 +(word) mulu16_sel::return#0 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#1 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#10 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#11 return#11 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#14 return#14 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#15 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#16 return#16 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#17 return#17 zp ZP_WORD:66 1.8333333333333335 +(word) mulu16_sel::return#18 return#18 zp ZP_WORD:66 4.0 +(word) mulu16_sel::return#19 return zp ZP_WORD:27 4.0 +(word) mulu16_sel::return#20 return#20 zp ZP_WORD:66 4.0 (byte) mulu16_sel::select (byte) mulu16_sel::select#10 reg byte x 0.3333333333333333 (word) mulu16_sel::v1 -(word) mulu16_sel::v1#0 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#1 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#10 v1 zp ZP_WORD:28 22.0 -(word) mulu16_sel::v1#2 v1 zp ZP_WORD:28 4.0 -(word) mulu16_sel::v1#3 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#4 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#5 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#6 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#7 v1 zp ZP_WORD:28 4.0 -(word) mulu16_sel::v1#8 v1 zp ZP_WORD:28 2.0 -(word) mulu16_sel::v1#9 v1 zp ZP_WORD:28 2.0 +(word) mulu16_sel::v1#0 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#1 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#10 v1 zp ZP_WORD:27 22.0 +(word) mulu16_sel::v1#2 v1 zp ZP_WORD:27 4.0 +(word) mulu16_sel::v1#3 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#4 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#5 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#6 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#7 v1 zp ZP_WORD:27 4.0 +(word) mulu16_sel::v1#8 v1 zp ZP_WORD:27 2.0 +(word) mulu16_sel::v1#9 v1 zp ZP_WORD:27 2.0 (word) mulu16_sel::v2 -(word) mulu16_sel::v2#0 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#1 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#10 v2 zp ZP_WORD:30 9.0 -(word) mulu16_sel::v2#3 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#4 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#5 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#6 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#8 v2 zp ZP_WORD:30 4.0 -(word) mulu16_sel::v2#9 v2 zp ZP_WORD:30 4.0 +(word) mulu16_sel::v2#0 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#1 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#10 v2 zp ZP_WORD:29 9.0 +(word) mulu16_sel::v2#3 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#4 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#5 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#6 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#8 v2 zp ZP_WORD:29 4.0 +(word) mulu16_sel::v2#9 v2 zp ZP_WORD:29 4.0 (void()) print_byte((byte) print_byte::b) (byte~) print_byte::$0 reg byte a 4.0 (byte~) print_byte::$2 reg byte a 4.0 @@ -211,9 +211,9 @@ (label) print_word::@return (word) print_word::w (word) rem16u -(word) rem16u#1 rem16u zp ZP_WORD:42 0.8 +(word) rem16u#1 rem16u zp ZP_WORD:41 0.8 (signed word()) sin16s((dword) sin16s::x) -(dword~) sin16s::$4 $4 zp ZP_DWORD:57 4.0 +(dword~) sin16s::$4 $4 zp ZP_DWORD:56 4.0 (label) sin16s::@1 (label) sin16s::@10 (label) sin16s::@11 @@ -228,56 +228,56 @@ (label) sin16s::@9 (label) sin16s::@return (byte) sin16s::isUpper -(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:56 0.06060606060606061 +(byte) sin16s::isUpper#2 isUpper zp ZP_BYTE:55 0.06060606060606061 (signed word) sin16s::return -(signed word) sin16s::return#0 return zp ZP_WORD:61 22.0 -(signed word) sin16s::return#1 return zp ZP_WORD:61 5.0 -(signed word~) sin16s::return#5 return zp ZP_WORD:61 4.0 +(signed word) sin16s::return#0 return zp ZP_WORD:60 22.0 +(signed word) sin16s::return#1 return zp ZP_WORD:60 5.0 +(signed word~) sin16s::return#5 return zp ZP_WORD:60 4.0 (signed word) sin16s::sinx -(signed word) sin16s::sinx#1 sinx zp ZP_WORD:61 4.0 +(signed word) sin16s::sinx#1 sinx zp ZP_WORD:60 4.0 (word) sin16s::usinx -(word) sin16s::usinx#0 usinx zp ZP_WORD:61 0.3333333333333333 -(word) sin16s::usinx#1 usinx zp ZP_WORD:61 1.0 +(word) sin16s::usinx#0 usinx zp ZP_WORD:60 0.3333333333333333 +(word) sin16s::usinx#1 usinx zp ZP_WORD:60 1.0 (dword) sin16s::x -(dword) sin16s::x#0 x zp ZP_DWORD:57 8.5 -(dword) sin16s::x#1 x zp ZP_DWORD:57 4.0 -(dword) sin16s::x#2 x zp ZP_DWORD:57 4.0 -(dword) sin16s::x#4 x zp ZP_DWORD:57 5.0 -(dword) sin16s::x#6 x zp ZP_DWORD:57 6.0 +(dword) sin16s::x#0 x zp ZP_DWORD:56 8.5 +(dword) sin16s::x#1 x zp ZP_DWORD:56 4.0 +(dword) sin16s::x#2 x zp ZP_DWORD:56 4.0 +(dword) sin16s::x#4 x zp ZP_DWORD:56 5.0 +(dword) sin16s::x#6 x zp ZP_DWORD:56 6.0 (word) sin16s::x1 -(word) sin16s::x1#0 x1 zp ZP_WORD:71 0.6363636363636365 +(word) sin16s::x1#0 x1 zp ZP_WORD:70 0.6363636363636365 (word) sin16s::x2 -(word) sin16s::x2#0 x2 zp ZP_WORD:28 4.0 +(word) sin16s::x2#0 x2 zp ZP_WORD:27 4.0 (word) sin16s::x3 -(word) sin16s::x3#0 x3 zp ZP_WORD:28 1.0 +(word) sin16s::x3#0 x3 zp ZP_WORD:27 1.0 (word) sin16s::x3_6 -(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:67 4.0 +(word) sin16s::x3_6#0 x3_6 zp ZP_WORD:66 4.0 (word) sin16s::x4 -(word) sin16s::x4#0 x4 zp ZP_WORD:28 4.0 +(word) sin16s::x4#0 x4 zp ZP_WORD:27 4.0 (word) sin16s::x5 -(word) sin16s::x5#0 x5 zp ZP_WORD:67 4.0 +(word) sin16s::x5#0 x5 zp ZP_WORD:66 4.0 (word) sin16s::x5_128 -(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:67 4.0 +(word) sin16s::x5_128#0 x5_128 zp ZP_WORD:66 4.0 (void()) sin16s_gen((signed word*) sin16s_gen::sintab , (word) sin16s_gen::wavelength) -(signed word~) sin16s_gen::$1 $1 zp ZP_WORD:61 22.0 +(signed word~) sin16s_gen::$1 $1 zp ZP_WORD:60 22.0 (label) sin16s_gen::@1 (label) sin16s_gen::@2 (label) sin16s_gen::@3 (label) sin16s_gen::@return (word) sin16s_gen::i -(word) sin16s_gen::i#1 i zp ZP_WORD:54 16.5 -(word) sin16s_gen::i#2 i zp ZP_WORD:54 2.75 +(word) sin16s_gen::i#1 i zp ZP_WORD:53 16.5 +(word) sin16s_gen::i#2 i zp ZP_WORD:53 2.75 (signed word*) sin16s_gen::sintab -(signed word*) sin16s_gen::sintab#0 sintab zp ZP_WORD:52 5.5 -(signed word*) sin16s_gen::sintab#2 sintab zp ZP_WORD:52 5.5 +(signed word*) sin16s_gen::sintab#0 sintab zp ZP_WORD:51 5.5 +(signed word*) sin16s_gen::sintab#2 sintab zp ZP_WORD:51 5.5 (dword) sin16s_gen::step -(dword) sin16s_gen::step#0 step zp ZP_DWORD:63 1.1818181818181819 +(dword) sin16s_gen::step#0 step zp ZP_DWORD:62 1.1818181818181819 (word) sin16s_gen::wavelength (dword) sin16s_gen::x -(dword) sin16s_gen::x#1 x zp ZP_DWORD:48 7.333333333333333 -(dword) sin16s_gen::x#2 x zp ZP_DWORD:48 4.714285714285714 +(dword) sin16s_gen::x#1 x zp ZP_DWORD:47 7.333333333333333 +(dword) sin16s_gen::x#2 x zp ZP_DWORD:47 4.714285714285714 (void()) sin16s_genb((signed word*) sin16s_genb::sintab , (word) sin16s_genb::wavelength) -(signed word~) sin16s_genb::$2 $2 zp ZP_WORD:26 22.0 +(signed word~) sin16s_genb::$2 $2 zp ZP_WORD:25 22.0 (label) sin16s_genb::@1 (label) sin16s_genb::@2 (label) sin16s_genb::@3 @@ -289,7 +289,7 @@ (signed word*) sin16s_genb::sintab#0 sintab zp ZP_WORD:19 5.5 (signed word*) sin16s_genb::sintab#2 sintab zp ZP_WORD:19 5.5 (dword) sin16s_genb::step -(dword) sin16s_genb::step#0 step zp ZP_DWORD:63 1.1818181818181819 +(dword) sin16s_genb::step#0 step zp ZP_DWORD:62 1.1818181818181819 (word) sin16s_genb::wavelength (dword) sin16s_genb::x (dword) sin16s_genb::x#1 x zp ZP_DWORD:15 7.333333333333333 @@ -309,36 +309,36 @@ (label) sin16sb::@9 (label) sin16sb::@return (byte) sin16sb::isUpper -(byte) sin16sb::isUpper#2 isUpper zp ZP_BYTE:23 0.0625 +(byte) sin16sb::isUpper#2 reg byte y 0.0625 (signed word) sin16sb::return -(signed word) sin16sb::return#0 return zp ZP_WORD:26 22.0 -(signed word) sin16sb::return#1 return zp ZP_WORD:26 5.0 -(signed word~) sin16sb::return#5 return zp ZP_WORD:26 4.0 +(signed word) sin16sb::return#0 return zp ZP_WORD:25 22.0 +(signed word) sin16sb::return#1 return zp ZP_WORD:25 5.0 +(signed word~) sin16sb::return#5 return zp ZP_WORD:25 4.0 (signed word) sin16sb::sinx -(signed word) sin16sb::sinx#1 sinx zp ZP_WORD:26 4.0 +(signed word) sin16sb::sinx#1 sinx zp ZP_WORD:25 4.0 (word) sin16sb::usinx -(word) sin16sb::usinx#0 usinx zp ZP_WORD:26 0.3333333333333333 -(word) sin16sb::usinx#1 usinx zp ZP_WORD:26 1.0 +(word) sin16sb::usinx#0 usinx zp ZP_WORD:25 0.3333333333333333 +(word) sin16sb::usinx#1 usinx zp ZP_WORD:25 1.0 (word) sin16sb::x -(word) sin16sb::x#0 x zp ZP_WORD:24 8.5 -(word) sin16sb::x#1 x zp ZP_WORD:24 4.0 -(word) sin16sb::x#2 x zp ZP_WORD:24 4.0 -(word) sin16sb::x#4 x zp ZP_WORD:24 5.0 -(word) sin16sb::x#6 x zp ZP_WORD:24 6.0 +(word) sin16sb::x#0 x zp ZP_WORD:23 8.5 +(word) sin16sb::x#1 x zp ZP_WORD:23 4.0 +(word) sin16sb::x#2 x zp ZP_WORD:23 4.0 +(word) sin16sb::x#4 x zp ZP_WORD:23 5.0 +(word) sin16sb::x#6 x zp ZP_WORD:23 6.0 (word) sin16sb::x1 -(word) sin16sb::x1#0 x1 zp ZP_WORD:24 0.6363636363636365 +(word) sin16sb::x1#0 x1 zp ZP_WORD:23 0.6363636363636365 (word) sin16sb::x2 -(word) sin16sb::x2#0 x2 zp ZP_WORD:28 4.0 +(word) sin16sb::x2#0 x2 zp ZP_WORD:27 4.0 (word) sin16sb::x3 -(word) sin16sb::x3#0 x3 zp ZP_WORD:28 1.0 +(word) sin16sb::x3#0 x3 zp ZP_WORD:27 1.0 (word) sin16sb::x3_6 -(word) sin16sb::x3_6#0 x3_6 zp ZP_WORD:67 4.0 +(word) sin16sb::x3_6#0 x3_6 zp ZP_WORD:66 4.0 (word) sin16sb::x4 -(word) sin16sb::x4#0 x4 zp ZP_WORD:28 4.0 +(word) sin16sb::x4#0 x4 zp ZP_WORD:27 4.0 (word) sin16sb::x5 -(word) sin16sb::x5#0 x5 zp ZP_WORD:67 4.0 +(word) sin16sb::x5#0 x5 zp ZP_WORD:66 4.0 (word) sin16sb::x5_128 -(word) sin16sb::x5_128#0 x5_128 zp ZP_WORD:67 4.0 +(word) sin16sb::x5_128#0 x5_128 zp ZP_WORD:66 4.0 zp ZP_WORD:2 [ main::st1#2 main::st1#1 ] zp ZP_WORD:4 [ main::st2#2 main::st2#1 ] @@ -352,31 +352,31 @@ zp ZP_WORD:13 [ print_cls::sc#2 print_cls::sc#1 ] zp ZP_DWORD:15 [ sin16s_genb::x#2 sin16s_genb::x#1 ] zp ZP_WORD:19 [ sin16s_genb::sintab#2 sin16s_genb::sintab#0 ] zp ZP_WORD:21 [ sin16s_genb::i#2 sin16s_genb::i#1 ] -zp ZP_BYTE:23 [ sin16sb::isUpper#2 ] -zp ZP_WORD:24 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 sin16sb::x1#0 ] -zp ZP_WORD:26 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 sin16sb::usinx#1 sin16sb::return#0 sin16s_genb::$2 sin16sb::usinx#0 ] -zp ZP_WORD:28 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 sin16s::x3#0 sin16sb::x2#0 sin16sb::x4#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#19 mulu16_sel::return#10 mulu16_sel::return#0 mulu16_sel::return#1 mulu16_sel::return#15 ] -zp ZP_WORD:30 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 mul16u::b#0 ] +reg byte y [ sin16sb::isUpper#2 ] +zp ZP_WORD:23 [ sin16sb::x#6 sin16sb::x#4 sin16sb::x#0 sin16sb::x#1 sin16sb::x#2 sin16sb::x1#0 ] +zp ZP_WORD:25 [ sin16sb::return#1 sin16sb::return#5 sin16sb::sinx#1 sin16sb::usinx#1 sin16sb::return#0 sin16s_genb::$2 sin16sb::usinx#0 ] +zp ZP_WORD:27 [ mulu16_sel::v1#10 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 mulu16_sel::v1#8 mulu16_sel::v1#9 mulu16_sel::v1#5 mulu16_sel::v1#6 mulu16_sel::v1#7 sin16sb::x3#0 sin16s::x3#0 sin16sb::x2#0 sin16sb::x4#0 sin16s::x2#0 sin16s::x4#0 mulu16_sel::return#19 mulu16_sel::return#10 mulu16_sel::return#0 mulu16_sel::return#1 mulu16_sel::return#15 ] +zp ZP_WORD:29 [ mulu16_sel::v2#10 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 mulu16_sel::v2#8 mulu16_sel::v2#9 mulu16_sel::v2#5 mulu16_sel::v2#6 mul16u::b#0 ] reg byte x [ mulu16_sel::select#10 ] -zp ZP_WORD:32 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] -zp ZP_DWORD:34 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 mulu16_sel::$0 mulu16_sel::$1 ] -zp ZP_DWORD:38 [ mul16u::mb#2 mul16u::mb#1 ] -zp ZP_WORD:42 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] -zp ZP_WORD:44 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] -zp ZP_WORD:46 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] +zp ZP_WORD:31 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] +zp ZP_DWORD:33 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#2 mulu16_sel::$0 mulu16_sel::$1 ] +zp ZP_DWORD:37 [ mul16u::mb#2 mul16u::mb#1 ] +zp ZP_WORD:41 [ divr16u::rem#5 divr16u::rem#10 divr16u::rem#4 divr16u::rem#11 divr16u::rem#6 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 rem16u#1 ] +zp ZP_WORD:43 [ divr16u::dividend#3 divr16u::dividend#5 divr16u::dividend#0 ] +zp ZP_WORD:45 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 divr16u::return#2 divr16u::return#3 div32u16u::quotient_lo#0 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] -zp ZP_DWORD:48 [ sin16s_gen::x#2 sin16s_gen::x#1 ] -zp ZP_WORD:52 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] -zp ZP_WORD:54 [ sin16s_gen::i#2 sin16s_gen::i#1 ] -zp ZP_BYTE:56 [ sin16s::isUpper#2 ] -zp ZP_DWORD:57 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] -zp ZP_WORD:61 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s_gen::$1 sin16s::usinx#0 ] +zp ZP_DWORD:47 [ sin16s_gen::x#2 sin16s_gen::x#1 ] +zp ZP_WORD:51 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] +zp ZP_WORD:53 [ sin16s_gen::i#2 sin16s_gen::i#1 ] +zp ZP_BYTE:55 [ sin16s::isUpper#2 ] +zp ZP_DWORD:56 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 sin16s::$4 ] +zp ZP_WORD:60 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 sin16s::usinx#1 sin16s::return#0 sin16s_gen::$1 sin16s::usinx#0 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -zp ZP_DWORD:63 [ div32u16u::return#3 sin16s_genb::step#0 div32u16u::return#0 div32u16u::return#2 sin16s_gen::step#0 ] -zp ZP_WORD:67 [ mulu16_sel::return#18 mulu16_sel::return#17 mulu16_sel::return#20 sin16sb::x3_6#0 mulu16_sel::return#11 sin16sb::x5#0 mulu16_sel::return#14 sin16s::x3_6#0 mulu16_sel::return#16 sin16s::x5#0 sin16sb::x5_128#0 sin16s::x5_128#0 ] +zp ZP_DWORD:62 [ div32u16u::return#3 sin16s_genb::step#0 div32u16u::return#0 div32u16u::return#2 sin16s_gen::step#0 ] +zp ZP_WORD:66 [ mulu16_sel::return#18 mulu16_sel::return#17 mulu16_sel::return#20 sin16sb::x3_6#0 mulu16_sel::return#11 sin16sb::x5#0 mulu16_sel::return#14 sin16s::x3_6#0 mulu16_sel::return#16 sin16s::x5#0 sin16sb::x5_128#0 sin16s::x5_128#0 ] reg byte a [ mul16u::$1 ] -zp ZP_WORD:69 [ div32u16u::quotient_hi#0 ] +zp ZP_WORD:68 [ div32u16u::quotient_hi#0 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] -zp ZP_WORD:71 [ sin16s::x1#0 ] +zp ZP_WORD:70 [ sin16s::x1#0 ] diff --git a/src/test/ref/sinusgen8b.log b/src/test/ref/sinusgen8b.log index d9b44b062..1863b243e 100644 --- a/src/test/ref/sinusgen8b.log +++ b/src/test/ref/sinusgen8b.log @@ -4560,15 +4560,17 @@ sin16s: { sta x5+1 //SEG211 [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 -- vwuz1=vwuz2_ror_4 lda x5+1 + lsr sta x5_128+1 lda x5 + ror sta x5_128 - ldy #4 - !: lsr x5_128+1 ror x5_128 - dey - bne !- + lsr x5_128+1 + ror x5_128 + lsr x5_128+1 + ror x5_128 //SEG212 [107] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 -- vwuz1=vwuz2_plus_vwuz3 lda usinx clc @@ -5621,7 +5623,7 @@ Statement [101] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUppe Statement [102] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a Statement [104] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [105] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [107] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [109] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [112] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -5725,7 +5727,7 @@ Statement [101] (word) mulu16_sel::v1#4 ← (word) sin16s::x4#0 [ sin16s::isUppe Statement [102] (word) mulu16_sel::v2#4 ← (word) sin16s::x1#0 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::v1#4 mulu16_sel::v2#4 ] ) always clobbers reg byte a Statement [104] (word) mulu16_sel::return#11 ← (word) mulu16_sel::return#12 [ sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 mulu16_sel::return#11 ] ) always clobbers reg byte a Statement [105] (word) sin16s::x5#0 ← (word) mulu16_sel::return#11 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5#0 ] ) always clobbers reg byte a -Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a reg byte y +Statement [106] (word) sin16s::x5_128#0 ← (word) sin16s::x5#0 >> (byte) 4 [ sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#0 sin16s::x5_128#0 ] ) always clobbers reg byte a Statement [107] (word) sin16s::usinx#1 ← (word) sin16s::usinx#0 + (word) sin16s::x5_128#0 [ sin16s::isUpper#2 sin16s::usinx#1 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::isUpper#2 sin16s::usinx#1 ] ) always clobbers reg byte a Statement [109] (signed word) sin16s::sinx#1 ← - (signed word)(word) sin16s::usinx#1 [ sin16s::sinx#1 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::sinx#1 ] ) always clobbers reg byte a Statement [112] (signed word~) sin16s::return#5 ← (signed word)(word) sin16s::usinx#1 [ sin16s::return#5 ] ( main:2::sin16s_gen:7::sin16s:64 [ sin16s_gen::step#0 sin16s_gen::x#2 sin16s_gen::sintab#2 sin16s_gen::i#2 sin16s::return#5 ] ) always clobbers reg byte a @@ -5897,60 +5899,60 @@ Uplift Scope [print_byte] 4: zp ZP_BYTE:81 [ print_byte::$0 ] 4: zp ZP_BYTE:82 [ Uplift Scope [print_sbyte] 7.83: zp ZP_BYTE:5 [ print_sbyte::b#4 print_sbyte::b#0 print_sbyte::b#1 ] Uplift Scope [div16u] 4: zp ZP_WORD:158 [ div16u::return#2 ] 1.33: zp ZP_WORD:189 [ div16u::return#0 ] -Uplifting [mul8u] best 38972 combination zp ZP_WORD:65 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:67 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:179 [ mul8u::return#2 ] reg byte a [ mul8u::b#0 ] -Uplifting [mul16u] best 38372 combination zp ZP_DWORD:33 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:37 [ mul16u::mb#2 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:31 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] zp ZP_DWORD:127 [ mul16u::return#2 ] zp ZP_WORD:41 [ mul16u::b#0 ] -Uplifting [print_str] best 38372 combination zp ZP_WORD:3 [ print_str::str#2 print_str::str#0 ] -Uplifting [divr16u] best 38162 combination zp ZP_WORD:43 [ divr16u::rem#6 divr16u::rem#11 divr16u::rem#5 divr16u::rem#10 divr16u::rem#7 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:45 [ divr16u::dividend#4 divr16u::dividend#6 divr16u::dividend#0 ] zp ZP_WORD:142 [ divr16u::return#3 ] zp ZP_WORD:146 [ divr16u::return#4 ] zp ZP_WORD:187 [ divr16u::return#2 ] -Uplifting [] best 38162 combination zp ZP_WORD:7 [ print_char_cursor#28 print_char_cursor#42 print_char_cursor#19 print_char_cursor#10 print_char_cursor#1 ] zp ZP_WORD:156 [ rem16u#1 ] -Uplifting [main] best 37932 combination zp ZP_WORD:71 [ main::$3 ] zp ZP_WORD:73 [ main::$11 ] zp ZP_WORD:75 [ main::$4 ] zp ZP_WORD:77 [ main::sw#0 ] reg byte a [ main::sd#0 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$5 ] zp ZP_BYTE:70 [ main::sb#0 ] -Uplifting [sin8s] best 37827 combination zp ZP_WORD:57 [ sin8s::x#6 sin8s::x#4 sin8s::x#0 sin8s::x#1 sin8s::x#2 ] reg byte a [ sin8s::return#0 ] reg byte a [ sin8s::return#1 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:164 [ sin8s::$4 ] zp ZP_BYTE:168 [ sin8s::x2#0 ] zp ZP_BYTE:172 [ sin8s::x3_6#0 ] zp ZP_BYTE:175 [ sin8s::x4#0 ] zp ZP_BYTE:177 [ sin8s::x5#0 ] zp ZP_BYTE:178 [ sin8s::x5_128#0 ] zp ZP_BYTE:170 [ sin8s::x3#0 ] zp ZP_BYTE:166 [ sin8s::x1#0 ] zp ZP_BYTE:173 [ sin8s::usinx#0 ] zp ZP_BYTE:56 [ sin8s::isUpper#10 ] +Uplifting [mul8u] best 38990 combination zp ZP_WORD:65 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:67 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:179 [ mul8u::return#2 ] reg byte a [ mul8u::b#0 ] +Uplifting [mul16u] best 38390 combination zp ZP_DWORD:33 [ mul16u::res#2 mul16u::res#6 mul16u::res#1 ] zp ZP_DWORD:37 [ mul16u::mb#2 mul16u::mb#1 ] reg byte a [ mul16u::$1 ] zp ZP_WORD:31 [ mul16u::a#2 mul16u::a#1 mul16u::a#0 ] zp ZP_DWORD:127 [ mul16u::return#2 ] zp ZP_WORD:41 [ mul16u::b#0 ] +Uplifting [print_str] best 38390 combination zp ZP_WORD:3 [ print_str::str#2 print_str::str#0 ] +Uplifting [divr16u] best 38180 combination zp ZP_WORD:43 [ divr16u::rem#6 divr16u::rem#11 divr16u::rem#5 divr16u::rem#10 divr16u::rem#7 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:45 [ divr16u::dividend#4 divr16u::dividend#6 divr16u::dividend#0 ] zp ZP_WORD:142 [ divr16u::return#3 ] zp ZP_WORD:146 [ divr16u::return#4 ] zp ZP_WORD:187 [ divr16u::return#2 ] +Uplifting [] best 38180 combination zp ZP_WORD:7 [ print_char_cursor#28 print_char_cursor#42 print_char_cursor#19 print_char_cursor#10 print_char_cursor#1 ] zp ZP_WORD:156 [ rem16u#1 ] +Uplifting [main] best 37950 combination zp ZP_WORD:71 [ main::$3 ] zp ZP_WORD:73 [ main::$11 ] zp ZP_WORD:75 [ main::$4 ] zp ZP_WORD:77 [ main::sw#0 ] reg byte a [ main::sd#0 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$5 ] zp ZP_BYTE:70 [ main::sb#0 ] +Uplifting [sin8s] best 37845 combination zp ZP_WORD:57 [ sin8s::x#6 sin8s::x#4 sin8s::x#0 sin8s::x#1 sin8s::x#2 ] reg byte a [ sin8s::return#0 ] reg byte a [ sin8s::return#1 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:164 [ sin8s::$4 ] zp ZP_BYTE:168 [ sin8s::x2#0 ] zp ZP_BYTE:172 [ sin8s::x3_6#0 ] zp ZP_BYTE:175 [ sin8s::x4#0 ] zp ZP_BYTE:177 [ sin8s::x5#0 ] zp ZP_BYTE:178 [ sin8s::x5_128#0 ] zp ZP_BYTE:170 [ sin8s::x3#0 ] zp ZP_BYTE:166 [ sin8s::x1#0 ] zp ZP_BYTE:173 [ sin8s::usinx#0 ] zp ZP_BYTE:56 [ sin8s::isUpper#10 ] Limited combination testing to 100 combinations of 5308416 possible. -Uplifting [sin16s] best 37827 combination zp ZP_DWORD:20 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:91 [ sin16s::return#0 ] zp ZP_WORD:24 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:95 [ sin16s::$4 ] zp ZP_WORD:103 [ sin16s::x2#0 ] zp ZP_WORD:111 [ sin16s::x3_6#0 ] zp ZP_WORD:117 [ sin16s::x4#0 ] zp ZP_WORD:121 [ sin16s::x5#0 ] zp ZP_WORD:123 [ sin16s::x5_128#0 ] zp ZP_WORD:107 [ sin16s::x3#0 ] zp ZP_WORD:125 [ sin16s::usinx#1 ] zp ZP_WORD:99 [ sin16s::x1#0 ] zp ZP_WORD:113 [ sin16s::usinx#0 ] zp ZP_BYTE:19 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 37811 combination zp ZP_WORD:26 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:28 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:101 [ mulu16_sel::return#0 ] zp ZP_WORD:105 [ mulu16_sel::return#1 ] zp ZP_WORD:109 [ mulu16_sel::return#2 ] zp ZP_WORD:115 [ mulu16_sel::return#10 ] zp ZP_WORD:119 [ mulu16_sel::return#11 ] zp ZP_DWORD:131 [ mulu16_sel::$0 ] zp ZP_DWORD:135 [ mulu16_sel::$1 ] zp ZP_WORD:139 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [mulu8_sel] best 37765 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] zp ZP_BYTE:171 [ mulu8_sel::return#2 ] zp ZP_BYTE:174 [ mulu8_sel::return#10 ] zp ZP_BYTE:176 [ mulu8_sel::return#11 ] zp ZP_WORD:181 [ mulu8_sel::$0 ] zp ZP_WORD:183 [ mulu8_sel::$1 ] zp ZP_BYTE:185 [ mulu8_sel::return#12 ] zp ZP_BYTE:63 [ mulu8_sel::select#5 ] +Uplifting [sin16s] best 37845 combination zp ZP_DWORD:20 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:91 [ sin16s::return#0 ] zp ZP_WORD:24 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:95 [ sin16s::$4 ] zp ZP_WORD:103 [ sin16s::x2#0 ] zp ZP_WORD:111 [ sin16s::x3_6#0 ] zp ZP_WORD:117 [ sin16s::x4#0 ] zp ZP_WORD:121 [ sin16s::x5#0 ] zp ZP_WORD:123 [ sin16s::x5_128#0 ] zp ZP_WORD:107 [ sin16s::x3#0 ] zp ZP_WORD:125 [ sin16s::usinx#1 ] zp ZP_WORD:99 [ sin16s::x1#0 ] zp ZP_WORD:113 [ sin16s::usinx#0 ] zp ZP_BYTE:19 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 37829 combination zp ZP_WORD:26 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:28 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:101 [ mulu16_sel::return#0 ] zp ZP_WORD:105 [ mulu16_sel::return#1 ] zp ZP_WORD:109 [ mulu16_sel::return#2 ] zp ZP_WORD:115 [ mulu16_sel::return#10 ] zp ZP_WORD:119 [ mulu16_sel::return#11 ] zp ZP_DWORD:131 [ mulu16_sel::$0 ] zp ZP_DWORD:135 [ mulu16_sel::$1 ] zp ZP_WORD:139 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [mulu8_sel] best 37783 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] zp ZP_BYTE:171 [ mulu8_sel::return#2 ] zp ZP_BYTE:174 [ mulu8_sel::return#10 ] zp ZP_BYTE:176 [ mulu8_sel::return#11 ] zp ZP_WORD:181 [ mulu8_sel::$0 ] zp ZP_WORD:183 [ mulu8_sel::$1 ] zp ZP_BYTE:185 [ mulu8_sel::return#12 ] zp ZP_BYTE:63 [ mulu8_sel::select#5 ] Limited combination testing to 100 combinations of 196608 possible. -Uplifting [sin16s_gen] best 37765 combination zp ZP_WORD:93 [ sin16s_gen::$1 ] zp ZP_WORD:17 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:11 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:15 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:87 [ sin16s_gen::step#0 ] -Uplifting [sin8s_gen] best 37705 combination reg byte a [ sin8s_gen::$1 ] zp ZP_WORD:54 [ sin8s_gen::i#2 sin8s_gen::i#1 ] zp ZP_WORD:50 [ sin8s_gen::x#2 sin8s_gen::x#1 ] zp ZP_WORD:52 [ sin8s_gen::sintab#2 sin8s_gen::sintab#0 ] zp ZP_WORD:160 [ sin8s_gen::step#0 ] -Uplifting [print_cls] best 37705 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [print_char] best 37690 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -Uplifting [div32u16u] best 37690 combination zp ZP_DWORD:83 [ div32u16u::return#2 ] zp ZP_WORD:148 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:150 [ div32u16u::return#0 ] zp ZP_WORD:144 [ div32u16u::quotient_hi#0 ] -Uplifting [print_byte] best 37682 combination reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [print_sbyte] best 37682 combination zp ZP_BYTE:5 [ print_sbyte::b#4 print_sbyte::b#0 print_sbyte::b#1 ] -Uplifting [div16u] best 37682 combination zp ZP_WORD:158 [ div16u::return#2 ] zp ZP_WORD:189 [ div16u::return#0 ] +Uplifting [sin16s_gen] best 37783 combination zp ZP_WORD:93 [ sin16s_gen::$1 ] zp ZP_WORD:17 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:11 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:15 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:87 [ sin16s_gen::step#0 ] +Uplifting [sin8s_gen] best 37723 combination reg byte a [ sin8s_gen::$1 ] zp ZP_WORD:54 [ sin8s_gen::i#2 sin8s_gen::i#1 ] zp ZP_WORD:50 [ sin8s_gen::x#2 sin8s_gen::x#1 ] zp ZP_WORD:52 [ sin8s_gen::sintab#2 sin8s_gen::sintab#0 ] zp ZP_WORD:160 [ sin8s_gen::step#0 ] +Uplifting [print_cls] best 37723 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_char] best 37708 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] +Uplifting [div32u16u] best 37708 combination zp ZP_DWORD:83 [ div32u16u::return#2 ] zp ZP_WORD:148 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:150 [ div32u16u::return#0 ] zp ZP_WORD:144 [ div32u16u::quotient_hi#0 ] +Uplifting [print_byte] best 37700 combination reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [print_sbyte] best 37700 combination zp ZP_BYTE:5 [ print_sbyte::b#4 print_sbyte::b#0 print_sbyte::b#1 ] +Uplifting [div16u] best 37700 combination zp ZP_WORD:158 [ div16u::return#2 ] zp ZP_WORD:189 [ div16u::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ print_sbyte::b#4 print_sbyte::b#0 print_sbyte::b#1 ] -Uplifting [print_sbyte] best 37682 combination zp ZP_BYTE:5 [ print_sbyte::b#4 print_sbyte::b#0 print_sbyte::b#1 ] +Uplifting [print_sbyte] best 37700 combination zp ZP_BYTE:5 [ print_sbyte::b#4 print_sbyte::b#0 print_sbyte::b#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:168 [ sin8s::x2#0 ] -Uplifting [sin8s] best 37678 combination reg byte a [ sin8s::x2#0 ] +Uplifting [sin8s] best 37696 combination reg byte a [ sin8s::x2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:171 [ mulu8_sel::return#2 ] -Uplifting [mulu8_sel] best 37672 combination reg byte a [ mulu8_sel::return#2 ] +Uplifting [mulu8_sel] best 37690 combination reg byte a [ mulu8_sel::return#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:172 [ sin8s::x3_6#0 ] -Uplifting [sin8s] best 37668 combination reg byte a [ sin8s::x3_6#0 ] +Uplifting [sin8s] best 37686 combination reg byte a [ sin8s::x3_6#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:174 [ mulu8_sel::return#10 ] -Uplifting [mulu8_sel] best 37662 combination reg byte a [ mulu8_sel::return#10 ] +Uplifting [mulu8_sel] best 37680 combination reg byte a [ mulu8_sel::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:175 [ sin8s::x4#0 ] -Uplifting [sin8s] best 37658 combination reg byte a [ sin8s::x4#0 ] +Uplifting [sin8s] best 37676 combination reg byte a [ sin8s::x4#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:176 [ mulu8_sel::return#11 ] -Uplifting [mulu8_sel] best 37652 combination reg byte a [ mulu8_sel::return#11 ] +Uplifting [mulu8_sel] best 37670 combination reg byte a [ mulu8_sel::return#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:177 [ sin8s::x5#0 ] -Uplifting [sin8s] best 37646 combination reg byte a [ sin8s::x5#0 ] +Uplifting [sin8s] best 37664 combination reg byte a [ sin8s::x5#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:178 [ sin8s::x5_128#0 ] -Uplifting [sin8s] best 37640 combination reg byte a [ sin8s::x5_128#0 ] +Uplifting [sin8s] best 37658 combination reg byte a [ sin8s::x5_128#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ main::sb#0 ] -Uplifting [main] best 37640 combination zp ZP_BYTE:70 [ main::sb#0 ] +Uplifting [main] best 37658 combination zp ZP_BYTE:70 [ main::sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:185 [ mulu8_sel::return#12 ] -Uplifting [mulu8_sel] best 37622 combination reg byte a [ mulu8_sel::return#12 ] +Uplifting [mulu8_sel] best 37640 combination reg byte a [ mulu8_sel::return#12 ] Attempting to uplift remaining variables inzp ZP_BYTE:170 [ sin8s::x3#0 ] -Uplifting [sin8s] best 37622 combination zp ZP_BYTE:170 [ sin8s::x3#0 ] +Uplifting [sin8s] best 37640 combination zp ZP_BYTE:170 [ sin8s::x3#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:166 [ sin8s::x1#0 ] -Uplifting [sin8s] best 37622 combination zp ZP_BYTE:166 [ sin8s::x1#0 ] +Uplifting [sin8s] best 37640 combination zp ZP_BYTE:166 [ sin8s::x1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:63 [ mulu8_sel::select#5 ] -Uplifting [mulu8_sel] best 37622 combination zp ZP_BYTE:63 [ mulu8_sel::select#5 ] +Uplifting [mulu8_sel] best 37640 combination zp ZP_BYTE:63 [ mulu8_sel::select#5 ] Attempting to uplift remaining variables inzp ZP_BYTE:173 [ sin8s::usinx#0 ] -Uplifting [sin8s] best 37622 combination zp ZP_BYTE:173 [ sin8s::usinx#0 ] +Uplifting [sin8s] best 37640 combination zp ZP_BYTE:173 [ sin8s::usinx#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ sin16s::isUpper#2 ] -Uplifting [sin16s] best 37622 combination zp ZP_BYTE:19 [ sin16s::isUpper#2 ] +Uplifting [sin16s] best 37640 combination zp ZP_BYTE:19 [ sin16s::isUpper#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:56 [ sin8s::isUpper#10 ] -Uplifting [sin8s] best 37622 combination zp ZP_BYTE:56 [ sin8s::isUpper#10 ] +Uplifting [sin8s] best 37640 combination zp ZP_BYTE:56 [ sin8s::isUpper#10 ] Coalescing zero page register with common assignment [ zp ZP_WORD:24 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] ] with [ zp ZP_WORD:125 [ sin16s::usinx#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:26 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] ] with [ zp ZP_WORD:107 [ sin16s::x3#0 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_WORD:43 [ divr16u::rem#6 divr16u::rem#11 divr16u::rem#5 divr16u::rem#10 divr16u::rem#7 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] ] with [ zp ZP_WORD:156 [ rem16u#1 ] ] - score: 2