From 0a31136651b07811c61a408dac7c5cf981507c1b Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 28 Sep 2020 23:45:41 +0200 Subject: [PATCH] Improved compiler error messages. Added bubbles64 example (not working yet). Added missing fragments. --- .../cache/fragment-cache-csg65ce02.asm | 2 +- .../cache/fragment-cache-mega45gs02.asm | 132 +- .../fragment/cache/fragment-cache-mos6502.asm | 2 +- .../cache/fragment-cache-mos6502x.asm | 3241 ++++---- .../cache/fragment-cache-wdc65c02.asm | 2 +- ...refidx_vbuc1_plus_pbsz1_derefidx_vbuyy.asm | 16 + ...pwsz1_derefidx_vbuyy_ge_vwsc1_then_la1.asm | 9 + ...pwsz1_derefidx_vbuyy_gt_vwsc1_then_la1.asm | 10 + .../vwsm1=pwsz2_derefidx_vbuyy_ror_vbuxx.asm | 15 + .../dk/camelot64/kickc/asm/AsmFormat.java | 6 +- .../dk/camelot64/kickc/test/TestPrograms.java | 5 + src/test/kc/complex/bubbles64/bubbles64.c | 172 + src/test/kc/complex/bubbles64/build.sh | 11 + src/test/kc/complex/bubbles64/lazyply.h | 78 + src/test/kc/complex/bubbles64/liblazyply.a | Bin 0 -> 10446 bytes src/test/kc/complex/bubbles64/sprites.png | Bin 0 -> 430 bytes src/test/kc/complex/bubbles64/sprites.spr | Bin 0 -> 512 bytes src/test/ref/complex/bubbles64/bubbles64.asm | 733 ++ src/test/ref/complex/bubbles64/bubbles64.cfg | 304 + src/test/ref/complex/bubbles64/bubbles64.log | 6975 +++++++++++++++++ src/test/ref/complex/bubbles64/bubbles64.sym | 199 + 21 files changed, 10349 insertions(+), 1563 deletions(-) create mode 100644 src/main/fragment/mos6502-common/pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuyy.asm create mode 100644 src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_ge_vwsc1_then_la1.asm create mode 100644 src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_gt_vwsc1_then_la1.asm create mode 100644 src/main/fragment/mos6502-common/vwsm1=pwsz2_derefidx_vbuyy_ror_vbuxx.asm create mode 100644 src/test/kc/complex/bubbles64/bubbles64.c create mode 100644 src/test/kc/complex/bubbles64/build.sh create mode 100644 src/test/kc/complex/bubbles64/lazyply.h create mode 100644 src/test/kc/complex/bubbles64/liblazyply.a create mode 100644 src/test/kc/complex/bubbles64/sprites.png create mode 100644 src/test/kc/complex/bubbles64/sprites.spr create mode 100644 src/test/ref/complex/bubbles64/bubbles64.asm create mode 100644 src/test/ref/complex/bubbles64/bubbles64.cfg create mode 100644 src/test/ref/complex/bubbles64/bubbles64.log create mode 100644 src/test/ref/complex/bubbles64/bubbles64.sym diff --git a/src/main/fragment/cache/fragment-cache-csg65ce02.asm b/src/main/fragment/cache/fragment-cache-csg65ce02.asm index e4122d352..5dae0a7cb 100644 --- a/src/main/fragment/cache/fragment-cache-csg65ce02.asm +++ b/src/main/fragment/cache/fragment-cache-csg65ce02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 12fc0379b9 12fc039308 +//KICKC FRAGMENT CACHE 12b00eb139 12b00ecab9 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mega45gs02.asm b/src/main/fragment/cache/fragment-cache-mega45gs02.asm index d17c689cd..97335c905 100644 --- a/src/main/fragment/cache/fragment-cache-mega45gs02.asm +++ b/src/main/fragment/cache/fragment-cache-mega45gs02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 12fc0379b9 12fc039308 +//KICKC FRAGMENT CACHE 12b00eb139 12b00ecab9 //FRAGMENT _deref_pbuc1=vbuc2 lda #{c2} sta {c1} @@ -1177,6 +1177,58 @@ inc stx {c1} //FRAGMENT _deref_pbuc1=vbuzz stz {c1} +//FRAGMENT vbuz1=_deref_pbuc1_plus_1 +lda {c1} +inc +sta {z1} +//FRAGMENT vwuz1=_word_vbuz2 +lda {z2} +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_2 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vwuz2_plus_vwuz3 +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc {z3}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_4 +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 +//FRAGMENT pbuz1=pbuc1_plus_vwuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 //FRAGMENT vbuc1_neq_vbuz1_then_la1 lda #{c1} cmp {z1} @@ -1218,11 +1270,6 @@ sta {z1} lda {z2}+1 adc #>{c1} sta {z1}+1 -//FRAGMENT pbuz1=pbuz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 //FRAGMENT pbuz1_neq_pbuz2_then_la1 lda {z1}+1 cmp {z2}+1 @@ -1243,6 +1290,29 @@ sta {z1} lda #0 adc {z2}+1 sta {z1}+1 +//FRAGMENT vbuaa=_deref_pbuc1_plus_1 +lda {c1} +inc +//FRAGMENT vbuxx=_deref_pbuc1_plus_1 +ldx {c1} +inx +//FRAGMENT vbuz1=vbuxx +stx {z1} +//FRAGMENT vwuz1=_word_vbuxx +txa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_vbuyy +tya +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_vbuzz +tza +sta {z1} +lda #0 +sta {z1}+1 //FRAGMENT vbuc1_neq_vbuaa_then_la1 cmp #{c1} bne {la1} @@ -1278,6 +1348,47 @@ cpz #{c1} bne {la1} //FRAGMENT vbuaa=vbuzz tza +//FRAGMENT vbuz1=vbuyy +sty {z1} +//FRAGMENT vbuz1=vbuzz +tza +sta {z1} +//FRAGMENT vbuxx=vbuaa +tax +//FRAGMENT vbuyy=_deref_pbuc1_plus_1 +ldy {c1} +iny +//FRAGMENT vbuxx=vbuyy +tya +tax +//FRAGMENT vbuzz=_deref_pbuc1_plus_1 +lda {c1} +inc +taz +//FRAGMENT vbuxx=vbuzz +tza +tax +//FRAGMENT vwuz1=vwuz2_plus_vwuz1 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_rol_4 +asw {z1} +asw {z1} +asw {z1} +asw {z1} //FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 inc {c1} //FRAGMENT vwuz1=vbuc1 @@ -2211,15 +2322,6 @@ tza tax tya sta {c1},x -//FRAGMENT vbuz1=vbuxx -stx {z1} -//FRAGMENT vbuz1=vbuyy -sty {z1} -//FRAGMENT vbuz1=vbuzz -tza -sta {z1} -//FRAGMENT vbuxx=vbuaa -tax //FRAGMENT vbuyy=vbuaa tay //FRAGMENT vbuzz=vbuaa diff --git a/src/main/fragment/cache/fragment-cache-mos6502.asm b/src/main/fragment/cache/fragment-cache-mos6502.asm index 2bb3b649d..d5c765e83 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 12fc0379b9 12fc039308 +//KICKC FRAGMENT CACHE 12b00eb139 12b00ecab9 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502x.asm b/src/main/fragment/cache/fragment-cache-mos6502x.asm index aed3319c5..43a6289cd 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502x.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm @@ -1,89 +1,22 @@ -//KICKC FRAGMENT CACHE 12fc0379b9 12fc039308 -//FRAGMENT vbuz1=vbuz2 -lda {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_band_vbuc1 -lda #{c1} -and {z2} -sta {z1} -//FRAGMENT vbuc1_eq_vbuz1_then_la1 -lda #{c1} -cmp {z1} -beq {la1} -//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 -inc {c1} -//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 -dec {c1} +//KICKC FRAGMENT CACHE 12b00eb139 12b00ecab9 //FRAGMENT _deref_pbuc1=vbuc2 lda #{c2} sta {c1} -//FRAGMENT vbuz1=_deref_pbuc1_band_vbuc2 -lda #{c2} -and {c1} -sta {z1} +//FRAGMENT _deref_pbuc1=_deref_pbuc2 +lda {c2} +sta {c1} //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} -//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2 -lda #{c2} -ldy {z1} -sta {c1},y -//FRAGMENT vbuz1=_inc_vbuz1 -inc {z1} -//FRAGMENT vbuc1_neq_vbuz1_then_la1 -lda #{c1} -cmp {z1} -bne {la1} -//FRAGMENT vwuz1=vwuc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT pvoz1=pvoc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 +//FRAGMENT vbuz1_lt_vbuc1_then_la1 +lda {z1} +cmp #{c1} +bcc {la1} //FRAGMENT vwuz1=vbuc1 lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 -//FRAGMENT vbuz1_lt_vbuc1_then_la1 -lda {z1} -cmp #{c1} -bcc {la1} -//FRAGMENT pbuz1=pbuc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT pbuz1=pbuc1_plus_vbuz2 -lda {z2} -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 -//FRAGMENT pvoz1=pvoz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT vbuz1=vbuz1_plus_2 -lda {z1} -clc -adc #2 -sta {z1} -//FRAGMENT vbuz1=vbuz2_rol_1 -lda {z2} -asl -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuz3 -lda {z2} -ora {z3} -sta {z1} //FRAGMENT vwuz1_lt_vwuc1_then_la1 lda {z1}+1 cmp #>{c1} @@ -93,114 +26,289 @@ lda {z1} cmp #<{c1} bcc {la1} !: -//FRAGMENT vbuz1=_deref_pbuz2 -ldy #0 -lda ({z2}),y -sta {z1} -//FRAGMENT _deref_pbuc1=vbuz1 -lda {z1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2 +lda #{c2} +ora {c1} sta {c1} -//FRAGMENT pbuz1=_inc_pbuz1 -inc {z1} -bne !+ -inc {z1}+1 -!: -//FRAGMENT vwuz1=_inc_vwuz1 -inc {z1} -bne !+ -inc {z1}+1 -!: -//FRAGMENT vbuz1=_hi_pvoz2 -lda {z2}+1 +//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +sta {c1} +//FRAGMENT vwuz1=vwuc1 +lda #<{c1} sta {z1} -//FRAGMENT vbuz1=_lo_pvoz2 -lda {z2} +lda #>{c1} +sta {z1}+1 +//FRAGMENT pssz1=pssc1 +lda #<{c1} sta {z1} -//FRAGMENT vwuz1_lt_vwuz2_then_la1 -lda {z1}+1 -cmp {z2}+1 -bcc {la1} -bne !+ +lda #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1_lt_vbuz2_then_la1 lda {z1} cmp {z2} bcc {la1} +//FRAGMENT vwuz1=vwuz1_plus_1 +inc {z1} +bne !+ +inc {z1}+1 !: -//FRAGMENT vbuz1=pbuz2_derefidx_vbuc1 +//FRAGMENT vwuz1_lt_vbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vbuc1_neq_vbuz1_then_la1 +lda #{c1} +cmp {z1} +bne {la1} +//FRAGMENT vwuz1_le_0_then_la1 +lda {z1} +bne !+ +lda {z1}+1 +beq {la1} +!: +//FRAGMENT vwuz1=vwuz1_minus_1 +lda {z1} +sec +sbc #1 +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vbuz1_gt_0_then_la1 +lda {z1} +bne {la1} +//FRAGMENT vbuz1=vbuz1_minus_1 +dec {z1} +//FRAGMENT vbuz1=vbuz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz1_plus_1 +inc {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2 +lda #{c2} +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1},y +//FRAGMENT pbsz1_derefidx_vbuc1=pbsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 +ldy #{c2} +lda ({z1}),y +ldy #{c1} +tax +lda ({z1}),y +sty $ff + +stx $ff +clc +adc $ff +ldy $ff +sta ({z1}),y +//FRAGMENT pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 +ldy #{c1} +lda ({z1}),y + +sec +sbc #{c2} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT pbsz1_derefidx_vbuc1=vbsc2 +lda #{c1} +tay +lda #{c2} +sta ({z1}),y +//FRAGMENT pwsz1_derefidx_vbuc1_gt_vwsc2_then_la1 +ldy #{c1} +lda #<{c2} +cmp ({z1}),y +iny +lda #>{c2} +sbc ({z1}),y +bvc !+ +eor #$80 +!: +bmi {la1} +!e: +//FRAGMENT pwsz1_derefidx_vbuc1_ge_vwsc2_then_la1 +ldy #{c1} +lda ({z1}),y +cmp #<{c2} +iny +lda ({z1}),y +sbc #>{c2} +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 +ldy #{c2} +lda ({z1}),y +sta $fe +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +ldy #{c1} +clc +lda ({z1}),y +adc $fe +sta ({z1}),y +iny +lda ({z1}),y +adc $fe +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuz1_ge_vbuc2_then_la1 +ldy {z1} +lda {c1},y +cmp #{c2} +bcs {la1} +//FRAGMENT pbuc1_derefidx_vbuz1=_deref_pbuz2 +ldy #0 +lda ({z2}),y +ldy {z1} +sta {c1},y +//FRAGMENT vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 +ldx #{c2} ldy #{c1} lda ({z2}),y sta {z1} -//FRAGMENT pbuz1=pbuz2_plus_vbuc1 +iny +lda ({z2}),y +sta {z1}+1 +cpx #0 +beq !e+ +!: +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +dex +bne !- +!e: +//FRAGMENT pbuc1_derefidx_vbuz1=_byte_vwsz2 +ldy {z1} +lda {z2} +sta {c1},y +//FRAGMENT pssz1=pssz1_plus_vbuc1 lda #{c1} clc -adc {z2} +adc {z1} sta {z1} -lda #0 -adc {z2}+1 +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vbuz1=vbuz2_rol_3 +lda {z2} +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuz2_plus_vbuz3 +lda {z2} +clc +adc {z3} +sta {z1} +//FRAGMENT pssz1=pssc1_plus_vbuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT _deref_pbuz1=vbuz2 +lda {z2} +ldy #0 +sta ({z1}),y +//FRAGMENT pwsz1_derefidx_vbuc1=vwsc2 +ldy #{c1} +lda #<{c2} +sta ({z1}),y +iny +lda #>{c2} +sta ({z1}),y +//FRAGMENT pbsz1_derefidx_vbuc1=vbsz2 +lda #{c1} +tay +lda {z2} +sta ({z1}),y +//FRAGMENT pbuz1=pbuc1_plus_vwuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} sta {z1}+1 -//FRAGMENT pbuz1_neq_pbuc1_then_la1 -lda {z1}+1 -cmp #>{c1} -bne {la1} -lda {z1} -cmp #<{c1} -bne {la1} //FRAGMENT _deref_pbuz1=_deref_pbuz2 ldy #0 lda ({z2}),y ldy #0 sta ({z1}),y -//FRAGMENT vbuz1=vbuaa -sta {z1} +//FRAGMENT _deref_pbuz1=vbuc1 +lda #{c1} +ldy #0 +sta ({z1}),y +//FRAGMENT vbuz1_ge_vbuc1_then_la1 +lda {z1} +cmp #{c1} +bcs {la1} +//FRAGMENT _deref_pbuc1=vbuz1 +lda {z1} +sta {c1} +//FRAGMENT vbuz1=_inc_vbuz1 +inc {z1} +//FRAGMENT vbuz1=vbuz1_minus_vbuc1 +lax {z1} +axs #{c1} +stx {z1} +//FRAGMENT pbuc1_derefidx_vbuz1_lt_vbuc2_then_la1 +ldy {z1} +lda {c1},y +cmp #{c2} +bcc {la1} +//FRAGMENT vbuc1_eq_pbuc2_derefidx_vbuz1_then_la1 +ldy {z1} +lda {c2},y +cmp #{c1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuz1=vbuz2 +lda {z2} +ldy {z1} +sta {c1},y +//FRAGMENT vbuaa_lt_vbuc1_then_la1 +cmp #{c1} +bcc {la1} +//FRAGMENT vbuz1_lt_vbuaa_then_la1 +cmp {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuc1_neq_vbuxx_then_la1 +cpx #{c1} +bne {la1} +//FRAGMENT vbuxx_lt_vbuc1_then_la1 +cpx #{c1} +bcc {la1} +//FRAGMENT vbuxx_gt_0_then_la1 +cpx #0 +bne {la1} //FRAGMENT vbuaa=vbuz1 lda {z1} //FRAGMENT vbuxx=vbuz1 ldx {z1} -//FRAGMENT vbuz1=vbuaa_band_vbuc1 -and #{c1} +//FRAGMENT vbuz1=vbuaa sta {z1} -//FRAGMENT vbuz1=vbuxx_band_vbuc1 -lda #{c1} -sax {z1} -//FRAGMENT vbuz1=vbuyy_band_vbuc1 -tya -and #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -//FRAGMENT vbuaa=vbuaa_band_vbuc1 -and #{c1} -//FRAGMENT vbuaa=vbuxx_band_vbuc1 -txa -and #{c1} -//FRAGMENT vbuaa=vbuyy_band_vbuc1 -tya -and #{c1} -//FRAGMENT vbuxx=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -tax -//FRAGMENT vbuxx=vbuaa_band_vbuc1 -ldx #{c1} -axs #0 -//FRAGMENT vbuc1_eq_vbuaa_then_la1 -cmp #{c1} -beq {la1} -//FRAGMENT vbuyy=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -tay -//FRAGMENT vbuaa=_deref_pbuc1_band_vbuc2 -lda #{c2} -and {c1} -//FRAGMENT vbuxx=_deref_pbuc1_band_vbuc2 -lda #{c2} -and {c1} -tax -//FRAGMENT vbuyy=_deref_pbuc1_band_vbuc2 -lda #{c2} -and {c1} -tay //FRAGMENT pbuc1_derefidx_vbuaa=vbuc2 tay lda #{c2} @@ -211,604 +319,12 @@ sta {c1},x //FRAGMENT pbuc1_derefidx_vbuyy=vbuc2 lda #{c2} sta {c1},y -//FRAGMENT vbuc1_neq_vbuxx_then_la1 -cpx #{c1} -bne {la1} -//FRAGMENT vbuaa_lt_vbuc1_then_la1 -cmp #{c1} -bcc {la1} -//FRAGMENT pbuz1=pbuc1_plus_vbuaa -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 -//FRAGMENT pbuz1=pbuc1_plus_vbuxx -txa -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 -//FRAGMENT pbuz1=pbuc1_plus_vbuyy -tya -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 -//FRAGMENT vbuxx=vbuxx_plus_2 -inx -inx -//FRAGMENT vbuz1=vbuaa_rol_1 -asl -sta {z1} -//FRAGMENT vbuz1=vbuxx_rol_1 -txa -asl -sta {z1} -//FRAGMENT vbuz1=vbuyy_rol_1 -tya -asl -sta {z1} -//FRAGMENT vbuaa=vbuz1_rol_1 -lda {z1} -asl -//FRAGMENT vbuaa=vbuaa_rol_1 -asl -//FRAGMENT vbuaa=vbuxx_rol_1 -txa -asl -//FRAGMENT vbuaa=vbuyy_rol_1 -tya -asl -//FRAGMENT vbuxx=vbuz1_rol_1 -lda {z1} -asl -tax -//FRAGMENT vbuxx=vbuaa_rol_1 -asl -tax -//FRAGMENT vbuxx=vbuxx_rol_1 -txa -asl -tax -//FRAGMENT vbuxx=vbuyy_rol_1 -tya -asl -tax -//FRAGMENT vbuyy=vbuz1_rol_1 -lda {z1} -asl -tay -//FRAGMENT vbuyy=vbuaa_rol_1 -asl -tay -//FRAGMENT vbuyy=vbuxx_rol_1 -txa -asl -tay -//FRAGMENT vbuyy=vbuyy_rol_1 -tya -asl -tay -//FRAGMENT vbuz1=vbuxx_bor_vbuz2 -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuz2 -tya -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuaa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuaa -stx $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuaa -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuxx -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuxx -stx {z1} -//FRAGMENT vbuaa=_deref_pbuz1 -ldy #0 -lda ({z1}),y -//FRAGMENT vbuxx=_deref_pbuz1 -ldy #0 -lda ({z1}),y -tax -//FRAGMENT vbuyy=_deref_pbuz1 -ldy #0 -lda ({z1}),y -tay -//FRAGMENT _deref_pbuc1=vbuaa -sta {c1} -//FRAGMENT vbuaa=_hi_pvoz1 -lda {z1}+1 -//FRAGMENT vbuxx=_hi_pvoz1 -ldx {z1}+1 -//FRAGMENT vbuaa=_lo_pvoz1 -lda {z1} -//FRAGMENT vbuxx=_lo_pvoz1 -ldx {z1} -//FRAGMENT _deref_pbuc1=vbuxx -stx {c1} -//FRAGMENT vbuaa=pbuz1_derefidx_vbuc1 -ldy #{c1} -lda ({z1}),y -//FRAGMENT vbuxx=pbuz1_derefidx_vbuc1 -ldy #{c1} -lda ({z1}),y -tax -//FRAGMENT vbuyy=pbuz1_derefidx_vbuc1 -ldy #{c1} -lda ({z1}),y -tay -//FRAGMENT vbuxx_lt_vbuc1_then_la1 -cpx #{c1} -bcc {la1} -//FRAGMENT vbuyy=_hi_pvoz1 -ldy {z1}+1 -//FRAGMENT _deref_pbuc1=vbuyy -sty {c1} -//FRAGMENT vbuyy=_lo_pvoz1 -ldy {z1} -//FRAGMENT vbuxx=vbuc1 -ldx #{c1} -//FRAGMENT vbuxx=_inc_vbuxx -inx -//FRAGMENT vbuyy=vbuc1 -ldy #{c1} -//FRAGMENT vbuyy_lt_vbuc1_then_la1 -cpy #{c1} -bcc {la1} -//FRAGMENT vbuyy=_inc_vbuyy -iny -//FRAGMENT vbuz1=vbuz2_bor_vbuyy -tya -ora {z2} -sta {z1} -//FRAGMENT vbuaa=vbuc1 -lda #{c1} -//FRAGMENT vbuaa=vbuz1_bor_vbuz2 -lda {z1} -ora {z2} -//FRAGMENT vbuaa=vbuz1_bor_vbuaa -ora {z1} -//FRAGMENT vbuaa=vbuz1_bor_vbuxx -txa -ora {z1} -//FRAGMENT vbuaa=vbuz1_bor_vbuyy -tya -ora {z1} -//FRAGMENT vbuz1=vbuxx -stx {z1} -//FRAGMENT vbuxx=vbuz1_bor_vbuz2 -lda {z1} -ora {z2} -tax -//FRAGMENT vbuxx=vbuz1_bor_vbuaa -ora {z1} -tax -//FRAGMENT vbuxx=vbuz1_bor_vbuxx -txa -ora {z1} -tax -//FRAGMENT vbuxx=vbuz1_bor_vbuyy -tya -ora {z1} -tax -//FRAGMENT vbuz1=vbuyy -sty {z1} -//FRAGMENT vbuyy=vbuz1_bor_vbuz2 -lda {z1} -ora {z2} -tay -//FRAGMENT vbuyy=vbuz1_bor_vbuaa -ora {z1} -tay -//FRAGMENT vbuyy=vbuz1_bor_vbuxx -txa -ora {z1} -tay -//FRAGMENT vbuyy=vbuz1_bor_vbuyy -tya -ora {z1} -tay -//FRAGMENT vbuz1=vbuxx_bor_vbuyy -txa -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuaa=vbuxx_bor_vbuz1 -txa -ora {z1} -//FRAGMENT vbuaa=vbuxx_bor_vbuaa -stx $ff -ora $ff -//FRAGMENT vbuaa=vbuxx_bor_vbuyy -txa -sty $ff -ora $ff -//FRAGMENT vbuxx=vbuxx_bor_vbuz1 -txa -ora {z1} -tax -//FRAGMENT vbuxx=vbuxx_bor_vbuaa -stx $ff -ora $ff -tax -//FRAGMENT vbuxx=vbuxx_bor_vbuyy -txa -sty $ff -ora $ff -tax -//FRAGMENT vbuyy=vbuxx_bor_vbuz1 -txa -ora {z1} -tay -//FRAGMENT vbuyy=vbuxx_bor_vbuaa -stx $ff -ora $ff -tay -//FRAGMENT vbuyy=vbuxx_bor_vbuyy -txa -sty $ff -ora $ff -tay -//FRAGMENT vbuc1_neq_vbuyy_then_la1 -cpy #{c1} -bne {la1} -//FRAGMENT vbuc1_eq_vbuxx_then_la1 -cpx #{c1} -beq {la1} -//FRAGMENT vbuc1_eq_vbuyy_then_la1 -cpy #{c1} -beq {la1} -//FRAGMENT vbuaa=vbuyy_bor_vbuaa -sty $ff -ora $ff -//FRAGMENT vbuxx=vbuaa -tax -//FRAGMENT vbuyy=vbuaa -tay -//FRAGMENT pbuz1=pbuz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -sta {z1} -bcc !+ -inc {z1}+1 -!: -//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 -lda #{c2} -ldy {z2} -clc -adc {c1},y -sta {z1} -//FRAGMENT vbuz1=vbuz2_bxor_vbuc1 -lda #{c1} -eor {z2} -sta {z1} -//FRAGMENT vbuz1_ge_vbuc1_then_la1 -lda {z1} -cmp #{c1} -bcs {la1} -//FRAGMENT vbuz1=_inc_vbuz2 -ldy {z2} -iny -sty {z1} -//FRAGMENT vbuz1_neq_vbuc1_then_la1 -lda #{c1} -cmp {z1} -bne {la1} -//FRAGMENT vbuz1=vbuz2_rol_3 -lda {z2} -asl -asl -asl -sta {z1} -//FRAGMENT pwuc1_derefidx_vbuz1=vbuc2 -lda {z1} -ldx #{c2} -tay -txa +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx +lda {c2},x +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy +lda {c2},y sta {c1},y -//FRAGMENT vbuz1_lt_vbuz2_then_la1 -lda {z1} -cmp {z2} -bcc {la1} -//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_pwuc2_derefidx_vbuz1 -ldy {z1} -clc -lda {c1},y -adc {c2},y -sta {c1},y -lda {c1}+1,y -adc {c2}+1,y -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_vbuc2 -ldy {z1} -clc -lda {c1},y -adc #{c2} -sta {c1},y -lda {c1}+1,y -adc #0 -sta {c1}+1,y -//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_ror_8 -ldy {z2} -lda #0 -sta {z1}+1 -lda {c1}+1,y -sta {z1} -//FRAGMENT vwuz1_ge_vbuc1_then_la1 -lda {z1}+1 -bne {la1} -lda {z1} -cmp #{c1} -bcs {la1} -!: -//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_bxor_vwuc2 -ldy {z1} -lda {c1},y -eor #<{c2} -sta {c1},y -lda {c1}+1,y -eor #>{c2} -sta {c1}+1,y -//FRAGMENT vbuz1=vbuz2_plus_vbuc1 -lax {z2} -axs #-[{c1}] -stx {z1} -//FRAGMENT vwuz1_lt_vbuz2_then_la1 -lda {z1}+1 -bne !+ -lda {z1} -cmp {z2} -bcc {la1} -!: -//FRAGMENT vwuz1_ge_vbuz2_then_la1 -lda {z1}+1 -bne {la1} -lda {z1} -cmp {z2} -bcs {la1} -!: -//FRAGMENT vbuz1=vbuz2_minus_2 -lda {z2} -sec -sbc #2 -sta {z1} -//FRAGMENT vwuz1=_word_vbuz2 -lda {z2} -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=vwuz2_rol_8 -lda {z2} -sta {z1}+1 -lda #0 -sta {z1} -//FRAGMENT pwuc1_derefidx_vbuz1=vwuz2 -ldy {z1} -lda {z2} -sta {c1},y -lda {z2}+1 -sta {c1}+1,y -//FRAGMENT vbuz1=vbuz2_rol_2 -lda {z2} -asl -asl -sta {z1} -//FRAGMENT pbuc1_derefidx_vbuz1=_byte_vwuz2 -ldy {z1} -lda {z2} -sta {c1},y -//FRAGMENT vwuz1=vwuz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT vwuz1=vwuz2_band_vwuc1 -lda {z2} -and #<{c1} -sta {z1} -lda {z2}+1 -and #>{c1} -sta {z1}+1 -//FRAGMENT vbuz1=vwuz2_band_vbuc1 -lda #{c1} -and {z2} -sta {z1} -//FRAGMENT pwuc1_derefidx_vbuz1=vbuz2 -lda {z1} -ldx {z2} -tay -txa -sta {c1},y -//FRAGMENT pbuz1=pbuz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT vwuz1_lt_vbuc1_then_la1 -lda {z1}+1 -cmp #>{c1} -bcc {la1} -bne !+ -lda {z1} -cmp #<{c1} -bcc {la1} -!: -//FRAGMENT vwuz1=vwuz2_rol_7 -lda {z2}+1 -lsr -lda {z2} -ror -sta {z1}+1 -lda #0 -ror -sta {z1} -//FRAGMENT vwuz1=vwuz2_bxor_vwuz3 -lda {z2} -eor {z3} -sta {z1} -lda {z2}+1 -eor {z3}+1 -sta {z1}+1 -//FRAGMENT vwuz1=vwuz2_ror_9 -lda {z2}+1 -lsr -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_vbuc2 -lda #{c2} -ldy {z1} -clc -adc {c1},y -//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_vbuc2 -ldx {z1} -lda {c1},x -tax -axs #-[{c2}] -//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_vbuc2 -lda #{c2} -ldy {z1} -clc -adc {c1},y -tay -//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_vbuc2 -tay -lda #{c2} -clc -adc {c1},y -sta {z1} -//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_vbuc2 -tay -lda #{c2} -clc -adc {c1},y -//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_vbuc2 -tax -lda {c1},x -tax -axs #-[{c2}] -//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_vbuc2 -tay -lda #{c2} -clc -adc {c1},y -tay -//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_vbuc2 -lda #{c2} -clc -adc {c1},x -sta {z1} -//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_vbuc2 -lda #{c2} -clc -adc {c1},x -//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_vbuc2 -lda {c1},x -tax -axs #-[{c2}] -//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_vbuc2 -lda #{c2} -clc -adc {c1},x -tay -//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_vbuc2 -lda #{c2} -clc -adc {c1},y -sta {z1} -//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_vbuc2 -lda #{c2} -clc -adc {c1},y -//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_vbuc2 -lda {c1},y -tax -axs #-[{c2}] -//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_vbuc2 -lda #{c2} -clc -adc {c1},y -tay -//FRAGMENT vbuz1=vbuaa_bxor_vbuc1 -eor #{c1} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bxor_vbuc1 -txa -eor #{c1} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bxor_vbuc1 -tya -eor #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuz1_bxor_vbuc1 -lda #{c1} -eor {z1} -//FRAGMENT vbuaa=vbuaa_bxor_vbuc1 -eor #{c1} -//FRAGMENT vbuaa=vbuxx_bxor_vbuc1 -txa -eor #{c1} -//FRAGMENT vbuaa=vbuyy_bxor_vbuc1 -tya -eor #{c1} -//FRAGMENT vbuxx=vbuz1_bxor_vbuc1 -lda #{c1} -eor {z1} -tax -//FRAGMENT vbuxx=vbuaa_bxor_vbuc1 -eor #{c1} -tax -//FRAGMENT vbuxx=vbuxx_bxor_vbuc1 -txa -eor #{c1} -tax -//FRAGMENT vbuxx=vbuyy_bxor_vbuc1 -tya -eor #{c1} -tax -//FRAGMENT vbuyy=vbuz1_bxor_vbuc1 -lda #{c1} -eor {z1} -tay -//FRAGMENT vbuyy=vbuaa_bxor_vbuc1 -eor #{c1} -tay -//FRAGMENT vbuyy=vbuxx_bxor_vbuc1 -txa -eor #{c1} -tay -//FRAGMENT vbuyy=vbuyy_bxor_vbuc1 -tya -eor #{c1} -tay -//FRAGMENT vbuxx_ge_vbuc1_then_la1 -cpx #{c1} -bcs {la1} -//FRAGMENT vbuaa=_inc_vbuz1 -lda {z1} -clc -adc #1 -//FRAGMENT vbuxx_neq_vbuc1_then_la1 -cpx #{c1} -bne {la1} //FRAGMENT vbuaa=vbuz1_rol_3 lda {z1} asl @@ -826,6 +342,25 @@ asl asl asl tay +//FRAGMENT vbuz1=vbuaa_rol_3 +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuaa_rol_3 +asl +asl +asl +//FRAGMENT vbuxx=vbuaa_rol_3 +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuaa_rol_3 +asl +asl +asl +tay //FRAGMENT vbuz1=vbuxx_rol_3 txa asl @@ -872,413 +407,388 @@ asl asl asl tay -//FRAGMENT pwuc1_derefidx_vbuaa=vbuc2 -ldx #{c2} -tay -txa -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuxx=vbuc2 -lda #{c2} -sta {c1},x -lda #0 -sta {c1}+1,x -//FRAGMENT pwuc1_derefidx_vbuyy=vbuc2 -lda #{c2} -sta {c1},y -lda #0 -sta {c1}+1,y -//FRAGMENT vbuaa_lt_vbuz1_then_la1 -cmp {z1} -bcc {la1} -//FRAGMENT vbuz1=vbuaa_rol_3 -asl -asl -asl +//FRAGMENT vbuz1=vbuaa_plus_vbuz2 +clc +adc {z2} sta {z1} -//FRAGMENT vbuaa=vbuaa_rol_3 -asl -asl -asl -//FRAGMENT vbuxx=vbuaa_rol_3 -asl -asl -asl -tax -//FRAGMENT vbuyy=vbuaa_rol_3 -asl -asl -asl -tay -//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_plus_pwuc2_derefidx_vbuaa -tax -tay -clc -lda {c1},y -adc {c2},x -sta {c1},y -lda {c1}+1,y -adc {c2}+1,x -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuxx +//FRAGMENT vbuz1=vbuxx_plus_vbuz2 txa -tay -txa -sty $ff -ldx $ff -tay clc -lda {c1},y -adc {c2},x -sta {c1},y -lda {c1}+1,y -adc {c2}+1,x -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy -clc -lda {c1},y -adc {c2},y -sta {c1},y -lda {c1}+1,y -adc {c2}+1,y -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_vbuc2 -clc -lda {c1},x -adc #{c2} -sta {c1},x -lda {c1}+1,x -adc #0 -sta {c1}+1,x -//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_vbuc2 -clc -lda {c1},y -adc #{c2} -sta {c1},y -lda {c1}+1,y -adc #0 -sta {c1}+1,y -//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_ror_8 -txa -tay -lda #0 -sta {z1}+1 -lda {c1}+1,y +adc {z2} sta {z1} -//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_ror_8 -lda #0 -sta {z1}+1 -lda {c1}+1,y -sta {z1} -//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_bxor_vwuc2 -tay -lda {c1},y -eor #<{c2} -sta {c1},y -lda {c1}+1,y -eor #>{c2} -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_bxor_vwuc2 -txa -tay -lda {c1},y -eor #<{c2} -sta {c1},y -lda {c1}+1,y -eor #>{c2} -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_bxor_vwuc2 -lda {c1},y -eor #<{c2} -sta {c1},y -lda {c1}+1,y -eor #>{c2} -sta {c1}+1,y -//FRAGMENT vwuz1=pwuc1_derefidx_vbuaa_ror_8 -tay -lda #0 -sta {z1}+1 -lda {c1}+1,y -sta {z1} -//FRAGMENT vbuz1=vbuxx_plus_vbuc1 -txa -axs #-[{c1}] -stx {z1} -//FRAGMENT vbuz1=vbuyy_plus_vbuc1 +//FRAGMENT vbuz1=vbuyy_plus_vbuz2 tya clc -adc #{c1} +adc {z2} sta {z1} -//FRAGMENT vbuaa=vbuz1_plus_vbuc1 -lda #{c1} +//FRAGMENT vbuaa=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} +//FRAGMENT vbuaa=vbuaa_plus_vbuz1 clc adc {z1} -//FRAGMENT vbuaa=vbuxx_plus_vbuc1 +//FRAGMENT vbuaa=vbuxx_plus_vbuz1 txa clc -adc #{c1} -//FRAGMENT vbuaa=vbuyy_plus_vbuc1 +adc {z1} +//FRAGMENT vbuaa=vbuyy_plus_vbuz1 tya clc -adc #{c1} -//FRAGMENT vbuxx=vbuz1_plus_vbuc1 -lax {z1} -axs #-[{c1}] -//FRAGMENT vbuxx=vbuxx_plus_vbuc1 -txa -axs #-[{c1}] -//FRAGMENT vbuxx=vbuyy_plus_vbuc1 -tya +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} tax -axs #-[{c1}] -//FRAGMENT vbuyy=vbuz1_plus_vbuc1 -lda #{c1} +//FRAGMENT vbuxx=vbuaa_plus_vbuz1 +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuxx_plus_vbuz1 +txa +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuyy_plus_vbuz1 +tya +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} +tay +//FRAGMENT vbuyy=vbuaa_plus_vbuz1 clc adc {z1} tay -//FRAGMENT vbuyy=vbuxx_plus_vbuc1 +//FRAGMENT vbuyy=vbuxx_plus_vbuz1 txa clc -adc #{c1} +adc {z1} tay -//FRAGMENT vbuyy=vbuyy_plus_vbuc1 +//FRAGMENT vbuyy=vbuyy_plus_vbuz1 tya clc -adc #{c1} +adc {z1} tay -//FRAGMENT vwuz1_lt_vbuxx_then_la1 -lda {z1}+1 -bne !+ +//FRAGMENT vbuz1=vbuz2_plus_vbuxx +txa +clc +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuaa_plus_vbuxx stx $ff -lda {z1} -cmp $ff -bcc {la1} -!: -//FRAGMENT vwuz1_lt_vbuyy_then_la1 -lda {z1}+1 -bne !+ +clc +adc $ff +sta {z1} +//FRAGMENT vbuz1=vbuxx_plus_vbuxx +txa +asl +sta {z1} +//FRAGMENT vbuz1=vbuyy_plus_vbuxx +txa sty $ff -lda {z1} -cmp $ff -bcc {la1} -!: -//FRAGMENT vwuz1_ge_vbuxx_then_la1 -lda {z1}+1 -bne {la1} +clc +adc $ff +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuxx +txa +clc +adc {z1} +//FRAGMENT vbuaa=vbuaa_plus_vbuxx stx $ff -lda {z1} -cmp $ff -bcs {la1} -!: -//FRAGMENT vwuz1_ge_vbuyy_then_la1 -lda {z1}+1 -bne {la1} +clc +adc $ff +//FRAGMENT vbuaa=vbuxx_plus_vbuxx +txa +asl +//FRAGMENT vbuaa=vbuyy_plus_vbuxx +txa sty $ff -lda {z1} -cmp $ff -bcs {la1} -!: -//FRAGMENT vbuz1=vbuxx_minus_2 -dex -dex -stx {z1} -//FRAGMENT vwuz1=_word_vbuaa -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=_word_vbuxx +clc +adc $ff +//FRAGMENT vbuxx=vbuz1_plus_vbuxx +txa +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuaa_plus_vbuxx +stx $ff +clc +adc $ff +tax +//FRAGMENT vbuxx=vbuxx_plus_vbuxx txa -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=_word_vbuyy -tya -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT pwuc1_derefidx_vbuxx=vwuz1 -lda {z1} -sta {c1},x -lda {z1}+1 -sta {c1}+1,x -//FRAGMENT pwuc1_derefidx_vbuyy=vwuz1 -lda {z1} -sta {c1},y -lda {z1}+1 -sta {c1}+1,y -//FRAGMENT vbuaa=vbuz1_rol_2 -lda {z1} -asl -asl -//FRAGMENT vbuxx=vbuz1_rol_2 -lda {z1} -asl asl tax -//FRAGMENT vbuyy=vbuz1_rol_2 -lda {z1} -asl -asl -tay -//FRAGMENT vbuz1=vbuxx_rol_2 +//FRAGMENT vbuxx=vbuyy_plus_vbuxx txa -asl -asl -sta {z1} -//FRAGMENT vbuaa=vbuxx_rol_2 -txa -asl -asl -//FRAGMENT vbuxx=vbuxx_rol_2 -txa -asl -asl -tax -//FRAGMENT vbuyy=vbuxx_rol_2 -txa -asl -asl -tay -//FRAGMENT vbuz1=vbuyy_rol_2 -tya -asl -asl -sta {z1} -//FRAGMENT vbuaa=vbuyy_rol_2 -tya -asl -asl -//FRAGMENT vbuxx=vbuyy_rol_2 -tya -asl -asl -tax -//FRAGMENT vbuyy=vbuyy_rol_2 -tya -asl -asl -tay -//FRAGMENT pbuc1_derefidx_vbuaa=_byte_vwuz1 -tay -lda {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=_byte_vwuz1 -lda {z1} -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=_byte_vwuz1 -lda {z1} -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuaa=vwuz1 -tay -lda {z1} -sta {c1},y -lda {z1}+1 -sta {c1}+1,y -//FRAGMENT vbuaa=vwuz1_band_vbuc1 -lda #{c1} -and {z1} -//FRAGMENT vbuxx=vwuz1_band_vbuc1 -lda #{c1} -and {z1} -tax -//FRAGMENT vbuyy=vwuz1_band_vbuc1 -lda #{c1} -and {z1} -tay -//FRAGMENT pwuc1_derefidx_vbuz1=vbuxx -lda {z1} -tay -txa -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuz1=vbuyy -tya -ldy {z1} -sta {c1},y -lda #0 -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuaa=vbuz1 -ldx {z1} -tay -txa -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuaa=vbuxx -tay -txa -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuaa=vbuyy sty $ff -ldx $ff +clc +adc $ff +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuxx +txa +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuaa_plus_vbuxx +stx $ff +clc +adc $ff +tay +//FRAGMENT vbuyy=vbuxx_plus_vbuxx +txa +asl +tay +//FRAGMENT vbuyy=vbuyy_plus_vbuxx +txa +sty $ff +clc +adc $ff +tay +//FRAGMENT vbuz1=vbuz2_plus_vbuyy +tya +clc +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuaa_plus_vbuyy +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbuz1=vbuxx_plus_vbuyy +txa +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_plus_vbuyy +tya +asl +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuyy +tya +clc +adc {z1} +//FRAGMENT vbuaa=vbuaa_plus_vbuyy +sty $ff +clc +adc $ff +//FRAGMENT vbuaa=vbuxx_plus_vbuyy +txa +sty $ff +clc +adc $ff +//FRAGMENT vbuaa=vbuyy_plus_vbuyy +tya +asl +//FRAGMENT vbuxx=vbuz1_plus_vbuyy +tya +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuaa_plus_vbuyy +sty $ff +clc +adc $ff +tax +//FRAGMENT vbuxx=vbuxx_plus_vbuyy +txa +sty $ff +clc +adc $ff +tax +//FRAGMENT vbuxx=vbuyy_plus_vbuyy +tya +asl +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuyy +tya +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuaa_plus_vbuyy +sty $ff +clc +adc $ff +tay +//FRAGMENT vbuyy=vbuxx_plus_vbuyy +txa +sty $ff +clc +adc $ff +tay +//FRAGMENT vbuyy=vbuyy_plus_vbuyy +tya +asl +tay +//FRAGMENT pssz1=pssc1_plus_vbuaa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pssz1=pssc1_plus_vbuxx +txa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pssz1=pssc1_plus_vbuyy +tya +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT _deref_pbuz1=vbuxx +txa +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbuz1=vbuyy +tya +ldy #0 +sta ({z1}),y +//FRAGMENT pbsz1_derefidx_vbuc1=vbsxx +lda #{c1} tay txa -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuxx=vbuz1 -lda {z1} -sta {c1},x -lda #0 -sta {c1}+1,x -//FRAGMENT pwuc1_derefidx_vbuxx=vbuxx -txa -sta {c1},x -lda #0 -sta {c1}+1,x -//FRAGMENT pwuc1_derefidx_vbuxx=vbuyy -tya -sta {c1},x -lda #0 -sta {c1}+1,x -//FRAGMENT pwuc1_derefidx_vbuyy=vbuz1 -lda {z1} -sta {c1},y -lda #0 -sta {c1}+1,y -//FRAGMENT pwuc1_derefidx_vbuyy=vbuxx -tya -tay -txa -sta {c1},y -//FRAGMENT pwuc1_derefidx_vbuyy=vbuyy -tya -sta {c1},y -lda #0 -sta {c1}+1,y -//FRAGMENT vbuxx_lt_vbuz1_then_la1 -cpx {z1} -bcc {la1} -//FRAGMENT vbuaa=vbuz1_minus_2 -lda {z1} +sta ({z1}),y +//FRAGMENT vbuaa_ge_vbuc1_then_la1 +cmp #{c1} +bcs {la1} +//FRAGMENT _deref_pbuc1=vbuaa +sta {c1} +//FRAGMENT vbuaa=vbuaa_minus_vbuc1 sec -sbc #2 -//FRAGMENT vbuxx=vbuz1_minus_2 -ldx {z1} -dex -dex -//FRAGMENT vbuyy=vbuz1_minus_2 +sbc #{c1} +//FRAGMENT vbuxx=vbuxx_minus_vbuc1 +txa +axs #{c1} +//FRAGMENT vbuyy=vbuyy_minus_vbuc1 +tya +sec +sbc #{c1} +tay +//FRAGMENT pbuc1_derefidx_vbuaa_lt_vbuc2_then_la1 +tay +lda {c1},y +cmp #{c2} +bcc {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_lt_vbuc2_then_la1 +lda {c1},x +cmp #{c2} +bcc {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_lt_vbuc2_then_la1 +lda {c1},y +cmp #{c2} +bcc {la1} +//FRAGMENT vbuc1_eq_pbuc2_derefidx_vbuaa_then_la1 +tay +lda {c2},y +cmp #{c1} +beq {la1} +//FRAGMENT vbuc1_eq_pbuc2_derefidx_vbuxx_then_la1 +lda {c2},x +cmp #{c1} +beq {la1} +//FRAGMENT vbuc1_eq_pbuc2_derefidx_vbuyy_then_la1 +lda {c2},y +cmp #{c1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx=vbuz1 +lda {z1} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuz1 +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=vbuxx ldy {z1} +txa +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=vbuxx +txa +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuxx +txa +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=vbuyy +tya +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=vbuyy +tya +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuyy +tya +sta {c1},y +//FRAGMENT vbuz1=vbuxx +stx {z1} +//FRAGMENT _deref_pbuc1=vbuxx +stx {c1} +//FRAGMENT vbuaa=vbuaa_minus_1 +sec +sbc #1 +//FRAGMENT vbuxx_ge_vbuc1_then_la1 +cpx #{c1} +bcs {la1} +//FRAGMENT vbuxx=vbuxx_minus_1 +dex +//FRAGMENT vbuyy=vbuz1 +ldy {z1} +//FRAGMENT vbuyy_ge_vbuc1_then_la1 +cpy #{c1} +bcs {la1} +//FRAGMENT vbuyy=vbuyy_minus_1 +tya +tay dey -dey -//FRAGMENT vbuxx=_inc_vbuz1 -ldx {z1} +//FRAGMENT vbuxx=vbuc1 +ldx #{c1} +//FRAGMENT vbuxx=_inc_vbuxx inx -//FRAGMENT vbuyy=_inc_vbuz1 -ldy {z1} +//FRAGMENT vbuyy=vbuc1 +ldy #{c1} +//FRAGMENT _deref_pbuc1=vbuyy +sty {c1} +//FRAGMENT vbuyy=_inc_vbuyy iny -//FRAGMENT vwuz1=vwuz1_bxor_vwuz2 -lda {z1} -eor {z2} +//FRAGMENT vbuaa=vbuc1 +lda #{c1} +//FRAGMENT vbuaa=_inc_vbuaa +clc +adc #1 +//FRAGMENT vbuz1=vbuyy +sty {z1} +//FRAGMENT vbuyy_lt_vbuc1_then_la1 +cpy #{c1} +bcc {la1} +//FRAGMENT vbuaa=vbuxx +txa +//FRAGMENT vbuaa=vbuyy +tya +//FRAGMENT vbuxx=vbuyy +tya +tax +//FRAGMENT vbuyy=vbuxx +txa +tay +//FRAGMENT vbuxx=vbuxx_plus_1 +inx +//FRAGMENT vbuyy=vbuyy_plus_1 +iny +//FRAGMENT pbuz1=pbuc1 +lda #<{c1} sta {z1} -lda {z1}+1 -eor {z2}+1 -sta {z1}+1 -//FRAGMENT vwuz1=vwuz1_rol_8 -lda {z1} -sta {z1}+1 -lda #0 -sta {z1} -//FRAGMENT vwuz1=vwuz1_band_vwuc1 -lda {z1} -and #<{c1} -sta {z1} -lda {z1}+1 -and #>{c1} +lda #>{c1} sta {z1}+1 //FRAGMENT vwsz1=vwsc1 lda #<{c1} @@ -1306,6 +816,20 @@ lda {z2} sta {z1} lda {z2}+1 sta {z1}+1 +//FRAGMENT vwuz1=vwuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vbuz1_neq_vbuc1_then_la1 +lda #{c1} +cmp {z1} +bne {la1} +//FRAGMENT pbuz1=pbuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 //FRAGMENT vwsz1_lt_0_then_la1 lda {z1}+1 bmi {la1} @@ -1317,16 +841,25 @@ sta {z1} lda #0 sbc {z1}+1 sta {z1}+1 -//FRAGMENT _deref_pbuz1=vbuz2 -lda {z2} -ldy #0 -sta ({z1}),y +//FRAGMENT pbuz1=_inc_pbuz1 +inc {z1} +bne !+ +inc {z1}+1 +!: //FRAGMENT vbuz1=_hi_vwuz2 lda {z2}+1 sta {z1} //FRAGMENT vbuz1=_lo_vwuz2 lda {z2} sta {z1} +//FRAGMENT pbuz1=pbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: //FRAGMENT pbuz1_lt_pbuz2_then_la1 lda {z1}+1 cmp {z2}+1 @@ -1347,17 +880,16 @@ sta {z1} ldy {z2} lda {c1},y sta {z1} +//FRAGMENT vbuz1=vbuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} +//FRAGMENT vbuxx_neq_vbuc1_then_la1 +cpx #{c1} +bne {la1} //FRAGMENT _deref_pbuz1=vbuaa ldy #0 sta ({z1}),y -//FRAGMENT _deref_pbuz1=vbuxx -txa -ldy #0 -sta ({z1}),y -//FRAGMENT _deref_pbuz1=vbuyy -tya -ldy #0 -sta ({z1}),y //FRAGMENT vbuaa=_hi_vwuz1 lda {z1}+1 //FRAGMENT vbuxx=_hi_vwuz1 @@ -1461,9 +993,26 @@ ldy {c1},x //FRAGMENT vbuz1=pbuc1_derefidx_vbuxx lda {c1},x sta {z1} +//FRAGMENT vbuz1=vbuxx_band_vbuc1 +lda #{c1} +sax {z1} +//FRAGMENT vbuaa=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +//FRAGMENT vbuaa=vbuxx_band_vbuc1 +txa +and #{c1} +//FRAGMENT vbuxx=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +tax //FRAGMENT vbuxx=vbuxx_band_vbuc1 lda #{c1} axs #0 +//FRAGMENT vbuyy=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +tay //FRAGMENT vbuyy=vbuxx_band_vbuc1 txa and #{c1} @@ -1472,6 +1021,14 @@ tay lda {c1},x //FRAGMENT vbuaa=pbuc1_derefidx_vbuyy lda {c1},y +//FRAGMENT vbuz1=vbuz1_plus_2 +lda {z1} +clc +adc #2 +sta {z1} +//FRAGMENT vbuxx=vbuxx_plus_2 +inx +inx //FRAGMENT vbuyy=vbuyy_plus_2 iny iny @@ -1493,15 +1050,27 @@ sta {z1} lda {z1}+1 adc {z2}+1 sta {z1}+1 -//FRAGMENT _deref_pbuz1=vbuc1 -lda #{c1} -ldy #0 -sta ({z1}),y +//FRAGMENT vwuz1=_inc_vwuz1 +inc {z1} +bne !+ +inc {z1}+1 +!: +//FRAGMENT pbuz1_neq_pbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} //FRAGMENT vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda ({z1}),y cmp #{c1} bne {la1} +//FRAGMENT vbuz1=_deref_pbuz2 +ldy #0 +lda ({z2}),y +sta {z1} //FRAGMENT vwuz1=vwuz1_minus_vwuc1 lda {z1} sec @@ -1534,11 +1103,6 @@ lda {z2} sec sbc {z3} sta {z1} -//FRAGMENT vbuz1=vbuz2_plus_vbuz3 -lda {z2} -clc -adc {z3} -sta {z1} //FRAGMENT vbuz1=_dec_vbuz1 dec {z1} //FRAGMENT vbuz1_eq_0_then_la1 @@ -1591,6 +1155,11 @@ rol {z1}+1 dey bne !- !e: +//FRAGMENT vwuz1=_word_vbuz2 +lda {z2} +sta {z1} +lda #0 +sta {z1}+1 //FRAGMENT vbuz1_neq_0_then_la1 lda {z1} cmp #0 @@ -1629,6 +1198,17 @@ adc #{c1} //FRAGMENT vbuxx=vbuc1_plus_vbuaa tax axs #-[{c1}] +//FRAGMENT vbuaa=_deref_pbuz1 +ldy #0 +lda ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1 +ldy #0 +lda ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1 +ldy #0 +lda ({z1}),y +tay //FRAGMENT vbuz1=vbuyy_ror_4 tya lsr @@ -1656,6 +1236,13 @@ lsr lsr lsr tay +//FRAGMENT vbuz1=vbuyy_band_vbuc1 +tya +and #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_band_vbuc1 +tya +and #{c1} //FRAGMENT vbuxx=vbuyy_band_vbuc1 ldx #{c1} tya @@ -1962,20 +1549,6 @@ tay //FRAGMENT vbuyy=vbuyy_minus_vbuyy lda #0 tay -//FRAGMENT vbuaa=vbuz1_plus_vbuz2 -lda {z1} -clc -adc {z2} -//FRAGMENT vbuxx=vbuz1_plus_vbuz2 -lda {z1} -clc -adc {z2} -tax -//FRAGMENT vbuyy=vbuz1_plus_vbuz2 -lda {z1} -clc -adc {z2} -tay //FRAGMENT vbuz1=vbuz2_plus_vbuaa clc adc {z2} @@ -1991,63 +1564,6 @@ tax clc adc {z1} tay -//FRAGMENT vbuz1=vbuz2_plus_vbuxx -txa -clc -adc {z2} -sta {z1} -//FRAGMENT vbuaa=vbuz1_plus_vbuxx -txa -clc -adc {z1} -//FRAGMENT vbuxx=vbuz1_plus_vbuxx -txa -clc -adc {z1} -tax -//FRAGMENT vbuyy=vbuz1_plus_vbuxx -txa -clc -adc {z1} -tay -//FRAGMENT vbuz1=vbuz2_plus_vbuyy -tya -clc -adc {z2} -sta {z1} -//FRAGMENT vbuaa=vbuz1_plus_vbuyy -tya -clc -adc {z1} -//FRAGMENT vbuxx=vbuz1_plus_vbuyy -tya -clc -adc {z1} -tax -//FRAGMENT vbuyy=vbuz1_plus_vbuyy -tya -clc -adc {z1} -tay -//FRAGMENT vbuz1=vbuxx_plus_vbuz2 -txa -clc -adc {z2} -sta {z1} -//FRAGMENT vbuaa=vbuxx_plus_vbuz1 -txa -clc -adc {z1} -//FRAGMENT vbuxx=vbuxx_plus_vbuz1 -txa -clc -adc {z1} -tax -//FRAGMENT vbuyy=vbuxx_plus_vbuz1 -txa -clc -adc {z1} -tay //FRAGMENT vbuz1=vbuxx_plus_vbuaa stx $ff clc @@ -2067,63 +1583,6 @@ stx $ff clc adc $ff tay -//FRAGMENT vbuz1=vbuxx_plus_vbuxx -txa -asl -sta {z1} -//FRAGMENT vbuaa=vbuxx_plus_vbuxx -txa -asl -//FRAGMENT vbuxx=vbuxx_plus_vbuxx -txa -asl -tax -//FRAGMENT vbuyy=vbuxx_plus_vbuxx -txa -asl -tay -//FRAGMENT vbuz1=vbuxx_plus_vbuyy -txa -sty $ff -clc -adc $ff -sta {z1} -//FRAGMENT vbuaa=vbuxx_plus_vbuyy -txa -sty $ff -clc -adc $ff -//FRAGMENT vbuxx=vbuxx_plus_vbuyy -txa -sty $ff -clc -adc $ff -tax -//FRAGMENT vbuyy=vbuxx_plus_vbuyy -txa -sty $ff -clc -adc $ff -tay -//FRAGMENT vbuz1=vbuyy_plus_vbuz2 -tya -clc -adc {z2} -sta {z1} -//FRAGMENT vbuaa=vbuyy_plus_vbuz1 -tya -clc -adc {z1} -//FRAGMENT vbuxx=vbuyy_plus_vbuz1 -tya -clc -adc {z1} -tax -//FRAGMENT vbuyy=vbuyy_plus_vbuz1 -tya -clc -adc {z1} -tay //FRAGMENT vbuz1=vbuyy_plus_vbuaa sty $ff clc @@ -2143,44 +1602,6 @@ sty $ff clc adc $ff tay -//FRAGMENT vbuz1=vbuyy_plus_vbuxx -txa -sty $ff -clc -adc $ff -sta {z1} -//FRAGMENT vbuaa=vbuyy_plus_vbuxx -txa -sty $ff -clc -adc $ff -//FRAGMENT vbuxx=vbuyy_plus_vbuxx -txa -sty $ff -clc -adc $ff -tax -//FRAGMENT vbuyy=vbuyy_plus_vbuxx -txa -sty $ff -clc -adc $ff -tay -//FRAGMENT vbuz1=vbuyy_plus_vbuyy -tya -asl -sta {z1} -//FRAGMENT vbuaa=vbuyy_plus_vbuyy -tya -asl -//FRAGMENT vbuxx=vbuyy_plus_vbuyy -tya -asl -tax -//FRAGMENT vbuyy=vbuyy_plus_vbuyy -tya -asl -tay //FRAGMENT vbuxx_eq_0_then_la1 cpx #0 beq {la1} @@ -2286,9 +1707,6 @@ sta {z1} lda {z1} sec sbc #{c1} -//FRAGMENT vbuaa=vbuaa_minus_vbuc1 -sec -sbc #{c1} //FRAGMENT vbuaa=vbuxx_minus_vbuc1 txa sec @@ -2308,6 +1726,14 @@ sta {z1}+1 //FRAGMENT vbsaa_lt_0_then_la1 cmp #0 bmi {la1} +//FRAGMENT vbuz1=vbuaa_band_vbuc1 +and #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_band_vbuc1 +and #{c1} +//FRAGMENT vbuxx=vbuaa_band_vbuc1 +ldx #{c1} +axs #0 //FRAGMENT vbuaa_eq_0_then_la1 cmp #0 beq {la1} @@ -2337,6 +1763,20 @@ rol {z1}+1 dey bne !- !e: +//FRAGMENT vwuz1=_word_vbuaa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_vbuxx +txa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_vbuyy +tya +sta {z1} +lda #0 +sta {z1}+1 //FRAGMENT vbuxx_neq_0_then_la1 cpx #0 bne {la1} @@ -2349,8 +1789,6 @@ beq {la1} txa lsr tax -//FRAGMENT vbuyy=vbuz1 -ldy {z1} //FRAGMENT vbuyy_neq_0_then_la1 cpy #0 bne {la1} @@ -2366,13 +1804,8 @@ tay //FRAGMENT vbuyy_neq_vbuc1_then_la1 cpy #{c1} bne {la1} -//FRAGMENT vbuxx=vbuyy -tya +//FRAGMENT vbuxx=vbuaa tax -//FRAGMENT vbuaa=vbuyy -tya -//FRAGMENT vbuaa=vbuxx -txa //FRAGMENT vbuaa=_dec_vbuaa sec sbc #1 @@ -2398,11 +1831,10 @@ tay //FRAGMENT vbsyy=vbsxx txa tay +//FRAGMENT vbuyy=vbuaa +tay //FRAGMENT vwuz1=vwuz1_sethi_vbuxx stx {z1}+1 -//FRAGMENT vbuxx=vbuxx_minus_vbuc1 -txa -axs #{c1} //FRAGMENT vbuxx=vbuyy_minus_vbuc1 tya tax @@ -2423,11 +1855,6 @@ txa sec sbc #{c1} tay -//FRAGMENT vbuyy=vbuyy_minus_vbuc1 -tya -sec -sbc #{c1} -tay //FRAGMENT vbsyy_ge_0_then_la1 cpy #0 bpl {la1} @@ -2470,39 +1897,9 @@ bne !- lda {z1} cmp {z2} beq {la1} -//FRAGMENT pbuc1_derefidx_vbuz1=vbuz2 -lda {z2} -ldy {z1} -sta {c1},y //FRAGMENT vbuz1_eq_vbuaa_then_la1 cmp {z1} beq {la1} -//FRAGMENT pbuc1_derefidx_vbuz1=vbuxx -ldy {z1} -txa -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuz1=vbuyy -tya -ldy {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=vbuz1 -lda {z1} -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuxx=vbuxx -txa -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuxx=vbuyy -tya -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=vbuz1 -lda {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuyy=vbuxx -txa -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuyy=vbuyy -tya -sta {c1},y //FRAGMENT vbuz1_eq_vbuyy_then_la1 tya cmp {z1} @@ -2516,15 +1913,9 @@ tax sty $ff cpx $ff beq {la1} -//FRAGMENT vbuaa_ge_vbuc1_then_la1 -cmp #{c1} -bcs {la1} //FRAGMENT vbuaa_neq_0_then_la1 cmp #0 bne {la1} -//FRAGMENT vbuyy_ge_vbuc1_then_la1 -cpy #{c1} -bcs {la1} //FRAGMENT vbuc1_neq_pbuz1_derefidx_vbuz2_then_la1 ldy {z2} lda ({z1}),y @@ -2642,9 +2033,6 @@ bne {la1} sty $ff cpx $ff bcc {la1} -//FRAGMENT vbuyy=vbuxx -txa -tay //FRAGMENT pbuc1_derefidx_vbuz1=vbuz1 ldy {z1} tya @@ -2655,9 +2043,80 @@ sta {c1},x //FRAGMENT vbuaa_neq_vbuc1_then_la1 cmp #{c1} bne {la1} -//FRAGMENT vbuaa=_inc_vbuaa +//FRAGMENT vbuz1=vbuz2_rol_1 +lda {z2} +asl +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_vbuc2 +ldy {z1} clc -adc #1 +lda {c1},y +adc #{c2} +sta {c1},y +lda {c1}+1,y +adc #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_pwuc2_derefidx_vbuz1 +ldy {z1} +clc +lda {c1},y +adc {c2},y +sta {c1},y +lda {c1}+1,y +adc {c2}+1,y +sta {c1}+1,y +//FRAGMENT vbuaa=vbuz1_rol_1 +lda {z1} +asl +//FRAGMENT vbuxx=vbuz1_rol_1 +lda {z1} +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_1 +lda {z1} +asl +tay +//FRAGMENT vbuz1=vbuaa_rol_1 +asl +sta {z1} +//FRAGMENT vbuaa=vbuaa_rol_1 +asl +//FRAGMENT vbuxx=vbuaa_rol_1 +asl +tax +//FRAGMENT vbuyy=vbuaa_rol_1 +asl +tay +//FRAGMENT vbuz1=vbuxx_rol_1 +txa +asl +sta {z1} +//FRAGMENT vbuaa=vbuxx_rol_1 +txa +asl +//FRAGMENT vbuxx=vbuxx_rol_1 +txa +asl +tax +//FRAGMENT vbuyy=vbuxx_rol_1 +txa +asl +tay +//FRAGMENT vbuz1=vbuyy_rol_1 +tya +asl +sta {z1} +//FRAGMENT vbuaa=vbuyy_rol_1 +tya +asl +//FRAGMENT vbuxx=vbuyy_rol_1 +tya +asl +tax +//FRAGMENT vbuyy=vbuyy_rol_1 +tya +asl +tay //FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_plus_vbuc2 tay clc @@ -2667,15 +2126,51 @@ sta {c1},y lda {c1}+1,y adc #0 sta {c1}+1,y -//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuc2 -lda #{c2} -ora {c1} -sta {c1} +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_vbuc2 +clc +lda {c1},x +adc #{c2} +sta {c1},x +lda {c1}+1,x +adc #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_vbuc2 +clc +lda {c1},y +adc #{c2} +sta {c1},y +lda {c1}+1,y +adc #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuxx +txa +tay +txa +sty $ff +ldx $ff +tay +clc +lda {c1},y +adc {c2},x +sta {c1},y +lda {c1}+1,y +adc {c2}+1,x +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy +clc +lda {c1},y +adc {c2},y +sta {c1},y +lda {c1}+1,y +adc {c2}+1,y +sta {c1}+1,y //FRAGMENT _deref_qprc1=pprc2 lda #<{c2} sta {c1} lda #>{c2} sta {c1}+1 +//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 +inc {c1} //FRAGMENT _deref_pbuc1_lt_vbuc2_then_la1 lda {c1} cmp #{c2} @@ -2715,9 +2210,6 @@ stx {z1} lax {z1} axs #-[{c1}] stx {z1} -//FRAGMENT _deref_pbuc1=_deref_pbuc2 -lda {c2} -sta {c1} //FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy {z2} lda {c1},y @@ -2736,6 +2228,14 @@ sta {z1} bcc !+ inc {z1}+1 !: +//FRAGMENT pbuz1=pbuc1_plus_vbuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 //FRAGMENT vwuz1=vwuz2_rol_2 lda {z2} asl @@ -2753,6 +2253,12 @@ sta {z1} lda {z2}+1 adc {z3}+1 sta {z1}+1 +//FRAGMENT pwuc1_derefidx_vbuz1=vwuz2 +ldy {z1} +lda {z2} +sta {c1},y +lda {z2}+1 +sta {c1}+1,y //FRAGMENT qbuc1_derefidx_vbuz1=pbuc2 ldy {z1} lda #<{c2} @@ -2786,14 +2292,6 @@ lda {c1},y sta {z1} lda {c1}+1,y sta {z1}+1 -//FRAGMENT pbuz1=pbuc1_plus_vwuz2 -lda {z2} -clc -adc #<{c1} -sta {z1} -lda {z2}+1 -adc #>{c1} -sta {z1}+1 //FRAGMENT pbuz1=pbuz2_plus_vbuz3 lda {z3} clc @@ -2802,6 +2300,11 @@ sta {z1} lda #0 adc {z2}+1 sta {z1}+1 +//FRAGMENT vbuz1=vbuz2_rol_2 +lda {z2} +asl +asl +sta {z1} //FRAGMENT _deref_qbuz1=pbuz2 ldy #0 lda {z2} @@ -2836,13 +2339,10 @@ lda ({z1}),y cmp ({z3}),y beq {la1} -//FRAGMENT vbuz1_gt_0_then_la1 -lda {z1} -bne {la1} -//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 -ldy {z1} -lda {c2},y -sta {c1},y +//FRAGMENT vbuc1_eq_vbuz1_then_la1 +lda #{c1} +cmp {z1} +beq {la1} //FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_band_vbuc2 lda #{c2} ldy {z2} @@ -2853,10 +2353,10 @@ ldy {z2} lda {c1},y lsr sta {z1} -//FRAGMENT vbuz1=vbuz1_minus_vbuc1 -lax {z1} -axs #{c1} -stx {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuz3 +lda {z2} +ora {z3} +sta {z1} //FRAGMENT _deref_pbuz1=_deref_pbuc1 lda {c1} ldy #0 @@ -2895,6 +2395,14 @@ lda {c1},y //FRAGMENT vbsxx=pbsc1_derefidx_vbuz1 ldy {z1} ldx {c1},y +//FRAGMENT vbuxx=vbuxx_plus_vbuc1 +txa +axs #-[{c1}] +//FRAGMENT vbuyy=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +tay //FRAGMENT vbsxx=vbsxx_plus_vbsc1 txa axs #-[{c1}] @@ -2927,6 +2435,45 @@ sta {z1} bcc !+ inc {z1}+1 !: +//FRAGMENT pbuz1=pbuc1_plus_vbuaa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vbuxx +txa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vbuyy +tya +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pwuc1_derefidx_vbuaa=vwuz1 +tay +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=vwuz1 +lda {z1} +sta {c1},x +lda {z1}+1 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vwuz1 +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y //FRAGMENT qbuc1_derefidx_vbuaa=pbuc2 tay lda #<{c2} @@ -3125,17 +2672,69 @@ sta {z1}+1 asl asl sta {z1} +//FRAGMENT vbuz1=vbuxx_rol_2 +txa +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuyy_rol_2 +tya +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuz1_rol_2 +lda {z1} +asl +asl //FRAGMENT vbuaa=vbuaa_rol_2 asl asl +//FRAGMENT vbuaa=vbuxx_rol_2 +txa +asl +asl +//FRAGMENT vbuaa=vbuyy_rol_2 +tya +asl +asl +//FRAGMENT vbuxx=vbuz1_rol_2 +lda {z1} +asl +asl +tax //FRAGMENT vbuxx=vbuaa_rol_2 asl asl tax +//FRAGMENT vbuxx=vbuxx_rol_2 +txa +asl +asl +tax +//FRAGMENT vbuxx=vbuyy_rol_2 +tya +asl +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_2 +lda {z1} +asl +asl +tay //FRAGMENT vbuyy=vbuaa_rol_2 asl asl tay +//FRAGMENT vbuyy=vbuxx_rol_2 +txa +asl +asl +tay +//FRAGMENT vbuyy=vbuyy_rol_2 +tya +asl +asl +tay //FRAGMENT pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx lda {c2},x ldy #{c1} @@ -3192,6 +2791,9 @@ lda ({z1}),y cmp ({z2}),y beq {la1} +//FRAGMENT vbuc1_eq_vbuaa_then_la1 +cmp #{c1} +beq {la1} //FRAGMENT vbuaa_gt_0_then_la1 cmp #0 bne {la1} @@ -3199,12 +2801,6 @@ bne {la1} tay lda {c2},y sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx -lda {c2},x -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy -lda {c2},y -sta {c1},y //FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_band_vbuc2 tay lda #{c2} @@ -3312,6 +2908,36 @@ tay lda {c1},y lsr tay +//FRAGMENT vbuaa=vbuz1_bor_vbuz2 +lda {z1} +ora {z2} +//FRAGMENT vbuxx=vbuz1_bor_vbuz2 +lda {z1} +ora {z2} +tax +//FRAGMENT vbuyy=vbuz1_bor_vbuz2 +lda {z1} +ora {z2} +tay +//FRAGMENT vbuz1=vbuxx_bor_vbuz2 +txa +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuz1 +txa +ora {z1} +//FRAGMENT vbuxx=vbuxx_bor_vbuz1 +txa +ora {z1} +tax +//FRAGMENT vbuyy=vbuxx_bor_vbuz1 +txa +ora {z1} +tay +//FRAGMENT vbuz1=vbuyy_bor_vbuz2 +tya +ora {z2} +sta {z1} //FRAGMENT vbuaa=vbuyy_bor_vbuz1 tya ora {z1} @@ -3323,6 +2949,39 @@ tax tya ora {z1} tay +//FRAGMENT vbuz1=vbuz2_bor_vbuaa +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_bor_vbuaa +ora {z1} +//FRAGMENT vbuxx=vbuz1_bor_vbuaa +ora {z1} +tax +//FRAGMENT vbuyy=vbuz1_bor_vbuaa +ora {z1} +tay +//FRAGMENT vbuz1=vbuxx_bor_vbuaa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuaa +stx $ff +ora $ff +//FRAGMENT vbuxx=vbuxx_bor_vbuaa +stx $ff +ora $ff +tax +//FRAGMENT vbuyy=vbuxx_bor_vbuaa +stx $ff +ora $ff +tay +//FRAGMENT vbuz1=vbuyy_bor_vbuaa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuaa=vbuyy_bor_vbuaa +sty $ff +ora $ff //FRAGMENT vbuxx=vbuyy_bor_vbuaa sty $ff ora $ff @@ -3331,6 +2990,23 @@ tax sty $ff ora $ff tay +//FRAGMENT vbuz1=vbuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_bor_vbuxx +txa +ora {z1} +//FRAGMENT vbuxx=vbuz1_bor_vbuxx +txa +ora {z1} +tax +//FRAGMENT vbuyy=vbuz1_bor_vbuxx +txa +ora {z1} +tay +//FRAGMENT vbuz1=vbuxx_bor_vbuxx +stx {z1} //FRAGMENT pbuc1_derefidx_vbuz1=vbuaa ldy {z1} sta {c1},y @@ -3415,8 +3091,14 @@ tay //FRAGMENT vbsyy=pbsc1_derefidx_vbuz1 ldx {z1} ldy {c1},x -//FRAGMENT vbuxx_gt_0_then_la1 -cpx #0 +//FRAGMENT vbuc1_eq_vbuxx_then_la1 +cpx #{c1} +beq {la1} +//FRAGMENT vbuc1_eq_vbuyy_then_la1 +cpy #{c1} +beq {la1} +//FRAGMENT vbuc1_neq_vbuyy_then_la1 +cpy #{c1} bne {la1} //FRAGMENT vbuz1=vbuyy_bor_vbuxx txa @@ -3500,6 +3182,10 @@ rol {z1}+1 tay lda {z1} sta {c1},y +//FRAGMENT vbuz1=_inc_vbuz2 +ldy {z2} +iny +sty {z1} //FRAGMENT vbuz1=_inc_vbuaa clc adc #1 @@ -3510,12 +3196,19 @@ stx {z1} //FRAGMENT vbuz1=_inc_vbuyy iny sty {z1} +//FRAGMENT vbuaa=_inc_vbuz1 +lda {z1} +clc +adc #1 //FRAGMENT vbuaa=_inc_vbuxx inx txa //FRAGMENT vbuaa=_inc_vbuyy iny tya +//FRAGMENT vbuxx=_inc_vbuz1 +ldx {z1} +inx //FRAGMENT vbuxx=_inc_vbuaa tax inx @@ -3523,6 +3216,9 @@ inx tya tax inx +//FRAGMENT vbuyy=_inc_vbuz1 +ldy {z1} +iny //FRAGMENT vbuyy=_inc_vbuaa tay iny @@ -4401,6 +4097,10 @@ lda {z1} bne {la1} lda {z1}+1 bne {la1} +//FRAGMENT vbuz1=vwuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} //FRAGMENT vduz1=vduz1_plus_vduz2 lda {z1} clc @@ -4455,6 +4155,15 @@ cmp {z1} beq {la1} !: bcc {la1} +//FRAGMENT vwuz1_lt_vwuz2_then_la1 +lda {z1}+1 +cmp {z2}+1 +bcc {la1} +bne !+ +lda {z1} +cmp {z2} +bcc {la1} +!: //FRAGMENT vwuz1=vwuz1_minus_vwuz2 lda {z1} sec @@ -4463,6 +4172,25 @@ sta {z1} lda {z1}+1 sbc {z2}+1 sta {z1}+1 +//FRAGMENT vbuaa=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +//FRAGMENT vbuxx=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tax +//FRAGMENT vbuyy=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tay +//FRAGMENT vbuxx=vbuxx_bxor_vbuc1 +txa +eor #{c1} +tax +//FRAGMENT vbuyy=vbuyy_bxor_vbuc1 +tya +eor #{c1} +tay //FRAGMENT vbuaa=_byte_vwuz1 lda {z1} //FRAGMENT vbuxx=_byte_vwuz1 @@ -4583,16 +4311,58 @@ sta {c1},x lda ({z2}),y ldx {z1} sta {c1},x +//FRAGMENT vbuz1=vbuz2_plus_vbuc1 +lax {z2} +axs #-[{c1}] +stx {z1} //FRAGMENT vbuz1=vbuaa_plus_vbuc1 clc adc #{c1} sta {z1} +//FRAGMENT vbuz1=vbuxx_plus_vbuc1 +txa +axs #-[{c1}] +stx {z1} +//FRAGMENT vbuz1=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} //FRAGMENT vbuaa=vbuaa_plus_vbuc1 clc adc #{c1} +//FRAGMENT vbuaa=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +//FRAGMENT vbuaa=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +//FRAGMENT vbuxx=vbuz1_plus_vbuc1 +lax {z1} +axs #-[{c1}] //FRAGMENT vbuxx=vbuaa_plus_vbuc1 tax axs #-[{c1}] +//FRAGMENT vbuxx=vbuyy_plus_vbuc1 +tya +tax +axs #-[{c1}] +//FRAGMENT vbuyy=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +tay //FRAGMENT vbuz1=vbuz2_plus_vbuz2 lda {z2} asl @@ -4738,43 +4508,12 @@ lda ({z1}),y cmp #0 bne {la1} +//FRAGMENT vbuxx_lt_vbuz1_then_la1 +cpx {z1} +bcc {la1} //FRAGMENT vbuxx=vbuz1_plus_1 ldx {z1} inx -//FRAGMENT vbuz1=vbuaa_plus_vbuz2 -clc -adc {z2} -sta {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuz1 -clc -adc {z1} -//FRAGMENT vbuxx=vbuaa_plus_vbuz1 -clc -adc {z1} -tax -//FRAGMENT vbuyy=vbuaa_plus_vbuz1 -clc -adc {z1} -tay -//FRAGMENT vbuz1=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -sta {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -//FRAGMENT vbuxx=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -tax -//FRAGMENT vbuyy=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -tay //FRAGMENT vwuz1=vbuaa_rol_3 sta {z1} lda #0 @@ -4807,25 +4546,9 @@ asl {z1} rol {z1}+1 asl {z1} rol {z1}+1 -//FRAGMENT vbuz1=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -sta {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -//FRAGMENT vbuxx=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -tax -//FRAGMENT vbuyy=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -tay +//FRAGMENT vbuaa_lt_vbuz1_then_la1 +cmp {z1} +bcc {la1} //FRAGMENT vbuz1_lt_vbuxx_then_la1 cpx {z1} beq !+ @@ -4851,8 +4574,6 @@ sty {z1} sta $ff cpx $ff bcc {la1} -//FRAGMENT vbuz1=vbuz1_plus_1 -inc {z1} //FRAGMENT vbuz1=_lo__deref_pwuc1 lda {c1} sta {z1} @@ -5918,11 +5639,6 @@ sta {z1} lda {z1}+1 adc {c1}+1,y sta {z1}+1 -//FRAGMENT vbuz1_lt_vbuaa_then_la1 -cmp {z1} -beq !+ -bcs {la1} -!: //FRAGMENT vbuxx=vbuxx_minus_2 dex dex @@ -5932,14 +5648,29 @@ dey //FRAGMENT vbuyy_eq_vbuc1_then_la1 cpy #{c1} beq {la1} +//FRAGMENT vbuz1=vbuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_bor_vbuyy +tya +ora {z1} //FRAGMENT pbuz1_derefidx_vbuz2=vbuxx ldy {z2} txa sta ({z1}),y +//FRAGMENT vbuxx=vbuz1_bor_vbuyy +tya +ora {z1} +tax //FRAGMENT pbuz1_derefidx_vbuz2=vbuyy tya ldy {z2} sta ({z1}),y +//FRAGMENT vbuyy=vbuz1_bor_vbuyy +tya +ora {z1} +tay //FRAGMENT pbuz1_derefidx_vbuxx=vbuyy stx $ff tya @@ -6027,10 +5758,6 @@ lda {z2} sta {z1} lda #0 sta {z1}+1 -//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuc2 -lda #{c2} -and {c1} -sta {c1} //FRAGMENT vboz1=vbuz2_lt_vbuc1 lda {z2} cmp #{c1} @@ -6301,6 +6028,15 @@ tay sty $ff ora $ff tay +//FRAGMENT vbuz1=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff //FRAGMENT vbuaa=vbuyy_bor_vbuxx txa sty $ff @@ -6308,6 +6044,11 @@ ora $ff //FRAGMENT pbuz1_derefidx_vbuyy=vbuxx txa sta ({z1}),y +//FRAGMENT vbuxx=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff +tax //FRAGMENT vbuyy=vbuyy_bor_vbuxx txa sty $ff @@ -6398,6 +6139,10 @@ cmp #{c1} beq !+ bcs {la1} !: +//FRAGMENT vbuz1=vbuz2_bxor_vbuc1 +lda #{c1} +eor {z2} +sta {z1} //FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuz1 lda {c1} and {z1} @@ -6406,6 +6151,50 @@ sta {c1} lda {c1} ora {z1} sta {c1} +//FRAGMENT vbuaa=vbuz1_bxor_vbuc1 +lda #{c1} +eor {z1} +//FRAGMENT vbuxx=vbuz1_bxor_vbuc1 +lda #{c1} +eor {z1} +tax +//FRAGMENT vbuyy=vbuz1_bxor_vbuc1 +lda #{c1} +eor {z1} +tay +//FRAGMENT vbuz1=vbuaa_bxor_vbuc1 +eor #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_bxor_vbuc1 +eor #{c1} +//FRAGMENT vbuxx=vbuaa_bxor_vbuc1 +eor #{c1} +tax +//FRAGMENT vbuyy=vbuaa_bxor_vbuc1 +eor #{c1} +tay +//FRAGMENT vbuz1=vbuxx_bxor_vbuc1 +txa +eor #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuxx_bxor_vbuc1 +txa +eor #{c1} +//FRAGMENT vbuyy=vbuxx_bxor_vbuc1 +txa +eor #{c1} +tay +//FRAGMENT vbuz1=vbuyy_bxor_vbuc1 +tya +eor #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_bxor_vbuc1 +tya +eor #{c1} +//FRAGMENT vbuxx=vbuyy_bxor_vbuc1 +tya +eor #{c1} +tax //FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuaa and {c1} sta {c1} @@ -6516,6 +6305,14 @@ sta {z1} lda {z2}+1 sbc #>{c1} sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vbuc1 +lda #{c1} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 //FRAGMENT _deref_pwuz1_le_vwuz2_then_la1 ldy #1 lda ({z1}),y @@ -6739,8 +6536,6 @@ tya //FRAGMENT vbuxx=vbuaa_plus_1 tax inx -//FRAGMENT vbuxx=vbuxx_plus_1 -inx //FRAGMENT vbuxx=vbuyy_plus_1 tya tax @@ -6752,8 +6547,6 @@ iny txa tay iny -//FRAGMENT vbuyy=vbuyy_plus_1 -iny //FRAGMENT vbuxx=pbuc1_derefidx_vbuxx lda {c1},x tax @@ -6854,11 +6647,6 @@ lda STACK_BASE+{c1},x sta {z1} lda STACK_BASE+{c1}+1,x sta {z1}+1 -//FRAGMENT pbuc1_derefidx_vbuz1=_deref_pbuz2 -ldy #0 -lda ({z2}),y -ldy {z1} -sta {c1},y //FRAGMENT _stackpushptr_=pbuc1 lda #>{c1} pha @@ -6896,9 +6684,6 @@ dey sec sbc #1 sta {z1} -//FRAGMENT vbuaa=vbuaa_minus_1 -sec -sbc #1 //FRAGMENT vbuxx=vbuaa_minus_1 tax dex @@ -7082,6 +6867,11 @@ ora {z3} sta {z1} //FRAGMENT vbuyy=_hi_pbuz1 ldy {z1}+1 +//FRAGMENT pvoz1=pvoc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 //FRAGMENT vwuz1_eq_0_then_la1 lda {z1} bne !+ @@ -7104,12 +6894,6 @@ bne {la1} lda {z1} cmp {z2} bne {la1} -//FRAGMENT vwuz1_le_0_then_la1 -lda {z1} -bne !+ -lda {z1}+1 -beq {la1} -!: //FRAGMENT pbuz1=pbuz2_plus_vwuz3 lda {z2} clc @@ -7118,6 +6902,13 @@ sta {z1} lda {z2}+1 adc {z3}+1 sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_band_vwuc1 +lda {z2} +and #<{c1} +sta {z1} +lda {z2}+1 +and #>{c1} +sta {z1}+1 //FRAGMENT _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 ldy #0 lda ({z1}),y @@ -7178,6 +6969,11 @@ bne {la1} lda {c1},y cmp #0 bne {la1} +//FRAGMENT pvoz1=pvoz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 //FRAGMENT pbuz1=pbuz2_minus_vwuc1 lda {z2} sec @@ -7186,14 +6982,6 @@ sta {z1} lda {z2}+1 sbc #>{c1} sta {z1}+1 -//FRAGMENT pssz1=pssc1_plus_vbuz2 -lda {z2} -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 //FRAGMENT vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 ldy #{c2} lda ({z2}),y @@ -7255,6 +7043,10 @@ ror {z1} lda #{c1} eor {z2} sta {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=_byte_vwuz2 +ldy {z1} +lda {z2} +sta {c1},y //FRAGMENT vwuz1=pwuz2_derefidx_vbuc1_ror_4 ldy #{c1} lda ({z2}),y @@ -7439,29 +7231,6 @@ lda {z2} sta {c1},y lda {z2}+1 sta {c1}+1,y -//FRAGMENT pssz1=pssc1_plus_vbuaa -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 -//FRAGMENT pssz1=pssc1_plus_vbuxx -txa -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 -//FRAGMENT pssz1=pssc1_plus_vbuyy -tya -clc -adc #<{c1} -sta {z1} -lda #>{c1} -adc #0 -sta {z1}+1 //FRAGMENT vbuaa=vbuc1_rol_pbuz1_derefidx_vbuc2 ldy #{c2} lda ({z1}),y @@ -7511,6 +7280,16 @@ tax lda #{c1} eor {z1} tay +//FRAGMENT pbuc1_derefidx_vbuaa=_byte_vwuz1 +tay +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=_byte_vwuz1 +lda {z1} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=_byte_vwuz1 +lda {z1} +sta {c1},y //FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa ldy #{c1} tax @@ -7785,6 +7564,8 @@ lda {z1}+1 cmp #>{c1} beq {la1} !: +//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 +dec {c1} //FRAGMENT vwuz1=pwuz2_derefidx_vbuz3 ldy {z3} lda ({z2}),y @@ -8570,6 +8351,40 @@ sta ({z1}),y //FRAGMENT pbuz1_derefidx_vbuyy=vbuyy tya sta ({z1}),y +//FRAGMENT vwuz1=vwuz2_rol_7 +lda {z2}+1 +lsr +lda {z2} +ror +sta {z1}+1 +lda #0 +ror +sta {z1} +//FRAGMENT vwuz1=vwuz2_bxor_vwuz3 +lda {z2} +eor {z3} +sta {z1} +lda {z2}+1 +eor {z3}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_ror_9 +lda {z2}+1 +lsr +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_8 +lda {z2} +sta {z1}+1 +lda #0 +sta {z1} +//FRAGMENT vwuz1=vwuz1_bxor_vwuz2 +lda {z1} +eor {z2} +sta {z1} +lda {z1}+1 +eor {z2}+1 +sta {z1}+1 //FRAGMENT vwuz1=_word_vduz2 lda {z2} sta {z1} @@ -10891,6 +10706,10 @@ inc {z1}+1 lda {z2} ldy #{c1} sta ({z1}),y +//FRAGMENT vbuz1=pbuz2_derefidx_vbuc1 +ldy #{c1} +lda ({z2}),y +sta {z1} //FRAGMENT pbuz1_derefidx_vbuc1=vbuaa ldy #{c1} sta ({z1}),y @@ -10902,6 +10721,17 @@ sta ({z1}),y tya ldy #{c1} sta ({z1}),y +//FRAGMENT vbuaa=pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +//FRAGMENT vbuxx=pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +tay //FRAGMENT vwuz1=vwuc1_plus_vbuz2 lda {z2} clc @@ -11010,11 +10840,18 @@ lda {z1} cmp #<{c1} bcs {la1} !: -//FRAGMENT vwuz1=vwuz1_plus_1 -inc {z1} -bne !+ -inc {z1}+1 +//FRAGMENT vwuz1_ge_vbuc1_then_la1 +lda {z1}+1 +bne {la1} +lda {z1} +cmp #{c1} +bcs {la1} !: +//FRAGMENT vwuz1=vwuz1_rol_8 +lda {z1} +sta {z1}+1 +lda #0 +sta {z1} //FRAGMENT vwuz1=vwuz1_ror_4 lsr {z1}+1 ror {z1} @@ -11915,6 +11752,13 @@ sta {z1}+2 lda {z1}+3 adc #0 sta {z1}+3 +//FRAGMENT vwuz1=vwuz1_band_vwuc1 +lda {z1} +and #<{c1} +sta {z1} +lda {z1}+1 +and #>{c1} +sta {z1}+1 //FRAGMENT vwuz1=vwuc1_plus_vwuz1 clc lda {z1} @@ -12638,6 +12482,16 @@ bne {la1} lda {z1} cmp #<{c1} bne {la1} +//FRAGMENT pwuc1_derefidx_vbuz1=vbuz2 +lda {z1} +ldx {z2} +tay +txa +sta {c1},y +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +sta {z1} //FRAGMENT _deref_pbuc1_lt_vbuz1_then_la1 lda {c1} cmp {z1} @@ -12673,6 +12527,73 @@ sta {z1} ldy {z2} lda {c1}+1,y sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=vbuxx +lda {z1} +tay +txa +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuz1=vbuyy +tya +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=vbuz1 +ldx {z1} +tay +txa +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuaa=vbuxx +tay +txa +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuaa=vbuyy +sty $ff +ldx $ff +tay +txa +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuxx=vbuz1 +lda {z1} +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuxx=vbuxx +txa +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuxx=vbuyy +tya +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vbuz1 +lda {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=vbuxx +tya +tay +txa +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuyy=vbuyy +tya +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT vbuaa=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +//FRAGMENT vbuxx=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +tax +//FRAGMENT vbuyy=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +tay //FRAGMENT _deref_pbuc1_lt_vbuaa_then_la1 ldy {c1} sta $ff @@ -12882,19 +12803,6 @@ ldy #{c2} tax lda ({z1}),y sta {c1},x -//FRAGMENT pssz1=pssc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT pssz1=pssz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -sta {z1} -bcc !+ -inc {z1}+1 -!: //FRAGMENT pbuc1_derefidx_vbuaa=pbuz1_derefidx_vbuc2 ldy #{c2} tax @@ -14766,6 +14674,11 @@ ldy {c1}+1 sty $ff ldy #0 sta ($fe),y +//FRAGMENT vbuyy=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff +tay //FRAGMENT _deref_pwuz1=vbuz2 lda {z2} ldy #0 @@ -15268,6 +15181,19 @@ lda ({z3}),y sta {z1} lda ({z2}),y sta {z1}+1 +//FRAGMENT vbuz1=vbuz2_minus_2 +lda {z2} +sec +sbc #2 +sta {z1} +//FRAGMENT vbuaa=vbuz1_minus_2 +lda {z1} +sec +sbc #2 +//FRAGMENT vbuxx=vbuz1_minus_2 +ldx {z1} +dex +dex //FRAGMENT vbuz1=_deref_pbuc1_plus_2 lda {c1} clc @@ -16925,6 +16851,24 @@ sty $ff ldy #0 lda ($fe),y sta {c1} +//FRAGMENT vbuz1=_hi_pvoz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=_lo_pvoz2 +lda {z2} +sta {z1} +//FRAGMENT vbuaa=_hi_pvoz1 +lda {z1}+1 +//FRAGMENT vbuxx=_hi_pvoz1 +ldx {z1}+1 +//FRAGMENT vbuaa=_lo_pvoz1 +lda {z1} +//FRAGMENT vbuxx=_lo_pvoz1 +ldx {z1} +//FRAGMENT vbuyy=_hi_pvoz1 +ldy {z1}+1 +//FRAGMENT vbuyy=_lo_pvoz1 +ldy {z1} //FRAGMENT vbsz1_eq_vbsc1_then_la1 lda #{c1} cmp {z1} @@ -17638,8 +17582,6 @@ lda ({z1}),y cmp #0 beq {la1} -//FRAGMENT vbuxx=vbuxx_minus_1 -dex //FRAGMENT pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa tay clc @@ -17974,12 +17916,6 @@ tya clc adc {c1} tay -//FRAGMENT vbuz1=vbuz1_minus_1 -dec {z1} -//FRAGMENT vbuyy=vbuyy_minus_1 -tya -tay -dey //FRAGMENT vwsz1=pwsc1_derefidx_vbuz2_plus__deref_pwsz3 ldx {z2} clc @@ -18037,6 +17973,227 @@ adc ({z1}),y sta {z1}+1 pla sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 +lda #{c2} +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=vbuc2 +lda {z1} +ldx #{c2} +tay +txa +sta {c1},y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_ror_8 +ldy {z2} +lda #0 +sta {z1}+1 +lda {c1}+1,y +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_bxor_vwuc2 +ldy {z1} +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT vwuz1_lt_vbuz2_then_la1 +lda {z1}+1 +bne !+ +lda {z1} +cmp {z2} +bcc {la1} +!: +//FRAGMENT vwuz1_ge_vbuz2_then_la1 +lda {z1}+1 +bne {la1} +lda {z1} +cmp {z2} +bcs {la1} +!: +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_vbuc2 +lda #{c2} +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_vbuc2 +ldx {z1} +lda {c1},x +tax +axs #-[{c2}] +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_vbuc2 +lda #{c2} +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_vbuc2 +tay +lda #{c2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_vbuc2 +tay +lda #{c2} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_vbuc2 +tax +lda {c1},x +tax +axs #-[{c2}] +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_vbuc2 +tay +lda #{c2} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_vbuc2 +lda #{c2} +clc +adc {c1},x +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_vbuc2 +lda #{c2} +clc +adc {c1},x +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_vbuc2 +lda {c1},x +tax +axs #-[{c2}] +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_vbuc2 +lda #{c2} +clc +adc {c1},x +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda {c1},y +tax +axs #-[{c2}] +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} +clc +adc {c1},y +tay +//FRAGMENT pwuc1_derefidx_vbuaa=vbuc2 +ldx #{c2} +tay +txa +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuxx=vbuc2 +lda #{c2} +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vbuc2 +lda #{c2} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_plus_pwuc2_derefidx_vbuaa +tax +tay +clc +lda {c1},y +adc {c2},x +sta {c1},y +lda {c1}+1,y +adc {c2}+1,x +sta {c1}+1,y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_ror_8 +txa +tay +lda #0 +sta {z1}+1 +lda {c1}+1,y +sta {z1} +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_ror_8 +lda #0 +sta {z1}+1 +lda {c1}+1,y +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_bxor_vwuc2 +tay +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_bxor_vwuc2 +txa +tay +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_bxor_vwuc2 +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuaa_ror_8 +tay +lda #0 +sta {z1}+1 +lda {c1}+1,y +sta {z1} +//FRAGMENT vwuz1_lt_vbuxx_then_la1 +lda {z1}+1 +bne !+ +stx $ff +lda {z1} +cmp $ff +bcc {la1} +!: +//FRAGMENT vwuz1_lt_vbuyy_then_la1 +lda {z1}+1 +bne !+ +sty $ff +lda {z1} +cmp $ff +bcc {la1} +!: +//FRAGMENT vwuz1_ge_vbuxx_then_la1 +lda {z1}+1 +bne {la1} +stx $ff +lda {z1} +cmp $ff +bcs {la1} +!: +//FRAGMENT vwuz1_ge_vbuyy_then_la1 +lda {z1}+1 +bne {la1} +sty $ff +lda {z1} +cmp $ff +bcs {la1} +!: +//FRAGMENT vbuz1=vbuxx_minus_2 +dex +dex +stx {z1} +//FRAGMENT vbuyy=vbuz1_minus_2 +ldy {z1} +dey +dey //FRAGMENT vwuz1=vwuz2_rol_5 lda {z2} asl diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index 01c19f5ae..e42eb81b1 100644 --- a/src/main/fragment/cache/fragment-cache-wdc65c02.asm +++ b/src/main/fragment/cache/fragment-cache-wdc65c02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 12fc0379b9 12fc039308 +//KICKC FRAGMENT CACHE 12b00eb139 12b00ecab9 //FRAGMENT vbuz1=_deref_pbuc1 lda {c1} sta {z1} diff --git a/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuyy.asm b/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuyy.asm new file mode 100644 index 000000000..5b8860d26 --- /dev/null +++ b/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuyy.asm @@ -0,0 +1,16 @@ +lda ({z1}),y +sta $fe +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +ldy #{c1} +clc +lda ({z1}),y +adc $fe +sta ({z1}),y +iny +lda ({z1}),y +adc $fe +sta ({z1}),y \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_ge_vwsc1_then_la1.asm b/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_ge_vwsc1_then_la1.asm new file mode 100644 index 000000000..3e4194a0f --- /dev/null +++ b/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_ge_vwsc1_then_la1.asm @@ -0,0 +1,9 @@ +lda ({z1}),y +cmp #<{c1} +iny +lda ({z1}),y +sbc #>{c1} +bvc !+ +eor #$80 +!: +bpl {la1} diff --git a/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_gt_vwsc1_then_la1.asm b/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_gt_vwsc1_then_la1.asm new file mode 100644 index 000000000..c6b2d6095 --- /dev/null +++ b/src/main/fragment/mos6502-common/pwsz1_derefidx_vbuyy_gt_vwsc1_then_la1.asm @@ -0,0 +1,10 @@ +lda #<{c1} +cmp ({z1}),y +iny +lda #>{c1} +sbc ({z1}),y +bvc !+ +eor #$80 +!: +bmi {la1} +!e: diff --git a/src/main/fragment/mos6502-common/vwsm1=pwsz2_derefidx_vbuyy_ror_vbuxx.asm b/src/main/fragment/mos6502-common/vwsm1=pwsz2_derefidx_vbuyy_ror_vbuxx.asm new file mode 100644 index 000000000..9a291f2d3 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwsm1=pwsz2_derefidx_vbuyy_ror_vbuxx.asm @@ -0,0 +1,15 @@ +lda ({z2}),y +sta {m1} +iny +lda ({z2}),y +sta {m1}+1 +cpx #0 +beq !e+ +!: +lda {m1}+1 +cmp #$80 +ror {m1}+1 +ror {m1} +dex +bne !- +!e: diff --git a/src/main/java/dk/camelot64/kickc/asm/AsmFormat.java b/src/main/java/dk/camelot64/kickc/asm/AsmFormat.java index 30d558d52..9b698bc8c 100644 --- a/src/main/java/dk/camelot64/kickc/asm/AsmFormat.java +++ b/src/main/java/dk/camelot64/kickc/asm/AsmFormat.java @@ -199,7 +199,7 @@ public class AsmFormat { } else if(SymbolType.DWORD.equals(operandType) || SymbolType.SDWORD.equals(operandType)) { return getAsmConstant(program, new ConstantBinary(operand, Operators.BOOL_AND, new ConstantInteger((long) 0xffff)), outerPrecedence, codeScope); } else { - throw new CompileError("Unhandled type " + operand); + throw new CompileError("Operator _lo_ cannot handle " + operand.toString(program)); } } else if(Operators.HIBYTE.equals(operator)) { SymbolType operandType = SymbolTypeInference.inferType(program.getScope(), operand); @@ -210,7 +210,7 @@ public class AsmFormat { } else if(SymbolType.DWORD.equals(operandType) || SymbolType.SDWORD.equals(operandType)) { return getAsmConstant(program, new ConstantBinary(operand, Operators.SHIFT_RIGHT, new ConstantInteger((long) 16)), outerPrecedence, codeScope); } else { - throw new CompileError("Unhandled type " + operand); + throw new CompileError("Operator _hi_ cannot handle " + operand.toString(program)); } } else if(Operators.INCREMENT.equals(operator)) { return getAsmConstant(program, new ConstantBinary(operand, Operators.PLUS, new ConstantInteger((long) 1)), outerPrecedence, codeScope); @@ -225,7 +225,7 @@ public class AsmFormat { } else if(SymbolType.DWORD.equals(operandType) || SymbolType.SDWORD.equals(operandType)) { return getAsmConstant(program, new ConstantBinary(operand, Operators.BOOL_XOR, new ConstantInteger((long) 0xffffffff)), outerPrecedence, codeScope); } else { - throw new CompileError("Unhandled type " + operand); + throw new CompileError("Operator _bnot_ cannot handle " + operand.toString(program)); } } else if(Operators.POS.equals(operator)) { return getAsmConstant(program, operand, outerPrecedence, codeScope); diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 02319bb0c..10efcbb59 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -224,6 +224,11 @@ public class TestPrograms { compileAndCompare("minus-precedence-problem.c"); } + @Test + public void testbubbles64() throws IOException, URISyntaxException { + compileAndCompare("complex/bubbles64/bubbles64.c"); + } + @Test public void testNesBalls() throws IOException, URISyntaxException { compileAndCompare("complex/nes-balls/kickballs-2.c"); diff --git a/src/test/kc/complex/bubbles64/bubbles64.c b/src/test/kc/complex/bubbles64/bubbles64.c new file mode 100644 index 000000000..a71277813 --- /dev/null +++ b/src/test/kc/complex/bubbles64/bubbles64.c @@ -0,0 +1,172 @@ +// bubbles64 - Q&D C64 port of the bubbles demo from vbcc6502's NES exmaples +// Coded by Lazycow +// Source https://www.lemon64.com/forum/viewtopic.php?t=75283&start=15 + +#include "lazyply.h" + +#define scrPtr (( ubyte*)0xE000) +#define colPtr (( ubyte*)0xD800) +#define vicPtr (( ubyte*)0xD000) +#define chrPtr (( ubyte*)0xF800) +#define onePtr (( ubyte*)0x0001) +#define scr 0xE000 + +enum { + maxSprites=32, + maxSprImages=8, + maxC64Images=256, + sprOff=64 +}; + +ubyte + lcSprMapTab[maxSprImages], + lcSprColTab[maxC64Images]; + +enum { + maxDrawObjects=24, + F=3 +}; +ubyte cmIT[maxSprites+1], + cmSI[maxSprites], cmRX[maxSprites], cmRY[maxSprites], cmRF[maxSprites]; + + +typedef struct { + ubyte + s; // sprite image offset into bubbles[] table + sword + x, y; // coordinates (shifted) + sbyte + vx, vy, // velocity + ax, ay; // accelleration +} DrawObject; + +DrawObject dTab[maxDrawObjects]; + +void Print00(char* p, ubyte v0) { + char c; ubyte v=v0; + c='0'; while (v>=10) { ++c; v-=10; } + *p++=c; + c='0'; while (v>=1) { ++c; v-=1; } + *p++=c; +} + + // sprite support functions +// +ubyte GetSprite() { // get unused or dropped sprite + ubyte t0; for (t0=0;t0=rfDrop) + { cmRF[t0]=0; return t0; } + return 255; +} +void AddSprite(ubyte sn) { // activate prepared sprite into the (i)ndex (t)able + ubyte t0; if (rfDrop==cmRF[sn]) cmRF[sn]=0; else for + (t0=0;t0=128) + { cmRF[sn]=0; cmIT[t0]=sn; return; } +} +void DelSprite(ubyte sn) { // drop sprite, will be removed from IT in IRQ + cmRY[sn]=255; cmRF[sn]=rfDrop; +} + + // +// +int main() { + + register DrawObject* d; + + ubyte + i, + type=0, + stopIt=0, + objects=0, + preset=0; // 1 == preallocate 20 sprites (only for better benchmarking) + // 0 == allocate sprites on the fly (prefered) + uword + oCount=0, + c=0; + + // setup sprite images + lcSprMapTab[0]=sprOff+0; lcSprMapTab[1]=sprOff+1; + lcSprMapTab[2]=sprOff+2; lcSprMapTab[3]=sprOff+3; + lcSprMapTab[4]=sprOff+4; lcSprMapTab[5]=sprOff+5; + // setup sprite colors + flags + lcSprColTab[sprOff+0]=lcSprColTab[sprOff+1]=10|lfMC; + lcSprColTab[sprOff+2]=lcSprColTab[sprOff+3]=5|lfMC; + lcSprColTab[sprOff+4]=lcSprColTab[sprOff+5]=14|lfMC; + + // setup C64 / lazyply + lcVIC17=vicPtr[17]; lcVIC22=vicPtr[22]; lcVIC24=vicPtr[24]; + lcVIC33=6; lcVIC37=1; lcVIC38=11; + for (i=0;is=type; + type+=1; if (type>=6) type=0; + d->x=112<vx=(sbyte)i; d->ax=1; + d->y=24<vy=1<ay=1; + + if (preset && i<20) { + if ((c=GetSprite())<128) { + AddSprite((ubyte)c); + cmSI[i]=cmRX[i]=cmRF[i]=0; + cmRY[i]=i<<4; + } + } + } + + // main loop + c=0; for (;;) { + + // move objects + for (i=0,d=dTab; ivx+=d->ax; + if (d->vx<-32) d->ax=1; else if (d->vx>32) d->ax=-1; + if (d->y>248<vy=-1<y<24<vy=1<x+=d->vx; d->y+=d->vy; + if (cmRF[i]<128) { cmSI[i]=d->s; cmRX[i]=(ubyte)(d->x>>F); cmRY[i]=(ubyte)(d->y>>F); } + } + + // activate new bubble? + c+=1; if (c>=14) { + c=0; + if (0==stopIt && objects1) oCount+=2; else if (oCount>0) oCount-=1; + if (oCount>2 && objects>0) // stop adding objects? + { objects-=1; DelSprite(objects); stopIt=1; oCount=0; } + Print00(scr+(char*)983,objects); + } + return 0; +} diff --git a/src/test/kc/complex/bubbles64/build.sh b/src/test/kc/complex/bubbles64/build.sh new file mode 100644 index 000000000..578d7083e --- /dev/null +++ b/src/test/kc/complex/bubbles64/build.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +rm out.raw +rm out.prg + +#cl65 -Oris -Cl -C c64o.cfg -t c64 bubbles64.c lazyply-ca65.s c64irq-ca65.s c64sprcore-ca65.s -o out.raw || exit + +vc +c64 -+ -Dmain=__main -O3 bubbles64.c -llazyply -o out.raw || exit +exomizer sfx sys out.raw sprites.spr@0xD000 -q -p 1 -m 1 -o out.prg || exit + +#x64 -pal out.prg diff --git a/src/test/kc/complex/bubbles64/lazyply.h b/src/test/kc/complex/bubbles64/lazyply.h new file mode 100644 index 000000000..b9706c5df --- /dev/null +++ b/src/test/kc/complex/bubbles64/lazyply.h @@ -0,0 +1,78 @@ +// lazyply - experimental C64 sprite multiplying code, 'Lazycow 2015 (prealpha) + +typedef signed char sbyte; +typedef unsigned char ubyte; +typedef signed short sword; +typedef unsigned short uword; + + // + // sprites +// + +enum { + lfMC=16, // sprite is multicolor + lfOL=32 // sprite is build out of 2 overlayed sprites (hires over multicolor) +}; + +extern ubyte lcSprMapTab[]; +extern ubyte lcSprColTab[]; + +enum { rfXMSB=16, rfDrop=254, rfNull=255 }; + +//enum { + //scNull=255, // unallocated (63) + //scDrop=254, // will be removed (62) + //scHide=253, // invisible (61) + //scVoid=128, // no collision detection + //scHold=64, // sprite holds on sprite cmSC[]&scMask, offset cmSU[]/cmSV[] + //scMask=63 +//}; + +extern ubyte + cmIT[], // sprite index table (dim must be maxSprites+1!) + cmSI[], // sprite image + //cmSC[], // sprite control + cmRX[], // raw sprite x coordinates (bits 0..7) + cmRY[], // raw sprite y coordinates (bits 0..7) + cmRF[]; // raw sprite flags: 1 == bit 8 of raw x coordinate + + // + // raster interrupt +// + +ubyte lcVIC17, lcVIC22, lcVIC24, lcVIC33, lcVIC37, lcVIC38; + +#if defined(__CC65__) + +ubyte fastcall lcSync(ubyte flags); +ubyte fastcall lcGetPad(ubyte port); + enum { lfU=1, lfD=2, lfL=4, lfR=8, lfA=16, lfB=32 }; + +#elif defined(__VBCC__) + + // flags: 0 + // result: amount of frames since the last call [0..31], +128 on NTSC +// +ubyte lcSync(__reg("a") ubyte flags); + + // port: 0==query both ports (other values not supported, yet) + // result: set of joypad flags +// +ubyte lcGetPad(__reg("a") ubyte port); + enum { lfU=1, lfD=2, lfL=4, lfR=8, lfA=16, lfB=32 }; + +#elif defined(__KICKC__) + + // flags: 0 + // result: amount of frames since the last call [0..31], +128 on NTSC +// +ubyte lcSync(ubyte flags) { return 0; } + + // port: 0==query both ports (other values not supported, yet) + // result: set of joypad flags +// +ubyte lcGetPad(ubyte port) { return 0; } + +enum { lfU=1, lfD=2, lfL=4, lfR=8, lfA=16, lfB=32 }; + +#endif diff --git a/src/test/kc/complex/bubbles64/liblazyply.a b/src/test/kc/complex/bubbles64/liblazyply.a new file mode 100644 index 0000000000000000000000000000000000000000..807c11a05baad591d8723f54304ce3350c205f18 GIT binary patch literal 10446 zcmd^FeQZ=$c0c#cn=c!~*dFth5Nrqr0|Wj52eLFVHkshWBo?NKtTwR++klI|)?;Uf zXi2hHIEoOL#k*=7q((s~Mlq?=U6n4ug@&#hR>PXzCvBxBX?7JrWkV{tR!Mh(Ntm8< z&wZX@6)9V(>K|n^JpX>bd+xpGe!Tb2xkJf@SYPX&M{-uLF8&{VD$8B-mYmk=HSylQ z)}Frh$n&vy*Q%b?IXRuN7xwjb?sJ9WinZ&jtJbZlTEC{axT3rqYfoRRt5I81zTPz0 zlC%Bk+9#}lRlT;n5=3r)d!iqNM*uW$YTr4q8$>`fKyzp78u&KANF4o!E-j-!o-}mkM?vCl2 z*ji_7cYNBQv$bhocPn*{T@93@9-v;ev$58`?<7Eo#+i+y0A<3-Ee1do6iWYf0?0=U zDSJ5&ZQeKzhXMW?U@CPC4gs``!pHULK^PVI#|vc(k3)+pc3OmhkW8nssQ`n3$aR&F z3kn(d#asqHvA|V|U7IBgykeybRx_|gwF@4F0QHqCq6W}Pcl3RGdQrc2RV&w5R`Igl zy{g`)U+9hPZs%ofi}lA4SpYlZaReTKz8)jmW=e&}3xHj(2Z77$l@W^;*sR;mSnJ+x zv7OUvqYIkacdyy#O7X5%T42&l1Mdom@9pT-w8ks{UQp}RrtocHTE_}iU(raFvHLDJ zqA51=l5S+JDeTE=r1C2o!M&}AQp1gCijCCiMzBfn%4Hh6E?1cbJ3IQbM*Bj4g=uI4 zU~{ayt+O4cWm`|LQ9shR0!lcRimz~^+}Qn{o?p|}e(3A(cw(T-ZRA5;xXzef(r(qp z;<$h`gl?KG_kIxpT&dQbwM|d&+C^>(umhUcvfIe9yr;8vU>A5Kgh0XvSiYsbtEr+M zt*v>6m1{Pa+4hQubYIpS!zoSa}()%V!wA`I}KP&!vag z_WHUinoo2&$K^Cc z2>Nzy>cc(H?%lyB$gZabIy((d(;%Xq9lcv(@x841je@(BghmL!^Bt`WB{txh$>+W!EWqcUe%QIne3*|f zl0W!_45ud~8{*1MKPTO)`H=tUi(lNj@!Ma%aVLHA*6q|6U*5UvjU?NxE%Mhl!v1IHu>t?r(^Y(k1vM@}|!f+yt>jI8-Ja9N4Cl1aD7=&{c3<`A`Xr#4* zTzyecr(<)y#T|IfP^%H1zM4p#QkEC)->F}@y0jAMi*?+z_U)YafJ`zKGDGy2+CJL z8+faQ#8`;}BHvmef56bcM#$F~2C9S{W{8c+w;9?G3HcL-FjvU48H1lOob#ZN7a7Wr zV2+Ug$|P7RQ-Wsz5c(syq$zgtRQ) zk7(j$C~HMNzATy8sOK8}MUf}uOeS8`^Nl_xfbziAxkXYI}yt#WGNBc zJDRL8mGuT_Vp32h|ZE?~c>$=d$AT>7d+w zW9d-cq-PY=?X2shD059MzME`$DmblF8HEBtwy87F1ypXx60PQxy{+i(($6MIS7xI5O-Z3KMUxS=ElizZja z^yG%r6*=Z|9FuC32x3fyViWYx=C}F9Mr9I&N<2 zH5rSRXrDC3;_=GO9XdTgXRQZxLpnvF&7=LljA5^v$kF~`5o2Fhq%FiE2EeXJyNE@M zf?bg|5_)6H%j~i4i1reTo{S}JCl=lO5|>i%C|%v1QpzRWq!Z))nK&ejBP-WV4~RB# zZ4)jQMRx?B;UH1|j%j^1-R72-py@W;S{%eq;biu5c7{2AbKF4876v#A7MLguP!54n zI!@LAXGj94Xn+%0ffF;p>8QZz7@+(BZE+F?ID-{9^a08eP{jccaP}u~n0TT=6G4X? znLwT6^8d9!9h>{wK)n(E4+8Z@Oi4MNxhqiDi@K#QO6!5XCTZz#nN8Ax$}f!aMAKGd z^DCq1HEe_euAvvd5%QSrU|V_?VrzBGC zl)h^B9>{3;05a};PVQ{o)alm7 zPhno=lWqI|;%}_W!t&r9@4M{v`2$!};0HzU;s-@BlV4?p)+#ZJUvZbkDiLCpV7`G? zL=+h4S*gQDd;?y#SBTlH7W$TpISA7rFMF4pa8kp0rkbxz%s0@#Ox$N+V5wNh@CNo) z%=1|*%*w3J^VO+ck{{ZlcK;QR@Vc(n9nGn41JK|}0 zRt$SWA#}@lR;)D|n)P}J&idelI65hiAH7c3ve1-o*!FrHd)Qv$AGA*drh+3d82I#H z!*X$gENEIz9=)NfToIVT&VD5@>_uDewVZ3#x>CQ-b3!zHhAkySq#v=o9xMYY^?9az zXwh&MhV5g&7|I>?9!n18YS+u3ycQe|zE$Q=+EX>yMbdl3v+lY#x$sBU$OFmGk60t0 zAGKiJ^`b!^&yGbCHMvquR*K0qOx}XY_r+MQW*oxfIYv(BbL@l~_=yK~Sesw_^QJXGay4=2sUtO@AsE;mwx}>h+ zR~M`x8lX#%E?->5uP#_gG>0y^boufsesw{F=nT5#(dEun{OW>LL}$`v7G2U;@r!@& zClYdSNa~7EDWSraidZUYsb)(hEHz}cn4O>XM>qKYZ~T@@S(qZLh(|>|s@bCw9yR2- zcgF8gDUS-u+@-#?~LD8DO-iTD&kd9uWI(HgjWrD@15~`Rm!WvJ{9q) zs82QfRKll*eD}`yeJbTsVZVy_Rn)JV{VL&CL;ibb{C<`4t8hR?0xB9%%>k7NsG-2U zGyZ@|1ynewB0&`ms^*|d1l3Tm1@kZr5!1nSn5OBUcS}T$1~tVZPZz;P44ie*LOxd| z<9S-aiY4NHx3Gjk35Kv_t_zpC+KP-;;c9CbEEErE5Vpm`t}`24@Q5z57l}=7t;ZQG z5RI<#rwr~F-*Rg`rE?hbMQoXh#^k2{2@c@Q6c}Fq5UU9{w2e}dOYOhE<$)t{8tR~5x&8&0O4_lg$T|0 za~R=UtQH|ON71tpzQZaVI{%mH-sEx138XEml%7}ILPDoOvMr* zf6A(;5%Pku-b+Wzn7)!VweoX@G`>r0LL+f92LEg-J}U}^{1?_~y39E^6bShn(<2^( znj>+*qv=nxEB?DNSt#UWrbj&1pe;Z>-eBk}7j!N{-jUZgO&gSw$&_hhrl7L|y`w2> zlXyl!1Qy^a1)ti|66G)?SMl7P8YDHuke0q6qlOvMa?Z~{JdM|#EXTbnOIRnT@L*o| zha+EVAdY;6v8MD=t};4KLxs^P*Ocortv}3=7Igzda_W(cTEmd`V=Y5kq{lM0k29nZ z^3MQz%APd+eFk`}zm-j>lWm!bJ2Dl&nKAelL)t>mF{G|r7*f|e8B%|{8Is2xroXd* z$NZhF(@gg=q`R<>A$jq9MoloJ{$4QCgp^SBV&MLGQVdCgs06RzTP=w zhNNg4;ZJvZXNK{3LY_AyLS)>KD3J?>G!sc0k{~i+$Pkg!9&YUlp1sI1LsCTWr$O$= zgXFv+5hCM;M2TE5q?t(4kOYwlLxzZ)woN~Hup`F|NfE&xAGseJ$$3K}M8*w?61iYV zGm)er2_h4Q3=uiaFHU&{PmSc5At@sG^CtJ>MRMMd2$69^qC_qj(o7_2NP@_OAwxt? z`^kT9P3$n%Coh>RN&C33-#W+F*L5=15p86tApZ~DQLEjeaLipV)b z!hR&@4T%sLHzZ2rf+5XBl7=LROc*jm`GI<4$&E%LNDI(_#2?vmzHzY!2+>j`d z3x+fkNg9$MGGWLNk<&pl9z2tiV}_)NoHHaGL~`Dc2$69^qC_qj(o7_2NP@_OAw$8X GIsXmuDwWv) literal 0 HcmV?d00001 diff --git a/src/test/kc/complex/bubbles64/sprites.png b/src/test/kc/complex/bubbles64/sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..61d6a57f6498c32fd7d31c0e83c0b9a233fb869c GIT binary patch literal 430 zcmV;f0a5;mP)$0-4z0Tmh0003w zNkldtopWC{)!Y&6TjWa~bjmX124hfS|SLsSY<*w-a+Lg{x z8MMcK6rm0}$^Q11MnG82How;h2&>uV_Zndd7TZS|;AGf7$^a+B_E82)lHvZBqRrxD zxc@n8vp5;U%FxqT? z+d>G%kTqJ_kTqJ>kT+Tl;A8&~02(b10F9OhV2#$;|DOnc0{Z|^)la|z80}vYVAc(A z1MCD41fswu@b-X+D6$7cM3FrpBKqC~Z2u1cu{zdl0I@pOYyh!3)@FbMo46UB0f^W> z253fS0Df<6;%0OP;P(gqLRP1}-ze&|_Zzi3z35KBo%Zhm-D&?GusXfy%(?hQcIBJ+ Y2|V>r&A#dU82|tP07*qoM6N<$g8m@E^8f$< literal 0 HcmV?d00001 diff --git a/src/test/kc/complex/bubbles64/sprites.spr b/src/test/kc/complex/bubbles64/sprites.spr new file mode 100644 index 0000000000000000000000000000000000000000..60552652b76224337cb3a4e0d820c47037fc01a9 GIT binary patch literal 512 zcmZQr#lW#Q*_F zrf{x87zEY>G7*TlRy{!03DGA7G=mcRMJcpjltTOED6}7@A7YFK1IRhE8kn*gxUv=i b1Ck4dm{vD1tpf!(15gbTkU?UT!xR7jCvUFe literal 0 HcmV?d00001 diff --git a/src/test/ref/complex/bubbles64/bubbles64.asm b/src/test/ref/complex/bubbles64/bubbles64.asm new file mode 100644 index 000000000..ea5dcf4be --- /dev/null +++ b/src/test/ref/complex/bubbles64/bubbles64.asm @@ -0,0 +1,733 @@ +// bubbles64 - Q&D C64 port of the bubbles demo from vbcc6502's NES exmaples +// Coded by Lazycow +// Source https://www.lemon64.com/forum/viewtopic.php?t=75283&start=15 +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .const lfMC = $10 + .const rfDrop = $fe + .const maxSprites = $20 + .const maxSprImages = 8 + .const maxC64Images = $100 + .const sprOff = $40 + .const maxDrawObjects = $18 + .const F = 3 +// +// +main: { + .label __27 = $10 + .label __28 = $12 + // main loop + .label c = 2 + // main loop + .label c_1 = 4 + .label d1 = $14 + // setup bubbles + .label type = 6 + // main loop + .label c_2 = 7 + .label d = $b + .label i = $a + .label objects = $d + // 1 == preallocate 20 sprites (only for better benchmarking) + // 0 == allocate sprites on the fly (prefered) + .label oCount = $e + .label stopIt = 9 + .label __109 = $1a + .label __110 = $1c + .label __111 = $16 + .label __112 = $18 + // lcSprMapTab[0]=sprOff+0 + // setup sprite images + lda #sprOff + sta lcSprMapTab + // lcSprMapTab[1]=sprOff+1 + lda #sprOff+1 + sta lcSprMapTab+1 + // lcSprMapTab[2]=sprOff+2 + lda #sprOff+2 + sta lcSprMapTab+2 + // lcSprMapTab[3]=sprOff+3 + lda #sprOff+3 + sta lcSprMapTab+3 + // lcSprMapTab[4]=sprOff+4 + lda #sprOff+4 + sta lcSprMapTab+4 + // lcSprMapTab[5]=sprOff+5 + lda #sprOff+5 + sta lcSprMapTab+5 + // lcSprColTab[sprOff+1]=10|lfMC + lda #$a|lfMC + sta lcSprColTab+sprOff+1 + // lcSprColTab[sprOff+0]=lcSprColTab[sprOff+1]=10|lfMC + // setup sprite colors + flags + sta lcSprColTab+sprOff + // lcSprColTab[sprOff+3]=5|lfMC + lda #5|lfMC + sta lcSprColTab+sprOff+3 + // lcSprColTab[sprOff+2]=lcSprColTab[sprOff+3]=5|lfMC + sta lcSprColTab+sprOff+2 + // lcSprColTab[sprOff+5]=14|lfMC + lda #$e|lfMC + sta lcSprColTab+sprOff+5 + // lcSprColTab[sprOff+4]=lcSprColTab[sprOff+5]=14|lfMC + sta lcSprColTab+sprOff+4 + ldx #0 + __b2: + // for (i=0;i$3e8 + bcs !__b7+ + jmp __b7 + !__b7: + bne !+ + lda.z c + cmp #<$3e8 + bcs !__b7+ + jmp __b7 + !__b7: + !: + // *onePtr=0x33 + // install IRQ + lda #$33 + sta 1 + lda #<0 + sta.z c_1 + sta.z c_1+1 + // now it's save to change "01" + __b8: + // for (c=0;c<2040;c+=1) + lda.z c_1+1 + cmp #>$7f8 + bcs !__b9+ + jmp __b9 + !__b9: + bne !+ + lda.z c_1 + cmp #<$7f8 + bcs !__b9+ + jmp __b9 + !__b9: + !: + // *onePtr=0x35 + lda #$35 + sta 1 + // vicPtr[0xd02]|=3 + lda #3 + ora $d000+$d02 + sta $d000+$d02 + // vicPtr[0xd00]&=~3ub + lda #3^$ff + and $d000+$d00 + sta $d000+$d00 + // scrPtr[997]='P'-'A'+1 + lda #'P'-'A'+1 + sta $e000+$3e5 + // scrPtr[998]='A'-'A'+1 + lda #1 + sta $e000+$3e6 + // scrPtr[999]='L'-'A'+1 + lda #'L'-'A'+1 + sta $e000+$3e7 + // scrPtr[975+0]='B'-'A'+1 + lda #'B'-'A'+1 + sta $e000+$3cf + // scrPtr[975+1]='U'-'A'+1 + lda #'U'-'A'+1 + sta $e000+$3cf+1 + // scrPtr[975+2]='B'-'A'+1 + lda #'B'-'A'+1 + sta $e000+$3cf+2 + // scrPtr[975+3]='B'-'A'+1 + sta $e000+$3cf+3 + // scrPtr[975+4]='L'-'A'+1 + lda #'L'-'A'+1 + sta $e000+$3cf+4 + // scrPtr[975+5]='E'-'A'+1 + lda #'E'-'A'+1 + sta $e000+$3cf+5 + // scrPtr[975+6]='S'-'A'+1 + lda #'S'-'A'+1 + sta $e000+$3cf+6 + // scrPtr[975+7]=':' + lda #':' + sta $e000+$3cf+7 + lda #0 + sta.z type + tax + __b12: + // for (i=0;idTab + sta.z d+1 + lda #0 + sta.z i + // move objects + __b17: + // for (i=0,d=dTab; i=14) + lda.z c_2+1 + cmp #>$e + bcc __b36 + bne !+ + lda.z c_2 + cmp #<$e + bcc __b36 + !: + // if (0==stopIt && objects0) + lda.z oCount + bne !+ + lda.z oCount+1 + beq __b34 + !: + // oCount-=1 + lda.z oCount + sec + sbc #1 + sta.z oCount + lda.z oCount+1 + sbc #0 + sta.z oCount+1 + __b34: + // if (oCount>2 && objects>0) + lda.z oCount+1 + cmp #>2+1 + bcc __b35 + bne !+ + lda.z oCount + cmp #<2+1 + bcc __b35 + !: + lda.z objects + bne __b38 + jmp __b35 + __b38: + // objects-=1 + dec.z objects + // DelSprite(objects) + ldx.z objects + jsr DelSprite + lda #<0 + sta.z oCount + sta.z oCount+1 + lda #1 + sta.z stopIt + __b35: + // Print00(scr+(char*)983,objects) + ldx.z objects + jsr Print00 + jmp __b16 + __b31: + // objects+=1 + inc.z objects + // GetSprite() + jsr GetSprite + // GetSprite() + // i=GetSprite() + // if (0==preset && (i=GetSprite())<128) + cpx #$80 + bcc __b32 + jmp __b36 + __b32: + // AddSprite(i) + jsr AddSprite + // cmRY[i]=0 + lda #0 + sta cmRY,x + // cmRF[i]=cmRY[i]=0 + lda cmRY,x + sta cmRF,x + // cmRX[i]=cmRF[i]=cmRY[i]=0 + lda cmRF,x + sta cmRX,x + // cmSI[i]=cmRX[i]=cmRF[i]=cmRY[i]=0 + lda cmRX,x + sta cmSI,x + jmp __b11 + __b18: + // d->vx+=d->ax + ldy #7 + lda (d),y + ldy #5 + tax + lda (d),y + sty.z $ff + stx.z $ff + clc + adc.z $ff + ldy.z $ff + sta (d),y + // if (d->vx<-32) + ldy #5 + lda (d),y + sec + sbc #-$20 + bvc !+ + eor #$80 + !: + bpl !__b20+ + jmp __b20 + !__b20: + // if (d->vx>32) + ldy #5 + lda (d),y + sec + sbc #$20+1 + bvc !+ + eor #$80 + !: + bmi __b21 + // d->ax=-1 + lda #7 + tay + lda #-1 + sta (d),y + __b21: + // if (d->y>248<$f8<y<24<$18<vy=1<x+=d->vx + ldy #5 + lda (d),y + sta.z $fe + ora #$7f + bmi !+ + lda #0 + !: + sta.z $ff + ldy #1 + clc + lda (d),y + adc.z $fe + sta (d),y + iny + lda (d),y + adc.z $fe + sta (d),y + // d->y+=d->vy + ldy #6 + lda (d),y + sta.z $fe + ora #$7f + bmi !+ + lda #0 + !: + sta.z $ff + ldy #3 + clc + lda (d),y + adc.z $fe + sta (d),y + iny + lda (d),y + adc.z $fe + sta (d),y + // if (cmRF[i]<128) + ldy.z i + lda cmRF,y + cmp #$80 + bcs __b24 + // cmSI[i]=d->s + ldy #0 + lda (d),y + ldy.z i + sta cmSI,y + // d->x>>F + ldx #F + ldy #1 + lda (d),y + sta.z __27 + iny + lda (d),y + sta.z __27+1 + cpx #0 + beq !e+ + !: + lda.z __27+1 + cmp #$80 + ror.z __27+1 + ror.z __27 + dex + bne !- + !e: + // cmRX[i]=(ubyte)(d->x>>F) + ldy.z i + lda.z __27 + sta cmRX,y + // d->y>>F + ldx #F + ldy #3 + lda (d),y + sta.z __28 + iny + lda (d),y + sta.z __28+1 + cpx #0 + beq !e+ + !: + lda.z __28+1 + cmp #$80 + ror.z __28+1 + ror.z __28 + dex + bne !- + !e: + // cmRY[i]=(ubyte)(d->y>>F) + ldy.z i + lda.z __28 + sta cmRY,y + __b24: + // for (i=0,d=dTab; ivy=-1<ax=1 + lda #7 + tay + lda #1 + sta (d),y + jmp __b21 + __b13: + // &dTab[i] + txa + asl + asl + asl + stx.z $ff + clc + adc.z $ff + // d=&dTab[i] + clc + adc #dTab + adc #0 + sta.z d1+1 + // d->s=type + lda.z type + ldy #0 + sta (d1),y + // type+=1 + inc.z type + // if (type>=6) + lda.z type + cmp #6 + bcc __b14 + tya + sta.z type + __b14: + // d->x=112<$70<vx=(sbyte)i + lda #5 + tay + txa + sta (d1),y + // d->ax=1 + lda #7 + tay + lda #1 + sta (d1),y + // d->y=24<$18<vy=1<ay=1 + lda #8 + tay + lda #1 + sta (d1),y + // i+=1 + inx + jmp __b12 + __b9: + // chrPtr[c]=vicPtr[c] + lda.z c_1 + clc + adc #<$d000 + sta.z __111 + lda.z c_1+1 + adc #>$d000 + sta.z __111+1 + lda.z c_1 + clc + adc #<$f800 + sta.z __112 + lda.z c_1+1 + adc #>$f800 + sta.z __112+1 + ldy #0 + lda (__111),y + sta (__112),y + // c+=1 + inc.z c_1 + bne !+ + inc.z c_1+1 + !: + jmp __b8 + __b7: + // scrPtr[c]=32 + lda.z c + clc + adc #<$e000 + sta.z __109 + lda.z c+1 + adc #>$e000 + sta.z __109+1 + lda #$20 + ldy #0 + sta (__109),y + // colPtr[c]=14 + lda.z c + clc + adc #<$d800 + sta.z __110 + lda.z c+1 + adc #>$d800 + sta.z __110+1 + lda #$e + sta (__110),y + // c+=1 + inc.z c + bne !+ + inc.z c+1 + !: + jmp __b6 + __b5: + // cmRF[i]=255 + lda #$ff + sta cmRF,x + // i+=1 + inx + jmp __b4 + __b3: + // cmIT[i]=255 + lda #$ff + sta cmIT,x + // i+=1 + inx + jmp __b2 +} +// DelSprite(byte register(X) sn) +DelSprite: { + // cmRY[sn]=255 + // drop sprite, will be removed from IT in IRQ + lda #$ff + sta cmRY,x + // cmRF[sn]=rfDrop + lda #rfDrop + sta cmRF,x + // } + rts +} +// Print00(byte register(X) v0) +Print00: { + ldy #'0' + __b1: + // while (v>=10) + cpx #$a + bcs __b2 + // *p++=c + sty $e000+$3d7 + ldy #'0' + __b4: + // while (v>=1) + cpx #1 + bcs __b5 + // *p++=c + sty $e000+$3d7+1 + // } + rts + __b5: + // ++c; + iny + // v-=1 + dex + jmp __b4 + __b2: + // ++c; + iny + // v-=10 + txa + axs #$a + jmp __b1 +} +// sprite support functions +// +GetSprite: { + ldx #0 + __b1: + // for (t0=0;t0=rfDrop) + lda cmRF,x + cmp #rfDrop + bcc __b3 + // cmRF[t0]=0 + lda #0 + sta cmRF,x + rts + __b3: + // for (t0=0;t0=128) + lda cmIT,y + cmp #$80 + bcc __b4 + // cmRF[sn]=0 + lda #0 + sta cmRF,x + // cmIT[t0]=sn + txa + sta cmIT,y + rts + __b4: + // t0+=1 + iny + jmp __b2 + __b1: + // cmRF[sn]=0 + lda #0 + sta cmRF,x + rts +} + lcSprMapTab: .fill maxSprImages, 0 + lcSprColTab: .fill maxC64Images, 0 + cmIT: .fill maxSprites+1, 0 + cmSI: .fill maxSprites, 0 + cmRX: .fill maxSprites, 0 + cmRY: .fill maxSprites, 0 + cmRF: .fill maxSprites, 0 + dTab: .fill 9*maxDrawObjects, 0 diff --git a/src/test/ref/complex/bubbles64/bubbles64.cfg b/src/test/ref/complex/bubbles64/bubbles64.cfg new file mode 100644 index 000000000..73c567252 --- /dev/null +++ b/src/test/ref/complex/bubbles64/bubbles64.cfg @@ -0,0 +1,304 @@ + +(signed word()) main() +main: scope:[main] from + [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff + [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 + [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 + [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 + [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 + [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 + [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC + [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) + [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC + [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) + [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC + [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) + to:main::@2 +main::@2: scope:[main] from main main::@3 + [12] (byte) main::i#12 ← phi( main/(byte) 0 main::@3/(byte) main::i#2 ) + [13] if((byte) main::i#12<(const byte) maxSprites+(byte) 1) goto main::@3 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@5 + [14] (byte) main::i#14 ← phi( main::@2/(byte) 0 main::@5/(byte) main::i#4 ) + [15] if((byte) main::i#14<(const byte) maxSprites) goto main::@5 + to:main::@6 +main::@6: scope:[main] from main::@4 main::@7 + [16] (word) main::c#10 ← phi( main::@7/(word) main::c#2 main::@4/(byte) 0 ) + [17] if((word) main::c#10<(word) $3e8) goto main::@7 + to:main::@39 +main::@39: scope:[main] from main::@6 + [18] *((byte*) 1) ← (byte) $33 + to:main::@8 +main::@8: scope:[main] from main::@39 main::@9 + [19] (word) main::c#11 ← phi( main::@9/(word) main::c#4 main::@39/(byte) 0 ) + [20] if((word) main::c#11<(word) $7f8) goto main::@9 + to:main::@10 +main::@10: scope:[main] from main::@8 + [21] *((byte*) 1) ← (byte) $35 + [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 + [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 + to:main::@11 +main::@11: scope:[main] from main::@10 + [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 + [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 + [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 + to:main::@1 +main::@1: scope:[main] from main::@11 + [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 + [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 + [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 + [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 + [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 + [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 + [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 + [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' + to:main::@12 +main::@12: scope:[main] from main::@1 main::@15 + [35] (byte) main::type#4 ← phi( main::@1/(byte) 0 main::@15/(byte) main::type#10 ) + [35] (byte) main::i#17 ← phi( main::@1/(byte) 0 main::@15/(byte) main::i#7 ) + [36] if((byte) main::i#17<(const byte) maxDrawObjects) goto main::@13 + to:main::@16 +main::@16: scope:[main] from main::@12 main::@35 + [37] (word) main::oCount#17 ← phi( main::@12/(word) 0 main::@35/(word) main::oCount#20 ) + [37] (byte) main::stopIt#5 ← phi( main::@12/(byte) 0 main::@35/(byte) main::stopIt#15 ) + [37] (word) main::c#16 ← phi( main::@12/(byte) 0 main::@35/(word) main::c#18 ) + [37] (byte) main::objects#9 ← phi( main::@12/(byte) 0 main::@35/(byte) main::objects#17 ) + to:main::@17 +main::@17: scope:[main] from main::@16 main::@24 + [38] (struct $5*) main::d#10 ← phi( main::@16/(const struct $5*) dTab main::@24/(struct $5*) main::d#2 ) + [38] (byte) main::i#22 ← phi( main::@16/(byte) 0 main::@24/(byte) main::i#9 ) + [39] if((byte) main::i#22<(byte) main::objects#9) goto main::@18 + to:main::@19 +main::@19: scope:[main] from main::@17 + [40] (word) main::c#7 ← (word) main::c#16 + (byte) 1 + [41] if((word) main::c#7<(byte) $e) goto main::@33 + to:main::@30 +main::@30: scope:[main] from main::@19 + [42] if((byte) 0!=(byte) main::stopIt#5) goto main::@33 + to:main::@42 +main::@42: scope:[main] from main::@30 + [43] if((byte) main::objects#9<(const byte) maxDrawObjects) goto main::@31 + to:main::@33 +main::@33: scope:[main] from main::@19 main::@30 main::@41 main::@42 main::@43 + [44] (word) main::c#18 ← phi( main::@19/(word) main::c#7 main::@30/(byte) 0 main::@41/(byte) 0 ) + [44] (byte) main::objects#12 ← phi( main::@19/(byte) main::objects#9 main::@30/(byte) main::objects#9 main::@41/(byte) main::objects#1 ) + to:main::@36 +main::@36: scope:[main] from main::@33 + [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 + to:main::@37 +main::@37: scope:[main] from main::@36 + [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 + to:main::@34 +main::@34: scope:[main] from main::@36 main::@37 + [47] (word) main::oCount#7 ← phi( main::@36/(word) main::oCount#17 main::@37/(word) main::oCount#2 ) + [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 + to:main::@44 +main::@44: scope:[main] from main::@34 + [49] if((byte) main::objects#12>(byte) 0) goto main::@38 + to:main::@35 +main::@38: scope:[main] from main::@44 + [50] (byte) main::objects#15 ← (byte) main::objects#12 - (byte) 1 + [51] (byte) DelSprite::sn#0 ← (byte) main::objects#15 + [52] call DelSprite + to:main::@35 +main::@35: scope:[main] from main::@34 main::@38 main::@44 + [53] (word) main::oCount#20 ← phi( main::@34/(word) main::oCount#7 main::@38/(byte) 0 ) + [53] (byte) main::stopIt#15 ← phi( main::@34/(byte) main::stopIt#5 main::@38/(byte) 1 ) + [53] (byte) main::objects#17 ← phi( main::@34/(byte) main::objects#12 main::@38/(byte) main::objects#15 ) + [54] (byte) Print00::v0#0 ← (byte) main::objects#17 + [55] call Print00 + to:main::@16 +main::@31: scope:[main] from main::@42 + [56] (byte) main::objects#1 ← (byte) main::objects#9 + (byte) 1 + [57] call GetSprite + [58] (byte) GetSprite::return#4 ← (byte) GetSprite::return#2 + to:main::@40 +main::@40: scope:[main] from main::@31 + [59] (byte) main::i#11 ← (byte) GetSprite::return#4 + to:main::@43 +main::@43: scope:[main] from main::@40 + [60] if((byte) main::i#11<(byte) $80) goto main::@32 + to:main::@33 +main::@32: scope:[main] from main::@43 + [61] (byte) AddSprite::sn#1 ← (byte) main::i#11 + [62] call AddSprite + to:main::@41 +main::@41: scope:[main] from main::@32 + [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 + [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) + [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) + [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) + to:main::@33 +main::@18: scope:[main] from main::@17 + [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) + [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 + to:main::@25 +main::@25: scope:[main] from main::@18 + [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 + to:main::@26 +main::@26: scope:[main] from main::@25 + [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 + to:main::@21 +main::@21: scope:[main] from main::@20 main::@25 main::@26 + [71] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>(signed word)(byte) $f8<<(const byte) F) goto main::@22 + to:main::@27 +main::@27: scope:[main] from main::@21 + [72] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>=(signed word)(byte) $18<<(const byte) F) goto main::@23 + to:main::@28 +main::@28: scope:[main] from main::@27 + [73] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F + to:main::@23 +main::@23: scope:[main] from main::@22 main::@27 main::@28 + [74] *((signed word*)(struct $5*) main::d#10 + (byte) 1) ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) + *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + [75] *((signed word*)(struct $5*) main::d#10 + (byte) 3) ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) + *((signed byte*)(struct $5*) main::d#10 + (byte) 6) + [76] if(*((const byte*) cmRF + (byte) main::i#22)>=(byte) $80) goto main::@24 + to:main::@29 +main::@29: scope:[main] from main::@23 + [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) + [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F + [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 + [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F + [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 + to:main::@24 +main::@24: scope:[main] from main::@23 main::@29 + [82] (struct $5*) main::d#2 ← (struct $5*) main::d#10 + (byte) 9 + [83] (byte) main::i#9 ← (byte) main::i#22 + (byte) 1 + to:main::@17 +main::@22: scope:[main] from main::@21 + [84] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) -1<<(const byte) F + to:main::@23 +main::@20: scope:[main] from main::@18 + [85] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) 1 + to:main::@21 +main::@13: scope:[main] from main::@12 + [86] (byte~) main::$132 ← (byte) main::i#17 << (byte) 3 + [87] (byte~) main::$52 ← (byte~) main::$132 + (byte) main::i#17 + [88] (struct $5*) main::d1#0 ← (const struct $5*) dTab + (byte~) main::$52 + [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 + [90] (byte) main::type#2 ← (byte) main::type#4 + (byte) 1 + [91] if((byte) main::type#2<(byte) 6) goto main::@45 + to:main::@14 +main::@45: scope:[main] from main::@13 + [92] phi() + to:main::@14 +main::@14: scope:[main] from main::@13 main::@45 + [93] (byte) main::type#10 ← phi( main::@45/(byte) main::type#2 main::@13/(byte) 0 ) + [94] *((signed word*)(struct $5*) main::d1#0 + (byte) 1) ← (signed word)(byte) $70<<(const byte) F + [95] *((signed byte*)(struct $5*) main::d1#0 + (byte) 5) ← (signed byte)(byte) main::i#17 + [96] *((signed byte*)(struct $5*) main::d1#0 + (byte) 7) ← (signed byte) 1 + [97] *((signed word*)(struct $5*) main::d1#0 + (byte) 3) ← (signed word)(byte) $18<<(const byte) F + [98] *((signed byte*)(struct $5*) main::d1#0 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F + [99] *((signed byte*)(struct $5*) main::d1#0 + (byte) 8) ← (signed byte) 1 + to:main::@15 +main::@15: scope:[main] from main::@14 + [100] (byte) main::i#7 ← (byte) main::i#17 + (byte) 1 + to:main::@12 +main::@9: scope:[main] from main::@8 + [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 + [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 + [103] *((byte*~) main::$112) ← *((byte*~) main::$111) + [104] (word) main::c#4 ← (word) main::c#11 + (byte) 1 + to:main::@8 +main::@7: scope:[main] from main::@6 + [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 + [106] *((byte*~) main::$109) ← (byte) $20 + [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 + [108] *((byte*~) main::$110) ← (byte) $e + [109] (word) main::c#2 ← (word) main::c#10 + (byte) 1 + to:main::@6 +main::@5: scope:[main] from main::@4 + [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff + [111] (byte) main::i#4 ← (byte) main::i#14 + (byte) 1 + to:main::@4 +main::@3: scope:[main] from main::@2 + [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff + [113] (byte) main::i#2 ← (byte) main::i#12 + (byte) 1 + to:main::@2 + +(void()) DelSprite((byte) DelSprite::sn) +DelSprite: scope:[DelSprite] from main::@38 + [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff + [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop + to:DelSprite::@return +DelSprite::@return: scope:[DelSprite] from DelSprite + [116] return + to:@return + +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +Print00: scope:[Print00] from main::@35 + [117] phi() + to:Print00::@1 +Print00::@1: scope:[Print00] from Print00 Print00::@2 + [118] (byte) Print00::c#5 ← phi( Print00/(byte) '0' Print00::@2/(byte) Print00::c#2 ) + [118] (byte) Print00::v#3 ← phi( Print00/(byte) Print00::v0#0 Print00::@2/(byte) Print00::v#1 ) + [119] if((byte) Print00::v#3>=(byte) $a) goto Print00::@2 + to:Print00::@3 +Print00::@3: scope:[Print00] from Print00::@1 + [120] *((word) $e000+(byte*) 983) ← (byte) Print00::c#5 + to:Print00::@4 +Print00::@4: scope:[Print00] from Print00::@3 Print00::@5 + [121] (byte) Print00::c#10 ← phi( Print00::@3/(byte) '0' Print00::@5/(byte) Print00::c#4 ) + [121] (byte) Print00::v#5 ← phi( Print00::@3/(byte) Print00::v#3 Print00::@5/(byte) Print00::v#2 ) + [122] if((byte) Print00::v#5>=(byte) 1) goto Print00::@5 + to:Print00::@6 +Print00::@6: scope:[Print00] from Print00::@4 + [123] *((word) $e000+(byte*) 983+(byte) 1) ← (byte) Print00::c#10 + to:Print00::@return +Print00::@return: scope:[Print00] from Print00::@6 + [124] return + to:@return +Print00::@5: scope:[Print00] from Print00::@4 + [125] (byte) Print00::c#4 ← ++ (byte) Print00::c#10 + [126] (byte) Print00::v#2 ← (byte) Print00::v#5 - (byte) 1 + to:Print00::@4 +Print00::@2: scope:[Print00] from Print00::@1 + [127] (byte) Print00::c#2 ← ++ (byte) Print00::c#5 + [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a + to:Print00::@1 + +(byte()) GetSprite() +GetSprite: scope:[GetSprite] from main::@31 + [129] phi() + to:GetSprite::@1 +GetSprite::@1: scope:[GetSprite] from GetSprite GetSprite::@3 + [130] (byte) GetSprite::t0#3 ← phi( GetSprite/(byte) 0 GetSprite::@3/(byte) GetSprite::t0#2 ) + [131] if((byte) GetSprite::t0#3<(const byte) maxSprites) goto GetSprite::@2 + to:GetSprite::@return +GetSprite::@return: scope:[GetSprite] from GetSprite::@1 GetSprite::@4 + [132] (byte) GetSprite::return#2 ← phi( GetSprite::@1/(byte) $ff GetSprite::@4/(byte) GetSprite::t0#3 ) + [133] return + to:@return +GetSprite::@2: scope:[GetSprite] from GetSprite::@1 + [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 + to:GetSprite::@4 +GetSprite::@4: scope:[GetSprite] from GetSprite::@2 + [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 + to:GetSprite::@return +GetSprite::@3: scope:[GetSprite] from GetSprite::@2 + [136] (byte) GetSprite::t0#2 ← ++ (byte) GetSprite::t0#3 + to:GetSprite::@1 + +(void()) AddSprite((byte) AddSprite::sn) +AddSprite: scope:[AddSprite] from main::@32 + [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 + to:AddSprite::@2 +AddSprite::@2: scope:[AddSprite] from AddSprite AddSprite::@4 + [138] (byte) AddSprite::t0#3 ← phi( AddSprite/(byte) 0 AddSprite::@4/(byte) AddSprite::t0#2 ) + [139] if((byte) AddSprite::t0#3<(const byte) maxSprites) goto AddSprite::@3 + to:AddSprite::@return +AddSprite::@return: scope:[AddSprite] from AddSprite::@1 AddSprite::@2 AddSprite::@5 + [140] return + to:@return +AddSprite::@3: scope:[AddSprite] from AddSprite::@2 + [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 + to:AddSprite::@5 +AddSprite::@5: scope:[AddSprite] from AddSprite::@3 + [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 + [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 + to:AddSprite::@return +AddSprite::@4: scope:[AddSprite] from AddSprite::@3 + [144] (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#3 + (byte) 1 + to:AddSprite::@2 +AddSprite::@1: scope:[AddSprite] from AddSprite + [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 + to:AddSprite::@return diff --git a/src/test/ref/complex/bubbles64/bubbles64.log b/src/test/ref/complex/bubbles64/bubbles64.log new file mode 100644 index 000000000..2c4557497 --- /dev/null +++ b/src/test/ref/complex/bubbles64/bubbles64.log @@ -0,0 +1,6975 @@ +Inlined call call __init + +CONTROL FLOW GRAPH SSA + +(byte()) lcSync((byte) lcSync::flags) +lcSync: scope:[lcSync] from main::@11 main::@42 + (byte) lcSync::return#0 ← (number) 0 + to:lcSync::@return +lcSync::@return: scope:[lcSync] from lcSync + (byte) lcSync::return#4 ← phi( lcSync/(byte) lcSync::return#0 ) + (byte) lcSync::return#1 ← (byte) lcSync::return#4 + return + to:@return + +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +Print00: scope:[Print00] from main::@45 + (byte*) Print00::p#7 ← phi( main::@45/(byte*) Print00::p#2 ) + (byte) Print00::v0#1 ← phi( main::@45/(byte) Print00::v0#0 ) + (byte) Print00::c#0 ← (byte) 0 + (byte) Print00::v#0 ← (byte) Print00::v0#1 + (byte) Print00::c#1 ← (byte) '0' + to:Print00::@1 +Print00::@1: scope:[Print00] from Print00 Print00::@2 + (byte*) Print00::p#5 ← phi( Print00/(byte*) Print00::p#7 Print00::@2/(byte*) Print00::p#8 ) + (byte) Print00::c#9 ← phi( Print00/(byte) Print00::c#1 Print00::@2/(byte) Print00::c#2 ) + (byte) Print00::v#3 ← phi( Print00/(byte) Print00::v#0 Print00::@2/(byte) Print00::v#1 ) + (bool~) Print00::$0 ← (byte) Print00::v#3 >= (number) $a + if((bool~) Print00::$0) goto Print00::@2 + to:Print00::@3 +Print00::@2: scope:[Print00] from Print00::@1 + (byte*) Print00::p#8 ← phi( Print00::@1/(byte*) Print00::p#5 ) + (byte) Print00::v#4 ← phi( Print00::@1/(byte) Print00::v#3 ) + (byte) Print00::c#5 ← phi( Print00::@1/(byte) Print00::c#9 ) + (byte) Print00::c#2 ← ++ (byte) Print00::c#5 + (byte) Print00::v#1 ← (byte) Print00::v#4 - (number) $a + to:Print00::@1 +Print00::@3: scope:[Print00] from Print00::@1 + (byte) Print00::v#7 ← phi( Print00::@1/(byte) Print00::v#3 ) + (byte*) Print00::p#3 ← phi( Print00::@1/(byte*) Print00::p#5 ) + (byte) Print00::c#6 ← phi( Print00::@1/(byte) Print00::c#9 ) + *((byte*) Print00::p#3) ← (byte) Print00::c#6 + (byte*) Print00::p#0 ← ++ (byte*) Print00::p#3 + (byte) Print00::c#3 ← (byte) '0' + to:Print00::@4 +Print00::@4: scope:[Print00] from Print00::@3 Print00::@5 + (byte*) Print00::p#6 ← phi( Print00::@3/(byte*) Print00::p#0 Print00::@5/(byte*) Print00::p#9 ) + (byte) Print00::c#10 ← phi( Print00::@3/(byte) Print00::c#3 Print00::@5/(byte) Print00::c#4 ) + (byte) Print00::v#5 ← phi( Print00::@3/(byte) Print00::v#7 Print00::@5/(byte) Print00::v#2 ) + (bool~) Print00::$1 ← (byte) Print00::v#5 >= (number) 1 + if((bool~) Print00::$1) goto Print00::@5 + to:Print00::@6 +Print00::@5: scope:[Print00] from Print00::@4 + (byte*) Print00::p#9 ← phi( Print00::@4/(byte*) Print00::p#6 ) + (byte) Print00::v#6 ← phi( Print00::@4/(byte) Print00::v#5 ) + (byte) Print00::c#7 ← phi( Print00::@4/(byte) Print00::c#10 ) + (byte) Print00::c#4 ← ++ (byte) Print00::c#7 + (byte) Print00::v#2 ← (byte) Print00::v#6 - (number) 1 + to:Print00::@4 +Print00::@6: scope:[Print00] from Print00::@4 + (byte*) Print00::p#4 ← phi( Print00::@4/(byte*) Print00::p#6 ) + (byte) Print00::c#8 ← phi( Print00::@4/(byte) Print00::c#10 ) + *((byte*) Print00::p#4) ← (byte) Print00::c#8 + (byte*) Print00::p#1 ← ++ (byte*) Print00::p#4 + to:Print00::@return +Print00::@return: scope:[Print00] from Print00::@6 + return + to:@return + +(byte()) GetSprite() +GetSprite: scope:[GetSprite] from main::@22 main::@40 + (byte) GetSprite::t0#0 ← (byte) 0 + (byte) GetSprite::t0#1 ← (number) 0 + to:GetSprite::@1 +GetSprite::@1: scope:[GetSprite] from GetSprite GetSprite::@4 + (byte) GetSprite::t0#3 ← phi( GetSprite/(byte) GetSprite::t0#1 GetSprite::@4/(byte) GetSprite::t0#2 ) + (bool~) GetSprite::$0 ← (byte) GetSprite::t0#3 < (const byte) maxSprites + if((bool~) GetSprite::$0) goto GetSprite::@2 + to:GetSprite::@3 +GetSprite::@2: scope:[GetSprite] from GetSprite::@1 + (byte) GetSprite::t0#4 ← phi( GetSprite::@1/(byte) GetSprite::t0#3 ) + (bool~) GetSprite::$1 ← *((const byte*) cmRF + (byte) GetSprite::t0#4) >= (const byte) rfDrop + (bool~) GetSprite::$2 ← ! (bool~) GetSprite::$1 + if((bool~) GetSprite::$2) goto GetSprite::@4 + to:GetSprite::@5 +GetSprite::@3: scope:[GetSprite] from GetSprite::@1 + (byte) GetSprite::return#0 ← (number) $ff + to:GetSprite::@return +GetSprite::@4: scope:[GetSprite] from GetSprite::@2 + (byte) GetSprite::t0#5 ← phi( GetSprite::@2/(byte) GetSprite::t0#4 ) + (byte) GetSprite::t0#2 ← ++ (byte) GetSprite::t0#5 + to:GetSprite::@1 +GetSprite::@5: scope:[GetSprite] from GetSprite::@2 + (byte) GetSprite::t0#6 ← phi( GetSprite::@2/(byte) GetSprite::t0#4 ) + *((const byte*) cmRF + (byte) GetSprite::t0#6) ← (number) 0 + (byte) GetSprite::return#1 ← (byte) GetSprite::t0#6 + to:GetSprite::@return +GetSprite::@return: scope:[GetSprite] from GetSprite::@3 GetSprite::@5 + (byte) GetSprite::return#5 ← phi( GetSprite::@3/(byte) GetSprite::return#0 GetSprite::@5/(byte) GetSprite::return#1 ) + (byte) GetSprite::return#2 ← (byte) GetSprite::return#5 + return + to:@return + +(void()) AddSprite((byte) AddSprite::sn) +AddSprite: scope:[AddSprite] from main::@23 main::@41 + (byte) AddSprite::sn#2 ← phi( main::@23/(byte) AddSprite::sn#0 main::@41/(byte) AddSprite::sn#1 ) + (byte) AddSprite::t0#0 ← (byte) 0 + (bool~) AddSprite::$0 ← (const byte) rfDrop == *((const byte*) cmRF + (byte) AddSprite::sn#2) + if((bool~) AddSprite::$0) goto AddSprite::@1 + to:AddSprite::@2 +AddSprite::@1: scope:[AddSprite] from AddSprite + (byte) AddSprite::sn#3 ← phi( AddSprite/(byte) AddSprite::sn#2 ) + *((const byte*) cmRF + (byte) AddSprite::sn#3) ← (number) 0 + to:AddSprite::@return +AddSprite::@2: scope:[AddSprite] from AddSprite + (byte) AddSprite::sn#7 ← phi( AddSprite/(byte) AddSprite::sn#2 ) + (byte) AddSprite::t0#1 ← (number) 0 + to:AddSprite::@3 +AddSprite::@3: scope:[AddSprite] from AddSprite::@2 AddSprite::@5 + (byte) AddSprite::sn#6 ← phi( AddSprite::@2/(byte) AddSprite::sn#7 AddSprite::@5/(byte) AddSprite::sn#8 ) + (byte) AddSprite::t0#3 ← phi( AddSprite::@2/(byte) AddSprite::t0#1 AddSprite::@5/(byte) AddSprite::t0#2 ) + (bool~) AddSprite::$1 ← (byte) AddSprite::t0#3 < (const byte) maxSprites + if((bool~) AddSprite::$1) goto AddSprite::@4 + to:AddSprite::@return +AddSprite::@4: scope:[AddSprite] from AddSprite::@3 + (byte) AddSprite::sn#5 ← phi( AddSprite::@3/(byte) AddSprite::sn#6 ) + (byte) AddSprite::t0#4 ← phi( AddSprite::@3/(byte) AddSprite::t0#3 ) + (bool~) AddSprite::$2 ← *((const byte*) cmIT + (byte) AddSprite::t0#4) >= (number) $80 + (bool~) AddSprite::$3 ← ! (bool~) AddSprite::$2 + if((bool~) AddSprite::$3) goto AddSprite::@5 + to:AddSprite::@6 +AddSprite::@5: scope:[AddSprite] from AddSprite::@4 + (byte) AddSprite::sn#8 ← phi( AddSprite::@4/(byte) AddSprite::sn#5 ) + (byte) AddSprite::t0#5 ← phi( AddSprite::@4/(byte) AddSprite::t0#4 ) + (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#5 + (number) 1 + to:AddSprite::@3 +AddSprite::@6: scope:[AddSprite] from AddSprite::@4 + (byte) AddSprite::t0#6 ← phi( AddSprite::@4/(byte) AddSprite::t0#4 ) + (byte) AddSprite::sn#4 ← phi( AddSprite::@4/(byte) AddSprite::sn#5 ) + *((const byte*) cmRF + (byte) AddSprite::sn#4) ← (number) 0 + *((const byte*) cmIT + (byte) AddSprite::t0#6) ← (byte) AddSprite::sn#4 + to:AddSprite::@return +AddSprite::@return: scope:[AddSprite] from AddSprite::@1 AddSprite::@3 AddSprite::@6 + return + to:@return + +(void()) DelSprite((byte) DelSprite::sn) +DelSprite: scope:[DelSprite] from main::@48 + (byte) DelSprite::sn#1 ← phi( main::@48/(byte) DelSprite::sn#0 ) + *((const byte*) cmRY + (byte) DelSprite::sn#1) ← (number) $ff + *((const byte*) cmRF + (byte) DelSprite::sn#1) ← (const byte) rfDrop + to:DelSprite::@return +DelSprite::@return: scope:[DelSprite] from DelSprite + return + to:@return + +(signed word()) main() +main: scope:[main] from __start::@1 + (struct $5*) main::d#0 ← (struct $5*) 0 + (byte) main::i#0 ← (byte) 0 + (byte) main::type#0 ← (byte) 0 + (byte) main::stopIt#0 ← (byte) 0 + (byte) main::objects#0 ← (byte) 0 + (word) main::oCount#0 ← (word) 0 + (word) main::c#0 ← (word) 0 + *((const byte*) lcSprMapTab + (number) 0) ← (const byte) sprOff+(number) 0 + *((const byte*) lcSprMapTab + (number) 1) ← (const byte) sprOff+(number) 1 + *((const byte*) lcSprMapTab + (number) 2) ← (const byte) sprOff+(number) 2 + *((const byte*) lcSprMapTab + (number) 3) ← (const byte) sprOff+(number) 3 + *((const byte*) lcSprMapTab + (number) 4) ← (const byte) sprOff+(number) 4 + *((const byte*) lcSprMapTab + (number) 5) ← (const byte) sprOff+(number) 5 + *((const byte*) lcSprColTab + (const byte) sprOff+(number) 1) ← (number) $a|(const byte) lfMC + *((const byte*) lcSprColTab + (const byte) sprOff+(number) 0) ← *((const byte*) lcSprColTab + (const byte) sprOff+(number) 1) + *((const byte*) lcSprColTab + (const byte) sprOff+(number) 3) ← (number) 5|(const byte) lfMC + *((const byte*) lcSprColTab + (const byte) sprOff+(number) 2) ← *((const byte*) lcSprColTab + (const byte) sprOff+(number) 3) + *((const byte*) lcSprColTab + (const byte) sprOff+(number) 5) ← (number) $e|(const byte) lfMC + *((const byte*) lcSprColTab + (const byte) sprOff+(number) 4) ← *((const byte*) lcSprColTab + (const byte) sprOff+(number) 5) + (byte) main::i#1 ← (number) 0 + to:main::@3 +main::@3: scope:[main] from main main::@4 + (word) main::oCount#55 ← phi( main/(word) main::oCount#0 main::@4/(word) main::oCount#56 ) + (byte) main::stopIt#53 ← phi( main/(byte) main::stopIt#0 main::@4/(byte) main::stopIt#54 ) + (byte) main::objects#56 ← phi( main/(byte) main::objects#0 main::@4/(byte) main::objects#57 ) + (byte) main::i#12 ← phi( main/(byte) main::i#1 main::@4/(byte) main::i#2 ) + (bool~) main::$2 ← (byte) main::i#12 < (const byte) maxSprites+(number) 1 + if((bool~) main::$2) goto main::@4 + to:main::@5 +main::@4: scope:[main] from main::@3 + (word) main::oCount#56 ← phi( main::@3/(word) main::oCount#55 ) + (byte) main::stopIt#54 ← phi( main::@3/(byte) main::stopIt#53 ) + (byte) main::objects#57 ← phi( main::@3/(byte) main::objects#56 ) + (byte) main::i#13 ← phi( main::@3/(byte) main::i#12 ) + *((const byte*) cmIT + (byte) main::i#13) ← (number) $ff + (byte) main::i#2 ← (byte) main::i#13 + (number) 1 + to:main::@3 +main::@5: scope:[main] from main::@3 + (word) main::oCount#53 ← phi( main::@3/(word) main::oCount#55 ) + (byte) main::stopIt#51 ← phi( main::@3/(byte) main::stopIt#53 ) + (byte) main::objects#54 ← phi( main::@3/(byte) main::objects#56 ) + (byte) main::i#3 ← (number) 0 + to:main::@6 +main::@6: scope:[main] from main::@5 main::@7 + (word) main::oCount#52 ← phi( main::@5/(word) main::oCount#53 main::@7/(word) main::oCount#54 ) + (byte) main::stopIt#50 ← phi( main::@5/(byte) main::stopIt#51 main::@7/(byte) main::stopIt#52 ) + (byte) main::objects#53 ← phi( main::@5/(byte) main::objects#54 main::@7/(byte) main::objects#55 ) + (byte) main::i#14 ← phi( main::@5/(byte) main::i#3 main::@7/(byte) main::i#4 ) + (bool~) main::$3 ← (byte) main::i#14 < (const byte) maxSprites + if((bool~) main::$3) goto main::@7 + to:main::@8 +main::@7: scope:[main] from main::@6 + (word) main::oCount#54 ← phi( main::@6/(word) main::oCount#52 ) + (byte) main::stopIt#52 ← phi( main::@6/(byte) main::stopIt#50 ) + (byte) main::objects#55 ← phi( main::@6/(byte) main::objects#53 ) + (byte) main::i#15 ← phi( main::@6/(byte) main::i#14 ) + *((const byte*) cmRF + (byte) main::i#15) ← (number) $ff + (byte) main::i#4 ← (byte) main::i#15 + (number) 1 + to:main::@6 +main::@8: scope:[main] from main::@6 + (word) main::oCount#51 ← phi( main::@6/(word) main::oCount#52 ) + (byte) main::stopIt#49 ← phi( main::@6/(byte) main::stopIt#50 ) + (byte) main::objects#52 ← phi( main::@6/(byte) main::objects#53 ) + (word) main::c#1 ← (number) 0 + to:main::@9 +main::@9: scope:[main] from main::@10 main::@8 + (word) main::oCount#49 ← phi( main::@10/(word) main::oCount#50 main::@8/(word) main::oCount#51 ) + (byte) main::stopIt#47 ← phi( main::@10/(byte) main::stopIt#48 main::@8/(byte) main::stopIt#49 ) + (byte) main::objects#50 ← phi( main::@10/(byte) main::objects#51 main::@8/(byte) main::objects#52 ) + (word) main::c#9 ← phi( main::@10/(word) main::c#2 main::@8/(word) main::c#1 ) + (bool~) main::$4 ← (word) main::c#9 < (number) $3e8 + if((bool~) main::$4) goto main::@10 + to:main::@11 +main::@10: scope:[main] from main::@9 + (word) main::oCount#50 ← phi( main::@9/(word) main::oCount#49 ) + (byte) main::stopIt#48 ← phi( main::@9/(byte) main::stopIt#47 ) + (byte) main::objects#51 ← phi( main::@9/(byte) main::objects#50 ) + (word) main::c#10 ← phi( main::@9/(word) main::c#9 ) + *((byte*)(number) $e000 + (word) main::c#10) ← (number) $20 + *((byte*)(number) $d800 + (word) main::c#10) ← (number) $e + (word) main::c#2 ← (word) main::c#10 + (number) 1 + to:main::@9 +main::@11: scope:[main] from main::@9 + (word) main::oCount#48 ← phi( main::@9/(word) main::oCount#49 ) + (byte) main::stopIt#44 ← phi( main::@9/(byte) main::stopIt#47 ) + (byte) main::objects#49 ← phi( main::@9/(byte) main::objects#50 ) + (byte) lcSync::flags#0 ← (number) 0 + call lcSync + (byte) lcSync::return#2 ← (byte) lcSync::return#1 + to:main::@49 +main::@49: scope:[main] from main::@11 + (word) main::oCount#47 ← phi( main::@11/(word) main::oCount#48 ) + (byte) main::stopIt#41 ← phi( main::@11/(byte) main::stopIt#44 ) + (byte) main::objects#48 ← phi( main::@11/(byte) main::objects#49 ) + (byte) lcSync::return#5 ← phi( main::@11/(byte) lcSync::return#2 ) + (byte~) main::$0 ← (byte) lcSync::return#5 + (byte) main::i#5 ← (byte~) main::$0 + *((byte*)(number) 1) ← (number) $33 + (word) main::c#3 ← (number) 0 + to:main::@12 +main::@12: scope:[main] from main::@13 main::@49 + (word) main::oCount#45 ← phi( main::@13/(word) main::oCount#46 main::@49/(word) main::oCount#47 ) + (byte) main::stopIt#38 ← phi( main::@13/(byte) main::stopIt#40 main::@49/(byte) main::stopIt#41 ) + (byte) main::objects#46 ← phi( main::@13/(byte) main::objects#47 main::@49/(byte) main::objects#48 ) + (byte) main::i#28 ← phi( main::@13/(byte) main::i#35 main::@49/(byte) main::i#5 ) + (word) main::c#11 ← phi( main::@13/(word) main::c#4 main::@49/(word) main::c#3 ) + (bool~) main::$5 ← (word) main::c#11 < (number) $7f8 + if((bool~) main::$5) goto main::@13 + to:main::@14 +main::@13: scope:[main] from main::@12 + (word) main::oCount#46 ← phi( main::@12/(word) main::oCount#45 ) + (byte) main::stopIt#40 ← phi( main::@12/(byte) main::stopIt#38 ) + (byte) main::objects#47 ← phi( main::@12/(byte) main::objects#46 ) + (byte) main::i#35 ← phi( main::@12/(byte) main::i#28 ) + (word) main::c#12 ← phi( main::@12/(word) main::c#11 ) + *((byte*)(number) $f800 + (word) main::c#12) ← *((byte*)(number) $d000 + (word) main::c#12) + (word) main::c#4 ← (word) main::c#12 + (number) 1 + to:main::@12 +main::@14: scope:[main] from main::@12 + (word) main::oCount#39 ← phi( main::@12/(word) main::oCount#45 ) + (byte) main::stopIt#31 ← phi( main::@12/(byte) main::stopIt#38 ) + (byte) main::objects#40 ← phi( main::@12/(byte) main::objects#46 ) + (byte) main::i#16 ← phi( main::@12/(byte) main::i#28 ) + *((byte*)(number) 1) ← (number) $35 + *((byte*)(number) $d000 + (number) $d02) ← *((byte*)(number) $d000 + (number) $d02) | (number) 3 + *((byte*)(number) $d000 + (number) $d00) ← *((byte*)(number) $d000 + (number) $d00) & ~(byte) 3 + (number~) main::$1 ← (byte) main::i#16 & (number) $80 + (bool~) main::$107 ← (number) 0 != (number~) main::$1 + if((bool~) main::$107) goto main::@1 + to:main::@15 +main::@1: scope:[main] from main::@14 + (word) main::oCount#31 ← phi( main::@14/(word) main::oCount#39 ) + (byte) main::stopIt#20 ← phi( main::@14/(byte) main::stopIt#31 ) + (byte) main::objects#31 ← phi( main::@14/(byte) main::objects#40 ) + *((byte*)(number) $e000 + (number) $3e4) ← (byte) 'N'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3e5) ← (byte) 'T'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3e6) ← (byte) 'S'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3e7) ← (byte) 'C'-(byte) 'A'+(number) 1 + to:main::@2 +main::@15: scope:[main] from main::@14 + (word) main::oCount#32 ← phi( main::@14/(word) main::oCount#39 ) + (byte) main::stopIt#21 ← phi( main::@14/(byte) main::stopIt#31 ) + (byte) main::objects#32 ← phi( main::@14/(byte) main::objects#40 ) + *((byte*)(number) $e000 + (number) $3e5) ← (byte) 'P'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3e6) ← (byte) 'A'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3e7) ← (byte) 'L'-(byte) 'A'+(number) 1 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@15 + (word) main::oCount#28 ← phi( main::@1/(word) main::oCount#31 main::@15/(word) main::oCount#32 ) + (byte) main::stopIt#16 ← phi( main::@1/(byte) main::stopIt#20 main::@15/(byte) main::stopIt#21 ) + (byte) main::objects#26 ← phi( main::@1/(byte) main::objects#31 main::@15/(byte) main::objects#32 ) + *((byte*)(number) $e000 + (number) $3cf+(number) 0) ← (byte) 'B'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(number) 1 + *((byte*)(number) $e000 + (number) $3cf+(number) 7) ← (byte) ':' + (byte) main::type#1 ← (number) 0 + (byte) main::i#6 ← (number) 0 + to:main::@16 +main::@16: scope:[main] from main::@2 main::@20 + (word) main::oCount#23 ← phi( main::@2/(word) main::oCount#28 main::@20/(word) main::oCount#29 ) + (byte) main::stopIt#11 ← phi( main::@2/(byte) main::stopIt#16 main::@20/(byte) main::stopIt#17 ) + (byte) main::objects#21 ← phi( main::@2/(byte) main::objects#26 main::@20/(byte) main::objects#27 ) + (byte) main::type#5 ← phi( main::@2/(byte) main::type#1 main::@20/(byte) main::type#6 ) + (byte) main::i#17 ← phi( main::@2/(byte) main::i#6 main::@20/(byte) main::i#7 ) + (bool~) main::$6 ← (byte) main::i#17 < (const byte) maxDrawObjects + if((bool~) main::$6) goto main::@17 + to:main::@18 +main::@17: scope:[main] from main::@16 + (word) main::oCount#40 ← phi( main::@16/(word) main::oCount#23 ) + (byte) main::stopIt#32 ← phi( main::@16/(byte) main::stopIt#11 ) + (byte) main::objects#41 ← phi( main::@16/(byte) main::objects#21 ) + (byte) main::type#4 ← phi( main::@16/(byte) main::type#5 ) + (byte) main::i#18 ← phi( main::@16/(byte) main::i#17 ) + (byte~) main::$52 ← (byte) main::i#18 * (const byte) SIZEOF_STRUCT_$5 + (struct $5*~) main::$7 ← & *((const struct $5*) dTab + (byte~) main::$52) + (struct $5*) main::d1#0 ← (struct $5*~) main::$7 + (byte*~) main::$80 ← (byte*)(struct $5*) main::d1#0 + (byte*~) main::$53 ← (byte*~) main::$80 + (const byte) OFFSET_STRUCT_$5_S + *((byte*~) main::$53) ← (byte) main::type#4 + (byte) main::type#2 ← (byte) main::type#4 + (number) 1 + (bool~) main::$8 ← (byte) main::type#2 >= (number) 6 + (bool~) main::$9 ← ! (bool~) main::$8 + if((bool~) main::$9) goto main::@19 + to:main::@21 +main::@18: scope:[main] from main::@16 + (word) main::oCount#19 ← phi( main::@16/(word) main::oCount#23 ) + (byte) main::stopIt#7 ← phi( main::@16/(byte) main::stopIt#11 ) + (byte) main::objects#16 ← phi( main::@16/(byte) main::objects#21 ) + (word) main::c#5 ← (number) 0 + to:main::@24 +main::@19: scope:[main] from main::@17 main::@21 + (word) main::oCount#33 ← phi( main::@17/(word) main::oCount#40 main::@21/(word) main::oCount#41 ) + (byte) main::stopIt#22 ← phi( main::@17/(byte) main::stopIt#32 main::@21/(byte) main::stopIt#33 ) + (byte) main::objects#33 ← phi( main::@17/(byte) main::objects#41 main::@21/(byte) main::objects#42 ) + (byte) main::type#7 ← phi( main::@17/(byte) main::type#2 main::@21/(byte) main::type#3 ) + (byte) main::i#19 ← phi( main::@17/(byte) main::i#18 main::@21/(byte) main::i#29 ) + (struct $5*) main::d1#1 ← phi( main::@17/(struct $5*) main::d1#0 main::@21/(struct $5*) main::d1#2 ) + (signed word*~) main::$81 ← (signed word*)(struct $5*) main::d1#1 + (signed word*~) main::$54 ← (signed word*~) main::$81 + (const byte) OFFSET_STRUCT_$5_X + *((signed word*~) main::$54) ← (number) $70<<(const byte) F + (signed byte*~) main::$82 ← (signed byte*)(struct $5*) main::d1#1 + (signed byte*~) main::$55 ← (signed byte*~) main::$82 + (const byte) OFFSET_STRUCT_$5_VX + *((signed byte*~) main::$55) ← (signed byte)(byte) main::i#19 + (signed byte*~) main::$83 ← (signed byte*)(struct $5*) main::d1#1 + (signed byte*~) main::$56 ← (signed byte*~) main::$83 + (const byte) OFFSET_STRUCT_$5_AX + *((signed byte*~) main::$56) ← (number) 1 + (signed word*~) main::$84 ← (signed word*)(struct $5*) main::d1#1 + (signed word*~) main::$57 ← (signed word*~) main::$84 + (const byte) OFFSET_STRUCT_$5_Y + *((signed word*~) main::$57) ← (number) $18<<(const byte) F + (signed byte*~) main::$85 ← (signed byte*)(struct $5*) main::d1#1 + (signed byte*~) main::$58 ← (signed byte*~) main::$85 + (const byte) OFFSET_STRUCT_$5_VY + *((signed byte*~) main::$58) ← (number) 1<<(const byte) F + (signed byte*~) main::$86 ← (signed byte*)(struct $5*) main::d1#1 + (signed byte*~) main::$59 ← (signed byte*~) main::$86 + (const byte) OFFSET_STRUCT_$5_AY + *((signed byte*~) main::$59) ← (number) 1 + (bool~) main::$10 ← (byte) main::i#19 < (number) $14 + (bool~) main::$11 ← (const byte) main::preset && (bool~) main::$10 + (bool~) main::$12 ← ! (bool~) main::$11 + if((bool~) main::$12) goto main::@20 + to:main::@22 +main::@21: scope:[main] from main::@17 + (word) main::oCount#41 ← phi( main::@17/(word) main::oCount#40 ) + (byte) main::stopIt#33 ← phi( main::@17/(byte) main::stopIt#32 ) + (byte) main::objects#42 ← phi( main::@17/(byte) main::objects#41 ) + (byte) main::i#29 ← phi( main::@17/(byte) main::i#18 ) + (struct $5*) main::d1#2 ← phi( main::@17/(struct $5*) main::d1#0 ) + (byte) main::type#3 ← (number) 0 + to:main::@19 +main::@20: scope:[main] from main::@19 main::@50 main::@51 + (word) main::oCount#29 ← phi( main::@19/(word) main::oCount#33 main::@50/(word) main::oCount#34 main::@51/(word) main::oCount#35 ) + (byte) main::stopIt#17 ← phi( main::@19/(byte) main::stopIt#22 main::@50/(byte) main::stopIt#23 main::@51/(byte) main::stopIt#24 ) + (byte) main::objects#27 ← phi( main::@19/(byte) main::objects#33 main::@50/(byte) main::objects#34 main::@51/(byte) main::objects#35 ) + (byte) main::type#6 ← phi( main::@19/(byte) main::type#7 main::@50/(byte) main::type#8 main::@51/(byte) main::type#9 ) + (byte) main::i#20 ← phi( main::@19/(byte) main::i#19 main::@50/(byte) main::i#30 main::@51/(byte) main::i#21 ) + (byte) main::i#7 ← (byte) main::i#20 + (number) 1 + to:main::@16 +main::@22: scope:[main] from main::@19 + (word) main::oCount#42 ← phi( main::@19/(word) main::oCount#33 ) + (byte) main::stopIt#34 ← phi( main::@19/(byte) main::stopIt#22 ) + (byte) main::objects#43 ← phi( main::@19/(byte) main::objects#33 ) + (byte) main::type#10 ← phi( main::@19/(byte) main::type#7 ) + (byte) main::i#36 ← phi( main::@19/(byte) main::i#19 ) + call GetSprite + (byte) GetSprite::return#3 ← (byte) GetSprite::return#2 + to:main::@50 +main::@50: scope:[main] from main::@22 + (word) main::oCount#34 ← phi( main::@22/(word) main::oCount#42 ) + (byte) main::stopIt#23 ← phi( main::@22/(byte) main::stopIt#34 ) + (byte) main::objects#34 ← phi( main::@22/(byte) main::objects#43 ) + (byte) main::type#8 ← phi( main::@22/(byte) main::type#10 ) + (byte) main::i#30 ← phi( main::@22/(byte) main::i#36 ) + (byte) GetSprite::return#6 ← phi( main::@22/(byte) GetSprite::return#3 ) + (byte~) main::$13 ← (byte) GetSprite::return#6 + (word) main::c#6 ← (byte~) main::$13 + (bool~) main::$14 ← (word) main::c#6 < (number) $80 + (bool~) main::$15 ← ! (bool~) main::$14 + if((bool~) main::$15) goto main::@20 + to:main::@23 +main::@23: scope:[main] from main::@50 + (word) main::oCount#43 ← phi( main::@50/(word) main::oCount#34 ) + (byte) main::stopIt#35 ← phi( main::@50/(byte) main::stopIt#23 ) + (byte) main::objects#44 ← phi( main::@50/(byte) main::objects#34 ) + (byte) main::type#11 ← phi( main::@50/(byte) main::type#8 ) + (byte) main::i#31 ← phi( main::@50/(byte) main::i#30 ) + (word) main::c#13 ← phi( main::@50/(word) main::c#6 ) + (byte) AddSprite::sn#0 ← (byte)(word) main::c#13 + call AddSprite + to:main::@51 +main::@51: scope:[main] from main::@23 + (word) main::oCount#35 ← phi( main::@23/(word) main::oCount#43 ) + (byte) main::stopIt#24 ← phi( main::@23/(byte) main::stopIt#35 ) + (byte) main::objects#35 ← phi( main::@23/(byte) main::objects#44 ) + (byte) main::type#9 ← phi( main::@23/(byte) main::type#11 ) + (byte) main::i#21 ← phi( main::@23/(byte) main::i#31 ) + *((const byte*) cmRF + (byte) main::i#21) ← (number) 0 + *((const byte*) cmRX + (byte) main::i#21) ← *((const byte*) cmRF + (byte) main::i#21) + *((const byte*) cmSI + (byte) main::i#21) ← *((const byte*) cmRX + (byte) main::i#21) + (byte~) main::$17 ← (byte) main::i#21 << (number) 4 + *((const byte*) cmRY + (byte) main::i#21) ← (byte~) main::$17 + to:main::@20 +main::@24: scope:[main] from main::@18 main::@55 + (word) main::oCount#17 ← phi( main::@18/(word) main::oCount#19 main::@55/(word) main::oCount#20 ) + (byte) main::stopIt#5 ← phi( main::@18/(byte) main::stopIt#7 main::@55/(byte) main::stopIt#8 ) + (word) main::c#16 ← phi( main::@18/(word) main::c#5 main::@55/(word) main::c#18 ) + (byte) main::objects#9 ← phi( main::@18/(byte) main::objects#16 main::@55/(byte) main::objects#17 ) + (byte) main::i#8 ← (number) 0 + (struct $5*) main::d#1 ← (const struct $5*) dTab + to:main::@26 +main::@26: scope:[main] from main::@24 main::@33 + (word) main::oCount#14 ← phi( main::@24/(word) main::oCount#17 main::@33/(word) main::oCount#18 ) + (byte) main::stopIt#4 ← phi( main::@24/(byte) main::stopIt#5 main::@33/(byte) main::stopIt#6 ) + (word) main::c#15 ← phi( main::@24/(word) main::c#16 main::@33/(word) main::c#17 ) + (struct $5*) main::d#14 ← phi( main::@24/(struct $5*) main::d#1 main::@33/(struct $5*) main::d#2 ) + (byte) main::objects#3 ← phi( main::@24/(byte) main::objects#9 main::@33/(byte) main::objects#10 ) + (byte) main::i#22 ← phi( main::@24/(byte) main::i#8 main::@33/(byte) main::i#9 ) + (bool~) main::$18 ← (byte) main::i#22 < (byte) main::objects#3 + if((bool~) main::$18) goto main::@27 + to:main::@28 +main::@27: scope:[main] from main::@26 + (word) main::oCount#44 ← phi( main::@26/(word) main::oCount#14 ) + (byte) main::stopIt#36 ← phi( main::@26/(byte) main::stopIt#4 ) + (word) main::c#35 ← phi( main::@26/(word) main::c#15 ) + (byte) main::objects#45 ← phi( main::@26/(byte) main::objects#3 ) + (byte) main::i#41 ← phi( main::@26/(byte) main::i#22 ) + (struct $5*) main::d#3 ← phi( main::@26/(struct $5*) main::d#14 ) + (signed byte*~) main::$87 ← (signed byte*)(struct $5*) main::d#3 + (signed byte*~) main::$60 ← (signed byte*~) main::$87 + (const byte) OFFSET_STRUCT_$5_VX + (signed byte*~) main::$88 ← (signed byte*)(struct $5*) main::d#3 + (signed byte*~) main::$61 ← (signed byte*~) main::$88 + (const byte) OFFSET_STRUCT_$5_AX + (signed byte*~) main::$89 ← (signed byte*)(struct $5*) main::d#3 + (signed byte*~) main::$62 ← (signed byte*~) main::$89 + (const byte) OFFSET_STRUCT_$5_VX + *((signed byte*~) main::$62) ← *((signed byte*~) main::$60) + *((signed byte*~) main::$61) + (signed byte*~) main::$90 ← (signed byte*)(struct $5*) main::d#3 + (signed byte*~) main::$63 ← (signed byte*~) main::$90 + (const byte) OFFSET_STRUCT_$5_VX + (bool~) main::$19 ← *((signed byte*~) main::$63) < (number) -$20 + if((bool~) main::$19) goto main::@29 + to:main::@34 +main::@28: scope:[main] from main::@26 + (word) main::oCount#10 ← phi( main::@26/(word) main::oCount#14 ) + (byte) main::objects#11 ← phi( main::@26/(byte) main::objects#3 ) + (byte) main::stopIt#3 ← phi( main::@26/(byte) main::stopIt#4 ) + (word) main::c#14 ← phi( main::@26/(word) main::c#15 ) + (word) main::c#7 ← (word) main::c#14 + (number) 1 + (bool~) main::$29 ← (word) main::c#7 >= (number) $e + (bool~) main::$30 ← ! (bool~) main::$29 + if((bool~) main::$30) goto main::@42 + to:main::@39 +main::@29: scope:[main] from main::@27 + (word) main::oCount#36 ← phi( main::@27/(word) main::oCount#44 ) + (byte) main::stopIt#25 ← phi( main::@27/(byte) main::stopIt#36 ) + (word) main::c#28 ← phi( main::@27/(word) main::c#35 ) + (byte) main::objects#36 ← phi( main::@27/(byte) main::objects#45 ) + (byte) main::i#38 ← phi( main::@27/(byte) main::i#41 ) + (struct $5*) main::d#4 ← phi( main::@27/(struct $5*) main::d#3 ) + (signed byte*~) main::$91 ← (signed byte*)(struct $5*) main::d#4 + (signed byte*~) main::$64 ← (signed byte*~) main::$91 + (const byte) OFFSET_STRUCT_$5_AX + *((signed byte*~) main::$64) ← (number) 1 + to:main::@30 +main::@34: scope:[main] from main::@27 + (word) main::oCount#37 ← phi( main::@27/(word) main::oCount#44 ) + (byte) main::stopIt#26 ← phi( main::@27/(byte) main::stopIt#36 ) + (word) main::c#29 ← phi( main::@27/(word) main::c#35 ) + (byte) main::objects#37 ← phi( main::@27/(byte) main::objects#45 ) + (byte) main::i#39 ← phi( main::@27/(byte) main::i#41 ) + (struct $5*) main::d#5 ← phi( main::@27/(struct $5*) main::d#3 ) + (signed byte*~) main::$92 ← (signed byte*)(struct $5*) main::d#5 + (signed byte*~) main::$65 ← (signed byte*~) main::$92 + (const byte) OFFSET_STRUCT_$5_VX + (bool~) main::$20 ← *((signed byte*~) main::$65) > (number) $20 + (bool~) main::$21 ← ! (bool~) main::$20 + if((bool~) main::$21) goto main::@30 + to:main::@35 +main::@35: scope:[main] from main::@34 + (word) main::oCount#38 ← phi( main::@34/(word) main::oCount#37 ) + (byte) main::stopIt#27 ← phi( main::@34/(byte) main::stopIt#26 ) + (word) main::c#30 ← phi( main::@34/(word) main::c#29 ) + (byte) main::objects#38 ← phi( main::@34/(byte) main::objects#37 ) + (byte) main::i#40 ← phi( main::@34/(byte) main::i#39 ) + (struct $5*) main::d#6 ← phi( main::@34/(struct $5*) main::d#5 ) + (signed byte*~) main::$93 ← (signed byte*)(struct $5*) main::d#6 + (signed byte*~) main::$66 ← (signed byte*~) main::$93 + (const byte) OFFSET_STRUCT_$5_AX + *((signed byte*~) main::$66) ← (number) -1 + to:main::@30 +main::@30: scope:[main] from main::@29 main::@34 main::@35 + (word) main::oCount#30 ← phi( main::@29/(word) main::oCount#36 main::@34/(word) main::oCount#37 main::@35/(word) main::oCount#38 ) + (byte) main::stopIt#18 ← phi( main::@29/(byte) main::stopIt#25 main::@34/(byte) main::stopIt#26 main::@35/(byte) main::stopIt#27 ) + (word) main::c#25 ← phi( main::@29/(word) main::c#28 main::@34/(word) main::c#29 main::@35/(word) main::c#30 ) + (byte) main::objects#28 ← phi( main::@29/(byte) main::objects#36 main::@34/(byte) main::objects#37 main::@35/(byte) main::objects#38 ) + (byte) main::i#37 ← phi( main::@29/(byte) main::i#38 main::@34/(byte) main::i#39 main::@35/(byte) main::i#40 ) + (struct $5*) main::d#7 ← phi( main::@29/(struct $5*) main::d#4 main::@34/(struct $5*) main::d#5 main::@35/(struct $5*) main::d#6 ) + (signed word*~) main::$94 ← (signed word*)(struct $5*) main::d#7 + (signed word*~) main::$67 ← (signed word*~) main::$94 + (const byte) OFFSET_STRUCT_$5_Y + (bool~) main::$22 ← *((signed word*~) main::$67) > (number) $f8<<(const byte) F + if((bool~) main::$22) goto main::@31 + to:main::@36 +main::@31: scope:[main] from main::@30 + (word) main::oCount#24 ← phi( main::@30/(word) main::oCount#30 ) + (byte) main::stopIt#12 ← phi( main::@30/(byte) main::stopIt#18 ) + (word) main::c#21 ← phi( main::@30/(word) main::c#25 ) + (byte) main::objects#22 ← phi( main::@30/(byte) main::objects#28 ) + (byte) main::i#32 ← phi( main::@30/(byte) main::i#37 ) + (struct $5*) main::d#8 ← phi( main::@30/(struct $5*) main::d#7 ) + (signed byte*~) main::$95 ← (signed byte*)(struct $5*) main::d#8 + (signed byte*~) main::$68 ← (signed byte*~) main::$95 + (const byte) OFFSET_STRUCT_$5_VY + *((signed byte*~) main::$68) ← (number) -1<<(const byte) F + to:main::@32 +main::@36: scope:[main] from main::@30 + (word) main::oCount#25 ← phi( main::@30/(word) main::oCount#30 ) + (byte) main::stopIt#13 ← phi( main::@30/(byte) main::stopIt#18 ) + (word) main::c#22 ← phi( main::@30/(word) main::c#25 ) + (byte) main::objects#23 ← phi( main::@30/(byte) main::objects#28 ) + (byte) main::i#33 ← phi( main::@30/(byte) main::i#37 ) + (struct $5*) main::d#9 ← phi( main::@30/(struct $5*) main::d#7 ) + (signed word*~) main::$96 ← (signed word*)(struct $5*) main::d#9 + (signed word*~) main::$69 ← (signed word*~) main::$96 + (const byte) OFFSET_STRUCT_$5_Y + (bool~) main::$23 ← *((signed word*~) main::$69) < (number) $18<<(const byte) F + (bool~) main::$24 ← ! (bool~) main::$23 + if((bool~) main::$24) goto main::@32 + to:main::@37 +main::@37: scope:[main] from main::@36 + (word) main::oCount#26 ← phi( main::@36/(word) main::oCount#25 ) + (byte) main::stopIt#14 ← phi( main::@36/(byte) main::stopIt#13 ) + (word) main::c#23 ← phi( main::@36/(word) main::c#22 ) + (byte) main::objects#24 ← phi( main::@36/(byte) main::objects#23 ) + (byte) main::i#34 ← phi( main::@36/(byte) main::i#33 ) + (struct $5*) main::d#10 ← phi( main::@36/(struct $5*) main::d#9 ) + (signed byte*~) main::$97 ← (signed byte*)(struct $5*) main::d#10 + (signed byte*~) main::$70 ← (signed byte*~) main::$97 + (const byte) OFFSET_STRUCT_$5_VY + *((signed byte*~) main::$70) ← (number) 1<<(const byte) F + to:main::@32 +main::@32: scope:[main] from main::@31 main::@36 main::@37 + (word) main::oCount#21 ← phi( main::@31/(word) main::oCount#24 main::@36/(word) main::oCount#25 main::@37/(word) main::oCount#26 ) + (byte) main::stopIt#9 ← phi( main::@31/(byte) main::stopIt#12 main::@36/(byte) main::stopIt#13 main::@37/(byte) main::stopIt#14 ) + (word) main::c#19 ← phi( main::@31/(word) main::c#21 main::@36/(word) main::c#22 main::@37/(word) main::c#23 ) + (byte) main::objects#18 ← phi( main::@31/(byte) main::objects#22 main::@36/(byte) main::objects#23 main::@37/(byte) main::objects#24 ) + (byte) main::i#23 ← phi( main::@31/(byte) main::i#32 main::@36/(byte) main::i#33 main::@37/(byte) main::i#34 ) + (struct $5*) main::d#11 ← phi( main::@31/(struct $5*) main::d#8 main::@36/(struct $5*) main::d#9 main::@37/(struct $5*) main::d#10 ) + (signed word*~) main::$98 ← (signed word*)(struct $5*) main::d#11 + (signed word*~) main::$71 ← (signed word*~) main::$98 + (const byte) OFFSET_STRUCT_$5_X + (signed byte*~) main::$99 ← (signed byte*)(struct $5*) main::d#11 + (signed byte*~) main::$72 ← (signed byte*~) main::$99 + (const byte) OFFSET_STRUCT_$5_VX + (signed word*~) main::$100 ← (signed word*)(struct $5*) main::d#11 + (signed word*~) main::$73 ← (signed word*~) main::$100 + (const byte) OFFSET_STRUCT_$5_X + *((signed word*~) main::$73) ← *((signed word*~) main::$71) + *((signed byte*~) main::$72) + (signed word*~) main::$101 ← (signed word*)(struct $5*) main::d#11 + (signed word*~) main::$74 ← (signed word*~) main::$101 + (const byte) OFFSET_STRUCT_$5_Y + (signed byte*~) main::$102 ← (signed byte*)(struct $5*) main::d#11 + (signed byte*~) main::$75 ← (signed byte*~) main::$102 + (const byte) OFFSET_STRUCT_$5_VY + (signed word*~) main::$103 ← (signed word*)(struct $5*) main::d#11 + (signed word*~) main::$76 ← (signed word*~) main::$103 + (const byte) OFFSET_STRUCT_$5_Y + *((signed word*~) main::$76) ← *((signed word*~) main::$74) + *((signed byte*~) main::$75) + (bool~) main::$25 ← *((const byte*) cmRF + (byte) main::i#23) < (number) $80 + (bool~) main::$26 ← ! (bool~) main::$25 + if((bool~) main::$26) goto main::@33 + to:main::@38 +main::@33: scope:[main] from main::@32 main::@38 + (word) main::oCount#18 ← phi( main::@32/(word) main::oCount#21 main::@38/(word) main::oCount#22 ) + (byte) main::stopIt#6 ← phi( main::@32/(byte) main::stopIt#9 main::@38/(byte) main::stopIt#10 ) + (word) main::c#17 ← phi( main::@32/(word) main::c#19 main::@38/(word) main::c#20 ) + (byte) main::objects#10 ← phi( main::@32/(byte) main::objects#18 main::@38/(byte) main::objects#19 ) + (byte) main::i#24 ← phi( main::@32/(byte) main::i#23 main::@38/(byte) main::i#25 ) + (struct $5*) main::d#12 ← phi( main::@32/(struct $5*) main::d#11 main::@38/(struct $5*) main::d#13 ) + (struct $5*) main::d#2 ← (struct $5*) main::d#12 + (const byte) SIZEOF_STRUCT_$5 + (byte) main::i#9 ← (byte) main::i#24 + (number) 1 + to:main::@26 +main::@38: scope:[main] from main::@32 + (word) main::oCount#22 ← phi( main::@32/(word) main::oCount#21 ) + (byte) main::stopIt#10 ← phi( main::@32/(byte) main::stopIt#9 ) + (word) main::c#20 ← phi( main::@32/(word) main::c#19 ) + (byte) main::objects#19 ← phi( main::@32/(byte) main::objects#18 ) + (byte) main::i#25 ← phi( main::@32/(byte) main::i#23 ) + (struct $5*) main::d#13 ← phi( main::@32/(struct $5*) main::d#11 ) + (byte*~) main::$104 ← (byte*)(struct $5*) main::d#13 + (byte*~) main::$77 ← (byte*~) main::$104 + (const byte) OFFSET_STRUCT_$5_S + *((const byte*) cmSI + (byte) main::i#25) ← *((byte*~) main::$77) + (signed word*~) main::$105 ← (signed word*)(struct $5*) main::d#13 + (signed word*~) main::$78 ← (signed word*~) main::$105 + (const byte) OFFSET_STRUCT_$5_X + (signed word~) main::$27 ← *((signed word*~) main::$78) >> (const byte) F + *((const byte*) cmRX + (byte) main::i#25) ← (byte)(signed word~) main::$27 + (signed word*~) main::$106 ← (signed word*)(struct $5*) main::d#13 + (signed word*~) main::$79 ← (signed word*~) main::$106 + (const byte) OFFSET_STRUCT_$5_Y + (signed word~) main::$28 ← *((signed word*~) main::$79) >> (const byte) F + *((const byte*) cmRY + (byte) main::i#25) ← (byte)(signed word~) main::$28 + to:main::@33 +main::@42: scope:[main] from main::@28 main::@39 main::@53 main::@54 + (byte) main::stopIt#39 ← phi( main::@28/(byte) main::stopIt#3 main::@39/(byte) main::stopIt#2 main::@53/(byte) main::stopIt#42 main::@54/(byte) main::stopIt#43 ) + (word) main::c#37 ← phi( main::@28/(word) main::c#7 main::@39/(word) main::c#8 main::@53/(word) main::c#38 main::@54/(word) main::c#39 ) + (byte) main::objects#25 ← phi( main::@28/(byte) main::objects#11 main::@39/(byte) main::objects#4 main::@53/(byte) main::objects#29 main::@54/(byte) main::objects#30 ) + (word) main::oCount#9 ← phi( main::@28/(word) main::oCount#10 main::@39/(word) main::oCount#11 main::@53/(word) main::oCount#12 main::@54/(word) main::oCount#13 ) + (byte) lcSync::flags#1 ← (number) 0 + call lcSync + (byte) lcSync::return#3 ← (byte) lcSync::return#1 + to:main::@52 +main::@52: scope:[main] from main::@42 + (byte) main::stopIt#37 ← phi( main::@42/(byte) main::stopIt#39 ) + (word) main::c#36 ← phi( main::@42/(word) main::c#37 ) + (byte) main::objects#20 ← phi( main::@42/(byte) main::objects#25 ) + (word) main::oCount#8 ← phi( main::@42/(word) main::oCount#9 ) + (byte) lcSync::return#6 ← phi( main::@42/(byte) lcSync::return#3 ) + (byte~) main::$41 ← (byte) lcSync::return#6 + (number~) main::$42 ← (byte~) main::$41 & (number) $1f + (byte) main::i#10 ← (number~) main::$42 + (bool~) main::$43 ← (byte) main::i#10 > (number) 1 + if((bool~) main::$43) goto main::@43 + to:main::@46 +main::@39: scope:[main] from main::@28 + (word) main::oCount#11 ← phi( main::@28/(word) main::oCount#10 ) + (byte) main::objects#4 ← phi( main::@28/(byte) main::objects#11 ) + (byte) main::stopIt#2 ← phi( main::@28/(byte) main::stopIt#3 ) + (word) main::c#8 ← (number) 0 + (bool~) main::$31 ← (number) 0 == (byte) main::stopIt#2 + (bool~) main::$32 ← (byte) main::objects#4 < (const byte) maxDrawObjects + (bool~) main::$33 ← (bool~) main::$31 && (bool~) main::$32 + (bool~) main::$34 ← ! (bool~) main::$33 + if((bool~) main::$34) goto main::@42 + to:main::@40 +main::@40: scope:[main] from main::@39 + (byte) main::stopIt#45 ← phi( main::@39/(byte) main::stopIt#2 ) + (word) main::c#40 ← phi( main::@39/(word) main::c#8 ) + (word) main::oCount#15 ← phi( main::@39/(word) main::oCount#11 ) + (byte) main::objects#5 ← phi( main::@39/(byte) main::objects#4 ) + (byte) main::objects#1 ← (byte) main::objects#5 + (number) 1 + (bool~) main::$35 ← (number) 0 == (const byte) main::preset + call GetSprite + (byte) GetSprite::return#4 ← (byte) GetSprite::return#2 + to:main::@53 +main::@53: scope:[main] from main::@40 + (byte) main::stopIt#42 ← phi( main::@40/(byte) main::stopIt#45 ) + (word) main::c#38 ← phi( main::@40/(word) main::c#40 ) + (byte) main::objects#29 ← phi( main::@40/(byte) main::objects#1 ) + (word) main::oCount#12 ← phi( main::@40/(word) main::oCount#15 ) + (byte) GetSprite::return#7 ← phi( main::@40/(byte) GetSprite::return#4 ) + (byte~) main::$36 ← (byte) GetSprite::return#7 + (byte) main::i#11 ← (byte~) main::$36 + (bool~) main::$37 ← (byte) main::i#11 < (number) $80 + (bool~) main::$38 ← (bool~) main::$35 && (bool~) main::$37 + (bool~) main::$39 ← ! (bool~) main::$38 + if((bool~) main::$39) goto main::@42 + to:main::@41 +main::@41: scope:[main] from main::@53 + (byte) main::stopIt#46 ← phi( main::@53/(byte) main::stopIt#42 ) + (word) main::c#41 ← phi( main::@53/(word) main::c#38 ) + (byte) main::objects#39 ← phi( main::@53/(byte) main::objects#29 ) + (word) main::oCount#16 ← phi( main::@53/(word) main::oCount#12 ) + (byte) main::i#26 ← phi( main::@53/(byte) main::i#11 ) + (byte) AddSprite::sn#1 ← (byte) main::i#26 + call AddSprite + to:main::@54 +main::@54: scope:[main] from main::@41 + (byte) main::stopIt#43 ← phi( main::@41/(byte) main::stopIt#46 ) + (word) main::c#39 ← phi( main::@41/(word) main::c#41 ) + (byte) main::objects#30 ← phi( main::@41/(byte) main::objects#39 ) + (word) main::oCount#13 ← phi( main::@41/(word) main::oCount#16 ) + (byte) main::i#27 ← phi( main::@41/(byte) main::i#26 ) + *((const byte*) cmRY + (byte) main::i#27) ← (number) 0 + *((const byte*) cmRF + (byte) main::i#27) ← *((const byte*) cmRY + (byte) main::i#27) + *((const byte*) cmRX + (byte) main::i#27) ← *((const byte*) cmRF + (byte) main::i#27) + *((const byte*) cmSI + (byte) main::i#27) ← *((const byte*) cmRX + (byte) main::i#27) + to:main::@42 +main::@43: scope:[main] from main::@52 + (byte) main::stopIt#28 ← phi( main::@52/(byte) main::stopIt#37 ) + (word) main::c#31 ← phi( main::@52/(word) main::c#36 ) + (byte) main::objects#12 ← phi( main::@52/(byte) main::objects#20 ) + (word) main::oCount#4 ← phi( main::@52/(word) main::oCount#8 ) + (word) main::oCount#1 ← (word) main::oCount#4 + (number) 2 + to:main::@44 +main::@46: scope:[main] from main::@52 + (byte) main::stopIt#29 ← phi( main::@52/(byte) main::stopIt#37 ) + (word) main::c#32 ← phi( main::@52/(word) main::c#36 ) + (byte) main::objects#13 ← phi( main::@52/(byte) main::objects#20 ) + (word) main::oCount#5 ← phi( main::@52/(word) main::oCount#8 ) + (bool~) main::$44 ← (word) main::oCount#5 > (number) 0 + (bool~) main::$45 ← ! (bool~) main::$44 + if((bool~) main::$45) goto main::@44 + to:main::@47 +main::@47: scope:[main] from main::@46 + (byte) main::stopIt#30 ← phi( main::@46/(byte) main::stopIt#29 ) + (word) main::c#33 ← phi( main::@46/(word) main::c#32 ) + (byte) main::objects#14 ← phi( main::@46/(byte) main::objects#13 ) + (word) main::oCount#6 ← phi( main::@46/(word) main::oCount#5 ) + (word) main::oCount#2 ← (word) main::oCount#6 - (number) 1 + to:main::@44 +main::@44: scope:[main] from main::@43 main::@46 main::@47 + (byte) main::stopIt#19 ← phi( main::@43/(byte) main::stopIt#28 main::@46/(byte) main::stopIt#29 main::@47/(byte) main::stopIt#30 ) + (word) main::c#26 ← phi( main::@43/(word) main::c#31 main::@46/(word) main::c#32 main::@47/(word) main::c#33 ) + (byte) main::objects#6 ← phi( main::@43/(byte) main::objects#12 main::@46/(byte) main::objects#13 main::@47/(byte) main::objects#14 ) + (word) main::oCount#7 ← phi( main::@43/(word) main::oCount#1 main::@46/(word) main::oCount#5 main::@47/(word) main::oCount#2 ) + (bool~) main::$46 ← (word) main::oCount#7 > (number) 2 + (bool~) main::$47 ← (byte) main::objects#6 > (number) 0 + (bool~) main::$48 ← (bool~) main::$46 && (bool~) main::$47 + (bool~) main::$49 ← ! (bool~) main::$48 + if((bool~) main::$49) goto main::@45 + to:main::@48 +main::@45: scope:[main] from main::@44 main::@56 + (word) main::oCount#27 ← phi( main::@44/(word) main::oCount#7 main::@56/(word) main::oCount#3 ) + (byte) main::stopIt#15 ← phi( main::@44/(byte) main::stopIt#19 main::@56/(byte) main::stopIt#1 ) + (word) main::c#24 ← phi( main::@44/(word) main::c#26 main::@56/(word) main::c#27 ) + (byte) main::objects#7 ← phi( main::@44/(byte) main::objects#6 main::@56/(byte) main::objects#15 ) + (byte*) Print00::p#2 ← (number) $e000+(byte*)(number) $3d7 + (byte) Print00::v0#0 ← (byte) main::objects#7 + call Print00 + to:main::@55 +main::@55: scope:[main] from main::@45 + (word) main::oCount#20 ← phi( main::@45/(word) main::oCount#27 ) + (byte) main::stopIt#8 ← phi( main::@45/(byte) main::stopIt#15 ) + (word) main::c#18 ← phi( main::@45/(word) main::c#24 ) + (byte) main::objects#17 ← phi( main::@45/(byte) main::objects#7 ) + to:main::@24 +main::@48: scope:[main] from main::@44 + (word) main::c#34 ← phi( main::@44/(word) main::c#26 ) + (byte) main::objects#8 ← phi( main::@44/(byte) main::objects#6 ) + (byte) main::objects#2 ← (byte) main::objects#8 - (number) 1 + (byte) DelSprite::sn#0 ← (byte) main::objects#2 + call DelSprite + to:main::@56 +main::@56: scope:[main] from main::@48 + (word) main::c#27 ← phi( main::@48/(word) main::c#34 ) + (byte) main::objects#15 ← phi( main::@48/(byte) main::objects#2 ) + (byte) main::stopIt#1 ← (number) 1 + (word) main::oCount#3 ← (number) 0 + to:main::@45 +main::@25: scope:[main] from + (signed word) main::return#0 ← (number) 0 + to:main::@return +main::@return: scope:[main] from main::@25 + (signed word) main::return#3 ← phi( main::@25/(signed word) main::return#0 ) + (signed word) main::return#1 ← (signed word) main::return#3 + return + to:@return + +(void()) __start() +__start: scope:[__start] from + to:__start::__init1 +__start::__init1: scope:[__start] from __start + to:__start::@1 +__start::@1: scope:[__start] from __start::__init1 + call main + (signed word) main::return#2 ← (signed word) main::return#1 + to:__start::@2 +__start::@2: scope:[__start] from __start::@1 + to:__start::@return +__start::@return: scope:[__start] from __start::@2 + return + to:@return + +SYMBOL TABLE SSA +(const byte) $0::lfMC = (number) $10 +(const byte) $0::lfOL = (number) $20 +(const byte) $1::rfDrop = (number) $fe +(const byte) $1::rfNull = (number) $ff +(const byte) $1::rfXMSB = (number) $10 +(const byte) $2::lfA = (number) $10 +(const byte) $2::lfB = (number) $20 +(const byte) $2::lfD = (number) 2 +(const byte) $2::lfL = (number) 4 +(const byte) $2::lfR = (number) 8 +(const byte) $2::lfU = (number) 1 +(const byte) $3::maxC64Images = (number) $100 +(const byte) $3::maxSprImages = (number) 8 +(const byte) $3::maxSprites = (number) $20 +(const byte) $3::sprOff = (number) $40 +(const byte) $4::F = (number) 3 +(const byte) $4::maxDrawObjects = (number) $18 +(signed byte) $5::ax +(signed byte) $5::ay +(byte) $5::s +(signed byte) $5::vx +(signed byte) $5::vy +(signed word) $5::x +(signed word) $5::y +(void()) AddSprite((byte) AddSprite::sn) +(bool~) AddSprite::$0 +(bool~) AddSprite::$1 +(bool~) AddSprite::$2 +(bool~) AddSprite::$3 +(label) AddSprite::@1 +(label) AddSprite::@2 +(label) AddSprite::@3 +(label) AddSprite::@4 +(label) AddSprite::@5 +(label) AddSprite::@6 +(label) AddSprite::@return +(byte) AddSprite::sn +(byte) AddSprite::sn#0 +(byte) AddSprite::sn#1 +(byte) AddSprite::sn#2 +(byte) AddSprite::sn#3 +(byte) AddSprite::sn#4 +(byte) AddSprite::sn#5 +(byte) AddSprite::sn#6 +(byte) AddSprite::sn#7 +(byte) AddSprite::sn#8 +(byte) AddSprite::t0 +(byte) AddSprite::t0#0 +(byte) AddSprite::t0#1 +(byte) AddSprite::t0#2 +(byte) AddSprite::t0#3 +(byte) AddSprite::t0#4 +(byte) AddSprite::t0#5 +(byte) AddSprite::t0#6 +(void()) DelSprite((byte) DelSprite::sn) +(label) DelSprite::@return +(byte) DelSprite::sn +(byte) DelSprite::sn#0 +(byte) DelSprite::sn#1 +(const byte) F = (number) 3 +(byte()) GetSprite() +(bool~) GetSprite::$0 +(bool~) GetSprite::$1 +(bool~) GetSprite::$2 +(label) GetSprite::@1 +(label) GetSprite::@2 +(label) GetSprite::@3 +(label) GetSprite::@4 +(label) GetSprite::@5 +(label) GetSprite::@return +(byte) GetSprite::return +(byte) GetSprite::return#0 +(byte) GetSprite::return#1 +(byte) GetSprite::return#2 +(byte) GetSprite::return#3 +(byte) GetSprite::return#4 +(byte) GetSprite::return#5 +(byte) GetSprite::return#6 +(byte) GetSprite::return#7 +(byte) GetSprite::t0 +(byte) GetSprite::t0#0 +(byte) GetSprite::t0#1 +(byte) GetSprite::t0#2 +(byte) GetSprite::t0#3 +(byte) GetSprite::t0#4 +(byte) GetSprite::t0#5 +(byte) GetSprite::t0#6 +(const byte) OFFSET_STRUCT_$5_AX = (byte) 7 +(const byte) OFFSET_STRUCT_$5_AY = (byte) 8 +(const byte) OFFSET_STRUCT_$5_S = (byte) 0 +(const byte) OFFSET_STRUCT_$5_VX = (byte) 5 +(const byte) OFFSET_STRUCT_$5_VY = (byte) 6 +(const byte) OFFSET_STRUCT_$5_X = (byte) 1 +(const byte) OFFSET_STRUCT_$5_Y = (byte) 3 +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +(bool~) Print00::$0 +(bool~) Print00::$1 +(label) Print00::@1 +(label) Print00::@2 +(label) Print00::@3 +(label) Print00::@4 +(label) Print00::@5 +(label) Print00::@6 +(label) Print00::@return +(byte) Print00::c +(byte) Print00::c#0 +(byte) Print00::c#1 +(byte) Print00::c#10 +(byte) Print00::c#2 +(byte) Print00::c#3 +(byte) Print00::c#4 +(byte) Print00::c#5 +(byte) Print00::c#6 +(byte) Print00::c#7 +(byte) Print00::c#8 +(byte) Print00::c#9 +(byte*) Print00::p +(byte*) Print00::p#0 +(byte*) Print00::p#1 +(byte*) Print00::p#2 +(byte*) Print00::p#3 +(byte*) Print00::p#4 +(byte*) Print00::p#5 +(byte*) Print00::p#6 +(byte*) Print00::p#7 +(byte*) Print00::p#8 +(byte*) Print00::p#9 +(byte) Print00::v +(byte) Print00::v#0 +(byte) Print00::v#1 +(byte) Print00::v#2 +(byte) Print00::v#3 +(byte) Print00::v#4 +(byte) Print00::v#5 +(byte) Print00::v#6 +(byte) Print00::v#7 +(byte) Print00::v0 +(byte) Print00::v0#0 +(byte) Print00::v0#1 +(const byte) SIZEOF_STRUCT_$5 = (byte) 9 +(void()) __start() +(label) __start::@1 +(label) __start::@2 +(label) __start::@return +(label) __start::__init1 +(const byte*) cmIT[(const byte) maxSprites+(number) 1] = { fill( maxSprites+1, 0) } +(const byte*) cmRF[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmRX[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmRY[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmSI[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const struct $5*) dTab[(const byte) maxDrawObjects] = { fill( maxDrawObjects, 0) } +(const byte*) lcSprColTab[(const byte) maxC64Images] = { fill( maxC64Images, 0) } +(const byte*) lcSprMapTab[(const byte) maxSprImages] = { fill( maxSprImages, 0) } +(byte()) lcSync((byte) lcSync::flags) +(label) lcSync::@return +(byte) lcSync::flags +(byte) lcSync::flags#0 +(byte) lcSync::flags#1 +(byte) lcSync::return +(byte) lcSync::return#0 +(byte) lcSync::return#1 +(byte) lcSync::return#2 +(byte) lcSync::return#3 +(byte) lcSync::return#4 +(byte) lcSync::return#5 +(byte) lcSync::return#6 +(const byte) lfMC = (number) $10 +(signed word()) main() +(byte~) main::$0 +(number~) main::$1 +(bool~) main::$10 +(signed word*~) main::$100 +(signed word*~) main::$101 +(signed byte*~) main::$102 +(signed word*~) main::$103 +(byte*~) main::$104 +(signed word*~) main::$105 +(signed word*~) main::$106 +(bool~) main::$107 +(bool~) main::$11 +(bool~) main::$12 +(byte~) main::$13 +(bool~) main::$14 +(bool~) main::$15 +(byte~) main::$17 +(bool~) main::$18 +(bool~) main::$19 +(bool~) main::$2 +(bool~) main::$20 +(bool~) main::$21 +(bool~) main::$22 +(bool~) main::$23 +(bool~) main::$24 +(bool~) main::$25 +(bool~) main::$26 +(signed word~) main::$27 +(signed word~) main::$28 +(bool~) main::$29 +(bool~) main::$3 +(bool~) main::$30 +(bool~) main::$31 +(bool~) main::$32 +(bool~) main::$33 +(bool~) main::$34 +(bool~) main::$35 +(byte~) main::$36 +(bool~) main::$37 +(bool~) main::$38 +(bool~) main::$39 +(bool~) main::$4 +(byte~) main::$41 +(number~) main::$42 +(bool~) main::$43 +(bool~) main::$44 +(bool~) main::$45 +(bool~) main::$46 +(bool~) main::$47 +(bool~) main::$48 +(bool~) main::$49 +(bool~) main::$5 +(byte~) main::$52 +(byte*~) main::$53 +(signed word*~) main::$54 +(signed byte*~) main::$55 +(signed byte*~) main::$56 +(signed word*~) main::$57 +(signed byte*~) main::$58 +(signed byte*~) main::$59 +(bool~) main::$6 +(signed byte*~) main::$60 +(signed byte*~) main::$61 +(signed byte*~) main::$62 +(signed byte*~) main::$63 +(signed byte*~) main::$64 +(signed byte*~) main::$65 +(signed byte*~) main::$66 +(signed word*~) main::$67 +(signed byte*~) main::$68 +(signed word*~) main::$69 +(struct $5*~) main::$7 +(signed byte*~) main::$70 +(signed word*~) main::$71 +(signed byte*~) main::$72 +(signed word*~) main::$73 +(signed word*~) main::$74 +(signed byte*~) main::$75 +(signed word*~) main::$76 +(byte*~) main::$77 +(signed word*~) main::$78 +(signed word*~) main::$79 +(bool~) main::$8 +(byte*~) main::$80 +(signed word*~) main::$81 +(signed byte*~) main::$82 +(signed byte*~) main::$83 +(signed word*~) main::$84 +(signed byte*~) main::$85 +(signed byte*~) main::$86 +(signed byte*~) main::$87 +(signed byte*~) main::$88 +(signed byte*~) main::$89 +(bool~) main::$9 +(signed byte*~) main::$90 +(signed byte*~) main::$91 +(signed byte*~) main::$92 +(signed byte*~) main::$93 +(signed word*~) main::$94 +(signed byte*~) main::$95 +(signed word*~) main::$96 +(signed byte*~) main::$97 +(signed word*~) main::$98 +(signed byte*~) main::$99 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@26 +(label) main::@27 +(label) main::@28 +(label) main::@29 +(label) main::@3 +(label) main::@30 +(label) main::@31 +(label) main::@32 +(label) main::@33 +(label) main::@34 +(label) main::@35 +(label) main::@36 +(label) main::@37 +(label) main::@38 +(label) main::@39 +(label) main::@4 +(label) main::@40 +(label) main::@41 +(label) main::@42 +(label) main::@43 +(label) main::@44 +(label) main::@45 +(label) main::@46 +(label) main::@47 +(label) main::@48 +(label) main::@49 +(label) main::@5 +(label) main::@50 +(label) main::@51 +(label) main::@52 +(label) main::@53 +(label) main::@54 +(label) main::@55 +(label) main::@56 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(label) main::@return +(word) main::c +(word) main::c#0 +(word) main::c#1 +(word) main::c#10 +(word) main::c#11 +(word) main::c#12 +(word) main::c#13 +(word) main::c#14 +(word) main::c#15 +(word) main::c#16 +(word) main::c#17 +(word) main::c#18 +(word) main::c#19 +(word) main::c#2 +(word) main::c#20 +(word) main::c#21 +(word) main::c#22 +(word) main::c#23 +(word) main::c#24 +(word) main::c#25 +(word) main::c#26 +(word) main::c#27 +(word) main::c#28 +(word) main::c#29 +(word) main::c#3 +(word) main::c#30 +(word) main::c#31 +(word) main::c#32 +(word) main::c#33 +(word) main::c#34 +(word) main::c#35 +(word) main::c#36 +(word) main::c#37 +(word) main::c#38 +(word) main::c#39 +(word) main::c#4 +(word) main::c#40 +(word) main::c#41 +(word) main::c#5 +(word) main::c#6 +(word) main::c#7 +(word) main::c#8 +(word) main::c#9 +(struct $5*) main::d +(struct $5*) main::d#0 +(struct $5*) main::d#1 +(struct $5*) main::d#10 +(struct $5*) main::d#11 +(struct $5*) main::d#12 +(struct $5*) main::d#13 +(struct $5*) main::d#14 +(struct $5*) main::d#2 +(struct $5*) main::d#3 +(struct $5*) main::d#4 +(struct $5*) main::d#5 +(struct $5*) main::d#6 +(struct $5*) main::d#7 +(struct $5*) main::d#8 +(struct $5*) main::d#9 +(struct $5*) main::d1 +(struct $5*) main::d1#0 +(struct $5*) main::d1#1 +(struct $5*) main::d1#2 +(byte) main::i +(byte) main::i#0 +(byte) main::i#1 +(byte) main::i#10 +(byte) main::i#11 +(byte) main::i#12 +(byte) main::i#13 +(byte) main::i#14 +(byte) main::i#15 +(byte) main::i#16 +(byte) main::i#17 +(byte) main::i#18 +(byte) main::i#19 +(byte) main::i#2 +(byte) main::i#20 +(byte) main::i#21 +(byte) main::i#22 +(byte) main::i#23 +(byte) main::i#24 +(byte) main::i#25 +(byte) main::i#26 +(byte) main::i#27 +(byte) main::i#28 +(byte) main::i#29 +(byte) main::i#3 +(byte) main::i#30 +(byte) main::i#31 +(byte) main::i#32 +(byte) main::i#33 +(byte) main::i#34 +(byte) main::i#35 +(byte) main::i#36 +(byte) main::i#37 +(byte) main::i#38 +(byte) main::i#39 +(byte) main::i#4 +(byte) main::i#40 +(byte) main::i#41 +(byte) main::i#5 +(byte) main::i#6 +(byte) main::i#7 +(byte) main::i#8 +(byte) main::i#9 +(word) main::oCount +(word) main::oCount#0 +(word) main::oCount#1 +(word) main::oCount#10 +(word) main::oCount#11 +(word) main::oCount#12 +(word) main::oCount#13 +(word) main::oCount#14 +(word) main::oCount#15 +(word) main::oCount#16 +(word) main::oCount#17 +(word) main::oCount#18 +(word) main::oCount#19 +(word) main::oCount#2 +(word) main::oCount#20 +(word) main::oCount#21 +(word) main::oCount#22 +(word) main::oCount#23 +(word) main::oCount#24 +(word) main::oCount#25 +(word) main::oCount#26 +(word) main::oCount#27 +(word) main::oCount#28 +(word) main::oCount#29 +(word) main::oCount#3 +(word) main::oCount#30 +(word) main::oCount#31 +(word) main::oCount#32 +(word) main::oCount#33 +(word) main::oCount#34 +(word) main::oCount#35 +(word) main::oCount#36 +(word) main::oCount#37 +(word) main::oCount#38 +(word) main::oCount#39 +(word) main::oCount#4 +(word) main::oCount#40 +(word) main::oCount#41 +(word) main::oCount#42 +(word) main::oCount#43 +(word) main::oCount#44 +(word) main::oCount#45 +(word) main::oCount#46 +(word) main::oCount#47 +(word) main::oCount#48 +(word) main::oCount#49 +(word) main::oCount#5 +(word) main::oCount#50 +(word) main::oCount#51 +(word) main::oCount#52 +(word) main::oCount#53 +(word) main::oCount#54 +(word) main::oCount#55 +(word) main::oCount#56 +(word) main::oCount#6 +(word) main::oCount#7 +(word) main::oCount#8 +(word) main::oCount#9 +(byte) main::objects +(byte) main::objects#0 +(byte) main::objects#1 +(byte) main::objects#10 +(byte) main::objects#11 +(byte) main::objects#12 +(byte) main::objects#13 +(byte) main::objects#14 +(byte) main::objects#15 +(byte) main::objects#16 +(byte) main::objects#17 +(byte) main::objects#18 +(byte) main::objects#19 +(byte) main::objects#2 +(byte) main::objects#20 +(byte) main::objects#21 +(byte) main::objects#22 +(byte) main::objects#23 +(byte) main::objects#24 +(byte) main::objects#25 +(byte) main::objects#26 +(byte) main::objects#27 +(byte) main::objects#28 +(byte) main::objects#29 +(byte) main::objects#3 +(byte) main::objects#30 +(byte) main::objects#31 +(byte) main::objects#32 +(byte) main::objects#33 +(byte) main::objects#34 +(byte) main::objects#35 +(byte) main::objects#36 +(byte) main::objects#37 +(byte) main::objects#38 +(byte) main::objects#39 +(byte) main::objects#4 +(byte) main::objects#40 +(byte) main::objects#41 +(byte) main::objects#42 +(byte) main::objects#43 +(byte) main::objects#44 +(byte) main::objects#45 +(byte) main::objects#46 +(byte) main::objects#47 +(byte) main::objects#48 +(byte) main::objects#49 +(byte) main::objects#5 +(byte) main::objects#50 +(byte) main::objects#51 +(byte) main::objects#52 +(byte) main::objects#53 +(byte) main::objects#54 +(byte) main::objects#55 +(byte) main::objects#56 +(byte) main::objects#57 +(byte) main::objects#6 +(byte) main::objects#7 +(byte) main::objects#8 +(byte) main::objects#9 +(const byte) main::preset = (byte) 0 +(signed word) main::return +(signed word) main::return#0 +(signed word) main::return#1 +(signed word) main::return#2 +(signed word) main::return#3 +(byte) main::stopIt +(byte) main::stopIt#0 +(byte) main::stopIt#1 +(byte) main::stopIt#10 +(byte) main::stopIt#11 +(byte) main::stopIt#12 +(byte) main::stopIt#13 +(byte) main::stopIt#14 +(byte) main::stopIt#15 +(byte) main::stopIt#16 +(byte) main::stopIt#17 +(byte) main::stopIt#18 +(byte) main::stopIt#19 +(byte) main::stopIt#2 +(byte) main::stopIt#20 +(byte) main::stopIt#21 +(byte) main::stopIt#22 +(byte) main::stopIt#23 +(byte) main::stopIt#24 +(byte) main::stopIt#25 +(byte) main::stopIt#26 +(byte) main::stopIt#27 +(byte) main::stopIt#28 +(byte) main::stopIt#29 +(byte) main::stopIt#3 +(byte) main::stopIt#30 +(byte) main::stopIt#31 +(byte) main::stopIt#32 +(byte) main::stopIt#33 +(byte) main::stopIt#34 +(byte) main::stopIt#35 +(byte) main::stopIt#36 +(byte) main::stopIt#37 +(byte) main::stopIt#38 +(byte) main::stopIt#39 +(byte) main::stopIt#4 +(byte) main::stopIt#40 +(byte) main::stopIt#41 +(byte) main::stopIt#42 +(byte) main::stopIt#43 +(byte) main::stopIt#44 +(byte) main::stopIt#45 +(byte) main::stopIt#46 +(byte) main::stopIt#47 +(byte) main::stopIt#48 +(byte) main::stopIt#49 +(byte) main::stopIt#5 +(byte) main::stopIt#50 +(byte) main::stopIt#51 +(byte) main::stopIt#52 +(byte) main::stopIt#53 +(byte) main::stopIt#54 +(byte) main::stopIt#6 +(byte) main::stopIt#7 +(byte) main::stopIt#8 +(byte) main::stopIt#9 +(byte) main::type +(byte) main::type#0 +(byte) main::type#1 +(byte) main::type#10 +(byte) main::type#11 +(byte) main::type#2 +(byte) main::type#3 +(byte) main::type#4 +(byte) main::type#5 +(byte) main::type#6 +(byte) main::type#7 +(byte) main::type#8 +(byte) main::type#9 +(const byte) maxC64Images = (number) $100 +(const byte) maxDrawObjects = (number) $18 +(const byte) maxSprImages = (number) 8 +(const byte) maxSprites = (number) $20 +(const byte) rfDrop = (number) $fe +(const byte) sprOff = (number) $40 + +Adding number conversion cast (unumber) 1 in +Adding number conversion cast (unumber) 0 in (byte) lcSync::return#0 ← (number) 0 +Adding number conversion cast (unumber) $a in (bool~) Print00::$0 ← (byte) Print00::v#3 >= (number) $a +Adding number conversion cast (unumber) $a in (byte) Print00::v#1 ← (byte) Print00::v#4 - (number) $a +Adding number conversion cast (unumber) 1 in (bool~) Print00::$1 ← (byte) Print00::v#5 >= (number) 1 +Adding number conversion cast (unumber) 1 in (byte) Print00::v#2 ← (byte) Print00::v#6 - (number) 1 +Adding number conversion cast (unumber) 0 in (byte) GetSprite::t0#1 ← (number) 0 +Adding number conversion cast (unumber) $ff in (byte) GetSprite::return#0 ← (number) $ff +Adding number conversion cast (unumber) 0 in *((const byte*) cmRF + (byte) GetSprite::t0#6) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) cmRF + (byte) AddSprite::sn#3) ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) AddSprite::t0#1 ← (number) 0 +Adding number conversion cast (unumber) $80 in (bool~) AddSprite::$2 ← *((const byte*) cmIT + (byte) AddSprite::t0#4) >= (number) $80 +Adding number conversion cast (unumber) 1 in (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#5 + (number) 1 +Adding number conversion cast (unumber) 0 in *((const byte*) cmRF + (byte) AddSprite::sn#4) ← (number) 0 +Adding number conversion cast (unumber) $ff in *((const byte*) cmRY + (byte) DelSprite::sn#1) ← (number) $ff +Adding number conversion cast (unumber) sprOff+0 in *((const byte*) lcSprMapTab + (number) 0) ← (const byte) sprOff+(number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) lcSprMapTab + (number) 0) ← ((unumber)) (const byte) sprOff+(number) 0 +Adding number conversion cast (unumber) 0 in *((const byte*) lcSprMapTab + (number) 0) ← ((unumber)) (const byte) sprOff+(unumber)(number) 0 +Adding number conversion cast (unumber) sprOff+1 in *((const byte*) lcSprMapTab + (number) 1) ← (const byte) sprOff+(number) 1 +Adding number conversion cast (unumber) 1 in *((const byte*) lcSprMapTab + (number) 1) ← ((unumber)) (const byte) sprOff+(number) 1 +Adding number conversion cast (unumber) 1 in *((const byte*) lcSprMapTab + (number) 1) ← ((unumber)) (const byte) sprOff+(unumber)(number) 1 +Adding number conversion cast (unumber) sprOff+2 in *((const byte*) lcSprMapTab + (number) 2) ← (const byte) sprOff+(number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) lcSprMapTab + (number) 2) ← ((unumber)) (const byte) sprOff+(number) 2 +Adding number conversion cast (unumber) 2 in *((const byte*) lcSprMapTab + (number) 2) ← ((unumber)) (const byte) sprOff+(unumber)(number) 2 +Adding number conversion cast (unumber) sprOff+3 in *((const byte*) lcSprMapTab + (number) 3) ← (const byte) sprOff+(number) 3 +Adding number conversion cast (unumber) 3 in *((const byte*) lcSprMapTab + (number) 3) ← ((unumber)) (const byte) sprOff+(number) 3 +Adding number conversion cast (unumber) 3 in *((const byte*) lcSprMapTab + (number) 3) ← ((unumber)) (const byte) sprOff+(unumber)(number) 3 +Adding number conversion cast (unumber) sprOff+4 in *((const byte*) lcSprMapTab + (number) 4) ← (const byte) sprOff+(number) 4 +Adding number conversion cast (unumber) 4 in *((const byte*) lcSprMapTab + (number) 4) ← ((unumber)) (const byte) sprOff+(number) 4 +Adding number conversion cast (unumber) 4 in *((const byte*) lcSprMapTab + (number) 4) ← ((unumber)) (const byte) sprOff+(unumber)(number) 4 +Adding number conversion cast (unumber) sprOff+5 in *((const byte*) lcSprMapTab + (number) 5) ← (const byte) sprOff+(number) 5 +Adding number conversion cast (unumber) 5 in *((const byte*) lcSprMapTab + (number) 5) ← ((unumber)) (const byte) sprOff+(number) 5 +Adding number conversion cast (unumber) 5 in *((const byte*) lcSprMapTab + (number) 5) ← ((unumber)) (const byte) sprOff+(unumber)(number) 5 +Adding number conversion cast (unumber) $a|lfMC in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 1) ← (number) $a|(const byte) lfMC +Adding number conversion cast (unumber) $a in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 1) ← ((unumber)) (number) $a|(const byte) lfMC +Adding number conversion cast (unumber) sprOff+1 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 1) ← ((unumber)) (unumber)(number) $a|(const byte) lfMC +Adding number conversion cast (unumber) 1 in *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(number) 1) ← ((unumber)) (unumber)(number) $a|(const byte) lfMC +Adding number conversion cast (unumber) sprOff+0 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 0) ← *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 1) +Adding number conversion cast (unumber) 0 in *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(number) 0) ← *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 1) +Adding number conversion cast (unumber) 5|lfMC in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 3) ← (number) 5|(const byte) lfMC +Adding number conversion cast (unumber) 5 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 3) ← ((unumber)) (number) 5|(const byte) lfMC +Adding number conversion cast (unumber) sprOff+3 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 3) ← ((unumber)) (unumber)(number) 5|(const byte) lfMC +Adding number conversion cast (unumber) 3 in *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(number) 3) ← ((unumber)) (unumber)(number) 5|(const byte) lfMC +Adding number conversion cast (unumber) sprOff+2 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 2) ← *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 3) +Adding number conversion cast (unumber) 2 in *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(number) 2) ← *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 3) +Adding number conversion cast (unumber) $e|lfMC in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 5) ← (number) $e|(const byte) lfMC +Adding number conversion cast (unumber) $e in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 5) ← ((unumber)) (number) $e|(const byte) lfMC +Adding number conversion cast (unumber) sprOff+5 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 5) ← ((unumber)) (unumber)(number) $e|(const byte) lfMC +Adding number conversion cast (unumber) 5 in *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(number) 5) ← ((unumber)) (unumber)(number) $e|(const byte) lfMC +Adding number conversion cast (unumber) sprOff+4 in *((const byte*) lcSprColTab + (const byte) sprOff+(number) 4) ← *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 5) +Adding number conversion cast (unumber) 4 in *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(number) 4) ← *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 5) +Adding number conversion cast (unumber) 0 in (byte) main::i#1 ← (number) 0 +Adding number conversion cast (unumber) maxSprites+1 in (bool~) main::$2 ← (byte) main::i#12 < (const byte) maxSprites+(number) 1 +Adding number conversion cast (unumber) 1 in (bool~) main::$2 ← (byte) main::i#12 < (unumber)(const byte) maxSprites+(number) 1 +Adding number conversion cast (unumber) $ff in *((const byte*) cmIT + (byte) main::i#13) ← (number) $ff +Adding number conversion cast (unumber) 1 in (byte) main::i#2 ← (byte) main::i#13 + (number) 1 +Adding number conversion cast (unumber) 0 in (byte) main::i#3 ← (number) 0 +Adding number conversion cast (unumber) $ff in *((const byte*) cmRF + (byte) main::i#15) ← (number) $ff +Adding number conversion cast (unumber) 1 in (byte) main::i#4 ← (byte) main::i#15 + (number) 1 +Adding number conversion cast (unumber) 0 in (word) main::c#1 ← (number) 0 +Adding number conversion cast (unumber) $3e8 in (bool~) main::$4 ← (word) main::c#9 < (number) $3e8 +Adding number conversion cast (unumber) $20 in *((byte*)(number) $e000 + (word) main::c#10) ← (number) $20 +Adding number conversion cast (unumber) $e in *((byte*)(number) $d800 + (word) main::c#10) ← (number) $e +Adding number conversion cast (unumber) 1 in (word) main::c#2 ← (word) main::c#10 + (number) 1 +Adding number conversion cast (unumber) 0 in (byte) lcSync::flags#0 ← (number) 0 +Adding number conversion cast (unumber) $33 in *((byte*)(number) 1) ← (number) $33 +Adding number conversion cast (unumber) 0 in (word) main::c#3 ← (number) 0 +Adding number conversion cast (unumber) $7f8 in (bool~) main::$5 ← (word) main::c#11 < (number) $7f8 +Adding number conversion cast (unumber) 1 in (word) main::c#4 ← (word) main::c#12 + (number) 1 +Adding number conversion cast (unumber) $35 in *((byte*)(number) 1) ← (number) $35 +Adding number conversion cast (unumber) 3 in *((byte*)(number) $d000 + (number) $d02) ← *((byte*)(number) $d000 + (number) $d02) | (number) 3 +Adding number conversion cast (unumber) $d02 in *((byte*)(number) $d000 + (number) $d02) ← *((byte*)(number) $d000 + (number) $d02) | (unumber)(number) 3 +Adding number conversion cast (unumber) $d02 in *((byte*)(number) $d000 + (number) $d02) ← *((byte*)(number) $d000 + (unumber)(number) $d02) | (unumber)(number) 3 +Adding number conversion cast (unumber) $d00 in *((byte*)(number) $d000 + (number) $d00) ← *((byte*)(number) $d000 + (number) $d00) & ~(byte) 3 +Adding number conversion cast (unumber) $d00 in *((byte*)(number) $d000 + (number) $d00) ← *((byte*)(number) $d000 + (unumber)(number) $d00) & ~(byte) 3 +Adding number conversion cast (unumber) $80 in (number~) main::$1 ← (byte) main::i#16 & (number) $80 +Adding number conversion cast (unumber) main::$1 in (number~) main::$1 ← (byte) main::i#16 & (unumber)(number) $80 +Adding number conversion cast (unumber) 0 in (bool~) main::$107 ← (number) 0 != (unumber~) main::$1 +Adding number conversion cast (unumber) 'N'-'A'+1 in *((byte*)(number) $e000 + (number) $3e4) ← (byte) 'N'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e4) ← ((unumber)) (byte) 'N'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e4 in *((byte*)(number) $e000 + (number) $3e4) ← ((unumber)) (byte) 'N'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'T'-'A'+1 in *((byte*)(number) $e000 + (number) $3e5) ← (byte) 'T'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e5) ← ((unumber)) (byte) 'T'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e5 in *((byte*)(number) $e000 + (number) $3e5) ← ((unumber)) (byte) 'T'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'S'-'A'+1 in *((byte*)(number) $e000 + (number) $3e6) ← (byte) 'S'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e6) ← ((unumber)) (byte) 'S'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e6 in *((byte*)(number) $e000 + (number) $3e6) ← ((unumber)) (byte) 'S'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'C'-'A'+1 in *((byte*)(number) $e000 + (number) $3e7) ← (byte) 'C'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e7) ← ((unumber)) (byte) 'C'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e7 in *((byte*)(number) $e000 + (number) $3e7) ← ((unumber)) (byte) 'C'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'P'-'A'+1 in *((byte*)(number) $e000 + (number) $3e5) ← (byte) 'P'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e5) ← ((unumber)) (byte) 'P'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e5 in *((byte*)(number) $e000 + (number) $3e5) ← ((unumber)) (byte) 'P'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'A'-'A'+1 in *((byte*)(number) $e000 + (number) $3e6) ← (byte) 'A'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e6) ← ((unumber)) (byte) 'A'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e6 in *((byte*)(number) $e000 + (number) $3e6) ← ((unumber)) (byte) 'A'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'L'-'A'+1 in *((byte*)(number) $e000 + (number) $3e7) ← (byte) 'L'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3e7) ← ((unumber)) (byte) 'L'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3e7 in *((byte*)(number) $e000 + (number) $3e7) ← ((unumber)) (byte) 'L'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'B'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 0) ← (byte) 'B'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 0) ← ((unumber)) (byte) 'B'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+0 in *((byte*)(number) $e000 + (number) $3cf+(number) 0) ← ((unumber)) (byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'U'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 1) ← ((unumber)) (byte) 'U'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 1) ← ((unumber)) (byte) 'U'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'B'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 2) ← ((unumber)) (byte) 'B'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+2 in *((byte*)(number) $e000 + (number) $3cf+(number) 2) ← ((unumber)) (byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'B'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 3) ← ((unumber)) (byte) 'B'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+3 in *((byte*)(number) $e000 + (number) $3cf+(number) 3) ← ((unumber)) (byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'L'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 4) ← ((unumber)) (byte) 'L'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+4 in *((byte*)(number) $e000 + (number) $3cf+(number) 4) ← ((unumber)) (byte) 'L'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'E'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 5) ← ((unumber)) (byte) 'E'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+5 in *((byte*)(number) $e000 + (number) $3cf+(number) 5) ← ((unumber)) (byte) 'E'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) 'S'-'A'+1 in *((byte*)(number) $e000 + (number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) 1 in *((byte*)(number) $e000 + (number) $3cf+(number) 6) ← ((unumber)) (byte) 'S'-(byte) 'A'+(number) 1 +Adding number conversion cast (unumber) $3cf+6 in *((byte*)(number) $e000 + (number) $3cf+(number) 6) ← ((unumber)) (byte) 'S'-(byte) 'A'+(unumber)(number) 1 +Adding number conversion cast (unumber) $3cf+7 in *((byte*)(number) $e000 + (number) $3cf+(number) 7) ← (byte) ':' +Adding number conversion cast (unumber) 0 in (byte) main::type#1 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) main::i#6 ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) main::type#2 ← (byte) main::type#4 + (number) 1 +Adding number conversion cast (unumber) 6 in (bool~) main::$8 ← (byte) main::type#2 >= (number) 6 +Adding number conversion cast (unumber) 0 in (word) main::c#5 ← (number) 0 +Adding number conversion cast (snumber) $70<= (number) $e +Adding number conversion cast (snumber) 1 in *((signed byte*~) main::$64) ← (number) 1 +Adding number conversion cast (snumber) $20 in (bool~) main::$20 ← *((signed byte*~) main::$65) > (number) $20 +Adding number conversion cast (snumber) -1 in *((signed byte*~) main::$66) ← (number) -1 +Adding number conversion cast (snumber) $f8< (number) $f8<<(const byte) F +Adding number conversion cast (unumber) $f8 in (bool~) main::$22 ← *((signed word*~) main::$67) > (snumber)(number) $f8<<(const byte) F +Adding number conversion cast (snumber) -1< (number) 1 +Adding number conversion cast (unumber) 0 in (word) main::c#8 ← (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) main::$31 ← (number) 0 == (byte) main::stopIt#2 +Adding number conversion cast (unumber) 1 in (byte) main::objects#1 ← (byte) main::objects#5 + (number) 1 +Adding number conversion cast (unumber) 0 in (bool~) main::$35 ← (number) 0 == (const byte) main::preset +Adding number conversion cast (unumber) $80 in (bool~) main::$37 ← (byte) main::i#11 < (number) $80 +Adding number conversion cast (unumber) 0 in *((const byte*) cmRY + (byte) main::i#27) ← (number) 0 +Adding number conversion cast (unumber) 2 in (word) main::oCount#1 ← (word) main::oCount#4 + (number) 2 +Adding number conversion cast (unumber) 0 in (bool~) main::$44 ← (word) main::oCount#5 > (number) 0 +Adding number conversion cast (unumber) 1 in (word) main::oCount#2 ← (word) main::oCount#6 - (number) 1 +Adding number conversion cast (unumber) 2 in (bool~) main::$46 ← (word) main::oCount#7 > (number) 2 +Adding number conversion cast (unumber) 0 in (bool~) main::$47 ← (byte) main::objects#6 > (number) 0 +Adding number conversion cast (unumber) $e000 in (byte*) Print00::p#2 ← (number) $e000+(byte*)(number) $3d7 +Adding number conversion cast (unumber) 1 in (byte) main::objects#2 ← (byte) main::objects#8 - (number) 1 +Adding number conversion cast (unumber) 1 in (byte) main::stopIt#1 ← (number) 1 +Adding number conversion cast (unumber) 0 in (word) main::oCount#3 ← (number) 0 +Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast (byte) lcSync::return#0 ← (unumber)(number) 0 +Inlining cast (byte) GetSprite::t0#1 ← (unumber)(number) 0 +Inlining cast (byte) GetSprite::return#0 ← (unumber)(number) $ff +Inlining cast *((const byte*) cmRF + (byte) GetSprite::t0#6) ← (unumber)(number) 0 +Inlining cast *((const byte*) cmRF + (byte) AddSprite::sn#3) ← (unumber)(number) 0 +Inlining cast (byte) AddSprite::t0#1 ← (unumber)(number) 0 +Inlining cast *((const byte*) cmRF + (byte) AddSprite::sn#4) ← (unumber)(number) 0 +Inlining cast *((const byte*) cmRY + (byte) DelSprite::sn#1) ← (unumber)(number) $ff +Inlining cast *((const byte*) lcSprMapTab + (unumber)(number) 0) ← (unumber)(const byte) sprOff+(unumber)(number) 0 +Inlining cast *((const byte*) lcSprMapTab + (unumber)(number) 1) ← (unumber)(const byte) sprOff+(unumber)(number) 1 +Inlining cast *((const byte*) lcSprMapTab + (unumber)(number) 2) ← (unumber)(const byte) sprOff+(unumber)(number) 2 +Inlining cast *((const byte*) lcSprMapTab + (unumber)(number) 3) ← (unumber)(const byte) sprOff+(unumber)(number) 3 +Inlining cast *((const byte*) lcSprMapTab + (unumber)(number) 4) ← (unumber)(const byte) sprOff+(unumber)(number) 4 +Inlining cast *((const byte*) lcSprMapTab + (unumber)(number) 5) ← (unumber)(const byte) sprOff+(unumber)(number) 5 +Inlining cast *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 1) ← (unumber)(unumber)(number) $a|(const byte) lfMC +Inlining cast *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 3) ← (unumber)(unumber)(number) 5|(const byte) lfMC +Inlining cast *((const byte*) lcSprColTab + (unumber)(const byte) sprOff+(unumber)(number) 5) ← (unumber)(unumber)(number) $e|(const byte) lfMC +Inlining cast (byte) main::i#1 ← (unumber)(number) 0 +Inlining cast *((const byte*) cmIT + (byte) main::i#13) ← (unumber)(number) $ff +Inlining cast (byte) main::i#3 ← (unumber)(number) 0 +Inlining cast *((const byte*) cmRF + (byte) main::i#15) ← (unumber)(number) $ff +Inlining cast (word) main::c#1 ← (unumber)(number) 0 +Inlining cast *((byte*)(number) $e000 + (word) main::c#10) ← (unumber)(number) $20 +Inlining cast *((byte*)(number) $d800 + (word) main::c#10) ← (unumber)(number) $e +Inlining cast (byte) lcSync::flags#0 ← (unumber)(number) 0 +Inlining cast *((byte*)(number) 1) ← (unumber)(number) $33 +Inlining cast (word) main::c#3 ← (unumber)(number) 0 +Inlining cast *((byte*)(number) 1) ← (unumber)(number) $35 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e4) ← (unumber)(byte) 'N'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e5) ← (unumber)(byte) 'T'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e6) ← (unumber)(byte) 'S'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e7) ← (unumber)(byte) 'C'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e5) ← (unumber)(byte) 'P'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e6) ← (unumber)(byte) 'A'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3e7) ← (unumber)(byte) 'L'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 0) ← (unumber)(byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 1) ← (unumber)(byte) 'U'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 2) ← (unumber)(byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 3) ← (unumber)(byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 4) ← (unumber)(byte) 'L'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 5) ← (unumber)(byte) 'E'-(byte) 'A'+(unumber)(number) 1 +Inlining cast *((byte*)(number) $e000 + (unumber)(number) $3cf+(number) 6) ← (unumber)(byte) 'S'-(byte) 'A'+(unumber)(number) 1 +Inlining cast (byte) main::type#1 ← (unumber)(number) 0 +Inlining cast (byte) main::i#6 ← (unumber)(number) 0 +Inlining cast (word) main::c#5 ← (unumber)(number) 0 +Inlining cast *((signed word*~) main::$54) ← (snumber)(unumber)(number) $70<<(const byte) F +Inlining cast *((signed byte*~) main::$56) ← (snumber)(number) 1 +Inlining cast *((signed word*~) main::$57) ← (snumber)(unumber)(number) $18<<(const byte) F +Inlining cast *((signed byte*~) main::$58) ← (snumber)(unumber)(number) 1<<(const byte) F +Inlining cast *((signed byte*~) main::$59) ← (snumber)(number) 1 +Inlining cast (byte) main::type#3 ← (unumber)(number) 0 +Inlining cast *((const byte*) cmRF + (byte) main::i#21) ← (unumber)(number) 0 +Inlining cast (byte) main::i#8 ← (unumber)(number) 0 +Inlining cast *((signed byte*~) main::$64) ← (snumber)(number) 1 +Inlining cast *((signed byte*~) main::$66) ← (snumber)(number) -1 +Inlining cast *((signed byte*~) main::$68) ← (snumber)(unumber)(number) -1<<(const byte) F +Inlining cast *((signed byte*~) main::$70) ← (snumber)(unumber)(number) 1<<(const byte) F +Inlining cast (byte) lcSync::flags#1 ← (unumber)(number) 0 +Inlining cast (word) main::c#8 ← (unumber)(number) 0 +Inlining cast *((const byte*) cmRY + (byte) main::i#27) ← (unumber)(number) 0 +Inlining cast (byte) main::stopIt#1 ← (unumber)(number) 1 +Inlining cast (word) main::oCount#3 ← (unumber)(number) 0 +Inlining cast (signed word) main::return#0 ← (snumber)(number) 0 +Successful SSA optimization Pass2InlineCast +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $a +Simplifying constant integer cast $a +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $ff +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $ff +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 3 +Simplifying constant integer cast 3 +Simplifying constant integer cast 3 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 5 +Simplifying constant integer cast 5 +Simplifying constant integer cast 5 +Simplifying constant integer cast (unumber)(number) $a|(const byte) lfMC +Simplifying constant integer cast $a +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast (unumber)(number) 5|(const byte) lfMC +Simplifying constant integer cast 5 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 3 +Simplifying constant integer cast 3 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 2 +Simplifying constant integer cast 2 +Simplifying constant integer cast (unumber)(number) $e|(const byte) lfMC +Simplifying constant integer cast $e +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 5 +Simplifying constant integer cast 5 +Simplifying constant integer cast (const byte) sprOff+(unumber)(number) 4 +Simplifying constant integer cast 4 +Simplifying constant integer cast 0 +Simplifying constant integer cast (const byte) maxSprites+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast $ff +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $ff +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $3e8 +Simplifying constant integer cast $20 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $e +Simplifying constant pointer cast (byte*) 55296 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $33 +Simplifying constant pointer cast (byte*) 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $7f8 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant pointer cast (byte*) 63488 +Simplifying constant integer cast 1 +Simplifying constant integer cast $35 +Simplifying constant pointer cast (byte*) 1 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant integer cast $d02 +Simplifying constant integer cast 3 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant integer cast $d02 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant integer cast $d00 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant integer cast $d00 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast (byte) 'N'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e4 +Simplifying constant integer cast (byte) 'T'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e5 +Simplifying constant integer cast (byte) 'S'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e6 +Simplifying constant integer cast (byte) 'C'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e7 +Simplifying constant integer cast (byte) 'P'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e5 +Simplifying constant integer cast (byte) 'A'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e6 +Simplifying constant integer cast (byte) 'L'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast $3e7 +Simplifying constant integer cast (byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast (byte) 'U'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast (byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast (byte) 'B'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast (byte) 'L'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast (byte) 'E'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast (byte) 'S'-(byte) 'A'+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant pointer cast (byte*) 57344 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 6 +Simplifying constant integer cast 0 +Simplifying constant integer cast $70 +Simplifying constant integer cast 1 +Simplifying constant integer cast $18 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast $14 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 4 +Simplifying constant integer cast 0 +Simplifying constant integer cast -$20 +Simplifying constant integer cast 1 +Simplifying constant integer cast $e +Simplifying constant integer cast 1 +Simplifying constant integer cast $20 +Simplifying constant integer cast -1 +Simplifying constant integer cast $f8 +Simplifying constant integer cast -1 +Simplifying constant integer cast $18 +Simplifying constant integer cast 1 +Simplifying constant integer cast $80 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $1f +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast 2 +Simplifying constant integer cast 0 +Simplifying constant integer cast $e000 +Simplifying constant pointer cast (byte*) 983 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $a +Finalized unsigned number type (byte) $a +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +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) $ff +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) $a +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $e +Finalized unsigned number type (byte) 5 +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $3e8 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $e +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $33 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $7f8 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $35 +Finalized unsigned number type (word) $d02 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (word) $d02 +Finalized unsigned number type (word) $d00 +Finalized unsigned number type (word) $d00 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e4 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e5 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e6 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e7 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e5 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e6 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (word) $3e7 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +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) 1 +Finalized unsigned number type (byte) 6 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $70 +Finalized signed number type (signed byte) 1 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 1 +Finalized signed number type (signed byte) 1 +Finalized unsigned number type (byte) $14 +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) 4 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) -$20 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $e +Finalized signed number type (signed byte) 1 +Finalized signed number type (signed byte) $20 +Finalized signed number type (signed byte) -1 +Finalized unsigned number type (byte) $f8 +Finalized unsigned number type (byte) -1 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $1f +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) 0 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $e000 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized signed number type (signed byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in (unumber~) main::$1 ← (byte) main::i#16 & (byte) $80 +Inferred type updated to byte in (unumber~) main::$42 ← (byte~) main::$41 & (byte) $1f +Inversing boolean not [35] (bool~) GetSprite::$2 ← *((const byte*) cmRF + (byte) GetSprite::t0#4) < (const byte) rfDrop from [34] (bool~) GetSprite::$1 ← *((const byte*) cmRF + (byte) GetSprite::t0#4) >= (const byte) rfDrop +Inversing boolean not [59] (bool~) AddSprite::$3 ← *((const byte*) cmIT + (byte) AddSprite::t0#4) < (byte) $80 from [58] (bool~) AddSprite::$2 ← *((const byte*) cmIT + (byte) AddSprite::t0#4) >= (byte) $80 +Inversing boolean not [168] (bool~) main::$9 ← (byte) main::type#2 < (byte) 6 from [167] (bool~) main::$8 ← (byte) main::type#2 >= (byte) 6 +Inversing boolean not [206] (bool~) main::$15 ← (word) main::c#6 >= (byte) $80 from [205] (bool~) main::$14 ← (word) main::c#6 < (byte) $80 +Inversing boolean not [238] (bool~) main::$30 ← (word) main::c#7 < (byte) $e from [237] (bool~) main::$29 ← (word) main::c#7 >= (byte) $e +Inversing boolean not [248] (bool~) main::$21 ← *((signed byte*~) main::$65) <= (signed byte) $20 from [247] (bool~) main::$20 ← *((signed byte*~) main::$65) > (signed byte) $20 +Inversing boolean not [267] (bool~) main::$24 ← *((signed word*~) main::$69) >= (signed word)(byte) $18<<(const byte) F from [266] (bool~) main::$23 ← *((signed word*~) main::$69) < (signed word)(byte) $18<<(const byte) F +Inversing boolean not [289] (bool~) main::$26 ← *((const byte*) cmRF + (byte) main::i#23) >= (byte) $80 from [288] (bool~) main::$25 ← *((const byte*) cmRF + (byte) main::i#23) < (byte) $80 +Inversing boolean not [347] (bool~) main::$45 ← (word) main::oCount#5 <= (byte) 0 from [346] (bool~) main::$44 ← (word) main::oCount#5 > (byte) 0 +Successful SSA optimization Pass2UnaryNotSimplification +Alias lcSync::return#0 = lcSync::return#4 lcSync::return#1 +Alias Print00::v#0 = Print00::v0#1 +Alias Print00::c#5 = Print00::c#9 Print00::c#6 +Alias Print00::v#3 = Print00::v#4 Print00::v#7 +Alias Print00::p#3 = Print00::p#8 Print00::p#5 +Alias Print00::c#10 = Print00::c#7 Print00::c#8 +Alias Print00::v#5 = Print00::v#6 +Alias Print00::p#4 = Print00::p#9 Print00::p#6 +Alias GetSprite::t0#3 = GetSprite::t0#4 GetSprite::t0#5 GetSprite::t0#6 GetSprite::return#1 +Alias GetSprite::return#2 = GetSprite::return#5 +Alias AddSprite::sn#2 = AddSprite::sn#3 AddSprite::sn#7 +Alias AddSprite::t0#3 = AddSprite::t0#4 AddSprite::t0#5 AddSprite::t0#6 +Alias AddSprite::sn#4 = AddSprite::sn#5 AddSprite::sn#6 AddSprite::sn#8 +Alias main::i#12 = main::i#13 +Alias main::objects#54 = main::objects#57 main::objects#56 +Alias main::stopIt#51 = main::stopIt#54 main::stopIt#53 +Alias main::oCount#53 = main::oCount#56 main::oCount#55 +Alias main::i#14 = main::i#15 +Alias main::objects#52 = main::objects#55 main::objects#53 +Alias main::stopIt#49 = main::stopIt#52 main::stopIt#50 +Alias main::oCount#51 = main::oCount#54 main::oCount#52 +Alias main::c#10 = main::c#9 +Alias main::objects#48 = main::objects#51 main::objects#50 main::objects#49 +Alias main::stopIt#41 = main::stopIt#48 main::stopIt#47 main::stopIt#44 +Alias main::oCount#47 = main::oCount#50 main::oCount#49 main::oCount#48 +Alias lcSync::return#2 = lcSync::return#5 +Alias main::i#5 = main::$0 +Alias main::c#11 = main::c#12 +Alias main::i#16 = main::i#35 main::i#28 +Alias main::objects#31 = main::objects#47 main::objects#46 main::objects#40 main::objects#32 +Alias main::stopIt#20 = main::stopIt#40 main::stopIt#38 main::stopIt#31 main::stopIt#21 +Alias main::oCount#31 = main::oCount#46 main::oCount#45 main::oCount#39 main::oCount#32 +Alias main::i#17 = main::i#18 main::i#29 +Alias main::type#4 = main::type#5 +Alias main::objects#16 = main::objects#41 main::objects#21 main::objects#42 +Alias main::stopIt#11 = main::stopIt#32 main::stopIt#7 main::stopIt#33 +Alias main::oCount#19 = main::oCount#40 main::oCount#23 main::oCount#41 +Alias main::d1#0 = main::$7 main::d1#2 +Alias main::i#19 = main::i#36 main::i#30 main::i#31 main::i#21 +Alias main::type#10 = main::type#7 main::type#8 main::type#11 main::type#9 +Alias main::objects#33 = main::objects#43 main::objects#34 main::objects#44 main::objects#35 +Alias main::stopIt#22 = main::stopIt#34 main::stopIt#23 main::stopIt#35 main::stopIt#24 +Alias main::oCount#33 = main::oCount#42 main::oCount#34 main::oCount#43 main::oCount#35 +Alias GetSprite::return#3 = GetSprite::return#6 +Alias main::c#13 = main::c#6 main::$13 +Alias main::d#14 = main::d#3 main::d#4 main::d#5 main::d#6 +Alias main::i#22 = main::i#41 main::i#38 main::i#39 main::i#40 +Alias main::objects#11 = main::objects#45 main::objects#3 main::objects#36 main::objects#37 main::objects#38 main::objects#4 main::objects#5 +Alias main::c#14 = main::c#35 main::c#15 main::c#28 main::c#29 main::c#30 +Alias main::stopIt#2 = main::stopIt#36 main::stopIt#4 main::stopIt#3 main::stopIt#25 main::stopIt#26 main::stopIt#27 main::stopIt#45 main::stopIt#42 main::stopIt#46 main::stopIt#43 +Alias main::oCount#10 = main::oCount#44 main::oCount#14 main::oCount#36 main::oCount#37 main::oCount#38 main::oCount#11 main::oCount#15 main::oCount#12 main::oCount#16 main::oCount#13 +Alias main::d#10 = main::d#8 main::d#7 main::d#9 +Alias main::i#32 = main::i#37 main::i#33 main::i#34 +Alias main::objects#22 = main::objects#28 main::objects#23 main::objects#24 +Alias main::c#21 = main::c#25 main::c#22 main::c#23 +Alias main::stopIt#12 = main::stopIt#18 main::stopIt#13 main::stopIt#14 +Alias main::oCount#24 = main::oCount#30 main::oCount#25 main::oCount#26 +Alias main::d#11 = main::d#13 +Alias main::i#23 = main::i#25 +Alias main::objects#18 = main::objects#19 +Alias main::c#19 = main::c#20 +Alias main::stopIt#10 = main::stopIt#9 +Alias main::oCount#21 = main::oCount#22 +Alias lcSync::return#3 = lcSync::return#6 +Alias main::oCount#4 = main::oCount#8 main::oCount#9 main::oCount#5 main::oCount#6 +Alias main::objects#12 = main::objects#20 main::objects#25 main::objects#13 main::objects#14 +Alias main::c#31 = main::c#36 main::c#37 main::c#32 main::c#33 +Alias main::stopIt#28 = main::stopIt#37 main::stopIt#39 main::stopIt#29 main::stopIt#30 +Alias main::i#10 = main::$42 +Alias main::c#38 = main::c#40 main::c#8 main::c#41 main::c#39 +Alias GetSprite::return#4 = GetSprite::return#7 +Alias main::objects#1 = main::objects#29 main::objects#39 main::objects#30 +Alias main::i#11 = main::$36 main::i#26 main::i#27 +Alias main::objects#17 = main::objects#7 +Alias main::c#18 = main::c#24 +Alias main::stopIt#15 = main::stopIt#8 +Alias main::oCount#20 = main::oCount#27 +Alias main::objects#6 = main::objects#8 +Alias main::c#26 = main::c#34 main::c#27 +Alias main::objects#15 = main::objects#2 +Alias main::return#0 = main::return#3 main::return#1 +Successful SSA optimization Pass2AliasElimination +Alias main::objects#26 = main::objects#31 +Alias main::stopIt#16 = main::stopIt#20 +Alias main::oCount#28 = main::oCount#31 +Alias main::d1#0 = main::d1#1 +Alias main::i#17 = main::i#19 main::i#20 +Alias main::objects#16 = main::objects#33 main::objects#27 +Alias main::stopIt#11 = main::stopIt#22 main::stopIt#17 +Alias main::oCount#19 = main::oCount#33 main::oCount#29 +Alias main::type#10 = main::type#6 +Alias main::d#10 = main::d#14 main::d#11 main::d#12 +Alias main::i#22 = main::i#32 main::i#23 main::i#24 +Alias main::objects#10 = main::objects#22 main::objects#11 main::objects#18 +Alias main::c#14 = main::c#21 main::c#19 main::c#17 +Alias main::stopIt#10 = main::stopIt#12 main::stopIt#2 main::stopIt#6 main::stopIt#28 main::stopIt#19 +Alias main::oCount#10 = main::oCount#24 main::oCount#21 main::oCount#18 main::oCount#4 +Alias main::objects#12 = main::objects#6 +Alias main::c#18 = main::c#26 main::c#31 +Successful SSA optimization Pass2AliasElimination +Identical Phi Values (byte) Print00::v#0 (byte) Print00::v0#0 +Identical Phi Values (byte*) Print00::p#7 (byte*) Print00::p#2 +Identical Phi Values (byte*) Print00::p#3 (byte*) Print00::p#7 +Identical Phi Values (byte*) Print00::p#4 (byte*) Print00::p#0 +Identical Phi Values (byte) AddSprite::sn#4 (byte) AddSprite::sn#2 +Identical Phi Values (byte) DelSprite::sn#1 (byte) DelSprite::sn#0 +Identical Phi Values (byte) main::objects#54 (byte) main::objects#0 +Identical Phi Values (byte) main::stopIt#51 (byte) main::stopIt#0 +Identical Phi Values (word) main::oCount#53 (word) main::oCount#0 +Identical Phi Values (byte) main::objects#52 (byte) main::objects#54 +Identical Phi Values (byte) main::stopIt#49 (byte) main::stopIt#51 +Identical Phi Values (word) main::oCount#51 (word) main::oCount#53 +Identical Phi Values (byte) main::objects#48 (byte) main::objects#52 +Identical Phi Values (byte) main::stopIt#41 (byte) main::stopIt#49 +Identical Phi Values (word) main::oCount#47 (word) main::oCount#51 +Identical Phi Values (byte) main::i#16 (byte) main::i#5 +Identical Phi Values (byte) main::objects#26 (byte) main::objects#48 +Identical Phi Values (byte) main::stopIt#16 (byte) main::stopIt#41 +Identical Phi Values (word) main::oCount#28 (word) main::oCount#47 +Identical Phi Values (byte) main::objects#16 (byte) main::objects#26 +Identical Phi Values (byte) main::stopIt#11 (byte) main::stopIt#16 +Identical Phi Values (word) main::oCount#19 (word) main::oCount#28 +Identical Phi Values (byte) main::objects#10 (byte) main::objects#9 +Identical Phi Values (word) main::c#14 (word) main::c#16 +Identical Phi Values (byte) main::stopIt#10 (byte) main::stopIt#5 +Identical Phi Values (word) main::oCount#10 (word) main::oCount#17 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) Print00::$0 [7] if((byte) Print00::v#3>=(byte) $a) goto Print00::@2 +Simple Condition (bool~) Print00::$1 [15] if((byte) Print00::v#5>=(byte) 1) goto Print00::@5 +Simple Condition (bool~) GetSprite::$0 [25] if((byte) GetSprite::t0#3<(const byte) maxSprites) goto GetSprite::@2 +Simple Condition (bool~) GetSprite::$2 [27] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@4 +Simple Condition (bool~) AddSprite::$0 [36] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#2)) goto AddSprite::@1 +Simple Condition (bool~) AddSprite::$1 [41] if((byte) AddSprite::t0#3<(const byte) maxSprites) goto AddSprite::@4 +Simple Condition (bool~) AddSprite::$3 [43] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@5 +Simple Condition (bool~) main::$2 [74] if((byte) main::i#12<(const byte) maxSprites+(byte) 1) goto main::@4 +Simple Condition (bool~) main::$3 [80] if((byte) main::i#14<(const byte) maxSprites) goto main::@7 +Simple Condition (bool~) main::$4 [86] if((word) main::c#10<(word) $3e8) goto main::@10 +Simple Condition (bool~) main::$5 [98] if((word) main::c#11<(word) $7f8) goto main::@13 +Simple Condition (bool~) main::$107 [106] if((byte) 0!=(byte~) main::$1) goto main::@1 +Simple Condition (bool~) main::$6 [126] if((byte) main::i#17<(const byte) maxDrawObjects) goto main::@17 +Simple Condition (bool~) main::$9 [134] if((byte) main::type#2<(byte) 6) goto main::@19 +Simple Condition (bool~) main::$15 [165] if((word) main::c#13>=(byte) $80) goto main::@20 +Simple Condition (bool~) main::$18 [178] if((byte) main::i#22<(byte) main::objects#9) goto main::@27 +Simple Condition (bool~) main::$19 [189] if(*((signed byte*~) main::$63)<(signed byte) -$20) goto main::@29 +Simple Condition (bool~) main::$30 [192] if((word) main::c#7<(byte) $e) goto main::@42 +Simple Condition (bool~) main::$21 [199] if(*((signed byte*~) main::$65)<=(signed byte) $20) goto main::@30 +Simple Condition (bool~) main::$22 [206] if(*((signed word*~) main::$67)>(signed word)(byte) $f8<<(const byte) F) goto main::@31 +Simple Condition (bool~) main::$24 [213] if(*((signed word*~) main::$69)>=(signed word)(byte) $18<<(const byte) F) goto main::@32 +Simple Condition (bool~) main::$26 [232] if(*((const byte*) cmRF + (byte) main::i#22)>=(byte) $80) goto main::@33 +Simple Condition (bool~) main::$43 [253] if((byte) main::i#10>(byte) 1) goto main::@43 +Simple Condition (bool~) main::$45 [277] if((word) main::oCount#17<=(byte) 0) goto main::@44 +Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting ! if()-condition to reversed if() [157] (bool~) main::$12 ← ! (bool~) main::$11 +Rewriting && if()-condition to two if()s [156] (bool~) main::$11 ← (const byte) main::preset && (bool~) main::$10 +Rewriting ! if()-condition to reversed if() [258] (bool~) main::$34 ← ! (bool~) main::$33 +Rewriting && if()-condition to two if()s [257] (bool~) main::$33 ← (bool~) main::$31 && (bool~) main::$32 +Rewriting ! if()-condition to reversed if() [267] (bool~) main::$39 ← ! (bool~) main::$38 +Rewriting && if()-condition to two if()s [266] (bool~) main::$38 ← (bool~) main::$35 && (bool~) main::$37 +Rewriting ! if()-condition to reversed if() [283] (bool~) main::$49 ← ! (bool~) main::$48 +Rewriting && if()-condition to two if()s [282] (bool~) main::$48 ← (bool~) main::$46 && (bool~) main::$47 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Warning! Adding boolean cast to non-boolean condition (const byte) main::preset +Rewriting array member address-of to pointer addition [128] (struct $5*) main::d1#0 ← (const struct $5*) dTab + (byte~) main::$52 +Successful SSA optimization PassNArrayElementAddressOfRewriting +Constant right-side identified [139] *((signed word*~) main::$54) ← (snumber)(byte) $70<<(const byte) F +Constant right-side identified [148] *((signed word*~) main::$57) ← (snumber)(byte) $18<<(const byte) F +Constant right-side identified [151] *((signed byte*~) main::$58) ← (snumber)(byte) 1<<(const byte) F +Constant right-side identified (bool~) main::$108 ← (number) 0 != (const byte) main::preset +Constant right-side identified [209] *((signed byte*~) main::$68) ← (snumber)(byte) -1<<(const byte) F +Constant right-side identified [216] *((signed byte*~) main::$70) ← (snumber)(byte) 1<<(const byte) F +Constant right-side identified [261] (bool~) main::$35 ← (byte) 0 == (const byte) main::preset +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) lcSync::return#0 = 0 +Constant (const byte) Print00::c#0 = 0 +Constant (const byte) Print00::c#1 = '0' +Constant (const byte) Print00::c#3 = '0' +Constant (const byte) GetSprite::t0#0 = 0 +Constant (const byte) GetSprite::t0#1 = 0 +Constant (const byte) GetSprite::return#0 = $ff +Constant (const byte) AddSprite::t0#0 = 0 +Constant (const byte) AddSprite::t0#1 = 0 +Constant (const struct $5*) main::d#0 = (struct $5*) 0 +Constant (const byte) main::i#0 = 0 +Constant (const byte) main::type#0 = 0 +Constant (const byte) main::stopIt#0 = 0 +Constant (const byte) main::objects#0 = 0 +Constant (const word) main::oCount#0 = 0 +Constant (const word) main::c#0 = 0 +Constant (const byte) main::i#1 = 0 +Constant (const byte) main::i#3 = 0 +Constant (const word) main::c#1 = 0 +Constant (const byte) lcSync::flags#0 = 0 +Constant (const word) main::c#3 = 0 +Constant (const byte) main::type#1 = 0 +Constant (const byte) main::i#6 = 0 +Constant (const word) main::c#5 = 0 +Constant (const bool) main::$108 = 0!=main::preset +Constant (const byte) main::type#3 = 0 +Constant (const byte) main::i#8 = 0 +Constant (const struct $5*) main::d#1 = dTab +Constant (const byte) lcSync::flags#1 = 0 +Constant (const word) main::c#38 = 0 +Constant (const bool) main::$35 = 0==main::preset +Constant (const byte*) Print00::p#2 = $e000+(byte*) 983 +Constant (const byte) main::stopIt#1 = 1 +Constant (const word) main::oCount#3 = 0 +Constant (const signed word) main::return#0 = 0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte) lcSync::return#2 = lcSync::return#0 +Constant (const byte) lcSync::return#3 = lcSync::return#0 +Constant (const signed word) main::return#2 = main::return#0 +Successful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::i#5 = lcSync::return#2 +Constant (const byte) main::$41 = lcSync::return#3 +Successful SSA optimization Pass2ConstantIdentification +if() condition always false - eliminating [158] if((const bool) main::$108) goto main::@57 +Removing PHI-reference to removed block (main::@53) in block main::@42 +Removing PHI-reference to removed block (main::@53) in block main::@42 +if() condition always true - replacing block destination [268] if((const bool) main::$35) goto main::@59 +Successful SSA optimization Pass2ConstantIfs +Rewriting conditional comparison [199] if(*((signed byte*~) main::$65)<=(signed byte) $20) goto main::@30 +Rewriting conditional comparison [253] if((byte) main::i#10>(byte) 1) goto main::@43 +Converting *(pointer+n) to pointer[n] [131] *((byte*~) main::$53) ← (byte) main::type#4 -- *(main::$80 + OFFSET_STRUCT_$5_S) +Converting *(pointer+n) to pointer[n] [139] *((signed word*~) main::$54) ← (snumber)(byte) $70<<(const byte) F -- *(main::$81 + OFFSET_STRUCT_$5_X) +Converting *(pointer+n) to pointer[n] [142] *((signed byte*~) main::$55) ← (signed byte)(byte) main::i#17 -- *(main::$82 + OFFSET_STRUCT_$5_VX) +Converting *(pointer+n) to pointer[n] [145] *((signed byte*~) main::$56) ← (signed byte) 1 -- *(main::$83 + OFFSET_STRUCT_$5_AX) +Converting *(pointer+n) to pointer[n] [148] *((signed word*~) main::$57) ← (snumber)(byte) $18<<(const byte) F -- *(main::$84 + OFFSET_STRUCT_$5_Y) +Converting *(pointer+n) to pointer[n] [151] *((signed byte*~) main::$58) ← (snumber)(byte) 1<<(const byte) F -- *(main::$85 + OFFSET_STRUCT_$5_VY) +Converting *(pointer+n) to pointer[n] [154] *((signed byte*~) main::$59) ← (signed byte) 1 -- *(main::$86 + OFFSET_STRUCT_$5_AY) +Converting *(pointer+n) to pointer[n] [185] *((signed byte*~) main::$62) ← *((signed byte*~) main::$60) + *((signed byte*~) main::$61) -- *(main::$87 + OFFSET_STRUCT_$5_VX) +Converting *(pointer+n) to pointer[n] [185] *((signed byte*~) main::$62) ← *((signed byte*~) main::$87 + (const byte) OFFSET_STRUCT_$5_VX) + *((signed byte*~) main::$61) -- *(main::$88 + OFFSET_STRUCT_$5_AX) +Converting *(pointer+n) to pointer[n] [185] *((signed byte*~) main::$62) ← *((signed byte*~) main::$87 + (const byte) OFFSET_STRUCT_$5_VX) + *((signed byte*~) main::$88 + (const byte) OFFSET_STRUCT_$5_AX) -- *(main::$89 + OFFSET_STRUCT_$5_VX) +Converting *(pointer+n) to pointer[n] [189] if(*((signed byte*~) main::$63)<(signed byte) -$20) goto main::@29 -- *(main::$90 + OFFSET_STRUCT_$5_VX) +Converting *(pointer+n) to pointer[n] [195] *((signed byte*~) main::$64) ← (signed byte) 1 -- *(main::$91 + OFFSET_STRUCT_$5_AX) +Converting *(pointer+n) to pointer[n] [199] if(*((signed byte*~) main::$65)<(signed byte) $20+(number) 1) goto main::@30 -- *(main::$92 + OFFSET_STRUCT_$5_VX) +Converting *(pointer+n) to pointer[n] [202] *((signed byte*~) main::$66) ← (signed byte) -1 -- *(main::$93 + OFFSET_STRUCT_$5_AX) +Converting *(pointer+n) to pointer[n] [206] if(*((signed word*~) main::$67)>(signed word)(byte) $f8<<(const byte) F) goto main::@31 -- *(main::$94 + OFFSET_STRUCT_$5_Y) +Converting *(pointer+n) to pointer[n] [209] *((signed byte*~) main::$68) ← (snumber)(byte) -1<<(const byte) F -- *(main::$95 + OFFSET_STRUCT_$5_VY) +Converting *(pointer+n) to pointer[n] [213] if(*((signed word*~) main::$69)>=(signed word)(byte) $18<<(const byte) F) goto main::@32 -- *(main::$96 + OFFSET_STRUCT_$5_Y) +Converting *(pointer+n) to pointer[n] [216] *((signed byte*~) main::$70) ← (snumber)(byte) 1<<(const byte) F -- *(main::$97 + OFFSET_STRUCT_$5_VY) +Converting *(pointer+n) to pointer[n] [223] *((signed word*~) main::$73) ← *((signed word*~) main::$71) + *((signed byte*~) main::$72) -- *(main::$98 + OFFSET_STRUCT_$5_X) +Converting *(pointer+n) to pointer[n] [223] *((signed word*~) main::$73) ← *((signed word*~) main::$98 + (const byte) OFFSET_STRUCT_$5_X) + *((signed byte*~) main::$72) -- *(main::$99 + OFFSET_STRUCT_$5_VX) +Converting *(pointer+n) to pointer[n] [223] *((signed word*~) main::$73) ← *((signed word*~) main::$98 + (const byte) OFFSET_STRUCT_$5_X) + *((signed byte*~) main::$99 + (const byte) OFFSET_STRUCT_$5_VX) -- *(main::$100 + OFFSET_STRUCT_$5_X) +Converting *(pointer+n) to pointer[n] [230] *((signed word*~) main::$76) ← *((signed word*~) main::$74) + *((signed byte*~) main::$75) -- *(main::$101 + OFFSET_STRUCT_$5_Y) +Converting *(pointer+n) to pointer[n] [230] *((signed word*~) main::$76) ← *((signed word*~) main::$101 + (const byte) OFFSET_STRUCT_$5_Y) + *((signed byte*~) main::$75) -- *(main::$102 + OFFSET_STRUCT_$5_VY) +Converting *(pointer+n) to pointer[n] [230] *((signed word*~) main::$76) ← *((signed word*~) main::$101 + (const byte) OFFSET_STRUCT_$5_Y) + *((signed byte*~) main::$102 + (const byte) OFFSET_STRUCT_$5_VY) -- *(main::$103 + OFFSET_STRUCT_$5_Y) +Converting *(pointer+n) to pointer[n] [237] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*~) main::$77) -- *(main::$104 + OFFSET_STRUCT_$5_S) +Converting *(pointer+n) to pointer[n] [240] (signed word~) main::$27 ← *((signed word*~) main::$78) >> (const byte) F -- *(main::$105 + OFFSET_STRUCT_$5_X) +Converting *(pointer+n) to pointer[n] [244] (signed word~) main::$28 ← *((signed word*~) main::$79) >> (const byte) F -- *(main::$106 + OFFSET_STRUCT_$5_Y) +Successful SSA optimization Pass2InlineDerefIdx +De-inlining pointer[w] to *(pointer+w) [87] *((byte*) 57344 + (word) main::c#10) ← (byte) $20 +De-inlining pointer[w] to *(pointer+w) [88] *((byte*) 55296 + (word) main::c#10) ← (byte) $e +De-inlining pointer[w] to *(pointer+w) [99] *((byte*) 63488 + (word) main::c#11) ← *((byte*) 53248 + (word) main::c#11) +De-inlining pointer[w] to *(pointer+w) [99] *((byte*) 63488 + (word) main::c#11) ← *((byte*~) main::$111) +De-inlining pointer[w] to *(pointer+w) [102] *((byte*) 53248 + (word) $d02) ← *((byte*) 53248 + (word) $d02) | (byte) 3 +De-inlining pointer[w] to *(pointer+w) [102] *((byte*) 53248 + (word) $d02) ← *((byte*~) main::$113) | (byte) 3 +De-inlining pointer[w] to *(pointer+w) [103] *((byte*) 53248 + (word) $d00) ← *((byte*) 53248 + (word) $d00) & ~(byte) 3 +De-inlining pointer[w] to *(pointer+w) [103] *((byte*) 53248 + (word) $d00) ← *((byte*~) main::$115) & ~(byte) 3 +De-inlining pointer[w] to *(pointer+w) [107] *((byte*) 57344 + (word) $3e4) ← (byte) 'N'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [108] *((byte*) 57344 + (word) $3e5) ← (byte) 'T'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [109] *((byte*) 57344 + (word) $3e6) ← (byte) 'S'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [110] *((byte*) 57344 + (word) $3e7) ← (byte) 'C'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [111] *((byte*) 57344 + (word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [112] *((byte*) 57344 + (word) $3e6) ← (byte) 'A'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [113] *((byte*) 57344 + (word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [114] *((byte*) 57344 + (word)(number) $3cf+(number) 0) ← (byte) 'B'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [115] *((byte*) 57344 + (word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [116] *((byte*) 57344 + (word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [117] *((byte*) 57344 + (word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [118] *((byte*) 57344 + (word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [119] *((byte*) 57344 + (word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [120] *((byte*) 57344 + (word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 +De-inlining pointer[w] to *(pointer+w) [121] *((byte*) 57344 + (word)(number) $3cf+(number) 7) ← (byte) ':' +Successful SSA optimization Pass2DeInlineWordDerefIdx +Simplifying constant evaluating to zero (byte) 'A'-(byte) 'A' in [112] *((byte*~) main::$122) ← (byte) 'A'-(byte) 'A'+(byte) 1 +Successful SSA optimization PassNSimplifyConstantZero +Simplifying expression containing zero sprOff in [59] *((const byte*) lcSprMapTab + (byte) 0) ← (const byte) sprOff+(byte) 0 +Simplifying expression containing zero lcSprMapTab in [59] *((const byte*) lcSprMapTab + (byte) 0) ← (const byte) sprOff +Simplifying expression containing zero sprOff in [66] *((const byte*) lcSprColTab + (const byte) sprOff+(byte) 0) ← *((const byte*) lcSprColTab + (const byte) sprOff+(byte) 1) +Simplifying expression containing zero 1 in [112] *((byte*~) main::$122) ← (byte) 0+(byte) 1 +Simplifying expression containing zero $3cf in (byte*~) main::$124 ← (byte*) 57344 + (word)(number) $3cf+(number) 0 +Simplifying expression containing zero main::$80 in [130] (byte*~) main::$53 ← (byte*~) main::$80 + (const byte) OFFSET_STRUCT_$5_S +Simplifying expression containing zero main::$80 in [131] *((byte*~) main::$80 + (const byte) OFFSET_STRUCT_$5_S) ← (byte) main::type#4 +Simplifying expression containing zero main::$104 in [236] (byte*~) main::$77 ← (byte*~) main::$104 + (const byte) OFFSET_STRUCT_$5_S +Simplifying expression containing zero main::$104 in [237] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*~) main::$104 + (const byte) OFFSET_STRUCT_$5_S) +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused variable (byte*) Print00::p#1 and assignment [12] (byte*) Print00::p#1 ← ++ (byte*) Print00::p#0 +Eliminating unused variable (byte*~) main::$53 and assignment [113] (byte*~) main::$53 ← (byte*~) main::$80 +Eliminating unused variable (signed word*~) main::$54 and assignment [119] (signed word*~) main::$54 ← (signed word*~) main::$81 + (const byte) OFFSET_STRUCT_$5_X +Eliminating unused variable (signed byte*~) main::$55 and assignment [122] (signed byte*~) main::$55 ← (signed byte*~) main::$82 + (const byte) OFFSET_STRUCT_$5_VX +Eliminating unused variable (signed byte*~) main::$56 and assignment [125] (signed byte*~) main::$56 ← (signed byte*~) main::$83 + (const byte) OFFSET_STRUCT_$5_AX +Eliminating unused variable (signed word*~) main::$57 and assignment [128] (signed word*~) main::$57 ← (signed word*~) main::$84 + (const byte) OFFSET_STRUCT_$5_Y +Eliminating unused variable (signed byte*~) main::$58 and assignment [131] (signed byte*~) main::$58 ← (signed byte*~) main::$85 + (const byte) OFFSET_STRUCT_$5_VY +Eliminating unused variable (signed byte*~) main::$59 and assignment [134] (signed byte*~) main::$59 ← (signed byte*~) main::$86 + (const byte) OFFSET_STRUCT_$5_AY +Eliminating unused variable (signed byte*~) main::$60 and assignment [153] (signed byte*~) main::$60 ← (signed byte*~) main::$87 + (const byte) OFFSET_STRUCT_$5_VX +Eliminating unused variable (signed byte*~) main::$61 and assignment [155] (signed byte*~) main::$61 ← (signed byte*~) main::$88 + (const byte) OFFSET_STRUCT_$5_AX +Eliminating unused variable (signed byte*~) main::$62 and assignment [157] (signed byte*~) main::$62 ← (signed byte*~) main::$89 + (const byte) OFFSET_STRUCT_$5_VX +Eliminating unused variable (signed byte*~) main::$63 and assignment [160] (signed byte*~) main::$63 ← (signed byte*~) main::$90 + (const byte) OFFSET_STRUCT_$5_VX +Eliminating unused variable (signed byte*~) main::$64 and assignment [165] (signed byte*~) main::$64 ← (signed byte*~) main::$91 + (const byte) OFFSET_STRUCT_$5_AX +Eliminating unused variable (signed byte*~) main::$65 and assignment [168] (signed byte*~) main::$65 ← (signed byte*~) main::$92 + (const byte) OFFSET_STRUCT_$5_VX +Eliminating unused variable (signed byte*~) main::$66 and assignment [171] (signed byte*~) main::$66 ← (signed byte*~) main::$93 + (const byte) OFFSET_STRUCT_$5_AX +Eliminating unused variable (signed word*~) main::$67 and assignment [174] (signed word*~) main::$67 ← (signed word*~) main::$94 + (const byte) OFFSET_STRUCT_$5_Y +Eliminating unused variable (signed byte*~) main::$68 and assignment [177] (signed byte*~) main::$68 ← (signed byte*~) main::$95 + (const byte) OFFSET_STRUCT_$5_VY +Eliminating unused variable (signed word*~) main::$69 and assignment [180] (signed word*~) main::$69 ← (signed word*~) main::$96 + (const byte) OFFSET_STRUCT_$5_Y +Eliminating unused variable (signed byte*~) main::$70 and assignment [183] (signed byte*~) main::$70 ← (signed byte*~) main::$97 + (const byte) OFFSET_STRUCT_$5_VY +Eliminating unused variable (signed word*~) main::$71 and assignment [186] (signed word*~) main::$71 ← (signed word*~) main::$98 + (const byte) OFFSET_STRUCT_$5_X +Eliminating unused variable (signed byte*~) main::$72 and assignment [188] (signed byte*~) main::$72 ← (signed byte*~) main::$99 + (const byte) OFFSET_STRUCT_$5_VX +Eliminating unused variable (signed word*~) main::$73 and assignment [190] (signed word*~) main::$73 ← (signed word*~) main::$100 + (const byte) OFFSET_STRUCT_$5_X +Eliminating unused variable (signed word*~) main::$74 and assignment [193] (signed word*~) main::$74 ← (signed word*~) main::$101 + (const byte) OFFSET_STRUCT_$5_Y +Eliminating unused variable (signed byte*~) main::$75 and assignment [195] (signed byte*~) main::$75 ← (signed byte*~) main::$102 + (const byte) OFFSET_STRUCT_$5_VY +Eliminating unused variable (signed word*~) main::$76 and assignment [197] (signed word*~) main::$76 ← (signed word*~) main::$103 + (const byte) OFFSET_STRUCT_$5_Y +Eliminating unused variable (byte*~) main::$77 and assignment [203] (byte*~) main::$77 ← (byte*~) main::$104 +Eliminating unused variable (signed word*~) main::$78 and assignment [206] (signed word*~) main::$78 ← (signed word*~) main::$105 + (const byte) OFFSET_STRUCT_$5_X +Eliminating unused variable (signed word*~) main::$79 and assignment [210] (signed word*~) main::$79 ← (signed word*~) main::$106 + (const byte) OFFSET_STRUCT_$5_Y +Eliminating unused constant (const byte) lcSync::flags#0 +Eliminating unused constant (const byte) lcSync::flags#1 +Eliminating unused constant (const byte) Print00::c#0 +Eliminating unused constant (const byte) GetSprite::t0#0 +Eliminating unused constant (const byte) AddSprite::t0#0 +Eliminating unused constant (const struct $5*) main::d#0 +Eliminating unused constant (const byte) main::i#0 +Eliminating unused constant (const byte) main::type#0 +Eliminating unused constant (const word) main::c#0 +Eliminating unused constant (const bool) main::$108 +Eliminating unused constant (const bool) main::$35 +Eliminating unused constant (const signed word) main::return#2 +Eliminating unused constant (const byte) OFFSET_STRUCT_$5_S +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const byte) main::preset +Eliminating unused constant (const signed word) main::return#0 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (byte) GetSprite::return#3 from unused block main::@22 +Eliminating variable (word) main::c#13 from unused block main::@50 +Eliminating variable (byte) AddSprite::sn#0 from unused block main::@23 +Eliminating variable (byte~) main::$17 from unused block main::@51 +Removing unused block main::@22 +Removing unused block main::@50 +Removing PHI-reference to removed block (main::@23) in block AddSprite +Removing unused block main::@23 +Removing unused block main::@51 +Removing unused block main::@25 +Removing unused block main::@return +Removing unused block main::@57 +Successful SSA optimization Pass2EliminateUnusedBlocks +Removing unused procedure __start +Removing unused procedure block __start +Removing unused procedure block __start::__init1 +Removing unused procedure block __start::@1 +Removing unused procedure block __start::@2 +Removing unused procedure block __start::@return +Successful SSA optimization PassNEliminateEmptyStart +Adding number conversion cast (snumber) $20+1 in [144] if(*((signed byte*~) main::$92 + (const byte) OFFSET_STRUCT_$5_VX)<(signed byte) $20+(number) 1) goto main::@30 +Adding number conversion cast (snumber) 1 in [144] if(*((signed byte*~) main::$92 + (const byte) OFFSET_STRUCT_$5_VX)<(snumber)(signed byte) $20+(number) 1) goto main::@30 +Adding number conversion cast (unumber) 1+1 in [177] if((byte) main::i#10>=(byte) 1+(number) 1) goto main::@43 +Adding number conversion cast (unumber) 1 in [177] if((byte) main::i#10>=(unumber)(byte) 1+(number) 1) goto main::@43 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast $3cf +Simplifying constant integer cast (signed byte) $20+(snumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast (byte) 1+(unumber)(number) 1 +Simplifying constant integer cast 1 +Successful SSA optimization PassNCastSimplification +Finalized signed number type (signed byte) 1 +Finalized unsigned number type (byte) 1 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Identical Phi Values (byte) AddSprite::sn#2 (byte) AddSprite::sn#1 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) main::$31 [180] if((byte) 0==(byte) main::stopIt#5) goto main::@58 +Simple Condition (bool~) main::$46 [198] if((word) main::oCount#7>(byte) 2) goto main::@60 +Simple Condition (bool~) main::$32 [205] if((byte) main::objects#9<(const byte) maxDrawObjects) goto main::@40 +Simple Condition (bool~) main::$37 [206] if((byte) main::i#11<(byte) $80) goto main::@41 +Simple Condition (bool~) main::$47 [207] if((byte) main::objects#12>(byte) 0) goto main::@48 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [180] if((byte) 0!=(byte) main::stopIt#5) goto main::@42 +Negating conditional jump and destination [198] if((word) main::oCount#7<=(byte) 2) goto main::@45 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Constant right-side identified [6] (byte*) Print00::p#0 ← ++ (const byte*) Print00::p#2 +Constant right-side identified [69] (byte*~) main::$113 ← (byte*) 53248 + (word) $d02 +Constant right-side identified [70] (byte*~) main::$114 ← (byte*) 53248 + (word) $d02 +Constant right-side identified [72] (byte*~) main::$115 ← (byte*) 53248 + (word) $d00 +Constant right-side identified [73] (byte*~) main::$116 ← (byte*) 53248 + (word) $d00 +Constant right-side identified [75] (byte~) main::$1 ← (const byte) main::i#5 & (byte) $80 +Constant right-side identified [77] (byte*~) main::$117 ← (byte*) 57344 + (word) $3e4 +Constant right-side identified [79] (byte*~) main::$118 ← (byte*) 57344 + (word) $3e5 +Constant right-side identified [81] (byte*~) main::$119 ← (byte*) 57344 + (word) $3e6 +Constant right-side identified [83] (byte*~) main::$120 ← (byte*) 57344 + (word) $3e7 +Constant right-side identified [85] (byte*~) main::$121 ← (byte*) 57344 + (word) $3e5 +Constant right-side identified [87] (byte*~) main::$122 ← (byte*) 57344 + (word) $3e6 +Constant right-side identified [89] (byte*~) main::$123 ← (byte*) 57344 + (word) $3e7 +Constant right-side identified [91] (byte*~) main::$124 ← (byte*) 57344 + (word) $3cf +Constant right-side identified [93] (byte*~) main::$125 ← (byte*) 57344 + (word)(number) $3cf+(number) 1 +Constant right-side identified [95] (byte*~) main::$126 ← (byte*) 57344 + (word)(number) $3cf+(number) 2 +Constant right-side identified [97] (byte*~) main::$127 ← (byte*) 57344 + (word)(number) $3cf+(number) 3 +Constant right-side identified [99] (byte*~) main::$128 ← (byte*) 57344 + (word)(number) $3cf+(number) 4 +Constant right-side identified [101] (byte*~) main::$129 ← (byte*) 57344 + (word)(number) $3cf+(number) 5 +Constant right-side identified [103] (byte*~) main::$130 ← (byte*) 57344 + (word)(number) $3cf+(number) 6 +Constant right-side identified [105] (byte*~) main::$131 ← (byte*) 57344 + (word)(number) $3cf+(number) 7 +Constant right-side identified [176] (byte) main::i#10 ← (const byte) main::$41 & (byte) $1f +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) Print00::p#0 = ++Print00::p#2 +Constant (const byte*) main::$113 = (byte*) 53248+$d02 +Constant (const byte*) main::$114 = (byte*) 53248+$d02 +Constant (const byte*) main::$115 = (byte*) 53248+$d00 +Constant (const byte*) main::$116 = (byte*) 53248+$d00 +Constant (const byte) main::$1 = main::i#5&$80 +Constant (const byte*) main::$117 = (byte*) 57344+$3e4 +Constant (const byte*) main::$118 = (byte*) 57344+$3e5 +Constant (const byte*) main::$119 = (byte*) 57344+$3e6 +Constant (const byte*) main::$120 = (byte*) 57344+$3e7 +Constant (const byte*) main::$121 = (byte*) 57344+$3e5 +Constant (const byte*) main::$122 = (byte*) 57344+$3e6 +Constant (const byte*) main::$123 = (byte*) 57344+$3e7 +Constant (const byte*) main::$124 = (byte*) 57344+$3cf +Constant (const byte*) main::$125 = (byte*) 57344+(word)$3cf+1 +Constant (const byte*) main::$126 = (byte*) 57344+(word)$3cf+2 +Constant (const byte*) main::$127 = (byte*) 57344+(word)$3cf+3 +Constant (const byte*) main::$128 = (byte*) 57344+(word)$3cf+4 +Constant (const byte*) main::$129 = (byte*) 57344+(word)$3cf+5 +Constant (const byte*) main::$130 = (byte*) 57344+(word)$3cf+6 +Constant (const byte*) main::$131 = (byte*) 57344+(word)$3cf+7 +Constant (const byte) main::i#10 = main::$41&$1f +Successful SSA optimization Pass2ConstantIdentification +if() condition always false - eliminating [76] if((byte) 0!=(const byte) main::$1) goto main::@1 +if() condition always false - eliminating [177] if((const byte) main::i#10>=(byte) 1+(byte) 1) goto main::@43 +Successful SSA optimization Pass2ConstantIfs +Rewriting conditional comparison [198] if((word) main::oCount#7<=(byte) 2) goto main::@45 +Simplifying constant evaluating to zero (const byte) main::i#5&(byte) $80 in +Simplifying constant evaluating to zero (const byte) main::$41&(byte) $1f in +Successful SSA optimization PassNSimplifyConstantZero +Eliminating unused variable (bool~) main::$10 and assignment [105] (bool~) main::$10 ← (byte) main::i#17 < (byte) $14 +Eliminating unused constant (const byte) main::i#5 +Eliminating unused constant (const byte) main::$41 +Eliminating unused constant (const byte) main::$1 +Eliminating unused constant (const byte) main::i#10 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const byte) lcSync::return#2 +Eliminating unused constant (const byte) lcSync::return#3 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const byte) lcSync::return#0 +Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (word) main::oCount#1 from unused block main::@43 +Removing unused block main::@1 +Removing PHI-reference to removed block (main::@43) in block main::@44 +Removing unused block main::@43 +Successful SSA optimization Pass2EliminateUnusedBlocks +Removing call to empty procedure [58] call lcSync +Removing call to empty procedure [147] call lcSync +Removing unused procedure lcSync +Removing unused procedure block lcSync +Removing unused procedure block lcSync::@return +Successful SSA optimization PassNEliminateEmptyProcedure +Adding number conversion cast (unumber) 2+1 in [162] if((word) main::oCount#7<(byte) 2+(number) 1) goto main::@45 +Adding number conversion cast (unumber) 1 in [162] if((word) main::oCount#7<(unumber)(byte) 2+(number) 1) goto main::@45 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast (byte) 2+(unumber)(number) 1 +Simplifying constant integer cast 1 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 1 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Eliminating unused constant (const byte*) main::$117 +Eliminating unused constant (const byte*) main::$118 +Eliminating unused constant (const byte*) main::$119 +Eliminating unused constant (const byte*) main::$120 +Successful SSA optimization PassNEliminateUnusedVars +Inlining Noop Cast [82] (byte*~) main::$80 ← (byte*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [87] (signed word*~) main::$81 ← (signed word*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [89] (signed byte*~) main::$82 ← (signed byte*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [91] (signed byte*~) main::$83 ← (signed byte*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [93] (signed word*~) main::$84 ← (signed word*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [95] (signed byte*~) main::$85 ← (signed byte*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [97] (signed byte*~) main::$86 ← (signed byte*)(struct $5*) main::d1#0 keeping main::d1#0 +Inlining Noop Cast [103] (signed byte*~) main::$87 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [104] (signed byte*~) main::$88 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [105] (signed byte*~) main::$89 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [107] (signed byte*~) main::$90 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [111] (signed byte*~) main::$91 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [113] (signed byte*~) main::$92 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [115] (signed byte*~) main::$93 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [117] (signed word*~) main::$94 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [119] (signed byte*~) main::$95 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [121] (signed word*~) main::$96 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [123] (signed byte*~) main::$97 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [125] (signed word*~) main::$98 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [126] (signed byte*~) main::$99 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [127] (signed word*~) main::$100 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [129] (signed word*~) main::$101 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [130] (signed byte*~) main::$102 ← (signed byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [131] (signed word*~) main::$103 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [136] (byte*~) main::$104 ← (byte*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [138] (signed word*~) main::$105 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Inlining Noop Cast [141] (signed word*~) main::$106 ← (signed word*)(struct $5*) main::d#10 keeping main::d#10 +Successful SSA optimization Pass2NopCastInlining +Rewriting multiplication to use shift and addition[80] (byte~) main::$52 ← (byte) main::i#17 * (const byte) SIZEOF_STRUCT_$5 +Inlining constant with var siblings (const byte) Print00::c#1 +Inlining constant with var siblings (const byte) Print00::c#3 +Inlining constant with different constant siblings (const byte*) Print00::p#2 +Inlining constant with different constant siblings (const byte*) Print00::p#0 +Inlining constant with var siblings (const byte) GetSprite::t0#1 +Inlining constant with var siblings (const byte) GetSprite::return#0 +Inlining constant with var siblings (const byte) AddSprite::t0#1 +Inlining constant with var siblings (const byte) main::stopIt#0 +Inlining constant with var siblings (const byte) main::objects#0 +Inlining constant with var siblings (const word) main::oCount#0 +Inlining constant with var siblings (const byte) main::i#1 +Inlining constant with var siblings (const byte) main::i#3 +Inlining constant with var siblings (const word) main::c#1 +Inlining constant with var siblings (const word) main::c#3 +Inlining constant with var siblings (const byte) main::type#1 +Inlining constant with var siblings (const byte) main::i#6 +Inlining constant with var siblings (const word) main::c#5 +Inlining constant with var siblings (const byte) main::type#3 +Inlining constant with var siblings (const byte) main::i#8 +Inlining constant with var siblings (const struct $5*) main::d#1 +Inlining constant with var siblings (const word) main::c#38 +Inlining constant with var siblings (const byte) main::stopIt#1 +Inlining constant with var siblings (const word) main::oCount#3 +Constant inlined $2::lfD = (number) 2 +Constant inlined $2::lfB = (number) $20 +Constant inlined $2::lfA = (number) $10 +Constant inlined $4::maxDrawObjects = (number) $18 +Constant inlined $3::maxC64Images = (number) $100 +Constant inlined $3::sprOff = (number) $40 +Constant inlined $0::lfOL = (number) $20 +Constant inlined main::d#1 = (const struct $5*) dTab +Constant inlined main::$116 = (byte*) 53248+(word) $d00 +Constant inlined GetSprite::return#0 = (byte) $ff +Constant inlined main::$115 = (byte*) 53248+(word) $d00 +Constant inlined main::$114 = (byte*) 53248+(word) $d02 +Constant inlined main::$113 = (byte*) 53248+(word) $d02 +Constant inlined main::i#8 = (byte) 0 +Constant inlined GetSprite::t0#1 = (byte) 0 +Constant inlined AddSprite::t0#1 = (byte) 0 +Constant inlined SIZEOF_STRUCT_$5 = (byte) 9 +Constant inlined OFFSET_STRUCT_$5_AY = (byte) 8 +Constant inlined main::i#3 = (byte) 0 +Constant inlined main::i#6 = (byte) 0 +Constant inlined OFFSET_STRUCT_$5_X = (byte) 1 +Constant inlined OFFSET_STRUCT_$5_AX = (byte) 7 +Constant inlined OFFSET_STRUCT_$5_Y = (byte) 3 +Constant inlined main::stopIt#0 = (byte) 0 +Constant inlined Print00::p#2 = (word) $e000+(byte*) 983 +Constant inlined Print00::p#0 = ++(word) $e000+(byte*) 983 +Constant inlined OFFSET_STRUCT_$5_VX = (byte) 5 +Constant inlined OFFSET_STRUCT_$5_VY = (byte) 6 +Constant inlined main::stopIt#1 = (byte) 1 +Constant inlined $3::maxSprImages = (number) 8 +Constant inlined main::oCount#3 = (byte) 0 +Constant inlined main::oCount#0 = (word) 0 +Constant inlined $1::rfNull = (number) $ff +Constant inlined $3::maxSprites = (number) $20 +Constant inlined main::$131 = (byte*) 57344+(word)(number) $3cf+(number) 7 +Constant inlined main::$130 = (byte*) 57344+(word)(number) $3cf+(number) 6 +Constant inlined main::c#5 = (byte) 0 +Constant inlined main::objects#0 = (byte) 0 +Constant inlined main::i#1 = (byte) 0 +Constant inlined main::c#1 = (byte) 0 +Constant inlined main::c#3 = (byte) 0 +Constant inlined $4::F = (number) 3 +Constant inlined main::c#38 = (byte) 0 +Constant inlined $1::rfXMSB = (number) $10 +Constant inlined main::type#3 = (byte) 0 +Constant inlined Print00::c#3 = (byte) '0' +Constant inlined $0::lfMC = (number) $10 +Constant inlined main::type#1 = (byte) 0 +Constant inlined Print00::c#1 = (byte) '0' +Constant inlined main::$123 = (byte*) 57344+(word) $3e7 +Constant inlined $1::rfDrop = (number) $fe +Constant inlined main::$122 = (byte*) 57344+(word) $3e6 +Constant inlined $2::lfU = (number) 1 +Constant inlined main::$121 = (byte*) 57344+(word) $3e5 +Constant inlined $2::lfR = (number) 8 +Constant inlined main::$129 = (byte*) 57344+(word)(number) $3cf+(number) 5 +Constant inlined $2::lfL = (number) 4 +Constant inlined main::$128 = (byte*) 57344+(word)(number) $3cf+(number) 4 +Constant inlined main::$127 = (byte*) 57344+(word)(number) $3cf+(number) 3 +Constant inlined main::$126 = (byte*) 57344+(word)(number) $3cf+(number) 2 +Constant inlined main::$125 = (byte*) 57344+(word)(number) $3cf+(number) 1 +Constant inlined main::$124 = (byte*) 57344+(word) $3cf +Successful SSA optimization Pass2ConstantInlining +Consolidated array index constant in *(lcSprMapTab+1) +Consolidated array index constant in *(lcSprMapTab+2) +Consolidated array index constant in *(lcSprMapTab+3) +Consolidated array index constant in *(lcSprMapTab+4) +Consolidated array index constant in *(lcSprMapTab+5) +Consolidated array index constant in *(lcSprColTab+sprOff+1) +Consolidated array index constant in *(lcSprColTab+sprOff+1) +Consolidated array index constant in *(lcSprColTab+sprOff) +Consolidated array index constant in *(lcSprColTab+sprOff+3) +Consolidated array index constant in *(lcSprColTab+sprOff+3) +Consolidated array index constant in *(lcSprColTab+sprOff+2) +Consolidated array index constant in *(lcSprColTab+sprOff+5) +Consolidated array index constant in *(lcSprColTab+sprOff+5) +Consolidated array index constant in *(lcSprColTab+sprOff+4) +Successful SSA optimization Pass2ConstantAdditionElimination +Simplifying constant integer increment ++$e000+(byte*) 983 +Successful SSA optimization Pass2ConstantSimplification +Adding number conversion cast (unumber) 1 in [9] *((word) $e000+(byte*) 983+(number) 1) ← (byte) Print00::c#10 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast 1 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 1 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias main::$52 = main::$133 +Successful SSA optimization Pass2AliasElimination +Added new block during phi lifting main::@61(between main::@17 and main::@19) +Added new block during phi lifting main::@62(between main::@28 and main::@42) +Added new block during phi lifting main::@63(between main::@39 and main::@42) +Fixing phi predecessor for main::c#18 to new block ( main::@39 -> main::@63 ) during phi lifting. +Added new block during phi lifting main::@64(between main::@46 and main::@44) +Added new block during phi lifting main::@65(between main::@44 and main::@45) +Adding NOP phi() at start of main::@5 +Adding NOP phi() at start of main::@8 +Adding NOP phi() at start of main::@11 +Adding NOP phi() at start of main::@18 +Adding NOP phi() at start of main::@52 +Adding NOP phi() at start of main::@21 +Adding NOP phi() at start of GetSprite +Adding NOP phi() at start of GetSprite::@3 +Adding NOP phi() at start of AddSprite::@2 +CALL GRAPH +Calls in [main] to Print00:58 DelSprite:65 GetSprite:72 AddSprite:77 + +Created 26 initial phi equivalence classes +Coalesced [52] main::oCount#59 ← main::oCount#2 +Coalesced [59] main::objects#58 ← main::objects#17 +Coalesced [60] main::c#44 ← main::c#18 +Coalesced [61] main::stopIt#55 ← main::stopIt#15 +Coalesced [62] main::oCount#57 ← main::oCount#20 +Coalesced [66] main::objects#63 ← main::objects#15 +Coalesced [67] main::objects#62 ← main::objects#12 +Coalesced (already) [68] main::stopIt#56 ← main::stopIt#5 +Coalesced [69] main::oCount#60 ← main::oCount#7 +Coalesced (already) [70] main::oCount#58 ← main::oCount#17 +Coalesced [82] main::objects#61 ← main::objects#1 +Coalesced (already) [83] main::objects#60 ← main::objects#9 +Coalesced (already) [84] main::objects#59 ← main::objects#9 +Coalesced [85] main::c#45 ← main::c#7 +Coalesced [103] main::i#45 ← main::i#9 +Coalesced [104] main::d#15 ← main::d#2 +Coalesced [122] main::i#44 ← main::i#7 +Coalesced [123] main::type#12 ← main::type#10 +Coalesced [124] main::type#13 ← main::type#2 +Coalesced [129] main::c#43 ← main::c#4 +Coalesced [135] main::c#42 ← main::c#2 +Coalesced [138] main::i#43 ← main::i#4 +Coalesced [141] main::i#42 ← main::i#2 +Coalesced [142] Print00::v#8 ← Print00::v0#0 +Coalesced [146] Print00::v#10 ← Print00::v#3 +Coalesced [153] Print00::v#11 ← Print00::v#2 +Coalesced [154] Print00::c#12 ← Print00::c#4 +Coalesced [157] Print00::v#9 ← Print00::v#1 +Coalesced [158] Print00::c#11 ← Print00::c#2 +Coalesced [170] GetSprite::return#8 ← GetSprite::t0#3 +Coalesced [172] GetSprite::t0#7 ← GetSprite::t0#2 +Coalesced [182] AddSprite::t0#7 ← AddSprite::t0#2 +Coalesced down to 17 phi equivalence classes +Culled Empty Block (label) main::@5 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@11 +Culled Empty Block (label) main::@18 +Culled Empty Block (label) main::@52 +Culled Empty Block (label) main::@55 +Culled Empty Block (label) main::@56 +Culled Empty Block (label) main::@65 +Culled Empty Block (label) main::@64 +Culled Empty Block (label) main::@63 +Culled Empty Block (label) main::@62 +Culled Empty Block (label) main::@21 +Culled Empty Block (label) GetSprite::@3 +Culled Empty Block (label) AddSprite::@2 +Renumbering block GetSprite::@4 to GetSprite::@3 +Renumbering block GetSprite::@5 to GetSprite::@4 +Renumbering block AddSprite::@3 to AddSprite::@2 +Renumbering block AddSprite::@4 to AddSprite::@3 +Renumbering block AddSprite::@5 to AddSprite::@4 +Renumbering block AddSprite::@6 to AddSprite::@5 +Renumbering block main::@2 to main::@1 +Renumbering block main::@3 to main::@2 +Renumbering block main::@4 to main::@3 +Renumbering block main::@6 to main::@4 +Renumbering block main::@7 to main::@5 +Renumbering block main::@9 to main::@6 +Renumbering block main::@10 to main::@7 +Renumbering block main::@12 to main::@8 +Renumbering block main::@13 to main::@9 +Renumbering block main::@14 to main::@10 +Renumbering block main::@15 to main::@11 +Renumbering block main::@16 to main::@12 +Renumbering block main::@17 to main::@13 +Renumbering block main::@19 to main::@14 +Renumbering block main::@20 to main::@15 +Renumbering block main::@24 to main::@16 +Renumbering block main::@26 to main::@17 +Renumbering block main::@27 to main::@18 +Renumbering block main::@28 to main::@19 +Renumbering block main::@29 to main::@20 +Renumbering block main::@30 to main::@21 +Renumbering block main::@31 to main::@22 +Renumbering block main::@32 to main::@23 +Renumbering block main::@33 to main::@24 +Renumbering block main::@34 to main::@25 +Renumbering block main::@35 to main::@26 +Renumbering block main::@36 to main::@27 +Renumbering block main::@37 to main::@28 +Renumbering block main::@38 to main::@29 +Renumbering block main::@39 to main::@30 +Renumbering block main::@40 to main::@31 +Renumbering block main::@41 to main::@32 +Renumbering block main::@42 to main::@33 +Renumbering block main::@44 to main::@34 +Renumbering block main::@45 to main::@35 +Renumbering block main::@46 to main::@36 +Renumbering block main::@47 to main::@37 +Renumbering block main::@48 to main::@38 +Renumbering block main::@49 to main::@39 +Renumbering block main::@53 to main::@40 +Renumbering block main::@54 to main::@41 +Renumbering block main::@58 to main::@42 +Renumbering block main::@59 to main::@43 +Renumbering block main::@60 to main::@44 +Renumbering block main::@61 to main::@45 +Adding NOP phi() at start of main::@45 +Adding NOP phi() at start of Print00 +Adding NOP phi() at start of GetSprite + +FINAL CONTROL FLOW GRAPH + +(signed word()) main() +main: scope:[main] from + [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff + [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 + [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 + [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 + [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 + [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 + [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC + [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) + [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC + [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) + [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC + [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) + to:main::@2 +main::@2: scope:[main] from main main::@3 + [12] (byte) main::i#12 ← phi( main/(byte) 0 main::@3/(byte) main::i#2 ) + [13] if((byte) main::i#12<(const byte) maxSprites+(byte) 1) goto main::@3 + to:main::@4 +main::@4: scope:[main] from main::@2 main::@5 + [14] (byte) main::i#14 ← phi( main::@2/(byte) 0 main::@5/(byte) main::i#4 ) + [15] if((byte) main::i#14<(const byte) maxSprites) goto main::@5 + to:main::@6 +main::@6: scope:[main] from main::@4 main::@7 + [16] (word) main::c#10 ← phi( main::@7/(word) main::c#2 main::@4/(byte) 0 ) + [17] if((word) main::c#10<(word) $3e8) goto main::@7 + to:main::@39 +main::@39: scope:[main] from main::@6 + [18] *((byte*) 1) ← (byte) $33 + to:main::@8 +main::@8: scope:[main] from main::@39 main::@9 + [19] (word) main::c#11 ← phi( main::@9/(word) main::c#4 main::@39/(byte) 0 ) + [20] if((word) main::c#11<(word) $7f8) goto main::@9 + to:main::@10 +main::@10: scope:[main] from main::@8 + [21] *((byte*) 1) ← (byte) $35 + [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 + [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 + to:main::@11 +main::@11: scope:[main] from main::@10 + [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 + [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 + [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 + to:main::@1 +main::@1: scope:[main] from main::@11 + [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 + [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 + [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 + [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 + [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 + [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 + [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 + [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' + to:main::@12 +main::@12: scope:[main] from main::@1 main::@15 + [35] (byte) main::type#4 ← phi( main::@1/(byte) 0 main::@15/(byte) main::type#10 ) + [35] (byte) main::i#17 ← phi( main::@1/(byte) 0 main::@15/(byte) main::i#7 ) + [36] if((byte) main::i#17<(const byte) maxDrawObjects) goto main::@13 + to:main::@16 +main::@16: scope:[main] from main::@12 main::@35 + [37] (word) main::oCount#17 ← phi( main::@12/(word) 0 main::@35/(word) main::oCount#20 ) + [37] (byte) main::stopIt#5 ← phi( main::@12/(byte) 0 main::@35/(byte) main::stopIt#15 ) + [37] (word) main::c#16 ← phi( main::@12/(byte) 0 main::@35/(word) main::c#18 ) + [37] (byte) main::objects#9 ← phi( main::@12/(byte) 0 main::@35/(byte) main::objects#17 ) + to:main::@17 +main::@17: scope:[main] from main::@16 main::@24 + [38] (struct $5*) main::d#10 ← phi( main::@16/(const struct $5*) dTab main::@24/(struct $5*) main::d#2 ) + [38] (byte) main::i#22 ← phi( main::@16/(byte) 0 main::@24/(byte) main::i#9 ) + [39] if((byte) main::i#22<(byte) main::objects#9) goto main::@18 + to:main::@19 +main::@19: scope:[main] from main::@17 + [40] (word) main::c#7 ← (word) main::c#16 + (byte) 1 + [41] if((word) main::c#7<(byte) $e) goto main::@33 + to:main::@30 +main::@30: scope:[main] from main::@19 + [42] if((byte) 0!=(byte) main::stopIt#5) goto main::@33 + to:main::@42 +main::@42: scope:[main] from main::@30 + [43] if((byte) main::objects#9<(const byte) maxDrawObjects) goto main::@31 + to:main::@33 +main::@33: scope:[main] from main::@19 main::@30 main::@41 main::@42 main::@43 + [44] (word) main::c#18 ← phi( main::@19/(word) main::c#7 main::@30/(byte) 0 main::@41/(byte) 0 ) + [44] (byte) main::objects#12 ← phi( main::@19/(byte) main::objects#9 main::@30/(byte) main::objects#9 main::@41/(byte) main::objects#1 ) + to:main::@36 +main::@36: scope:[main] from main::@33 + [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 + to:main::@37 +main::@37: scope:[main] from main::@36 + [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 + to:main::@34 +main::@34: scope:[main] from main::@36 main::@37 + [47] (word) main::oCount#7 ← phi( main::@36/(word) main::oCount#17 main::@37/(word) main::oCount#2 ) + [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 + to:main::@44 +main::@44: scope:[main] from main::@34 + [49] if((byte) main::objects#12>(byte) 0) goto main::@38 + to:main::@35 +main::@38: scope:[main] from main::@44 + [50] (byte) main::objects#15 ← (byte) main::objects#12 - (byte) 1 + [51] (byte) DelSprite::sn#0 ← (byte) main::objects#15 + [52] call DelSprite + to:main::@35 +main::@35: scope:[main] from main::@34 main::@38 main::@44 + [53] (word) main::oCount#20 ← phi( main::@34/(word) main::oCount#7 main::@38/(byte) 0 ) + [53] (byte) main::stopIt#15 ← phi( main::@34/(byte) main::stopIt#5 main::@38/(byte) 1 ) + [53] (byte) main::objects#17 ← phi( main::@34/(byte) main::objects#12 main::@38/(byte) main::objects#15 ) + [54] (byte) Print00::v0#0 ← (byte) main::objects#17 + [55] call Print00 + to:main::@16 +main::@31: scope:[main] from main::@42 + [56] (byte) main::objects#1 ← (byte) main::objects#9 + (byte) 1 + [57] call GetSprite + [58] (byte) GetSprite::return#4 ← (byte) GetSprite::return#2 + to:main::@40 +main::@40: scope:[main] from main::@31 + [59] (byte) main::i#11 ← (byte) GetSprite::return#4 + to:main::@43 +main::@43: scope:[main] from main::@40 + [60] if((byte) main::i#11<(byte) $80) goto main::@32 + to:main::@33 +main::@32: scope:[main] from main::@43 + [61] (byte) AddSprite::sn#1 ← (byte) main::i#11 + [62] call AddSprite + to:main::@41 +main::@41: scope:[main] from main::@32 + [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 + [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) + [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) + [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) + to:main::@33 +main::@18: scope:[main] from main::@17 + [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) + [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 + to:main::@25 +main::@25: scope:[main] from main::@18 + [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 + to:main::@26 +main::@26: scope:[main] from main::@25 + [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 + to:main::@21 +main::@21: scope:[main] from main::@20 main::@25 main::@26 + [71] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>(signed word)(byte) $f8<<(const byte) F) goto main::@22 + to:main::@27 +main::@27: scope:[main] from main::@21 + [72] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>=(signed word)(byte) $18<<(const byte) F) goto main::@23 + to:main::@28 +main::@28: scope:[main] from main::@27 + [73] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F + to:main::@23 +main::@23: scope:[main] from main::@22 main::@27 main::@28 + [74] *((signed word*)(struct $5*) main::d#10 + (byte) 1) ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) + *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + [75] *((signed word*)(struct $5*) main::d#10 + (byte) 3) ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) + *((signed byte*)(struct $5*) main::d#10 + (byte) 6) + [76] if(*((const byte*) cmRF + (byte) main::i#22)>=(byte) $80) goto main::@24 + to:main::@29 +main::@29: scope:[main] from main::@23 + [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) + [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F + [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 + [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F + [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 + to:main::@24 +main::@24: scope:[main] from main::@23 main::@29 + [82] (struct $5*) main::d#2 ← (struct $5*) main::d#10 + (byte) 9 + [83] (byte) main::i#9 ← (byte) main::i#22 + (byte) 1 + to:main::@17 +main::@22: scope:[main] from main::@21 + [84] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) -1<<(const byte) F + to:main::@23 +main::@20: scope:[main] from main::@18 + [85] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) 1 + to:main::@21 +main::@13: scope:[main] from main::@12 + [86] (byte~) main::$132 ← (byte) main::i#17 << (byte) 3 + [87] (byte~) main::$52 ← (byte~) main::$132 + (byte) main::i#17 + [88] (struct $5*) main::d1#0 ← (const struct $5*) dTab + (byte~) main::$52 + [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 + [90] (byte) main::type#2 ← (byte) main::type#4 + (byte) 1 + [91] if((byte) main::type#2<(byte) 6) goto main::@45 + to:main::@14 +main::@45: scope:[main] from main::@13 + [92] phi() + to:main::@14 +main::@14: scope:[main] from main::@13 main::@45 + [93] (byte) main::type#10 ← phi( main::@45/(byte) main::type#2 main::@13/(byte) 0 ) + [94] *((signed word*)(struct $5*) main::d1#0 + (byte) 1) ← (signed word)(byte) $70<<(const byte) F + [95] *((signed byte*)(struct $5*) main::d1#0 + (byte) 5) ← (signed byte)(byte) main::i#17 + [96] *((signed byte*)(struct $5*) main::d1#0 + (byte) 7) ← (signed byte) 1 + [97] *((signed word*)(struct $5*) main::d1#0 + (byte) 3) ← (signed word)(byte) $18<<(const byte) F + [98] *((signed byte*)(struct $5*) main::d1#0 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F + [99] *((signed byte*)(struct $5*) main::d1#0 + (byte) 8) ← (signed byte) 1 + to:main::@15 +main::@15: scope:[main] from main::@14 + [100] (byte) main::i#7 ← (byte) main::i#17 + (byte) 1 + to:main::@12 +main::@9: scope:[main] from main::@8 + [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 + [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 + [103] *((byte*~) main::$112) ← *((byte*~) main::$111) + [104] (word) main::c#4 ← (word) main::c#11 + (byte) 1 + to:main::@8 +main::@7: scope:[main] from main::@6 + [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 + [106] *((byte*~) main::$109) ← (byte) $20 + [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 + [108] *((byte*~) main::$110) ← (byte) $e + [109] (word) main::c#2 ← (word) main::c#10 + (byte) 1 + to:main::@6 +main::@5: scope:[main] from main::@4 + [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff + [111] (byte) main::i#4 ← (byte) main::i#14 + (byte) 1 + to:main::@4 +main::@3: scope:[main] from main::@2 + [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff + [113] (byte) main::i#2 ← (byte) main::i#12 + (byte) 1 + to:main::@2 + +(void()) DelSprite((byte) DelSprite::sn) +DelSprite: scope:[DelSprite] from main::@38 + [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff + [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop + to:DelSprite::@return +DelSprite::@return: scope:[DelSprite] from DelSprite + [116] return + to:@return + +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +Print00: scope:[Print00] from main::@35 + [117] phi() + to:Print00::@1 +Print00::@1: scope:[Print00] from Print00 Print00::@2 + [118] (byte) Print00::c#5 ← phi( Print00/(byte) '0' Print00::@2/(byte) Print00::c#2 ) + [118] (byte) Print00::v#3 ← phi( Print00/(byte) Print00::v0#0 Print00::@2/(byte) Print00::v#1 ) + [119] if((byte) Print00::v#3>=(byte) $a) goto Print00::@2 + to:Print00::@3 +Print00::@3: scope:[Print00] from Print00::@1 + [120] *((word) $e000+(byte*) 983) ← (byte) Print00::c#5 + to:Print00::@4 +Print00::@4: scope:[Print00] from Print00::@3 Print00::@5 + [121] (byte) Print00::c#10 ← phi( Print00::@3/(byte) '0' Print00::@5/(byte) Print00::c#4 ) + [121] (byte) Print00::v#5 ← phi( Print00::@3/(byte) Print00::v#3 Print00::@5/(byte) Print00::v#2 ) + [122] if((byte) Print00::v#5>=(byte) 1) goto Print00::@5 + to:Print00::@6 +Print00::@6: scope:[Print00] from Print00::@4 + [123] *((word) $e000+(byte*) 983+(byte) 1) ← (byte) Print00::c#10 + to:Print00::@return +Print00::@return: scope:[Print00] from Print00::@6 + [124] return + to:@return +Print00::@5: scope:[Print00] from Print00::@4 + [125] (byte) Print00::c#4 ← ++ (byte) Print00::c#10 + [126] (byte) Print00::v#2 ← (byte) Print00::v#5 - (byte) 1 + to:Print00::@4 +Print00::@2: scope:[Print00] from Print00::@1 + [127] (byte) Print00::c#2 ← ++ (byte) Print00::c#5 + [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a + to:Print00::@1 + +(byte()) GetSprite() +GetSprite: scope:[GetSprite] from main::@31 + [129] phi() + to:GetSprite::@1 +GetSprite::@1: scope:[GetSprite] from GetSprite GetSprite::@3 + [130] (byte) GetSprite::t0#3 ← phi( GetSprite/(byte) 0 GetSprite::@3/(byte) GetSprite::t0#2 ) + [131] if((byte) GetSprite::t0#3<(const byte) maxSprites) goto GetSprite::@2 + to:GetSprite::@return +GetSprite::@return: scope:[GetSprite] from GetSprite::@1 GetSprite::@4 + [132] (byte) GetSprite::return#2 ← phi( GetSprite::@1/(byte) $ff GetSprite::@4/(byte) GetSprite::t0#3 ) + [133] return + to:@return +GetSprite::@2: scope:[GetSprite] from GetSprite::@1 + [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 + to:GetSprite::@4 +GetSprite::@4: scope:[GetSprite] from GetSprite::@2 + [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 + to:GetSprite::@return +GetSprite::@3: scope:[GetSprite] from GetSprite::@2 + [136] (byte) GetSprite::t0#2 ← ++ (byte) GetSprite::t0#3 + to:GetSprite::@1 + +(void()) AddSprite((byte) AddSprite::sn) +AddSprite: scope:[AddSprite] from main::@32 + [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 + to:AddSprite::@2 +AddSprite::@2: scope:[AddSprite] from AddSprite AddSprite::@4 + [138] (byte) AddSprite::t0#3 ← phi( AddSprite/(byte) 0 AddSprite::@4/(byte) AddSprite::t0#2 ) + [139] if((byte) AddSprite::t0#3<(const byte) maxSprites) goto AddSprite::@3 + to:AddSprite::@return +AddSprite::@return: scope:[AddSprite] from AddSprite::@1 AddSprite::@2 AddSprite::@5 + [140] return + to:@return +AddSprite::@3: scope:[AddSprite] from AddSprite::@2 + [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 + to:AddSprite::@5 +AddSprite::@5: scope:[AddSprite] from AddSprite::@3 + [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 + [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 + to:AddSprite::@return +AddSprite::@4: scope:[AddSprite] from AddSprite::@3 + [144] (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#3 + (byte) 1 + to:AddSprite::@2 +AddSprite::@1: scope:[AddSprite] from AddSprite + [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 + to:AddSprite::@return + + +VARIABLE REGISTER WEIGHTS +(signed byte) $5::ax +(signed byte) $5::ay +(byte) $5::s +(signed byte) $5::vx +(signed byte) $5::vy +(signed word) $5::x +(signed word) $5::y +(void()) AddSprite((byte) AddSprite::sn) +(byte) AddSprite::sn +(byte) AddSprite::sn#1 59.28571428571429 +(byte) AddSprite::t0 +(byte) AddSprite::t0#2 20002.0 +(byte) AddSprite::t0#3 10026.25 +(void()) DelSprite((byte) DelSprite::sn) +(byte) DelSprite::sn +(byte) DelSprite::sn#0 106.5 +(byte()) GetSprite() +(byte) GetSprite::return +(byte) GetSprite::return#2 37.33333333333333 +(byte) GetSprite::return#4 22.0 +(byte) GetSprite::t0 +(byte) GetSprite::t0#2 20002.0 +(byte) GetSprite::t0#3 10051.5 +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +(byte) Print00::c +(byte) Print00::c#10 10051.5 +(byte) Print00::c#2 10001.0 +(byte) Print00::c#4 10001.0 +(byte) Print00::c#5 10051.5 +(byte*) Print00::p +(byte) Print00::v +(byte) Print00::v#1 20002.0 +(byte) Print00::v#2 20002.0 +(byte) Print00::v#3 7551.25 +(byte) Print00::v#5 10034.666666666666 +(byte) Print00::v0 +(byte) Print00::v0#0 56.0 +(signed word()) main() +(byte*~) main::$109 22.0 +(byte*~) main::$110 22.0 +(byte*~) main::$111 11.0 +(byte*~) main::$112 22.0 +(byte~) main::$132 22.0 +(signed word~) main::$27 101.0 +(signed word~) main::$28 101.0 +(byte~) main::$52 22.0 +(word) main::c +(word) main::c#10 9.166666666666666 +(word) main::c#11 11.0 +(word) main::c#16 1.0 +(word) main::c#18 1.8333333333333333 +(word) main::c#2 22.0 +(word) main::c#4 22.0 +(word) main::c#7 16.5 +(struct $5*) main::d +(struct $5*) main::d#10 10.631578947368421 +(struct $5*) main::d#2 101.0 +(struct $5*) main::d1 +(struct $5*) main::d1#0 1.0 +(byte) main::i +(byte) main::i#11 15.714285714285714 +(byte) main::i#12 14.666666666666666 +(byte) main::i#14 14.666666666666666 +(byte) main::i#17 3.4375 +(byte) main::i#2 22.0 +(byte) main::i#22 35.35 +(byte) main::i#4 22.0 +(byte) main::i#7 22.0 +(byte) main::i#9 202.0 +(word) main::oCount +(word) main::oCount#17 1.1282051282051282 +(word) main::oCount#2 22.0 +(word) main::oCount#20 7.333333333333333 +(word) main::oCount#7 22.0 +(byte) main::objects +(byte) main::objects#1 2.0 +(byte) main::objects#12 11.0 +(byte) main::objects#15 11.0 +(byte) main::objects#17 14.666666666666666 +(byte) main::objects#9 6.000000000000001 +(signed word) main::return +(byte) main::stopIt +(byte) main::stopIt#15 7.333333333333333 +(byte) main::stopIt#5 0.7857142857142858 +(byte) main::type +(byte) main::type#10 2.75 +(byte) main::type#2 11.0 +(byte) main::type#4 5.5 + +Initial phi equivalence classes +[ main::i#12 main::i#2 ] +[ main::i#14 main::i#4 ] +[ main::c#10 main::c#2 ] +[ main::c#11 main::c#4 ] +[ main::i#17 main::i#7 ] +[ main::type#4 main::type#10 main::type#2 ] +[ main::c#16 main::c#18 main::c#7 ] +[ main::stopIt#5 main::stopIt#15 ] +[ main::i#22 main::i#9 ] +[ main::d#10 main::d#2 ] +[ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +[ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] +[ Print00::c#5 Print00::c#2 ] +[ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] +[ Print00::c#10 Print00::c#4 ] +[ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] +[ AddSprite::t0#3 AddSprite::t0#2 ] +Added variable DelSprite::sn#0 to live range equivalence class [ DelSprite::sn#0 ] +Added variable GetSprite::return#4 to live range equivalence class [ GetSprite::return#4 ] +Added variable main::i#11 to live range equivalence class [ main::i#11 ] +Added variable AddSprite::sn#1 to live range equivalence class [ AddSprite::sn#1 ] +Added variable main::$27 to live range equivalence class [ main::$27 ] +Added variable main::$28 to live range equivalence class [ main::$28 ] +Added variable main::$132 to live range equivalence class [ main::$132 ] +Added variable main::$52 to live range equivalence class [ main::$52 ] +Added variable main::d1#0 to live range equivalence class [ main::d1#0 ] +Added variable main::$111 to live range equivalence class [ main::$111 ] +Added variable main::$112 to live range equivalence class [ main::$112 ] +Added variable main::$109 to live range equivalence class [ main::$109 ] +Added variable main::$110 to live range equivalence class [ main::$110 ] +Complete equivalence classes +[ main::i#12 main::i#2 ] +[ main::i#14 main::i#4 ] +[ main::c#10 main::c#2 ] +[ main::c#11 main::c#4 ] +[ main::i#17 main::i#7 ] +[ main::type#4 main::type#10 main::type#2 ] +[ main::c#16 main::c#18 main::c#7 ] +[ main::stopIt#5 main::stopIt#15 ] +[ main::i#22 main::i#9 ] +[ main::d#10 main::d#2 ] +[ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +[ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] +[ Print00::c#5 Print00::c#2 ] +[ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] +[ Print00::c#10 Print00::c#4 ] +[ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] +[ AddSprite::t0#3 AddSprite::t0#2 ] +[ DelSprite::sn#0 ] +[ GetSprite::return#4 ] +[ main::i#11 ] +[ AddSprite::sn#1 ] +[ main::$27 ] +[ main::$28 ] +[ main::$132 ] +[ main::$52 ] +[ main::d1#0 ] +[ main::$111 ] +[ main::$112 ] +[ main::$109 ] +[ main::$110 ] +Allocated zp[1]:2 [ main::i#12 main::i#2 ] +Allocated zp[1]:3 [ main::i#14 main::i#4 ] +Allocated zp[2]:4 [ main::c#10 main::c#2 ] +Allocated zp[2]:6 [ main::c#11 main::c#4 ] +Allocated zp[1]:8 [ main::i#17 main::i#7 ] +Allocated zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] +Allocated zp[2]:10 [ main::c#16 main::c#18 main::c#7 ] +Allocated zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] +Allocated zp[1]:13 [ main::i#22 main::i#9 ] +Allocated zp[2]:14 [ main::d#10 main::d#2 ] +Allocated zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Allocated zp[2]:17 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] +Allocated zp[1]:19 [ Print00::c#5 Print00::c#2 ] +Allocated zp[1]:20 [ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] +Allocated zp[1]:21 [ Print00::c#10 Print00::c#4 ] +Allocated zp[1]:22 [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] +Allocated zp[1]:23 [ AddSprite::t0#3 AddSprite::t0#2 ] +Allocated zp[1]:24 [ DelSprite::sn#0 ] +Allocated zp[1]:25 [ GetSprite::return#4 ] +Allocated zp[1]:26 [ main::i#11 ] +Allocated zp[1]:27 [ AddSprite::sn#1 ] +Allocated zp[2]:28 [ main::$27 ] +Allocated zp[2]:30 [ main::$28 ] +Allocated zp[1]:32 [ main::$132 ] +Allocated zp[1]:33 [ main::$52 ] +Allocated zp[2]:34 [ main::d1#0 ] +Allocated zp[2]:36 [ main::$111 ] +Allocated zp[2]:38 [ main::$112 ] +Allocated zp[2]:40 [ main::$109 ] +Allocated zp[2]:42 [ main::$110 ] + +INITIAL ASM +Target platform is c64basic / MOS6502X + // File Comments +// bubbles64 - Q&D C64 port of the bubbles demo from vbcc6502's NES exmaples +// Coded by Lazycow +// Source https://www.lemon64.com/forum/viewtopic.php?t=75283&start=15 + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .const lfMC = $10 + .const rfDrop = $fe + .const maxSprites = $20 + .const maxSprImages = 8 + .const maxC64Images = $100 + .const sprOff = $40 + .const maxDrawObjects = $18 + .const F = 3 + // main +// +// +main: { + .label __27 = $1c + .label __28 = $1e + .label __52 = $21 + .label i = 2 + .label i_1 = 3 + // main loop + .label c = 4 + // main loop + .label c_1 = 6 + .label d1 = $22 + // setup bubbles + .label type = 9 + .label i_2 = 8 + // main loop + .label c_2 = $a + .label d = $e + .label i_3 = $d + .label objects = $10 + .label i_4 = $1a + // 1 == preallocate 20 sprites (only for better benchmarking) + // 0 == allocate sprites on the fly (prefered) + .label oCount = $11 + .label stopIt = $c + .label __109 = $28 + .label __110 = $2a + .label __111 = $24 + .label __112 = $26 + .label __132 = $20 + // [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff -- _deref_pbuc1=vbuc2 + // setup sprite images + lda #sprOff + sta lcSprMapTab + // [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #sprOff+1 + sta lcSprMapTab+1 + // [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 -- _deref_pbuc1=vbuc2 + lda #sprOff+2 + sta lcSprMapTab+2 + // [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 -- _deref_pbuc1=vbuc2 + lda #sprOff+3 + sta lcSprMapTab+3 + // [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 -- _deref_pbuc1=vbuc2 + lda #sprOff+4 + sta lcSprMapTab+4 + // [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 -- _deref_pbuc1=vbuc2 + lda #sprOff+5 + sta lcSprMapTab+5 + // [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #$a|lfMC + sta lcSprColTab+sprOff+1 + // [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) -- _deref_pbuc1=_deref_pbuc2 + // setup sprite colors + flags + lda lcSprColTab+sprOff+1 + sta lcSprColTab+sprOff + // [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #5|lfMC + sta lcSprColTab+sprOff+3 + // [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) -- _deref_pbuc1=_deref_pbuc2 + lda lcSprColTab+sprOff+3 + sta lcSprColTab+sprOff+2 + // [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #$e|lfMC + sta lcSprColTab+sprOff+5 + // [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) -- _deref_pbuc1=_deref_pbuc2 + lda lcSprColTab+sprOff+5 + sta lcSprColTab+sprOff+4 + // [12] phi from main to main::@2 [phi:main->main::@2] + __b2_from_main: + // [12] phi (byte) main::i#12 = (byte) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b2 + // main::@2 + __b2: + // [13] if((byte) main::i#12<(const byte) maxSprites+(byte) 1) goto main::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #maxSprites+1 + bcc __b3 + // [14] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + __b4_from___b2: + // [14] phi (byte) main::i#14 = (byte) 0 [phi:main::@2->main::@4#0] -- vbuz1=vbuc1 + lda #0 + sta.z i_1 + jmp __b4 + // clear (i)ndex (t)able + // main::@4 + __b4: + // [15] if((byte) main::i#14<(const byte) maxSprites) goto main::@5 -- vbuz1_lt_vbuc1_then_la1 + lda.z i_1 + cmp #maxSprites + bcc __b5 + // [16] phi from main::@4 to main::@6 [phi:main::@4->main::@6] + __b6_from___b4: + // [16] phi (word) main::c#10 = (byte) 0 [phi:main::@4->main::@6#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c + lda #>0 + sta.z c+1 + jmp __b6 + // main::@6 + __b6: + // [17] if((word) main::c#10<(word) $3e8) goto main::@7 -- vwuz1_lt_vwuc1_then_la1 + lda.z c+1 + cmp #>$3e8 + bcc __b7 + bne !+ + lda.z c + cmp #<$3e8 + bcc __b7 + !: + jmp __b39 + // main::@39 + __b39: + // [18] *((byte*) 1) ← (byte) $33 -- _deref_pbuc1=vbuc2 + // install IRQ + lda #$33 + sta 1 + // [19] phi from main::@39 to main::@8 [phi:main::@39->main::@8] + __b8_from___b39: + // [19] phi (word) main::c#11 = (byte) 0 [phi:main::@39->main::@8#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c_1 + lda #>0 + sta.z c_1+1 + jmp __b8 + // now it's save to change "01" + // main::@8 + __b8: + // [20] if((word) main::c#11<(word) $7f8) goto main::@9 -- vwuz1_lt_vwuc1_then_la1 + lda.z c_1+1 + cmp #>$7f8 + bcc __b9 + bne !+ + lda.z c_1 + cmp #<$7f8 + bcc __b9 + !: + jmp __b10 + // main::@10 + __b10: + // [21] *((byte*) 1) ← (byte) $35 -- _deref_pbuc1=vbuc2 + lda #$35 + sta 1 + // [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + lda #3 + ora $d000+$d02 + sta $d000+$d02 + // [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + lda #3^$ff + and $d000+$d00 + sta $d000+$d00 + jmp __b11 + // main::@11 + __b11: + // [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'P'-'A'+1 + sta $e000+$3e5 + // [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 -- _deref_pbuc1=vbuc2 + lda #1 + sta $e000+$3e6 + // [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'L'-'A'+1 + sta $e000+$3e7 + jmp __b1 + // main::@1 + __b1: + // [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf + // [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'U'-'A'+1 + sta $e000+$3cf+1 + // [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf+2 + // [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf+3 + // [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'L'-'A'+1 + sta $e000+$3cf+4 + // [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'E'-'A'+1 + sta $e000+$3cf+5 + // [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'S'-'A'+1 + sta $e000+$3cf+6 + // [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' -- _deref_pbuc1=vbuc2 + lda #':' + sta $e000+$3cf+7 + // [35] phi from main::@1 to main::@12 [phi:main::@1->main::@12] + __b12_from___b1: + // [35] phi (byte) main::type#4 = (byte) 0 [phi:main::@1->main::@12#0] -- vbuz1=vbuc1 + lda #0 + sta.z type + // [35] phi (byte) main::i#17 = (byte) 0 [phi:main::@1->main::@12#1] -- vbuz1=vbuc1 + lda #0 + sta.z i_2 + jmp __b12 + // main::@12 + __b12: + // [36] if((byte) main::i#17<(const byte) maxDrawObjects) goto main::@13 -- vbuz1_lt_vbuc1_then_la1 + lda.z i_2 + cmp #maxDrawObjects + bcc __b13 + // [37] phi from main::@12 to main::@16 [phi:main::@12->main::@16] + __b16_from___b12: + // [37] phi (word) main::oCount#17 = (word) 0 [phi:main::@12->main::@16#0] -- vwuz1=vwuc1 + lda #<0 + sta.z oCount + lda #>0 + sta.z oCount+1 + // [37] phi (byte) main::stopIt#5 = (byte) 0 [phi:main::@12->main::@16#1] -- vbuz1=vbuc1 + lda #0 + sta.z stopIt + // [37] phi (word) main::c#16 = (byte) 0 [phi:main::@12->main::@16#2] -- vwuz1=vbuc1 + lda #<0 + sta.z c_2 + lda #>0 + sta.z c_2+1 + // [37] phi (byte) main::objects#9 = (byte) 0 [phi:main::@12->main::@16#3] -- vbuz1=vbuc1 + lda #0 + sta.z objects + jmp __b16 + // main::@16 + __b16: + // [38] phi from main::@16 to main::@17 [phi:main::@16->main::@17] + __b17_from___b16: + // [38] phi (struct $5*) main::d#10 = (const struct $5*) dTab [phi:main::@16->main::@17#0] -- pssz1=pssc1 + lda #dTab + sta.z d+1 + // [38] phi (byte) main::i#22 = (byte) 0 [phi:main::@16->main::@17#1] -- vbuz1=vbuc1 + lda #0 + sta.z i_3 + jmp __b17 + // move objects + // main::@17 + __b17: + // [39] if((byte) main::i#22<(byte) main::objects#9) goto main::@18 -- vbuz1_lt_vbuz2_then_la1 + lda.z i_3 + cmp.z objects + bcc __b18 + jmp __b19 + // main::@19 + __b19: + // [40] (word) main::c#7 ← (word) main::c#16 + (byte) 1 -- vwuz1=vwuz1_plus_1 + // activate new bubble? + inc.z c_2 + bne !+ + inc.z c_2+1 + !: + // [41] if((word) main::c#7<(byte) $e) goto main::@33 -- vwuz1_lt_vbuc1_then_la1 + lda.z c_2+1 + cmp #>$e + bcc __b33_from___b19 + bne !+ + lda.z c_2 + cmp #<$e + bcc __b33_from___b19 + !: + jmp __b30 + // main::@30 + __b30: + // [42] if((byte) 0!=(byte) main::stopIt#5) goto main::@33 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z stopIt + bne __b33_from___b30 + jmp __b42 + // main::@42 + __b42: + // [43] if((byte) main::objects#9<(const byte) maxDrawObjects) goto main::@31 -- vbuz1_lt_vbuc1_then_la1 + lda.z objects + cmp #maxDrawObjects + bcc __b31 + // [44] phi from main::@42 main::@43 to main::@33 [phi:main::@42/main::@43->main::@33] + __b33_from___b42: + __b33_from___b43: + jmp __b33 + // [44] phi from main::@19 to main::@33 [phi:main::@19->main::@33] + __b33_from___b19: + // [44] phi (word) main::c#18 = (word) main::c#7 [phi:main::@19->main::@33#0] -- register_copy + // [44] phi (byte) main::objects#12 = (byte) main::objects#9 [phi:main::@19->main::@33#1] -- register_copy + jmp __b33 + // [44] phi from main::@30 main::@41 to main::@33 [phi:main::@30/main::@41->main::@33] + __b33_from___b30: + __b33_from___b41: + // [44] phi (word) main::c#18 = (byte) 0 [phi:main::@30/main::@41->main::@33#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c_2 + lda #>0 + sta.z c_2+1 + // [44] phi (byte) main::objects#12 = (byte) main::objects#9 [phi:main::@30/main::@41->main::@33#1] -- register_copy + jmp __b33 + // main::@33 + __b33: + jmp __b36 + // main::@36 + __b36: + // [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 -- vwuz1_le_0_then_la1 + lda.z oCount + bne !+ + lda.z oCount+1 + beq __b34_from___b36 + !: + jmp __b37 + // main::@37 + __b37: + // [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 -- vwuz1=vwuz1_minus_1 + lda.z oCount + sec + sbc #1 + sta.z oCount + lda.z oCount+1 + sbc #0 + sta.z oCount+1 + // [47] phi from main::@36 main::@37 to main::@34 [phi:main::@36/main::@37->main::@34] + __b34_from___b36: + __b34_from___b37: + // [47] phi (word) main::oCount#7 = (word) main::oCount#17 [phi:main::@36/main::@37->main::@34#0] -- register_copy + jmp __b34 + // main::@34 + __b34: + // [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 -- vwuz1_lt_vbuc1_then_la1 + lda.z oCount+1 + cmp #>2+1 + bcc __b35_from___b34 + bne !+ + lda.z oCount + cmp #<2+1 + bcc __b35_from___b34 + !: + jmp __b44 + // main::@44 + __b44: + // [49] if((byte) main::objects#12>(byte) 0) goto main::@38 -- vbuz1_gt_0_then_la1 + lda.z objects + bne __b38 + // [53] phi from main::@44 to main::@35 [phi:main::@44->main::@35] + __b35_from___b44: + jmp __b35 + // main::@38 + __b38: + // [50] (byte) main::objects#15 ← (byte) main::objects#12 - (byte) 1 -- vbuz1=vbuz1_minus_1 + dec.z objects + // [51] (byte) DelSprite::sn#0 ← (byte) main::objects#15 -- vbuz1=vbuz2 + lda.z objects + sta.z DelSprite.sn + // [52] call DelSprite + jsr DelSprite + // [53] phi from main::@38 to main::@35 [phi:main::@38->main::@35] + __b35_from___b38: + // [53] phi (word) main::oCount#20 = (byte) 0 [phi:main::@38->main::@35#0] -- vwuz1=vbuc1 + lda #<0 + sta.z oCount + lda #>0 + sta.z oCount+1 + // [53] phi (byte) main::stopIt#15 = (byte) 1 [phi:main::@38->main::@35#1] -- vbuz1=vbuc1 + lda #1 + sta.z stopIt + // [53] phi (byte) main::objects#17 = (byte) main::objects#15 [phi:main::@38->main::@35#2] -- register_copy + jmp __b35 + // [53] phi from main::@34 to main::@35 [phi:main::@34->main::@35] + __b35_from___b34: + // [53] phi (word) main::oCount#20 = (word) main::oCount#7 [phi:main::@34->main::@35#0] -- register_copy + // [53] phi (byte) main::stopIt#15 = (byte) main::stopIt#5 [phi:main::@34->main::@35#1] -- register_copy + // [53] phi (byte) main::objects#17 = (byte) main::objects#12 [phi:main::@34->main::@35#2] -- register_copy + jmp __b35 + // main::@35 + __b35: + // [54] (byte) Print00::v0#0 ← (byte) main::objects#17 -- vbuz1=vbuz2 + lda.z objects + sta.z Print00.v0 + // [55] call Print00 + // [117] phi from main::@35 to Print00 [phi:main::@35->Print00] + Print00_from___b35: + jsr Print00 + // [37] phi from main::@35 to main::@16 [phi:main::@35->main::@16] + __b16_from___b35: + // [37] phi (word) main::oCount#17 = (word) main::oCount#20 [phi:main::@35->main::@16#0] -- register_copy + // [37] phi (byte) main::stopIt#5 = (byte) main::stopIt#15 [phi:main::@35->main::@16#1] -- register_copy + // [37] phi (word) main::c#16 = (word) main::c#18 [phi:main::@35->main::@16#2] -- register_copy + // [37] phi (byte) main::objects#9 = (byte) main::objects#17 [phi:main::@35->main::@16#3] -- register_copy + jmp __b16 + // main::@31 + __b31: + // [56] (byte) main::objects#1 ← (byte) main::objects#9 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z objects + // [57] call GetSprite + // [129] phi from main::@31 to GetSprite [phi:main::@31->GetSprite] + GetSprite_from___b31: + jsr GetSprite + // [58] (byte) GetSprite::return#4 ← (byte) GetSprite::return#2 -- vbuz1=vbuz2 + lda.z GetSprite.return + sta.z GetSprite.return_1 + jmp __b40 + // main::@40 + __b40: + // [59] (byte) main::i#11 ← (byte) GetSprite::return#4 -- vbuz1=vbuz2 + lda.z GetSprite.return_1 + sta.z i_4 + jmp __b43 + // main::@43 + __b43: + // [60] if((byte) main::i#11<(byte) $80) goto main::@32 -- vbuz1_lt_vbuc1_then_la1 + lda.z i_4 + cmp #$80 + bcc __b32 + jmp __b33_from___b43 + // main::@32 + __b32: + // [61] (byte) AddSprite::sn#1 ← (byte) main::i#11 -- vbuz1=vbuz2 + lda.z i_4 + sta.z AddSprite.sn + // [62] call AddSprite + jsr AddSprite + jmp __b41 + // main::@41 + __b41: + // [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z i_4 + sta cmRY,y + // [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + ldy.z i_4 + lda cmRY,y + sta cmRF,y + // [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + ldy.z i_4 + lda cmRF,y + sta cmRX,y + // [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + ldy.z i_4 + lda cmRX,y + sta cmSI,y + jmp __b33_from___b41 + // main::@18 + __b18: + // [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) -- pbsz1_derefidx_vbuc1=pbsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 + ldy #7 + lda (d),y + ldy #5 + tax + lda (d),y + sty.z $ff + stx.z $ff + clc + adc.z $ff + ldy.z $ff + sta (d),y + // [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 -- pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 + ldy #5 + lda (d),y + sec + sbc #-$20 + bvc !+ + eor #$80 + !: + bmi __b20 + jmp __b25 + // main::@25 + __b25: + // [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 -- pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 + ldy #5 + lda (d),y + sec + sbc #$20+1 + bvc !+ + eor #$80 + !: + bmi __b21 + jmp __b26 + // main::@26 + __b26: + // [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 -- pbsz1_derefidx_vbuc1=vbsc2 + lda #7 + tay + lda #-1 + sta (d),y + jmp __b21 + // main::@21 + __b21: + // [71] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>(signed word)(byte) $f8<<(const byte) F) goto main::@22 -- pwsz1_derefidx_vbuc1_gt_vwsc2_then_la1 + ldy #3 + lda #<$f8<$f8<=(signed word)(byte) $18<<(const byte) F) goto main::@23 -- pwsz1_derefidx_vbuc1_ge_vwsc2_then_la1 + ldy #3 + lda (d),y + cmp #<$18<$18<=(byte) $80) goto main::@24 -- pbuc1_derefidx_vbuz1_ge_vbuc2_then_la1 + ldy.z i_3 + lda cmRF,y + cmp #$80 + bcs __b24 + jmp __b29 + // main::@29 + __b29: + // [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) -- pbuc1_derefidx_vbuz1=_deref_pbuz2 + ldy #0 + lda (d),y + ldy.z i_3 + sta cmSI,y + // [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F -- vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 + ldx #F + ldy #1 + lda (d),y + sta.z __27 + iny + lda (d),y + sta.z __27+1 + cpx #0 + beq !e+ + !: + lda.z __27+1 + cmp #$80 + ror.z __27+1 + ror.z __27 + dex + bne !- + !e: + // [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 -- pbuc1_derefidx_vbuz1=_byte_vwsz2 + ldy.z i_3 + lda.z __27 + sta cmRX,y + // [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F -- vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 + ldx #F + ldy #3 + lda (d),y + sta.z __28 + iny + lda (d),y + sta.z __28+1 + cpx #0 + beq !e+ + !: + lda.z __28+1 + cmp #$80 + ror.z __28+1 + ror.z __28 + dex + bne !- + !e: + // [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 -- pbuc1_derefidx_vbuz1=_byte_vwsz2 + ldy.z i_3 + lda.z __28 + sta cmRY,y + jmp __b24 + // main::@24 + __b24: + // [82] (struct $5*) main::d#2 ← (struct $5*) main::d#10 + (byte) 9 -- pssz1=pssz1_plus_vbuc1 + lda #9 + clc + adc.z d + sta.z d + bcc !+ + inc.z d+1 + !: + // [83] (byte) main::i#9 ← (byte) main::i#22 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z i_3 + // [38] phi from main::@24 to main::@17 [phi:main::@24->main::@17] + __b17_from___b24: + // [38] phi (struct $5*) main::d#10 = (struct $5*) main::d#2 [phi:main::@24->main::@17#0] -- register_copy + // [38] phi (byte) main::i#22 = (byte) main::i#9 [phi:main::@24->main::@17#1] -- register_copy + jmp __b17 + // main::@22 + __b22: + // [84] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) -1<<(const byte) F -- pbsz1_derefidx_vbuc1=vbsc2 + lda #6 + tay + lda #-1<dTab + adc #0 + sta.z d1+1 + // [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 -- _deref_pbuz1=vbuz2 + lda.z type + ldy #0 + sta (d1),y + // [90] (byte) main::type#2 ← (byte) main::type#4 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z type + // [91] if((byte) main::type#2<(byte) 6) goto main::@45 -- vbuz1_lt_vbuc1_then_la1 + lda.z type + cmp #6 + bcc __b45_from___b13 + // [93] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + __b14_from___b13: + // [93] phi (byte) main::type#10 = (byte) 0 [phi:main::@13->main::@14#0] -- vbuz1=vbuc1 + lda #0 + sta.z type + jmp __b14 + // [92] phi from main::@13 to main::@45 [phi:main::@13->main::@45] + __b45_from___b13: + jmp __b45 + // main::@45 + __b45: + // [93] phi from main::@45 to main::@14 [phi:main::@45->main::@14] + __b14_from___b45: + // [93] phi (byte) main::type#10 = (byte) main::type#2 [phi:main::@45->main::@14#0] -- register_copy + jmp __b14 + // main::@14 + __b14: + // [94] *((signed word*)(struct $5*) main::d1#0 + (byte) 1) ← (signed word)(byte) $70<<(const byte) F -- pwsz1_derefidx_vbuc1=vwsc2 + ldy #1 + lda #<$70<$70<$18<main::@12] + __b12_from___b15: + // [35] phi (byte) main::type#4 = (byte) main::type#10 [phi:main::@15->main::@12#0] -- register_copy + // [35] phi (byte) main::i#17 = (byte) main::i#7 [phi:main::@15->main::@12#1] -- register_copy + jmp __b12 + // main::@9 + __b9: + // [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c_1 + clc + adc #<$d000 + sta.z __111 + lda.z c_1+1 + adc #>$d000 + sta.z __111+1 + // [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c_1 + clc + adc #<$f800 + sta.z __112 + lda.z c_1+1 + adc #>$f800 + sta.z __112+1 + // [103] *((byte*~) main::$112) ← *((byte*~) main::$111) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (__111),y + ldy #0 + sta (__112),y + // [104] (word) main::c#4 ← (word) main::c#11 + (byte) 1 -- vwuz1=vwuz1_plus_1 + inc.z c_1 + bne !+ + inc.z c_1+1 + !: + // [19] phi from main::@9 to main::@8 [phi:main::@9->main::@8] + __b8_from___b9: + // [19] phi (word) main::c#11 = (word) main::c#4 [phi:main::@9->main::@8#0] -- register_copy + jmp __b8 + // main::@7 + __b7: + // [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c + clc + adc #<$e000 + sta.z __109 + lda.z c+1 + adc #>$e000 + sta.z __109+1 + // [106] *((byte*~) main::$109) ← (byte) $20 -- _deref_pbuz1=vbuc1 + lda #$20 + ldy #0 + sta (__109),y + // [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c + clc + adc #<$d800 + sta.z __110 + lda.z c+1 + adc #>$d800 + sta.z __110+1 + // [108] *((byte*~) main::$110) ← (byte) $e -- _deref_pbuz1=vbuc1 + lda #$e + ldy #0 + sta (__110),y + // [109] (word) main::c#2 ← (word) main::c#10 + (byte) 1 -- vwuz1=vwuz1_plus_1 + inc.z c + bne !+ + inc.z c+1 + !: + // [16] phi from main::@7 to main::@6 [phi:main::@7->main::@6] + __b6_from___b7: + // [16] phi (word) main::c#10 = (word) main::c#2 [phi:main::@7->main::@6#0] -- register_copy + jmp __b6 + // main::@5 + __b5: + // [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff -- pbuc1_derefidx_vbuz1=vbuc2 + lda #$ff + ldy.z i_1 + sta cmRF,y + // [111] (byte) main::i#4 ← (byte) main::i#14 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z i_1 + // [14] phi from main::@5 to main::@4 [phi:main::@5->main::@4] + __b4_from___b5: + // [14] phi (byte) main::i#14 = (byte) main::i#4 [phi:main::@5->main::@4#0] -- register_copy + jmp __b4 + // main::@3 + __b3: + // [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff -- pbuc1_derefidx_vbuz1=vbuc2 + lda #$ff + ldy.z i + sta cmIT,y + // [113] (byte) main::i#2 ← (byte) main::i#12 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z i + // [12] phi from main::@3 to main::@2 [phi:main::@3->main::@2] + __b2_from___b3: + // [12] phi (byte) main::i#12 = (byte) main::i#2 [phi:main::@3->main::@2#0] -- register_copy + jmp __b2 +} + // DelSprite +// DelSprite(byte zp($18) sn) +DelSprite: { + .label sn = $18 + // [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff -- pbuc1_derefidx_vbuz1=vbuc2 + // drop sprite, will be removed from IT in IRQ + lda #$ff + ldy.z sn + sta cmRY,y + // [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop -- pbuc1_derefidx_vbuz1=vbuc2 + lda #rfDrop + ldy.z sn + sta cmRF,y + jmp __breturn + // DelSprite::@return + __breturn: + // [116] return + rts +} + // Print00 +// Print00(byte zp($14) v0) +Print00: { + .label c = $13 + .label v = $14 + .label c_1 = $15 + .label v0 = $14 + // [118] phi from Print00 to Print00::@1 [phi:Print00->Print00::@1] + __b1_from_Print00: + // [118] phi (byte) Print00::c#5 = (byte) '0' [phi:Print00->Print00::@1#0] -- vbuz1=vbuc1 + lda #'0' + sta.z c + // [118] phi (byte) Print00::v#3 = (byte) Print00::v0#0 [phi:Print00->Print00::@1#1] -- register_copy + jmp __b1 + // Print00::@1 + __b1: + // [119] if((byte) Print00::v#3>=(byte) $a) goto Print00::@2 -- vbuz1_ge_vbuc1_then_la1 + lda.z v + cmp #$a + bcs __b2 + jmp __b3 + // Print00::@3 + __b3: + // [120] *((word) $e000+(byte*) 983) ← (byte) Print00::c#5 -- _deref_pbuc1=vbuz1 + lda.z c + sta $e000+$3d7 + // [121] phi from Print00::@3 to Print00::@4 [phi:Print00::@3->Print00::@4] + __b4_from___b3: + // [121] phi (byte) Print00::c#10 = (byte) '0' [phi:Print00::@3->Print00::@4#0] -- vbuz1=vbuc1 + lda #'0' + sta.z c_1 + // [121] phi (byte) Print00::v#5 = (byte) Print00::v#3 [phi:Print00::@3->Print00::@4#1] -- register_copy + jmp __b4 + // Print00::@4 + __b4: + // [122] if((byte) Print00::v#5>=(byte) 1) goto Print00::@5 -- vbuz1_ge_vbuc1_then_la1 + lda.z v + cmp #1 + bcs __b5 + jmp __b6 + // Print00::@6 + __b6: + // [123] *((word) $e000+(byte*) 983+(byte) 1) ← (byte) Print00::c#10 -- _deref_pbuc1=vbuz1 + lda.z c_1 + sta $e000+$3d7+1 + jmp __breturn + // Print00::@return + __breturn: + // [124] return + rts + // Print00::@5 + __b5: + // [125] (byte) Print00::c#4 ← ++ (byte) Print00::c#10 -- vbuz1=_inc_vbuz1 + inc.z c_1 + // [126] (byte) Print00::v#2 ← (byte) Print00::v#5 - (byte) 1 -- vbuz1=vbuz1_minus_1 + dec.z v + // [121] phi from Print00::@5 to Print00::@4 [phi:Print00::@5->Print00::@4] + __b4_from___b5: + // [121] phi (byte) Print00::c#10 = (byte) Print00::c#4 [phi:Print00::@5->Print00::@4#0] -- register_copy + // [121] phi (byte) Print00::v#5 = (byte) Print00::v#2 [phi:Print00::@5->Print00::@4#1] -- register_copy + jmp __b4 + // Print00::@2 + __b2: + // [127] (byte) Print00::c#2 ← ++ (byte) Print00::c#5 -- vbuz1=_inc_vbuz1 + inc.z c + // [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a -- vbuz1=vbuz1_minus_vbuc1 + lax.z v + axs #$a + stx.z v + // [118] phi from Print00::@2 to Print00::@1 [phi:Print00::@2->Print00::@1] + __b1_from___b2: + // [118] phi (byte) Print00::c#5 = (byte) Print00::c#2 [phi:Print00::@2->Print00::@1#0] -- register_copy + // [118] phi (byte) Print00::v#3 = (byte) Print00::v#1 [phi:Print00::@2->Print00::@1#1] -- register_copy + jmp __b1 +} + // GetSprite +// sprite support functions +// +GetSprite: { + // get unused or dropped sprite + .label t0 = $16 + .label return = $16 + .label return_1 = $19 + // [130] phi from GetSprite to GetSprite::@1 [phi:GetSprite->GetSprite::@1] + __b1_from_GetSprite: + // [130] phi (byte) GetSprite::t0#3 = (byte) 0 [phi:GetSprite->GetSprite::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z t0 + jmp __b1 + // GetSprite::@1 + __b1: + // [131] if((byte) GetSprite::t0#3<(const byte) maxSprites) goto GetSprite::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z t0 + cmp #maxSprites + bcc __b2 + // [132] phi from GetSprite::@1 to GetSprite::@return [phi:GetSprite::@1->GetSprite::@return] + __breturn_from___b1: + // [132] phi (byte) GetSprite::return#2 = (byte) $ff [phi:GetSprite::@1->GetSprite::@return#0] -- vbuz1=vbuc1 + lda #$ff + sta.z return + jmp __breturn + // GetSprite::@return + __breturn: + // [133] return + rts + // GetSprite::@2 + __b2: + // [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 -- pbuc1_derefidx_vbuz1_lt_vbuc2_then_la1 + ldy.z t0 + lda cmRF,y + cmp #rfDrop + bcc __b3 + jmp __b4 + // GetSprite::@4 + __b4: + // [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z t0 + sta cmRF,y + // [132] phi from GetSprite::@4 to GetSprite::@return [phi:GetSprite::@4->GetSprite::@return] + __breturn_from___b4: + // [132] phi (byte) GetSprite::return#2 = (byte) GetSprite::t0#3 [phi:GetSprite::@4->GetSprite::@return#0] -- register_copy + jmp __breturn + // GetSprite::@3 + __b3: + // [136] (byte) GetSprite::t0#2 ← ++ (byte) GetSprite::t0#3 -- vbuz1=_inc_vbuz1 + inc.z t0 + // [130] phi from GetSprite::@3 to GetSprite::@1 [phi:GetSprite::@3->GetSprite::@1] + __b1_from___b3: + // [130] phi (byte) GetSprite::t0#3 = (byte) GetSprite::t0#2 [phi:GetSprite::@3->GetSprite::@1#0] -- register_copy + jmp __b1 +} + // AddSprite +// AddSprite(byte zp($1b) sn) +AddSprite: { + // activate prepared sprite into the (i)ndex (t)able + .label t0 = $17 + .label sn = $1b + // [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 -- vbuc1_eq_pbuc2_derefidx_vbuz1_then_la1 + ldy.z sn + lda cmRF,y + cmp #rfDrop + beq __b1 + // [138] phi from AddSprite to AddSprite::@2 [phi:AddSprite->AddSprite::@2] + __b2_from_AddSprite: + // [138] phi (byte) AddSprite::t0#3 = (byte) 0 [phi:AddSprite->AddSprite::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z t0 + jmp __b2 + // AddSprite::@2 + __b2: + // [139] if((byte) AddSprite::t0#3<(const byte) maxSprites) goto AddSprite::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z t0 + cmp #maxSprites + bcc __b3 + jmp __breturn + // AddSprite::@return + __breturn: + // [140] return + rts + // AddSprite::@3 + __b3: + // [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 -- pbuc1_derefidx_vbuz1_lt_vbuc2_then_la1 + ldy.z t0 + lda cmIT,y + cmp #$80 + bcc __b4 + jmp __b5 + // AddSprite::@5 + __b5: + // [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z sn + sta cmRF,y + // [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 -- pbuc1_derefidx_vbuz1=vbuz2 + lda.z sn + ldy.z t0 + sta cmIT,y + jmp __breturn + // AddSprite::@4 + __b4: + // [144] (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#3 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z t0 + // [138] phi from AddSprite::@4 to AddSprite::@2 [phi:AddSprite::@4->AddSprite::@2] + __b2_from___b4: + // [138] phi (byte) AddSprite::t0#3 = (byte) AddSprite::t0#2 [phi:AddSprite::@4->AddSprite::@2#0] -- register_copy + jmp __b2 + // AddSprite::@1 + __b1: + // [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z sn + sta cmRF,y + jmp __breturn +} + // File Data + lcSprMapTab: .fill maxSprImages, 0 + lcSprColTab: .fill maxC64Images, 0 + cmIT: .fill maxSprites+1, 0 + cmSI: .fill maxSprites, 0 + cmRX: .fill maxSprites, 0 + cmRY: .fill maxSprites, 0 + cmRF: .fill maxSprites, 0 + dTab: .fill 9*maxDrawObjects, 0 + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff [ ] ( [ ] { } ) always clobbers reg byte a +Statement [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC [ ] ( [ ] { } ) always clobbers reg byte a +Statement [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) [ ] ( [ ] { } ) always clobbers reg byte a +Statement [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC [ ] ( [ ] { } ) always clobbers reg byte a +Statement [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) [ ] ( [ ] { } ) always clobbers reg byte a +Statement [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC [ ] ( [ ] { } ) always clobbers reg byte a +Statement [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) [ ] ( [ ] { } ) always clobbers reg byte a +Statement [17] if((word) main::c#10<(word) $3e8) goto main::@7 [ main::c#10 ] ( [ main::c#10 ] { } ) always clobbers reg byte a +Statement [18] *((byte*) 1) ← (byte) $33 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [20] if((word) main::c#11<(word) $7f8) goto main::@9 [ main::c#11 ] ( [ main::c#11 ] { } ) always clobbers reg byte a +Statement [21] *((byte*) 1) ← (byte) $35 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' [ ] ( [ ] { } ) always clobbers reg byte a +Statement [41] if((word) main::c#7<(byte) $e) goto main::@33 [ main::objects#9 main::stopIt#5 main::oCount#17 main::c#7 ] ( [ main::objects#9 main::stopIt#5 main::oCount#17 main::c#7 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Removing always clobbered register reg byte a as potential for zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] +Statement [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 [ main::stopIt#5 main::oCount#17 main::c#18 main::objects#12 ] ( [ main::stopIt#5 main::oCount#17 main::c#18 main::objects#12 ] { } ) always clobbers reg byte a +Statement [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#2 ] ( [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#2 ] { } ) always clobbers reg byte a +Statement [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#7 ] ( [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#7 ] { } ) always clobbers reg byte a +Statement [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:26 [ main::i#11 ] +Statement [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { } ) always clobbers reg byte a +Statement [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { } ) always clobbers reg byte a +Statement [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) [ main::stopIt#5 main::oCount#17 main::objects#1 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 ] { } ) always clobbers reg byte a +Statement [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte x reg byte y +Removing always clobbered register reg byte x as potential for zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Removing always clobbered register reg byte y as potential for zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Removing always clobbered register reg byte x as potential for zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] +Removing always clobbered register reg byte y as potential for zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] +Removing always clobbered register reg byte a as potential for zp[1]:13 [ main::i#22 main::i#9 ] +Removing always clobbered register reg byte x as potential for zp[1]:13 [ main::i#22 main::i#9 ] +Removing always clobbered register reg byte y as potential for zp[1]:13 [ main::i#22 main::i#9 ] +Statement [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [71] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>(signed word)(byte) $f8<<(const byte) F) goto main::@22 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [72] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>=(signed word)(byte) $18<<(const byte) F) goto main::@23 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [73] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [74] *((signed word*)(struct $5*) main::d#10 + (byte) 1) ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) + *((signed byte*)(struct $5*) main::d#10 + (byte) 5) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [75] *((signed word*)(struct $5*) main::d#10 + (byte) 3) ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) + *((signed byte*)(struct $5*) main::d#10 + (byte) 6) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [76] if(*((const byte*) cmRF + (byte) main::i#22)>=(byte) $80) goto main::@24 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$27 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$27 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$28 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$28 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [82] (struct $5*) main::d#2 ← (struct $5*) main::d#10 + (byte) 9 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#2 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#2 ] { } ) always clobbers reg byte a +Statement [84] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) -1<<(const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [85] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) 1 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [86] (byte~) main::$132 ← (byte) main::i#17 << (byte) 3 [ main::i#17 main::type#4 main::$132 ] ( [ main::i#17 main::type#4 main::$132 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::i#17 main::i#7 ] +Removing always clobbered register reg byte a as potential for zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] +Statement [87] (byte~) main::$52 ← (byte~) main::$132 + (byte) main::i#17 [ main::i#17 main::type#4 main::$52 ] ( [ main::i#17 main::type#4 main::$52 ] { } ) always clobbers reg byte a +Statement [88] (struct $5*) main::d1#0 ← (const struct $5*) dTab + (byte~) main::$52 [ main::i#17 main::type#4 main::d1#0 ] ( [ main::i#17 main::type#4 main::d1#0 ] { } ) always clobbers reg byte a +Statement [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 [ main::i#17 main::type#4 main::d1#0 ] ( [ main::i#17 main::type#4 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:8 [ main::i#17 main::i#7 ] +Removing always clobbered register reg byte y as potential for zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] +Statement [94] *((signed word*)(struct $5*) main::d1#0 + (byte) 1) ← (signed word)(byte) $70<<(const byte) F [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [95] *((signed byte*)(struct $5*) main::d1#0 + (byte) 5) ← (signed byte)(byte) main::i#17 [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [96] *((signed byte*)(struct $5*) main::d1#0 + (byte) 7) ← (signed byte) 1 [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [97] *((signed word*)(struct $5*) main::d1#0 + (byte) 3) ← (signed word)(byte) $18<<(const byte) F [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [98] *((signed byte*)(struct $5*) main::d1#0 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [99] *((signed byte*)(struct $5*) main::d1#0 + (byte) 8) ← (signed byte) 1 [ main::i#17 main::type#10 ] ( [ main::i#17 main::type#10 ] { } ) always clobbers reg byte a reg byte y +Statement [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 [ main::c#11 main::$111 ] ( [ main::c#11 main::$111 ] { } ) always clobbers reg byte a +Statement [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 [ main::c#11 main::$111 main::$112 ] ( [ main::c#11 main::$111 main::$112 ] { } ) always clobbers reg byte a +Statement [103] *((byte*~) main::$112) ← *((byte*~) main::$111) [ main::c#11 ] ( [ main::c#11 ] { } ) always clobbers reg byte a reg byte y +Statement [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 [ main::c#10 main::$109 ] ( [ main::c#10 main::$109 ] { } ) always clobbers reg byte a +Statement [106] *((byte*~) main::$109) ← (byte) $20 [ main::c#10 ] ( [ main::c#10 ] { } ) always clobbers reg byte a reg byte y +Statement [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 [ main::c#10 main::$110 ] ( [ main::c#10 main::$110 ] { } ) always clobbers reg byte a +Statement [108] *((byte*~) main::$110) ← (byte) $e [ main::c#10 ] ( [ main::c#10 ] { } ) always clobbers reg byte a reg byte y +Statement [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff [ main::i#14 ] ( [ main::i#14 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::i#14 main::i#4 ] +Statement [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff [ main::i#12 ] ( [ main::i#12 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#12 main::i#2 ] +Statement [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff [ DelSprite::sn#0 ] ( DelSprite:52 [ main::c#18 main::objects#15 DelSprite::sn#0 ] { { DelSprite::sn#0 = main::objects#15 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:24 [ DelSprite::sn#0 ] +Statement [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop [ ] ( DelSprite:52 [ main::c#18 main::objects#15 ] { { DelSprite::sn#0 = main::objects#15 } } ) always clobbers reg byte a +Statement [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a [ Print00::v#1 Print00::c#2 ] ( Print00:55 [ main::objects#17 main::c#18 main::stopIt#15 main::oCount#20 Print00::v#1 Print00::c#2 ] { { Print00::v0#0 = main::objects#17 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:19 [ Print00::c#5 Print00::c#2 ] +Statement [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 [ GetSprite::t0#3 ] ( GetSprite:57 [ main::stopIt#5 main::oCount#17 main::objects#1 GetSprite::t0#3 ] { { GetSprite::return#2 = GetSprite::return#4 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:22 [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] +Statement [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 [ GetSprite::t0#3 ] ( GetSprite:57 [ main::stopIt#5 main::oCount#17 main::objects#1 GetSprite::t0#3 ] { { GetSprite::return#2 = GetSprite::return#4 } } ) always clobbers reg byte a +Statement [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 [ AddSprite::sn#1 ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 AddSprite::sn#1 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:27 [ AddSprite::sn#1 ] +Statement [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 [ AddSprite::sn#1 AddSprite::t0#3 ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 AddSprite::sn#1 AddSprite::t0#3 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:23 [ AddSprite::t0#3 AddSprite::t0#2 ] +Statement [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 [ AddSprite::sn#1 AddSprite::t0#3 ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 AddSprite::sn#1 AddSprite::t0#3 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 [ ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 [ ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff [ ] ( [ ] { } ) always clobbers reg byte a +Statement [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC [ ] ( [ ] { } ) always clobbers reg byte a +Statement [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) [ ] ( [ ] { } ) always clobbers reg byte a +Statement [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC [ ] ( [ ] { } ) always clobbers reg byte a +Statement [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) [ ] ( [ ] { } ) always clobbers reg byte a +Statement [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC [ ] ( [ ] { } ) always clobbers reg byte a +Statement [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) [ ] ( [ ] { } ) always clobbers reg byte a +Statement [17] if((word) main::c#10<(word) $3e8) goto main::@7 [ main::c#10 ] ( [ main::c#10 ] { } ) always clobbers reg byte a +Statement [18] *((byte*) 1) ← (byte) $33 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [20] if((word) main::c#11<(word) $7f8) goto main::@9 [ main::c#11 ] ( [ main::c#11 ] { } ) always clobbers reg byte a +Statement [21] *((byte*) 1) ← (byte) $35 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' [ ] ( [ ] { } ) always clobbers reg byte a +Statement [39] if((byte) main::i#22<(byte) main::objects#9) goto main::@18 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a +Statement [41] if((word) main::c#7<(byte) $e) goto main::@33 [ main::objects#9 main::stopIt#5 main::oCount#17 main::c#7 ] ( [ main::objects#9 main::stopIt#5 main::oCount#17 main::c#7 ] { } ) always clobbers reg byte a +Statement [42] if((byte) 0!=(byte) main::stopIt#5) goto main::@33 [ main::objects#9 main::stopIt#5 main::oCount#17 ] ( [ main::objects#9 main::stopIt#5 main::oCount#17 ] { } ) always clobbers reg byte a +Statement [43] if((byte) main::objects#9<(const byte) maxDrawObjects) goto main::@31 [ main::objects#9 main::stopIt#5 main::oCount#17 ] ( [ main::objects#9 main::stopIt#5 main::oCount#17 ] { } ) always clobbers reg byte a +Statement [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 [ main::stopIt#5 main::oCount#17 main::c#18 main::objects#12 ] ( [ main::stopIt#5 main::oCount#17 main::c#18 main::objects#12 ] { } ) always clobbers reg byte a +Statement [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#2 ] ( [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#2 ] { } ) always clobbers reg byte a +Statement [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#7 ] ( [ main::stopIt#5 main::c#18 main::objects#12 main::oCount#7 ] { } ) always clobbers reg byte a +Statement [49] if((byte) main::objects#12>(byte) 0) goto main::@38 [ main::c#18 main::objects#12 ] ( [ main::c#18 main::objects#12 ] { } ) always clobbers reg byte a +Statement [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { } ) always clobbers reg byte a +Statement [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { } ) always clobbers reg byte a +Statement [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { } ) always clobbers reg byte a +Statement [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) [ main::stopIt#5 main::oCount#17 main::objects#1 ] ( [ main::stopIt#5 main::oCount#17 main::objects#1 ] { } ) always clobbers reg byte a +Statement [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [71] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>(signed word)(byte) $f8<<(const byte) F) goto main::@22 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [72] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>=(signed word)(byte) $18<<(const byte) F) goto main::@23 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [73] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [74] *((signed word*)(struct $5*) main::d#10 + (byte) 1) ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) + *((signed byte*)(struct $5*) main::d#10 + (byte) 5) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [75] *((signed word*)(struct $5*) main::d#10 + (byte) 3) ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) + *((signed byte*)(struct $5*) main::d#10 + (byte) 6) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [76] if(*((const byte*) cmRF + (byte) main::i#22)>=(byte) $80) goto main::@24 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$27 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$27 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$28 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 main::$28 ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [82] (struct $5*) main::d#2 ← (struct $5*) main::d#10 + (byte) 9 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#2 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#2 ] { } ) always clobbers reg byte a +Statement [84] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) -1<<(const byte) F [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [85] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) 1 [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] ( [ main::objects#9 main::c#16 main::stopIt#5 main::oCount#17 main::i#22 main::d#10 ] { } ) always clobbers reg byte a reg byte y +Statement [86] (byte~) main::$132 ← (byte) main::i#17 << (byte) 3 [ main::i#17 main::type#4 main::$132 ] ( [ main::i#17 main::type#4 main::$132 ] { } ) always clobbers reg byte a +Statement [87] (byte~) main::$52 ← (byte~) main::$132 + (byte) main::i#17 [ main::i#17 main::type#4 main::$52 ] ( [ main::i#17 main::type#4 main::$52 ] { } ) always clobbers reg byte a +Statement [88] (struct $5*) main::d1#0 ← (const struct $5*) dTab + (byte~) main::$52 [ main::i#17 main::type#4 main::d1#0 ] ( [ main::i#17 main::type#4 main::d1#0 ] { } ) always clobbers reg byte a +Statement [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 [ main::i#17 main::type#4 main::d1#0 ] ( [ main::i#17 main::type#4 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [94] *((signed word*)(struct $5*) main::d1#0 + (byte) 1) ← (signed word)(byte) $70<<(const byte) F [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [95] *((signed byte*)(struct $5*) main::d1#0 + (byte) 5) ← (signed byte)(byte) main::i#17 [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [96] *((signed byte*)(struct $5*) main::d1#0 + (byte) 7) ← (signed byte) 1 [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [97] *((signed word*)(struct $5*) main::d1#0 + (byte) 3) ← (signed word)(byte) $18<<(const byte) F [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [98] *((signed byte*)(struct $5*) main::d1#0 + (byte) 6) ← (signed byte)(byte) 1<<(const byte) F [ main::i#17 main::type#10 main::d1#0 ] ( [ main::i#17 main::type#10 main::d1#0 ] { } ) always clobbers reg byte a reg byte y +Statement [99] *((signed byte*)(struct $5*) main::d1#0 + (byte) 8) ← (signed byte) 1 [ main::i#17 main::type#10 ] ( [ main::i#17 main::type#10 ] { } ) always clobbers reg byte a reg byte y +Statement [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 [ main::c#11 main::$111 ] ( [ main::c#11 main::$111 ] { } ) always clobbers reg byte a +Statement [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 [ main::c#11 main::$111 main::$112 ] ( [ main::c#11 main::$111 main::$112 ] { } ) always clobbers reg byte a +Statement [103] *((byte*~) main::$112) ← *((byte*~) main::$111) [ main::c#11 ] ( [ main::c#11 ] { } ) always clobbers reg byte a reg byte y +Statement [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 [ main::c#10 main::$109 ] ( [ main::c#10 main::$109 ] { } ) always clobbers reg byte a +Statement [106] *((byte*~) main::$109) ← (byte) $20 [ main::c#10 ] ( [ main::c#10 ] { } ) always clobbers reg byte a reg byte y +Statement [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 [ main::c#10 main::$110 ] ( [ main::c#10 main::$110 ] { } ) always clobbers reg byte a +Statement [108] *((byte*~) main::$110) ← (byte) $e [ main::c#10 ] ( [ main::c#10 ] { } ) always clobbers reg byte a reg byte y +Statement [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff [ main::i#14 ] ( [ main::i#14 ] { } ) always clobbers reg byte a +Statement [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff [ main::i#12 ] ( [ main::i#12 ] { } ) always clobbers reg byte a +Statement [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff [ DelSprite::sn#0 ] ( DelSprite:52 [ main::c#18 main::objects#15 DelSprite::sn#0 ] { { DelSprite::sn#0 = main::objects#15 } } ) always clobbers reg byte a +Statement [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop [ ] ( DelSprite:52 [ main::c#18 main::objects#15 ] { { DelSprite::sn#0 = main::objects#15 } } ) always clobbers reg byte a +Statement [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a [ Print00::v#1 Print00::c#2 ] ( Print00:55 [ main::objects#17 main::c#18 main::stopIt#15 main::oCount#20 Print00::v#1 Print00::c#2 ] { { Print00::v0#0 = main::objects#17 } } ) always clobbers reg byte a +Statement [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 [ GetSprite::t0#3 ] ( GetSprite:57 [ main::stopIt#5 main::oCount#17 main::objects#1 GetSprite::t0#3 ] { { GetSprite::return#2 = GetSprite::return#4 } } ) always clobbers reg byte a +Statement [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 [ GetSprite::t0#3 ] ( GetSprite:57 [ main::stopIt#5 main::oCount#17 main::objects#1 GetSprite::t0#3 ] { { GetSprite::return#2 = GetSprite::return#4 } } ) always clobbers reg byte a +Statement [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 [ AddSprite::sn#1 ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 AddSprite::sn#1 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 [ AddSprite::sn#1 AddSprite::t0#3 ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 AddSprite::sn#1 AddSprite::t0#3 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 [ AddSprite::sn#1 AddSprite::t0#3 ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 AddSprite::sn#1 AddSprite::t0#3 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 [ ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Statement [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 [ ] ( AddSprite:62 [ main::stopIt#5 main::oCount#17 main::objects#1 main::i#11 ] { { AddSprite::sn#1 = main::i#11 } } ) always clobbers reg byte a +Potential registers zp[1]:2 [ main::i#12 main::i#2 ] : zp[1]:2 , reg byte x , reg byte y , +Potential registers zp[1]:3 [ main::i#14 main::i#4 ] : zp[1]:3 , reg byte x , reg byte y , +Potential registers zp[2]:4 [ main::c#10 main::c#2 ] : zp[2]:4 , +Potential registers zp[2]:6 [ main::c#11 main::c#4 ] : zp[2]:6 , +Potential registers zp[1]:8 [ main::i#17 main::i#7 ] : zp[1]:8 , reg byte x , +Potential registers zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] : zp[1]:9 , reg byte x , +Potential registers zp[2]:10 [ main::c#16 main::c#18 main::c#7 ] : zp[2]:10 , +Potential registers zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] : zp[1]:12 , +Potential registers zp[1]:13 [ main::i#22 main::i#9 ] : zp[1]:13 , +Potential registers zp[2]:14 [ main::d#10 main::d#2 ] : zp[2]:14 , +Potential registers zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] : zp[1]:16 , +Potential registers zp[2]:17 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] : zp[2]:17 , +Potential registers zp[1]:19 [ Print00::c#5 Print00::c#2 ] : zp[1]:19 , reg byte x , reg byte y , +Potential registers zp[1]:20 [ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] : zp[1]:20 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:21 [ Print00::c#10 Print00::c#4 ] : zp[1]:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:22 [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] : zp[1]:22 , reg byte x , reg byte y , +Potential registers zp[1]:23 [ AddSprite::t0#3 AddSprite::t0#2 ] : zp[1]:23 , reg byte x , reg byte y , +Potential registers zp[1]:24 [ DelSprite::sn#0 ] : zp[1]:24 , reg byte x , reg byte y , +Potential registers zp[1]:25 [ GetSprite::return#4 ] : zp[1]:25 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:26 [ main::i#11 ] : zp[1]:26 , reg byte x , reg byte y , +Potential registers zp[1]:27 [ AddSprite::sn#1 ] : zp[1]:27 , reg byte x , reg byte y , +Potential registers zp[2]:28 [ main::$27 ] : zp[2]:28 , +Potential registers zp[2]:30 [ main::$28 ] : zp[2]:30 , +Potential registers zp[1]:32 [ main::$132 ] : zp[1]:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:33 [ main::$52 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:34 [ main::d1#0 ] : zp[2]:34 , +Potential registers zp[2]:36 [ main::$111 ] : zp[2]:36 , +Potential registers zp[2]:38 [ main::$112 ] : zp[2]:38 , +Potential registers zp[2]:40 [ main::$109 ] : zp[2]:40 , +Potential registers zp[2]:42 [ main::$110 ] : zp[2]:42 , + +REGISTER UPLIFT SCOPES +Uplift Scope [Print00] 57,645.92: zp[1]:20 [ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] 20,052.5: zp[1]:19 [ Print00::c#5 Print00::c#2 ] 20,052.5: zp[1]:21 [ Print00::c#10 Print00::c#4 ] +Uplift Scope [GetSprite] 30,090.83: zp[1]:22 [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] 22: zp[1]:25 [ GetSprite::return#4 ] +Uplift Scope [AddSprite] 30,028.25: zp[1]:23 [ AddSprite::t0#3 AddSprite::t0#2 ] 59.29: zp[1]:27 [ AddSprite::sn#1 ] +Uplift Scope [main] 237.35: zp[1]:13 [ main::i#22 main::i#9 ] 111.63: zp[2]:14 [ main::d#10 main::d#2 ] 101: zp[2]:28 [ main::$27 ] 101: zp[2]:30 [ main::$28 ] 52.46: zp[2]:17 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] 44.67: zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] 36.67: zp[1]:2 [ main::i#12 main::i#2 ] 36.67: zp[1]:3 [ main::i#14 main::i#4 ] 33: zp[2]:6 [ main::c#11 main::c#4 ] 31.17: zp[2]:4 [ main::c#10 main::c#2 ] 25.44: zp[1]:8 [ main::i#17 main::i#7 ] 22: zp[1]:32 [ main::$132 ] 22: zp[1]:33 [ main::$52 ] 22: zp[2]:38 [ main::$112 ] 22: zp[2]:40 [ main::$109 ] 22: zp[2]:42 [ main::$110 ] 19.33: zp[2]:10 [ main::c#16 main::c#18 main::c#7 ] 19.25: zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] 15.71: zp[1]:26 [ main::i#11 ] 11: zp[2]:36 [ main::$111 ] 8.12: zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] 1: zp[2]:34 [ main::d1#0 ] +Uplift Scope [DelSprite] 106.5: zp[1]:24 [ DelSprite::sn#0 ] +Uplift Scope [$0] +Uplift Scope [$1] +Uplift Scope [$2] +Uplift Scope [$3] +Uplift Scope [$4] +Uplift Scope [$5] +Uplift Scope [] + +Uplifting [Print00] best 71507 combination reg byte x [ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] reg byte y [ Print00::c#5 Print00::c#2 ] reg byte y [ Print00::c#10 Print00::c#4 ] +Uplifting [GetSprite] best 70211 combination reg byte x [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] reg byte x [ GetSprite::return#4 ] +Uplifting [AddSprite] best 68968 combination reg byte y [ AddSprite::t0#3 AddSprite::t0#2 ] reg byte x [ AddSprite::sn#1 ] +Uplifting [main] best 68548 combination zp[1]:13 [ main::i#22 main::i#9 ] zp[2]:14 [ main::d#10 main::d#2 ] zp[2]:28 [ main::$27 ] zp[2]:30 [ main::$28 ] zp[2]:17 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] reg byte x [ main::i#12 main::i#2 ] reg byte x [ main::i#14 main::i#4 ] zp[2]:6 [ main::c#11 main::c#4 ] zp[2]:4 [ main::c#10 main::c#2 ] reg byte x [ main::i#17 main::i#7 ] zp[1]:32 [ main::$132 ] reg byte a [ main::$52 ] zp[2]:38 [ main::$112 ] zp[2]:40 [ main::$109 ] zp[2]:42 [ main::$110 ] zp[2]:10 [ main::c#16 main::c#18 main::c#7 ] zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] zp[1]:26 [ main::i#11 ] zp[2]:36 [ main::$111 ] zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] zp[2]:34 [ main::d1#0 ] +Limited combination testing to 100 combinations of 1728 possible. +Uplifting [DelSprite] best 68512 combination reg byte x [ DelSprite::sn#0 ] +Uplifting [$0] best 68512 combination +Uplifting [$1] best 68512 combination +Uplifting [$2] best 68512 combination +Uplifting [$3] best 68512 combination +Uplifting [$4] best 68512 combination +Uplifting [$5] best 68512 combination +Uplifting [] best 68512 combination +Attempting to uplift remaining variables inzp[1]:13 [ main::i#22 main::i#9 ] +Uplifting [main] best 68512 combination zp[1]:13 [ main::i#22 main::i#9 ] +Attempting to uplift remaining variables inzp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Uplifting [main] best 68512 combination zp[1]:16 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Attempting to uplift remaining variables inzp[1]:32 [ main::$132 ] +Uplifting [main] best 68492 combination reg byte a [ main::$132 ] +Attempting to uplift remaining variables inzp[1]:9 [ main::type#4 main::type#10 main::type#2 ] +Uplifting [main] best 68492 combination zp[1]:9 [ main::type#4 main::type#10 main::type#2 ] +Attempting to uplift remaining variables inzp[1]:26 [ main::i#11 ] +Uplifting [main] best 68282 combination reg byte x [ main::i#11 ] +Attempting to uplift remaining variables inzp[1]:12 [ main::stopIt#5 main::stopIt#15 ] +Uplifting [main] best 68282 combination zp[1]:12 [ main::stopIt#5 main::stopIt#15 ] +Allocated (was zp[2]:4) zp[2]:2 [ main::c#10 main::c#2 ] +Allocated (was zp[2]:6) zp[2]:4 [ main::c#11 main::c#4 ] +Allocated (was zp[1]:9) zp[1]:6 [ main::type#4 main::type#10 main::type#2 ] +Allocated (was zp[2]:10) zp[2]:7 [ main::c#16 main::c#18 main::c#7 ] +Allocated (was zp[1]:12) zp[1]:9 [ main::stopIt#5 main::stopIt#15 ] +Allocated (was zp[1]:13) zp[1]:10 [ main::i#22 main::i#9 ] +Allocated (was zp[2]:14) zp[2]:11 [ main::d#10 main::d#2 ] +Allocated (was zp[1]:16) zp[1]:13 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +Allocated (was zp[2]:17) zp[2]:14 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] +Allocated (was zp[2]:28) zp[2]:16 [ main::$27 ] +Allocated (was zp[2]:30) zp[2]:18 [ main::$28 ] +Allocated (was zp[2]:34) zp[2]:20 [ main::d1#0 ] +Allocated (was zp[2]:36) zp[2]:22 [ main::$111 ] +Allocated (was zp[2]:38) zp[2]:24 [ main::$112 ] +Allocated (was zp[2]:40) zp[2]:26 [ main::$109 ] +Allocated (was zp[2]:42) zp[2]:28 [ main::$110 ] + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +// bubbles64 - Q&D C64 port of the bubbles demo from vbcc6502's NES exmaples +// Coded by Lazycow +// Source https://www.lemon64.com/forum/viewtopic.php?t=75283&start=15 + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .const lfMC = $10 + .const rfDrop = $fe + .const maxSprites = $20 + .const maxSprImages = 8 + .const maxC64Images = $100 + .const sprOff = $40 + .const maxDrawObjects = $18 + .const F = 3 + // main +// +// +main: { + .label __27 = $10 + .label __28 = $12 + // main loop + .label c = 2 + // main loop + .label c_1 = 4 + .label d1 = $14 + // setup bubbles + .label type = 6 + // main loop + .label c_2 = 7 + .label d = $b + .label i = $a + .label objects = $d + // 1 == preallocate 20 sprites (only for better benchmarking) + // 0 == allocate sprites on the fly (prefered) + .label oCount = $e + .label stopIt = 9 + .label __109 = $1a + .label __110 = $1c + .label __111 = $16 + .label __112 = $18 + // [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff -- _deref_pbuc1=vbuc2 + // setup sprite images + lda #sprOff + sta lcSprMapTab + // [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #sprOff+1 + sta lcSprMapTab+1 + // [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 -- _deref_pbuc1=vbuc2 + lda #sprOff+2 + sta lcSprMapTab+2 + // [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 -- _deref_pbuc1=vbuc2 + lda #sprOff+3 + sta lcSprMapTab+3 + // [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 -- _deref_pbuc1=vbuc2 + lda #sprOff+4 + sta lcSprMapTab+4 + // [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 -- _deref_pbuc1=vbuc2 + lda #sprOff+5 + sta lcSprMapTab+5 + // [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #$a|lfMC + sta lcSprColTab+sprOff+1 + // [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) -- _deref_pbuc1=_deref_pbuc2 + // setup sprite colors + flags + lda lcSprColTab+sprOff+1 + sta lcSprColTab+sprOff + // [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #5|lfMC + sta lcSprColTab+sprOff+3 + // [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) -- _deref_pbuc1=_deref_pbuc2 + lda lcSprColTab+sprOff+3 + sta lcSprColTab+sprOff+2 + // [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #$e|lfMC + sta lcSprColTab+sprOff+5 + // [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) -- _deref_pbuc1=_deref_pbuc2 + lda lcSprColTab+sprOff+5 + sta lcSprColTab+sprOff+4 + // [12] phi from main to main::@2 [phi:main->main::@2] + __b2_from_main: + // [12] phi (byte) main::i#12 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b2 + // main::@2 + __b2: + // [13] if((byte) main::i#12<(const byte) maxSprites+(byte) 1) goto main::@3 -- vbuxx_lt_vbuc1_then_la1 + cpx #maxSprites+1 + bcc __b3 + // [14] phi from main::@2 to main::@4 [phi:main::@2->main::@4] + __b4_from___b2: + // [14] phi (byte) main::i#14 = (byte) 0 [phi:main::@2->main::@4#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b4 + // clear (i)ndex (t)able + // main::@4 + __b4: + // [15] if((byte) main::i#14<(const byte) maxSprites) goto main::@5 -- vbuxx_lt_vbuc1_then_la1 + cpx #maxSprites + bcc __b5 + // [16] phi from main::@4 to main::@6 [phi:main::@4->main::@6] + __b6_from___b4: + // [16] phi (word) main::c#10 = (byte) 0 [phi:main::@4->main::@6#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c + lda #>0 + sta.z c+1 + jmp __b6 + // main::@6 + __b6: + // [17] if((word) main::c#10<(word) $3e8) goto main::@7 -- vwuz1_lt_vwuc1_then_la1 + lda.z c+1 + cmp #>$3e8 + bcc __b7 + bne !+ + lda.z c + cmp #<$3e8 + bcc __b7 + !: + jmp __b39 + // main::@39 + __b39: + // [18] *((byte*) 1) ← (byte) $33 -- _deref_pbuc1=vbuc2 + // install IRQ + lda #$33 + sta 1 + // [19] phi from main::@39 to main::@8 [phi:main::@39->main::@8] + __b8_from___b39: + // [19] phi (word) main::c#11 = (byte) 0 [phi:main::@39->main::@8#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c_1 + lda #>0 + sta.z c_1+1 + jmp __b8 + // now it's save to change "01" + // main::@8 + __b8: + // [20] if((word) main::c#11<(word) $7f8) goto main::@9 -- vwuz1_lt_vwuc1_then_la1 + lda.z c_1+1 + cmp #>$7f8 + bcc __b9 + bne !+ + lda.z c_1 + cmp #<$7f8 + bcc __b9 + !: + jmp __b10 + // main::@10 + __b10: + // [21] *((byte*) 1) ← (byte) $35 -- _deref_pbuc1=vbuc2 + lda #$35 + sta 1 + // [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + lda #3 + ora $d000+$d02 + sta $d000+$d02 + // [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + lda #3^$ff + and $d000+$d00 + sta $d000+$d00 + jmp __b11 + // main::@11 + __b11: + // [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'P'-'A'+1 + sta $e000+$3e5 + // [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 -- _deref_pbuc1=vbuc2 + lda #1 + sta $e000+$3e6 + // [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'L'-'A'+1 + sta $e000+$3e7 + jmp __b1 + // main::@1 + __b1: + // [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf + // [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'U'-'A'+1 + sta $e000+$3cf+1 + // [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf+2 + // [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf+3 + // [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'L'-'A'+1 + sta $e000+$3cf+4 + // [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'E'-'A'+1 + sta $e000+$3cf+5 + // [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'S'-'A'+1 + sta $e000+$3cf+6 + // [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' -- _deref_pbuc1=vbuc2 + lda #':' + sta $e000+$3cf+7 + // [35] phi from main::@1 to main::@12 [phi:main::@1->main::@12] + __b12_from___b1: + // [35] phi (byte) main::type#4 = (byte) 0 [phi:main::@1->main::@12#0] -- vbuz1=vbuc1 + lda #0 + sta.z type + // [35] phi (byte) main::i#17 = (byte) 0 [phi:main::@1->main::@12#1] -- vbuxx=vbuc1 + ldx #0 + jmp __b12 + // main::@12 + __b12: + // [36] if((byte) main::i#17<(const byte) maxDrawObjects) goto main::@13 -- vbuxx_lt_vbuc1_then_la1 + cpx #maxDrawObjects + bcc __b13 + // [37] phi from main::@12 to main::@16 [phi:main::@12->main::@16] + __b16_from___b12: + // [37] phi (word) main::oCount#17 = (word) 0 [phi:main::@12->main::@16#0] -- vwuz1=vwuc1 + lda #<0 + sta.z oCount + lda #>0 + sta.z oCount+1 + // [37] phi (byte) main::stopIt#5 = (byte) 0 [phi:main::@12->main::@16#1] -- vbuz1=vbuc1 + lda #0 + sta.z stopIt + // [37] phi (word) main::c#16 = (byte) 0 [phi:main::@12->main::@16#2] -- vwuz1=vbuc1 + lda #<0 + sta.z c_2 + lda #>0 + sta.z c_2+1 + // [37] phi (byte) main::objects#9 = (byte) 0 [phi:main::@12->main::@16#3] -- vbuz1=vbuc1 + lda #0 + sta.z objects + jmp __b16 + // main::@16 + __b16: + // [38] phi from main::@16 to main::@17 [phi:main::@16->main::@17] + __b17_from___b16: + // [38] phi (struct $5*) main::d#10 = (const struct $5*) dTab [phi:main::@16->main::@17#0] -- pssz1=pssc1 + lda #dTab + sta.z d+1 + // [38] phi (byte) main::i#22 = (byte) 0 [phi:main::@16->main::@17#1] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b17 + // move objects + // main::@17 + __b17: + // [39] if((byte) main::i#22<(byte) main::objects#9) goto main::@18 -- vbuz1_lt_vbuz2_then_la1 + lda.z i + cmp.z objects + bcc __b18 + jmp __b19 + // main::@19 + __b19: + // [40] (word) main::c#7 ← (word) main::c#16 + (byte) 1 -- vwuz1=vwuz1_plus_1 + // activate new bubble? + inc.z c_2 + bne !+ + inc.z c_2+1 + !: + // [41] if((word) main::c#7<(byte) $e) goto main::@33 -- vwuz1_lt_vbuc1_then_la1 + lda.z c_2+1 + cmp #>$e + bcc __b33_from___b19 + bne !+ + lda.z c_2 + cmp #<$e + bcc __b33_from___b19 + !: + jmp __b30 + // main::@30 + __b30: + // [42] if((byte) 0!=(byte) main::stopIt#5) goto main::@33 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z stopIt + bne __b33_from___b30 + jmp __b42 + // main::@42 + __b42: + // [43] if((byte) main::objects#9<(const byte) maxDrawObjects) goto main::@31 -- vbuz1_lt_vbuc1_then_la1 + lda.z objects + cmp #maxDrawObjects + bcc __b31 + // [44] phi from main::@42 main::@43 to main::@33 [phi:main::@42/main::@43->main::@33] + __b33_from___b42: + __b33_from___b43: + jmp __b33 + // [44] phi from main::@19 to main::@33 [phi:main::@19->main::@33] + __b33_from___b19: + // [44] phi (word) main::c#18 = (word) main::c#7 [phi:main::@19->main::@33#0] -- register_copy + // [44] phi (byte) main::objects#12 = (byte) main::objects#9 [phi:main::@19->main::@33#1] -- register_copy + jmp __b33 + // [44] phi from main::@30 main::@41 to main::@33 [phi:main::@30/main::@41->main::@33] + __b33_from___b30: + __b33_from___b41: + // [44] phi (word) main::c#18 = (byte) 0 [phi:main::@30/main::@41->main::@33#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c_2 + lda #>0 + sta.z c_2+1 + // [44] phi (byte) main::objects#12 = (byte) main::objects#9 [phi:main::@30/main::@41->main::@33#1] -- register_copy + jmp __b33 + // main::@33 + __b33: + jmp __b36 + // main::@36 + __b36: + // [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 -- vwuz1_le_0_then_la1 + lda.z oCount + bne !+ + lda.z oCount+1 + beq __b34_from___b36 + !: + jmp __b37 + // main::@37 + __b37: + // [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 -- vwuz1=vwuz1_minus_1 + lda.z oCount + sec + sbc #1 + sta.z oCount + lda.z oCount+1 + sbc #0 + sta.z oCount+1 + // [47] phi from main::@36 main::@37 to main::@34 [phi:main::@36/main::@37->main::@34] + __b34_from___b36: + __b34_from___b37: + // [47] phi (word) main::oCount#7 = (word) main::oCount#17 [phi:main::@36/main::@37->main::@34#0] -- register_copy + jmp __b34 + // main::@34 + __b34: + // [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 -- vwuz1_lt_vbuc1_then_la1 + lda.z oCount+1 + cmp #>2+1 + bcc __b35_from___b34 + bne !+ + lda.z oCount + cmp #<2+1 + bcc __b35_from___b34 + !: + jmp __b44 + // main::@44 + __b44: + // [49] if((byte) main::objects#12>(byte) 0) goto main::@38 -- vbuz1_gt_0_then_la1 + lda.z objects + bne __b38 + // [53] phi from main::@44 to main::@35 [phi:main::@44->main::@35] + __b35_from___b44: + jmp __b35 + // main::@38 + __b38: + // [50] (byte) main::objects#15 ← (byte) main::objects#12 - (byte) 1 -- vbuz1=vbuz1_minus_1 + dec.z objects + // [51] (byte) DelSprite::sn#0 ← (byte) main::objects#15 -- vbuxx=vbuz1 + ldx.z objects + // [52] call DelSprite + jsr DelSprite + // [53] phi from main::@38 to main::@35 [phi:main::@38->main::@35] + __b35_from___b38: + // [53] phi (word) main::oCount#20 = (byte) 0 [phi:main::@38->main::@35#0] -- vwuz1=vbuc1 + lda #<0 + sta.z oCount + lda #>0 + sta.z oCount+1 + // [53] phi (byte) main::stopIt#15 = (byte) 1 [phi:main::@38->main::@35#1] -- vbuz1=vbuc1 + lda #1 + sta.z stopIt + // [53] phi (byte) main::objects#17 = (byte) main::objects#15 [phi:main::@38->main::@35#2] -- register_copy + jmp __b35 + // [53] phi from main::@34 to main::@35 [phi:main::@34->main::@35] + __b35_from___b34: + // [53] phi (word) main::oCount#20 = (word) main::oCount#7 [phi:main::@34->main::@35#0] -- register_copy + // [53] phi (byte) main::stopIt#15 = (byte) main::stopIt#5 [phi:main::@34->main::@35#1] -- register_copy + // [53] phi (byte) main::objects#17 = (byte) main::objects#12 [phi:main::@34->main::@35#2] -- register_copy + jmp __b35 + // main::@35 + __b35: + // [54] (byte) Print00::v0#0 ← (byte) main::objects#17 -- vbuxx=vbuz1 + ldx.z objects + // [55] call Print00 + // [117] phi from main::@35 to Print00 [phi:main::@35->Print00] + Print00_from___b35: + jsr Print00 + // [37] phi from main::@35 to main::@16 [phi:main::@35->main::@16] + __b16_from___b35: + // [37] phi (word) main::oCount#17 = (word) main::oCount#20 [phi:main::@35->main::@16#0] -- register_copy + // [37] phi (byte) main::stopIt#5 = (byte) main::stopIt#15 [phi:main::@35->main::@16#1] -- register_copy + // [37] phi (word) main::c#16 = (word) main::c#18 [phi:main::@35->main::@16#2] -- register_copy + // [37] phi (byte) main::objects#9 = (byte) main::objects#17 [phi:main::@35->main::@16#3] -- register_copy + jmp __b16 + // main::@31 + __b31: + // [56] (byte) main::objects#1 ← (byte) main::objects#9 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z objects + // [57] call GetSprite + // [129] phi from main::@31 to GetSprite [phi:main::@31->GetSprite] + GetSprite_from___b31: + jsr GetSprite + // [58] (byte) GetSprite::return#4 ← (byte) GetSprite::return#2 + jmp __b40 + // main::@40 + __b40: + // [59] (byte) main::i#11 ← (byte) GetSprite::return#4 + jmp __b43 + // main::@43 + __b43: + // [60] if((byte) main::i#11<(byte) $80) goto main::@32 -- vbuxx_lt_vbuc1_then_la1 + cpx #$80 + bcc __b32 + jmp __b33_from___b43 + // main::@32 + __b32: + // [61] (byte) AddSprite::sn#1 ← (byte) main::i#11 + // [62] call AddSprite + jsr AddSprite + jmp __b41 + // main::@41 + __b41: + // [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRY,x + // [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda cmRY,x + sta cmRF,x + // [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda cmRF,x + sta cmRX,x + // [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda cmRX,x + sta cmSI,x + jmp __b33_from___b41 + // main::@18 + __b18: + // [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) -- pbsz1_derefidx_vbuc1=pbsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 + ldy #7 + lda (d),y + ldy #5 + tax + lda (d),y + sty.z $ff + stx.z $ff + clc + adc.z $ff + ldy.z $ff + sta (d),y + // [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 -- pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 + ldy #5 + lda (d),y + sec + sbc #-$20 + bvc !+ + eor #$80 + !: + bmi __b20 + jmp __b25 + // main::@25 + __b25: + // [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 -- pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 + ldy #5 + lda (d),y + sec + sbc #$20+1 + bvc !+ + eor #$80 + !: + bmi __b21 + jmp __b26 + // main::@26 + __b26: + // [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 -- pbsz1_derefidx_vbuc1=vbsc2 + lda #7 + tay + lda #-1 + sta (d),y + jmp __b21 + // main::@21 + __b21: + // [71] if(*((signed word*)(struct $5*) main::d#10 + (byte) 3)>(signed word)(byte) $f8<<(const byte) F) goto main::@22 -- pwsz1_derefidx_vbuc1_gt_vwsc2_then_la1 + ldy #3 + lda #<$f8<$f8<=(signed word)(byte) $18<<(const byte) F) goto main::@23 -- pwsz1_derefidx_vbuc1_ge_vwsc2_then_la1 + ldy #3 + lda (d),y + cmp #<$18<$18<=(byte) $80) goto main::@24 -- pbuc1_derefidx_vbuz1_ge_vbuc2_then_la1 + ldy.z i + lda cmRF,y + cmp #$80 + bcs __b24 + jmp __b29 + // main::@29 + __b29: + // [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) -- pbuc1_derefidx_vbuz1=_deref_pbuz2 + ldy #0 + lda (d),y + ldy.z i + sta cmSI,y + // [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F -- vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 + ldx #F + ldy #1 + lda (d),y + sta.z __27 + iny + lda (d),y + sta.z __27+1 + cpx #0 + beq !e+ + !: + lda.z __27+1 + cmp #$80 + ror.z __27+1 + ror.z __27 + dex + bne !- + !e: + // [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 -- pbuc1_derefidx_vbuz1=_byte_vwsz2 + ldy.z i + lda.z __27 + sta cmRX,y + // [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F -- vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 + ldx #F + ldy #3 + lda (d),y + sta.z __28 + iny + lda (d),y + sta.z __28+1 + cpx #0 + beq !e+ + !: + lda.z __28+1 + cmp #$80 + ror.z __28+1 + ror.z __28 + dex + bne !- + !e: + // [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 -- pbuc1_derefidx_vbuz1=_byte_vwsz2 + ldy.z i + lda.z __28 + sta cmRY,y + jmp __b24 + // main::@24 + __b24: + // [82] (struct $5*) main::d#2 ← (struct $5*) main::d#10 + (byte) 9 -- pssz1=pssz1_plus_vbuc1 + lda #9 + clc + adc.z d + sta.z d + bcc !+ + inc.z d+1 + !: + // [83] (byte) main::i#9 ← (byte) main::i#22 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z i + // [38] phi from main::@24 to main::@17 [phi:main::@24->main::@17] + __b17_from___b24: + // [38] phi (struct $5*) main::d#10 = (struct $5*) main::d#2 [phi:main::@24->main::@17#0] -- register_copy + // [38] phi (byte) main::i#22 = (byte) main::i#9 [phi:main::@24->main::@17#1] -- register_copy + jmp __b17 + // main::@22 + __b22: + // [84] *((signed byte*)(struct $5*) main::d#10 + (byte) 6) ← (signed byte)(byte) -1<<(const byte) F -- pbsz1_derefidx_vbuc1=vbsc2 + lda #6 + tay + lda #-1<dTab + adc #0 + sta.z d1+1 + // [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 -- _deref_pbuz1=vbuz2 + lda.z type + ldy #0 + sta (d1),y + // [90] (byte) main::type#2 ← (byte) main::type#4 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z type + // [91] if((byte) main::type#2<(byte) 6) goto main::@45 -- vbuz1_lt_vbuc1_then_la1 + lda.z type + cmp #6 + bcc __b45_from___b13 + // [93] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + __b14_from___b13: + // [93] phi (byte) main::type#10 = (byte) 0 [phi:main::@13->main::@14#0] -- vbuz1=vbuc1 + lda #0 + sta.z type + jmp __b14 + // [92] phi from main::@13 to main::@45 [phi:main::@13->main::@45] + __b45_from___b13: + jmp __b45 + // main::@45 + __b45: + // [93] phi from main::@45 to main::@14 [phi:main::@45->main::@14] + __b14_from___b45: + // [93] phi (byte) main::type#10 = (byte) main::type#2 [phi:main::@45->main::@14#0] -- register_copy + jmp __b14 + // main::@14 + __b14: + // [94] *((signed word*)(struct $5*) main::d1#0 + (byte) 1) ← (signed word)(byte) $70<<(const byte) F -- pwsz1_derefidx_vbuc1=vwsc2 + ldy #1 + lda #<$70<$70<$18<main::@12] + __b12_from___b15: + // [35] phi (byte) main::type#4 = (byte) main::type#10 [phi:main::@15->main::@12#0] -- register_copy + // [35] phi (byte) main::i#17 = (byte) main::i#7 [phi:main::@15->main::@12#1] -- register_copy + jmp __b12 + // main::@9 + __b9: + // [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c_1 + clc + adc #<$d000 + sta.z __111 + lda.z c_1+1 + adc #>$d000 + sta.z __111+1 + // [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c_1 + clc + adc #<$f800 + sta.z __112 + lda.z c_1+1 + adc #>$f800 + sta.z __112+1 + // [103] *((byte*~) main::$112) ← *((byte*~) main::$111) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (__111),y + ldy #0 + sta (__112),y + // [104] (word) main::c#4 ← (word) main::c#11 + (byte) 1 -- vwuz1=vwuz1_plus_1 + inc.z c_1 + bne !+ + inc.z c_1+1 + !: + // [19] phi from main::@9 to main::@8 [phi:main::@9->main::@8] + __b8_from___b9: + // [19] phi (word) main::c#11 = (word) main::c#4 [phi:main::@9->main::@8#0] -- register_copy + jmp __b8 + // main::@7 + __b7: + // [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c + clc + adc #<$e000 + sta.z __109 + lda.z c+1 + adc #>$e000 + sta.z __109+1 + // [106] *((byte*~) main::$109) ← (byte) $20 -- _deref_pbuz1=vbuc1 + lda #$20 + ldy #0 + sta (__109),y + // [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c + clc + adc #<$d800 + sta.z __110 + lda.z c+1 + adc #>$d800 + sta.z __110+1 + // [108] *((byte*~) main::$110) ← (byte) $e -- _deref_pbuz1=vbuc1 + lda #$e + ldy #0 + sta (__110),y + // [109] (word) main::c#2 ← (word) main::c#10 + (byte) 1 -- vwuz1=vwuz1_plus_1 + inc.z c + bne !+ + inc.z c+1 + !: + // [16] phi from main::@7 to main::@6 [phi:main::@7->main::@6] + __b6_from___b7: + // [16] phi (word) main::c#10 = (word) main::c#2 [phi:main::@7->main::@6#0] -- register_copy + jmp __b6 + // main::@5 + __b5: + // [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff -- pbuc1_derefidx_vbuxx=vbuc2 + lda #$ff + sta cmRF,x + // [111] (byte) main::i#4 ← (byte) main::i#14 + (byte) 1 -- vbuxx=vbuxx_plus_1 + inx + // [14] phi from main::@5 to main::@4 [phi:main::@5->main::@4] + __b4_from___b5: + // [14] phi (byte) main::i#14 = (byte) main::i#4 [phi:main::@5->main::@4#0] -- register_copy + jmp __b4 + // main::@3 + __b3: + // [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff -- pbuc1_derefidx_vbuxx=vbuc2 + lda #$ff + sta cmIT,x + // [113] (byte) main::i#2 ← (byte) main::i#12 + (byte) 1 -- vbuxx=vbuxx_plus_1 + inx + // [12] phi from main::@3 to main::@2 [phi:main::@3->main::@2] + __b2_from___b3: + // [12] phi (byte) main::i#12 = (byte) main::i#2 [phi:main::@3->main::@2#0] -- register_copy + jmp __b2 +} + // DelSprite +// DelSprite(byte register(X) sn) +DelSprite: { + // [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff -- pbuc1_derefidx_vbuxx=vbuc2 + // drop sprite, will be removed from IT in IRQ + lda #$ff + sta cmRY,x + // [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop -- pbuc1_derefidx_vbuxx=vbuc2 + lda #rfDrop + sta cmRF,x + jmp __breturn + // DelSprite::@return + __breturn: + // [116] return + rts +} + // Print00 +// Print00(byte register(X) v0) +Print00: { + // [118] phi from Print00 to Print00::@1 [phi:Print00->Print00::@1] + __b1_from_Print00: + // [118] phi (byte) Print00::c#5 = (byte) '0' [phi:Print00->Print00::@1#0] -- vbuyy=vbuc1 + ldy #'0' + // [118] phi (byte) Print00::v#3 = (byte) Print00::v0#0 [phi:Print00->Print00::@1#1] -- register_copy + jmp __b1 + // Print00::@1 + __b1: + // [119] if((byte) Print00::v#3>=(byte) $a) goto Print00::@2 -- vbuxx_ge_vbuc1_then_la1 + cpx #$a + bcs __b2 + jmp __b3 + // Print00::@3 + __b3: + // [120] *((word) $e000+(byte*) 983) ← (byte) Print00::c#5 -- _deref_pbuc1=vbuyy + sty $e000+$3d7 + // [121] phi from Print00::@3 to Print00::@4 [phi:Print00::@3->Print00::@4] + __b4_from___b3: + // [121] phi (byte) Print00::c#10 = (byte) '0' [phi:Print00::@3->Print00::@4#0] -- vbuyy=vbuc1 + ldy #'0' + // [121] phi (byte) Print00::v#5 = (byte) Print00::v#3 [phi:Print00::@3->Print00::@4#1] -- register_copy + jmp __b4 + // Print00::@4 + __b4: + // [122] if((byte) Print00::v#5>=(byte) 1) goto Print00::@5 -- vbuxx_ge_vbuc1_then_la1 + cpx #1 + bcs __b5 + jmp __b6 + // Print00::@6 + __b6: + // [123] *((word) $e000+(byte*) 983+(byte) 1) ← (byte) Print00::c#10 -- _deref_pbuc1=vbuyy + sty $e000+$3d7+1 + jmp __breturn + // Print00::@return + __breturn: + // [124] return + rts + // Print00::@5 + __b5: + // [125] (byte) Print00::c#4 ← ++ (byte) Print00::c#10 -- vbuyy=_inc_vbuyy + iny + // [126] (byte) Print00::v#2 ← (byte) Print00::v#5 - (byte) 1 -- vbuxx=vbuxx_minus_1 + dex + // [121] phi from Print00::@5 to Print00::@4 [phi:Print00::@5->Print00::@4] + __b4_from___b5: + // [121] phi (byte) Print00::c#10 = (byte) Print00::c#4 [phi:Print00::@5->Print00::@4#0] -- register_copy + // [121] phi (byte) Print00::v#5 = (byte) Print00::v#2 [phi:Print00::@5->Print00::@4#1] -- register_copy + jmp __b4 + // Print00::@2 + __b2: + // [127] (byte) Print00::c#2 ← ++ (byte) Print00::c#5 -- vbuyy=_inc_vbuyy + iny + // [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a -- vbuxx=vbuxx_minus_vbuc1 + txa + axs #$a + // [118] phi from Print00::@2 to Print00::@1 [phi:Print00::@2->Print00::@1] + __b1_from___b2: + // [118] phi (byte) Print00::c#5 = (byte) Print00::c#2 [phi:Print00::@2->Print00::@1#0] -- register_copy + // [118] phi (byte) Print00::v#3 = (byte) Print00::v#1 [phi:Print00::@2->Print00::@1#1] -- register_copy + jmp __b1 +} + // GetSprite +// sprite support functions +// +GetSprite: { + // [130] phi from GetSprite to GetSprite::@1 [phi:GetSprite->GetSprite::@1] + __b1_from_GetSprite: + // [130] phi (byte) GetSprite::t0#3 = (byte) 0 [phi:GetSprite->GetSprite::@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b1 + // GetSprite::@1 + __b1: + // [131] if((byte) GetSprite::t0#3<(const byte) maxSprites) goto GetSprite::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #maxSprites + bcc __b2 + // [132] phi from GetSprite::@1 to GetSprite::@return [phi:GetSprite::@1->GetSprite::@return] + __breturn_from___b1: + // [132] phi (byte) GetSprite::return#2 = (byte) $ff [phi:GetSprite::@1->GetSprite::@return#0] -- vbuxx=vbuc1 + ldx #$ff + jmp __breturn + // GetSprite::@return + __breturn: + // [133] return + rts + // GetSprite::@2 + __b2: + // [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 -- pbuc1_derefidx_vbuxx_lt_vbuc2_then_la1 + lda cmRF,x + cmp #rfDrop + bcc __b3 + jmp __b4 + // GetSprite::@4 + __b4: + // [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRF,x + // [132] phi from GetSprite::@4 to GetSprite::@return [phi:GetSprite::@4->GetSprite::@return] + __breturn_from___b4: + // [132] phi (byte) GetSprite::return#2 = (byte) GetSprite::t0#3 [phi:GetSprite::@4->GetSprite::@return#0] -- register_copy + jmp __breturn + // GetSprite::@3 + __b3: + // [136] (byte) GetSprite::t0#2 ← ++ (byte) GetSprite::t0#3 -- vbuxx=_inc_vbuxx + inx + // [130] phi from GetSprite::@3 to GetSprite::@1 [phi:GetSprite::@3->GetSprite::@1] + __b1_from___b3: + // [130] phi (byte) GetSprite::t0#3 = (byte) GetSprite::t0#2 [phi:GetSprite::@3->GetSprite::@1#0] -- register_copy + jmp __b1 +} + // AddSprite +// AddSprite(byte register(X) sn) +AddSprite: { + // [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 -- vbuc1_eq_pbuc2_derefidx_vbuxx_then_la1 + lda cmRF,x + cmp #rfDrop + beq __b1 + // [138] phi from AddSprite to AddSprite::@2 [phi:AddSprite->AddSprite::@2] + __b2_from_AddSprite: + // [138] phi (byte) AddSprite::t0#3 = (byte) 0 [phi:AddSprite->AddSprite::@2#0] -- vbuyy=vbuc1 + ldy #0 + jmp __b2 + // AddSprite::@2 + __b2: + // [139] if((byte) AddSprite::t0#3<(const byte) maxSprites) goto AddSprite::@3 -- vbuyy_lt_vbuc1_then_la1 + cpy #maxSprites + bcc __b3 + jmp __breturn + // AddSprite::@return + __breturn: + // [140] return + rts + // AddSprite::@3 + __b3: + // [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 -- pbuc1_derefidx_vbuyy_lt_vbuc2_then_la1 + lda cmIT,y + cmp #$80 + bcc __b4 + jmp __b5 + // AddSprite::@5 + __b5: + // [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRF,x + // [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 -- pbuc1_derefidx_vbuyy=vbuxx + txa + sta cmIT,y + jmp __breturn + // AddSprite::@4 + __b4: + // [144] (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#3 + (byte) 1 -- vbuyy=vbuyy_plus_1 + iny + // [138] phi from AddSprite::@4 to AddSprite::@2 [phi:AddSprite::@4->AddSprite::@2] + __b2_from___b4: + // [138] phi (byte) AddSprite::t0#3 = (byte) AddSprite::t0#2 [phi:AddSprite::@4->AddSprite::@2#0] -- register_copy + jmp __b2 + // AddSprite::@1 + __b1: + // [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRF,x + jmp __breturn +} + // File Data + lcSprMapTab: .fill maxSprImages, 0 + lcSprColTab: .fill maxC64Images, 0 + cmIT: .fill maxSprites+1, 0 + cmSI: .fill maxSprites, 0 + cmRX: .fill maxSprites, 0 + cmRY: .fill maxSprites, 0 + cmRF: .fill maxSprites, 0 + dTab: .fill 9*maxDrawObjects, 0 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __b2 +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __b39 +Removing instruction jmp __b8 +Removing instruction jmp __b10 +Removing instruction jmp __b11 +Removing instruction jmp __b1 +Removing instruction jmp __b12 +Removing instruction jmp __b16 +Removing instruction jmp __b17 +Removing instruction jmp __b19 +Removing instruction jmp __b30 +Removing instruction jmp __b42 +Removing instruction jmp __b33 +Removing instruction jmp __b36 +Removing instruction jmp __b37 +Removing instruction jmp __b34 +Removing instruction jmp __b44 +Removing instruction jmp __b35 +Removing instruction jmp __b40 +Removing instruction jmp __b43 +Removing instruction jmp __b41 +Removing instruction jmp __b25 +Removing instruction jmp __b26 +Removing instruction jmp __b21 +Removing instruction jmp __b27 +Removing instruction jmp __b28 +Removing instruction jmp __b23 +Removing instruction jmp __b29 +Removing instruction jmp __b24 +Removing instruction jmp __b45 +Removing instruction jmp __b14 +Removing instruction jmp __b15 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b4 +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Removing instruction jmp __b5 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda lcSprColTab+sprOff+1 +Removing instruction lda lcSprColTab+sprOff+3 +Removing instruction lda lcSprColTab+sprOff+5 +Removing instruction lda #>0 +Removing instruction lda #>0 +Removing instruction lda #'B'-'A'+1 +Replacing instruction ldx #0 with TAX +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 lda #>0 +Removing instruction ldy #0 +Removing instruction ldy #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label __b33_from___b30 with __b33_from___b41 +Replacing label __b33 with __b36 +Replacing label __b33 with __b36 +Replacing label __b34_from___b36 with __b34 +Replacing label __b35_from___b34 with __b35 +Replacing label __b35_from___b34 with __b35 +Replacing label __b45_from___b13 with __b14 +Removing instruction __b17_from___b16: +Removing instruction __b33_from___b42: +Removing instruction __b33_from___b30: +Removing instruction __b33: +Removing instruction __b34_from___b36: +Removing instruction __b34_from___b37: +Removing instruction __b35_from___b34: +Removing instruction __b40: +Removing instruction __b45_from___b13: +Removing instruction __b45: +Removing instruction __b14_from___b45: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __b2_from_main: +Removing instruction __b4_from___b2: +Removing instruction __b6_from___b4: +Removing instruction __b39: +Removing instruction __b8_from___b39: +Removing instruction __b10: +Removing instruction __b11: +Removing instruction __b1: +Removing instruction __b12_from___b1: +Removing instruction __b16_from___b12: +Removing instruction __b19: +Removing instruction __b30: +Removing instruction __b42: +Removing instruction __b37: +Removing instruction __b44: +Removing instruction __b35_from___b44: +Removing instruction __b35_from___b38: +Removing instruction Print00_from___b35: +Removing instruction __b16_from___b35: +Removing instruction GetSprite_from___b31: +Removing instruction __b43: +Removing instruction __b41: +Removing instruction __b25: +Removing instruction __b26: +Removing instruction __b27: +Removing instruction __b28: +Removing instruction __b29: +Removing instruction __b17_from___b24: +Removing instruction __b14_from___b13: +Removing instruction __b15: +Removing instruction __b12_from___b15: +Removing instruction __b8_from___b9: +Removing instruction __b6_from___b7: +Removing instruction __b4_from___b5: +Removing instruction __b2_from___b3: +Removing instruction __breturn: +Removing instruction __b1_from_Print00: +Removing instruction __b3: +Removing instruction __b4_from___b3: +Removing instruction __b6: +Removing instruction __breturn: +Removing instruction __b4_from___b5: +Removing instruction __b1_from___b2: +Removing instruction __b1_from_GetSprite: +Removing instruction __breturn_from___b1: +Removing instruction __b4: +Removing instruction __breturn_from___b4: +Removing instruction __b1_from___b3: +Removing instruction __b2_from_AddSprite: +Removing instruction __b5: +Removing instruction __b2_from___b4: +Succesful ASM optimization Pass5UnusedLabelElimination +Skipping double jump to __b36 in bcc __b33_from___b19 +Skipping double jump to __b36 in bcc __b33_from___b19 +Skipping double jump to __b36 in jmp __b33_from___b43 +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __breturn +Replacing jump to rts with rts in jmp __breturn +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label __b33_from___b43 to __b1 +Relabelling long label __b33_from___b19 to __b10 +Relabelling long label __b33_from___b41 to __b11 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp __b35 +Removing instruction jmp __b14 +Succesful ASM optimization Pass5NextJumpElimination +Replacing instruction lda #0 with TYA +Removing instruction __b1: +Removing instruction __b10: +Removing instruction __breturn: +Removing instruction __breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Removing unreachable instruction jmp __b36 +Succesful ASM optimization Pass5UnreachableCodeElimination +Fixing long branch [65] bcc __b3 to bcs +Fixing long branch [72] bcc __b5 to bcs +Fixing long branch [81] bcc __b7 to bcs +Fixing long branch [87] bcc __b7 to bcs +Fixing long branch [101] bcc __b9 to bcs +Fixing long branch [107] bcc __b9 to bcs +Fixing long branch [145] bcc __b13 to bcs +Fixing long branch [166] bcc __b18 to bcs +Fixing long branch [267] bmi __b20 to bpl +Fixing long branch [292] bmi __b22 to bpl + +FINAL SYMBOL TABLE +(signed byte) $5::ax +(signed byte) $5::ay +(byte) $5::s +(signed byte) $5::vx +(signed byte) $5::vy +(signed word) $5::x +(signed word) $5::y +(void()) AddSprite((byte) AddSprite::sn) +(label) AddSprite::@1 +(label) AddSprite::@2 +(label) AddSprite::@3 +(label) AddSprite::@4 +(label) AddSprite::@5 +(label) AddSprite::@return +(byte) AddSprite::sn +(byte) AddSprite::sn#1 reg byte x 59.28571428571429 +(byte) AddSprite::t0 +(byte) AddSprite::t0#2 reg byte y 20002.0 +(byte) AddSprite::t0#3 reg byte y 10026.25 +(void()) DelSprite((byte) DelSprite::sn) +(label) DelSprite::@return +(byte) DelSprite::sn +(byte) DelSprite::sn#0 reg byte x 106.5 +(const byte) F = (number) 3 +(byte()) GetSprite() +(label) GetSprite::@1 +(label) GetSprite::@2 +(label) GetSprite::@3 +(label) GetSprite::@4 +(label) GetSprite::@return +(byte) GetSprite::return +(byte) GetSprite::return#2 reg byte x 37.33333333333333 +(byte) GetSprite::return#4 reg byte x 22.0 +(byte) GetSprite::t0 +(byte) GetSprite::t0#2 reg byte x 20002.0 +(byte) GetSprite::t0#3 reg byte x 10051.5 +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +(label) Print00::@1 +(label) Print00::@2 +(label) Print00::@3 +(label) Print00::@4 +(label) Print00::@5 +(label) Print00::@6 +(label) Print00::@return +(byte) Print00::c +(byte) Print00::c#10 reg byte y 10051.5 +(byte) Print00::c#2 reg byte y 10001.0 +(byte) Print00::c#4 reg byte y 10001.0 +(byte) Print00::c#5 reg byte y 10051.5 +(byte*) Print00::p +(byte) Print00::v +(byte) Print00::v#1 reg byte x 20002.0 +(byte) Print00::v#2 reg byte x 20002.0 +(byte) Print00::v#3 reg byte x 7551.25 +(byte) Print00::v#5 reg byte x 10034.666666666666 +(byte) Print00::v0 +(byte) Print00::v0#0 reg byte x 56.0 +(const byte*) cmIT[(const byte) maxSprites+(byte) 1] = { fill( maxSprites+1, 0) } +(const byte*) cmRF[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmRX[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmRY[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmSI[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const struct $5*) dTab[(const byte) maxDrawObjects] = { fill( maxDrawObjects, 0) } +(const byte*) lcSprColTab[(const byte) maxC64Images] = { fill( maxC64Images, 0) } +(const byte*) lcSprMapTab[(const byte) maxSprImages] = { fill( maxSprImages, 0) } +(const byte) lfMC = (number) $10 +(signed word()) main() +(byte*~) main::$109 zp[2]:26 22.0 +(byte*~) main::$110 zp[2]:28 22.0 +(byte*~) main::$111 zp[2]:22 11.0 +(byte*~) main::$112 zp[2]:24 22.0 +(byte~) main::$132 reg byte a 22.0 +(signed word~) main::$27 zp[2]:16 101.0 +(signed word~) main::$28 zp[2]:18 101.0 +(byte~) main::$52 reg byte a 22.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@26 +(label) main::@27 +(label) main::@28 +(label) main::@29 +(label) main::@3 +(label) main::@30 +(label) main::@31 +(label) main::@32 +(label) main::@33 +(label) main::@34 +(label) main::@35 +(label) main::@36 +(label) main::@37 +(label) main::@38 +(label) main::@39 +(label) main::@4 +(label) main::@40 +(label) main::@41 +(label) main::@42 +(label) main::@43 +(label) main::@44 +(label) main::@45 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(word) main::c +(word) main::c#10 c zp[2]:2 9.166666666666666 +(word) main::c#11 c_1 zp[2]:4 11.0 +(word) main::c#16 c_2 zp[2]:7 1.0 +(word) main::c#18 c_2 zp[2]:7 1.8333333333333333 +(word) main::c#2 c zp[2]:2 22.0 +(word) main::c#4 c_1 zp[2]:4 22.0 +(word) main::c#7 c_2 zp[2]:7 16.5 +(struct $5*) main::d +(struct $5*) main::d#10 d zp[2]:11 10.631578947368421 +(struct $5*) main::d#2 d zp[2]:11 101.0 +(struct $5*) main::d1 +(struct $5*) main::d1#0 d1 zp[2]:20 1.0 +(byte) main::i +(byte) main::i#11 reg byte x 15.714285714285714 +(byte) main::i#12 reg byte x 14.666666666666666 +(byte) main::i#14 reg byte x 14.666666666666666 +(byte) main::i#17 reg byte x 3.4375 +(byte) main::i#2 reg byte x 22.0 +(byte) main::i#22 i zp[1]:10 35.35 +(byte) main::i#4 reg byte x 22.0 +(byte) main::i#7 reg byte x 22.0 +(byte) main::i#9 i zp[1]:10 202.0 +(word) main::oCount +(word) main::oCount#17 oCount zp[2]:14 1.1282051282051282 +(word) main::oCount#2 oCount zp[2]:14 22.0 +(word) main::oCount#20 oCount zp[2]:14 7.333333333333333 +(word) main::oCount#7 oCount zp[2]:14 22.0 +(byte) main::objects +(byte) main::objects#1 objects zp[1]:13 2.0 +(byte) main::objects#12 objects zp[1]:13 11.0 +(byte) main::objects#15 objects zp[1]:13 11.0 +(byte) main::objects#17 objects zp[1]:13 14.666666666666666 +(byte) main::objects#9 objects zp[1]:13 6.000000000000001 +(signed word) main::return +(byte) main::stopIt +(byte) main::stopIt#15 stopIt zp[1]:9 7.333333333333333 +(byte) main::stopIt#5 stopIt zp[1]:9 0.7857142857142858 +(byte) main::type +(byte) main::type#10 type zp[1]:6 2.75 +(byte) main::type#2 type zp[1]:6 11.0 +(byte) main::type#4 type zp[1]:6 5.5 +(const byte) maxC64Images = (number) $100 +(const byte) maxDrawObjects = (number) $18 +(const byte) maxSprImages = (number) 8 +(const byte) maxSprites = (number) $20 +(const byte) rfDrop = (number) $fe +(const byte) sprOff = (number) $40 + +reg byte x [ main::i#12 main::i#2 ] +reg byte x [ main::i#14 main::i#4 ] +zp[2]:2 [ main::c#10 main::c#2 ] +zp[2]:4 [ main::c#11 main::c#4 ] +reg byte x [ main::i#17 main::i#7 ] +zp[1]:6 [ main::type#4 main::type#10 main::type#2 ] +zp[2]:7 [ main::c#16 main::c#18 main::c#7 ] +zp[1]:9 [ main::stopIt#5 main::stopIt#15 ] +zp[1]:10 [ main::i#22 main::i#9 ] +zp[2]:11 [ main::d#10 main::d#2 ] +zp[1]:13 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +zp[2]:14 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] +reg byte y [ Print00::c#5 Print00::c#2 ] +reg byte x [ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] +reg byte y [ Print00::c#10 Print00::c#4 ] +reg byte x [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] +reg byte y [ AddSprite::t0#3 AddSprite::t0#2 ] +reg byte x [ DelSprite::sn#0 ] +reg byte x [ GetSprite::return#4 ] +reg byte x [ main::i#11 ] +reg byte x [ AddSprite::sn#1 ] +zp[2]:16 [ main::$27 ] +zp[2]:18 [ main::$28 ] +reg byte a [ main::$132 ] +reg byte a [ main::$52 ] +zp[2]:20 [ main::d1#0 ] +zp[2]:22 [ main::$111 ] +zp[2]:24 [ main::$112 ] +zp[2]:26 [ main::$109 ] +zp[2]:28 [ main::$110 ] + + +FINAL ASSEMBLER +Score: 62702 + + // File Comments +// bubbles64 - Q&D C64 port of the bubbles demo from vbcc6502's NES exmaples +// Coded by Lazycow +// Source https://www.lemon64.com/forum/viewtopic.php?t=75283&start=15 + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .const lfMC = $10 + .const rfDrop = $fe + .const maxSprites = $20 + .const maxSprImages = 8 + .const maxC64Images = $100 + .const sprOff = $40 + .const maxDrawObjects = $18 + .const F = 3 + // main +// +// +main: { + .label __27 = $10 + .label __28 = $12 + // main loop + .label c = 2 + // main loop + .label c_1 = 4 + .label d1 = $14 + // setup bubbles + .label type = 6 + // main loop + .label c_2 = 7 + .label d = $b + .label i = $a + .label objects = $d + // 1 == preallocate 20 sprites (only for better benchmarking) + // 0 == allocate sprites on the fly (prefered) + .label oCount = $e + .label stopIt = 9 + .label __109 = $1a + .label __110 = $1c + .label __111 = $16 + .label __112 = $18 + // lcSprMapTab[0]=sprOff+0 + // [0] *((const byte*) lcSprMapTab) ← (const byte) sprOff -- _deref_pbuc1=vbuc2 + // setup sprite images + lda #sprOff + sta lcSprMapTab + // lcSprMapTab[1]=sprOff+1 + // [1] *((const byte*) lcSprMapTab+(byte) 1) ← (const byte) sprOff+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #sprOff+1 + sta lcSprMapTab+1 + // lcSprMapTab[2]=sprOff+2 + // [2] *((const byte*) lcSprMapTab+(byte) 2) ← (const byte) sprOff+(byte) 2 -- _deref_pbuc1=vbuc2 + lda #sprOff+2 + sta lcSprMapTab+2 + // lcSprMapTab[3]=sprOff+3 + // [3] *((const byte*) lcSprMapTab+(byte) 3) ← (const byte) sprOff+(byte) 3 -- _deref_pbuc1=vbuc2 + lda #sprOff+3 + sta lcSprMapTab+3 + // lcSprMapTab[4]=sprOff+4 + // [4] *((const byte*) lcSprMapTab+(byte) 4) ← (const byte) sprOff+(byte) 4 -- _deref_pbuc1=vbuc2 + lda #sprOff+4 + sta lcSprMapTab+4 + // lcSprMapTab[5]=sprOff+5 + // [5] *((const byte*) lcSprMapTab+(byte) 5) ← (const byte) sprOff+(byte) 5 -- _deref_pbuc1=vbuc2 + lda #sprOff+5 + sta lcSprMapTab+5 + // lcSprColTab[sprOff+1]=10|lfMC + // [6] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) ← (byte) $a|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #$a|lfMC + sta lcSprColTab+sprOff+1 + // lcSprColTab[sprOff+0]=lcSprColTab[sprOff+1]=10|lfMC + // [7] *((const byte*) lcSprColTab+(const byte) sprOff) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 1) -- _deref_pbuc1=_deref_pbuc2 + // setup sprite colors + flags + sta lcSprColTab+sprOff + // lcSprColTab[sprOff+3]=5|lfMC + // [8] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) ← (byte) 5|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #5|lfMC + sta lcSprColTab+sprOff+3 + // lcSprColTab[sprOff+2]=lcSprColTab[sprOff+3]=5|lfMC + // [9] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 2) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 3) -- _deref_pbuc1=_deref_pbuc2 + sta lcSprColTab+sprOff+2 + // lcSprColTab[sprOff+5]=14|lfMC + // [10] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) ← (byte) $e|(const byte) lfMC -- _deref_pbuc1=vbuc2 + lda #$e|lfMC + sta lcSprColTab+sprOff+5 + // lcSprColTab[sprOff+4]=lcSprColTab[sprOff+5]=14|lfMC + // [11] *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 4) ← *((const byte*) lcSprColTab+(const byte) sprOff+(byte) 5) -- _deref_pbuc1=_deref_pbuc2 + sta lcSprColTab+sprOff+4 + // [12] phi from main to main::@2 [phi:main->main::@2] + // [12] phi (byte) main::i#12 = (byte) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 + ldx #0 + // main::@2 + __b2: + // for (i=0;imain::@4] + // [14] phi (byte) main::i#14 = (byte) 0 [phi:main::@2->main::@4#0] -- vbuxx=vbuc1 + ldx #0 + // clear (i)ndex (t)able + // main::@4 + __b4: + // for (i=0;imain::@6] + // [16] phi (word) main::c#10 = (byte) 0 [phi:main::@4->main::@6#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c + sta.z c+1 + // main::@6 + __b6: + // for (c=0;c<1000;c+=1) + // [17] if((word) main::c#10<(word) $3e8) goto main::@7 -- vwuz1_lt_vwuc1_then_la1 + lda.z c+1 + cmp #>$3e8 + bcs !__b7+ + jmp __b7 + !__b7: + bne !+ + lda.z c + cmp #<$3e8 + bcs !__b7+ + jmp __b7 + !__b7: + !: + // main::@39 + // *onePtr=0x33 + // [18] *((byte*) 1) ← (byte) $33 -- _deref_pbuc1=vbuc2 + // install IRQ + lda #$33 + sta 1 + // [19] phi from main::@39 to main::@8 [phi:main::@39->main::@8] + // [19] phi (word) main::c#11 = (byte) 0 [phi:main::@39->main::@8#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c_1 + sta.z c_1+1 + // now it's save to change "01" + // main::@8 + __b8: + // for (c=0;c<2040;c+=1) + // [20] if((word) main::c#11<(word) $7f8) goto main::@9 -- vwuz1_lt_vwuc1_then_la1 + lda.z c_1+1 + cmp #>$7f8 + bcs !__b9+ + jmp __b9 + !__b9: + bne !+ + lda.z c_1 + cmp #<$7f8 + bcs !__b9+ + jmp __b9 + !__b9: + !: + // main::@10 + // *onePtr=0x35 + // [21] *((byte*) 1) ← (byte) $35 -- _deref_pbuc1=vbuc2 + lda #$35 + sta 1 + // vicPtr[0xd02]|=3 + // [22] *((byte*) 53248+(word) $d02) ← *((byte*) 53248+(word) $d02) | (byte) 3 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 + lda #3 + ora $d000+$d02 + sta $d000+$d02 + // vicPtr[0xd00]&=~3ub + // [23] *((byte*) 53248+(word) $d00) ← *((byte*) 53248+(word) $d00) & ~(byte) 3 -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + lda #3^$ff + and $d000+$d00 + sta $d000+$d00 + // main::@11 + // scrPtr[997]='P'-'A'+1 + // [24] *((byte*) 57344+(word) $3e5) ← (byte) 'P'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'P'-'A'+1 + sta $e000+$3e5 + // scrPtr[998]='A'-'A'+1 + // [25] *((byte*) 57344+(word) $3e6) ← (byte) 1 -- _deref_pbuc1=vbuc2 + lda #1 + sta $e000+$3e6 + // scrPtr[999]='L'-'A'+1 + // [26] *((byte*) 57344+(word) $3e7) ← (byte) 'L'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'L'-'A'+1 + sta $e000+$3e7 + // main::@1 + // scrPtr[975+0]='B'-'A'+1 + // [27] *((byte*) 57344+(word) $3cf) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf + // scrPtr[975+1]='U'-'A'+1 + // [28] *((byte*) 57344+(word)(number) $3cf+(number) 1) ← (byte) 'U'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'U'-'A'+1 + sta $e000+$3cf+1 + // scrPtr[975+2]='B'-'A'+1 + // [29] *((byte*) 57344+(word)(number) $3cf+(number) 2) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'B'-'A'+1 + sta $e000+$3cf+2 + // scrPtr[975+3]='B'-'A'+1 + // [30] *((byte*) 57344+(word)(number) $3cf+(number) 3) ← (byte) 'B'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + sta $e000+$3cf+3 + // scrPtr[975+4]='L'-'A'+1 + // [31] *((byte*) 57344+(word)(number) $3cf+(number) 4) ← (byte) 'L'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'L'-'A'+1 + sta $e000+$3cf+4 + // scrPtr[975+5]='E'-'A'+1 + // [32] *((byte*) 57344+(word)(number) $3cf+(number) 5) ← (byte) 'E'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'E'-'A'+1 + sta $e000+$3cf+5 + // scrPtr[975+6]='S'-'A'+1 + // [33] *((byte*) 57344+(word)(number) $3cf+(number) 6) ← (byte) 'S'-(byte) 'A'+(byte) 1 -- _deref_pbuc1=vbuc2 + lda #'S'-'A'+1 + sta $e000+$3cf+6 + // scrPtr[975+7]=':' + // [34] *((byte*) 57344+(word)(number) $3cf+(number) 7) ← (byte) ':' -- _deref_pbuc1=vbuc2 + lda #':' + sta $e000+$3cf+7 + // [35] phi from main::@1 to main::@12 [phi:main::@1->main::@12] + // [35] phi (byte) main::type#4 = (byte) 0 [phi:main::@1->main::@12#0] -- vbuz1=vbuc1 + lda #0 + sta.z type + // [35] phi (byte) main::i#17 = (byte) 0 [phi:main::@1->main::@12#1] -- vbuxx=vbuc1 + tax + // main::@12 + __b12: + // for (i=0;imain::@16] + // [37] phi (word) main::oCount#17 = (word) 0 [phi:main::@12->main::@16#0] -- vwuz1=vwuc1 + lda #<0 + sta.z oCount + sta.z oCount+1 + // [37] phi (byte) main::stopIt#5 = (byte) 0 [phi:main::@12->main::@16#1] -- vbuz1=vbuc1 + sta.z stopIt + // [37] phi (word) main::c#16 = (byte) 0 [phi:main::@12->main::@16#2] -- vwuz1=vbuc1 + sta.z c_2 + sta.z c_2+1 + // [37] phi (byte) main::objects#9 = (byte) 0 [phi:main::@12->main::@16#3] -- vbuz1=vbuc1 + sta.z objects + // main::@16 + __b16: + // [38] phi from main::@16 to main::@17 [phi:main::@16->main::@17] + // [38] phi (struct $5*) main::d#10 = (const struct $5*) dTab [phi:main::@16->main::@17#0] -- pssz1=pssc1 + lda #dTab + sta.z d+1 + // [38] phi (byte) main::i#22 = (byte) 0 [phi:main::@16->main::@17#1] -- vbuz1=vbuc1 + lda #0 + sta.z i + // move objects + // main::@17 + __b17: + // for (i=0,d=dTab; i=14) + // [41] if((word) main::c#7<(byte) $e) goto main::@33 -- vwuz1_lt_vbuc1_then_la1 + lda.z c_2+1 + cmp #>$e + bcc __b36 + bne !+ + lda.z c_2 + cmp #<$e + bcc __b36 + !: + // main::@30 + // if (0==stopIt && objectsmain::@33] + jmp __b36 + // [44] phi from main::@19 to main::@33 [phi:main::@19->main::@33] + // [44] phi (word) main::c#18 = (word) main::c#7 [phi:main::@19->main::@33#0] -- register_copy + // [44] phi (byte) main::objects#12 = (byte) main::objects#9 [phi:main::@19->main::@33#1] -- register_copy + // [44] phi from main::@30 main::@41 to main::@33 [phi:main::@30/main::@41->main::@33] + __b11: + // [44] phi (word) main::c#18 = (byte) 0 [phi:main::@30/main::@41->main::@33#0] -- vwuz1=vbuc1 + lda #<0 + sta.z c_2 + sta.z c_2+1 + // [44] phi (byte) main::objects#12 = (byte) main::objects#9 [phi:main::@30/main::@41->main::@33#1] -- register_copy + // main::@33 + // main::@36 + __b36: + // if (oCount>0) + // [45] if((word) main::oCount#17<=(byte) 0) goto main::@34 -- vwuz1_le_0_then_la1 + lda.z oCount + bne !+ + lda.z oCount+1 + beq __b34 + !: + // main::@37 + // oCount-=1 + // [46] (word) main::oCount#2 ← (word) main::oCount#17 - (byte) 1 -- vwuz1=vwuz1_minus_1 + lda.z oCount + sec + sbc #1 + sta.z oCount + lda.z oCount+1 + sbc #0 + sta.z oCount+1 + // [47] phi from main::@36 main::@37 to main::@34 [phi:main::@36/main::@37->main::@34] + // [47] phi (word) main::oCount#7 = (word) main::oCount#17 [phi:main::@36/main::@37->main::@34#0] -- register_copy + // main::@34 + __b34: + // if (oCount>2 && objects>0) + // [48] if((word) main::oCount#7<(byte) 2+(byte) 1) goto main::@35 -- vwuz1_lt_vbuc1_then_la1 + lda.z oCount+1 + cmp #>2+1 + bcc __b35 + bne !+ + lda.z oCount + cmp #<2+1 + bcc __b35 + !: + // main::@44 + // [49] if((byte) main::objects#12>(byte) 0) goto main::@38 -- vbuz1_gt_0_then_la1 + lda.z objects + bne __b38 + // [53] phi from main::@44 to main::@35 [phi:main::@44->main::@35] + jmp __b35 + // main::@38 + __b38: + // objects-=1 + // [50] (byte) main::objects#15 ← (byte) main::objects#12 - (byte) 1 -- vbuz1=vbuz1_minus_1 + dec.z objects + // DelSprite(objects) + // [51] (byte) DelSprite::sn#0 ← (byte) main::objects#15 -- vbuxx=vbuz1 + ldx.z objects + // [52] call DelSprite + jsr DelSprite + // [53] phi from main::@38 to main::@35 [phi:main::@38->main::@35] + // [53] phi (word) main::oCount#20 = (byte) 0 [phi:main::@38->main::@35#0] -- vwuz1=vbuc1 + lda #<0 + sta.z oCount + sta.z oCount+1 + // [53] phi (byte) main::stopIt#15 = (byte) 1 [phi:main::@38->main::@35#1] -- vbuz1=vbuc1 + lda #1 + sta.z stopIt + // [53] phi (byte) main::objects#17 = (byte) main::objects#15 [phi:main::@38->main::@35#2] -- register_copy + // [53] phi from main::@34 to main::@35 [phi:main::@34->main::@35] + // [53] phi (word) main::oCount#20 = (word) main::oCount#7 [phi:main::@34->main::@35#0] -- register_copy + // [53] phi (byte) main::stopIt#15 = (byte) main::stopIt#5 [phi:main::@34->main::@35#1] -- register_copy + // [53] phi (byte) main::objects#17 = (byte) main::objects#12 [phi:main::@34->main::@35#2] -- register_copy + // main::@35 + __b35: + // Print00(scr+(char*)983,objects) + // [54] (byte) Print00::v0#0 ← (byte) main::objects#17 -- vbuxx=vbuz1 + ldx.z objects + // [55] call Print00 + // [117] phi from main::@35 to Print00 [phi:main::@35->Print00] + jsr Print00 + // [37] phi from main::@35 to main::@16 [phi:main::@35->main::@16] + // [37] phi (word) main::oCount#17 = (word) main::oCount#20 [phi:main::@35->main::@16#0] -- register_copy + // [37] phi (byte) main::stopIt#5 = (byte) main::stopIt#15 [phi:main::@35->main::@16#1] -- register_copy + // [37] phi (word) main::c#16 = (word) main::c#18 [phi:main::@35->main::@16#2] -- register_copy + // [37] phi (byte) main::objects#9 = (byte) main::objects#17 [phi:main::@35->main::@16#3] -- register_copy + jmp __b16 + // main::@31 + __b31: + // objects+=1 + // [56] (byte) main::objects#1 ← (byte) main::objects#9 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z objects + // GetSprite() + // [57] call GetSprite + // [129] phi from main::@31 to GetSprite [phi:main::@31->GetSprite] + jsr GetSprite + // GetSprite() + // [58] (byte) GetSprite::return#4 ← (byte) GetSprite::return#2 + // main::@40 + // i=GetSprite() + // [59] (byte) main::i#11 ← (byte) GetSprite::return#4 + // main::@43 + // if (0==preset && (i=GetSprite())<128) + // [60] if((byte) main::i#11<(byte) $80) goto main::@32 -- vbuxx_lt_vbuc1_then_la1 + cpx #$80 + bcc __b32 + jmp __b36 + // main::@32 + __b32: + // AddSprite(i) + // [61] (byte) AddSprite::sn#1 ← (byte) main::i#11 + // [62] call AddSprite + jsr AddSprite + // main::@41 + // cmRY[i]=0 + // [63] *((const byte*) cmRY + (byte) main::i#11) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRY,x + // cmRF[i]=cmRY[i]=0 + // [64] *((const byte*) cmRF + (byte) main::i#11) ← *((const byte*) cmRY + (byte) main::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda cmRY,x + sta cmRF,x + // cmRX[i]=cmRF[i]=cmRY[i]=0 + // [65] *((const byte*) cmRX + (byte) main::i#11) ← *((const byte*) cmRF + (byte) main::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda cmRF,x + sta cmRX,x + // cmSI[i]=cmRX[i]=cmRF[i]=cmRY[i]=0 + // [66] *((const byte*) cmSI + (byte) main::i#11) ← *((const byte*) cmRX + (byte) main::i#11) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx + lda cmRX,x + sta cmSI,x + jmp __b11 + // main::@18 + __b18: + // d->vx+=d->ax + // [67] *((signed byte*)(struct $5*) main::d#10 + (byte) 5) ← *((signed byte*)(struct $5*) main::d#10 + (byte) 5) + *((signed byte*)(struct $5*) main::d#10 + (byte) 7) -- pbsz1_derefidx_vbuc1=pbsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 + ldy #7 + lda (d),y + ldy #5 + tax + lda (d),y + sty.z $ff + stx.z $ff + clc + adc.z $ff + ldy.z $ff + sta (d),y + // if (d->vx<-32) + // [68] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) -$20) goto main::@20 -- pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 + ldy #5 + lda (d),y + sec + sbc #-$20 + bvc !+ + eor #$80 + !: + bpl !__b20+ + jmp __b20 + !__b20: + // main::@25 + // if (d->vx>32) + // [69] if(*((signed byte*)(struct $5*) main::d#10 + (byte) 5)<(signed byte) $20+(signed byte) 1) goto main::@21 -- pbsz1_derefidx_vbuc1_lt_vbsc2_then_la1 + ldy #5 + lda (d),y + sec + sbc #$20+1 + bvc !+ + eor #$80 + !: + bmi __b21 + // main::@26 + // d->ax=-1 + // [70] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) -1 -- pbsz1_derefidx_vbuc1=vbsc2 + lda #7 + tay + lda #-1 + sta (d),y + // main::@21 + __b21: + // if (d->y>248<(signed word)(byte) $f8<<(const byte) F) goto main::@22 -- pwsz1_derefidx_vbuc1_gt_vwsc2_then_la1 + ldy #3 + lda #<$f8<$f8<y<24<=(signed word)(byte) $18<<(const byte) F) goto main::@23 -- pwsz1_derefidx_vbuc1_ge_vwsc2_then_la1 + ldy #3 + lda (d),y + cmp #<$18<$18<vy=1<x+=d->vx + // [74] *((signed word*)(struct $5*) main::d#10 + (byte) 1) ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) + *((signed byte*)(struct $5*) main::d#10 + (byte) 5) -- pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 + ldy #5 + lda (d),y + sta.z $fe + ora #$7f + bmi !+ + lda #0 + !: + sta.z $ff + ldy #1 + clc + lda (d),y + adc.z $fe + sta (d),y + iny + lda (d),y + adc.z $fe + sta (d),y + // d->y+=d->vy + // [75] *((signed word*)(struct $5*) main::d#10 + (byte) 3) ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) + *((signed byte*)(struct $5*) main::d#10 + (byte) 6) -- pwsz1_derefidx_vbuc1=pwsz1_derefidx_vbuc1_plus_pbsz1_derefidx_vbuc2 + ldy #6 + lda (d),y + sta.z $fe + ora #$7f + bmi !+ + lda #0 + !: + sta.z $ff + ldy #3 + clc + lda (d),y + adc.z $fe + sta (d),y + iny + lda (d),y + adc.z $fe + sta (d),y + // if (cmRF[i]<128) + // [76] if(*((const byte*) cmRF + (byte) main::i#22)>=(byte) $80) goto main::@24 -- pbuc1_derefidx_vbuz1_ge_vbuc2_then_la1 + ldy.z i + lda cmRF,y + cmp #$80 + bcs __b24 + // main::@29 + // cmSI[i]=d->s + // [77] *((const byte*) cmSI + (byte) main::i#22) ← *((byte*)(struct $5*) main::d#10) -- pbuc1_derefidx_vbuz1=_deref_pbuz2 + ldy #0 + lda (d),y + ldy.z i + sta cmSI,y + // d->x>>F + // [78] (signed word~) main::$27 ← *((signed word*)(struct $5*) main::d#10 + (byte) 1) >> (const byte) F -- vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 + ldx #F + ldy #1 + lda (d),y + sta.z __27 + iny + lda (d),y + sta.z __27+1 + cpx #0 + beq !e+ + !: + lda.z __27+1 + cmp #$80 + ror.z __27+1 + ror.z __27 + dex + bne !- + !e: + // cmRX[i]=(ubyte)(d->x>>F) + // [79] *((const byte*) cmRX + (byte) main::i#22) ← (byte)(signed word~) main::$27 -- pbuc1_derefidx_vbuz1=_byte_vwsz2 + ldy.z i + lda.z __27 + sta cmRX,y + // d->y>>F + // [80] (signed word~) main::$28 ← *((signed word*)(struct $5*) main::d#10 + (byte) 3) >> (const byte) F -- vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 + ldx #F + ldy #3 + lda (d),y + sta.z __28 + iny + lda (d),y + sta.z __28+1 + cpx #0 + beq !e+ + !: + lda.z __28+1 + cmp #$80 + ror.z __28+1 + ror.z __28 + dex + bne !- + !e: + // cmRY[i]=(ubyte)(d->y>>F) + // [81] *((const byte*) cmRY + (byte) main::i#22) ← (byte)(signed word~) main::$28 -- pbuc1_derefidx_vbuz1=_byte_vwsz2 + ldy.z i + lda.z __28 + sta cmRY,y + // main::@24 + __b24: + // for (i=0,d=dTab; imain::@17] + // [38] phi (struct $5*) main::d#10 = (struct $5*) main::d#2 [phi:main::@24->main::@17#0] -- register_copy + // [38] phi (byte) main::i#22 = (byte) main::i#9 [phi:main::@24->main::@17#1] -- register_copy + jmp __b17 + // main::@22 + __b22: + // d->vy=-1<ax=1 + // [85] *((signed byte*)(struct $5*) main::d#10 + (byte) 7) ← (signed byte) 1 -- pbsz1_derefidx_vbuc1=vbsc2 + lda #7 + tay + lda #1 + sta (d),y + jmp __b21 + // main::@13 + __b13: + // &dTab[i] + // [86] (byte~) main::$132 ← (byte) main::i#17 << (byte) 3 -- vbuaa=vbuxx_rol_3 + txa + asl + asl + asl + // [87] (byte~) main::$52 ← (byte~) main::$132 + (byte) main::i#17 -- vbuaa=vbuaa_plus_vbuxx + stx.z $ff + clc + adc.z $ff + // d=&dTab[i] + // [88] (struct $5*) main::d1#0 ← (const struct $5*) dTab + (byte~) main::$52 -- pssz1=pssc1_plus_vbuaa + clc + adc #dTab + adc #0 + sta.z d1+1 + // d->s=type + // [89] *((byte*)(struct $5*) main::d1#0) ← (byte) main::type#4 -- _deref_pbuz1=vbuz2 + lda.z type + ldy #0 + sta (d1),y + // type+=1 + // [90] (byte) main::type#2 ← (byte) main::type#4 + (byte) 1 -- vbuz1=vbuz1_plus_1 + inc.z type + // if (type>=6) + // [91] if((byte) main::type#2<(byte) 6) goto main::@45 -- vbuz1_lt_vbuc1_then_la1 + lda.z type + cmp #6 + bcc __b14 + // [93] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + // [93] phi (byte) main::type#10 = (byte) 0 [phi:main::@13->main::@14#0] -- vbuz1=vbuc1 + tya + sta.z type + // [92] phi from main::@13 to main::@45 [phi:main::@13->main::@45] + // main::@45 + // [93] phi from main::@45 to main::@14 [phi:main::@45->main::@14] + // [93] phi (byte) main::type#10 = (byte) main::type#2 [phi:main::@45->main::@14#0] -- register_copy + // main::@14 + __b14: + // d->x=112<$70<vx=(sbyte)i + // [95] *((signed byte*)(struct $5*) main::d1#0 + (byte) 5) ← (signed byte)(byte) main::i#17 -- pbsz1_derefidx_vbuc1=vbsxx + lda #5 + tay + txa + sta (d1),y + // d->ax=1 + // [96] *((signed byte*)(struct $5*) main::d1#0 + (byte) 7) ← (signed byte) 1 -- pbsz1_derefidx_vbuc1=vbsc2 + lda #7 + tay + lda #1 + sta (d1),y + // d->y=24<$18<vy=1<ay=1 + // [99] *((signed byte*)(struct $5*) main::d1#0 + (byte) 8) ← (signed byte) 1 -- pbsz1_derefidx_vbuc1=vbsc2 + lda #8 + tay + lda #1 + sta (d1),y + // main::@15 + // i+=1 + // [100] (byte) main::i#7 ← (byte) main::i#17 + (byte) 1 -- vbuxx=vbuxx_plus_1 + inx + // [35] phi from main::@15 to main::@12 [phi:main::@15->main::@12] + // [35] phi (byte) main::type#4 = (byte) main::type#10 [phi:main::@15->main::@12#0] -- register_copy + // [35] phi (byte) main::i#17 = (byte) main::i#7 [phi:main::@15->main::@12#1] -- register_copy + jmp __b12 + // main::@9 + __b9: + // chrPtr[c]=vicPtr[c] + // [101] (byte*~) main::$111 ← (byte*) 53248 + (word) main::c#11 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c_1 + clc + adc #<$d000 + sta.z __111 + lda.z c_1+1 + adc #>$d000 + sta.z __111+1 + // [102] (byte*~) main::$112 ← (byte*) 63488 + (word) main::c#11 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c_1 + clc + adc #<$f800 + sta.z __112 + lda.z c_1+1 + adc #>$f800 + sta.z __112+1 + // [103] *((byte*~) main::$112) ← *((byte*~) main::$111) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (__111),y + sta (__112),y + // c+=1 + // [104] (word) main::c#4 ← (word) main::c#11 + (byte) 1 -- vwuz1=vwuz1_plus_1 + inc.z c_1 + bne !+ + inc.z c_1+1 + !: + // [19] phi from main::@9 to main::@8 [phi:main::@9->main::@8] + // [19] phi (word) main::c#11 = (word) main::c#4 [phi:main::@9->main::@8#0] -- register_copy + jmp __b8 + // main::@7 + __b7: + // scrPtr[c]=32 + // [105] (byte*~) main::$109 ← (byte*) 57344 + (word) main::c#10 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c + clc + adc #<$e000 + sta.z __109 + lda.z c+1 + adc #>$e000 + sta.z __109+1 + // [106] *((byte*~) main::$109) ← (byte) $20 -- _deref_pbuz1=vbuc1 + lda #$20 + ldy #0 + sta (__109),y + // colPtr[c]=14 + // [107] (byte*~) main::$110 ← (byte*) 55296 + (word) main::c#10 -- pbuz1=pbuc1_plus_vwuz2 + lda.z c + clc + adc #<$d800 + sta.z __110 + lda.z c+1 + adc #>$d800 + sta.z __110+1 + // [108] *((byte*~) main::$110) ← (byte) $e -- _deref_pbuz1=vbuc1 + lda #$e + sta (__110),y + // c+=1 + // [109] (word) main::c#2 ← (word) main::c#10 + (byte) 1 -- vwuz1=vwuz1_plus_1 + inc.z c + bne !+ + inc.z c+1 + !: + // [16] phi from main::@7 to main::@6 [phi:main::@7->main::@6] + // [16] phi (word) main::c#10 = (word) main::c#2 [phi:main::@7->main::@6#0] -- register_copy + jmp __b6 + // main::@5 + __b5: + // cmRF[i]=255 + // [110] *((const byte*) cmRF + (byte) main::i#14) ← (byte) $ff -- pbuc1_derefidx_vbuxx=vbuc2 + lda #$ff + sta cmRF,x + // i+=1 + // [111] (byte) main::i#4 ← (byte) main::i#14 + (byte) 1 -- vbuxx=vbuxx_plus_1 + inx + // [14] phi from main::@5 to main::@4 [phi:main::@5->main::@4] + // [14] phi (byte) main::i#14 = (byte) main::i#4 [phi:main::@5->main::@4#0] -- register_copy + jmp __b4 + // main::@3 + __b3: + // cmIT[i]=255 + // [112] *((const byte*) cmIT + (byte) main::i#12) ← (byte) $ff -- pbuc1_derefidx_vbuxx=vbuc2 + lda #$ff + sta cmIT,x + // i+=1 + // [113] (byte) main::i#2 ← (byte) main::i#12 + (byte) 1 -- vbuxx=vbuxx_plus_1 + inx + // [12] phi from main::@3 to main::@2 [phi:main::@3->main::@2] + // [12] phi (byte) main::i#12 = (byte) main::i#2 [phi:main::@3->main::@2#0] -- register_copy + jmp __b2 +} + // DelSprite +// DelSprite(byte register(X) sn) +DelSprite: { + // cmRY[sn]=255 + // [114] *((const byte*) cmRY + (byte) DelSprite::sn#0) ← (byte) $ff -- pbuc1_derefidx_vbuxx=vbuc2 + // drop sprite, will be removed from IT in IRQ + lda #$ff + sta cmRY,x + // cmRF[sn]=rfDrop + // [115] *((const byte*) cmRF + (byte) DelSprite::sn#0) ← (const byte) rfDrop -- pbuc1_derefidx_vbuxx=vbuc2 + lda #rfDrop + sta cmRF,x + // DelSprite::@return + // } + // [116] return + rts +} + // Print00 +// Print00(byte register(X) v0) +Print00: { + // [118] phi from Print00 to Print00::@1 [phi:Print00->Print00::@1] + // [118] phi (byte) Print00::c#5 = (byte) '0' [phi:Print00->Print00::@1#0] -- vbuyy=vbuc1 + ldy #'0' + // [118] phi (byte) Print00::v#3 = (byte) Print00::v0#0 [phi:Print00->Print00::@1#1] -- register_copy + // Print00::@1 + __b1: + // while (v>=10) + // [119] if((byte) Print00::v#3>=(byte) $a) goto Print00::@2 -- vbuxx_ge_vbuc1_then_la1 + cpx #$a + bcs __b2 + // Print00::@3 + // *p++=c + // [120] *((word) $e000+(byte*) 983) ← (byte) Print00::c#5 -- _deref_pbuc1=vbuyy + sty $e000+$3d7 + // [121] phi from Print00::@3 to Print00::@4 [phi:Print00::@3->Print00::@4] + // [121] phi (byte) Print00::c#10 = (byte) '0' [phi:Print00::@3->Print00::@4#0] -- vbuyy=vbuc1 + ldy #'0' + // [121] phi (byte) Print00::v#5 = (byte) Print00::v#3 [phi:Print00::@3->Print00::@4#1] -- register_copy + // Print00::@4 + __b4: + // while (v>=1) + // [122] if((byte) Print00::v#5>=(byte) 1) goto Print00::@5 -- vbuxx_ge_vbuc1_then_la1 + cpx #1 + bcs __b5 + // Print00::@6 + // *p++=c + // [123] *((word) $e000+(byte*) 983+(byte) 1) ← (byte) Print00::c#10 -- _deref_pbuc1=vbuyy + sty $e000+$3d7+1 + // Print00::@return + // } + // [124] return + rts + // Print00::@5 + __b5: + // ++c; + // [125] (byte) Print00::c#4 ← ++ (byte) Print00::c#10 -- vbuyy=_inc_vbuyy + iny + // v-=1 + // [126] (byte) Print00::v#2 ← (byte) Print00::v#5 - (byte) 1 -- vbuxx=vbuxx_minus_1 + dex + // [121] phi from Print00::@5 to Print00::@4 [phi:Print00::@5->Print00::@4] + // [121] phi (byte) Print00::c#10 = (byte) Print00::c#4 [phi:Print00::@5->Print00::@4#0] -- register_copy + // [121] phi (byte) Print00::v#5 = (byte) Print00::v#2 [phi:Print00::@5->Print00::@4#1] -- register_copy + jmp __b4 + // Print00::@2 + __b2: + // ++c; + // [127] (byte) Print00::c#2 ← ++ (byte) Print00::c#5 -- vbuyy=_inc_vbuyy + iny + // v-=10 + // [128] (byte) Print00::v#1 ← (byte) Print00::v#3 - (byte) $a -- vbuxx=vbuxx_minus_vbuc1 + txa + axs #$a + // [118] phi from Print00::@2 to Print00::@1 [phi:Print00::@2->Print00::@1] + // [118] phi (byte) Print00::c#5 = (byte) Print00::c#2 [phi:Print00::@2->Print00::@1#0] -- register_copy + // [118] phi (byte) Print00::v#3 = (byte) Print00::v#1 [phi:Print00::@2->Print00::@1#1] -- register_copy + jmp __b1 +} + // GetSprite +// sprite support functions +// +GetSprite: { + // [130] phi from GetSprite to GetSprite::@1 [phi:GetSprite->GetSprite::@1] + // [130] phi (byte) GetSprite::t0#3 = (byte) 0 [phi:GetSprite->GetSprite::@1#0] -- vbuxx=vbuc1 + ldx #0 + // GetSprite::@1 + __b1: + // for (t0=0;t0GetSprite::@return] + // [132] phi (byte) GetSprite::return#2 = (byte) $ff [phi:GetSprite::@1->GetSprite::@return#0] -- vbuxx=vbuc1 + ldx #$ff + // GetSprite::@return + // } + // [133] return + rts + // GetSprite::@2 + __b2: + // if (cmRF[t0]>=rfDrop) + // [134] if(*((const byte*) cmRF + (byte) GetSprite::t0#3)<(const byte) rfDrop) goto GetSprite::@3 -- pbuc1_derefidx_vbuxx_lt_vbuc2_then_la1 + lda cmRF,x + cmp #rfDrop + bcc __b3 + // GetSprite::@4 + // cmRF[t0]=0 + // [135] *((const byte*) cmRF + (byte) GetSprite::t0#3) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRF,x + // [132] phi from GetSprite::@4 to GetSprite::@return [phi:GetSprite::@4->GetSprite::@return] + // [132] phi (byte) GetSprite::return#2 = (byte) GetSprite::t0#3 [phi:GetSprite::@4->GetSprite::@return#0] -- register_copy + rts + // GetSprite::@3 + __b3: + // for (t0=0;t0GetSprite::@1] + // [130] phi (byte) GetSprite::t0#3 = (byte) GetSprite::t0#2 [phi:GetSprite::@3->GetSprite::@1#0] -- register_copy + jmp __b1 +} + // AddSprite +// AddSprite(byte register(X) sn) +AddSprite: { + // if (rfDrop==cmRF[sn]) + // [137] if((const byte) rfDrop==*((const byte*) cmRF + (byte) AddSprite::sn#1)) goto AddSprite::@1 -- vbuc1_eq_pbuc2_derefidx_vbuxx_then_la1 + lda cmRF,x + cmp #rfDrop + beq __b1 + // [138] phi from AddSprite to AddSprite::@2 [phi:AddSprite->AddSprite::@2] + // [138] phi (byte) AddSprite::t0#3 = (byte) 0 [phi:AddSprite->AddSprite::@2#0] -- vbuyy=vbuc1 + ldy #0 + // AddSprite::@2 + __b2: + // for + // (t0=0;t0=128) + // [141] if(*((const byte*) cmIT + (byte) AddSprite::t0#3)<(byte) $80) goto AddSprite::@4 -- pbuc1_derefidx_vbuyy_lt_vbuc2_then_la1 + lda cmIT,y + cmp #$80 + bcc __b4 + // AddSprite::@5 + // cmRF[sn]=0 + // [142] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRF,x + // cmIT[t0]=sn + // [143] *((const byte*) cmIT + (byte) AddSprite::t0#3) ← (byte) AddSprite::sn#1 -- pbuc1_derefidx_vbuyy=vbuxx + txa + sta cmIT,y + rts + // AddSprite::@4 + __b4: + // t0+=1 + // [144] (byte) AddSprite::t0#2 ← (byte) AddSprite::t0#3 + (byte) 1 -- vbuyy=vbuyy_plus_1 + iny + // [138] phi from AddSprite::@4 to AddSprite::@2 [phi:AddSprite::@4->AddSprite::@2] + // [138] phi (byte) AddSprite::t0#3 = (byte) AddSprite::t0#2 [phi:AddSprite::@4->AddSprite::@2#0] -- register_copy + jmp __b2 + // AddSprite::@1 + __b1: + // cmRF[sn]=0 + // [145] *((const byte*) cmRF + (byte) AddSprite::sn#1) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta cmRF,x + rts +} + // File Data + lcSprMapTab: .fill maxSprImages, 0 + lcSprColTab: .fill maxC64Images, 0 + cmIT: .fill maxSprites+1, 0 + cmSI: .fill maxSprites, 0 + cmRX: .fill maxSprites, 0 + cmRY: .fill maxSprites, 0 + cmRF: .fill maxSprites, 0 + dTab: .fill 9*maxDrawObjects, 0 + diff --git a/src/test/ref/complex/bubbles64/bubbles64.sym b/src/test/ref/complex/bubbles64/bubbles64.sym new file mode 100644 index 000000000..ee2f37315 --- /dev/null +++ b/src/test/ref/complex/bubbles64/bubbles64.sym @@ -0,0 +1,199 @@ +(signed byte) $5::ax +(signed byte) $5::ay +(byte) $5::s +(signed byte) $5::vx +(signed byte) $5::vy +(signed word) $5::x +(signed word) $5::y +(void()) AddSprite((byte) AddSprite::sn) +(label) AddSprite::@1 +(label) AddSprite::@2 +(label) AddSprite::@3 +(label) AddSprite::@4 +(label) AddSprite::@5 +(label) AddSprite::@return +(byte) AddSprite::sn +(byte) AddSprite::sn#1 reg byte x 59.28571428571429 +(byte) AddSprite::t0 +(byte) AddSprite::t0#2 reg byte y 20002.0 +(byte) AddSprite::t0#3 reg byte y 10026.25 +(void()) DelSprite((byte) DelSprite::sn) +(label) DelSprite::@return +(byte) DelSprite::sn +(byte) DelSprite::sn#0 reg byte x 106.5 +(const byte) F = (number) 3 +(byte()) GetSprite() +(label) GetSprite::@1 +(label) GetSprite::@2 +(label) GetSprite::@3 +(label) GetSprite::@4 +(label) GetSprite::@return +(byte) GetSprite::return +(byte) GetSprite::return#2 reg byte x 37.33333333333333 +(byte) GetSprite::return#4 reg byte x 22.0 +(byte) GetSprite::t0 +(byte) GetSprite::t0#2 reg byte x 20002.0 +(byte) GetSprite::t0#3 reg byte x 10051.5 +(void()) Print00((byte*) Print00::p , (byte) Print00::v0) +(label) Print00::@1 +(label) Print00::@2 +(label) Print00::@3 +(label) Print00::@4 +(label) Print00::@5 +(label) Print00::@6 +(label) Print00::@return +(byte) Print00::c +(byte) Print00::c#10 reg byte y 10051.5 +(byte) Print00::c#2 reg byte y 10001.0 +(byte) Print00::c#4 reg byte y 10001.0 +(byte) Print00::c#5 reg byte y 10051.5 +(byte*) Print00::p +(byte) Print00::v +(byte) Print00::v#1 reg byte x 20002.0 +(byte) Print00::v#2 reg byte x 20002.0 +(byte) Print00::v#3 reg byte x 7551.25 +(byte) Print00::v#5 reg byte x 10034.666666666666 +(byte) Print00::v0 +(byte) Print00::v0#0 reg byte x 56.0 +(const byte*) cmIT[(const byte) maxSprites+(byte) 1] = { fill( maxSprites+1, 0) } +(const byte*) cmRF[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmRX[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmRY[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const byte*) cmSI[(const byte) maxSprites] = { fill( maxSprites, 0) } +(const struct $5*) dTab[(const byte) maxDrawObjects] = { fill( maxDrawObjects, 0) } +(const byte*) lcSprColTab[(const byte) maxC64Images] = { fill( maxC64Images, 0) } +(const byte*) lcSprMapTab[(const byte) maxSprImages] = { fill( maxSprImages, 0) } +(const byte) lfMC = (number) $10 +(signed word()) main() +(byte*~) main::$109 zp[2]:26 22.0 +(byte*~) main::$110 zp[2]:28 22.0 +(byte*~) main::$111 zp[2]:22 11.0 +(byte*~) main::$112 zp[2]:24 22.0 +(byte~) main::$132 reg byte a 22.0 +(signed word~) main::$27 zp[2]:16 101.0 +(signed word~) main::$28 zp[2]:18 101.0 +(byte~) main::$52 reg byte a 22.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@26 +(label) main::@27 +(label) main::@28 +(label) main::@29 +(label) main::@3 +(label) main::@30 +(label) main::@31 +(label) main::@32 +(label) main::@33 +(label) main::@34 +(label) main::@35 +(label) main::@36 +(label) main::@37 +(label) main::@38 +(label) main::@39 +(label) main::@4 +(label) main::@40 +(label) main::@41 +(label) main::@42 +(label) main::@43 +(label) main::@44 +(label) main::@45 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(word) main::c +(word) main::c#10 c zp[2]:2 9.166666666666666 +(word) main::c#11 c_1 zp[2]:4 11.0 +(word) main::c#16 c_2 zp[2]:7 1.0 +(word) main::c#18 c_2 zp[2]:7 1.8333333333333333 +(word) main::c#2 c zp[2]:2 22.0 +(word) main::c#4 c_1 zp[2]:4 22.0 +(word) main::c#7 c_2 zp[2]:7 16.5 +(struct $5*) main::d +(struct $5*) main::d#10 d zp[2]:11 10.631578947368421 +(struct $5*) main::d#2 d zp[2]:11 101.0 +(struct $5*) main::d1 +(struct $5*) main::d1#0 d1 zp[2]:20 1.0 +(byte) main::i +(byte) main::i#11 reg byte x 15.714285714285714 +(byte) main::i#12 reg byte x 14.666666666666666 +(byte) main::i#14 reg byte x 14.666666666666666 +(byte) main::i#17 reg byte x 3.4375 +(byte) main::i#2 reg byte x 22.0 +(byte) main::i#22 i zp[1]:10 35.35 +(byte) main::i#4 reg byte x 22.0 +(byte) main::i#7 reg byte x 22.0 +(byte) main::i#9 i zp[1]:10 202.0 +(word) main::oCount +(word) main::oCount#17 oCount zp[2]:14 1.1282051282051282 +(word) main::oCount#2 oCount zp[2]:14 22.0 +(word) main::oCount#20 oCount zp[2]:14 7.333333333333333 +(word) main::oCount#7 oCount zp[2]:14 22.0 +(byte) main::objects +(byte) main::objects#1 objects zp[1]:13 2.0 +(byte) main::objects#12 objects zp[1]:13 11.0 +(byte) main::objects#15 objects zp[1]:13 11.0 +(byte) main::objects#17 objects zp[1]:13 14.666666666666666 +(byte) main::objects#9 objects zp[1]:13 6.000000000000001 +(signed word) main::return +(byte) main::stopIt +(byte) main::stopIt#15 stopIt zp[1]:9 7.333333333333333 +(byte) main::stopIt#5 stopIt zp[1]:9 0.7857142857142858 +(byte) main::type +(byte) main::type#10 type zp[1]:6 2.75 +(byte) main::type#2 type zp[1]:6 11.0 +(byte) main::type#4 type zp[1]:6 5.5 +(const byte) maxC64Images = (number) $100 +(const byte) maxDrawObjects = (number) $18 +(const byte) maxSprImages = (number) 8 +(const byte) maxSprites = (number) $20 +(const byte) rfDrop = (number) $fe +(const byte) sprOff = (number) $40 + +reg byte x [ main::i#12 main::i#2 ] +reg byte x [ main::i#14 main::i#4 ] +zp[2]:2 [ main::c#10 main::c#2 ] +zp[2]:4 [ main::c#11 main::c#4 ] +reg byte x [ main::i#17 main::i#7 ] +zp[1]:6 [ main::type#4 main::type#10 main::type#2 ] +zp[2]:7 [ main::c#16 main::c#18 main::c#7 ] +zp[1]:9 [ main::stopIt#5 main::stopIt#15 ] +zp[1]:10 [ main::i#22 main::i#9 ] +zp[2]:11 [ main::d#10 main::d#2 ] +zp[1]:13 [ main::objects#12 main::objects#9 main::objects#17 main::objects#1 main::objects#15 ] +zp[2]:14 [ main::oCount#7 main::oCount#17 main::oCount#20 main::oCount#2 ] +reg byte y [ Print00::c#5 Print00::c#2 ] +reg byte x [ Print00::v#5 Print00::v#3 Print00::v0#0 Print00::v#1 Print00::v#2 ] +reg byte y [ Print00::c#10 Print00::c#4 ] +reg byte x [ GetSprite::return#2 GetSprite::t0#3 GetSprite::t0#2 ] +reg byte y [ AddSprite::t0#3 AddSprite::t0#2 ] +reg byte x [ DelSprite::sn#0 ] +reg byte x [ GetSprite::return#4 ] +reg byte x [ main::i#11 ] +reg byte x [ AddSprite::sn#1 ] +zp[2]:16 [ main::$27 ] +zp[2]:18 [ main::$28 ] +reg byte a [ main::$132 ] +reg byte a [ main::$52 ] +zp[2]:20 [ main::d1#0 ] +zp[2]:22 [ main::$111 ] +zp[2]:24 [ main::$112 ] +zp[2]:26 [ main::$109 ] +zp[2]:28 [ main::$110 ]