From c920c360a1d14837f5ed7c49bcde1d241c58fc9f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 1 Nov 2020 22:42:09 +0100 Subject: [PATCH] Variables used in ASM is now automatically converted to volatile if not const. Beware that char * const var; and char * volatile var; do behave quite differently when used in ASM Closes #554 --- .../cache/fragment-cache-csg65ce02.asm | 2 +- .../cache/fragment-cache-mega45gs02.asm | 2 +- .../fragment/cache/fragment-cache-mos6502.asm | 2 +- .../cache/fragment-cache-mos6502x.asm | 18262 ++++++++++++++++ .../cache/fragment-cache-wdc65c02.asm | 2 +- .../java/dk/camelot64/kickc/Compiler.java | 2 +- .../dk/camelot64/kickc/test/TestPrograms.java | 8 +- src/test/kc/function-pointer-noarg-call-13.c | 6 +- src/test/kc/function-pointer-problem-1.c | 6 +- ...fout-illegal.c => inline-asm-refout-var.c} | 4 +- src/test/kc/inline-kickasm-uses-problem.c | 6 +- src/test/ref/address-5.cfg | 2 +- src/test/ref/address-5.log | 17 +- src/test/ref/address-5.sym | 4 +- src/test/ref/address-6.cfg | 2 +- src/test/ref/address-6.log | 17 +- src/test/ref/address-6.sym | 4 +- src/test/ref/atarixl-md5.asm | 54 +- src/test/ref/atarixl-md5.cfg | 2 +- src/test/ref/atarixl-md5.log | 252 +- src/test/ref/atarixl-md5.sym | 72 +- .../examples/atari2600/atari2600-sprites.log | 7 +- .../examples/atari2600/atari2600-sprites.sym | 2 +- .../eightqueens/eightqueens-recursive.asm | 187 +- .../eightqueens/eightqueens-recursive.log | 772 +- .../eightqueens/eightqueens-recursive.sym | 284 +- src/test/ref/function-pointer-noarg-3.asm | 20 +- src/test/ref/function-pointer-noarg-3.cfg | 16 +- src/test/ref/function-pointer-noarg-3.log | 174 +- src/test/ref/function-pointer-noarg-3.sym | 5 +- .../ref/function-pointer-noarg-call-13.asm | 4 +- .../ref/function-pointer-noarg-call-13.cfg | 4 +- .../ref/function-pointer-noarg-call-13.log | 47 +- .../ref/function-pointer-noarg-call-13.sym | 4 +- src/test/ref/function-pointer-problem-1.asm | 12 +- src/test/ref/function-pointer-problem-1.cfg | 6 +- src/test/ref/function-pointer-problem-1.log | 76 +- src/test/ref/function-pointer-problem-1.sym | 5 +- src/test/ref/inline-asm-ma-var.log | 7 +- src/test/ref/inline-asm-ma-var.sym | 2 +- src/test/ref/inline-asm-refout-var.asm | 23 + src/test/ref/inline-asm-refout-var.cfg | 13 + src/test/ref/inline-asm-refout-var.log | 187 + src/test/ref/inline-asm-refout-var.sym | 5 + src/test/ref/inline-kickasm-uses-problem.log | 18 +- src/test/ref/inline-kickasm-uses-problem.sym | 4 +- src/test/ref/problem-ma-var-overwrite.asm | 10 +- src/test/ref/problem-ma-var-overwrite.log | 45 +- src/test/ref/problem-ma-var-overwrite.sym | 8 +- src/test/ref/register-0.cfg | 13 +- src/test/ref/register-0.log | 141 +- src/test/ref/register-0.sym | 9 +- src/test/ref/string-escapes-4.cfg | 9 +- src/test/ref/string-escapes-4.log | 85 +- src/test/ref/string-escapes-4.sym | 8 +- 55 files changed, 19738 insertions(+), 1202 deletions(-) rename src/test/kc/{inline-asm-refout-illegal.c => inline-asm-refout-var.c} (54%) create mode 100644 src/test/ref/inline-asm-refout-var.asm create mode 100644 src/test/ref/inline-asm-refout-var.cfg create mode 100644 src/test/ref/inline-asm-refout-var.log create mode 100644 src/test/ref/inline-asm-refout-var.sym diff --git a/src/main/fragment/cache/fragment-cache-csg65ce02.asm b/src/main/fragment/cache/fragment-cache-csg65ce02.asm index 66fced8bb..aaae666bf 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 107d6cfa86 107d6d178e +//KICKC FRAGMENT CACHE 10dedb3bb9 10dedb58e1 //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 34eb1396d..a05e7c2da 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 107d6cfa86 107d6d178e +//KICKC FRAGMENT CACHE 10dedb3bb9 10dedb58e1 //FRAGMENT _deref_pbuc1=vbuc2 lda #{c2} sta {c1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502.asm b/src/main/fragment/cache/fragment-cache-mos6502.asm index 8c9add5e7..275e567d0 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 107d6cfa86 107d6d178e +//KICKC FRAGMENT CACHE 10dedb3bb9 10dedb58e1 //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 0c61e241a..91821e66d 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502x.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm @@ -1690,3 +1690,18265 @@ beq {la1} //FRAGMENT vbuc1_eq_vbuyy_then_la1 cpy #{c1} beq {la1} +//FRAGMENT vwuz1=vwuz1_plus_vwuc1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vbuz1_neq_vbuc1_then_la1 +lda #{c1} +cmp {z1} +bne {la1} +//FRAGMENT vwsz1_lt_0_then_la1 +lda {z1}+1 +bmi {la1} +//FRAGMENT vwsz1=_neg_vwsz1 +sec +lda #0 +sbc {z1} +sta {z1} +lda #0 +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vbuz1=_hi_vwuz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=_lo_vwuz2 +lda {z2} +sta {z1} +//FRAGMENT pbuz1_lt_pbuz2_then_la1 +lda {z1}+1 +cmp {z2}+1 +bcc {la1} +bne !+ +lda {z1} +cmp {z2} +bcc {la1} +!: +//FRAGMENT vbuxx_neq_vbuc1_then_la1 +cpx #{c1} +bne {la1} +//FRAGMENT vbuaa=_hi_vwuz1 +lda {z1}+1 +//FRAGMENT vbuxx=_hi_vwuz1 +ldx {z1}+1 +//FRAGMENT vbuaa=_lo_vwuz1 +lda {z1} +//FRAGMENT vbuxx=_lo_vwuz1 +ldx {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy +lda {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2 +lda #{c2} +ldy {z1} +sta {c1},y +//FRAGMENT vbuz1=vbuz1_plus_2 +lda {z1} +clc +adc #2 +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuaa=vbuc2 +tay +lda #{c2} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=vbuc2 +lda #{c2} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuc2 +lda #{c2} +sta {c1},y +//FRAGMENT vbuxx=vbuxx_plus_2 +inx +inx +//FRAGMENT vbuyy_lt_vbuc1_then_la1 +cpy #{c1} +bcc {la1} +//FRAGMENT vbuyy=vbuyy_plus_2 +iny +iny +//FRAGMENT vwuz1_lt_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vbsz1=vbsz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=_hi_vwsz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=vbuc1_plus_vbuz2 +lax {z2} +axs #-[{c1}] +stx {z1} +//FRAGMENT pbuz1_neq_pbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vwuz1=vwuz1_minus_vwuc1 +lda {z1} +sec +sbc #<{c1} +sta {z1} +lda {z1}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_minus_vwuz1 +sec +lda #<{c1} +sbc {z1} +sta {z1} +lda #>{c1} +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vbuz1=vbuz2_minus_vbuz3 +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 vbsz1=_neg_vbsz2 +lda {z2} +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbuz1=vbuz2_minus_vbuc1 +lax {z2} +axs #{c1} +stx {z1} +//FRAGMENT vwuz1=vwuz1_sethi_vbuz2 +lda {z2} +sta {z1}+1 +//FRAGMENT vbsz1_lt_0_then_la1 +lda {z1} +bmi {la1} +//FRAGMENT vbsz1=_neg_vbsz1 +lda {z1} +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vwuz1=vwuz1_bor_vbuc1 +lda #{c1} +ora {z1} +sta {z1} +//FRAGMENT vwuz1=vwuz2_rol_vbuz3 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +ldy {z3} +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vbuz1_neq_0_then_la1 +lda {z1} +cmp #0 +bne {la1} +//FRAGMENT vbuz1=vbuz1_ror_1 +lsr {z1} +//FRAGMENT vbsaa=vbsz1 +lda {z1} +//FRAGMENT vbsxx=vbsz1 +ldx {z1} +//FRAGMENT vbsz1=vbsaa +sta {z1} +//FRAGMENT vbuaa=_hi_vwsz1 +lda {z1}+1 +//FRAGMENT vbuxx=_hi_vwsz1 +ldx {z1}+1 +//FRAGMENT vbuaa=vbuc1_plus_vbuz1 +lda #{c1} +clc +adc {z1} +//FRAGMENT vbuxx=vbuc1_plus_vbuz1 +lax {z1} +axs #-[{c1}] +//FRAGMENT vbuyy=vbuc1_plus_vbuz1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbuz1=vbuc1_plus_vbuaa +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_plus_vbuaa +clc +adc #{c1} +//FRAGMENT vbuxx=vbuc1_plus_vbuaa +tax +axs #-[{c1}] +//FRAGMENT vbuyy=vbuyy_band_vbuc1 +tya +and #{c1} +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +//FRAGMENT vbuz1=vbuaa_minus_vbuz2 +sec +sbc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_minus_vbuz2 +txa +sec +sbc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_minus_vbuz2 +tya +sec +sbc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_minus_vbuaa +eor #$ff +sec +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuaa_minus_vbuaa +lda #0 +sta {z1} +//FRAGMENT vbuz1=vbuxx_minus_vbuaa +sta $ff +txa +sec +sbc $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_minus_vbuaa +sta $ff +tya +sec +sbc $ff +sta {z1} +//FRAGMENT vbuz1=vbuz2_minus_vbuxx +txa +eor #$ff +sec +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuaa_minus_vbuxx +stx $ff +sec +sbc $ff +sta {z1} +//FRAGMENT vbuz1=vbuxx_minus_vbuxx +lda #0 +sta {z1} +//FRAGMENT vbuz1=vbuyy_minus_vbuxx +tya +stx $ff +sec +sbc $ff +sta {z1} +//FRAGMENT vbuz1=vbuz2_minus_vbuyy +tya +eor #$ff +sec +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuaa_minus_vbuyy +sty $ff +sec +sbc $ff +sta {z1} +//FRAGMENT vbuz1=vbuxx_minus_vbuyy +txa +sty $ff +sec +sbc $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_minus_vbuyy +lda #0 +sta {z1} +//FRAGMENT vbuaa=vbuz1_minus_vbuz2 +lda {z1} +sec +sbc {z2} +//FRAGMENT vbuaa=vbuaa_minus_vbuz1 +sec +sbc {z1} +//FRAGMENT vbuaa=vbuxx_minus_vbuz1 +txa +sec +sbc {z1} +//FRAGMENT vbuaa=vbuyy_minus_vbuz1 +tya +sec +sbc {z1} +//FRAGMENT vbuaa=vbuz1_minus_vbuaa +eor #$ff +sec +adc {z1} +//FRAGMENT vbuaa=vbuaa_minus_vbuaa +lda #0 +//FRAGMENT vbuaa=vbuxx_minus_vbuaa +sta $ff +txa +sec +sbc $ff +//FRAGMENT vbuaa=vbuyy_minus_vbuaa +sta $ff +tya +sec +sbc $ff +//FRAGMENT vbuaa=vbuz1_minus_vbuxx +txa +eor #$ff +sec +adc {z1} +//FRAGMENT vbuaa=vbuaa_minus_vbuxx +stx $ff +sec +sbc $ff +//FRAGMENT vbuaa=vbuxx_minus_vbuxx +lda #0 +//FRAGMENT vbuaa=vbuyy_minus_vbuxx +tya +stx $ff +sec +sbc $ff +//FRAGMENT vbuaa=vbuz1_minus_vbuyy +tya +eor #$ff +sec +adc {z1} +//FRAGMENT vbuaa=vbuaa_minus_vbuyy +sty $ff +sec +sbc $ff +//FRAGMENT vbuaa=vbuxx_minus_vbuyy +txa +sty $ff +sec +sbc $ff +//FRAGMENT vbuaa=vbuyy_minus_vbuyy +lda #0 +//FRAGMENT vbuxx=vbuz1_minus_vbuz2 +lda {z1} +sec +sbc {z2} +tax +//FRAGMENT vbuxx=vbuaa_minus_vbuz1 +sec +sbc {z1} +tax +//FRAGMENT vbuxx=vbuyy_minus_vbuz1 +tya +sec +sbc {z1} +tax +//FRAGMENT vbuxx=vbuz1_minus_vbuaa +eor #$ff +sec +adc {z1} +tax +//FRAGMENT vbuxx=vbuaa_minus_vbuaa +lda #0 +tax +//FRAGMENT vbuxx=vbuyy_minus_vbuaa +sta $ff +tya +sec +sbc $ff +tax +//FRAGMENT vbuxx=vbuz1_minus_vbuxx +txa +eor #$ff +sec +adc {z1} +tax +//FRAGMENT vbuxx=vbuaa_minus_vbuxx +stx $ff +sec +sbc $ff +tax +//FRAGMENT vbuxx=vbuyy_minus_vbuxx +tya +stx $ff +sec +sbc $ff +tax +//FRAGMENT vbuxx=vbuz1_minus_vbuyy +tya +eor #$ff +sec +adc {z1} +tax +//FRAGMENT vbuxx=vbuaa_minus_vbuyy +sty $ff +sec +sbc $ff +tax +//FRAGMENT vbuxx=vbuyy_minus_vbuyy +lda #0 +tax +//FRAGMENT vbuyy=vbuz1_minus_vbuz2 +lda {z1} +sec +sbc {z2} +tay +//FRAGMENT vbuyy=vbuaa_minus_vbuz1 +sec +sbc {z1} +tay +//FRAGMENT vbuyy=vbuxx_minus_vbuz1 +txa +sec +sbc {z1} +tay +//FRAGMENT vbuyy=vbuyy_minus_vbuz1 +tya +sec +sbc {z1} +tay +//FRAGMENT vbuyy=vbuz1_minus_vbuaa +eor #$ff +sec +adc {z1} +tay +//FRAGMENT vbuyy=vbuaa_minus_vbuaa +lda #0 +tay +//FRAGMENT vbuyy=vbuxx_minus_vbuaa +sta $ff +txa +sec +sbc $ff +tay +//FRAGMENT vbuyy=vbuyy_minus_vbuaa +sta $ff +tya +sec +sbc $ff +tay +//FRAGMENT vbuyy=vbuz1_minus_vbuxx +txa +eor #$ff +sec +adc {z1} +tay +//FRAGMENT vbuyy=vbuaa_minus_vbuxx +stx $ff +sec +sbc $ff +tay +//FRAGMENT vbuyy=vbuxx_minus_vbuxx +lda #0 +tay +//FRAGMENT vbuyy=vbuyy_minus_vbuxx +tya +stx $ff +sec +sbc $ff +tay +//FRAGMENT vbuyy=vbuz1_minus_vbuyy +tya +eor #$ff +sec +adc {z1} +tay +//FRAGMENT vbuyy=vbuaa_minus_vbuyy +sty $ff +sec +sbc $ff +tay +//FRAGMENT vbuyy=vbuxx_minus_vbuyy +txa +sty $ff +sec +sbc $ff +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} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuaa +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_vbuaa +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuaa +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 +adc $ff +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus_vbuaa +stx $ff +clc +adc $ff +//FRAGMENT vbuxx=vbuxx_plus_vbuaa +stx $ff +clc +adc $ff +tax +//FRAGMENT vbuyy=vbuxx_plus_vbuaa +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 +adc $ff +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_vbuaa +sty $ff +clc +adc $ff +//FRAGMENT vbuxx=vbuyy_plus_vbuaa +sty $ff +clc +adc $ff +tax +//FRAGMENT vbuyy=vbuyy_plus_vbuaa +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 vbsaa=_neg_vbsz1 +lda {z1} +eor #$ff +clc +adc #$01 +//FRAGMENT vbsxx=_neg_vbsz1 +lda {z1} +eor #$ff +clc +adc #$01 +tax +//FRAGMENT vbsyy=_neg_vbsz1 +lda {z1} +eor #$ff +clc +adc #$01 +tay +//FRAGMENT vbsz1=_neg_vbsaa +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbsaa=_neg_vbsaa +eor #$ff +clc +adc #$01 +//FRAGMENT vbsxx=_neg_vbsaa +eor #$ff +clc +adc #$01 +tax +//FRAGMENT vbsyy=_neg_vbsaa +eor #$ff +clc +adc #$01 +tay +//FRAGMENT vbsz1=_neg_vbsxx +txa +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbsaa=_neg_vbsxx +txa +eor #$ff +clc +adc #$01 +//FRAGMENT vbsxx=_neg_vbsxx +txa +eor #$ff +clc +adc #$01 +tax +//FRAGMENT vbsyy=_neg_vbsxx +txa +eor #$ff +clc +adc #$01 +tay +//FRAGMENT vbsz1=_neg_vbsyy +tya +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbsaa=_neg_vbsyy +tya +eor #$ff +clc +adc #$01 +//FRAGMENT vbsxx=_neg_vbsyy +tya +eor #$ff +clc +adc #$01 +tax +//FRAGMENT vbsyy=_neg_vbsyy +tya +eor #$ff +clc +adc #$01 +tay +//FRAGMENT vbuz1=vbuaa_minus_vbuc1 +sec +sbc #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuxx_minus_vbuc1 +txa +axs #{c1} +stx {z1} +//FRAGMENT vbuz1=vbuyy_minus_vbuc1 +tya +sec +sbc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuz1_minus_vbuc1 +lda {z1} +sec +sbc #{c1} +//FRAGMENT vbuaa=vbuaa_minus_vbuc1 +sec +sbc #{c1} +//FRAGMENT vbuaa=vbuxx_minus_vbuc1 +txa +sec +sbc #{c1} +//FRAGMENT vbuaa=vbuyy_minus_vbuc1 +tya +sec +sbc #{c1} +//FRAGMENT vbuxx=vbuz1_minus_vbuc1 +lax {z1} +axs #{c1} +//FRAGMENT vbuxx=vbuaa_minus_vbuc1 +tax +axs #{c1} +//FRAGMENT vwuz1=vwuz1_sethi_vbuaa +sta {z1}+1 +//FRAGMENT vbsaa_lt_0_then_la1 +cmp #0 +bmi {la1} +//FRAGMENT vwuz1=vwuz2_rol_vbuxx +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +cpx #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dex +bne !- +!e: +//FRAGMENT vwuz1=vwuz2_rol_vbuyy +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vbuxx_neq_0_then_la1 +cpx #0 +bne {la1} +//FRAGMENT vbsz1=vbsxx +stx {z1} +//FRAGMENT vbuxx=vbuxx_ror_1 +txa +lsr +tax +//FRAGMENT vbuyy_neq_0_then_la1 +cpy #0 +bne {la1} +//FRAGMENT vbuyy=vbuyy_ror_1 +tya +lsr +tay +//FRAGMENT vbuyy=_hi_vwuz1 +ldy {z1}+1 +//FRAGMENT vbuyy_neq_vbuc1_then_la1 +cpy #{c1} +bne {la1} +//FRAGMENT vbuaa=_dec_vbuaa +sec +sbc #1 +//FRAGMENT vbuxx=_dec_vbuxx +dex +//FRAGMENT vbuyy=_dec_vbuyy +dey +//FRAGMENT vbsz1=vbsyy +sty {z1} +//FRAGMENT vbsaa=vbsxx +txa +//FRAGMENT vbsaa=vbsyy +tya +//FRAGMENT vbsxx=vbsaa +tax +//FRAGMENT vbsxx=vbsyy +tya +tax +//FRAGMENT vbsyy=vbsz1 +ldy {z1} +//FRAGMENT vbsyy=vbsaa +tay +//FRAGMENT vbsyy=vbsxx +txa +tay +//FRAGMENT vwuz1=vwuz1_sethi_vbuxx +stx {z1}+1 +//FRAGMENT vbuxx=vbuxx_minus_vbuc1 +txa +axs #{c1} +//FRAGMENT vbuxx=vbuyy_minus_vbuc1 +tya +tax +axs #{c1} +//FRAGMENT vbuyy=vbuz1_minus_vbuc1 +lda {z1} +sec +sbc #{c1} +tay +//FRAGMENT vwuz1=vwuz1_sethi_vbuyy +sty {z1}+1 +//FRAGMENT vbuyy=vbuaa_minus_vbuc1 +sec +sbc #{c1} +tay +//FRAGMENT vbuyy=vbuxx_minus_vbuc1 +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} +//FRAGMENT vbsxx_lt_0_then_la1 +cpx #0 +bmi {la1} +//FRAGMENT vbuz1=vbuc1_plus_vbuxx +txa +axs #-[{c1}] +stx {z1} +//FRAGMENT vbuyy=_hi_vwsz1 +ldy {z1}+1 +//FRAGMENT vbuz1=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_plus__hi_vwsz2 +lda #{c1} +clc +adc {z2}+1 +sta {z1} +//FRAGMENT vwuz1=vwuz1_rol_vbuz2 +ldy {z2} +beq !e+ +!: +asl {z1} +rol {z1}+1 +dey +bne !- +!e: +//FRAGMENT vbuz1_eq_vbuz2_then_la1 +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} +beq {la1} +//FRAGMENT vbuyy_eq_vbuz1_then_la1 +tya +cmp {z1} +beq {la1} +//FRAGMENT vbuyy_eq_vbuaa_then_la1 +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT vbuz1_ge_vbuc1_then_la1 +lda {z1} +cmp #{c1} +bcs {la1} +//FRAGMENT vbuaa_ge_vbuc1_then_la1 +cmp #{c1} +bcs {la1} +//FRAGMENT vbuaa_neq_0_then_la1 +cmp #0 +bne {la1} +//FRAGMENT vbuxx_ge_vbuc1_then_la1 +cpx #{c1} +bcs {la1} +//FRAGMENT vbuyy_ge_vbuc1_then_la1 +cpy #{c1} +bcs {la1} +//FRAGMENT vbuc1_neq_pbuz1_derefidx_vbuz2_then_la1 +ldy {z2} +lda ({z1}),y + +cmp #{c1} +bne {la1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuz2 +ldy {z2} +lda ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=vbuaa +stx $ff +ldy $ff +sta ({z1}),y +//FRAGMENT vbuc1_neq_pbuz1_derefidx_vbuaa_then_la1 +tay +lda ({z1}),y + +cmp #{c1} +bne {la1} +//FRAGMENT vbuc1_neq_pbuz1_derefidx_vbuxx_then_la1 +txa +tay +lda ({z1}),y + +cmp #{c1} +bne {la1} +//FRAGMENT vbuc1_neq_pbuz1_derefidx_vbuyy_then_la1 +lda ({z1}),y + +cmp #{c1} +bne {la1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuxx +txa +tay +lda ({z1}),y +//FRAGMENT vbuaa=pbuz1_derefidx_vbuyy +lda ({z1}),y +//FRAGMENT vbuz1_neq_vbuz2_then_la1 +lda {z1} +cmp {z2} +bne {la1} +//FRAGMENT vbuz1_gt_vbuz2_then_la1 +lda {z2} +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_neq_vbuaa_then_la1 +cmp {z1} +bne {la1} +//FRAGMENT vbuz1_gt_vbuaa_then_la1 +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_neq_vbuxx_then_la1 +cpx {z1} +bne {la1} +//FRAGMENT vbuz1_gt_vbuxx_then_la1 +cpx {z1} +bcc {la1} +//FRAGMENT vbuz1_neq_vbuyy_then_la1 +cpy {z1} +bne {la1} +//FRAGMENT vbuz1_gt_vbuyy_then_la1 +cpy {z1} +bcc {la1} +//FRAGMENT vbuxx_neq_vbuz1_then_la1 +cpx {z1} +bne {la1} +//FRAGMENT vbuxx_gt_vbuz1_then_la1 +cpx {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuxx_neq_vbuyy_then_la1 +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vbuxx_gt_vbuyy_then_la1 +stx $ff +cpy $ff +bcc {la1} +//FRAGMENT vbuyy_neq_vbuz1_then_la1 +cpy {z1} +bne {la1} +//FRAGMENT vbuyy_gt_vbuz1_then_la1 +cpy {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuyy_neq_vbuxx_then_la1 +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vbuyy_gt_vbuxx_then_la1 +sty $ff +cpx $ff +bcc {la1} +//FRAGMENT pbuc1_derefidx_vbuz1=vbuz1 +ldy {z1} +tya +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuaa=vbuaa +tax +sta {c1},x +//FRAGMENT vbuaa_neq_vbuc1_then_la1 +cmp #{c1} +bne {la1} +//FRAGMENT vbuaa=_inc_vbuaa +clc +adc #1 +//FRAGMENT vbuz1=vbuz2_rol_1 +lda {z2} +asl +sta {z1} +//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 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 +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_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_pbuc1=_deref_pbuc1_bor_vbuc2 +lda #{c2} +ora {c1} +sta {c1} +//FRAGMENT _deref_qprc1=pprc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT _deref_pbuc1_lt_vbuc2_then_la1 +lda {c1} +cmp #{c2} +bcc {la1} +//FRAGMENT qbuz1=qbuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT vbsz1=pbsc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +//FRAGMENT vwsz1=vwsz2_plus_vwsc1 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_rol_1 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +//FRAGMENT vbuz1=vbuz1_plus_vbuc1 +lax {z1} +axs #-[{c1}] +stx {z1} +//FRAGMENT vbsz1=vbsz1_plus_vbsc1 +lax {z1} +axs #-[{c1}] +stx {z1} +//FRAGMENT _deref_pbuc1=_deref_pbuc2 +lda {c2} +sta {c1} +//FRAGMENT vbuz1=vbuz1_plus_vbuz2 +lda {z1} +clc +adc {z2} +sta {z1} +//FRAGMENT vwuz1=vwuz1_plus_vbuz2 +lda {z2} +clc +adc {z1} +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 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} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT pbuz1=qbuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT vbuz1=vbuz2_ror_2 +lda {z2} +lsr +lsr +sta {z1} +//FRAGMENT vbuz1=vbuz2_ror_3 +lda {z2} +lsr +lsr +lsr +sta {z1} +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vbuz3 +lda {z3} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT _deref_qbuz1=pbuz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT qbuz1=qbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vbuz1=vbuz2_band__deref_pbuc1 +lda {c1} +and {z2} +sta {z1} +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz3_derefidx_vbuz2 +ldy {z2} +lda ({z3}),y +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2_eq_pbuz3_derefidx_vbuz2_then_la1 +ldy {z2} +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 vbuz1=pbuc1_derefidx_vbuz2_band_vbuc2 +lda #{c2} +ldy {z2} +and {c1},y +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_ror_1 +ldy {z2} +lda {c1},y +lsr +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT vbuz1=vbuz1_minus_vbuc1 +lax {z1} +axs #{c1} +stx {z1} +//FRAGMENT _deref_pbuz1=_deref_pbuc1 +lda {c1} +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbsc1_ge_0_then_la1 +lda {c1} +cmp #0 +bpl {la1} +//FRAGMENT vbuz1=vbuz2_minus__deref_pbuc1 +lda {z2} +sec +sbc {c1} +sta {z1} +//FRAGMENT vbuz1=_bnot__deref_pbuc1 +lda {c1} +eor #$ff +sta {z1} +//FRAGMENT vwuz1=_deref_pbuc1_word__deref_pbuc2 +lda {c2} +sta {z1} +lda {c1} +sta {z1}+1 +//FRAGMENT vbsz1=pbsc1_derefidx_vbuxx +lda {c1},x +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbuyy +lda {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +//FRAGMENT vbsaa=pbsc1_derefidx_vbuxx +lda {c1},x +//FRAGMENT vbsaa=pbsc1_derefidx_vbuyy +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}] +//FRAGMENT vbsyy=vbsyy_plus_vbsc1 +tya +clc +adc #{c1} +tay +//FRAGMENT vbuz1=vbuz1_plus_vbuxx +txa +clc +adc {z1} +sta {z1} +//FRAGMENT vwuz1=vwuz1_plus_vbuxx +txa +clc +adc {z1} +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} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT qbuc1_derefidx_vbuxx=pbuc2 +lda #<{c2} +sta {c1},x +lda #>{c2} +sta {c1}+1,x +//FRAGMENT qbuc1_derefidx_vbuyy=pbuc2 +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT pbuz1=qbuc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pbuz1=qbuc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda {c1}+1,x +sta {z1}+1 +//FRAGMENT pbuz1=qbuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT vbuz1=vbuaa_ror_2 +lsr +lsr +sta {z1} +//FRAGMENT vbuz1=vbuxx_ror_2 +txa +lsr +lsr +sta {z1} +//FRAGMENT vbuz1=vbuyy_ror_2 +tya +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=vbuz1_ror_2 +lda {z1} +lsr +lsr +//FRAGMENT vbuaa=vbuaa_ror_2 +lsr +lsr +//FRAGMENT vbuaa=vbuxx_ror_2 +txa +lsr +lsr +//FRAGMENT vbuaa=vbuyy_ror_2 +tya +lsr +lsr +//FRAGMENT vbuxx=vbuz1_ror_2 +lda {z1} +lsr +lsr +tax +//FRAGMENT vbuxx=vbuaa_ror_2 +lsr +lsr +tax +//FRAGMENT vbuxx=vbuxx_ror_2 +txa +lsr +lsr +tax +//FRAGMENT vbuxx=vbuyy_ror_2 +tya +lsr +lsr +tax +//FRAGMENT vbuyy=vbuz1_ror_2 +lda {z1} +lsr +lsr +tay +//FRAGMENT vbuyy=vbuaa_ror_2 +lsr +lsr +tay +//FRAGMENT vbuyy=vbuxx_ror_2 +txa +lsr +lsr +tay +//FRAGMENT vbuyy=vbuyy_ror_2 +tya +lsr +lsr +tay +//FRAGMENT vbuaa=vbuz1_ror_3 +lda {z1} +lsr +lsr +lsr +//FRAGMENT vbuxx=vbuz1_ror_3 +lda {z1} +lsr +lsr +lsr +tax +//FRAGMENT vbuyy=vbuz1_ror_3 +lda {z1} +lsr +lsr +lsr +tay +//FRAGMENT vbuz1=vbuxx_ror_3 +txa +lsr +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=vbuxx_ror_3 +txa +lsr +lsr +lsr +//FRAGMENT vbuxx=vbuxx_ror_3 +txa +lsr +lsr +lsr +tax +//FRAGMENT vbuyy=vbuxx_ror_3 +txa +lsr +lsr +lsr +tay +//FRAGMENT vbuz1=vbuyy_ror_3 +tya +lsr +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=vbuyy_ror_3 +tya +lsr +lsr +lsr +//FRAGMENT vbuxx=vbuyy_ror_3 +tya +lsr +lsr +lsr +tax +//FRAGMENT vbuyy=vbuyy_ror_3 +tya +lsr +lsr +lsr +tay +//FRAGMENT vwuz1=pwuc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda {c1}+1,x +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vbuxx +txa +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vbuyy +tya +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vbuz1=vbuaa_rol_2 +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=vbuaa_rol_2 +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 vbuaa=vbuz1_band__deref_pbuc1 +lda {c1} +and {z1} +//FRAGMENT vbuxx=vbuz1_band__deref_pbuc1 +lda {c1} +and {z1} +tax +//FRAGMENT vbuyy=vbuz1_band__deref_pbuc1 +lda {c1} +and {z1} +tay +//FRAGMENT vbuz1=vbuaa_band__deref_pbuc1 +and {c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_band__deref_pbuc1 +and {c1} +//FRAGMENT vbuxx=vbuaa_band__deref_pbuc1 +ldx {c1} +axs #0 +//FRAGMENT vbuaa_neq_vbuz1_then_la1 +cmp {z1} +bne {la1} +//FRAGMENT pbuz1_derefidx_vbuaa=pbuz2_derefidx_vbuaa +tay +lda ({z2}),y +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz2_derefidx_vbuxx +txa +tay +lda ({z2}),y +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz2_derefidx_vbuyy +lda ({z2}),y +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa_eq_pbuz2_derefidx_vbuaa_then_la1 +tay +lda ({z1}),y + +cmp ({z2}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuxx_eq_pbuz2_derefidx_vbuxx_then_la1 +txa +tay +lda ({z1}),y + +cmp ({z2}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuyy_eq_pbuz2_derefidx_vbuyy_then_la1 +lda ({z1}),y + +cmp ({z2}),y +beq {la1} +//FRAGMENT vbuaa_gt_0_then_la1 +cmp #0 +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuaa +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} +and {c1},y +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldx {z1} +and {c1},x +tax +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_band_vbuc2 +tax +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +tay +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +tay +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +tay +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_ror_1 +ldy {z1} +lda {c1},y +lsr +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_ror_1 +ldx {z1} +lda {c1},x +lsr +tax +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +tax +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_ror_1 +ldy {z1} +lda {c1},y +lsr +tay +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +tay +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_ror_1 +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} +//FRAGMENT vbuxx=vbuyy_bor_vbuz1 +tya +ora {z1} +tax +//FRAGMENT vbuyy=vbuyy_bor_vbuz1 +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 +tax +//FRAGMENT vbuyy=vbuyy_bor_vbuaa +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 +//FRAGMENT vbuaa=vbuz1_minus__deref_pbuc1 +lda {z1} +sec +sbc {c1} +//FRAGMENT vbuxx=vbuz1_minus__deref_pbuc1 +lda {z1} +sec +sbc {c1} +tax +//FRAGMENT vbuyy=vbuz1_minus__deref_pbuc1 +lda {z1} +sec +sbc {c1} +tay +//FRAGMENT vbuz1=vbuaa_minus__deref_pbuc1 +sec +sbc {c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_minus__deref_pbuc1 +sec +sbc {c1} +//FRAGMENT vbuxx=vbuaa_minus__deref_pbuc1 +sec +sbc {c1} +tax +//FRAGMENT vbuyy=vbuaa_minus__deref_pbuc1 +sec +sbc {c1} +tay +//FRAGMENT vbuz1=vbuxx_minus__deref_pbuc1 +txa +sec +sbc {c1} +sta {z1} +//FRAGMENT vbuaa=vbuxx_minus__deref_pbuc1 +txa +sec +sbc {c1} +//FRAGMENT vbuxx=vbuxx_minus__deref_pbuc1 +txa +sec +sbc {c1} +tax +//FRAGMENT vbuyy=vbuxx_minus__deref_pbuc1 +txa +sec +sbc {c1} +tay +//FRAGMENT vbuz1=vbuyy_minus__deref_pbuc1 +tya +sec +sbc {c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_minus__deref_pbuc1 +tya +sec +sbc {c1} +//FRAGMENT vbuxx=vbuyy_minus__deref_pbuc1 +tya +sec +sbc {c1} +tax +//FRAGMENT vbuyy=vbuyy_minus__deref_pbuc1 +tya +sec +sbc {c1} +tay +//FRAGMENT vbuaa=_bnot__deref_pbuc1 +lda {c1} +eor #$ff +//FRAGMENT vbuxx=_bnot__deref_pbuc1 +lda {c1} +eor #$ff +tax +//FRAGMENT vbuyy=_bnot__deref_pbuc1 +lda {c1} +eor #$ff +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbuz1 +ldx {z1} +ldy {c1},x +//FRAGMENT vbuxx_gt_0_then_la1 +cpx #0 +bne {la1} +//FRAGMENT vbuz1=vbuyy_bor_vbuxx +txa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuyy_gt_0_then_la1 +cpy #0 +bne {la1} +//FRAGMENT vbuyy=_lo_vwuz1 +ldy {z1} +//FRAGMENT vbuz1=vbuxx_band__deref_pbuc1 +lda {c1} +sax {z1} +//FRAGMENT vbuz1=vbuyy_band__deref_pbuc1 +tya +and {c1} +sta {z1} +//FRAGMENT vbuaa=vbuxx_band__deref_pbuc1 +txa +and {c1} +//FRAGMENT vbuaa=vbuyy_band__deref_pbuc1 +tya +and {c1} +//FRAGMENT vbuxx=vbuxx_band__deref_pbuc1 +lda {c1} +axs #0 +//FRAGMENT vbuxx=vbuyy_band__deref_pbuc1 +ldx {c1} +tya +axs #0 +//FRAGMENT vbuyy=vbuaa_band__deref_pbuc1 +and {c1} +tay +//FRAGMENT vbuyy=vbuxx_band__deref_pbuc1 +txa +and {c1} +tay +//FRAGMENT vbuyy=vbuyy_band__deref_pbuc1 +tya +and {c1} +tay +//FRAGMENT pbuc1_derefidx_vbuxx=vbuaa +sta {c1},x +//FRAGMENT vwsz1=vwsz1_plus_vwsc1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuz1_plus_vbuxx +txa +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vwsz1=vwsz1_rol_1 +asl {z1} +rol {z1}+1 +//FRAGMENT vbuz1=vbuz2_plus_vbuc1 +lax {z2} +axs #-[{c1}] +stx {z1} +//FRAGMENT vbuaa=_deref_pbuc1 +lda {c1} +//FRAGMENT vbuaa=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_vbuc1 +lax {z1} +axs #-[{c1}] +//FRAGMENT vbuyy=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbuz1=vbuaa_plus_vbuc1 +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_plus_vbuc1 +clc +adc #{c1} +//FRAGMENT vbuxx=vbuaa_plus_vbuc1 +tax +axs #-[{c1}] +//FRAGMENT pbuc1_derefidx_vbuaa=vbuz1 +tay +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=vbuaa +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuaa=vbuxx +tay +txa +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuaa=vbuyy +tax +tya +sta {c1},x +//FRAGMENT vbuyy=vbuaa_plus_vbuc1 +clc +adc #{c1} +tay +//FRAGMENT vbuz1=vbuxx_plus_vbuc1 +txa +axs #-[{c1}] +stx {z1} +//FRAGMENT vbuaa=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +//FRAGMENT vbuyy=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +tay +//FRAGMENT vbuz1=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +//FRAGMENT vbuxx=vbuyy_plus_vbuc1 +tya +tax +axs #-[{c1}] +//FRAGMENT vbuz1=_inc_vbuz2 +ldy {z2} +iny +sty {z1} +//FRAGMENT vbuz1=_inc_vbuaa +clc +adc #1 +sta {z1} +//FRAGMENT vbuz1=_inc_vbuxx +inx +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 +//FRAGMENT vbuxx=_inc_vbuyy +tya +tax +inx +//FRAGMENT vbuyy=_inc_vbuz1 +ldy {z1} +iny +//FRAGMENT vbuyy=_inc_vbuaa +tay +iny +//FRAGMENT vbuyy=_inc_vbuxx +txa +tay +iny +//FRAGMENT vwsz1=vwsz2_minus_vbsc1 +lda {z2} +sec +sbc #{c1} +sta {z1} +lda {z2}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_minus_vbsc1 +lda {z1} +sec +sbc #{c1} +sta {z1} +lda {z1}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT pwsc1_derefidx_vbuz1=vwsz2 +ldy {z1} +lda {z2} +sta {c1},y +lda {z2}+1 +sta {c1}+1,y +//FRAGMENT pwsc1_derefidx_vbuaa=vwsz1 +tay +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT pwsc1_derefidx_vbuxx=vwsz1 +lda {z1} +sta {c1},x +lda {z1}+1 +sta {c1}+1,x +//FRAGMENT pwsc1_derefidx_vbuyy=vwsz1 +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT vbuz1=_bnot_vbuz2 +lda {z2} +eor #$ff +sta {z1} +//FRAGMENT vbuaa=_bnot_vbuz1 +lda {z1} +eor #$ff +//FRAGMENT vbuxx=_bnot_vbuz1 +lda {z1} +eor #$ff +tax +//FRAGMENT vbuyy=_bnot_vbuz1 +lda {z1} +eor #$ff +tay +//FRAGMENT vbuz1=_bnot_vbuaa +eor #$ff +sta {z1} +//FRAGMENT vbuaa=_bnot_vbuaa +eor #$ff +//FRAGMENT vbuxx=_bnot_vbuaa +eor #$ff +tax +//FRAGMENT vbuyy=_bnot_vbuaa +eor #$ff +tay +//FRAGMENT vbuz1=_bnot_vbuxx +txa +eor #$ff +sta {z1} +//FRAGMENT vbuaa=_bnot_vbuxx +txa +eor #$ff +//FRAGMENT vbuxx=_bnot_vbuxx +txa +eor #$ff +tax +//FRAGMENT vbuyy=_bnot_vbuxx +txa +eor #$ff +tay +//FRAGMENT vbuz1=_bnot_vbuyy +tya +eor #$ff +sta {z1} +//FRAGMENT vbuaa=_bnot_vbuyy +tya +eor #$ff +//FRAGMENT vbuxx=_bnot_vbuyy +tya +eor #$ff +tax +//FRAGMENT vbuyy=_bnot_vbuyy +tya +eor #$ff +tay +//FRAGMENT _deref_pbuc1_neq_0_then_la1 +lda {c1} +cmp #0 +bne {la1} +//FRAGMENT pbum1=pbuc1 +lda #<{c1} +sta {m1} +lda #>{c1} +sta {m1}+1 +//FRAGMENT vbum1=vbuc1 +lda #{c1} +sta {m1} +//FRAGMENT _deref_pbum1=vbuc1 +lda #{c1} +ldy {m1} +sty $fe +ldy {m1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT pbum1=_inc_pbum1 +inc {m1} +bne !+ +inc {m1}+1 +!: +//FRAGMENT vbum1=_inc_vbum1 +inc {m1} +//FRAGMENT vbum1_neq_vbuc1_then_la1 +lda #{c1} +cmp {m1} +bne {la1} +//FRAGMENT pbuz1_lt_pbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vboz1=vbuz2_eq_vbuc1 +lda {z2} +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +sta {z1} +//FRAGMENT vboz1=vboz2 +lda {z2} +sta {z1} +//FRAGMENT vboz1_then_la1 +lda {z1} +cmp #0 +bne {la1} +//FRAGMENT vboz1=vbuz2_neq_vbuc1 +lda {z2} +eor #{c1} +beq !+ +lda #1 +!: +sta {z1} +//FRAGMENT vboz1=vboz2_or_vboz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT vboaa=vbuz1_eq_vbuc1 +lda {z1} +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +//FRAGMENT vboxx=vbuz1_eq_vbuc1 +lda {z1} +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +tax +//FRAGMENT vboyy=vbuz1_eq_vbuc1 +lda {z1} +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +tay +//FRAGMENT vboz1=vbuaa_eq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +sta {z1} +//FRAGMENT vboaa=vbuaa_eq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +//FRAGMENT vboxx=vbuaa_eq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +tax +//FRAGMENT vboyy=vbuaa_eq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +eor #1 +tay +//FRAGMENT vboz1=vbuxx_eq_vbuc1 +lda #1 +cpx #{c1} +beq !+ +lda #0 +!: +sta {z1} +//FRAGMENT vboaa=vbuxx_eq_vbuc1 +lda #1 +cpx #{c1} +beq !+ +lda #0 +!: +//FRAGMENT vboxx=vbuxx_eq_vbuc1 +lda #1 +cpx #{c1} +beq !+ +lda #0 +!: +tax +//FRAGMENT vboyy=vbuxx_eq_vbuc1 +lda #1 +cpx #{c1} +beq !+ +lda #0 +!: +tay +//FRAGMENT vboz1=vbuyy_eq_vbuc1 +lda #1 +cpy #{c1} +beq !+ +lda #0 +!: +sta {z1} +//FRAGMENT vboaa=vbuyy_eq_vbuc1 +lda #1 +cpy #{c1} +beq !+ +lda #0 +!: +//FRAGMENT vboxx=vbuyy_eq_vbuc1 +lda #1 +cpy #{c1} +beq !+ +lda #0 +!: +tax +//FRAGMENT vboyy=vbuyy_eq_vbuc1 +lda #1 +cpy #{c1} +beq !+ +lda #0 +!: +tay +//FRAGMENT vboz1=vboaa +sta {z1} +//FRAGMENT vboaa=vboz1 +lda {z1} +//FRAGMENT vboxx=vboz1 +ldx {z1} +//FRAGMENT vboaa_then_la1 +cmp #0 +bne {la1} +//FRAGMENT vboaa=vbuz1_neq_vbuc1 +lda {z1} +eor #{c1} +beq !+ +lda #1 +!: +//FRAGMENT vboxx=vbuz1_neq_vbuc1 +lda {z1} +eor #{c1} +beq !+ +lda #1 +!: +tax +//FRAGMENT vboyy=vbuz1_neq_vbuc1 +lda {z1} +eor #{c1} +beq !+ +lda #1 +!: +tay +//FRAGMENT vboz1=vbuaa_neq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +sta {z1} +//FRAGMENT vboaa=vbuaa_neq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +//FRAGMENT vboxx=vbuaa_neq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +tax +//FRAGMENT vboyy=vbuaa_neq_vbuc1 +eor #{c1} +beq !+ +lda #1 +!: +tay +//FRAGMENT vboz1=vbuxx_neq_vbuc1 +lda #0 +cpx #{c1} +beq !+ +lda #1 +!: +sta {z1} +//FRAGMENT vboaa=vbuxx_neq_vbuc1 +lda #0 +cpx #{c1} +beq !+ +lda #1 +!: +//FRAGMENT vboxx=vbuxx_neq_vbuc1 +lda #0 +cpx #{c1} +beq !+ +lda #1 +!: +tax +//FRAGMENT vboyy=vbuxx_neq_vbuc1 +lda #0 +cpx #{c1} +beq !+ +lda #1 +!: +tay +//FRAGMENT vboz1=vbuyy_neq_vbuc1 +lda #0 +cpy #{c1} +beq !+ +lda #1 +!: +sta {z1} +//FRAGMENT vboaa=vbuyy_neq_vbuc1 +lda #0 +cpy #{c1} +beq !+ +lda #1 +!: +//FRAGMENT vboxx=vbuyy_neq_vbuc1 +lda #0 +cpy #{c1} +beq !+ +lda #1 +!: +tax +//FRAGMENT vboyy=vbuyy_neq_vbuc1 +lda #0 +cpy #{c1} +beq !+ +lda #1 +!: +tay +//FRAGMENT vboz1=vboz2_or_vboaa +ora {z2} +sta {z1} +//FRAGMENT vboz1=vboz2_or_vboxx +txa +ora {z2} +sta {z1} +//FRAGMENT vboz1=vboz2_or_vboyy +tya +ora {z2} +sta {z1} +//FRAGMENT vboz1=vboxx_or_vboz2 +txa +ora {z2} +sta {z1} +//FRAGMENT vboz1=vboxx_or_vboaa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vboz1=vboxx_or_vboxx +txa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vboz1=vboxx_or_vboyy +txa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vboz1=vboyy_or_vboz2 +tya +ora {z2} +sta {z1} +//FRAGMENT vboz1=vboyy_or_vboaa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vboz1=vboyy_or_vboxx +txa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vboz1=vboyy_or_vboyy +tya +sty $ff +ora $ff +sta {z1} +//FRAGMENT vboaa=vboz1_or_vboz2 +lda {z1} +ora {z2} +//FRAGMENT vboaa=vboz1_or_vboaa +ora {z1} +//FRAGMENT vboaa=vboz1_or_vboxx +txa +ora {z1} +//FRAGMENT vboaa=vboz1_or_vboyy +tya +ora {z1} +//FRAGMENT vboaa=vboxx_or_vboz1 +txa +ora {z1} +//FRAGMENT vboaa=vboxx_or_vboaa +stx $ff +ora $ff +//FRAGMENT vboaa=vboxx_or_vboxx +txa +stx $ff +ora $ff +//FRAGMENT vboaa=vboxx_or_vboyy +txa +sty $ff +ora $ff +//FRAGMENT vboaa=vboyy_or_vboz1 +tya +ora {z1} +//FRAGMENT vboaa=vboyy_or_vboaa +sty $ff +ora $ff +//FRAGMENT vboaa=vboyy_or_vboxx +txa +sty $ff +ora $ff +//FRAGMENT vboaa=vboyy_or_vboyy +tya +sty $ff +ora $ff +//FRAGMENT vboxx=vboz1_or_vboz2 +lda {z1} +ora {z2} +tax +//FRAGMENT vboxx=vboz1_or_vboaa +ora {z1} +tax +//FRAGMENT vboxx=vboz1_or_vboxx +txa +ora {z1} +tax +//FRAGMENT vboxx=vboz1_or_vboyy +tya +ora {z1} +tax +//FRAGMENT vboxx=vboxx_or_vboz1 +txa +ora {z1} +tax +//FRAGMENT vboxx=vboxx_or_vboaa +stx $ff +ora $ff +tax +//FRAGMENT vboxx=vboxx_or_vboxx +txa +stx $ff +ora $ff +tax +//FRAGMENT vboxx=vboxx_or_vboyy +txa +sty $ff +ora $ff +tax +//FRAGMENT vboxx=vboyy_or_vboz1 +tya +ora {z1} +tax +//FRAGMENT vboxx=vboyy_or_vboaa +sty $ff +ora $ff +tax +//FRAGMENT vboxx=vboyy_or_vboxx +txa +sty $ff +ora $ff +tax +//FRAGMENT vboxx=vboyy_or_vboyy +tya +sty $ff +ora $ff +tax +//FRAGMENT vboyy=vboz1_or_vboz2 +lda {z1} +ora {z2} +tay +//FRAGMENT vboyy=vboz1_or_vboaa +ora {z1} +tay +//FRAGMENT vboyy=vboz1_or_vboxx +txa +ora {z1} +tay +//FRAGMENT vboyy=vboz1_or_vboyy +tya +ora {z1} +tay +//FRAGMENT vboyy=vboxx_or_vboz1 +txa +ora {z1} +tay +//FRAGMENT vboyy=vboxx_or_vboaa +stx $ff +ora $ff +tay +//FRAGMENT vboyy=vboxx_or_vboxx +txa +stx $ff +ora $ff +tay +//FRAGMENT vboyy=vboxx_or_vboyy +txa +sty $ff +ora $ff +tay +//FRAGMENT vboyy=vboyy_or_vboz1 +tya +ora {z1} +tay +//FRAGMENT vboyy=vboyy_or_vboaa +sty $ff +ora $ff +tay +//FRAGMENT vboyy=vboyy_or_vboxx +txa +sty $ff +ora $ff +tay +//FRAGMENT vboyy=vboyy_or_vboyy +tya +sty $ff +ora $ff +tay +//FRAGMENT vboxx_then_la1 +cpx #0 +bne {la1} +//FRAGMENT vboyy=vboz1 +ldy {z1} +//FRAGMENT vboyy_then_la1 +cpy #0 +bne {la1} +//FRAGMENT vboyy=vboaa +tay +//FRAGMENT vboaa=vboyy +tya +//FRAGMENT vbuz1=vbuc1_rol_vbuz2 +lda #{c1} +ldy {z2} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT vbuaa=vbuc1_rol_vbuz1 +lda #{c1} +ldy {z1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +//FRAGMENT vbuxx=vbuc1_rol_vbuz1 +lda #{c1} +ldx {z1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tax +//FRAGMENT vbuyy=vbuc1_rol_vbuz1 +lda #{c1} +ldy {z1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tay +//FRAGMENT vbuz1=vbuc1_rol_vbuaa +tay +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT vbuaa=vbuc1_rol_vbuaa +tay +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +//FRAGMENT vbuxx=vbuc1_rol_vbuaa +tax +lda #{c1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tax +//FRAGMENT vbuyy=vbuc1_rol_vbuaa +tay +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tay +//FRAGMENT vbuz1=vbuc1_rol_vbuxx +lda #{c1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +sta {z1} +//FRAGMENT vbuaa=vbuc1_rol_vbuxx +lda #{c1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +//FRAGMENT vbuxx=vbuc1_rol_vbuxx +lda #{c1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tax +//FRAGMENT vbuyy=vbuc1_rol_vbuxx +lda #{c1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tay +//FRAGMENT vbuz1=vbuc1_rol_vbuyy +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT vbuaa=vbuc1_rol_vbuyy +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +//FRAGMENT vbuxx=vbuc1_rol_vbuyy +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tax +//FRAGMENT vbuyy=vbuc1_rol_vbuyy +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tay +//FRAGMENT pprz1=pprc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pwsc1=vbsc2 +NO_SYNTHESIS +//FRAGMENT _deref_pwsc1=vwuc2 +NO_SYNTHESIS +//FRAGMENT _deref_pwsc1=vwsc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT vwsz1=vbsc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT pwsz1=pwsc1_plus_vwsz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=_deref_pwsz2 +ldy #0 +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vdsz1=vdsz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +//FRAGMENT vwsz1=_sword_vdsz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwsz1_le_vwsz2_then_la1 +lda {z2} +cmp {z1} +lda {z2}+1 +sbc {z1}+1 +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT vwsz1=_inc_vwsz1 +inc {z1} +bne !+ +inc {z1}+1 +!: +//FRAGMENT vwsz1_neq_0_then_la1 +lda {z1}+1 +bne {la1} +lda {z1} +bne {la1} +//FRAGMENT _deref_pwsz1=vwsz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT vwsz1_lt_vwsc1_then_la1 +lda {z1} +cmp #<{c1} +lda {z1}+1 +sbc #>{c1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vwsz1_ge_0_then_la1 +lda {z1}+1 +bpl {la1} +//FRAGMENT vwuz1=_hi_vduz2 +lda {z2}+2 +sta {z1} +lda {z2}+3 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_minus_vwuz3 +lda {z2} +sec +sbc {z3} +sta {z1} +lda {z2}+1 +sbc {z3}+1 +sta {z1}+1 +//FRAGMENT vduz1=vduz1_sethi_vwuz2 +lda {z2} +sta {z1}+2 +lda {z2}+1 +sta {z1}+3 +//FRAGMENT vduz1=_dword_vwuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda #0 +sta {z1}+2 +sta {z1}+3 +//FRAGMENT vwuz1_neq_0_then_la1 +lda {z1} +bne {la1} +lda {z1}+1 +bne {la1} +//FRAGMENT vwuz1=vwuz1_ror_1 +lsr {z1}+1 +ror {z1} +//FRAGMENT vduz1=vduz1_rol_1 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vwsz1=_neg_vwsz2 +sec +lda #0 +sbc {z2} +sta {z1} +lda #0 +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vbuz1=vbuz1_bxor_vbuc1 +lda #{c1} +eor {z1} +sta {z1} +//FRAGMENT vbuz1=_byte_vwuz2 +lda {z2} +sta {z1} +//FRAGMENT vwuz1_ge_vwuz2_then_la1 +lda {z2}+1 +cmp {z1}+1 +bne !+ +lda {z2} +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 +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vbuaa=_byte_vwuz1 +lda {z1} +//FRAGMENT vbuxx=_byte_vwuz1 +lda {z1} +tax +//FRAGMENT vbuyy=_byte_vwuz1 +lda {z1} +tay +//FRAGMENT pwsz1=pwsc1_plus_vwsz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=_deref_pwsz1 +ldy #0 +lda ({z1}),y +pha +iny +lda ({z1}),y +sta {z1}+1 +pla +sta {z1} +//FRAGMENT pprz1=pprz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda {c1}+1,x +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT _deref_pbuz1=_inc__deref_pbuz1 +ldy #0 +lda ({z1}),y +clc +adc #1 +ldy #0 +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 +ldy {z2} +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT vbuc1_neq_pbuc2_derefidx_vbuz1_then_la1 +lda #{c1} +ldy {z1} +cmp {c2},y +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuaa +tay +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx +lda {c2},x +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuyy +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT vbuc1_neq_pbuc2_derefidx_vbuxx_then_la1 +lda {c2},x +cmp #{c1} +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuz3 +ldx {z1} +ldy {z3} +lda ({z2}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuaa +ldx {z1} +tay +lda ({z2}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuxx +txa +ldx {z1} +tay +lda ({z2}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuyy +lda ({z2}),y +ldx {z1} +sta {c1},x +//FRAGMENT pbuz1_derefidx_(pbsc1_derefidx_vbuz2)=vbuc2 +lda #{c2} +ldx {z2} +ldy {c1},x +sta ({z1}),y +//FRAGMENT pbsc1_derefidx_vbuz1=pbsc1_derefidx_vbuz1_plus_pbsc2_derefidx_vbuz1 +ldy {z1} +clc +lda {c1},y +adc {c2},y +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuz1_lt_0_then_la1 +ldy {z1} +lda {c1},y +cmp #0 +bmi {la1} +//FRAGMENT pbsc1_derefidx_vbuz1_lt_vbsc2_then_la1 +ldy {z1} +lda {c1},y +sec +sbc #{c2} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsz1=_neg_pbsc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT pbsc1_derefidx_vbuz1=vbsz2 +lda {z2} +ldy {z1} +sta {c1},y +//FRAGMENT pbuz1_derefidx_(pbsc1_derefidx_vbuz2)=pbuc2_derefidx_vbuz2 +ldx {z2} +lda {c2},x +ldy {c1},x +sta ({z1}),y +//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 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 pbuz1_derefidx_(pbsc1_derefidx_vbuaa)=vbuc2 +tax +lda #{c2} +ldy {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=vbuc2 +lda #{c2} +ldy {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_(pbsc1_derefidx_vbuyy)=vbuc2 +tya +tax +lda #{c2} +ldy {c1},x +sta ({z1}),y +//FRAGMENT pbsc1_derefidx_vbuxx=pbsc1_derefidx_vbuxx_plus_pbsc2_derefidx_vbuxx +clc +lda {c1},x +adc {c2},x +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuxx_lt_0_then_la1 +lda {c1},x +cmp #0 +bmi {la1} +//FRAGMENT pbsc1_derefidx_vbuxx_lt_vbsc2_then_la1 +lda {c1},x +sec +sbc #{c2} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsz1=_neg_pbsc1_derefidx_vbuxx +lda {c1},x +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbsaa=_neg_pbsc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +eor #$ff +clc +adc #$01 +//FRAGMENT vbsaa=_neg_pbsc1_derefidx_vbuxx +lda {c1},x +eor #$ff +clc +adc #$01 +//FRAGMENT vbsxx=_neg_pbsc1_derefidx_vbuz1 +ldx {z1} +lda {c1},x +eor #$ff +clc +adc #$01 +tax +//FRAGMENT vbsxx=_neg_pbsc1_derefidx_vbuxx +lda {c1},x +eor #$ff +clc +adc #$01 +tax +//FRAGMENT vbsyy=_neg_pbsc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +eor #$ff +clc +adc #$01 +tay +//FRAGMENT vbsyy=_neg_pbsc1_derefidx_vbuxx +lda {c1},x +eor #$ff +clc +adc #$01 +tay +//FRAGMENT pbsc1_derefidx_vbuxx=vbsz1 +lda {z1} +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuz1=vbsaa +ldy {z1} +sta {c1},y +//FRAGMENT pbuz1_derefidx_(pbsc1_derefidx_vbuxx)=pbuc2_derefidx_vbuxx +lda {c2},x +ldy {c1},x +sta ({z1}),y +//FRAGMENT pbsc1_derefidx_vbuz1=vbsxx +ldy {z1} +txa +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuz1=vbsyy +tya +ldy {z1} +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuaa=vbsz1 +tay +lda {z1} +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuaa=vbsxx +tay +txa +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuaa=vbsyy +tax +tya +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuxx=vbsxx +txa +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuxx=vbsyy +tya +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuyy=vbsz1 +lda {z1} +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuyy=vbsxx +txa +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuyy=vbsyy +tya +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuxx=vbsaa +sta {c1},x +//FRAGMENT vbuz1=vbuz2_plus_vbuz2 +lda {z2} +asl +sta {z1} +//FRAGMENT vwuz1=vwuz2_plus_vbuz3 +lda {z3} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT _deref_pbuz1=pbuz2_derefidx_vbuz3 +ldy {z3} +lda ({z2}),y +ldy #0 +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2_neq_vbuc1_then_la1 +ldy {z2} +lda ({z1}),y + +cmp #{c1} +bne {la1} +//FRAGMENT pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 +lda #{c1} +ldy {z2} +cmp ({z1}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuz2_neq_0_then_la1 +ldy {z2} +lda ({z1}),y + +cmp #0 +bne {la1} +//FRAGMENT vwuz1=vbuz2_rol_3 +lda {z2} +sta {z1} +lda #0 +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vbuz1=vbuaa_plus_vbuaa +asl +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuz1 +lda {z1} +asl +//FRAGMENT vbuaa=vbuaa_plus_vbuaa +asl +//FRAGMENT vbuxx=vbuz1_plus_vbuz1 +lda {z1} +asl +tax +//FRAGMENT vbuxx=vbuaa_plus_vbuaa +asl +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuz1 +lda {z1} +asl +tay +//FRAGMENT vbuyy=vbuaa_plus_vbuaa +asl +tay +//FRAGMENT vbuaa=vbuz1_plus_1 +lda {z1} +clc +adc #1 +//FRAGMENT vbuxx_eq_vbuz1_then_la1 +cpx {z1} +beq {la1} +//FRAGMENT vwuz1=vwuz2_plus_vbuxx +txa +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_plus_vbuyy +tya +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT _deref_pbuz1=pbuz2_derefidx_vbuxx +txa +tay +lda ({z2}),y +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbuz1=pbuz2_derefidx_vbuyy +lda ({z2}),y +ldy #0 +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx_neq_vbuc1_then_la1 +txa +tay +lda ({z1}),y + +cmp #{c1} +bne {la1} +//FRAGMENT pbuz1_derefidx_vbuaa_eq_vbuc1_then_la1 +tay +lda #{c1} +cmp ({z1}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuxx_eq_vbuc1_then_la1 +txa +tay +lda #{c1} +cmp ({z1}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuyy_eq_vbuc1_then_la1 +lda #{c1} +cmp ({z1}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuxx_neq_0_then_la1 +txa +tay +lda ({z1}),y + +cmp #0 +bne {la1} +//FRAGMENT pbuz1_derefidx_vbuyy_neq_0_then_la1 +lda ({z1}),y + +cmp #0 +bne {la1} +//FRAGMENT vbuxx=vbuz1_plus_1 +ldx {z1} +inx +//FRAGMENT vwuz1=vbuaa_rol_3 +sta {z1} +lda #0 +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vbuxx_rol_3 +txa +sta {z1} +lda #0 +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vbuyy_rol_3 +tya +sta {z1} +lda #0 +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vbuaa_lt_vbuz1_then_la1 +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_lt_vbuxx_then_la1 +cpx {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT vwuz1=vwuz2_plus_vbuaa +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vbuyy=vbuz1_plus_1 +ldy {z1} +iny +//FRAGMENT vbuyy_lt_vbuz1_then_la1 +cpy {z1} +bcc {la1} +//FRAGMENT vbuz1=vbuyy_plus_1 +iny +sty {z1} +//FRAGMENT vbuxx_lt_vbuaa_then_la1 +sta $ff +cpx $ff +bcc {la1} +//FRAGMENT vbuz1=vbuz1_plus_1 +inc {z1} +//FRAGMENT vbuz1=_lo__deref_pwuc1 +lda {c1} +sta {z1} +//FRAGMENT vbuz1=_hi__deref_pwuc1 +lda {c1}+1 +sta {z1} +//FRAGMENT vbuaa=_lo__deref_pwuc1 +lda {c1} +//FRAGMENT vbuxx=_lo__deref_pwuc1 +ldx {c1} +//FRAGMENT vbuaa=_hi__deref_pwuc1 +lda {c1}+1 +//FRAGMENT vbuxx=_hi__deref_pwuc1 +ldx {c1}+1 +//FRAGMENT vbuyy=_lo__deref_pwuc1 +ldy {c1} +//FRAGMENT vbuyy=_hi__deref_pwuc1 +ldy {c1}+1 +//FRAGMENT vwsz1=vbsc1_minus_vwsz2 +NO_SYNTHESIS +//FRAGMENT vwsz1=vwuc1_minus_vwsz2 +sec +lda #<{c1} +sbc {z2} +sta {z1} +lda #>{c1} +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_minus_1 +sec +lda {z1} +sbc #1 +sta {z1} +bcs !+ +dec {z1}+1 +!: +//FRAGMENT vwsz1=vwsz2_minus_vwsz3 +lda {z2} +sec +sbc {z3} +sta {z1} +lda {z2}+1 +sbc {z3}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_rol_2 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwsz1=vwsz2_plus_vwsz3 +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc {z3}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_plus_vbsc1 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vwsc1_plus_vwsz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vwsc1_minus_vwsz2 +lda #<{c1} +sec +sbc {z2} +sta {z1} +lda #>{c1} +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vwsz1_gt_vwsc1_then_la1 +lda #<{c1} +cmp {z1} +lda #>{c1} +sbc {z1}+1 +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vwsz1_ge_vwsc1_then_la1 +lda {z1} +cmp #<{c1} +lda {z1}+1 +sbc #>{c1} +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT vwsz1=vwsz2_band_vdsc1 +lda {z2} +and #<{c1} +sta {z1} +lda {z2}+1 +and #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vwsz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=_lo_vwsz2 +lda {z2} +sta {z1} +//FRAGMENT vwsz1=vwsz2_ror_3 +lda {z2}+1 +cmp #$80 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +//FRAGMENT vwsz1=vwsz2_rol_6 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vbsz1=vwsz2_band_vbsc1 +lda #{c1} +and {z2} +sta {z1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbsz3 +ldy #0 +lda ({z2}),y +ldy {z3} +ora {c1},y +sta {z1} +//FRAGMENT vbuaa=_lo_vwsz1 +lda {z1} +//FRAGMENT vbuxx=_lo_vwsz1 +ldx {z1} +//FRAGMENT pbuz1=pbuz2_plus_vbuaa +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vbsaa=vwsz1_band_vbsc1 +lda #{c1} +and {z1} +//FRAGMENT vbsxx=vwsz1_band_vbsc1 +lda #{c1} +and {z1} +tax +//FRAGMENT vbsyy=vwsz1_band_vbsc1 +lda #{c1} +and {z1} +tay +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbsaa +tay +lda {c1},y +ldy #0 +ora ({z2}),y +sta {z1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbsxx +lda {c1},x +ldy #0 +ora ({z2}),y +sta {z1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbsyy +lda {c1},y +ldy #0 +ora ({z2}),y +sta {z1} +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbsz2 +ldy #0 +lda ({z1}),y +ldy {z2} +ora {c1},y +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbsaa +tay +lda {c1},y +ldy #0 +ora ({z1}),y +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbsxx +lda {c1},x +ldy #0 +ora ({z1}),y +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbsyy +lda {c1},y +ldy #0 +ora ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbsz2 +ldx {z2} +lda {c1},x +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbsaa +tax +lda {c1},x +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbsxx +lda {c1},x +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbsyy +lda {c1},y +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbsz2 +ldy #0 +lda ({z1}),y +ldy {z2} +ora {c1},y +tay +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbsaa +tay +lda {c1},y +ldy #0 +ora ({z1}),y +tay +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbsxx +lda {c1},x +ldy #0 +ora ({z1}),y +tay +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbsyy +lda {c1},y +ldy #0 +ora ({z1}),y +tay +//FRAGMENT vbuyy=_lo_vwsz1 +ldy {z1} +//FRAGMENT vwsz1=vwsz1_plus_vwsz2 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vwsz1 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vbsc1_minus_vwsz1 +NO_SYNTHESIS +//FRAGMENT vwsz1=vwuc1_minus_vwsz1 +sec +lda #<{c1} +sbc {z1} +sta {z1} +lda #>{c1} +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_ror_3 +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +//FRAGMENT vwsz1=vwsz1_rol_2 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vwsz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuz1_plus_vwsz2 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz1_plus_vbuaa +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vwsz1=vwsz1_rol_6 +lda {z1}+1 +sta $ff +lda {z1} +sta {z1}+1 +lda #0 +sta {z1} +lsr $ff +ror {z1}+1 +ror {z1} +lsr $ff +ror {z1}+1 +ror {z1} +//FRAGMENT _deref_pwuc1=vwuc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT vbuc1_eq_vwuz1_then_la1 +lda #{c1} +cmp {z1} +bne !+ +lda {z1}+1 +bne !+ +jmp {la1} +!: +//FRAGMENT vwuz1=_dec_vwuz1 +lda {z1} +bne !+ +dec {z1}+1 +!: +dec {z1} +//FRAGMENT vbuc1_neq_pbuc2_derefidx_vbuaa_then_la1 +tay +lda #{c1} +cmp {c2},y +bne {la1} +//FRAGMENT vbuc1_neq_pbuc2_derefidx_vbuyy_then_la1 +lda #{c1} +cmp {c2},y +bne {la1} +//FRAGMENT _deref_pwuc1=_deref_pwuc2 +lda {c2} +sta {c1} +lda {c2}+1 +sta {c1}+1 +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuz1 +ldx {z1} +tay +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuxx +tay +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuyy +tax +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuaa +tay +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuyy +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuz1 +ldx {z1} +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuaa +tax +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuz2 +ldy {z2} +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuxx +txa +tay +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuyy +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuz2 +tya +ldy {z2} +tax +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuxx +sty $ff + +txa +tay +lda ({z1}),y +ldy $ff +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuyy +lda ({z1}),y +sta {c1},y +//FRAGMENT _deref_pbuc1=_deref_qbuc2_memcpy_vbuc3 +ldy #{c3} +!: +lda {c2}-1,y +sta {c1}-1,y +dey +bne !- +//FRAGMENT _deref_pssc1=_memset_vbuc2 +ldy #{c2} +lda #0 +!: +dey +sta {c1},y +bne !- +//FRAGMENT _deref_pssc1=_deref_pssc2_memcpy_vbuc3 +ldy #{c3} +!: +lda {c2}-1,y +sta {c1}-1,y +dey +bne !- +//FRAGMENT vbuz1=vbuz2_rol_3 +lda {z2} +asl +asl +asl +sta {z1} +//FRAGMENT vwsz1=pwsc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT vbuz1=vbuaa_rol_3 +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuxx_rol_3 +txa +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuyy_rol_3 +tya +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuz1_rol_3 +lda {z1} +asl +asl +asl +//FRAGMENT vbuaa=vbuaa_rol_3 +asl +asl +asl +//FRAGMENT vbuaa=vbuxx_rol_3 +txa +asl +asl +asl +//FRAGMENT vbuaa=vbuyy_rol_3 +tya +asl +asl +asl +//FRAGMENT vbuxx=vbuz1_rol_3 +lda {z1} +asl +asl +asl +tax +//FRAGMENT vbuxx=vbuaa_rol_3 +asl +asl +asl +tax +//FRAGMENT vbuxx=vbuxx_rol_3 +txa +asl +asl +asl +tax +//FRAGMENT vbuxx=vbuyy_rol_3 +tya +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_3 +lda {z1} +asl +asl +asl +tay +//FRAGMENT vbuyy=vbuaa_rol_3 +asl +asl +asl +tay +//FRAGMENT vbuyy=vbuxx_rol_3 +txa +asl +asl +asl +tay +//FRAGMENT vbuyy=vbuyy_rol_3 +tya +asl +asl +asl +tay +//FRAGMENT vwsz1=pwsc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda {c1}+1,x +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT _deref_pssc1=pssc2_derefidx_vbuz1_memcpy_vbuc3 +ldx {z1} +ldy #0 +!: +lda {c2},x +sta {c1},y +inx +iny +cpy #{c3} +bne !- +//FRAGMENT pwsc1_derefidx_vbuz1=_deref_pwsc2 +ldy {z1} +lda {c2} +sta {c1},y +lda {c2}+1 +sta {c1}+1,y +//FRAGMENT _deref_pssc1=pssc2_derefidx_vbuaa_memcpy_vbuc3 +tax +ldy #0 +!: +lda {c2},x +sta {c1},y +inx +iny +cpy #{c3} +bne !- +//FRAGMENT _deref_pssc1=pssc2_derefidx_vbuxx_memcpy_vbuc3 +ldy #0 +!: +lda {c2},x +sta {c1},y +inx +iny +cpy #{c3} +bne !- +//FRAGMENT _deref_pssc1=pssc2_derefidx_vbuyy_memcpy_vbuc3 +ldx #0 +!: +lda {c2},y +sta {c1},x +iny +inx +cpx #{c3} +bne !- +//FRAGMENT pwsc1_derefidx_vbuaa=_deref_pwsc2 +tay +lda {c2} +sta {c1},y +lda {c2}+1 +sta {c1}+1,y +//FRAGMENT pwsc1_derefidx_vbuxx=_deref_pwsc2 +lda {c2} +sta {c1},x +lda {c2}+1 +sta {c1}+1,x +//FRAGMENT pwsc1_derefidx_vbuyy=_deref_pwsc2 +lda {c2} +sta {c1},y +lda {c2}+1 +sta {c1}+1,y +//FRAGMENT pssc1_derefidx_vbuz1=_deref_pssc2_memcpy_vbuc3 +ldx {z1} +ldy #0 +!: +lda {c2},y +sta {c1},x +inx +iny +cpy #{c3} +bne !- +//FRAGMENT pssc1_derefidx_vbuaa=_deref_pssc2_memcpy_vbuc3 +tax +ldy #0 +!: +lda {c2},y +sta {c1},x +inx +iny +cpy #{c3} +bne !- +//FRAGMENT pssc1_derefidx_vbuxx=_deref_pssc2_memcpy_vbuc3 +ldy #0 +!: +lda {c2},y +sta {c1},x +inx +iny +cpy #{c3} +bne !- +//FRAGMENT pssc1_derefidx_vbuyy=_deref_pssc2_memcpy_vbuc3 +ldx #0 +!: +lda {c2},x +sta {c1},y +iny +inx +cpx #{c3} +bne !- +//FRAGMENT _deref_pbuc1=_byte_pprz1 +lda {z1} +sta {c1} +//FRAGMENT vwuz1=_deref_pwuc1_minus_vwuc2 +sec +lda {c1} +sbc #<{c2} +sta {z1} +lda {c1}+1 +sbc #>{c2} +sta {z1}+1 +//FRAGMENT _deref_pwuc1=vwuz1 +lda {z1} +sta {c1} +lda {z1}+1 +sta {c1}+1 +//FRAGMENT pbuz1=_deref_qbuc1_plus_vwuc2 +clc +lda {c1} +adc #<{c2} +sta {z1} +lda {c1}+1 +adc #>{c2} +sta {z1}+1 +//FRAGMENT vbuc1_neq__deref_pbuc2_then_la1 +lda #{c1} +cmp {c2} +bne {la1} +//FRAGMENT vwuz1=vbuz2_word_vbuc1 +lda {z2} +ldy #{c1} +sta {z1}+1 +sty {z1} +//FRAGMENT vbuz1=vbuz2_minus__deref_pbuz3 +lda {z2} +sec +ldy #0 +sbc ({z3}),y +sta {z1} +//FRAGMENT vbsz1_neq_vbsc1_then_la1 +lda #{c1} +cmp {z1} +bne {la1} +//FRAGMENT vbuz1=pbuz2_derefidx_vbuz3_rol_4 +ldy {z3} +lda ({z2}),y +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=pbuz2_derefidx_vbuz3_rol_1 +ldy {z3} +lda ({z2}),y +asl +sta {z1} +//FRAGMENT pbuz1_derefidx_vbuz2=vbuz3 +lda {z3} +ldy {z2} +sta ({z1}),y +//FRAGMENT vwuz1=vwuz2_ror_1 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +//FRAGMENT vwuz1=_neg_vwuz1 +sec +lda #0 +sbc {z1} +sta {z1} +lda #0 +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_ror_1 +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +//FRAGMENT vwsz1=vwsz1_minus_vwsz2 +lda {z1} +sec +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_minus_pwuc1_derefidx_vbuz2 +ldy {z2} +sec +lda {z1} +sbc {c1},y +sta {z1} +lda {z1}+1 +sbc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 +ldy {z2} +clc +lda {z1} +adc {c1},y +sta {z1} +lda {z1}+1 +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_ror_2 +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +//FRAGMENT vbuz1=vbuz1_minus_2 +dec {z1} +dec {z1} +//FRAGMENT vwuz1=vbuaa_word_vbuc1 +ldy #{c1} +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuxx_word_vbuc1 +ldy #{c1} +txa +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuyy_word_vbuc1 +tya +ldy #{c1} +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vwuz1_plus_vbuaa +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vwuz1=vwuz1_plus_vbuyy +tya +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vbuz1=vbuxx_minus__deref_pbuz2 +txa +sec +ldy #0 +sbc ({z2}),y +sta {z1} +//FRAGMENT vbuaa=vbuz1_minus__deref_pbuz2 +lda {z1} +sec +ldy #0 +sbc ({z2}),y +//FRAGMENT vbuaa=vbuxx_minus__deref_pbuz1 +txa +sec +ldy #0 +sbc ({z1}),y +//FRAGMENT vbuxx=vbuz1_minus__deref_pbuz2 +lda {z1} +sec +ldy #0 +sbc ({z2}),y +tax +//FRAGMENT vbuxx=vbuxx_minus__deref_pbuz1 +txa +sec +ldy #0 +sbc ({z1}),y +tax +//FRAGMENT vbuyy=vbuz1_minus__deref_pbuz2 +lda {z1} +sec +ldy #0 +sbc ({z2}),y +tay +//FRAGMENT vbuyy=vbuxx_minus__deref_pbuz1 +txa +sec +ldy #0 +sbc ({z1}),y +tay +//FRAGMENT vbsxx_neq_vbsc1_then_la1 +cpx #{c1} +bne {la1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuz2_rol_4 +ldy {z2} +lda ({z1}),y +asl +asl +asl +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuz2_rol_4 +ldy {z2} +lda ({z1}),y +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuz2_rol_4 +ldy {z2} +lda ({z1}),y +asl +asl +asl +asl +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuaa_rol_4 +tay +lda ({z2}),y +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuaa_rol_4 +tay +lda ({z1}),y +asl +asl +asl +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuaa_rol_4 +tay +lda ({z1}),y +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuaa_rol_4 +tay +lda ({z1}),y +asl +asl +asl +asl +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuxx_rol_4 +txa +tay +lda ({z2}),y +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuxx_rol_4 +txa +tay +lda ({z1}),y +asl +asl +asl +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuxx_rol_4 +txa +tay +lda ({z1}),y +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuxx_rol_4 +txa +tay +lda ({z1}),y +asl +asl +asl +asl +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuyy_rol_4 +lda ({z2}),y +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuyy_rol_4 +lda ({z1}),y +asl +asl +asl +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuyy_rol_4 +lda ({z1}),y +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuyy_rol_4 +lda ({z1}),y +asl +asl +asl +asl +tay +//FRAGMENT vbuaa=pbuz1_derefidx_vbuz2_rol_1 +ldy {z2} +lda ({z1}),y +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuz2_rol_1 +ldy {z2} +lda ({z1}),y +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuz2_rol_1 +ldy {z2} +lda ({z1}),y +asl +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuxx_rol_1 +txa +tay +lda ({z2}),y +asl +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuxx_rol_1 +txa +tay +lda ({z1}),y +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuxx_rol_1 +txa +tay +lda ({z1}),y +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuxx_rol_1 +txa +tay +lda ({z1}),y +asl +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuyy_rol_1 +lda ({z2}),y +asl +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuyy_rol_1 +lda ({z1}),y +asl +//FRAGMENT vbuxx=pbuz1_derefidx_vbuyy_rol_1 +lda ({z1}),y +asl +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuyy_rol_1 +lda ({z1}),y +asl +tay +//FRAGMENT pbuz1_derefidx_vbuxx=vbuz2 +txa +tay +lda {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=vbuz2 +lda {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=vbuaa +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=vbuc1 +txa +tay +lda #{c1} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=vbuc1 +lda #{c1} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=vbuc1 +tay +lda #{c1} +sta ({z1}),y +//FRAGMENT vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa +tay +sec +lda {z1} +sbc {c1},y +sta {z1} +lda {z1}+1 +sbc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_minus_pwuc1_derefidx_vbuxx +sec +lda {z1} +sbc {c1},x +sta {z1} +lda {z1}+1 +sbc {c1}+1,x +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_minus_pwuc1_derefidx_vbuyy +sec +lda {z1} +sbc {c1},y +sta {z1} +lda {z1}+1 +sbc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa +tay +clc +lda {z1} +adc {c1},y +sta {z1} +lda {z1}+1 +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_plus_pwuc1_derefidx_vbuxx +clc +lda {z1} +adc {c1},x +sta {z1} +lda {z1}+1 +adc {c1}+1,x +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_plus_pwuc1_derefidx_vbuyy +clc +lda {z1} +adc {c1},y +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 +//FRAGMENT vbuyy=vbuyy_minus_2 +dey +dey +//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 +ldy $ff +sta ({z1}),y +//FRAGMENT vbuz1_lt_vbuyy_then_la1 +cpy {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuxx_lt_vbuyy_then_la1 +sty $ff +cpx $ff +bcc {la1} +//FRAGMENT pbuz1_derefidx_vbuyy=vbuaa +sta ({z1}),y +//FRAGMENT vbuz1_eq_vbuxx_then_la1 +cpx {z1} +beq {la1} +//FRAGMENT vbuxx_eq_vbuaa_then_la1 +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT vbuxx_eq_vbuyy_then_la1 +sty $ff +cpx $ff +beq {la1} +//FRAGMENT vbuyy_eq_vbuxx_then_la1 +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_vbuz2 +txa +ldx {z2} +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_vbuz2 +ldx {z2} +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_vbuxx +txa +tay +lda {c1},y +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_vbuxx +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_vbuyy +lda {c1},y +stx $ff +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_vbuyy +lda {c1},y +sta ({z1}),y +//FRAGMENT vwsz1=_sword_vbuz2 +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} +lda #0 +rol +eor #1 +sta {z1} +//FRAGMENT vboaa=vbuz1_lt_vbuc1 +lda {z1} +cmp #{c1} +lda #0 +rol +eor #1 +//FRAGMENT vboxx=vbuz1_lt_vbuc1 +lda {z1} +cmp #{c1} +lda #0 +rol +eor #1 +tax +//FRAGMENT vboyy=vbuz1_lt_vbuc1 +lda {z1} +cmp #{c1} +lda #0 +rol +eor #1 +tay +//FRAGMENT vboz1=vbuaa_lt_vbuc1 +cmp #{c1} +lda #0 +rol +eor #1 +sta {z1} +//FRAGMENT vboaa=vbuaa_lt_vbuc1 +cmp #{c1} +lda #0 +rol +eor #1 +//FRAGMENT vboxx=vbuaa_lt_vbuc1 +cmp #{c1} +lda #0 +rol +eor #1 +tax +//FRAGMENT vboyy=vbuaa_lt_vbuc1 +cmp #{c1} +lda #0 +rol +eor #1 +tay +//FRAGMENT vboz1=vbuxx_lt_vbuc1 +cpx #{c1} +lda #0 +rol +eor #1 +sta {z1} +//FRAGMENT vboaa=vbuxx_lt_vbuc1 +cpx #{c1} +lda #0 +rol +eor #1 +//FRAGMENT vboxx=vbuxx_lt_vbuc1 +cpx #{c1} +lda #0 +rol +eor #1 +tax +//FRAGMENT vboyy=vbuxx_lt_vbuc1 +cpx #{c1} +lda #0 +rol +eor #1 +tay +//FRAGMENT vboz1=vbuyy_lt_vbuc1 +cpy #{c1} +lda #0 +rol +eor #1 +sta {z1} +//FRAGMENT vboaa=vbuyy_lt_vbuc1 +cpy #{c1} +lda #0 +rol +eor #1 +//FRAGMENT vboxx=vbuyy_lt_vbuc1 +cpy #{c1} +lda #0 +rol +eor #1 +tax +//FRAGMENT vboyy=vbuyy_lt_vbuc1 +cpy #{c1} +lda #0 +rol +eor #1 +tay +//FRAGMENT vbuaa=vbuc1_plus_vbuxx +txa +clc +adc #{c1} +//FRAGMENT vbuaa=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +//FRAGMENT vbuxx=vbuc1_plus_vbuxx +txa +axs #-[{c1}] +//FRAGMENT vbuxx=vbuc1_plus_vbuyy +tya +tax +axs #-[{c1}] +//FRAGMENT vbuyy=vbuc1_plus_vbuaa +clc +adc #{c1} +tay +//FRAGMENT vbuyy=vbuc1_plus_vbuxx +txa +clc +adc #{c1} +tay +//FRAGMENT vbuyy=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +tay +//FRAGMENT vbuz1=vbuz2_rol_4 +lda {z2} +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuaa_rol_4 +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuxx_rol_4 +txa +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuyy_rol_4 +tya +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +//FRAGMENT vbuaa=vbuaa_rol_4 +asl +asl +asl +asl +//FRAGMENT vbuaa=vbuxx_rol_4 +txa +asl +asl +asl +asl +//FRAGMENT vbuaa=vbuyy_rol_4 +tya +asl +asl +asl +asl +//FRAGMENT vbuxx=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +tax +//FRAGMENT vbuxx=vbuaa_rol_4 +asl +asl +asl +asl +tax +//FRAGMENT vbuxx=vbuxx_rol_4 +txa +asl +asl +asl +asl +tax +//FRAGMENT vbuxx=vbuyy_rol_4 +tya +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +tay +//FRAGMENT vbuyy=vbuaa_rol_4 +asl +asl +asl +asl +tay +//FRAGMENT vbuyy=vbuxx_rol_4 +txa +asl +asl +asl +asl +tay +//FRAGMENT vbuyy=vbuyy_rol_4 +tya +asl +asl +asl +asl +tay +//FRAGMENT vbuz1=vbuaa_bor_vbuz2 +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuaa_bor_vbuxx +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuaa_bor_vbuyy +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuaa=vbuaa_bor_vbuz1 +ora {z1} +//FRAGMENT vbuaa=vbuaa_bor_vbuxx +stx $ff +ora $ff +//FRAGMENT vbuaa=vbuaa_bor_vbuyy +sty $ff +ora $ff +//FRAGMENT vbuxx=vbuaa_bor_vbuz1 +ora {z1} +tax +//FRAGMENT vbuxx=vbuaa_bor_vbuxx +stx $ff +ora $ff +tax +//FRAGMENT vbuxx=vbuaa_bor_vbuyy +sty $ff +ora $ff +tax +//FRAGMENT vbuyy=vbuaa_bor_vbuz1 +ora {z1} +tay +//FRAGMENT vbuyy=vbuaa_bor_vbuxx +stx $ff +ora $ff +tay +//FRAGMENT vbuyy=vbuaa_bor_vbuyy +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 +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 +ora $ff +tay +//FRAGMENT vboz1=vboyy +tya +sta {z1} +//FRAGMENT vbuz1=_byte_pwuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_1 +ldx {z1} +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT pwuc1_derefidx_vbuz1_lt_vbuc2_then_la1 +ldy {z1} +lda {c1}+1,y +bne !+ +lda {c1},y +cmp #{c2} +bcc {la1} +!: +//FRAGMENT pwuc1_derefidx_vbuz1=vbuc2 +lda #{c2} +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pbuz1=pbuz2_plus_pwuc1_derefidx_vbuz3 +ldy {z3} +clc +lda {z2} +adc {c1},y +sta {z1} +lda {z2}+1 +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vbuaa=_byte_pwuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +//FRAGMENT vbuxx=_byte_pwuc1_derefidx_vbuz1 +ldx {z1} +lda {c1},x +tax +//FRAGMENT vbuyy=_byte_pwuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +tay +//FRAGMENT vbuz1=_byte_pwuc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +//FRAGMENT vbuaa=_byte_pwuc1_derefidx_vbuaa +tay +lda {c1},y +//FRAGMENT vbuxx=_byte_pwuc1_derefidx_vbuaa +tax +lda {c1},x +tax +//FRAGMENT vbuyy=_byte_pwuc1_derefidx_vbuaa +tay +lda {c1},y +tay +//FRAGMENT vbuz1=_byte_pwuc1_derefidx_vbuxx +lda {c1},x +sta {z1} +//FRAGMENT vbuaa=_byte_pwuc1_derefidx_vbuxx +lda {c1},x +//FRAGMENT vbuxx=_byte_pwuc1_derefidx_vbuxx +lda {c1},x +tax +//FRAGMENT vbuyy=_byte_pwuc1_derefidx_vbuxx +lda {c1},x +tay +//FRAGMENT vbuz1=_byte_pwuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +//FRAGMENT vbuaa=_byte_pwuc1_derefidx_vbuyy +lda {c1},y +//FRAGMENT vbuxx=_byte_pwuc1_derefidx_vbuyy +lda {c1},y +tax +//FRAGMENT vbuyy=_byte_pwuc1_derefidx_vbuyy +lda {c1},y +tay +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_1 +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT pwuc1_derefidx_vbuxx_lt_vbuc2_then_la1 +lda {c1}+1,x +bne !+ +lda {c1},x +cmp #{c2} +bcc {la1} +!: +//FRAGMENT pwuc1_derefidx_vbuyy_lt_vbuc2_then_la1 +lda {c1}+1,y +bne !+ +lda {c1},y +cmp #{c2} +bcc {la1} +!: +//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 pbuz1=pbuz2_plus_pwuc1_derefidx_vbuxx +clc +lda {z2} +adc {c1},x +sta {z1} +lda {z2}+1 +adc {c1}+1,x +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_pwuc1_derefidx_vbuyy +clc +lda {z2} +adc {c1},y +sta {z1} +lda {z2}+1 +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_1 +tya +tax +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT vbuz1=vbuc1_bor_vbuz2 +lda #{c1} +ora {z2} +sta {z1} +//FRAGMENT pbuz1_neq_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vwuz1_neq_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vbuz1=vbuc1_bor_vbuaa +ora #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_bor_vbuxx +txa +ora #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_bor_vbuyy +tya +ora #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_bor_vbuz1 +lda #{c1} +ora {z1} +//FRAGMENT vbuaa=vbuc1_bor_vbuaa +ora #{c1} +//FRAGMENT vbuaa=vbuc1_bor_vbuxx +txa +ora #{c1} +//FRAGMENT vbuaa=vbuc1_bor_vbuyy +tya +ora #{c1} +//FRAGMENT vbuxx=vbuc1_bor_vbuz1 +lda #{c1} +ora {z1} +tax +//FRAGMENT vbuxx=vbuc1_bor_vbuaa +ora #{c1} +tax +//FRAGMENT vbuxx=vbuc1_bor_vbuxx +txa +ora #{c1} +tax +//FRAGMENT vbuxx=vbuc1_bor_vbuyy +tya +ora #{c1} +tax +//FRAGMENT vbuyy=vbuc1_bor_vbuz1 +lda #{c1} +ora {z1} +tay +//FRAGMENT vbuyy=vbuc1_bor_vbuaa +ora #{c1} +tay +//FRAGMENT vbuyy=vbuc1_bor_vbuxx +txa +ora #{c1} +tay +//FRAGMENT vbuyy=vbuc1_bor_vbuyy +tya +ora #{c1} +tay +//FRAGMENT vwuz1_gt_vbuc1_then_la1 +lda {z1}+1 +bne {la1} +lda {z1} +cmp #{c1} +beq !+ +bcs {la1} +!: +//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuz1 +lda {c1} +and {z1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuz1 +lda {c1} +ora {z1} +sta {c1} +//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 _deref_pbuc1=_deref_pbuc1_band_vbuaa +and {c1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuxx +txa +and {c1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuyy +tya +and {c1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuaa +ora {c1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuxx +txa +ora {c1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_bor_vbuyy +tya +ora {c1} +sta {c1} +//FRAGMENT pbuz1=pbuc1_plus_vbsz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda {z2} +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=_deref_pbuz2_band_vbuc1 +lda #{c1} +ldy #0 +and ({z2}),y +sta {z1} +//FRAGMENT vbsaa_ge_0_then_la1 +cmp #0 +bpl {la1} +//FRAGMENT pbuz1=pbuc1_plus_vbsaa +pha +clc +adc #<{c1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vbsxx +txa +pha +clc +adc #<{c1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vbsyy +tya +pha +clc +adc #<{c1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbuaa=_deref_pbuz1_band_vbuc1 +lda #{c1} +ldy #0 +and ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1_band_vbuc1 +lda #{c1} +ldy #0 +and ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1_band_vbuc1 +lda #{c1} +ldy #0 +and ({z1}),y +tay +//FRAGMENT vbuyy=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff +tay +//FRAGMENT vbuxx=vbuyy_bor_vbuxx +txa +sty $ff +ora $ff +tax +//FRAGMENT vduz1=vduz2_minus_vduc1 +lda {z2} +sec +sbc #<{c1} +sta {z1} +lda {z2}+1 +sbc #>{c1} +sta {z1}+1 +lda {z2}+2 +sbc #<{c1}>>$10 +sta {z1}+2 +lda {z2}+3 +sbc #>{c1}>>$10 +sta {z1}+3 +//FRAGMENT _deref_pduc1=vduc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +lda #<{c2}>>$10 +sta {c1}+2 +lda #>{c2}>>$10 +sta {c1}+3 +//FRAGMENT vbuz1=vbuc1_minus_vbuz2 +lda #{c1} +sec +sbc {z2} +sta {z1} +//FRAGMENT pbuz1=pbuz1_minus_vbuc1 +sec +lda {z1} +sbc #{c1} +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vduz1=vduc1_minus__deref_pduc2 +lda #<{c1} +sec +sbc {c2} +sta {z1} +lda #>{c1} +sbc {c2}+1 +sta {z1}+1 +lda #<{c1}>>$10 +sbc {c2}+2 +sta {z1}+2 +lda #>{c1}>>$10 +sbc {c2}+3 +sta {z1}+3 +//FRAGMENT vwuz1=_lo_vduz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pwuz1=pwuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pwuz1=vwuz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT pwuz1=pwuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT pwuz1=pwuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=pwuz2_minus_pwuc1 +lda {z2} +sec +sbc #<{c1} +sta {z1} +lda {z2}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pwuz1_le_vwuz2_then_la1 +ldy #1 +lda ({z1}),y +cmp {z2}+1 +bne !+ +dey +lda ({z1}),y +cmp {z2} +beq {la1} +!: +bcc {la1} +//FRAGMENT pwuz1=pwuz1_minus_vbuc1 +sec +lda {z1} +sbc #{c1} +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vbuz1=vbuz2_ror_1 +lda {z2} +lsr +sta {z1} +//FRAGMENT pwuz1=pwuz2_plus_vbuz3 +lda {z3} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_minus__deref_pwsz3 +sec +lda {z2} +ldy #0 +sbc ({z3}),y +sta {z1} +lda {z2}+1 +iny +sbc ({z3}),y +sta {z1}+1 +//FRAGMENT vwsz1_le_0_then_la1 +lda {z1}+1 +bmi {la1} +bne !+ +lda {z1} +beq {la1} +!: +//FRAGMENT pwuz1=pwuz2_plus_vbuc1 +lda #{c1} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_1 +clc +lda {z2} +adc #1 +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +//FRAGMENT vbuaa=vbuc1_minus_vbuz1 +lda #{c1} +sec +sbc {z1} +//FRAGMENT vbuxx=vbuc1_minus_vbuz1 +lda #{c1} +sec +sbc {z1} +tax +//FRAGMENT vbuyy=vbuc1_minus_vbuz1 +lda #{c1} +sec +sbc {z1} +tay +//FRAGMENT vbuz1=vbuc1_minus_vbuaa +eor #$ff +sec +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_minus_vbuaa +eor #$ff +sec +adc #{c1} +//FRAGMENT vbuxx=vbuc1_minus_vbuaa +eor #$ff +tax +axs #-{c1}-1 +//FRAGMENT vbuyy=vbuc1_minus_vbuaa +eor #$ff +sec +adc #{c1} +tay +//FRAGMENT vbuz1=vbuc1_minus_vbuxx +txa +eor #$ff +sec +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_minus_vbuxx +txa +eor #$ff +sec +adc #{c1} +//FRAGMENT vbuxx=vbuc1_minus_vbuxx +txa +eor #$ff +tax +axs #-{c1}-1 +//FRAGMENT vbuyy=vbuc1_minus_vbuxx +txa +eor #$ff +sec +adc #{c1} +tay +//FRAGMENT vbuz1=vbuc1_minus_vbuyy +tya +eor #$ff +sec +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_minus_vbuyy +tya +eor #$ff +sec +adc #{c1} +//FRAGMENT vbuxx=vbuc1_minus_vbuyy +tya +eor #$ff +tax +axs #-{c1}-1 +//FRAGMENT vbuyy=vbuc1_minus_vbuyy +tya +eor #$ff +sec +adc #{c1} +tay +//FRAGMENT pbuz1_derefidx_vbuxx=vbuxx +txa +tay +sta ({z1}),y +//FRAGMENT vbuaa=vbuz1_ror_1 +lda {z1} +lsr +//FRAGMENT vbuxx=vbuz1_ror_1 +lda {z1} +lsr +tax +//FRAGMENT vbuyy=vbuz1_ror_1 +lda {z1} +lsr +tay +//FRAGMENT vbuz1=vbuaa_ror_1 +lsr +sta {z1} +//FRAGMENT vbuaa=vbuaa_ror_1 +lsr +//FRAGMENT vbuxx=vbuaa_ror_1 +lsr +tax +//FRAGMENT vbuyy=vbuaa_ror_1 +lsr +tay +//FRAGMENT vbuz1=vbuxx_ror_1 +txa +lsr +sta {z1} +//FRAGMENT vbuaa=vbuxx_ror_1 +txa +lsr +//FRAGMENT vbuyy=vbuxx_ror_1 +txa +lsr +tay +//FRAGMENT vbuz1=vbuyy_ror_1 +tya +lsr +sta {z1} +//FRAGMENT vbuaa=vbuyy_ror_1 +tya +lsr +//FRAGMENT vbuxx=vbuyy_ror_1 +tya +lsr +tax +//FRAGMENT pwuz1=pwuz2_plus_vbuaa +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pwuz1=pwuz2_plus_vbuxx +txa +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pwuz1=pwuz2_plus_vbuyy +tya +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vbuaa=vbuaa_plus_1 +clc +adc #1 +//FRAGMENT vbuaa=vbuxx_plus_1 +inx +txa +//FRAGMENT vbuaa=vbuyy_plus_1 +iny +tya +//FRAGMENT vbuxx=vbuaa_plus_1 +tax +inx +//FRAGMENT vbuxx=vbuxx_plus_1 +inx +//FRAGMENT vbuxx=vbuyy_plus_1 +tya +tax +inx +//FRAGMENT vbuyy=vbuaa_plus_1 +tay +iny +//FRAGMENT vbuyy=vbuxx_plus_1 +txa +tay +iny +//FRAGMENT vbuyy=vbuyy_plus_1 +iny +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx +lda {c1},x +tax +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy +ldx {c1},y +//FRAGMENT vwuz1=pwuz1_minus_pwuc1 +lda {z1} +sec +sbc #<{c1} +sta {z1} +lda {z1}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vduz1=vduz1_minus_vduc1 +lda {z1} +sec +sbc #<{c1} +sta {z1} +lda {z1}+1 +sbc #>{c1} +sta {z1}+1 +lda {z1}+2 +sbc #<{c1}>>$10 +sta {z1}+2 +lda {z1}+3 +sbc #>{c1}>>$10 +sta {z1}+3 +//FRAGMENT pbuz1=_dec_pbuz1 +lda {z1} +bne !+ +dec {z1}+1 +!: +dec {z1} +//FRAGMENT vbuz1=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +sta {z1} +//FRAGMENT _stackidxbyte_vbuc1=vbuz1 +lda {z1} +tsx +sta STACK_BASE+{c1},x +//FRAGMENT _stackpushbyte_=vbuz1 +lda {z1} +pha +//FRAGMENT _stackpushbyte_1 +pha +//FRAGMENT vbuz1=_stackpullbyte_ +pla +sta {z1} +//FRAGMENT _stackpullbyte_2 +pla +pla +//FRAGMENT vbuaa=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +//FRAGMENT vbuxx=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +tax +//FRAGMENT vbuyy=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +tay +//FRAGMENT _stackidxbyte_vbuc1=vbuxx +txa +tsx +sta STACK_BASE+{c1},x +//FRAGMENT _stackidxbyte_vbuc1=vbuyy +tya +tsx +sta STACK_BASE+{c1},x +//FRAGMENT vbuaa=_stackpullbyte_ +pla +//FRAGMENT vbuxx=_stackpullbyte_ +pla +tax +//FRAGMENT vbuyy=_stackpullbyte_ +pla +tay +//FRAGMENT _stackpushbyte_=vbuxx +txa +pha +//FRAGMENT _stackpushbyte_=vbuyy +tya +pha +//FRAGMENT _stackpushbyte_3 +pha +pha +pha +//FRAGMENT _stackpullbyte_4 +tsx +txa +axs #-4 +txs +//FRAGMENT pbuz1=_stackidxptr_vbuc1 +tsx +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 +lda #<{c1} +pha +//FRAGMENT _stackpushbyte_=vbuc1 +lda #{c1} +pha +//FRAGMENT _stackpullbyte_3 +tsx +txa +axs #-3 +txs +//FRAGMENT vbuz1=vbuz2_minus_1 +ldx {z2} +dex +stx {z1} +//FRAGMENT vbuaa=vbuz1_minus_1 +lda {z1} +sec +sbc #1 +//FRAGMENT _stackpushbyte_=vbuaa +pha +//FRAGMENT _stackidxbyte_vbuc1=vbuaa +tsx +sta STACK_BASE+{c1},x +//FRAGMENT vbuxx=vbuz1_minus_1 +ldx {z1} +dex +//FRAGMENT vbuyy=vbuz1_minus_1 +lda {z1} +tay +dey +//FRAGMENT vbuz1=vbuaa_minus_1 +sec +sbc #1 +sta {z1} +//FRAGMENT vbuaa=vbuaa_minus_1 +sec +sbc #1 +//FRAGMENT vbuxx=vbuaa_minus_1 +tax +dex +//FRAGMENT vbuz1=_lo_pbuz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=_hi_pbuz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuc1_lt_vbuz1_then_la1 +lda #{c1} +cmp {z1} +bcc {la1} +//FRAGMENT vbuc1_ge_vbuz1_then_la1 +lda #{c1} +cmp {z1} +bcs {la1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1}+1 +lda {c2},y +sta {z1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuz3 +ldy #0 +lda ({z2}),y +ldy {z3} +ora {c1},y +sta {z1} +//FRAGMENT vbuaa=_lo_pbuz1 +lda {z1} +//FRAGMENT vbuxx=_lo_pbuz1 +ldx {z1} +//FRAGMENT vbuz1=vbuaa_bor_vbuaa +sta {z1} +//FRAGMENT vbuaa=_hi_pbuz1 +lda {z1}+1 +//FRAGMENT vbuxx=_hi_pbuz1 +ldx {z1}+1 +//FRAGMENT vbuc1_lt_vbuaa_then_la1 +cmp #{c1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuz1=vbuz1_plus_vbuyy +tya +clc +adc {z1} +sta {z1} +//FRAGMENT vbuc1_ge_vbuaa_then_la1 +cmp #{c1} +bcc {la1} +beq {la1} +//FRAGMENT vbuz1_ge_vbuaa_then_la1 +ldy {z1} +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa +tay +lda {c1},y +sta {z1}+1 +lda {c2},y +sta {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx +lda {c1},x +sta {z1}+1 +lda {c2},x +sta {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy +lda {c1},y +sta {z1}+1 +lda {c2},y +sta {z1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuxx +lda {c1},x +ldy #0 +ora ({z2}),y +sta {z1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuyy +lda {c1},y +ldy #0 +ora ({z2}),y +sta {z1} +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 +ldy #0 +lda ({z1}),y +ldy {z2} +ora {c1},y +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx +lda {c1},x +ldy #0 +ora ({z1}),y +//FRAGMENT vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuyy +lda {c1},y +ldy #0 +ora ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 +ldx {z2} +lda {c1},x +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx +lda {c1},x +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuxx=_deref_pbuz1_bor_pbuc1_derefidx_vbuyy +lda {c1},y +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbuz2 +ldy #0 +lda ({z1}),y +ldy {z2} +ora {c1},y +tay +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx +lda {c1},x +ldy #0 +ora ({z1}),y +tay +//FRAGMENT vbuyy=_deref_pbuz1_bor_pbuc1_derefidx_vbuyy +lda {c1},y +ldy #0 +ora ({z1}),y +tay +//FRAGMENT vbuc1_ge_vbuxx_then_la1 +cpx #{c1} +bcc {la1} +beq {la1} +//FRAGMENT vbuc1_lt_vbuxx_then_la1 +cpx #{c1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuc1_lt_vbuyy_then_la1 +cpy #{c1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuyy=_lo_pbuz1 +ldy {z1} +//FRAGMENT vbuz1=vbuz2_bor__lo_pbuz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT vbuyy=_hi_pbuz1 +ldy {z1}+1 +//FRAGMENT vwuz1_eq_0_then_la1 +lda {z1} +bne !+ +lda {z1}+1 +beq {la1} +!: +//FRAGMENT vwuz1_gt_vwuz2_then_la1 +lda {z2}+1 +cmp {z1}+1 +bcc {la1} +bne !+ +lda {z2} +cmp {z1} +bcc {la1} +!: +//FRAGMENT vwuz1_neq_vwuz2_then_la1 +lda {z1}+1 +cmp {z2}+1 +bne {la1} +lda {z1} +cmp {z2} +bne {la1} +//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 +ldy {z2} +ora {c1},y +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuaa +tay +lda {c1},y +ldy #0 +ora ({z1}),y +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx +lda {c1},x +ldy #0 +ora ({z1}),y +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbuz1=_deref_pbuz1_bor_pbuc1_derefidx_vbuyy +lda {c1},y +ldy #0 +ora ({z1}),y +ldy #0 +sta ({z1}),y +//FRAGMENT pbuz1=pbuz1_plus_vwuz2 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuc1_derefidx_vbuz1_neq_0_then_la1 +ldy {z1} +lda {c1},y +cmp #0 +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuaa_neq_0_then_la1 +tay +lda {c1},y +cmp #0 +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_neq_0_then_la1 +lda {c1},x +cmp #0 +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_neq_0_then_la1 +lda {c1},y +cmp #0 +bne {la1} +//FRAGMENT pbuz1=pbuz2_minus_vwuc1 +lda {z2} +sec +sbc #<{c1} +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 +tay +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +sta {z1} +//FRAGMENT pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 +lda #{c2} +ldy #{c1} +cmp ({z1}),y +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 +ldy #{c1} +lda ({z1}),y + +cmp #{c2} +bne {la1} +//FRAGMENT _deref_(qbuz1_derefidx_vbuc1)=vbuc2 +ldx #{c2} +ldy #{c1} +lda ({z1}),y +sta !+ +1 +iny +lda ({z1}),y +sta !+ +2 +!: stx $ffff +//FRAGMENT pbuc1_derefidx_(pbuz1_derefidx_vbuc2)=pbuz1_derefidx_vbuc3 +ldy #{c3} +lda ({z1}),y +ldy #{c2} +pha +lda ({z1}),y +tay +pla +sta {c1},y +//FRAGMENT vwuz1=_deref_pwuz2_ror_4 +ldy #0 +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT vbuz1=vbuc1_bxor_vbuz2 +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 +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT _deref_pwuz1_lt_vwuc1_then_la1 +ldy #1 +lda ({z1}),y +cmp #>{c1} +bcc {la1} +bne !+ +dey +lda ({z1}),y +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT _deref_pwuz1_gt_vwuc1_then_la1 +ldy #1 +lda #>{c1} +cmp ({z1}),y +bcc {la1} +bne !+ +dey +lda #<{c1} +cmp ({z1}),y +bcc {la1} +!: +//FRAGMENT pwuz1_derefidx_vbuc1_lt_vwuc2_then_la1 +ldy #{c1} +iny +lda ({z1}),y +cmp #>{c2} +bcc {la1} +bne !+ +dey +lda ({z1}),y +cmp #<{c2} +bcc {la1} +!: +//FRAGMENT pwuz1_derefidx_vbuc1_gt_vwuc2_then_la1 +ldy #{c1} +iny +lda #>{c2} +cmp ({z1}),y +bcc {la1} +bne !+ +dey +lda #<{c2} +cmp ({z1}),y +bcc {la1} +!: +//FRAGMENT vwuz1=vwuz2_ror_3 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuz2 +ldx {z2} +ldy #{c1} +clc +lda ({z1}),y +adc {c2},x +sta ({z1}),y +iny +lda ({z1}),y +adc {c2}+1,x +sta ({z1}),y +//FRAGMENT _deref_pwuz1=_deref_pwuz1_plus_pwuz1_derefidx_vbuc1 +ldy #{c1} +sty $ff +clc +lda ({z1}),y +ldy #0 +adc ({z1}),y +sta ({z1}),y +ldy $ff +iny +lda ({z1}),y +ldy #1 +adc ({z1}),y +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuz1_derefidx_vbuc2 +ldy #{c2} +clc +lda ({z1}),y +ldy #{c1} +adc ({z1}),y +sta ({z1}),y +ldy #{c2}+1 +lda ({z1}),y +ldy #{c1}+1 +adc ({z1}),y +sta ({z1}),y +//FRAGMENT vbuz1=_neg_vbuz2 +lda {z2} +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbuz1=pbuz2_derefidx_vbuz3 +ldy {z3} +lda ({z2}),y +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 +lda #{c2} +ldy {z1} +cmp {c1},y +bne {la1} +//FRAGMENT vwuz1=vbuc1_plus_vwuz2 +lda #{c1} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+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 pwuc1_derefidx_vbuz1=_word_vbuz2 +lda {z2} +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuz1=vwuc2 +ldy {z1} +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT qbuc1_derefidx_vbuz1=pbuz2 +ldy {z1} +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 +tay +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +//FRAGMENT vbuxx=vbuc1_rol_pbuz1_derefidx_vbuc2 +ldy #{c2} +lda ({z1}),y +tax +lda #{c1} +cpx #0 +beq !e+ +!: +asl +dex +bne !- +!e: +tax +//FRAGMENT vbuyy=vbuc1_rol_pbuz1_derefidx_vbuc2 +ldy #{c2} +lda ({z1}),y +tay +lda #{c1} +cpy #0 +beq !e+ +!: +asl +dey +bne !- +!e: +tay +//FRAGMENT vbuaa=vbuc1_bxor_vbuz1 +lda #{c1} +eor {z1} +//FRAGMENT vbuxx=vbuc1_bxor_vbuz1 +lda #{c1} +eor {z1} +tax +//FRAGMENT vbuyy=vbuc1_bxor_vbuz1 +lda #{c1} +eor {z1} +tay +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa +ldy #{c1} +tax +clc +lda ({z1}),y +adc {c2},x +sta ({z1}),y +iny +lda ({z1}),y +adc {c2}+1,x +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuxx +ldy #{c1} +clc +lda ({z1}),y +adc {c2},x +sta ({z1}),y +iny +lda ({z1}),y +adc {c2}+1,x +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuyy +tya +ldy #{c1} +tax +clc +lda ({z1}),y +adc {c2},x +sta ({z1}),y +iny +lda ({z1}),y +adc {c2}+1,x +sta ({z1}),y +//FRAGMENT vbuz1=_neg_vbuaa +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT vbuz1=_neg_vbuxx +dex +txa +eor #$ff +sta {z1} +//FRAGMENT vbuaa=_neg_vbuz1 +lda {z1} +eor #$ff +clc +adc #$01 +//FRAGMENT vbuaa=_neg_vbuaa +eor #$ff +clc +adc #$01 +//FRAGMENT vbuaa=_neg_vbuxx +dex +txa +eor #$ff +//FRAGMENT vbuxx=_neg_vbuz1 +lda {z1} +eor #$ff +tax +inx +//FRAGMENT vbuxx=_neg_vbuaa +eor #$ff +tax +inx +//FRAGMENT vbuxx=_neg_vbuxx +dex +txa +eor #$ff +tax +//FRAGMENT vbuyy=_neg_vbuz1 +lda {z1} +eor #$ff +tay +iny +//FRAGMENT vbuyy=_neg_vbuaa +eor #$ff +tay +iny +//FRAGMENT vbuyy=_neg_vbuxx +txa +eor #$ff +tay +iny +//FRAGMENT vbuxx=pbuz1_derefidx_vbuz2 +ldy {z2} +lda ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuz2 +ldy {z2} +lda ({z1}),y +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuxx +txa +tay +lda ({z2}),y +sta {z1} +//FRAGMENT vbuxx=pbuz1_derefidx_vbuxx +txa +tay +lda ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuxx +txa +tay +lda ({z1}),y +tay +//FRAGMENT vbuz1=pbuz2_derefidx_vbuyy +lda ({z2}),y +sta {z1} +//FRAGMENT vbuxx=pbuz1_derefidx_vbuyy +lda ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuyy +lda ({z1}),y +tay +//FRAGMENT pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 +tay +lda #{c2} +cmp {c1},y +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_neq_vbuc2_then_la1 +lda {c1},x +cmp #{c2} +bne {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_neq_vbuc2_then_la1 +lda #{c2} +cmp {c1},y +bne {la1} +//FRAGMENT pwuc1_derefidx_vbuz1=_word_vbuxx +ldy {z1} +txa +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuz1=_word_vbuyy +tya +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=_word_vbuz1 +lda {z1} +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuxx=_word_vbuxx +txa +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuxx=_word_vbuyy +tya +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=_word_vbuz1 +lda {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=_word_vbuxx +txa +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=_word_vbuyy +tya +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=vwuc2 +lda #<{c2} +sta {c1},x +lda #>{c2} +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vwuc2 +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT qbuc1_derefidx_vbuxx=pbuz1 +lda {z1} +sta {c1},x +lda {z1}+1 +sta {c1}+1,x +//FRAGMENT qbuc1_derefidx_vbuyy=pbuz1 +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT vbuyy_ge_vbuxx_then_la1 +stx $ff +cpy $ff +bcs {la1} +//FRAGMENT vwuz1=vwuz1_ror_3 +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT vwuz1=vwuz1_rol_4 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vbuc1_plus_vwuz1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT pbuz1=pbuz2_minus_vwuz3 +lda {z2} +sec +sbc {z3} +sta {z1} +lda {z2}+1 +sbc {z3}+1 +sta {z1}+1 +//FRAGMENT pwuz1=qwuz2_derefidx_vbuz3 +ldy {z3} +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vbuz1_le_0_then_la1 +lda {z1} +cmp #0 +beq {la1} +//FRAGMENT vwuz1_eq_vwuc1_then_la1 +lda {z1} +cmp #<{c1} +bne !+ +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 +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT _deref_pbuz1_eq_vbuc1_then_la1 +lda #{c1} +ldy #0 +cmp ({z1}),y +beq {la1} +//FRAGMENT _deref_pbuz1_gt_vbuz2_then_la1 +ldy #0 +lda ({z1}),y +cmp {z2} +beq !+ +bcs {la1} +!: +//FRAGMENT pbuz1_derefidx_(_deref_pbuz2)=_inc_pbuz1_derefidx_(_deref_pbuz2) +ldy #0 +lda ({z2}),y +tay +lda ({z1}),y +clc +adc #1 +sta ({z1}),y +//FRAGMENT vwuz1=_deref_pbuz2_rol_1 +ldy #0 +lda ({z2}),y +asl +sta {z1} +lda #0 +rol +sta {z1}+1 +//FRAGMENT qwuz1=qwuz2_plus_vwuz3 +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc {z3}+1 +sta {z1}+1 +//FRAGMENT _deref_qwuz1=pwuz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT vwuz1_neq_vbuc1_then_la1 +NO_SYNTHESIS +//FRAGMENT vwuz1_neq_vbsc1_then_la1 +NO_SYNTHESIS +//FRAGMENT pwuz1=_deref_qwuz2 +ldy #0 +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vwuz1=pbuz2_minus_pbuz3 +lda {z2} +sec +sbc {z3} +sta {z1} +lda {z2}+1 +sbc {z3}+1 +sta {z1}+1 +//FRAGMENT pwuz1_derefidx_vbuz2=vwuz3 +ldy {z2} +lda {z3} +sta ({z1}),y +iny +lda {z3}+1 +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=_inc_pbuz1_derefidx_vbuz2 +ldy {z2} +lda ({z1}),y +clc +adc #1 +sta ({z1}),y +//FRAGMENT vwuz1=pwuz2_minus_pwuz3 +lda {z2} +sec +sbc {z3} +sta {z1} +lda {z2}+1 +sbc {z3}+1 +sta {z1}+1 +//FRAGMENT pwuz1=qwuz2_derefidx_vbuaa +tay +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT pwuz1=qwuz2_derefidx_vbuxx +txa +tay +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT pwuz1=qwuz2_derefidx_vbuyy +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vbuaa_le_0_then_la1 +cmp #0 +beq {la1} +//FRAGMENT vwuz1=pwuz2_derefidx_vbuaa +tay +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vwuz1=pwuz2_derefidx_vbuxx +txa +tay +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vwuz1=pwuz2_derefidx_vbuyy +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT _deref_pbuz1_gt_vbuxx_then_la1 +ldy #0 +lda ({z1}),y +sta $ff +cpx $ff +bcc {la1} +//FRAGMENT pwuz1_derefidx_vbuaa=vwuz2 +tay +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuxx=vwuz2 +txa +tay +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuyy=vwuz2 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=_inc_pbuz1_derefidx_vbuxx +txa +tay +lda ({z1}),y +clc +adc #1 +sta ({z1}),y +//FRAGMENT vbuxx_le_0_then_la1 +cpx #0 +beq {la1} +//FRAGMENT pbuz1=pbuz2_minus_vwuz1 +lda {z2} +sec +sbc {z1} +sta {z1} +lda {z2}+1 +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vwuz1=_deref_pbuz1_rol_1 +ldy #0 +lda ({z1}),y +asl +sta {z1} +lda #0 +rol +sta {z1}+1 +//FRAGMENT qwuz1=qwuz2_plus_vwuz1 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pwuz1=_deref_qwuz1 +ldy #0 +lda ({z1}),y +pha +iny +lda ({z1}),y +sta {z1}+1 +pla +sta {z1} +//FRAGMENT vwuz1=pwuz1_minus_pwuz2 +lda {z1} +sec +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx +ldy {c1},x +//FRAGMENT _stackpullbyte_1 +pla +//FRAGMENT vduz1=_inc_vduz1 +inc {z1} +bne !+ +inc {z1}+1 +bne !+ +inc {z1}+2 +bne !+ +inc {z1}+3 +!: +//FRAGMENT vbuz1_le_vbuz2_then_la1 +lda {z2} +cmp {z1} +bcs {la1} +//FRAGMENT pbuc1_derefidx_vbuz1_eq_vbuz2_then_la1 +ldy {z1} +lda {c1},y +cmp {z2} +beq {la1} +//FRAGMENT vbsz1=vbsz2_minus_vbsz3 +lda {z2} +sec +sbc {z3} +sta {z1} +//FRAGMENT vbuz1=_byte_vduz2 +lda {z2} +sta {z1} +//FRAGMENT vduz1_ge_vduz2_then_la1 +lda {z1}+3 +cmp {z2}+3 +bcc !+ +bne {la1} +lda {z1}+2 +cmp {z2}+2 +bcc !+ +bne {la1} +lda {z1}+1 +cmp {z2}+1 +bcc !+ +bne {la1} +lda {z1} +cmp {z2} +bcs {la1} +!: +//FRAGMENT vduz1=vduz1_minus_vduz2 +lda {z1} +sec +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +lda {z1}+2 +sbc {z2}+2 +sta {z1}+2 +lda {z1}+3 +sbc {z2}+3 +sta {z1}+3 +//FRAGMENT vbuz1_le_vbuc1_then_la1 +lda #{c1} +cmp {z1} +bcs {la1} +//FRAGMENT vbuaa_le_vbuz1_then_la1 +ldy {z1} +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT pbuc1_derefidx_vbuaa_eq_vbuz1_then_la1 +tay +lda {c1},y +cmp {z1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_eq_vbuz1_then_la1 +lda {c1},x +cmp {z1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_eq_vbuz1_then_la1 +lda {c1},y +cmp {z1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuz1_eq_vbuaa_then_la1 +ldx {z1} +tay +lda {c1},x +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuaa_eq_vbuaa_then_la1 +tax +lda {c1},x +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_eq_vbuaa_then_la1 +tay +lda {c1},x +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_eq_vbuaa_then_la1 +tax +lda {c1},y +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuz1_eq_vbuxx_then_la1 +ldy {z1} +lda {c1},y +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuaa_eq_vbuxx_then_la1 +tay +lda {c1},y +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_eq_vbuxx_then_la1 +lda {c1},x +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_eq_vbuxx_then_la1 +lda {c1},y +tay +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuz1_eq_vbuyy_then_la1 +ldx {z1} +lda {c1},x +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuaa_eq_vbuyy_then_la1 +tax +lda {c1},x +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_eq_vbuyy_then_la1 +lda {c1},x +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_eq_vbuyy_then_la1 +lda {c1},y +tax +sty $ff +cpx $ff +beq {la1} +//FRAGMENT vbsz1=vbsz2_minus_vbsaa +eor #$ff +sec +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsz2_minus_vbsxx +txa +eor #$ff +sec +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsz2_minus_vbsyy +tya +eor #$ff +sec +adc {z2} +sta {z1} +//FRAGMENT vbsxx=vbsz1_minus_vbsz2 +lda {z1} +sec +sbc {z2} +tax +//FRAGMENT vbsxx=vbsz1_minus_vbsaa +eor #$ff +sec +adc {z1} +tax +//FRAGMENT vbsxx=vbsz1_minus_vbsxx +txa +eor #$ff +sec +adc {z1} +tax +//FRAGMENT vbsxx=vbsz1_minus_vbsyy +tya +eor #$ff +sec +adc {z1} +tax +//FRAGMENT vbsz1=vbsxx_minus_vbsz2 +txa +sec +sbc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_vbsaa +sta $ff +txa +sec +sbc $ff +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_vbsxx +lda #0 +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_vbsyy +txa +sty $ff +sec +sbc $ff +sta {z1} +//FRAGMENT vbsxx=vbsxx_minus_vbsz1 +txa +sec +sbc {z1} +tax +//FRAGMENT vbsxx=vbsxx_minus_vbsaa +sta $ff +txa +sec +sbc $ff +tax +//FRAGMENT vbsxx=vbsxx_minus_vbsxx +lda #0 +tax +//FRAGMENT vbsxx=vbsxx_minus_vbsyy +txa +sty $ff +sec +sbc $ff +tax +//FRAGMENT vbsz1=vbsyy_minus_vbsz2 +tya +sec +sbc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsyy_minus_vbsaa +sta $ff +tya +sec +sbc $ff +sta {z1} +//FRAGMENT vbsz1=vbsyy_minus_vbsxx +tya +stx $ff +sec +sbc $ff +sta {z1} +//FRAGMENT vbsz1=vbsyy_minus_vbsyy +lda #0 +sta {z1} +//FRAGMENT vbsxx=vbsyy_minus_vbsz1 +tya +sec +sbc {z1} +tax +//FRAGMENT vbsxx=vbsyy_minus_vbsaa +sta $ff +tya +sec +sbc $ff +tax +//FRAGMENT vbsxx=vbsyy_minus_vbsxx +tya +stx $ff +sec +sbc $ff +tax +//FRAGMENT vbsxx=vbsyy_minus_vbsyy +lda #0 +tax +//FRAGMENT vbuaa=_byte_vduz1 +lda {z1} +//FRAGMENT vbuxx=_byte_vduz1 +lda {z1} +tax +//FRAGMENT vbuyy=_byte_vduz1 +lda {z1} +tay +//FRAGMENT vduz1=pduc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +lda {c1}+2,y +sta {z1}+2 +lda {c1}+3,y +sta {z1}+3 +//FRAGMENT vduz1=pduc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +lda {c1}+2,y +sta {z1}+2 +lda {c1}+3,y +sta {z1}+3 +//FRAGMENT vbuaa_le_vbuc1_then_la1 +cmp #{c1} +bcc {la1} +beq {la1} +//FRAGMENT vbuz1=vbuxx_minus_1 +dex +stx {z1} +//FRAGMENT vbuz1=vbuyy_minus_1 +tya +sec +sbc #1 +sta {z1} +//FRAGMENT vbuxx_le_vbuz1_then_la1 +lda {z1} +stx $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuyy_le_vbuz1_then_la1 +lda {z1} +sty $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuz1_le_vbuaa_then_la1 +cmp {z1} +bcs {la1} +//FRAGMENT vbuxx_le_vbuc1_then_la1 +cpx #{c1} +bcc {la1} +beq {la1} +//FRAGMENT vbuyy_le_vbuc1_then_la1 +cpy #{c1} +bcc {la1} +beq {la1} +//FRAGMENT vbuaa_lt_vbuxx_then_la1 +stx $ff +cmp $ff +bcc {la1} +//FRAGMENT vbuaa_lt_vbuyy_then_la1 +tax +sty $ff +cpx $ff +bcc {la1} +//FRAGMENT vbuyy_lt_vbuaa_then_la1 +sta $ff +cpy $ff +bcc {la1} +//FRAGMENT vbuyy_lt_vbuxx_then_la1 +stx $ff +cpy $ff +bcc {la1} +//FRAGMENT vbuxx_le_vbuaa_then_la1 +stx $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuyy_le_vbuaa_then_la1 +sty $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuz1_le_vbuxx_then_la1 +cpx {z1} +bcs {la1} +//FRAGMENT vbuyy_le_vbuxx_then_la1 +sty $ff +cpx $ff +bcs {la1} +//FRAGMENT vbuz1_le_vbuyy_then_la1 +cpy {z1} +bcs {la1} +//FRAGMENT vbuxx_le_vbuyy_then_la1 +stx $ff +cpy $ff +bcs {la1} +//FRAGMENT vbuz1=vbuz2_minus_vbuz1 +lda {z2} +sec +sbc {z1} +sta {z1} +//FRAGMENT vbsz1=vbsz1_minus_vbsz2 +lda {z1} +sec +sbc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuc1_plus_vbuz1 +lax {z1} +axs #-[{c1}] +stx {z1} +//FRAGMENT vbuz1=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +sta {z1} +//FRAGMENT pbuz1_le_pbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne !+ +lda {z1} +cmp #<{c1} +!: +bcc {la1} +beq {la1} +//FRAGMENT pbuz1_gt_pbuc1_then_la1 +lda #>{c1} +cmp {z1}+1 +bcc {la1} +bne !+ +lda #<{c1} +cmp {z1} +bcc {la1} +!: +//FRAGMENT vbuz1=vbuz1_rol_1 +asl {z1} +//FRAGMENT pbuc1_derefidx_vbuz1_eq_vbuc2_then_la1 +ldy {z1} +lda {c1},y +cmp #{c2} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 +ldx {z1} +inc {c1},x +//FRAGMENT pbuc1_derefidx_vbuaa_eq_vbuc2_then_la1 +tay +lda {c1},y +cmp #{c2} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx_eq_vbuc2_then_la1 +lda {c1},x +cmp #{c2} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuyy_eq_vbuc2_then_la1 +lda {c1},y +cmp #{c2} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx=_inc_pbuc1_derefidx_vbuxx +inc {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=_inc_pbuc1_derefidx_vbuyy +tya +tax +inc {c1},x +//FRAGMENT vduz1=vduc1_plus_vbuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +lda #<{c1}>>$10 +adc #0 +sta {z1}+2 +lda #>{c1}>>$10 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduc1_plus_vbuaa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +lda #<{c1}>>$10 +adc #0 +sta {z1}+2 +lda #>{c1}>>$10 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduc1_plus_vbuxx +txa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +lda #<{c1}>>$10 +adc #0 +sta {z1}+2 +lda #>{c1}>>$10 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduc1_plus_vbuyy +tya +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +lda #<{c1}>>$10 +adc #0 +sta {z1}+2 +lda #>{c1}>>$10 +adc #0 +sta {z1}+3 +//FRAGMENT pbuz1_derefidx_vbuaa=vbuz2 +tay +lda {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=vbuaa +tay +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=vbuxx +tay +txa +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=vbuyy +sta $ff +tya +ldy $ff +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_lt_vbuc1_then_la1 +lda {z1}+1 +bne !+ +lda {z1} +cmp #{c1} +bcc {la1} +!: +//FRAGMENT vwuz1=_word_vduz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vduz1=vwuz2_dword_vwuz3 +lda {z2} +sta {z1}+2 +lda {z2}+1 +sta {z1}+3 +lda {z3} +sta {z1} +lda {z3}+1 +sta {z1}+1 +//FRAGMENT _deref_pbuz1_eq_vbuz2_then_la1 +lda {z2} +ldy #0 +cmp ({z1}),y +beq {la1} +//FRAGMENT _deref_pbuz1_neq_0_then_la1 +ldy #0 +lda ({z1}),y +cmp #0 +bne {la1} +//FRAGMENT _deref_pbuz1_eq_vbuxx_then_la1 +txa +ldy #0 +cmp ({z1}),y +beq {la1} +//FRAGMENT _deref_pbuz1_eq_vbuyy_then_la1 +tya +ldy #0 +cmp ({z1}),y +beq {la1} +//FRAGMENT vwuz1=vbuz2 +lda {z2} +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vbuz1=pwuc1_derefidx_vbuz2_band_vbuc2 +lda #{c2} +ldy {z2} +and {c1},y +sta {z1} +//FRAGMENT vwuz1=vbuaa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vbuxx +txa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vbuyy +tya +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vbuaa=pwuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +//FRAGMENT vbuxx=pwuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldx {z1} +and {c1},x +tax +//FRAGMENT vbuyy=pwuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +tay +//FRAGMENT vbuz1=pwuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=pwuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +//FRAGMENT vbuxx=pwuc1_derefidx_vbuaa_band_vbuc2 +tax +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuyy=pwuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +tay +//FRAGMENT vbuz1=pwuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +sta {z1} +//FRAGMENT vbuaa=pwuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +//FRAGMENT vbuxx=pwuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuyy=pwuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +tay +//FRAGMENT vbuz1=pwuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=pwuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +//FRAGMENT vbuxx=pwuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +tax +//FRAGMENT vbuyy=pwuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +tay +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_vbuz2 +ldx {z2} +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_vbuxx +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_vbuyy +ldx {c1},y +tay +txa +sta ({z1}),y +//FRAGMENT _deref_pbuz1_neq_vbuc1_then_la1 +ldy #0 +lda ({z1}),y +cmp #{c1} +bne {la1} +//FRAGMENT vwsz1=vwsz2_plus_pbuz3_derefidx_vbuz4 +ldy {z4} +clc +lda {z2} +adc ({z3}),y +sta {z1} +bcc !+ +inc {z2}+1 +!: +//FRAGMENT vwsz1=vwsz2_minus_vbuc1 +sec +lda {z2} +sbc #{c1} +sta {z1} +lda {z2}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_plus_pbuz3_derefidx_vbuxx +txa +tay +clc +lda {z2} +adc ({z3}),y +sta {z1} +bcc !+ +inc {z2}+1 +!: +//FRAGMENT vwsz1=vwsz2_plus_pbuz3_derefidx_vbuyy +clc +lda {z2} +adc ({z3}),y +sta {z1} +bcc !+ +inc {z2}+1 +!: +//FRAGMENT vwsz1=vwsz2_plus_vwsz1 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_minus_vbuc1 +sec +lda {z1} +sbc #{c1} +sta {z1} +bcs !+ +dec {z1}+1 +!: +//FRAGMENT vwsz1=vwsz1_plus_pbuz2_derefidx_vbuyy +clc +lda {z1} +adc ({z2}),y +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT vbuz1=vbuz1_plus_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuz1=pbuz2_derefidx_vbuc1_plus_pbuz2_derefidx_vbuc1 +ldy #{c1} +lda ({z2}),y +clc +adc ({z2}),y +sta {z1} +//FRAGMENT vbuz1=vbuz2_plus_pbuz3_derefidx_vbuc1 +lda {z2} +ldy #{c1} +clc +adc ({z3}),y +sta {z1} +//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=vbuz1_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +clc +adc {z1} +sta {z1} +//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuaa +tax +tya +clc +adc {c1},x +tay +//FRAGMENT vbuz1=vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {z1} +sta {z1} +//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuxx +tya +clc +adc {c1},x +tay +//FRAGMENT vbuz1=vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {z1} +sta {z1} +//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuyy +tya +clc +adc {c1},y +tay +//FRAGMENT vbuaa=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +clc +adc ({z1}),y +//FRAGMENT vbuxx=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +clc +adc ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuc1_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +clc +adc ({z1}),y +tay +//FRAGMENT vbuaa=vbuz1_plus_pbuz2_derefidx_vbuc1 +lda {z1} +ldy #{c1} +clc +adc ({z2}),y +//FRAGMENT vbuxx=vbuz1_plus_pbuz2_derefidx_vbuc1 +lda {z1} +ldy #{c1} +clc +adc ({z2}),y +tax +//FRAGMENT vbuyy=vbuz1_plus_pbuz2_derefidx_vbuc1 +lda {z1} +ldy #{c1} +clc +adc ({z2}),y +tay +//FRAGMENT vbuz1=vbuaa_plus_pbuz2_derefidx_vbuc1 +ldy #{c1} +clc +adc ({z2}),y +sta {z1} +//FRAGMENT vbuaa=vbuaa_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +clc +adc ({z1}),y +//FRAGMENT vbuxx=vbuaa_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +clc +adc ({z1}),y +tax +//FRAGMENT vbuyy=vbuaa_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +clc +adc ({z1}),y +tay +//FRAGMENT vbuz1=vbuxx_plus_pbuz2_derefidx_vbuc1 +ldy #{c1} +txa +clc +adc ({z2}),y +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +txa +clc +adc ({z1}),y +//FRAGMENT vbuxx=vbuxx_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +txa +clc +adc ({z1}),y +tax +//FRAGMENT vbuyy=vbuxx_plus_pbuz1_derefidx_vbuc1 +ldy #{c1} +txa +clc +adc ({z1}),y +tay +//FRAGMENT vbuz1=vbuyy_plus_pbuz2_derefidx_vbuc1 +tya +ldy #{c1} +clc +adc ({z2}),y +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_pbuz1_derefidx_vbuc1 +tya +ldy #{c1} +clc +adc ({z1}),y +//FRAGMENT vbuxx=vbuyy_plus_pbuz1_derefidx_vbuc1 +tya +ldy #{c1} +clc +adc ({z1}),y +tax +//FRAGMENT vbuyy=vbuyy_plus_pbuz1_derefidx_vbuc1 +tya +ldy #{c1} +clc +adc ({z1}),y +tay +//FRAGMENT vwuz1=vbuz2_word_vbuz3 +lda {z2} +sta {z1}+1 +lda {z3} +sta {z1} +//FRAGMENT vwuz1=vbuaa_word_vbuz2 +sta {z1}+1 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=vbuxx_word_vbuz2 +txa +sta {z1}+1 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=vbuyy_word_vbuz2 +tya +sta {z1}+1 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=vbuz2_word_vbuaa +tay +lda {z2} +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuaa_word_vbuaa +tay +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuxx_word_vbuaa +tay +txa +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuyy_word_vbuaa +tax +tya +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=vbuz2_word_vbuxx +lda {z2} +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=vbuaa_word_vbuxx +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=vbuyy_word_vbuxx +tya +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=vbuz2_word_vbuyy +lda {z2} +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuaa_word_vbuyy +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=vbuxx_word_vbuyy +txa +sta {z1}+1 +sty {z1} +//FRAGMENT _deref_qbuc1=pbuc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT _deref_pbsc1=vbsc2 +lda #{c2} +sta {c1} +//FRAGMENT vbuz1=_dec_vbuz2 +ldy {z2} +dey +sty {z1} +//FRAGMENT vbuz1=_dec_vbuaa +sec +sbc #1 +sta {z1} +//FRAGMENT vbuz1=_dec_vbuxx +dex +stx {z1} +//FRAGMENT vbuz1=_dec_vbuyy +dey +sty {z1} +//FRAGMENT vbuaa=_dec_vbuz1 +lda {z1} +sec +sbc #1 +//FRAGMENT vbuaa=_dec_vbuxx +txa +sec +sbc #1 +//FRAGMENT vbuaa=_dec_vbuyy +tya +sec +sbc #1 +//FRAGMENT vbuxx=_dec_vbuz1 +ldx {z1} +dex +//FRAGMENT vbuxx=_dec_vbuaa +tax +dex +//FRAGMENT vbuxx=_dec_vbuyy +tya +tax +dex +//FRAGMENT vbuyy=_dec_vbuz1 +ldy {z1} +dey +//FRAGMENT vbuyy=_dec_vbuaa +tay +dey +//FRAGMENT vbuyy=_dec_vbuxx +txa +tay +dey +//FRAGMENT vwuz1=vwuz2_bor_vbuz3 +lda {z3} +ora {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vbuz1=pbuz2_derefidx_vbuaa +tay +lda ({z2}),y +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuaa +tay +lda ({z1}),y +//FRAGMENT vbuxx=pbuz1_derefidx_vbuaa +tay +lda ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuaa +tay +lda ({z1}),y +tay +//FRAGMENT vwuz1=vwuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_bor_vbuxx +txa +ora {z1} +sta {z1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_vbuz2_then_la1 +lda {z1} +ldy {z2} +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1_ge_vbuz1_then_la1 +lda {z1} +cmp {z1} +bcs {la1} +//FRAGMENT vbuz1_le_pbuc1_derefidx_vbuz2_then_la1 +ldy {z2} +lda {c1},y +cmp {z1} +bcs {la1} +//FRAGMENT vbuz1_le_vbuz1_then_la1 +lda {z1} +cmp {z1} +bcs {la1} +//FRAGMENT vbuz1_gt_pbuc1_derefidx_vbuz2_then_la1 +ldy {z2} +lda {c1},y +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_gt_vbuz1_then_la1 +lda {z1} +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_lt_pbuc1_derefidx_vbuz2_then_la1 +lda {z1} +ldy {z2} +cmp {c1},y +bcc {la1} +//FRAGMENT vbuz1_lt_vbuz1_then_la1 +lda {z1} +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 +lda {z1} +ldy {z2} +cmp {c1},y +bne {la1} +//FRAGMENT vbuz1_neq_vbuz1_then_la1 +lda {z1} +cmp {z1} +bne {la1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_vbuxx_then_la1 +txa +tay +lda {z1} +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_vbuyy_then_la1 +lda {z1} +cmp {c1},y +bcs {la1} +//FRAGMENT vbuxx_ge_pbuc1_derefidx_vbuz1_then_la1 +ldy {z1} +txa +cmp {c1},y +bcs {la1} +//FRAGMENT vbuxx_ge_pbuc1_derefidx_vbuxx_then_la1 +txa +tay +cmp {c1},y +bcs {la1} +//FRAGMENT vbuxx_ge_pbuc1_derefidx_vbuyy_then_la1 +txa +cmp {c1},y +bcs {la1} +//FRAGMENT vbuyy_ge_pbuc1_derefidx_vbuz1_then_la1 +tya +ldy {z1} +cmp {c1},y +bcs {la1} +//FRAGMENT vbuyy_ge_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vbuyy_ge_pbuc1_derefidx_vbuyy_then_la1 +tya +cmp {c1},y +bcs {la1} +//FRAGMENT vbuxx_ge_vbuxx_then_la1 +txa +stx $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuyy_ge_vbuyy_then_la1 +tya +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vbuz1_le_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +cmp {z1} +bcs {la1} +//FRAGMENT vbuz1_le_pbuc1_derefidx_vbuyy_then_la1 +lda {c1},y +cmp {z1} +bcs {la1} +//FRAGMENT vbuxx_le_pbuc1_derefidx_vbuz1_then_la1 +ldy {z1} +txa +cmp {c1},y +bcc {la1} +beq {la1} +//FRAGMENT vbuxx_le_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +stx $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuxx_le_pbuc1_derefidx_vbuyy_then_la1 +txa +cmp {c1},y +bcc {la1} +beq {la1} +//FRAGMENT vbuyy_le_pbuc1_derefidx_vbuz1_then_la1 +tya +ldy {z1} +cmp {c1},y +bcc {la1} +beq {la1} +//FRAGMENT vbuyy_le_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +sty $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuyy_le_pbuc1_derefidx_vbuyy_then_la1 +tya +cmp {c1},y +bcc {la1} +beq {la1} +//FRAGMENT vbuxx_le_vbuxx_then_la1 +txa +stx $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuyy_le_vbuyy_then_la1 +tya +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vbuz1_gt_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_gt_pbuc1_derefidx_vbuyy_then_la1 +lda {c1},y +cmp {z1} +bcc {la1} +//FRAGMENT vbuxx_gt_pbuc1_derefidx_vbuz1_then_la1 +ldy {z1} +txa +cmp {c1},y +beq !+ +bcs {la1} +!: +//FRAGMENT vbuxx_gt_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +stx $ff +cmp $ff +bcc {la1} +//FRAGMENT vbuxx_gt_pbuc1_derefidx_vbuyy_then_la1 +txa +cmp {c1},y +beq !+ +bcs {la1} +!: +//FRAGMENT vbuyy_gt_pbuc1_derefidx_vbuz1_then_la1 +tya +ldy {z1} +cmp {c1},y +beq !+ +bcs {la1} +!: +//FRAGMENT vbuyy_gt_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +tax +sty $ff +cpx $ff +bcc {la1} +//FRAGMENT vbuyy_gt_pbuc1_derefidx_vbuyy_then_la1 +tya +cmp {c1},y +beq !+ +bcs {la1} +!: +//FRAGMENT vbuxx_gt_vbuxx_then_la1 +txa +sta $ff +cpx $ff +bcc {la1} +//FRAGMENT vbuyy_gt_vbuyy_then_la1 +tya +sta $ff +cpy $ff +bcc {la1} +//FRAGMENT vbuz1_lt_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +cmp {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT vbuz1_lt_pbuc1_derefidx_vbuyy_then_la1 +lda {z1} +cmp {c1},y +bcc {la1} +//FRAGMENT vbuxx_lt_pbuc1_derefidx_vbuz1_then_la1 +ldy {z1} +txa +cmp {c1},y +bcc {la1} +//FRAGMENT vbuxx_lt_pbuc1_derefidx_vbuxx_then_la1 +txa +tay +cmp {c1},y +bcc {la1} +//FRAGMENT vbuxx_lt_pbuc1_derefidx_vbuyy_then_la1 +txa +cmp {c1},y +bcc {la1} +//FRAGMENT vbuyy_lt_pbuc1_derefidx_vbuz1_then_la1 +tya +ldy {z1} +cmp {c1},y +bcc {la1} +//FRAGMENT vbuyy_lt_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +sta $ff +cpy $ff +bcc {la1} +//FRAGMENT vbuyy_lt_pbuc1_derefidx_vbuyy_then_la1 +tya +cmp {c1},y +bcc {la1} +//FRAGMENT vbuxx_lt_vbuxx_then_la1 +txa +sta $ff +cpx $ff +bcc {la1} +//FRAGMENT vbuyy_lt_vbuyy_then_la1 +tya +sta $ff +cpy $ff +bcc {la1} +//FRAGMENT vbuz1_neq_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +cmp {z1} +bne {la1} +//FRAGMENT vbuz1_neq_pbuc1_derefidx_vbuyy_then_la1 +lda {c1},y +cmp {z1} +bne {la1} +//FRAGMENT vbuxx_neq_pbuc1_derefidx_vbuz1_then_la1 +ldy {z1} +txa +cmp {c1},y +bne {la1} +//FRAGMENT vbuxx_neq_pbuc1_derefidx_vbuxx_then_la1 +txa +tay +cmp {c1},y +bne {la1} +//FRAGMENT vbuxx_neq_pbuc1_derefidx_vbuyy_then_la1 +txa +cmp {c1},y +bne {la1} +//FRAGMENT vbuyy_neq_pbuc1_derefidx_vbuz1_then_la1 +tya +ldy {z1} +cmp {c1},y +bne {la1} +//FRAGMENT vbuyy_neq_pbuc1_derefidx_vbuxx_then_la1 +lda {c1},x +tax +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vbuyy_neq_pbuc1_derefidx_vbuyy_then_la1 +tya +cmp {c1},y +bne {la1} +//FRAGMENT vbuxx_neq_vbuxx_then_la1 +txa +tay +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vbuyy_neq_vbuyy_then_la1 +tya +tax +stx $ff +cpy $ff +bne {la1} +//FRAGMENT pwuz1_derefidx_vbuc1=vwuz2 +ldy #{c1} +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT vbuz1=vbuz2_plus_2 +lda {z2} +clc +adc #2 +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_2 +lda {z1} +clc +adc #2 +//FRAGMENT vbuxx=vbuz1_plus_2 +ldx {z1} +inx +inx +//FRAGMENT vbuyy=vbuz1_plus_2 +ldy {z1} +iny +iny +//FRAGMENT vbuxx=vbuaa_plus_2 +tax +inx +inx +//FRAGMENT vbuxx=vbuyy_plus_2 +tya +clc +adc #2 +tax +//FRAGMENT vbsz1_lt_vbsc1_then_la1 +lda {z1} +sec +sbc #{c1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsaa_lt_vbsc1_then_la1 +sec +sbc #{c1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsxx_lt_vbsc1_then_la1 +txa +sec +sbc #{c1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsyy_lt_vbsc1_then_la1 +tya +sec +sbc #{c1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vwsz1=vwsz2_ror_7 +lda {z2}+1 +sta {z1} +and #$80 +beq !+ +lda #$ff +!: +sta {z1}+1 +lda {z2} +rol +rol {z1} +rol {z1}+1 +//FRAGMENT vwsz1=vwsz2_ror_5 +lda {z2} +sta $ff +lda {z2}+1 +sta {z1} +lda #0 +bit {z2}+1 +bpl !+ +lda #$ff +!: +sta {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +//FRAGMENT _deref_pbuc1=_byte_vwsz1 +lda {z1} +sta {c1} +//FRAGMENT vwsz1=vwsc1_minus_vwsz1 +lda #<{c1} +sec +sbc {z1} +sta {z1} +lda #>{c1} +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT _deref_pbsc1=vbsz1 +lda {z1} +sta {c1} +//FRAGMENT pwuc1_derefidx_vbuaa=_word_vbuz1 +tay +lda {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=_word_vbuxx +tay +txa +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=_word_vbuyy +tax +tya +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT vbuxx_neq_vbuaa_then_la1 +tay +stx $ff +cpy $ff +bne {la1} +//FRAGMENT _deref_pbuc1=_deref_pbuz1 +ldy #0 +lda ({z1}),y +sta {c1} +//FRAGMENT vwuz1=pbuc1_minus_pbuz2 +sec +lda #<{c1} +sbc {z2} +sta {z1} +lda #>{c1} +sbc {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=pbuc1_minus_pbuz1 +sec +lda #<{c1} +sbc {z1} +sta {z1} +lda #>{c1} +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT pbuc1_derefidx_vbuaa=_deref_pbuz1 +tax +ldy #0 +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=_deref_pbuz1 +ldy #0 +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=_deref_pbuz1 +tya +tax +ldy #0 +lda ({z1}),y +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuz1=_deref_pbsc2 +lda {c2} +ldy {z1} +sta {c1},y +//FRAGMENT vbuz1=vbuc1_plus__deref_pbuc2 +lda #{c1} +clc +adc {c2} +sta {z1} +//FRAGMENT vbsz1=vbsz1_plus_2 +inc {z1} +inc {z1} +//FRAGMENT vbsz1=vbsz1_minus_vbsc1 +lax {z1} +axs #{c1} +stx {z1} +//FRAGMENT vbsz1=vbsz2_plus_vbsz3 +lda {z2} +clc +adc {z3} +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_plus_pbsc1_derefidx_vbsz3 +ldy {z2} +lda {c1},y +ldy {z3} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_minus_pbsc1_derefidx_vbsz3 +ldy {z2} +lda {c1},y +ldy {z3} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_plus_pbsc1_derefidx_vbsz2 +ldy {z2} +clc +lda {c1},y +adc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsz2_plus_pbsc1_derefidx_vbsz3 +lda {z2} +ldy {z3} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsz2_minus_pbsc1_derefidx_vbsz3 +lda {z2} +ldy {z3} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=_deref_pbsc1 +lda {c1} +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbuaa +tay +lda {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbuaa +tay +ldx {c1},y +//FRAGMENT vbsyy=pbsc1_derefidx_vbuaa +tax +ldy {c1},x +//FRAGMENT pbsc1_derefidx_vbuaa=_deref_pbsc2 +tay +lda {c2} +sta {c1},y +//FRAGMENT pbsc1_derefidx_vbuxx=_deref_pbsc2 +lda {c2} +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuyy=_deref_pbsc2 +lda {c2} +sta {c1},y +//FRAGMENT vbuaa=vbuc1_plus__deref_pbuc2 +lda #{c1} +clc +adc {c2} +//FRAGMENT vbuxx=vbuc1_plus__deref_pbuc2 +lda {c2} +tax +axs #-[{c1}] +//FRAGMENT vbuyy=vbuc1_plus__deref_pbuc2 +lda #{c1} +clc +adc {c2} +tay +//FRAGMENT vbsxx=vbsxx_minus_vbsc1 +txa +axs #{c1} +//FRAGMENT vbsyy=vbsyy_minus_vbsc1 +tya +sec +sbc #{c1} +tay +//FRAGMENT vbsz1=vbsz2_plus_vbsaa +clc +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsz2_plus_vbsxx +txa +clc +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsz2_plus_vbsyy +tya +clc +adc {z2} +sta {z1} +//FRAGMENT vbsaa=vbsz1_plus_vbsz2 +lda {z1} +clc +adc {z2} +//FRAGMENT vbsaa=vbsz1_plus_vbsaa +clc +adc {z1} +//FRAGMENT vbsaa=vbsz1_plus_vbsxx +txa +clc +adc {z1} +//FRAGMENT vbsaa=vbsz1_plus_vbsyy +tya +clc +adc {z1} +//FRAGMENT vbsxx=vbsz1_plus_vbsz2 +lda {z1} +clc +adc {z2} +tax +//FRAGMENT vbsxx=vbsz1_plus_vbsaa +clc +adc {z1} +tax +//FRAGMENT vbsxx=vbsz1_plus_vbsxx +txa +clc +adc {z1} +tax +//FRAGMENT vbsxx=vbsz1_plus_vbsyy +tya +clc +adc {z1} +tax +//FRAGMENT vbsyy=vbsz1_plus_vbsz2 +lda {z1} +clc +adc {z2} +tay +//FRAGMENT vbsyy=vbsz1_plus_vbsaa +clc +adc {z1} +tay +//FRAGMENT vbsyy=vbsz1_plus_vbsxx +txa +clc +adc {z1} +tay +//FRAGMENT vbsyy=vbsz1_plus_vbsyy +tya +clc +adc {z1} +tay +//FRAGMENT vbsz1=vbsaa_plus_vbsz2 +clc +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsaa_plus_vbsaa +asl +sta {z1} +//FRAGMENT vbsz1=vbsaa_plus_vbsxx +stx $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbsz1=vbsaa_plus_vbsyy +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbsaa=vbsaa_plus_vbsz1 +clc +adc {z1} +//FRAGMENT vbsaa=vbsaa_plus_vbsaa +asl +//FRAGMENT vbsaa=vbsaa_plus_vbsxx +stx $ff +clc +adc $ff +//FRAGMENT vbsaa=vbsaa_plus_vbsyy +sty $ff +clc +adc $ff +//FRAGMENT vbsxx=vbsaa_plus_vbsz1 +clc +adc {z1} +tax +//FRAGMENT vbsxx=vbsaa_plus_vbsaa +asl +tax +//FRAGMENT vbsxx=vbsaa_plus_vbsxx +stx $ff +clc +adc $ff +tax +//FRAGMENT vbsxx=vbsaa_plus_vbsyy +sty $ff +clc +adc $ff +tax +//FRAGMENT vbsyy=vbsaa_plus_vbsz1 +clc +adc {z1} +tay +//FRAGMENT vbsyy=vbsaa_plus_vbsaa +asl +tay +//FRAGMENT vbsyy=vbsaa_plus_vbsxx +stx $ff +clc +adc $ff +tay +//FRAGMENT vbsyy=vbsaa_plus_vbsyy +sty $ff +clc +adc $ff +tay +//FRAGMENT vbsz1=vbsxx_plus_vbsz2 +txa +clc +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsxx_plus_vbsaa +stx $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbsz1=vbsxx_plus_vbsxx +txa +asl +sta {z1} +//FRAGMENT vbsz1=vbsxx_plus_vbsyy +txa +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbsaa=vbsxx_plus_vbsz1 +txa +clc +adc {z1} +//FRAGMENT vbsaa=vbsxx_plus_vbsaa +stx $ff +clc +adc $ff +//FRAGMENT vbsaa=vbsxx_plus_vbsxx +txa +asl +//FRAGMENT vbsaa=vbsxx_plus_vbsyy +txa +sty $ff +clc +adc $ff +//FRAGMENT vbsxx=vbsxx_plus_vbsz1 +txa +clc +adc {z1} +tax +//FRAGMENT vbsxx=vbsxx_plus_vbsaa +stx $ff +clc +adc $ff +tax +//FRAGMENT vbsxx=vbsxx_plus_vbsxx +txa +asl +tax +//FRAGMENT vbsxx=vbsxx_plus_vbsyy +txa +sty $ff +clc +adc $ff +tax +//FRAGMENT vbsyy=vbsxx_plus_vbsz1 +txa +clc +adc {z1} +tay +//FRAGMENT vbsyy=vbsxx_plus_vbsaa +stx $ff +clc +adc $ff +tay +//FRAGMENT vbsyy=vbsxx_plus_vbsxx +txa +asl +tay +//FRAGMENT vbsyy=vbsxx_plus_vbsyy +txa +sty $ff +clc +adc $ff +tay +//FRAGMENT vbsz1=vbsyy_plus_vbsz2 +tya +clc +adc {z2} +sta {z1} +//FRAGMENT vbsz1=vbsyy_plus_vbsaa +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbsz1=vbsyy_plus_vbsxx +txa +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbsz1=vbsyy_plus_vbsyy +tya +asl +sta {z1} +//FRAGMENT vbsaa=vbsyy_plus_vbsz1 +tya +clc +adc {z1} +//FRAGMENT vbsaa=vbsyy_plus_vbsaa +sty $ff +clc +adc $ff +//FRAGMENT vbsaa=vbsyy_plus_vbsxx +txa +sty $ff +clc +adc $ff +//FRAGMENT vbsaa=vbsyy_plus_vbsyy +tya +asl +//FRAGMENT vbsxx=vbsyy_plus_vbsz1 +tya +clc +adc {z1} +tax +//FRAGMENT vbsxx=vbsyy_plus_vbsaa +sty $ff +clc +adc $ff +tax +//FRAGMENT vbsxx=vbsyy_plus_vbsxx +txa +sty $ff +clc +adc $ff +tax +//FRAGMENT vbsxx=vbsyy_plus_vbsyy +tya +asl +tax +//FRAGMENT vbsyy=vbsyy_plus_vbsz1 +tya +clc +adc {z1} +tay +//FRAGMENT vbsyy=vbsyy_plus_vbsaa +sty $ff +clc +adc $ff +tay +//FRAGMENT vbsyy=vbsyy_plus_vbsxx +txa +sty $ff +clc +adc $ff +tay +//FRAGMENT vbsyy=vbsyy_plus_vbsyy +tya +asl +tay +//FRAGMENT vbsaa=vbsz1_minus_vbsz2 +lda {z1} +sec +sbc {z2} +//FRAGMENT vbsaa=vbsz1_minus_vbsxx +txa +eor #$ff +sec +adc {z1} +//FRAGMENT vbsaa=vbsz1_minus_vbsyy +tya +eor #$ff +sec +adc {z1} +//FRAGMENT vbsyy=vbsz1_minus_vbsz2 +lda {z1} +sec +sbc {z2} +tay +//FRAGMENT vbsyy=vbsz1_minus_vbsxx +txa +eor #$ff +sec +adc {z1} +tay +//FRAGMENT vbsyy=vbsz1_minus_vbsyy +tya +eor #$ff +sec +adc {z1} +tay +//FRAGMENT vbsaa=vbsxx_minus_vbsz1 +txa +sec +sbc {z1} +//FRAGMENT vbsaa=vbsxx_minus_vbsxx +lda #0 +//FRAGMENT vbsaa=vbsxx_minus_vbsyy +txa +sty $ff +sec +sbc $ff +//FRAGMENT vbsyy=vbsxx_minus_vbsz1 +txa +sec +sbc {z1} +tay +//FRAGMENT vbsyy=vbsxx_minus_vbsxx +lda #0 +tay +//FRAGMENT vbsyy=vbsxx_minus_vbsyy +txa +sty $ff +sec +sbc $ff +tay +//FRAGMENT vbsaa=vbsyy_minus_vbsz1 +tya +sec +sbc {z1} +//FRAGMENT vbsaa=vbsyy_minus_vbsxx +tya +stx $ff +sec +sbc $ff +//FRAGMENT vbsaa=vbsyy_minus_vbsyy +lda #0 +//FRAGMENT vbsyy=vbsyy_minus_vbsz1 +tya +sec +sbc {z1} +tay +//FRAGMENT vbsyy=vbsyy_minus_vbsxx +tya +stx $ff +sec +sbc $ff +tay +//FRAGMENT vbsyy=vbsyy_minus_vbsyy +lda #0 +tay +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsz2 +ldy {z1} +lda {c1},y +ldy {z2} +clc +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsz2 +ldx {z1} +lda {c1},x +ldx {z2} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsz2 +ldy {z1} +lda {c1},y +ldy {z2} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsz2 +lda {c1},x +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsz1 +lda {c1},x +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsz1 +lda {c1},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsz1 +lda {c1},x +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsz2 +lda {c1},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsz1 +lda {c1},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsz1 +lda {c1},y +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsz1 +lda {c1},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_plus_pbsc1_derefidx_vbsxx +lda {c1},x +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsxx +lda {c1},x +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsxx +lda {c1},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsxx +lda {c1},x +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},x +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},x +//FRAGMENT vbsxx=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},x +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},y +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsxx +clc +lda {c1},x +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_plus_pbsc1_derefidx_vbsyy +lda {c1},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsyy +lda {c1},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsyy +lda {c1},y +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsyy +lda {c1},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},x +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},x +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},x +adc {c1},y +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsxx_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},x +adc {c1},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},y +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},y +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},y +adc {c1},y +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsyy_plus_pbsc1_derefidx_vbsyy +clc +lda {c1},y +adc {c1},y +tay +//FRAGMENT _deref_pbsc1=vbsaa +sta {c1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsz2 +lda {c1},x +ldy {z2} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsz2 +lda {c1},y +ldy {z2} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_minus_pbsc1_derefidx_vbsxx +ldy {z2} +lda {c1},y +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsxx +lda {c1},x +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsxx +lda {c1},y +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsz2_minus_pbsc1_derefidx_vbsyy +ldx {z2} +lda {c1},x +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsyy +lda {c1},x +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsyy +lda {c1},y +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsz2 +ldy {z1} +lda {c1},y +ldy {z2} +sec +sbc {c1},y +//FRAGMENT vbsaa=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsz1 +lda {c1},x +ldy {z1} +sec +sbc {c1},y +//FRAGMENT vbsaa=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsz1 +lda {c1},y +ldy {z1} +sec +sbc {c1},y +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsxx +ldy {z1} +lda {c1},y +sec +sbc {c1},x +//FRAGMENT vbsaa=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsxx +lda {c1},x +sec +sbc {c1},x +//FRAGMENT vbsaa=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsxx +lda {c1},y +sec +sbc {c1},x +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsyy +ldx {z1} +lda {c1},x +sec +sbc {c1},y +//FRAGMENT vbsaa=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsyy +lda {c1},x +sec +sbc {c1},y +//FRAGMENT vbsaa=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsyy +lda {c1},y +sec +sbc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsz2 +ldx {z1} +lda {c1},x +ldx {z2} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsz1 +lda {c1},x +ldx {z1} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsz1 +lda {c1},y +ldx {z1} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsxx +ldy {z1} +lda {c1},y +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsxx +lda {c1},x +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsxx +lda {c1},y +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsyy +ldx {z1} +lda {c1},x +sec +sbc {c1},y +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsyy +lda {c1},x +sec +sbc {c1},y +tax +//FRAGMENT vbsxx=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsyy +lda {c1},y +sec +sbc {c1},y +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsz2 +ldy {z1} +lda {c1},y +ldy {z2} +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsz1 +lda {c1},x +ldy {z1} +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsz1 +lda {c1},y +ldy {z1} +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsxx +ldy {z1} +lda {c1},y +sec +sbc {c1},x +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsxx +lda {c1},x +sec +sbc {c1},x +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsxx +lda {c1},y +sec +sbc {c1},x +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsyy +ldx {z1} +lda {c1},x +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsxx_minus_pbsc1_derefidx_vbsyy +lda {c1},x +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=pbsc1_derefidx_vbsyy_minus_pbsc1_derefidx_vbsyy +lda {c1},y +sec +sbc {c1},y +tay +//FRAGMENT vbsaa=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsz1 +ldy {z1} +clc +lda {c1},y +adc {c1},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsz1 +ldx {z1} +clc +lda {c1},x +adc {c1},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbsz1_plus_pbsc1_derefidx_vbsz1 +ldy {z1} +clc +lda {c1},y +adc {c1},y +tay +//FRAGMENT vbsaa=vbsz1_plus_pbsc1_derefidx_vbsz2 +lda {z1} +ldy {z2} +clc +adc {c1},y +//FRAGMENT vbsxx=vbsz1_plus_pbsc1_derefidx_vbsz2 +lda {z1} +ldx {z2} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsz1_plus_pbsc1_derefidx_vbsz2 +lda {z1} +ldy {z2} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsaa_plus_pbsc1_derefidx_vbsz2 +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsaa_plus_pbsc1_derefidx_vbsz1 +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbsxx=vbsaa_plus_pbsc1_derefidx_vbsz1 +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsaa_plus_pbsc1_derefidx_vbsz1 +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsxx_plus_pbsc1_derefidx_vbsz2 +ldy {z2} +txa +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsxx_plus_pbsc1_derefidx_vbsz1 +ldy {z1} +txa +clc +adc {c1},y +//FRAGMENT vbsxx=vbsxx_plus_pbsc1_derefidx_vbsz1 +txa +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsxx_plus_pbsc1_derefidx_vbsz1 +ldy {z1} +txa +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsyy_plus_pbsc1_derefidx_vbsz2 +tya +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsyy_plus_pbsc1_derefidx_vbsz1 +tya +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbsxx=vbsyy_plus_pbsc1_derefidx_vbsz1 +ldx {z1} +tya +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsyy_plus_pbsc1_derefidx_vbsz1 +tya +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsz2_plus_pbsc1_derefidx_vbsxx +lda {c1},x +clc +adc {z2} +sta {z1} +//FRAGMENT vbsaa=vbsz1_plus_pbsc1_derefidx_vbsxx +lda {c1},x +clc +adc {z1} +//FRAGMENT vbsxx=vbsz1_plus_pbsc1_derefidx_vbsxx +lda {c1},x +clc +adc {z1} +tax +//FRAGMENT vbsyy=vbsz1_plus_pbsc1_derefidx_vbsxx +lda {c1},x +clc +adc {z1} +tay +//FRAGMENT vbsz1=vbsaa_plus_pbsc1_derefidx_vbsxx +clc +adc {c1},x +sta {z1} +//FRAGMENT vbsaa=vbsaa_plus_pbsc1_derefidx_vbsxx +clc +adc {c1},x +//FRAGMENT vbsxx=vbsaa_plus_pbsc1_derefidx_vbsxx +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsaa_plus_pbsc1_derefidx_vbsxx +clc +adc {c1},x +tay +//FRAGMENT vbsz1=vbsxx_plus_pbsc1_derefidx_vbsxx +txa +clc +adc {c1},x +sta {z1} +//FRAGMENT vbsaa=vbsxx_plus_pbsc1_derefidx_vbsxx +txa +clc +adc {c1},x +//FRAGMENT vbsxx=vbsxx_plus_pbsc1_derefidx_vbsxx +txa +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsxx_plus_pbsc1_derefidx_vbsxx +txa +clc +adc {c1},x +tay +//FRAGMENT vbsz1=vbsyy_plus_pbsc1_derefidx_vbsxx +tya +clc +adc {c1},x +sta {z1} +//FRAGMENT vbsaa=vbsyy_plus_pbsc1_derefidx_vbsxx +tya +clc +adc {c1},x +//FRAGMENT vbsxx=vbsyy_plus_pbsc1_derefidx_vbsxx +tya +clc +adc {c1},x +tax +//FRAGMENT vbsyy=vbsyy_plus_pbsc1_derefidx_vbsxx +tya +clc +adc {c1},x +tay +//FRAGMENT vbsz1=vbsz2_plus_pbsc1_derefidx_vbsyy +lda {c1},y +clc +adc {z2} +sta {z1} +//FRAGMENT vbsaa=vbsz1_plus_pbsc1_derefidx_vbsyy +lda {c1},y +clc +adc {z1} +//FRAGMENT vbsxx=vbsz1_plus_pbsc1_derefidx_vbsyy +lda {c1},y +clc +adc {z1} +tax +//FRAGMENT vbsyy=vbsz1_plus_pbsc1_derefidx_vbsyy +lda {c1},y +clc +adc {z1} +tay +//FRAGMENT vbsz1=vbsaa_plus_pbsc1_derefidx_vbsyy +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsaa_plus_pbsc1_derefidx_vbsyy +clc +adc {c1},y +//FRAGMENT vbsxx=vbsaa_plus_pbsc1_derefidx_vbsyy +clc +adc {c1},y +tax +//FRAGMENT vbsyy=vbsaa_plus_pbsc1_derefidx_vbsyy +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsxx_plus_pbsc1_derefidx_vbsyy +txa +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsxx_plus_pbsc1_derefidx_vbsyy +txa +clc +adc {c1},y +//FRAGMENT vbsxx=vbsxx_plus_pbsc1_derefidx_vbsyy +txa +clc +adc {c1},y +tax +//FRAGMENT vbsyy=vbsxx_plus_pbsc1_derefidx_vbsyy +txa +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsyy_plus_pbsc1_derefidx_vbsyy +tya +clc +adc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsyy_plus_pbsc1_derefidx_vbsyy +tya +clc +adc {c1},y +//FRAGMENT vbsxx=vbsyy_plus_pbsc1_derefidx_vbsyy +tya +clc +adc {c1},y +tax +//FRAGMENT vbsyy=vbsyy_plus_pbsc1_derefidx_vbsyy +tya +clc +adc {c1},y +tay +//FRAGMENT vbsz1=vbsaa_minus_pbsc1_derefidx_vbsz2 +ldy {z2} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_pbsc1_derefidx_vbsz2 +ldy {z2} +txa +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsyy_minus_pbsc1_derefidx_vbsz2 +tya +ldy {z2} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsz1_minus_pbsc1_derefidx_vbsz2 +lda {z1} +ldy {z2} +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsaa_minus_pbsc1_derefidx_vbsz1 +ldy {z1} +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsxx_minus_pbsc1_derefidx_vbsz1 +ldy {z1} +txa +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsyy_minus_pbsc1_derefidx_vbsz1 +tya +ldy {z1} +sec +sbc {c1},y +//FRAGMENT vbsxx=vbsz1_minus_pbsc1_derefidx_vbsz2 +lda {z1} +ldx {z2} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=vbsaa_minus_pbsc1_derefidx_vbsz1 +ldx {z1} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=vbsxx_minus_pbsc1_derefidx_vbsz1 +txa +ldx {z1} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=vbsyy_minus_pbsc1_derefidx_vbsz1 +ldx {z1} +tya +sec +sbc {c1},x +tax +//FRAGMENT vbsyy=vbsz1_minus_pbsc1_derefidx_vbsz2 +lda {z1} +ldy {z2} +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsaa_minus_pbsc1_derefidx_vbsz1 +ldy {z1} +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsxx_minus_pbsc1_derefidx_vbsz1 +ldy {z1} +txa +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsyy_minus_pbsc1_derefidx_vbsz1 +tya +ldy {z1} +sec +sbc {c1},y +tay +//FRAGMENT vbsz1=vbsz2_minus_pbsc1_derefidx_vbsxx +lda {z2} +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbsz1=vbsaa_minus_pbsc1_derefidx_vbsxx +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_pbsc1_derefidx_vbsxx +txa +tay +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsyy_minus_pbsc1_derefidx_vbsxx +tya +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbsaa=vbsz1_minus_pbsc1_derefidx_vbsxx +lda {z1} +sec +sbc {c1},x +//FRAGMENT vbsaa=vbsaa_minus_pbsc1_derefidx_vbsxx +sec +sbc {c1},x +//FRAGMENT vbsaa=vbsxx_minus_pbsc1_derefidx_vbsxx +txa +tay +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsyy_minus_pbsc1_derefidx_vbsxx +tya +sec +sbc {c1},x +//FRAGMENT vbsxx=vbsz1_minus_pbsc1_derefidx_vbsxx +lda {z1} +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=vbsaa_minus_pbsc1_derefidx_vbsxx +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=vbsxx_minus_pbsc1_derefidx_vbsxx +txa +tax +sec +sbc {c1},x +tax +//FRAGMENT vbsxx=vbsyy_minus_pbsc1_derefidx_vbsxx +tya +sec +sbc {c1},x +tax +//FRAGMENT vbsyy=vbsz1_minus_pbsc1_derefidx_vbsxx +lda {z1} +sec +sbc {c1},x +tay +//FRAGMENT vbsyy=vbsaa_minus_pbsc1_derefidx_vbsxx +sec +sbc {c1},x +tay +//FRAGMENT vbsyy=vbsxx_minus_pbsc1_derefidx_vbsxx +txa +tay +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsyy_minus_pbsc1_derefidx_vbsxx +tya +sec +sbc {c1},x +tay +//FRAGMENT vbsz1=vbsz2_minus_pbsc1_derefidx_vbsyy +lda {z2} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsaa_minus_pbsc1_derefidx_vbsyy +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_pbsc1_derefidx_vbsyy +txa +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsz1=vbsyy_minus_pbsc1_derefidx_vbsyy +tya +tay +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsaa=vbsz1_minus_pbsc1_derefidx_vbsyy +lda {z1} +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsaa_minus_pbsc1_derefidx_vbsyy +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsxx_minus_pbsc1_derefidx_vbsyy +txa +sec +sbc {c1},y +//FRAGMENT vbsaa=vbsyy_minus_pbsc1_derefidx_vbsyy +tya +tay +sec +sbc {c1},y +//FRAGMENT vbsxx=vbsz1_minus_pbsc1_derefidx_vbsyy +lda {z1} +sec +sbc {c1},y +tax +//FRAGMENT vbsxx=vbsaa_minus_pbsc1_derefidx_vbsyy +sec +sbc {c1},y +tax +//FRAGMENT vbsxx=vbsxx_minus_pbsc1_derefidx_vbsyy +txa +sec +sbc {c1},y +tax +//FRAGMENT vbsxx=vbsyy_minus_pbsc1_derefidx_vbsyy +tya +tax +sec +sbc {c1},x +tax +//FRAGMENT vbsyy=vbsz1_minus_pbsc1_derefidx_vbsyy +lda {z1} +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsaa_minus_pbsc1_derefidx_vbsyy +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsxx_minus_pbsc1_derefidx_vbsyy +txa +sec +sbc {c1},y +tay +//FRAGMENT vbsyy=vbsyy_minus_pbsc1_derefidx_vbsyy +tya +tay +sec +sbc {c1},y +tay +//FRAGMENT vbsaa=_deref_pbsc1 +lda {c1} +//FRAGMENT vbsxx=_deref_pbsc1 +ldx {c1} +//FRAGMENT vbsyy=_deref_pbsc1 +ldy {c1} +//FRAGMENT _deref_pbsc1=vbsxx +stx {c1} +//FRAGMENT _deref_pbsc1=vbsyy +sty {c1} +//FRAGMENT pbuz1=pbuz1_plus_1 +inc {z1} +bne !+ +inc {z1}+1 +!: +//FRAGMENT pbuz1_derefidx_vbuc1=vbuz2 +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 +//FRAGMENT pbuz1_derefidx_vbuc1=vbuxx +ldy #{c1} +txa +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuc1=vbuyy +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 +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT qbuz1_derefidx_vbuc1=pbuz2 +ldy #{c1} +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT qwuz1_derefidx_vbuc1=pwuz2 +ldy #{c1} +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT vwuz1=_deref_pwuz2 +ldy #0 +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vwuz1=pwuz2_derefidx_vbuc1 +ldy #{c1} +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_plus_vbuaa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_plus_vbuxx +txa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_plus_vbuyy +tya +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT vwsz1_neq_vbsc1_then_la1 +NO_SYNTHESIS +//FRAGMENT vwsz1_neq_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vwuz1=vwuz2_ror_4 +lda {z2}+1 +lsr +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT vwuz1=vwuz2_ror_8 +lda {z2}+1 +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1_ge_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc !+ +bne {la1} +lda {z1} +cmp #<{c1} +bcs {la1} +!: +//FRAGMENT vwuz1_ge_vbuc1_then_la1 +lda {z1}+1 +bne {la1} +lda {z1} +cmp #{c1} +bcs {la1} +!: +//FRAGMENT pbuc1_derefidx_vbuxx=_byte_vwuz1 +lda {z1} +sta {c1},x +//FRAGMENT vwuz1=vwuz1_rol_8 +lda {z1} +sta {z1}+1 +lda #0 +sta {z1} +//FRAGMENT vwuz1=vwuz1_ror_4 +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +lsr {z1}+1 +ror {z1} +//FRAGMENT pwsc1_derefidx_vbuz1=vwsc2 +ldy {z1} +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT _deref_pwsc1=_deref_pwsc2 +lda {c2} +sta {c1} +lda {c2}+1 +sta {c1}+1 +//FRAGMENT pwsc1_derefidx_vbuaa=vwsc2 +tay +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT pwsc1_derefidx_vbuxx=vwsc2 +lda #<{c2} +sta {c1},x +lda #>{c2} +sta {c1}+1,x +//FRAGMENT pwsc1_derefidx_vbuyy=vwsc2 +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT _deref_pbuc1=_byte_vwuz1 +lda {z1} +sta {c1} +//FRAGMENT vbuz1_eq__deref_pbuc1_then_la1 +lda {c1} +cmp {z1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_0_then_la1 +lda {c1} +cmp #0 +beq {la1} +//FRAGMENT vbuz1=vbuz1_bor_vbuc1 +lda #{c1} +ora {z1} +sta {z1} +//FRAGMENT vbuz1=_deref_pbuc1_rol_4 +lda {c1} +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor__deref_pbuc1 +lda {c1} +ora {z2} +sta {z1} +//FRAGMENT vduz1=vduz2_plus_vbuz3 +lda {z3} +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuz3) +ldx {z3} +ldy {c2},x +lda {c1},y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 +ldx {z1} +dec {c1},x +//FRAGMENT _deref_pbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) +ldx {z2} +ldy {c2},x +lda {c1},y +ldy #0 +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 +ldy {z1} +lda {c2},y +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1=_deref_pbuz2_bor_vbuc1 +lda #{c1} +ldy #0 +ora ({z2}),y +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuz1 +ldy {z1} +lda ({z2}),y +sta {c1},y +//FRAGMENT vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuz3 +lda {z2} +ldy {z3} +eor {c1},y +sta {z1} +//FRAGMENT vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 +lda {z2} +ldy {z3} +and {c1},y +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuc1 +lda #{c1} +ora {z2} +sta {z1} +//FRAGMENT vduz1=vduz2_rol_2 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +lda {z2}+2 +rol +sta {z1}+2 +lda {z2}+3 +rol +sta {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vwuz1=vwuc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1} +//FRAGMENT vbuxx_eq__deref_pbuc1_then_la1 +cpx {c1} +beq {la1} +//FRAGMENT vbuxx=vbuxx_bor_vbuc1 +txa +ora #{c1} +tax +//FRAGMENT vbuyy=vbuyy_bor_vbuc1 +tya +ora #{c1} +tay +//FRAGMENT vbuaa=_deref_pbuc1_rol_4 +lda {c1} +asl +asl +asl +asl +//FRAGMENT vbuxx=_deref_pbuc1_rol_4 +lda {c1} +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=_deref_pbuc1_rol_4 +lda {c1} +asl +asl +asl +asl +tay +//FRAGMENT vbuaa=vbuz1_bor__deref_pbuc1 +lda {c1} +ora {z1} +//FRAGMENT vbuxx=vbuz1_bor__deref_pbuc1 +lda {c1} +ora {z1} +tax +//FRAGMENT vbuyy=vbuz1_bor__deref_pbuc1 +lda {c1} +ora {z1} +tay +//FRAGMENT vbuz1=vbuaa_bor__deref_pbuc1 +ora {c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_bor__deref_pbuc1 +ora {c1} +//FRAGMENT vbuxx=vbuaa_bor__deref_pbuc1 +ora {c1} +tax +//FRAGMENT vbuyy=vbuaa_bor__deref_pbuc1 +ora {c1} +tay +//FRAGMENT vbuz1=vbuxx_bor__deref_pbuc1 +txa +ora {c1} +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor__deref_pbuc1 +txa +ora {c1} +//FRAGMENT vbuxx=vbuxx_bor__deref_pbuc1 +txa +ora {c1} +tax +//FRAGMENT vbuyy=vbuxx_bor__deref_pbuc1 +txa +ora {c1} +tay +//FRAGMENT vbuz1=vbuyy_bor__deref_pbuc1 +tya +ora {c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_bor__deref_pbuc1 +tya +ora {c1} +//FRAGMENT vbuxx=vbuyy_bor__deref_pbuc1 +tya +ora {c1} +tax +//FRAGMENT vbuyy=vbuyy_bor__deref_pbuc1 +tya +ora {c1} +tay +//FRAGMENT vduz1=vduz2_plus_vbuxx +txa +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_plus_vbuyy +tya +clc +adc {z2} +sta {z1} +lda {z2}+1 +adc #0 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuaa) +tax +ldy {c2},x +lda {c1},y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuxx) +ldy {c2},x +lda {c1},y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuyy) +ldx {c2},y +lda {c1},x +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) +ldy {z2} +ldx {c2},y +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuaa) +tay +ldx {c2},y +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuxx) +ldy {c2},x +ldx {c1},y +tay +txa +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuyy) +ldx {c2},y +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) +ldy {z2} +txa +ldx {c2},y +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_(pbuc2_derefidx_vbuaa) +tay +txa +ldx {c2},y +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_(pbuc2_derefidx_vbuxx) +txa +tay +ldx {c2},y +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuc1_derefidx_(pbuc2_derefidx_vbuyy) +txa +ldx {c2},y +tay +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) +ldx {z2} +lda {c2},x +tax +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_(pbuc2_derefidx_vbuaa) +tax +lda {c2},x +tax +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_(pbuc2_derefidx_vbuxx) +lda {c2},x +tax +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuc1_derefidx_(pbuc2_derefidx_vbuyy) +ldx {c2},y +lda {c1},x +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuxx=_dec_pbuc1_derefidx_vbuxx +dec {c1},x +//FRAGMENT _deref_pbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuxx) +ldy {c2},x +lda {c1},y +ldy #0 +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuxx_le_pbuc2_derefidx_vbuxx_then_la1 +txa +tay +lda {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuaa=_deref_pbuz1_bor_vbuc1 +lda #{c1} +ldy #0 +ora ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1_bor_vbuc1 +lda #{c1} +ldy #0 +ora ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1_bor_vbuc1 +lda #{c1} +ldy #0 +ora ({z1}),y +tay +//FRAGMENT pbuc1_derefidx_vbuaa=pbuz1_derefidx_vbuaa +tay +lda ({z1}),y +sta {c1},y +//FRAGMENT vbuz1_neq_pbuc1_derefidx_vbuaa_then_la1 +tay +lda {c1},y +cmp {z1} +bne {la1} +//FRAGMENT vbuaa_neq_pbuc1_derefidx_vbuz1_then_la1 +ldy {z1} +cmp {c1},y +bne {la1} +//FRAGMENT vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +eor {c1},y +//FRAGMENT vbuxx=vbuz1_bxor_pbuc1_derefidx_vbuz2 +lda {z1} +ldx {z2} +eor {c1},x +tax +//FRAGMENT vbuyy=vbuz1_bxor_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +eor {c1},y +tay +//FRAGMENT vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuxx +lda {c1},x +eor {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuxx +lda {c1},x +eor {z1} +//FRAGMENT vbuxx=vbuz1_bxor_pbuc1_derefidx_vbuxx +lda {c1},x +eor {z1} +tax +//FRAGMENT vbuyy=vbuz1_bxor_pbuc1_derefidx_vbuxx +lda {c1},x +eor {z1} +tay +//FRAGMENT vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuyy +lda {c1},y +eor {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuyy +lda {c1},y +eor {z1} +//FRAGMENT vbuxx=vbuz1_bxor_pbuc1_derefidx_vbuyy +lda {c1},y +eor {z1} +tax +//FRAGMENT vbuyy=vbuz1_bxor_pbuc1_derefidx_vbuyy +lda {c1},y +eor {z1} +tay +//FRAGMENT vbuz1=vbuaa_bxor_pbuc1_derefidx_vbuz2 +ldy {z2} +eor {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuaa_bxor_pbuc1_derefidx_vbuz1 +ldy {z1} +eor {c1},y +//FRAGMENT vbuxx=vbuaa_bxor_pbuc1_derefidx_vbuz1 +ldx {z1} +eor {c1},x +tax +//FRAGMENT vbuyy=vbuaa_bxor_pbuc1_derefidx_vbuz1 +ldy {z1} +eor {c1},y +tay +//FRAGMENT vbuz1=vbuaa_bxor_pbuc1_derefidx_vbuxx +eor {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuaa_bxor_pbuc1_derefidx_vbuxx +eor {c1},x +//FRAGMENT vbuxx=vbuaa_bxor_pbuc1_derefidx_vbuxx +eor {c1},x +tax +//FRAGMENT vbuyy=vbuaa_bxor_pbuc1_derefidx_vbuxx +eor {c1},x +tay +//FRAGMENT vbuz1=vbuaa_bxor_pbuc1_derefidx_vbuyy +eor {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuaa_bxor_pbuc1_derefidx_vbuyy +eor {c1},y +//FRAGMENT vbuxx=vbuaa_bxor_pbuc1_derefidx_vbuyy +eor {c1},y +tax +//FRAGMENT vbuyy=vbuaa_bxor_pbuc1_derefidx_vbuyy +eor {c1},y +tay +//FRAGMENT vbuz1=vbuxx_bxor_pbuc1_derefidx_vbuz2 +ldy {z2} +txa +eor {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuxx_bxor_pbuc1_derefidx_vbuz1 +ldy {z1} +txa +eor {c1},y +//FRAGMENT vbuxx=vbuxx_bxor_pbuc1_derefidx_vbuz1 +txa +ldx {z1} +eor {c1},x +tax +//FRAGMENT vbuyy=vbuxx_bxor_pbuc1_derefidx_vbuz1 +ldy {z1} +txa +eor {c1},y +tay +//FRAGMENT vbuz1=vbuxx_bxor_pbuc1_derefidx_vbuxx +txa +eor {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuxx_bxor_pbuc1_derefidx_vbuxx +txa +eor {c1},x +//FRAGMENT vbuxx=vbuxx_bxor_pbuc1_derefidx_vbuxx +txa +eor {c1},x +tax +//FRAGMENT vbuyy=vbuxx_bxor_pbuc1_derefidx_vbuxx +txa +eor {c1},x +tay +//FRAGMENT vbuz1=vbuxx_bxor_pbuc1_derefidx_vbuyy +txa +eor {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuxx_bxor_pbuc1_derefidx_vbuyy +txa +eor {c1},y +//FRAGMENT vbuxx=vbuxx_bxor_pbuc1_derefidx_vbuyy +txa +eor {c1},y +tax +//FRAGMENT vbuyy=vbuxx_bxor_pbuc1_derefidx_vbuyy +txa +eor {c1},y +tay +//FRAGMENT vbuz1=vbuyy_bxor_pbuc1_derefidx_vbuz2 +tya +ldy {z2} +eor {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuyy_bxor_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +eor {c1},y +//FRAGMENT vbuxx=vbuyy_bxor_pbuc1_derefidx_vbuz1 +ldx {z1} +tya +eor {c1},x +tax +//FRAGMENT vbuyy=vbuyy_bxor_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +eor {c1},y +tay +//FRAGMENT vbuz1=vbuyy_bxor_pbuc1_derefidx_vbuxx +tya +eor {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuyy_bxor_pbuc1_derefidx_vbuxx +tya +eor {c1},x +//FRAGMENT vbuxx=vbuyy_bxor_pbuc1_derefidx_vbuxx +tya +eor {c1},x +tax +//FRAGMENT vbuyy=vbuyy_bxor_pbuc1_derefidx_vbuxx +tya +eor {c1},x +tay +//FRAGMENT vbuz1=vbuyy_bxor_pbuc1_derefidx_vbuyy +tya +eor {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuyy_bxor_pbuc1_derefidx_vbuyy +tya +eor {c1},y +//FRAGMENT vbuxx=vbuyy_bxor_pbuc1_derefidx_vbuyy +tya +eor {c1},y +tax +//FRAGMENT vbuyy=vbuyy_bxor_pbuc1_derefidx_vbuyy +tya +eor {c1},y +tay +//FRAGMENT vbuaa=vbuz1_band_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +and {c1},y +//FRAGMENT vbuxx=vbuz1_band_pbuc1_derefidx_vbuz2 +lda {z1} +ldx {z2} +and {c1},x +tax +//FRAGMENT vbuyy=vbuz1_band_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +and {c1},y +tay +//FRAGMENT vbuz1=vbuaa_band_pbuc1_derefidx_vbuz2 +ldy {z2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuaa_band_pbuc1_derefidx_vbuz1 +ldy {z1} +and {c1},y +//FRAGMENT vbuxx=vbuaa_band_pbuc1_derefidx_vbuz1 +ldx {z1} +and {c1},x +tax +//FRAGMENT vbuyy=vbuaa_band_pbuc1_derefidx_vbuz1 +ldy {z1} +and {c1},y +tay +//FRAGMENT vbuz1=vbuxx_band_pbuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sax {z1} +//FRAGMENT vbuaa=vbuxx_band_pbuc1_derefidx_vbuz1 +ldy {z1} +txa +and {c1},y +//FRAGMENT vbuxx=vbuxx_band_pbuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +axs #0 +//FRAGMENT vbuyy=vbuxx_band_pbuc1_derefidx_vbuz1 +ldy {z1} +txa +and {c1},y +tay +//FRAGMENT vbuz1=vbuyy_band_pbuc1_derefidx_vbuz2 +tya +ldy {z2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuyy_band_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +and {c1},y +//FRAGMENT vbuxx=vbuyy_band_pbuc1_derefidx_vbuz1 +ldx {z1} +tya +and {c1},x +tax +//FRAGMENT vbuyy=vbuyy_band_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +and {c1},y +tay +//FRAGMENT vbuz1=vbuz2_band_pbuc1_derefidx_vbuxx +lda {c1},x +and {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx +lda {c1},x +and {z1} +//FRAGMENT vbuxx=vbuz1_band_pbuc1_derefidx_vbuxx +lda {c1},x +and {z1} +tax +//FRAGMENT vbuyy=vbuz1_band_pbuc1_derefidx_vbuxx +lda {c1},x +and {z1} +tay +//FRAGMENT vbuz1=vbuaa_band_pbuc1_derefidx_vbuxx +and {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx +and {c1},x +//FRAGMENT vbuxx=vbuaa_band_pbuc1_derefidx_vbuxx +and {c1},x +tax +//FRAGMENT vbuyy=vbuaa_band_pbuc1_derefidx_vbuxx +and {c1},x +tay +//FRAGMENT vbuz1=vbuxx_band_pbuc1_derefidx_vbuxx +lda {c1},x +sax {z1} +//FRAGMENT vbuaa=vbuxx_band_pbuc1_derefidx_vbuxx +txa +and {c1},x +//FRAGMENT vbuxx=vbuxx_band_pbuc1_derefidx_vbuxx +lda {c1},x +axs #0 +//FRAGMENT vbuyy=vbuxx_band_pbuc1_derefidx_vbuxx +txa +and {c1},x +tay +//FRAGMENT vbuz1=vbuyy_band_pbuc1_derefidx_vbuxx +tya +and {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuyy_band_pbuc1_derefidx_vbuxx +tya +and {c1},x +//FRAGMENT vbuxx=vbuyy_band_pbuc1_derefidx_vbuxx +tya +and {c1},x +tax +//FRAGMENT vbuyy=vbuyy_band_pbuc1_derefidx_vbuxx +tya +and {c1},x +tay +//FRAGMENT vbuz1=vbuz2_band_pbuc1_derefidx_vbuyy +lda {c1},y +and {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_band_pbuc1_derefidx_vbuyy +lda {c1},y +and {z1} +//FRAGMENT vbuxx=vbuz1_band_pbuc1_derefidx_vbuyy +lda {c1},y +and {z1} +tax +//FRAGMENT vbuyy=vbuz1_band_pbuc1_derefidx_vbuyy +lda {c1},y +and {z1} +tay +//FRAGMENT vbuz1=vbuaa_band_pbuc1_derefidx_vbuyy +and {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuaa_band_pbuc1_derefidx_vbuyy +and {c1},y +//FRAGMENT vbuxx=vbuaa_band_pbuc1_derefidx_vbuyy +ldx {c1},y +axs #0 +//FRAGMENT vbuz1=vbuxx_band_pbuc1_derefidx_vbuyy +lda {c1},y +sax {z1} +//FRAGMENT vbuz1=vbuyy_band_pbuc1_derefidx_vbuyy +tya +and {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuxx_band_pbuc1_derefidx_vbuyy +txa +and {c1},y +//FRAGMENT vbuaa=vbuyy_band_pbuc1_derefidx_vbuyy +tya +and {c1},y +//FRAGMENT vbuxx=vbuxx_band_pbuc1_derefidx_vbuyy +lda {c1},y +axs #0 +//FRAGMENT vbuxx=vbuyy_band_pbuc1_derefidx_vbuyy +ldx {c1},y +tya +axs #0 +//FRAGMENT vbuyy=vbuxx_band_pbuc1_derefidx_vbuyy +txa +and {c1},y +tay +//FRAGMENT vbuyy=vbuyy_band_pbuc1_derefidx_vbuyy +tya +and {c1},y +tay +//FRAGMENT vbuaa=vbuz1_bor_vbuc1 +lda #{c1} +ora {z1} +//FRAGMENT vbuxx=vbuz1_bor_vbuc1 +lda #{c1} +ora {z1} +tax +//FRAGMENT vbuyy=vbuz1_bor_vbuc1 +lda #{c1} +ora {z1} +tay +//FRAGMENT vbuz1=vbuxx_bor_vbuc1 +txa +ora #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuc1 +txa +ora #{c1} +//FRAGMENT vbuyy=vbuxx_bor_vbuc1 +txa +ora #{c1} +tay +//FRAGMENT vbuz1=vbuyy_bor_vbuc1 +tya +ora #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_bor_vbuc1 +tya +ora #{c1} +//FRAGMENT vbuxx=vbuyy_bor_vbuc1 +tya +ora #{c1} +tax +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuaa +tay +lda {c2},y +sta {c1} +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuxx +lda {c2},x +sta {c1} +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuyy +lda {c2},y +sta {c1} +//FRAGMENT vbuz1=vbuaa_ror_3 +lsr +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=vbuaa_ror_3 +lsr +lsr +lsr +//FRAGMENT vbuxx=vbuaa_ror_3 +lsr +lsr +lsr +tax +//FRAGMENT vbuyy=vbuaa_ror_3 +lsr +lsr +lsr +tay +//FRAGMENT vbuz1=vbuz2_band_pbuc1_derefidx_vbuaa +tay +lda {c1},y +and {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_band_pbuc1_derefidx_vbuaa +tay +lda {c1},y +sax {z1} +//FRAGMENT vbuz1=vbuyy_band_pbuc1_derefidx_vbuaa +tax +tya +and {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa +tay +lda {c1},y +and {z1} +//FRAGMENT vbuaa=vbuxx_band_pbuc1_derefidx_vbuaa +tay +txa +and {c1},y +//FRAGMENT vbuaa=vbuyy_band_pbuc1_derefidx_vbuaa +tax +tya +and {c1},x +//FRAGMENT vbuxx=vbuz1_band_pbuc1_derefidx_vbuaa +tax +lda {c1},x +and {z1} +tax +//FRAGMENT vbuxx=vbuxx_band_pbuc1_derefidx_vbuaa +tay +lda {c1},y +axs #0 +//FRAGMENT vbuxx=vbuyy_band_pbuc1_derefidx_vbuaa +tax +tya +and {c1},x +tax +//FRAGMENT vbuyy=vbuz1_band_pbuc1_derefidx_vbuaa +tay +lda {c1},y +and {z1} +tay +//FRAGMENT vbuyy=vbuxx_band_pbuc1_derefidx_vbuaa +tay +txa +and {c1},y +tay +//FRAGMENT vbuyy=vbuyy_band_pbuc1_derefidx_vbuaa +tax +tya +and {c1},x +tay +//FRAGMENT vduz1=vduz1_plus_vbuxx +txa +clc +adc {z1} +sta {z1} +lda {z1}+1 +adc #0 +sta {z1}+1 +lda {z1}+2 +adc #0 +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} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=pbuz2_bxor_vwuc1 +lda #<{c1} +eor {z2} +sta {z1} +lda #>{c1} +eor {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuz3 +ldy {z2} +lda ({z1}),y +ldy {z3} +ora {c1},y +ldy {z2} +sta ({z1}),y +//FRAGMENT vbuz1=vbuz1_bxor_pbuz2_derefidx_vbuz3 +lda {z1} +ldy {z3} +eor ({z2}),y +sta {z1} +//FRAGMENT vbuz1=_neg_vbuz1 +lda {z1} +eor #$ff +clc +adc #$01 +sta {z1} +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuaa +ldy {z2} +tax +lda ({z1}),y +ora {c1},x +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuxx +ldy {z2} +lda ({z1}),y +ora {c1},x +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz1_derefidx_vbuz2_bor_pbuc1_derefidx_vbuyy +tya +ldy {z2} +tax +lda ({z1}),y +ora {c1},x +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuz2 +txa +tay +lda ({z1}),y +ldy {z2} +stx $ff +ora {c1},y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuaa +tay +txa +ldx {c1},y +tay +lda ({z1}),y +sty $ff + +stx $ff +ora $ff +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuxx +txa +tay +lda ({z1}),y +stx $ff +ora {c1},x +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz1_derefidx_vbuxx_bor_pbuc1_derefidx_vbuyy +txa +ldx {c1},y +tay +lda ({z1}),y +sty $ff + +stx $ff +ora $ff +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz1_derefidx_vbuyy_bor_pbuc1_derefidx_vbuz2 +lda ({z1}),y +sty $ff + +ldy {z2} +ora {c1},y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz1_derefidx_vbuyy_bor_pbuc1_derefidx_vbuaa +tax +lda ({z1}),y +sty $ff + +ora {c1},x +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz1_derefidx_vbuyy_bor_pbuc1_derefidx_vbuxx +lda ({z1}),y +sty $ff + +ora {c1},x +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz1_derefidx_vbuyy_bor_pbuc1_derefidx_vbuyy +lda ({z1}),y +sty $ff + +ora {c1},y +ldy $ff +sta ({z1}),y +//FRAGMENT vbuz1=vbuz1_bxor_pbuz2_derefidx_vbuaa +tay +lda {z1} +eor ({z2}),y +sta {z1} +//FRAGMENT vbuz1=vbuz1_bxor_pbuz2_derefidx_vbuxx +txa +tay +lda {z1} +eor ({z2}),y +sta {z1} +//FRAGMENT vbuz1=vbuz1_bxor_pbuz2_derefidx_vbuyy +lda {z1} +eor ({z2}),y +sta {z1} +//FRAGMENT vbuaa=vbuaa_bxor_pbuz1_derefidx_vbuz2 +ldy {z2} +eor ({z1}),y +//FRAGMENT vbuaa=vbuaa_bxor_pbuz1_derefidx_vbuaa +tay +eor ({z1}),y +//FRAGMENT vbuaa=vbuaa_bxor_pbuz1_derefidx_vbuxx +stx $ff +ldy $ff +eor ({z1}),y +//FRAGMENT vbuaa=vbuaa_bxor_pbuz1_derefidx_vbuyy +eor ({z1}),y +//FRAGMENT vbuxx=vbuxx_bxor_pbuz1_derefidx_vbuz2 +ldy {z2} +txa +eor ({z1}),y +tax +//FRAGMENT vbuxx=vbuxx_bxor_pbuz1_derefidx_vbuaa +tay +txa +eor ({z1}),y +tax +//FRAGMENT vbuxx=vbuxx_bxor_pbuz1_derefidx_vbuxx +txa +tay +eor ({z1}),y +tax +//FRAGMENT vbuxx=vbuxx_bxor_pbuz1_derefidx_vbuyy +txa +eor ({z1}),y +tax +//FRAGMENT vbuyy=_neg_vbuyy +dey +tya +eor #$ff +tay +//FRAGMENT vwuz1=pbuz1_bxor_vwuc1 +lda #<{c1} +eor {z1} +sta {z1} +lda #>{c1} +eor {z1}+1 +sta {z1}+1 +//FRAGMENT vbsz1=vbsz2_plus_vbsc1 +lax {z2} +axs #-[{c1}] +stx {z1} +//FRAGMENT vbsz1=vbsc1_plus_vbsz2 +lax {z2} +axs #-[{c1}] +stx {z1} +//FRAGMENT vbsz1=vbsz2_plus_vbsz2 +lda {z2} +asl +sta {z1} +//FRAGMENT vbsaa=vbsz1_plus_vbsc1 +lda #{c1} +clc +adc {z1} +//FRAGMENT vbsxx=vbsz1_plus_vbsc1 +lax {z1} +axs #-[{c1}] +//FRAGMENT vbsyy=vbsz1_plus_vbsc1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbsaa=vbsc1_plus_vbsz1 +lda #{c1} +clc +adc {z1} +//FRAGMENT vbsxx=vbsc1_plus_vbsz1 +lax {z1} +axs #-[{c1}] +//FRAGMENT vbsyy=vbsc1_plus_vbsz1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbsaa=vbsz1_plus_vbsz1 +lda {z1} +asl +//FRAGMENT vbsxx=vbsz1_plus_vbsz1 +lda {z1} +asl +tax +//FRAGMENT vbsyy=vbsz1_plus_vbsz1 +lda {z1} +asl +tay +//FRAGMENT vbsz1=vbsz2_rol_1 +lda {z2} +asl +sta {z1} +//FRAGMENT vbsz1=vbsz2_minus_vbsc1 +lax {z2} +axs #{c1} +stx {z1} +//FRAGMENT vbsaa=vbsz1_rol_1 +lda {z1} +asl +//FRAGMENT vbsxx=vbsz1_rol_1 +lda {z1} +asl +tax +//FRAGMENT vbsyy=vbsz1_rol_1 +lda {z1} +asl +tay +//FRAGMENT vbsz1=vbsxx_rol_1 +txa +asl +sta {z1} +//FRAGMENT vbsaa=vbsxx_rol_1 +txa +asl +//FRAGMENT vbsxx=vbsxx_rol_1 +txa +asl +tax +//FRAGMENT vbsyy=vbsxx_rol_1 +txa +asl +tay +//FRAGMENT vbsz1=vbsyy_rol_1 +tya +asl +sta {z1} +//FRAGMENT vbsaa=vbsyy_rol_1 +tya +asl +//FRAGMENT vbsxx=vbsyy_rol_1 +tya +asl +tax +//FRAGMENT vbsyy=vbsyy_rol_1 +tya +asl +tay +//FRAGMENT vbsz1=vbsaa_minus_vbsc1 +sec +sbc #{c1} +sta {z1} +//FRAGMENT vbsz1=vbsxx_minus_vbsc1 +txa +axs #{c1} +stx {z1} +//FRAGMENT vbsz1=vbsyy_minus_vbsc1 +tya +sec +sbc #{c1} +sta {z1} +//FRAGMENT vbsaa=vbsz1_minus_vbsc1 +lda {z1} +sec +sbc #{c1} +//FRAGMENT vbsaa=vbsaa_minus_vbsc1 +sec +sbc #{c1} +//FRAGMENT vbsaa=vbsxx_minus_vbsc1 +txa +sec +sbc #{c1} +//FRAGMENT vbsaa=vbsyy_minus_vbsc1 +tya +sec +sbc #{c1} +//FRAGMENT vbsxx=vbsz1_minus_vbsc1 +lax {z1} +axs #{c1} +//FRAGMENT vbsxx=vbsaa_minus_vbsc1 +tax +axs #{c1} +//FRAGMENT vbsxx=vbsyy_minus_vbsc1 +tya +tax +axs #{c1} +//FRAGMENT vbsyy=vbsz1_minus_vbsc1 +lda {z1} +sec +sbc #{c1} +tay +//FRAGMENT vbsyy=vbsaa_minus_vbsc1 +sec +sbc #{c1} +tay +//FRAGMENT vbsyy=vbsxx_minus_vbsc1 +txa +sec +sbc #{c1} +tay +//FRAGMENT vbuc1_gt_vbuz1_then_la1 +lda {z1} +cmp #{c1} +bcc {la1} +//FRAGMENT vbuc1_gt_vbuxx_then_la1 +cpx #{c1} +bcc {la1} +//FRAGMENT vwuz1=vbuz2_rol_1 +lda {z2} +asl +sta {z1} +lda #0 +rol +sta {z1}+1 +//FRAGMENT vwuz1=vbuxx_rol_1 +txa +asl +sta {z1} +lda #0 +rol +sta {z1}+1 +//FRAGMENT vwuz1=vbuyy_rol_1 +tya +asl +sta {z1} +lda #0 +rol +sta {z1}+1 +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy +lda {c1},y +tay +//FRAGMENT vbsaa=vbsc1_minus_vbsz1 +lda #{c1} +sec +sbc {z1} +//FRAGMENT vbsaa=vbsc1_minus_vbsaa +eor #$ff +sec +adc #{c1} +//FRAGMENT vbsaa=vbsc1_minus_vbsxx +txa +eor #$ff +sec +adc #{c1} +//FRAGMENT vbsaa=vbsc1_minus_vbsyy +tya +eor #$ff +sec +adc #{c1} +//FRAGMENT vbsyy=vbsc1_minus_vbsz1 +lda #{c1} +sec +sbc {z1} +tay +//FRAGMENT vbsyy=vbsc1_minus_vbsaa +eor #$ff +sec +adc #{c1} +tay +//FRAGMENT vbsyy=vbsc1_minus_vbsxx +txa +eor #$ff +sec +adc #{c1} +tay +//FRAGMENT vbsyy=vbsc1_minus_vbsyy +tya +eor #$ff +sec +adc #{c1} +tay +//FRAGMENT vbsc1_neq_vbsaa_then_la1 +cmp #{c1} +bne {la1} +//FRAGMENT vbsyy=vbsz1_minus_vbsaa +eor #$ff +sec +adc {z1} +tay +//FRAGMENT vbsyy=vbsxx_minus_vbsaa +sta $ff +txa +sec +sbc $ff +tay +//FRAGMENT vbsyy=vbsyy_minus_vbsaa +sta $ff +tya +sec +sbc $ff +tay +//FRAGMENT vbsyy_lt_0_then_la1 +cpy #0 +bmi {la1} +//FRAGMENT vbsz1_neq_0_then_la1 +lda {z1} +cmp #0 +bne {la1} +//FRAGMENT vwsz1=vbsz2 +lda {z2} +sta {z1} +and #$80 +beq !+ +lda #$ff +!: +sta {z1}+1 +//FRAGMENT vbsaa_neq_0_then_la1 +cmp #0 +bne {la1} +//FRAGMENT vwsz1=vbsaa +sta {z1} +and #$80 +beq !+ +lda #$ff +!: +sta {z1}+1 +//FRAGMENT vwsz1=vbsxx +txa +sta {z1} +and #$80 +beq !+ +lda #$ff +!: +sta {z1}+1 +//FRAGMENT vwsz1=vbsyy +tya +sta {z1} +and #$80 +beq !+ +lda #$ff +!: +sta {z1}+1 +//FRAGMENT vbsxx_neq_0_then_la1 +txa +cmp #0 +bne {la1} +//FRAGMENT pwsz1=pwsc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=_hi_vdsz2 +lda {z2}+2 +sta {z1} +lda {z2}+3 +sta {z1}+1 +//FRAGMENT pwsz1=pwsz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT pwsz1=pwsc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vduz1_lt_vduc1_then_la1 +lda {z1}+3 +cmp #>{c1}>>$10 +bcc {la1} +bne !+ +lda {z1}+2 +cmp #<{c1}>>$10 +bcc {la1} +bne !+ +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vduz1=vduc1_minus_vduz1 +lda #<{c1} +sec +sbc {z1} +sta {z1} +lda #>{c1} +sbc {z1}+1 +sta {z1}+1 +lda #<{c1}>>$10 +sbc {z1}+2 +sta {z1}+2 +lda #>{c1}>>$10 +sbc {z1}+3 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_rol_3 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +lda {z2}+2 +rol +sta {z1}+2 +lda {z2}+3 +rol +sta {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vwuz1=vwuz2_minus_vwuc1 +lda {z2} +sec +sbc #<{c1} +sta {z1} +lda {z2}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=_byte_vwsz2 +lda {z2} +sta {z1} +//FRAGMENT vbsz1=_sbyte_vwsz2 +lda {z2} +sta {z1} +//FRAGMENT vduz1=vduz2_rol_vbuz3 +ldy {z3} +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dey +bne !- +!e: +//FRAGMENT vbuaa=_byte_vwsz1 +lda {z1} +//FRAGMENT vbuxx=_byte_vwsz1 +lda {z1} +tax +//FRAGMENT vbuyy=_byte_vwsz1 +lda {z1} +tay +//FRAGMENT vbsaa=_sbyte_vwsz1 +lda {z1} +//FRAGMENT vbsxx=_sbyte_vwsz1 +lda {z1} +tax +//FRAGMENT vbsyy=_sbyte_vwsz1 +lda {z1} +tay +//FRAGMENT vduz1=vduz2_rol_vbuxx +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dex +bne !- +!e: +//FRAGMENT vduz1=vduz2_rol_vbuyy +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dey +bne !- +!e: +//FRAGMENT vduz1=vduz1_rol_3 +ldy #3 +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dey +bne !- +//FRAGMENT pwsz1=pwsc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vduz1=vduz1_rol_vbuxx +cpx #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dex +bne !- +!e: +//FRAGMENT pssz1=pssc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_minus_1 +lda {z1} +sec +sbc #1 +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vbuz1=vbuz1_minus_1 +dec {z1} +//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 vwsz1=pwsz2_derefidx_vbuc1_ror_vbuc2 +ldx #{c2} +ldy #{c1} +lda ({z2}),y +sta {z1} +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 {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//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 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 pbsz1_derefidx_vbuc1=vbsxx +lda #{c1} +tay +txa +sta ({z1}),y +//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 vbuxx=vbuxx_minus_1 +dex +//FRAGMENT vbuyy=vbuyy_minus_1 +tya +tay +dey +//FRAGMENT vwsz1_neq_vwsc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT pwuc1_derefidx_vbuz1=vbuz2 +lda {z2} +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +sta {z1} +//FRAGMENT _deref_pbuc1_lt_vbuz1_then_la1 +lda {c1} +cmp {z1} +bcc {la1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 +lda {z1} +ldx {z2} +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz2)_then_la1 +lda {z1} +ldx {z2} +ldy {c2},x +cmp {c1},y +bcc {la1} +//FRAGMENT vbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) +ldx {z2} +ldy {c2},x +ldx {c1},y +stx {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz2) +ldx {z2} +ldy {c3},x +lda {c2},y +ldx {z1} +sta {c1},x +//FRAGMENT vbuz1=_lo_pwuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +//FRAGMENT vbuz1=_hi_pwuc1_derefidx_vbuz2 +ldy {z2} +lda {c1}+1,y +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=vbuxx +ldy {z1} +txa +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuz1=vbuyy +tya +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=vbuz1 +tay +lda {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=vbuxx +tay +txa +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=vbuyy +tax +tya +sta {c1},x +lda #0 +sta {c1}+1,x +//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 +txa +sta {c1},y +lda #0 +sta {c1}+1,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 +cpy $ff +bcc {la1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuaa)_then_la1 +tax +lda {z1} +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 +lda {z1} +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuyy)_then_la1 +lda {z1} +ldx {c2},y +cmp {c1},x +bcs {la1} +//FRAGMENT vbuaa_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz1)_then_la1 +ldx {z1} +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 +lda {z1} +ldy {c2},x +cmp {c1},y +bcc {la1} +//FRAGMENT vbuz1_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuyy)_then_la1 +lda {z1} +ldx {c2},y +cmp {c1},x +bcc {la1} +//FRAGMENT vbuxx_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz1)_then_la1 +ldy {z1} +txa +ldx {c2},y +cmp {c1},x +bcc {la1} +//FRAGMENT vbuxx_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 +txa +ldy {c2},x +cmp {c1},y +bcc {la1} +//FRAGMENT vbuxx_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuyy)_then_la1 +txa +ldx {c2},y +cmp {c1},x +bcc {la1} +//FRAGMENT vbuyy_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuz1)_then_la1 +ldx {z1} +tya +ldy {c2},x +cmp {c1},y +bcc {la1} +//FRAGMENT vbuyy_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 +tya +ldy {c2},x +cmp {c1},y +bcc {la1} +//FRAGMENT vbuyy_lt_pbuc1_derefidx_(pbuc2_derefidx_vbuyy)_then_la1 +tya +ldx {c2},y +cmp {c1},x +bcc {la1} +//FRAGMENT vbuaa=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) +ldx {z1} +ldy {c2},x +lda {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) +ldx {z1} +ldy {c2},x +ldx {c1},y +//FRAGMENT vbuyy=pbuc1_derefidx_(pbuc2_derefidx_vbuz1) +ldy {z1} +ldx {c2},y +ldy {c1},x +//FRAGMENT vbuaa=_lo_pwuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +//FRAGMENT vbuxx=_lo_pwuc1_derefidx_vbuz1 +ldx {z1} +lda {c1},x +tax +//FRAGMENT vbuyy=_lo_pwuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +tay +//FRAGMENT vbuz1=_lo_pwuc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +//FRAGMENT vbuaa=_lo_pwuc1_derefidx_vbuaa +tay +lda {c1},y +//FRAGMENT vbuxx=_lo_pwuc1_derefidx_vbuaa +tax +lda {c1},x +tax +//FRAGMENT vbuyy=_lo_pwuc1_derefidx_vbuaa +tay +lda {c1},y +tay +//FRAGMENT vbuz1=_lo_pwuc1_derefidx_vbuxx +lda {c1},x +sta {z1} +//FRAGMENT vbuaa=_lo_pwuc1_derefidx_vbuxx +lda {c1},x +//FRAGMENT vbuxx=_lo_pwuc1_derefidx_vbuxx +lda {c1},x +tax +//FRAGMENT vbuyy=_lo_pwuc1_derefidx_vbuxx +lda {c1},x +tay +//FRAGMENT vbuz1=_lo_pwuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +//FRAGMENT vbuaa=_lo_pwuc1_derefidx_vbuyy +lda {c1},y +//FRAGMENT vbuxx=_lo_pwuc1_derefidx_vbuyy +lda {c1},y +tax +//FRAGMENT vbuyy=_lo_pwuc1_derefidx_vbuyy +lda {c1},y +tay +//FRAGMENT vbuz1=_hi_pwuc1_derefidx_vbuxx +lda {c1}+1,x +sta {z1} +//FRAGMENT vbuaa=_hi_pwuc1_derefidx_vbuz1 +ldy {z1} +lda {c1}+1,y +//FRAGMENT vbuaa=_hi_pwuc1_derefidx_vbuxx +lda {c1}+1,x +//FRAGMENT vbuxx=_hi_pwuc1_derefidx_vbuz1 +ldx {z1} +lda {c1}+1,x +tax +//FRAGMENT vbuxx=_hi_pwuc1_derefidx_vbuxx +lda {c1}+1,x +tax +//FRAGMENT vbuyy=_hi_pwuc1_derefidx_vbuz1 +ldy {z1} +lda {c1}+1,y +tay +//FRAGMENT vbuyy=_hi_pwuc1_derefidx_vbuxx +lda {c1}+1,x +tay +//FRAGMENT vbuxx_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz1)_then_la1 +ldy {z1} +txa +ldx {c2},y +cmp {c1},x +bcs {la1} +//FRAGMENT vbuxx_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 +txa +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuxx_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuyy)_then_la1 +txa +ldx {c2},y +cmp {c1},x +bcs {la1} +//FRAGMENT vbuyy_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuz1)_then_la1 +ldx {z1} +tya +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuyy_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuxx)_then_la1 +tya +ldy {c2},x +cmp {c1},y +bcs {la1} +//FRAGMENT vbuyy_ge_pbuc1_derefidx_(pbuc2_derefidx_vbuyy)_then_la1 +tya +ldx {c2},y +cmp {c1},x +bcs {la1} +//FRAGMENT _deref_pbuc1_lt_vbuxx_then_la1 +lda {c1} +stx $ff +cmp $ff +bcc {la1} +//FRAGMENT _deref_pbuc1_lt_vbuyy_then_la1 +ldx {c1} +sty $ff +cpx $ff +bcc {la1} +//FRAGMENT vbsxx=pbsc1_derefidx_vbuyy +ldx {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuc2 +ldx {z1} +ldy #{c2} +lda ({z2}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2 +ldy #{c2} +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuc2 +tya +ldy #{c2} +tax +lda ({z1}),y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuaa=pbuz1_derefidx_vbuc2 +ldy #{c2} +tax +lda ({z1}),y +sta {c1},x +//FRAGMENT _deref_qssc1=pssc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT pssc1_neq_pssz1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vbuz1=vbuc1_plus__deref_pbuz2 +lda #{c1} +clc +ldy #0 +adc ({z2}),y +sta {z1} +//FRAGMENT vbuz1=_lo_qssz2_derefidx_vbuc1 +ldy #{c1} +lda ({z2}),y +sta {z1} +//FRAGMENT vbuz1=_hi_qssz2_derefidx_vbuc1 +ldy #{c1}+1 +lda ({z2}),y +sta {z1} +//FRAGMENT pssz1=qssz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +pha +iny +lda ({z1}),y +sta {z1}+1 +pla +sta {z1} +//FRAGMENT vbuaa=vbuc1_plus__deref_pbuz1 +lda #{c1} +clc +ldy #0 +adc ({z1}),y +//FRAGMENT vbuxx=vbuc1_plus__deref_pbuz1 +ldy #0 +lda ({z1}),y +tax +axs #-[{c1}] +//FRAGMENT vbuyy=vbuc1_plus__deref_pbuz1 +lda #{c1} +clc +ldy #0 +adc ({z1}),y +tay +//FRAGMENT vbuaa=_lo_qssz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +//FRAGMENT vbuxx=_lo_qssz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +tax +//FRAGMENT vbuyy=_lo_qssz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +tay +//FRAGMENT vbuaa=_hi_qssz1_derefidx_vbuc1 +ldy #{c1}+1 +lda ({z1}),y +//FRAGMENT vbuxx=_hi_qssz1_derefidx_vbuc1 +ldy #{c1}+1 +lda ({z1}),y +tax +//FRAGMENT vbuyy=_hi_qssz1_derefidx_vbuc1 +ldy #{c1}+1 +lda ({z1}),y +tay +//FRAGMENT pssc1_derefidx_vbuz1=pssc2_derefidx_vbuz1_memcpy_vbuc3 +ldx #{c3} +ldy {z1} +!: +lda {c2},y +sta {c1},y +iny +dex +bne !- +//FRAGMENT pssc1_derefidx_vbuaa=pssc2_derefidx_vbuaa_memcpy_vbuc3 +ldx #{c3} +tay +!: +lda {c2},y +sta {c1},y +iny +dex +bne !- +//FRAGMENT pssc1_derefidx_vbuxx=pssc2_derefidx_vbuxx_memcpy_vbuc3 +ldy #{c3} +!: +lda {c2},x +sta {c1},x +inx +dey +bne !- +//FRAGMENT pssc1_derefidx_vbuyy=pssc2_derefidx_vbuyy_memcpy_vbuc3 +ldx #{c3} +!: +lda {c2},y +sta {c1},y +iny +dex +bne !- +//FRAGMENT vbum1_lt_vbuc1_then_la1 +lda {m1} +cmp #{c1} +bcc {la1} +//FRAGMENT pbuc1_derefidx_vbum1=vbum1 +ldy {m1} +tya +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuaa=vwuc2 +tay +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT _deref_pbuc1_ge_vbuc2_then_la1 +lda {c1} +cmp #{c2} +bcs {la1} +//FRAGMENT vboz1=vboxx +txa +sta {z1} +//FRAGMENT vboaa=vboxx +txa +//FRAGMENT vboxx=vboaa +tax +//FRAGMENT vboxx=vboyy +tya +tax +//FRAGMENT vboyy=vboxx +txa +tay +//FRAGMENT vbsz1=vbsz1_minus_vbsxx +txa +eor #$ff +sec +adc {z1} +sta {z1} +//FRAGMENT vwsz1=vwsz1_minus_vwsc1 +lda {z1} +sec +sbc #<{c1} +sta {z1} +lda {z1}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vbsz1=pbsc1_derefidx_vbuz2_minus_pbsc2_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sec +sbc {c2},y +sta {z1} +//FRAGMENT pbsz1=pbsc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pbsz1=vbsz2 +lda {z2} +ldy #0 +sta ({z1}),y +//FRAGMENT pbsz1=_inc_pbsz1 +inc {z1} +bne !+ +inc {z1}+1 +!: +//FRAGMENT vbsaa=pbsc1_derefidx_vbuz1_minus_pbsc2_derefidx_vbuz1 +ldy {z1} +lda {c1},y +sec +sbc {c2},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbuz1_minus_pbsc2_derefidx_vbuz1 +ldx {z1} +lda {c1},x +sec +sbc {c2},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbuz1_minus_pbsc2_derefidx_vbuz1 +ldy {z1} +lda {c1},y +sec +sbc {c2},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbuaa_minus_pbsc2_derefidx_vbuaa +tay +lda {c1},y +sec +sbc {c2},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbuaa_minus_pbsc2_derefidx_vbuaa +tay +lda {c1},y +sec +sbc {c2},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbuaa_minus_pbsc2_derefidx_vbuaa +tax +lda {c1},x +sec +sbc {c2},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbuaa_minus_pbsc2_derefidx_vbuaa +tay +lda {c1},y +sec +sbc {c2},y +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbuxx_minus_pbsc2_derefidx_vbuxx +lda {c1},x +sec +sbc {c2},x +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbuxx_minus_pbsc2_derefidx_vbuxx +lda {c1},x +sec +sbc {c2},x +//FRAGMENT vbsxx=pbsc1_derefidx_vbuxx_minus_pbsc2_derefidx_vbuxx +lda {c1},x +sec +sbc {c2},x +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbuxx_minus_pbsc2_derefidx_vbuxx +lda {c1},x +sec +sbc {c2},x +tay +//FRAGMENT vbsz1=pbsc1_derefidx_vbuyy_minus_pbsc2_derefidx_vbuyy +lda {c1},y +sec +sbc {c2},y +sta {z1} +//FRAGMENT vbsaa=pbsc1_derefidx_vbuyy_minus_pbsc2_derefidx_vbuyy +lda {c1},y +sec +sbc {c2},y +//FRAGMENT vbsxx=pbsc1_derefidx_vbuyy_minus_pbsc2_derefidx_vbuyy +lda {c1},y +sec +sbc {c2},y +tax +//FRAGMENT vbsyy=pbsc1_derefidx_vbuyy_minus_pbsc2_derefidx_vbuyy +lda {c1},y +sec +sbc {c2},y +tay +//FRAGMENT _deref_pbsz1=vbsaa +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbsz1=vbsxx +txa +ldy #0 +sta ({z1}),y +//FRAGMENT _deref_pbsz1=vbsyy +tya +ldy #0 +sta ({z1}),y +//FRAGMENT vwuz1=_deref_pwuc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_minus_1 +ldx {z1} +lda {c1},x +bne !+ +dec {c1}+1,x +!: +dec {c1},x +//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_minus_1 +tax +lda {c1},x +bne !+ +dec {c1}+1,x +!: +dec {c1},x +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_minus_1 +lda {c1},x +bne !+ +dec {c1}+1,x +!: +dec {c1},x +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_minus_1 +sec +lda {c1},y +sbc #$01 +sta {c1},y +lda {c1}+1,y +sbc #$00 +sta {c1}+1,y +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_1 +ldx {z2} +ldy {c1},x +iny +sty {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_1 +ldy {z1} +lda {c1},y +clc +adc #1 +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_1 +ldy {z1} +ldx {c1},y +inx +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_1 +ldx {z1} +ldy {c1},x +iny +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_1 +tax +ldy {c1},x +iny +sty {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_1 +tay +lda {c1},y +clc +adc #1 +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_1 +tay +ldx {c1},y +inx +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_1 +tax +ldy {c1},x +iny +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_1 +ldy {c1},x +iny +sty {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_1 +lda {c1},x +clc +adc #1 +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_1 +ldy {c1},x +iny +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_1 +ldx {c1},y +inx +stx {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_1 +lda {c1},y +clc +adc #1 +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_1 +ldx {c1},y +inx +//FRAGMENT vwuz1_eq_vwuz2_then_la1 +lda {z1} +cmp {z2} +bne !+ +lda {z1}+1 +cmp {z2}+1 +beq {la1} +!: +//FRAGMENT vwuz1_le_vwuz2_then_la1 +lda {z1}+1 +cmp {z2}+1 +bne !+ +lda {z1} +cmp {z2} +beq {la1} +!: +bcc {la1} +//FRAGMENT vduz1=vwuz2_dword_vwuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +lda {z2} +sta {z1}+2 +lda {z2}+1 +sta {z1}+3 +//FRAGMENT vbuz1=vbuz2_plus_pbuc1_derefidx_vbuz3 +lda {z2} +ldy {z3} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +clc +adc {c1},y +//FRAGMENT vbuxx=vbuz1_plus_pbuc1_derefidx_vbuz2 +lda {z1} +ldx {z2} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=vbuz1_plus_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=vbuxx_plus_pbuc1_derefidx_vbuz2 +ldy {z2} +txa +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus_pbuc1_derefidx_vbuz1 +ldy {z1} +txa +clc +adc {c1},y +//FRAGMENT vbuxx=vbuxx_plus_pbuc1_derefidx_vbuz1 +txa +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=vbuxx_plus_pbuc1_derefidx_vbuz1 +ldy {z1} +txa +clc +adc {c1},y +tay +//FRAGMENT vbuz1=vbuyy_plus_pbuc1_derefidx_vbuz2 +tya +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=vbuyy_plus_pbuc1_derefidx_vbuz1 +ldx {z1} +tya +clc +adc {c1},x +tax +//FRAGMENT vbuz1=vbuz2_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {z1} +tay +//FRAGMENT vbuz1=vbuxx_plus_pbuc1_derefidx_vbuxx +txa +clc +adc {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus_pbuc1_derefidx_vbuxx +txa +clc +adc {c1},x +//FRAGMENT vbuxx=vbuxx_plus_pbuc1_derefidx_vbuxx +txa +clc +adc {c1},x +tax +//FRAGMENT vbuyy=vbuxx_plus_pbuc1_derefidx_vbuxx +txa +clc +adc {c1},x +tay +//FRAGMENT vbuz1=vbuyy_plus_pbuc1_derefidx_vbuxx +tya +clc +adc {c1},x +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_pbuc1_derefidx_vbuxx +tya +clc +adc {c1},x +//FRAGMENT vbuxx=vbuyy_plus_pbuc1_derefidx_vbuxx +tya +clc +adc {c1},x +tax +//FRAGMENT vbuz1=vbuz2_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {z1} +tay +//FRAGMENT vbuz1=vbuxx_plus_pbuc1_derefidx_vbuyy +txa +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus_pbuc1_derefidx_vbuyy +txa +clc +adc {c1},y +//FRAGMENT vbuxx=vbuxx_plus_pbuc1_derefidx_vbuyy +txa +clc +adc {c1},y +tax +//FRAGMENT vbuyy=vbuxx_plus_pbuc1_derefidx_vbuyy +txa +clc +adc {c1},y +tay +//FRAGMENT vbuz1=vbuyy_plus_pbuc1_derefidx_vbuyy +tya +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_pbuc1_derefidx_vbuyy +tya +clc +adc {c1},y +//FRAGMENT vbuxx=vbuyy_plus_pbuc1_derefidx_vbuyy +tya +clc +adc {c1},y +tax +//FRAGMENT vduz1_lt_vwuc1_then_la1 +NO_SYNTHESIS +//FRAGMENT vduz1_lt_vwsc1_then_la1 +NO_SYNTHESIS +//FRAGMENT vduz1=vduz2_rol_4 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +lda {z2}+2 +rol +sta {z1}+2 +lda {z2}+3 +rol +sta {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vduz1=vduz2_rol_1 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +lda {z2}+2 +rol +sta {z1}+2 +lda {z2}+3 +rol +sta {z1}+3 +//FRAGMENT vduz1=vduz1_plus_vwuc1 +lda {z1} +clc +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +lda {z1}+2 +adc #0 +sta {z1}+2 +lda {z1}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz1_rol_2 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vbuz1=vbuc1_minus_vbuz1 +lda #{c1} +sec +sbc {z1} +sta {z1} +//FRAGMENT vbsz1=vbsz2_ror_vbuz3 +lda {z2} +ldy {z3} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +sta {z1} +//FRAGMENT vbsz1=vbsz1_plus_vbsz2 +lda {z1} +clc +adc {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz1_minus_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbsaa_neq_vbsc1_then_la1 +cmp #{c1} +bne {la1} +//FRAGMENT vbsyy_neq_0_then_la1 +tya +cmp #0 +bne {la1} +//FRAGMENT vbsaa=vbsz1_ror_vbuz2 +lda {z1} +ldy {z2} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +//FRAGMENT vbsxx=vbsz1_ror_vbuz2 +lda {z1} +ldx {z2} +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsz1_ror_vbuz2 +lda {z1} +ldy {z2} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsxx_ror_vbuz2 +ldy {z2} +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsxx_ror_vbuz1 +ldy {z1} +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +//FRAGMENT vbsxx=vbsxx_ror_vbuz1 +txa +ldx {z1} +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsxx_ror_vbuz1 +ldy {z1} +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsyy_ror_vbuz2 +tya +ldy {z2} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsyy_ror_vbuz1 +tya +ldy {z1} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +//FRAGMENT vbsxx=vbsyy_ror_vbuz1 +ldx {z1} +tya +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsyy_ror_vbuz1 +tya +ldy {z1} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsz2_ror_vbuxx +lda {z2} +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsz1_ror_vbuxx +lda {z1} +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +//FRAGMENT vbsxx=vbsz1_ror_vbuxx +lda {z1} +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsz1_ror_vbuxx +lda {z1} +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsxx_ror_vbuxx +txa +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsxx_ror_vbuxx +txa +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +//FRAGMENT vbsxx=vbsxx_ror_vbuxx +txa +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsxx_ror_vbuxx +txa +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsyy_ror_vbuxx +tya +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsyy_ror_vbuxx +tya +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +//FRAGMENT vbsxx=vbsyy_ror_vbuxx +tya +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsyy_ror_vbuxx +tya +cpx #0 +beq !e+ +!l: +cmp #$80 +ror +dex +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsz2_ror_vbuyy +lda {z2} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsz1_ror_vbuyy +lda {z1} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +//FRAGMENT vbsxx=vbsz1_ror_vbuyy +lda {z1} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsz1_ror_vbuyy +lda {z1} +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsxx_ror_vbuyy +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsxx_ror_vbuyy +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +//FRAGMENT vbsxx=vbsxx_ror_vbuyy +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsxx_ror_vbuyy +txa +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsyy_ror_vbuyy +tya +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +sta {z1} +//FRAGMENT vbsaa=vbsyy_ror_vbuyy +tya +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +//FRAGMENT vbsxx=vbsyy_ror_vbuyy +tya +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tax +//FRAGMENT vbsyy=vbsyy_ror_vbuyy +tya +cpy #0 +beq !e+ +!l: +cmp #$80 +ror +dey +bne !l- +!e: +tay +//FRAGMENT vbsz1=vbsz1_minus_vbsyy +tya +eor #$ff +sec +adc {z1} +sta {z1} +//FRAGMENT vbsz1=vbsz1_plus_vbsxx +txa +clc +adc {z1} +sta {z1} +//FRAGMENT vbsz1=vbsz1_plus_vbsyy +tya +clc +adc {z1} +sta {z1} +//FRAGMENT vbuxx=vbuxx_minus_pbuc1_derefidx_vbuz1 +txa +ldx {z1} +sec +sbc {c1},x +tax +//FRAGMENT vbuyy=vbuyy_minus_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +sec +sbc {c1},y +tay +//FRAGMENT vbuz1=vbuz1_minus_pbuc1_derefidx_vbuxx +lda {z1} +sec +sbc {c1},x +sta {z1} +//FRAGMENT vbuxx=vbuxx_minus_pbuc1_derefidx_vbuxx +txa +tax +sec +sbc {c1},x +tax +//FRAGMENT vbuyy=vbuyy_minus_pbuc1_derefidx_vbuxx +tya +sec +sbc {c1},x +tay +//FRAGMENT vbuz1=vbuz1_minus_pbuc1_derefidx_vbuyy +lda {z1} +sec +sbc {c1},y +sta {z1} +//FRAGMENT vbuxx=vbuxx_minus_pbuc1_derefidx_vbuyy +txa +sec +sbc {c1},y +tax +//FRAGMENT vbuyy=vbuyy_minus_pbuc1_derefidx_vbuyy +tya +tay +sec +sbc {c1},y +tay +//FRAGMENT _deref_pduc1=vduz1 +lda {z1} +sta {c1} +lda {z1}+1 +sta {c1}+1 +lda {z1}+2 +sta {c1}+2 +lda {z1}+3 +sta {c1}+3 +//FRAGMENT vduz1=_dec_vduz2 +lda {z2} +sec +sbc #1 +sta {z1} +lda {z2}+1 +sbc #0 +sta {z1}+1 +lda {z2}+2 +sbc #0 +sta {z1}+2 +lda {z2}+3 +sbc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz1_plus_vbuc1 +lda {z1} +clc +adc #{c1} +sta {z1} +bcc !+ +inc {z1}+1 +bne !+ +inc {z1}+2 +bne !+ +inc {z1}+3 +!: +//FRAGMENT vduz1=_dec_vduz1 +lda {z1} +sec +sbc #1 +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +lda {z1}+2 +sbc #0 +sta {z1}+2 +lda {z1}+3 +sbc #0 +sta {z1}+3 +//FRAGMENT vwuz1=_stackidxword_vbuc1 +tsx +lda STACK_BASE+{c1},x +sta {z1} +lda STACK_BASE+{c1}+1,x +sta {z1}+1 +//FRAGMENT _stackidxword_vbuc1=vwuz1 +tsx +lda {z1} +sta STACK_BASE+{c1},x +lda {z1}+1 +sta STACK_BASE+{c1}+1,x +//FRAGMENT _stackpushword_=vwuc1 +lda #>{c1} +pha +lda #<{c1} +pha +//FRAGMENT vwuz1=_stackpullword_ +pla +sta {z1} +pla +sta {z1}+1 +//FRAGMENT _stackpushword_=vbuc1 +lda #0 +pha +lda #<{c1} +pha +//FRAGMENT _stackidxsword_vbuc1=vwsz1 +tsx +lda {z1} +sta STACK_BASE+{c1},x +lda {z1}+1 +sta STACK_BASE+{c1}+1,x +//FRAGMENT _stackpushbyte_2 +pha +pha +//FRAGMENT vwsz1=_stackpullsword_ +pla +sta {z1} +pla +sta {z1}+1 +//FRAGMENT _deref_pwsc1=vwsz1 +lda {z1} +sta {c1} +lda {z1}+1 +sta {c1}+1 +//FRAGMENT pbuc1_derefidx_vbuaa=_inc_pbuc1_derefidx_vbuaa +tax +inc {c1},x +//FRAGMENT vbuaa=vbuaa_bor_vbuc1 +ora #{c1} +//FRAGMENT vbuz1=_deref_pbuz2_rol_1 +ldy #0 +lda ({z2}),y +asl +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=_inc_pwuc1_derefidx_vbuz1 +ldx {z1} +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT vbuaa=_deref_pbuz1_rol_1 +ldy #0 +lda ({z1}),y +asl +//FRAGMENT vbuxx=_deref_pbuz1_rol_1 +ldy #0 +lda ({z1}),y +asl +tax +//FRAGMENT vbuyy=_deref_pbuz1_rol_1 +ldy #0 +lda ({z1}),y +asl +tay +//FRAGMENT pwuc1_derefidx_vbuaa=_inc_pwuc1_derefidx_vbuaa +tax +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT pwuc1_derefidx_vbuxx=_inc_pwuc1_derefidx_vbuxx +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT pwuc1_derefidx_vbuyy=_inc_pwuc1_derefidx_vbuyy +tya +tax +inc {c1},x +bne !+ +inc {c1}+1,x +!: +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_(pbuc3_derefidx_vbuz1) +ldx {z1} +ldy {c3},x +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_(pbuc3_derefidx_vbuxx) +ldy {c3},x +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_(pbuc3_derefidx_vbuyy) +ldx {c3},y +lda {c2},x +sta {c1},y +//FRAGMENT pwsz1_lt_pwsc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vbsaa=vbsz1_minus_vbsaa +eor #$ff +sec +adc {z1} +//FRAGMENT vbsaa=vbsxx_minus_vbsaa +sta $ff +txa +sec +sbc $ff +//FRAGMENT vbuz1=_deref_pbuc1_bxor_vbuc2 +lda #{c2} +eor {c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_bxor_vbuaa +eor #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_bxor_vbuxx +txa +eor #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_bxor_vbuyy +tya +eor #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_bxor_vbuaa +eor #{c1} +//FRAGMENT vbuaa=vbuc1_bxor_vbuxx +txa +eor #{c1} +//FRAGMENT vbuaa=vbuc1_bxor_vbuyy +tya +eor #{c1} +//FRAGMENT vbuxx=vbuc1_bxor_vbuaa +eor #{c1} +tax +//FRAGMENT vbuxx=vbuc1_bxor_vbuxx +txa +eor #{c1} +tax +//FRAGMENT vbuxx=vbuc1_bxor_vbuyy +tya +eor #{c1} +tax +//FRAGMENT vbuyy=vbuc1_bxor_vbuaa +eor #{c1} +tay +//FRAGMENT vbuyy=vbuc1_bxor_vbuxx +txa +eor #{c1} +tay +//FRAGMENT vbuyy=vbuc1_bxor_vbuyy +tya +eor #{c1} +tay +//FRAGMENT vbuaa=_deref_pbuc1_bxor_vbuc2 +lda #{c2} +eor {c1} +//FRAGMENT vbuxx=_deref_pbuc1_bxor_vbuc2 +lda #{c2} +eor {c1} +tax +//FRAGMENT vbuyy=_deref_pbuc1_bxor_vbuc2 +lda #{c2} +eor {c1} +tay +//FRAGMENT vbuz1=vbuz1_plus_vbuaa +clc +adc {z1} +sta {z1} +//FRAGMENT vduz1_neq_vduc1_then_la1 +lda {z1}+3 +cmp #>{c1}>>$10 +bne {la1} +lda {z1}+2 +cmp #<{c1}>>$10 +bne {la1} +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vwuz1=vwuz2_plus_vwuc1 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vduz1=vduz2_sethi_vwuz3 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z3} +sta {z1}+2 +lda {z3}+1 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_setlo_vwuz3 +lda {z3} +sta {z1} +lda {z3}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +//FRAGMENT vduz1=vduz1_setlo_vwuz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vbuaa=vbuaa_plus_2 +clc +adc #2 +//FRAGMENT vbuz1_ge__deref_pbuc1_then_la1 +lda {c1} +ldy {z1} +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vbuxx_ge__deref_pbuc1_then_la1 +ldy {c1} +sty $ff +cpx $ff +bcs {la1} +//FRAGMENT vbuyy_ge__deref_pbuc1_then_la1 +lda {c1} +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vduz1=_deref_pduc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +lda {c1}+2 +sta {z1}+2 +lda {c1}+3 +sta {z1}+3 +//FRAGMENT vwuz1=pbuc1_derefidx_vbuz2_word_vbuz3 +ldy {z2} +lda {c1},y +sta {z1}+1 +lda {z3} +sta {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuaa_word_vbuz2 +tay +lda {c1},y +sta {z1}+1 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuxx_word_vbuz2 +lda {c1},x +sta {z1}+1 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuyy_word_vbuz2 +lda {c1},y +sta {z1}+1 +lda {z2} +sta {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuz2_word_vbuaa +ldx {z2} +tay +lda {c1},x +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuaa_word_vbuaa +tay +lda {c1},y +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuxx_word_vbuaa +tay +lda {c1},x +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuyy_word_vbuaa +tax +lda {c1},y +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuz2_word_vbuxx +ldy {z2} +lda {c1},y +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuaa_word_vbuxx +tay +lda {c1},y +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuxx_word_vbuxx +lda {c1},x +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuyy_word_vbuxx +lda {c1},y +sta {z1}+1 +stx {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuz2_word_vbuyy +ldx {z2} +lda {c1},x +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuaa_word_vbuyy +tax +lda {c1},x +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuxx_word_vbuyy +lda {c1},x +sta {z1}+1 +sty {z1} +//FRAGMENT vwuz1=pbuc1_derefidx_vbuyy_word_vbuyy +lda {c1},y +sta {z1}+1 +sty {z1} +//FRAGMENT _deref_(_deref_qwuc1)=_deref_(_deref_qwuc2) +ldy {c2} +sty $fe +ldy {c2}+1 +sty $ff +ldy #0 +lda ($fe),y +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT vbuyy=vbuaa_band_pbuc1_derefidx_vbuyy +and {c1},y +tay +//FRAGMENT _deref_pbuc1_eq__deref_pbuc2_then_la1 +lda {c1} +cmp {c2} +beq {la1} +//FRAGMENT _deref_pbsc1=_deref_pbsc2 +lda {c2} +sta {c1} +//FRAGMENT vwsz1_eq_vwsz2_then_la1 +lda {z1} +cmp {z2} +bne !+ +lda {z1}+1 +cmp {z2}+1 +beq {la1} +!: +//FRAGMENT vwsz1_neq_vwsz2_then_la1 +lda {z1}+1 +cmp {z2}+1 +bne {la1} +lda {z1} +cmp {z2} +bne {la1} +//FRAGMENT vwsz1_lt_vwsz2_then_la1 +lda {z1} +cmp {z2} +lda {z1}+1 +sbc {z2}+1 +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vwsz1_gt_vwsz2_then_la1 +lda {z2} +cmp {z1} +lda {z2}+1 +sbc {z1}+1 +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vwsz1_ge_vwsz2_then_la1 +lda {z1} +cmp {z2} +lda {z1}+1 +sbc {z2}+1 +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT vbuz1=_deref_pbuc1_plus_1 +ldy {c1} +iny +sty {z1} +//FRAGMENT vbuz1=_deref_pbuc1_minus_1 +ldx {c1} +dex +stx {z1} +//FRAGMENT vbuz1=_deref_pbuc1_plus_vbuc2 +lda #{c2} +clc +adc {c1} +sta {z1} +//FRAGMENT vbuz1=_deref_pbuc1_minus_vbuc2 +lda {c1} +sec +sbc #{c2} +sta {z1} +//FRAGMENT vbuaa=_deref_pbuc1_plus_1 +lda {c1} +clc +adc #1 +//FRAGMENT vbuaa=_deref_pbuc1_minus_1 +lda {c1} +sec +sbc #1 +//FRAGMENT vbuaa=_deref_pbuc1_plus_vbuc2 +lda #{c2} +clc +adc {c1} +//FRAGMENT vbuxx=_deref_pbuc1_plus_vbuc2 +lda {c1} +tax +axs #-[{c2}] +//FRAGMENT vbuyy=_deref_pbuc1_plus_vbuc2 +lda #{c2} +clc +adc {c1} +tay +//FRAGMENT vbuaa=_deref_pbuc1_minus_vbuc2 +lda {c1} +sec +sbc #{c2} +//FRAGMENT vbuxx=_deref_pbuc1_minus_vbuc2 +lda {c1} +tax +axs #{c2} +//FRAGMENT vbuyy=_deref_pbuc1_minus_vbuc2 +lda {c1} +sec +sbc #{c2} +tay +//FRAGMENT vbuaa_ge_vbuxx_then_la1 +stx $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuaa_ge_vbuyy_then_la1 +sty $ff +cmp $ff +bcs {la1} +//FRAGMENT vbuxx=_deref_pbuc1_plus_1 +ldx {c1} +inx +//FRAGMENT vbuyy=_deref_pbuc1_plus_1 +ldy {c1} +iny +//FRAGMENT vbuxx=_deref_pbuc1_minus_1 +ldx {c1} +dex +//FRAGMENT vbuyy=_deref_pbuc1_minus_1 +lda {c1} +tay +dey +//FRAGMENT vbsz1_neq_vbsz2_then_la1 +lda {z1} +cmp {z2} +bne {la1} +//FRAGMENT vbsz1_neq_vbsxx_then_la1 +cpx {z1} +bne {la1} +//FRAGMENT vbsxx_neq_vbsz1_then_la1 +cpx {z1} +bne {la1} +//FRAGMENT pwuz1=pwuc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT pwuz1=pwuc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 +lda #{c2} +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT _deref_pwuz1=vbuc1 +lda #{c1} +ldy #0 +sta ({z1}),y +tya +iny +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuc1=vbuc2 +lda #{c2} +ldy #{c1} +sta ({z1}),y +lda #0 +iny +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_vbuc2 +lda #{c2} +ldy #{c1} +clc +adc ({z1}),y +sta ({z1}),y +iny +lda #0 +adc ({z1}),y +sta ({z1}),y +//FRAGMENT vwuz1=_deref_pwuz2_ror_8 +ldy #1 +lda ({z2}),y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_bxor_vwuc2 +ldy #{c1} +lda #<{c2} +eor ({z1}),y +sta ({z1}),y +iny +lda #>{c2} +eor ({z1}),y +sta ({z1}),y +//FRAGMENT vwuz1=pwuz2_derefidx_vbuc1_ror_8 +ldy #{c1} +lda #0 +sta {z1}+1 +iny +lda ({z2}),y +sta {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 pwuz1_derefidx_vbuc1=vbuz2 +lda {z2} +ldy #{c1} +sta ({z1}),y +lda #0 +iny +sta ({z1}),y +//FRAGMENT vbuz1=_hi_pvoz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=_lo_pvoz2 +lda {z2} +sta {z1} +//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 vwuz1_lt_vbuxx_then_la1 +lda {z1}+1 +bne !+ +stx $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 pbuc1_derefidx_vbuaa=_byte_vwuz1 +tay +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=_byte_vwuz1 +lda {z1} +sta {c1},y +//FRAGMENT pwuz1_derefidx_vbuc1=vbuxx +txa +ldy #{c1} +sta ({z1}),y +lda #0 +iny +sta ({z1}),y +//FRAGMENT pwuz1_derefidx_vbuc1=vbuyy +tya +ldy #{c1} +sta ({z1}),y +lda #0 +iny +sta ({z1}),y +//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 vbuaa=vbuz1_minus_2 +lda {z1} +sec +sbc #2 +//FRAGMENT vbuxx=vbuz1_minus_2 +ldx {z1} +dex +dex +//FRAGMENT vbuyy=vbuz1_minus_2 +ldy {z1} +dey +dey +//FRAGMENT vbuyy=_hi_pvoz1 +ldy {z1}+1 +//FRAGMENT vbuyy=_lo_pvoz1 +ldy {z1} +//FRAGMENT vwuz1=_deref_pwuz1_ror_8 +ldy #1 +lda ({z1}),y +sta {z1} +dey +sty {z1}+1 +//FRAGMENT vwuz1=pwuz1_derefidx_vbuc1_ror_8 +ldy #{c1} +iny +lda ({z1}),y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT _deref_pbuz1=vbum2 +lda {m2} +ldy #0 +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbum1=vbuc2 +lda #{c2} +ldy {m1} +sta {c1},y +//FRAGMENT vbuz1=vbum2 +lda {m2} +sta {z1} +//FRAGMENT vbuaa=vbum1 +lda {m1} +//FRAGMENT vbuxx=vbum1 +ldx {m1} +//FRAGMENT vbuyy=vbum1 +ldy {m1} +//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuz2 +ldy {z2} +lda {c2},y +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pbuz1_derefidx_vbuz2=_byte_vwuz3 +lda {z3} +ldy {z2} +sta ({z1}),y +//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuaa +tay +lda {c2},y +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuxx +lda {c2},x +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_plus_pbuc2_derefidx_vbuyy +lda {c2},y +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pbuz1_derefidx_vbuxx=_byte_vwuz2 +txa +tay +lda {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=_byte_vwuz2 +lda {z2} +sta ({z1}),y +//FRAGMENT vbuz1=vbuz2_bor__hi_vwuz3 +lda {z2} +ora {z3}+1 +sta {z1} +//FRAGMENT vbuz1=vbuz1_bor_vbuaa +ora {z1} +sta {z1} +//FRAGMENT pbuz1_ge_pbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc !+ +bne {la1} +lda {z1} +cmp #<{c1} +bcs {la1} +!: +//FRAGMENT vbuz1=_deref_pbuc1_ror_1 +lda {c1} +lsr +sta {z1} +//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuz2_then_la1 +ldy {z2} +lda {c1}+1,y +cmp {z1}+1 +bne !+ +lda {c1},y +cmp {z1} +beq {la1} +!: +bcc {la1} +//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT _deref_qbuc1=_inc__deref_qbuc1 +inc {c1} +bne !+ +inc {c1}+1 +!: +//FRAGMENT vbuaa=_deref_pbuc1_ror_1 +lda {c1} +lsr +//FRAGMENT vbuxx=_deref_pbuc1_ror_1 +lda {c1} +lsr +tax +//FRAGMENT vbuyy=_deref_pbuc1_ror_1 +lda {c1} +lsr +tay +//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuaa_then_la1 +tay +lda {c1}+1,y +cmp {z1}+1 +bne !+ +lda {c1},y +cmp {z1} +beq {la1} +!: +bcc {la1} +//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuxx_then_la1 +lda {c1}+1,x +cmp {z1}+1 +bne !+ +lda {c1},x +cmp {z1} +beq {la1} +!: +bcc {la1} +//FRAGMENT vwuz1_ge_pwuc1_derefidx_vbuyy_then_la1 +lda {c1}+1,y +cmp {z1}+1 +bne !+ +lda {c1},y +cmp {z1} +beq {la1} +!: +bcc {la1} +//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuaa +tay +lda {c2},y +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuxx +lda {c2},x +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT _deref_(_deref_qbuc1)=pbuc2_derefidx_vbuyy +lda {c2},y +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT _deref_pwuz1=vbuz2 +lda {z2} +ldy #0 +sta ({z1}),y +tya +iny +sta ({z1}),y +//FRAGMENT _deref_pwuz1=vbuaa +ldy #0 +sta ({z1}),y +tya +iny +sta ({z1}),y +//FRAGMENT _deref_pwuz1=vbuxx +txa +ldy #0 +sta ({z1}),y +tya +iny +sta ({z1}),y +//FRAGMENT _deref_pwuz1=vbuyy +tya +ldy #0 +sta ({z1}),y +tya +iny +sta ({z1}),y +//FRAGMENT vboz1=vboc1 +lda #{c1} +sta {z1} +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz3_derefidx_vbuz4 +ldy {z4} +lda ({z3}),y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuz2_derefidx_vbuz3 +ldy {z3} +sta $ff +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz2_derefidx_vbuz3 +ldy {z3} +stx $ff +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz2_derefidx_vbuz3 +sty $ff + +ldy {z3} +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz3_derefidx_vbuaa +tay +lda ({z3}),y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz2_derefidx_vbuaa +stx $ff +tay +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz2_derefidx_vbuaa +sty $ff + +tay +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz3_derefidx_vbuxx +txa +tay +lda ({z3}),y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuz2_derefidx_vbuxx +sta $ff +txa +tay +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuyy=pbuz2_derefidx_vbuxx +sty $ff + +txa +tay +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuz2=pbuz3_derefidx_vbuyy +lda ({z3}),y +ldy {z2} +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuaa=pbuz2_derefidx_vbuyy +sta $ff +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuxx=pbuz2_derefidx_vbuyy +stx $ff +lda ({z2}),y +ldy $ff +sta ({z1}),y +//FRAGMENT vbsz1=vbsaa_rol_1 +asl +sta {z1} +//FRAGMENT vbsaa=vbsaa_rol_1 +asl +//FRAGMENT vbsxx=vbsaa_rol_1 +asl +tax +//FRAGMENT vbsyy=vbsaa_rol_1 +asl +tay +//FRAGMENT pwsz1=pwsc1_plus_vbuz2 +lda {z2} +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pwsc1_derefidx_vbuz1=_deref_pwsz2 +ldx {z1} +ldy #0 +lda ({z2}),y +sta {c1},x +iny +lda ({z2}),y +sta {c1}+1,x +//FRAGMENT pwsz1=pwsc1_plus_vbuaa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pwsz1=pwsc1_plus_vbuxx +txa +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pwsz1=pwsc1_plus_vbuyy +tya +clc +adc #<{c1} +sta {z1} +lda #>{c1} +adc #0 +sta {z1}+1 +//FRAGMENT pwsc1_derefidx_vbuaa=_deref_pwsz1 +tax +ldy #0 +lda ({z1}),y +sta {c1},x +iny +lda ({z1}),y +sta {c1}+1,x +//FRAGMENT pwsc1_derefidx_vbuxx=_deref_pwsz1 +ldy #0 +lda ({z1}),y +sta {c1},x +iny +lda ({z1}),y +sta {c1}+1,x +//FRAGMENT pwsc1_derefidx_vbuyy=_deref_pwsz1 +tya +tax +ldy #0 +lda ({z1}),y +sta {c1},x +iny +lda ({z1}),y +sta {c1}+1,x +//FRAGMENT vbuz1=_hi_pwuc1_derefidx_vbuyy +lda {c1}+1,y +sta {z1} +//FRAGMENT vbuaa=_hi_pwuc1_derefidx_vbuyy +lda {c1}+1,y +//FRAGMENT vbuxx=_hi_pwuc1_derefidx_vbuyy +lda {c1}+1,y +tax +//FRAGMENT vbuyy=_hi_pwuc1_derefidx_vbuyy +lda {c1}+1,y +tay +//FRAGMENT vbuz1=_lo_pwsc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +//FRAGMENT vbuz1=_hi_pwsc1_derefidx_vbuz2 +ldy {z2} +lda {c1}+1,y +sta {z1} +//FRAGMENT vbuaa=_lo_pwsc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +//FRAGMENT vbuxx=_lo_pwsc1_derefidx_vbuz1 +ldx {z1} +lda {c1},x +tax +//FRAGMENT vbuyy=_lo_pwsc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +tay +//FRAGMENT vbuz1=_lo_pwsc1_derefidx_vbuxx +lda {c1},x +sta {z1} +//FRAGMENT vbuaa=_lo_pwsc1_derefidx_vbuxx +lda {c1},x +//FRAGMENT vbuxx=_lo_pwsc1_derefidx_vbuxx +lda {c1},x +tax +//FRAGMENT vbuyy=_lo_pwsc1_derefidx_vbuxx +lda {c1},x +tay +//FRAGMENT vbuz1=_lo_pwsc1_derefidx_vbuyy +lda {c1},y +sta {z1} +//FRAGMENT vbuaa=_lo_pwsc1_derefidx_vbuyy +lda {c1},y +//FRAGMENT vbuxx=_lo_pwsc1_derefidx_vbuyy +lda {c1},y +tax +//FRAGMENT vbuyy=_lo_pwsc1_derefidx_vbuyy +lda {c1},y +tay +//FRAGMENT vbuaa=_hi_pwsc1_derefidx_vbuz1 +ldy {z1} +lda {c1}+1,y +//FRAGMENT vbuxx=_hi_pwsc1_derefidx_vbuz1 +ldx {z1} +lda {c1}+1,x +tax +//FRAGMENT vbuyy=_hi_pwsc1_derefidx_vbuz1 +ldy {z1} +lda {c1}+1,y +tay +//FRAGMENT vbuz1=_hi_pwsc1_derefidx_vbuxx +lda {c1}+1,x +sta {z1} +//FRAGMENT vbuaa=_hi_pwsc1_derefidx_vbuxx +lda {c1}+1,x +//FRAGMENT vbuxx=_hi_pwsc1_derefidx_vbuxx +lda {c1}+1,x +tax +//FRAGMENT vbuyy=_hi_pwsc1_derefidx_vbuxx +lda {c1}+1,x +tay +//FRAGMENT vbuz1=_hi_pwsc1_derefidx_vbuyy +lda {c1}+1,y +sta {z1} +//FRAGMENT vbuaa=_hi_pwsc1_derefidx_vbuyy +lda {c1}+1,y +//FRAGMENT vbuxx=_hi_pwsc1_derefidx_vbuyy +lda {c1}+1,y +tax +//FRAGMENT vbuyy=_hi_pwsc1_derefidx_vbuyy +lda {c1}+1,y +tay +//FRAGMENT vwuc1_le_vwuc2_then_la1 +lda #>{c1} +cmp #>{c2} +bne !+ +lda #<{c1} +cmp #<{c2} +beq {la1} +!: +bcc {la1} +//FRAGMENT _deref_pboc1=vboc2 +lda #{c2} +sta {c1} +//FRAGMENT _deref_pboc1_then_la1 +lda {c1} +cmp #0 +bne {la1} +//FRAGMENT pbuz1_derefidx_vbuc1=_byte_vwuz2 +ldy #{c1} +lda {z2} +sta ({z1}),y +//FRAGMENT pssz1=pssc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pssz1=_deref_pssz2_memcpy_vbuc1 +ldy #00 +!: +lda ({z2}),y +sta ({z1}),y +iny +cpy #{c1} +bne !- +//FRAGMENT pssz1=pssc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pbuc1=_deref_pbuc1_plus_vbuc2 +lda #{c2} +clc +adc {c1} +sta {c1} +//FRAGMENT pssz1=pssz2_plus_vbuc1 +lda #{c1} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pssz1_lt_pssc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vbuz1_lt__deref_pbuc1_then_la1 +lda {z1} +cmp {c1} +bcc {la1} +//FRAGMENT pwuc1_derefidx_vbuz1=(_deref_qwuc2)_derefidx_vbuz1 +ldy {z1} +lda {c2} +sta $fe +lda {c2}+1 +sta $ff +lda ($fe),y +sta {c1},y +iny +lda ($fe),y +sta {c1},y +//FRAGMENT vbuaa_lt__deref_pbuc1_then_la1 +cmp {c1} +bcc {la1} +//FRAGMENT pwuc1_derefidx_vbuaa=(_deref_qwuc2)_derefidx_vbuaa +tay +lda {c2} +sta $fe +lda {c2}+1 +sta $ff +lda ($fe),y +sta {c1},y +iny +lda ($fe),y +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuxx=(_deref_qwuc2)_derefidx_vbuxx +txa +tay +lda {c2} +sta $fe +lda {c2}+1 +sta $ff +lda ($fe),y +sta {c1},y +iny +lda ($fe),y +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuyy=(_deref_qwuc2)_derefidx_vbuyy +lda {c2} +sta $fe +lda {c2}+1 +sta $ff +lda ($fe),y +sta {c1},y +iny +lda ($fe),y +sta {c1},y +//FRAGMENT vbuxx_lt__deref_pbuc1_then_la1 +cpx {c1} +bcc {la1} +//FRAGMENT (_deref_qbuc1)_derefidx_vbuc2=vbuc3 +lda #{c3} +ldy #{c2} +ldx {c1} +stx $fe +ldx {c1}+1 +stx $ff +sta ($fe),y +//FRAGMENT pssz1_neq_pssc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT pssz1=pssz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=(_deref_qwuc1)_derefidx_vbuc2 +ldy #{c2} +lda {c1} +sta $fe +lda {c1}+1 +sta $ff +lda ($fe),y +sta {z1} +iny +lda ($fe),y +sta {z1}+1 +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_(_deref_pbuz2) +ldy #0 +lda ({z2}),y +tay +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_(_deref_pbuz1) +ldy #0 +lda ({z1}),y +tay +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_(_deref_pbuz1) +tax +ldy #0 +lda ({z1}),y +tay +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_(_deref_pbuz1) +tya +tax +ldy #0 +lda ({z1}),y +tay +lda {c2},y +sta {c1},x +//FRAGMENT vboaa=vboc1 +lda #{c1} +//FRAGMENT vboxx=vboc1 +lda #{c1} +tax +//FRAGMENT vboyy=vboc1 +lda #{c1} +tay +//FRAGMENT vbuyy_neq_vbuaa_then_la1 +tax +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vwuz1=_deref_pbuz2_word__deref_pbuz3 +ldy #0 +lda ({z3}),y +sta {z1} +lda ({z2}),y +sta {z1}+1 +//FRAGMENT vbuz1=_deref_pbuc1_plus_2 +lda {c1} +clc +adc #2 +sta {z1} +//FRAGMENT vbuaa=_deref_pbuc1_plus_2 +lda {c1} +clc +adc #2 +//FRAGMENT vbuxx=_deref_pbuc1_plus_2 +ldx {c1} +inx +inx +//FRAGMENT vbuyy=_deref_pbuc1_plus_2 +ldy {c1} +iny +iny +//FRAGMENT _deref_pbuz1=_byte_vwsz2 +lda {z2} +ldy #0 +sta ({z1}),y +//FRAGMENT vduz1=vduz2_plus_vduz1 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +lda {z1}+2 +adc {z2}+2 +sta {z1}+2 +lda {z1}+3 +adc {z2}+3 +sta {z1}+3 +//FRAGMENT vbuz1=vbuxx_band_pbuz2_derefidx_vbuc1 +ldy #{c1} +txa +and ({z2}),y +sta {z1} +//FRAGMENT vbuaa=vbuxx_band_pbuz1_derefidx_vbuc1 +ldy #{c1} +txa +and ({z1}),y +//FRAGMENT vbuxx=vbuxx_band_pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +axs #0 +//FRAGMENT vbuyy=vbuxx_band_pbuz1_derefidx_vbuc1 +ldy #{c1} +txa +and ({z1}),y +tay +//FRAGMENT pbuz1=pbuz1_plus_vbuz2 +lda {z2} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT _deref_pbuc1_eq_vbuc2_then_la1 +lda #{c2} +cmp {c1} +beq {la1} +//FRAGMENT vbsz1=vbsz2_ror_1 +lda {z2} +cmp #$80 +ror +sta {z1} +//FRAGMENT vbsaa=vbsz1_ror_1 +lda {z1} +cmp #$80 +ror +//FRAGMENT vbsxx=vbsz1_ror_1 +lda {z1} +cmp #$80 +ror +tax +//FRAGMENT vbsyy=vbsz1_ror_1 +lda {z1} +cmp #$80 +ror +tay +//FRAGMENT vbsz1=vbsaa_ror_1 +cmp #$80 +ror +sta {z1} +//FRAGMENT vbsaa=vbsaa_ror_1 +cmp #$80 +ror +//FRAGMENT vbsxx=vbsaa_ror_1 +cmp #$80 +ror +tax +//FRAGMENT vbsyy=vbsaa_ror_1 +cmp #$80 +ror +tay +//FRAGMENT vbsz1=vbsxx_ror_1 +txa +cmp #$80 +ror +sta {z1} +//FRAGMENT vbsaa=vbsxx_ror_1 +txa +cmp #$80 +ror +//FRAGMENT vbsxx=vbsxx_ror_1 +txa +cmp #$80 +ror +tax +//FRAGMENT vbsyy=vbsxx_ror_1 +txa +cmp #$80 +ror +tay +//FRAGMENT vbsz1=vbsyy_ror_1 +tya +cmp #$80 +ror +sta {z1} +//FRAGMENT vbsaa=vbsyy_ror_1 +tya +cmp #$80 +ror +//FRAGMENT vbsxx=vbsyy_ror_1 +tya +cmp #$80 +ror +tax +//FRAGMENT vbsyy=vbsyy_ror_1 +tya +cmp #$80 +ror +tay +//FRAGMENT vbuz1=_neg_vbuyy +dey +tya +eor #$ff +sta {z1} +//FRAGMENT vbuaa=_neg_vbuyy +dey +tya +eor #$ff +//FRAGMENT vbuxx=_neg_vbuyy +tya +eor #$ff +tax +inx +//FRAGMENT vbuz1=vbuz2_band_vbuz3 +lda {z2} +and {z3} +sta {z1} +//FRAGMENT vbuz1=vbuaa_band_vbuz2 +and {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_band_vbuz2 +lda {z2} +sax {z1} +//FRAGMENT vbuz1=vbuyy_band_vbuz2 +tya +and {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_band_vbuxx +lda {z2} +sax {z1} +//FRAGMENT vbuz1=vbuaa_band_vbuxx +sax {z1} +//FRAGMENT vbuaa=vbuz1_band_vbuz2 +lda {z1} +and {z2} +//FRAGMENT vbuaa=vbuaa_band_vbuz1 +and {z1} +//FRAGMENT vbuaa=vbuxx_band_vbuz1 +txa +and {z1} +//FRAGMENT vbuaa=vbuyy_band_vbuz1 +tya +and {z1} +//FRAGMENT vbuxx=vbuz1_band_vbuz2 +lda {z1} +and {z2} +tax +//FRAGMENT vbuxx=vbuaa_band_vbuz1 +ldx {z1} +axs #0 +//FRAGMENT vbuxx=vbuxx_band_vbuz1 +lda {z1} +axs #0 +//FRAGMENT vbuxx=vbuyy_band_vbuz1 +ldx {z1} +tya +axs #0 +//FRAGMENT vbuyy=vbuz1_band_vbuz2 +lda {z1} +and {z2} +tay +//FRAGMENT vbuyy=vbuaa_band_vbuz1 +and {z1} +tay +//FRAGMENT vbuyy=vbuxx_band_vbuz1 +txa +and {z1} +tay +//FRAGMENT vbuyy=vbuyy_band_vbuz1 +tya +and {z1} +tay +//FRAGMENT vdsz1=vdsz2_rol_4 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vwuz1=vbuc1_plus__hi_vdsz2 +NO_SYNTHESIS +//FRAGMENT vwuz1=vwuc1_plus__hi_vdsz2 +clc +lda #<{c1} +adc {z2}+2 +sta {z1} +lda #>{c1} +adc {z2}+3 +sta {z1}+1 +//FRAGMENT vwuz1=vbsc1_plus__hi_vdsz2 +NO_SYNTHESIS +//FRAGMENT vwuz1=vwuz2_minus_vwuz1 +lda {z2} +sec +sbc {z1} +sta {z1} +lda {z2}+1 +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vdsz1=vdsz1_rol_4 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vwsz1=vwsz2_ror_2 +lda {z2}+1 +cmp #$80 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lda {z1}+1 +cmp #$80 +ror {z1}+1 +ror {z1} +//FRAGMENT vwsz1=vbsc1_plus_vwsz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_plus_vbuz2 +clc +lda {z1} +adc {z2} +sta {z1} +lda {z1}+1 +adc #0 +sta {z1}+1 +//FRAGMENT vwsz1=vwsc1_plus_vwsz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vbsc1_plus_vwsz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwuz1=_word_pbuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_pbuc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_pbuc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_pbuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT pbuz1_ge_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc !+ +bne {la1} +lda {z1} +cmp #<{c1} +bcs {la1} +!: +//FRAGMENT pbuc1_derefidx_vbuz1=vbum2 +lda {m2} +ldy {z1} +sta {c1},y +//FRAGMENT vbum1=vbum1_plus_vbuz2 +lda {m1} +clc +adc {z2} +sta {m1} +//FRAGMENT pbuc1_derefidx_vbuaa=vbum1 +tay +lda {m1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=vbum1 +lda {m1} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbum1 +lda {m1} +sta {c1},y +//FRAGMENT vbum1=vbum1_plus_vbuxx +txa +clc +adc {m1} +sta {m1} +//FRAGMENT vbum1=vbum1_plus_vbuyy +tya +clc +adc {m1} +sta {m1} +//FRAGMENT pbuc1_derefidx_vbuz1=_deref_pbuc2 +lda {c2} +ldy {z1} +sta {c1},y +//FRAGMENT _deref_pbuc1=_deref_pbuc1_plus_vbuz1 +lda {c1} +clc +adc {z1} +sta {c1} +//FRAGMENT pbuc1_derefidx_vbuaa=_deref_pbuc2 +tay +lda {c2} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=_deref_pbuc2 +lda {c2} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=_deref_pbuc2 +lda {c2} +sta {c1},y +//FRAGMENT _deref_pbuc1=_deref_pbuc1_plus_vbuxx +txa +clc +adc {c1} +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_plus_vbuyy +tya +clc +adc {c1} +sta {c1} +//FRAGMENT pbum1=pbum1_plus_vbuc1 +lda #{c1} +clc +adc {m1} +sta {m1} +bcc !+ +inc {m1}+1 +!: +//FRAGMENT vwsz1=vwsz1_plus_vbsz2 +lda {z2} +pha +clc +adc {z1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_plus_vbsaa +pha +clc +adc {z1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_plus_vbsxx +txa +pha +clc +adc {z1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_plus_vbsyy +tya +pha +clc +adc {z1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z1}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_sethi_vbuz2 +lda {z2} +sta {z1}+1 +lda #<{c1} +sta {z1} +//FRAGMENT pbuz1=pbuz2_setlo_vbuz3 +lda {z3} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_sethi_vbuz2 +lda {z2} +sta {z1}+1 +lda #<{c1} +sta {z1} +//FRAGMENT vwuz1=vwuz2_setlo_vbuz3 +lda {z3} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_sethi_vbuaa +sta {z1}+1 +lda #<{c1} +sta {z1} +//FRAGMENT pbuz1=pbuc1_sethi_vbuxx +stx {z1}+1 +ldx #<{c1} +stx {z1} +//FRAGMENT pbuz1=pbuz2_setlo_vbuaa +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_setlo_vbuxx +stx {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_setlo_vbuyy +sty {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuc1_sethi_vbuaa +sta {z1}+1 +lda #<{c1} +sta {z1} +//FRAGMENT vwuz1=vwuc1_sethi_vbuxx +stx {z1}+1 +ldx #<{c1} +stx {z1} +//FRAGMENT vwuz1=vwuz2_setlo_vbuaa +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_setlo_vbuxx +stx {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_setlo_vbuyy +sty {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_sethi_vbuyy +sty {z1}+1 +ldy #<{c1} +sty {z1} +//FRAGMENT vwuz1=vwuc1_sethi_vbuyy +sty {z1}+1 +ldy #<{c1} +sty {z1} +//FRAGMENT pbuz1=pbuz1_setlo_vbuaa +sta {z1} +//FRAGMENT vwuz1=vwuz1_setlo_vbuaa +sta {z1} +//FRAGMENT vdsz1=vdsc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +lda #<{c1}>>$10 +sta {z1}+2 +lda #>{c1}>>$10 +sta {z1}+3 +//FRAGMENT vdsz1_lt_0_then_la1 +lda {z1}+3 +bmi {la1} +//FRAGMENT vdsz1=_neg_vdsz1 +sec +lda {z1} +eor #$ff +adc #$0 +sta {z1} +lda {z1}+1 +eor #$ff +adc #$0 +sta {z1}+1 +lda {z1}+2 +eor #$ff +adc #$0 +sta {z1}+2 +lda {z1}+3 +eor #$ff +adc #$0 +sta {z1}+3 +//FRAGMENT pwsc1_derefidx_vbuz1_ge_vwsz2_then_la1 +ldy {z1} +lda {c1},y +cmp {z2} +lda {c1}+1,y +sbc {z2}+1 +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT vbuz1=_lo_pwsc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +//FRAGMENT vbuaa=_lo_pwsc1_derefidx_vbuaa +tay +lda {c1},y +//FRAGMENT vbuxx=_lo_pwsc1_derefidx_vbuaa +tax +lda {c1},x +tax +//FRAGMENT vbuyy=_lo_pwsc1_derefidx_vbuaa +tay +lda {c1},y +tay +//FRAGMENT pwsc1_derefidx_vbuaa_ge_vwsz1_then_la1 +tay +lda {c1},y +cmp {z1} +lda {c1}+1,y +sbc {z1}+1 +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT pwsc1_derefidx_vbuxx_ge_vwsz1_then_la1 +lda {c1},x +cmp {z1} +lda {c1}+1,x +sbc {z1}+1 +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT pwsc1_derefidx_vbuyy_ge_vwsz1_then_la1 +lda {c1},y +cmp {z1} +lda {c1}+1,y +sbc {z1}+1 +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT pbuz1_derefidx_vbuz2=vbuz2 +lda {z2} +tay +sta ({z1}),y +//FRAGMENT pbuz1=pbuz2_minus_vbuc1 +sec +lda {z2} +sbc #{c1} +sta {z1} +lda {z2}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT _deref_qssz1=pssz2 +ldy #0 +lda {z2} +sta ({z1}),y +iny +lda {z2}+1 +sta ({z1}),y +//FRAGMENT vwuz1=vwuz1_plus_pwuz2_derefidx_vbuc1 +ldy #{c1} +clc +lda {z1} +adc ({z2}),y +sta {z1} +iny +lda {z1}+1 +adc ({z2}),y +sta {z1}+1 +//FRAGMENT pssz1=_deref_qssz1 +ldy #0 +lda ({z1}),y +pha +iny +lda ({z1}),y +sta {z1}+1 +pla +sta {z1} +//FRAGMENT _deref_pbuz1_eq__deref_pbuz2_then_la1 +ldy #0 +lda ({z1}),y +ldy #0 +cmp ({z2}),y +beq {la1} +//FRAGMENT vbsz1_le_0_then_la1 +lda {z1} +cmp #1 +bmi {la1} +//FRAGMENT vwsz1=vwsz1_minus_vbsz2 +lda {z2} +sta $fe +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +sec +lda {z1} +sbc $fe +sta {z1} +lda {z1}+1 +sbc $ff +sta {z1}+1 +//FRAGMENT vbsaa_le_0_then_la1 +cmp #1 +bmi {la1} +//FRAGMENT vbsaa_neq_vbsz1_then_la1 +cmp {z1} +bne {la1} +//FRAGMENT vwsz1=vwsz1_minus_vbsxx +txa +sta $fe +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +sec +lda {z1} +sbc $fe +sta {z1} +lda {z1}+1 +sbc $ff +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_minus_vbsyy +tya +sta $fe +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +sec +lda {z1} +sbc $fe +sta {z1} +lda {z1}+1 +sbc $ff +sta {z1}+1 +//FRAGMENT vbsyy_neq_vbsc1_then_la1 +cpy #{c1} +bne {la1} +//FRAGMENT vbsxx_le_0_then_la1 +cpx #1 +bmi {la1} +//FRAGMENT vbsyy_neq_vbsz1_then_la1 +cpy {z1} +bne {la1} +//FRAGMENT vbsyy_neq_vbsxx_then_la1 +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vbsyy_le_0_then_la1 +cpy #1 +bmi {la1} +//FRAGMENT vbsz1_neq_vbsyy_then_la1 +cpy {z1} +bne {la1} +//FRAGMENT vbsxx_neq_vbsyy_then_la1 +stx $ff +cpy $ff +bne {la1} +//FRAGMENT vbuc1_neq_vwuz1_then_la1 +NO_SYNTHESIS +//FRAGMENT vbsc1_neq_vwuz1_then_la1 +NO_SYNTHESIS +//FRAGMENT vwuc1_neq_vwuz1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vbuz1=vbuz1_bor_pbuc1_derefidx_vbuz2 +lda {z1} +ldy {z2} +ora {c1},y +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuz3 +ldy {z2} +lda {c1},y +ldy {z3} +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc1_derefidx_vbuz3 +ldy {z2} +lda {c1},y +ldy {z3} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuxx=vbuxx_bor_pbuc1_derefidx_vbuz1 +txa +ldx {z1} +ora {c1},x +tax +//FRAGMENT vbuyy=vbuyy_bor_pbuc1_derefidx_vbuz1 +tya +ldy {z1} +ora {c1},y +tay +//FRAGMENT vbuz1=vbuz1_bor_pbuc1_derefidx_vbuxx +lda {c1},x +ora {z1} +sta {z1} +//FRAGMENT vbuxx=vbuxx_bor_pbuc1_derefidx_vbuxx +txa +ora {c1},x +tax +//FRAGMENT vbuyy=vbuyy_bor_pbuc1_derefidx_vbuxx +tya +ora {c1},x +tay +//FRAGMENT vbuz1=vbuz1_bor_pbuc1_derefidx_vbuyy +lda {c1},y +ora {z1} +sta {z1} +//FRAGMENT vbuxx=vbuxx_bor_pbuc1_derefidx_vbuyy +txa +ora {c1},y +tax +//FRAGMENT vbuyy=vbuyy_bor_pbuc1_derefidx_vbuyy +tya +ora {c1},y +tay +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz2 +ldy {z1} +lda {c1},y +ldy {z2} +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz2 +ldx {z1} +lda {c1},x +ldx {z2} +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz2 +ldy {z1} +lda {c1},y +ldy {z2} +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuz2 +tay +lda {c1},y +ldy {z2} +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuz1 +tay +lda {c1},y +ldy {z1} +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuz1 +tax +lda {c1},x +ldx {z1} +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuz1 +tay +lda {c1},y +ldy {z1} +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz2 +lda {c1},x +ldy {z2} +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz1 +lda {c1},x +ldy {z1} +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz1 +lda {c1},x +ldx {z1} +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuz1 +lda {c1},x +ldy {z1} +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz2 +lda {c1},y +ldy {z2} +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz1 +lda {c1},y +ldy {z1} +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz1 +lda {c1},y +ldx {z1} +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuz1 +lda {c1},y +ldy {z1} +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuxx +lda {c2},x +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuxx +lda {c2},x +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuxx +lda {c2},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuxx +lda {c2},x +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuxx +tay +lda {c1},y +clc +adc {c2},x +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuxx +tay +lda {c1},y +clc +adc {c2},x +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuxx +tay +lda {c1},y +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuxx +tay +lda {c1},y +clc +adc {c2},x +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx +lda {c1},x +clc +adc {c2},x +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx +lda {c1},x +clc +adc {c2},x +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx +lda {c1},x +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx +lda {c1},x +clc +adc {c2},x +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx +lda {c1},y +clc +adc {c2},x +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx +lda {c1},y +clc +adc {c2},x +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx +lda {c1},y +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuxx +lda {c1},y +clc +adc {c2},x +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuyy +lda {c2},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuyy +lda {c2},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuyy +lda {c2},y +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuyy +lda {c2},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c2},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy +lda {c1},x +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy +lda {c1},x +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy +lda {c1},x +clc +adc {c2},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuyy +lda {c1},x +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy +lda {c1},y +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy +lda {c1},y +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy +lda {c1},y +clc +adc {c2},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy +lda {c1},y +clc +adc {c2},y +tay +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 +ldy {z1} +lda {c1},y +ldy {z2} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 +ldx {z1} +lda {c1},x +ldx {z2} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuz2 +ldy {z1} +lda {c1},y +ldy {z2} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuz2 +tay +lda {c1},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuz1 +tay +lda {c1},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuz1 +tax +lda {c1},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuz1 +tay +lda {c1},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuz2 +lda {c1},x +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuz1 +lda {c1},x +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuz1 +lda {c1},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuz1 +lda {c1},x +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuz2 +lda {c1},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuz1 +lda {c1},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuz1 +lda {c1},y +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuz1 +lda {c1},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuaa +tax +lda {c1},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuaa +tax +lda {c1},x +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},y +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},x +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},x +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},x +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuaa +tay +lda {c1},x +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuaa +tax +lda {c1},x +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuaa +tax +lda {c1},x +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuaa +tax +lda {c1},x +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuaa +tax +lda {c1},x +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc1_derefidx_vbuxx +lda {c1},x +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuxx +lda {c1},x +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuxx +tay +lda {c1},x +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuxx +tay +lda {c1},x +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuxx +tay +lda {c1},x +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuxx +tay +lda {c1},x +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},x +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},x +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},x +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuxx +lda {c1},x +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc1_derefidx_vbuyy +lda {c1},y +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +ldy {z1} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +ldx {z1} +clc +adc {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc1_derefidx_vbuyy +lda {c1},y +ldy {z1} +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc1_derefidx_vbuyy +tax +lda {c1},x +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuyy +lda {c1},x +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuyy +lda {c1},x +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuyy +lda {c1},x +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_plus_pbuc1_derefidx_vbuyy +lda {c1},x +clc +adc {c1},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc1_derefidx_vbuyy +lda {c1},y +clc +adc {c1},y +tay +//FRAGMENT vbuaa_le_vbuxx_then_la1 +tay +sty $ff +cpx $ff +bcs {la1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_pbuc2_derefidx_vbuz2 +ldy {z2} +lda {c1},y +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c1},y +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz1 +ldx {z1} +lda {c1},x +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c1},y +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa +tay +lda {c1},y +clc +adc {c2},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa +tay +lda {c1},y +clc +adc {c2},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa +tax +lda {c1},x +clc +adc {c2},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa +tay +lda {c1},y +clc +adc {c2},y +tay +//FRAGMENT vbuz1=pbuz2_derefidx_(pbuz3_derefidx_vbuz4)_plus_pbuz5_derefidx_(pbuz6_derefidx_vbuz4) +ldy {z4} +lda ({z6}),y +sta $ff +lda ({z3}),y +tay +lda ({z2}),y +ldy $ff +clc +adc ({z5}),y +sta {z1} +//FRAGMENT vbuz1=vbuz1_bor_pbuc1_derefidx_vbuaa +tay +lda {c1},y +ora {z1} +sta {z1} +//FRAGMENT vbuxx=vbuxx_bor_pbuc1_derefidx_vbuaa +tay +txa +ora {c1},y +tax +//FRAGMENT vbuyy=vbuyy_bor_pbuc1_derefidx_vbuaa +tax +tya +ora {c1},x +tay +//FRAGMENT vbuaa=pbuz1_derefidx_(pbuz2_derefidx_vbuz3)_plus_pbuz4_derefidx_(pbuz5_derefidx_vbuz3) +ldy {z3} +lda ({z5}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z4}),y +//FRAGMENT vbuxx=pbuz1_derefidx_(pbuz2_derefidx_vbuz3)_plus_pbuz4_derefidx_(pbuz5_derefidx_vbuz3) +ldy {z3} +lda ({z5}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z4}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_(pbuz2_derefidx_vbuz3)_plus_pbuz4_derefidx_(pbuz5_derefidx_vbuz3) +ldy {z3} +lda ({z5}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z4}),y +tay +//FRAGMENT vbuz1=pbuz2_derefidx_(pbuz3_derefidx_vbuaa)_plus_pbuz4_derefidx_(pbuz5_derefidx_vbuaa) +tay +lda ({z5}),y +sta $ff +lda ({z3}),y +tay +lda ({z2}),y +ldy $ff +clc +adc ({z4}),y +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_(pbuz2_derefidx_vbuaa)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuaa) +tay +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +//FRAGMENT vbuxx=pbuz1_derefidx_(pbuz2_derefidx_vbuaa)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuaa) +tay +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_(pbuz2_derefidx_vbuaa)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuaa) +tay +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +tay +//FRAGMENT vbuz1=pbuz2_derefidx_(pbuz3_derefidx_vbuxx)_plus_pbuz4_derefidx_(pbuz5_derefidx_vbuxx) +txa +tay +lda ({z5}),y +sta $ff +lda ({z3}),y +tay +lda ({z2}),y +ldy $ff +clc +adc ({z4}),y +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_(pbuz2_derefidx_vbuxx)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuxx) +txa +tay +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +//FRAGMENT vbuxx=pbuz1_derefidx_(pbuz2_derefidx_vbuxx)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuxx) +txa +tay +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_(pbuz2_derefidx_vbuxx)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuxx) +txa +tay +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +tay +//FRAGMENT vbuz1=pbuz2_derefidx_(pbuz3_derefidx_vbuyy)_plus_pbuz4_derefidx_(pbuz5_derefidx_vbuyy) +lda ({z5}),y +sta $ff +lda ({z3}),y +tay +lda ({z2}),y +ldy $ff +clc +adc ({z4}),y +sta {z1} +//FRAGMENT vbuaa=pbuz1_derefidx_(pbuz2_derefidx_vbuyy)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuyy) +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +//FRAGMENT vbuxx=pbuz1_derefidx_(pbuz2_derefidx_vbuyy)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuyy) +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_(pbuz2_derefidx_vbuyy)_plus_pbuz3_derefidx_(pbuz4_derefidx_vbuyy) +lda ({z4}),y +sta $ff +lda ({z2}),y +tay +lda ({z1}),y +ldy $ff +clc +adc ({z3}),y +tay +//FRAGMENT _deref_pbuc1=_deref_(_deref_qbuc2) +ldy {c2} +sty $fe +ldy {c2}+1 +sty $ff +ldy #0 +lda ($fe),y +sta {c1} +//FRAGMENT vbsz1_eq_vbsc1_then_la1 +lda #{c1} +cmp {z1} +beq {la1} +//FRAGMENT vbsc1_eq_vbsz1_then_la1 +lda #{c1} +cmp {z1} +beq {la1} +//FRAGMENT pbuz1=pbuz2_plus_vbsz3 +lda {z3} +pha +clc +adc {z2} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vbsaa_eq_vbsc1_then_la1 +cmp #{c1} +beq {la1} +//FRAGMENT vbsaa=vbsyy_minus_vbsaa +sta $ff +tya +sec +sbc $ff +//FRAGMENT vbsc1_eq_vbsaa_then_la1 +cmp #{c1} +beq {la1} +//FRAGMENT pbuz1=pbuz2_plus_vbsaa +pha +clc +adc {z2} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vbsxx +txa +pha +clc +adc {z2} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1=pbuz2_plus_vbsyy +tya +pha +clc +adc {z2} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vbsc1_eq_vbsxx_then_la1 +cpx #{c1} +beq {la1} +//FRAGMENT vbsxx_eq_vbsc1_then_la1 +cpx #{c1} +beq {la1} +//FRAGMENT vbsc1_eq_vbsyy_then_la1 +cpy #{c1} +beq {la1} +//FRAGMENT pbuz1=pbuz1_plus_vbsxx +txa +pha +clc +adc {z1} +sta {z1} +pla +ora #$7f +bmi !+ +lda #0 +!: +adc {z1}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_rol_2 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT _deref_pwsz1=vwsc1 +ldy #0 +lda #<{c1} +sta ({z1}),y +iny +lda #>{c1} +sta ({z1}),y +//FRAGMENT vwsz1=_deref_pwsz2_band_vwsc1 +ldy #0 +lda ({z2}),y +and #<{c1} +sta {z1} +iny +lda ({z2}),y +and #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=_hi__deref_pwsz2 +ldy #1 +lda ({z2}),y +sta {z1} +//FRAGMENT vbuaa=_hi__deref_pwsz1 +ldy #1 +lda ({z1}),y +//FRAGMENT vbuxx=_hi__deref_pwsz1 +ldy #1 +lda ({z1}),y +tax +//FRAGMENT vbuyy=_hi__deref_pwsz1 +ldy #1 +lda ({z1}),y +tay +//FRAGMENT pwsc1_derefidx_vbuz1=pwsc1_derefidx_vbuz1_minus_vbuz2 +ldx {z1} +sec +lda {c1},x +sbc {z2} +sta {c1},x +bcs !+ +dec {c1}+1,x +!: +//FRAGMENT pwsc1_derefidx_vbuz1=pwsc1_derefidx_vbuz1_minus_vbuxx +ldy {z1} +stx $ff +sec +lda {c1},y +sbc $ff +sta {c1},y +lda {c1}+1,y +sbc #0 +sta {c1},y +//FRAGMENT pwsc1_derefidx_vbuz1=pwsc1_derefidx_vbuz1_minus_vbuyy +tya +ldy {z1} +clc +sbc {c1},y +eor #$ff +sta {c1},y +bcc !+ +lda {c1}+1,y +sbc #$01 +sta {c1}+1,y +!: +//FRAGMENT pwsc1_derefidx_vbuaa=pwsc1_derefidx_vbuaa_minus_vbuz1 +tax +sec +lda {c1},x +sbc {z1} +sta {c1},x +bcs !+ +dec {c1}+1,x +!: +//FRAGMENT pwsc1_derefidx_vbuaa=pwsc1_derefidx_vbuaa_minus_vbuxx +sec +stx $ff +tax +lda {c1},x +sbc $ff +sta {c1},x +bcs !+ +dec {c1}+1,x +!: +//FRAGMENT pwsc1_derefidx_vbuaa=pwsc1_derefidx_vbuaa_minus_vbuyy +sec +sty $ff +tay +lda {c1},y +sbc $ff +sta {c1},y +lda {c1}+1,y +sbc #$00 +sta {c1}+1,y +//FRAGMENT pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vbuz1 +sec +lda {c1},x +sbc {z1} +sta {c1},x +bcs !+ +dec {c1}+1,x +!: +//FRAGMENT pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vbuxx +txa +clc +sbc {c1},x +eor #$ff +sta {c1},x +bcc !+ +lda {c1}+1,x +sbc #$01 +sta {c1}+1,x +!: +//FRAGMENT pwsc1_derefidx_vbuxx=pwsc1_derefidx_vbuxx_minus_vbuyy +tya +clc +sbc {c1},x +eor #$ff +sta {c1},x +bcc !+ +lda {c1}+1,x +sbc #$01 +sta {c1}+1,x +!: +//FRAGMENT pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vbuz1 +sec +lda {c1},y +sbc {z1} +sta {c1},y +lda {c1}+1,y +sbc #0 +sta {c1}+1,y +//FRAGMENT pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vbuxx +stx $ff +sec +lda {c1},y +sbc $ff +sta {c1},y +lda {c1}+1,y +sbc #0 +sta {c1},y +//FRAGMENT pwsc1_derefidx_vbuyy=pwsc1_derefidx_vbuyy_minus_vbuyy +tya +clc +sbc {c1},y +eor #$ff +sta {c1},y +bcc !+ +lda {c1}+1,y +sbc #$01 +sta {c1}+1,y +!: +//FRAGMENT pwuc1_derefidx_vbuaa=vbuc2 +tay +lda #{c2} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuz3 +ldx {z2} +ldy {z3} +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuz2 +ldy {z2} +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuz2 +ldx {z2} +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuaa +ldx {z2} +tay +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuaa +tay +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuaa +tax +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuxx +ldy {z2} +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuxx +txa +tay +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuxx +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc1_derefidx_vbuyy +ldx {z2} +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc1_derefidx_vbuyy +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuyy +tya +tax +clc +lda {c1},x +adc {c1},y +sta {z1} +lda {c1}+1,x +adc {c1}+1,y +sta {z1}+1 +//FRAGMENT vbuz1=vbuxx_plus_2 +inx +inx +stx {z1} +//FRAGMENT vbuz1=vbuyy_plus_2 +iny +iny +sty {z1} +//FRAGMENT vbuz1=_deref_pbuz2_plus__deref_pbuz3 +ldy #0 +lda ({z2}),y +clc +ldy #0 +adc ({z3}),y +sta {z1} +//FRAGMENT vbuaa=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +//FRAGMENT vbuxx=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1_plus__deref_pbuz2 +ldy #0 +lda ({z1}),y +clc +ldy #0 +adc ({z2}),y +tay +//FRAGMENT vwuz1=_deref_pwuz2_plus__deref_pwuz3 +ldy #0 +clc +lda ({z2}),y +adc ({z3}),y +sta {z1} +iny +lda ({z2}),y +adc ({z3}),y +sta {z1}+1 +//FRAGMENT vwuz1=_deref_pwuz2_plus__deref_pwuz1 +ldy #0 +clc +lda ({z1}),y +adc ({z2}),y +pha +iny +lda ({z1}),y +adc ({z2}),y +sta ({z1}),y +dey +pla +sta ({z1}),y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c1},y +clc +adc {c2},y +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_plus_vbuc2 +lda #{c2} +ldy {z1} +clc +adc {c1},y +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc1_derefidx_vbuaa_plus_pbuc2_derefidx_vbuaa +tax +tay +lda {c1},x +clc +adc {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_pbuc2_derefidx_vbuxx +lda {c1},x +clc +adc {c2},x +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_pbuc2_derefidx_vbuyy +lda {c1},y +clc +adc {c2},y +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_plus_vbuc2 +lda #{c2} +clc +adc {c1},x +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} +clc +adc {c1},y +sta {c1},y +//FRAGMENT _deref_pbuz1=_deref_pbuz1_plus_pbuz1_derefidx_vbuc1 +ldy #0 +lda ({z1}),y +ldy #{c1} +clc +adc ({z1}),y +ldy #0 +sta ({z1}),y +//FRAGMENT pbuz1_derefidx_vbuc1=pbuz1_derefidx_vbuc1_plus_vbuc2 +lda #{c2} +ldy #{c1} +clc +adc ({z1}),y +sta ({z1}),y +//FRAGMENT vbuz1=_deref_pbuz2_ror_4 +ldy #0 +lda ({z2}),y +lsr +lsr +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=_deref_pbuz1_ror_4 +ldy #0 +lda ({z1}),y +lsr +lsr +lsr +lsr +//FRAGMENT vbuxx=_deref_pbuz1_ror_4 +ldy #0 +lda ({z1}),y +lsr +lsr +lsr +lsr +tax +//FRAGMENT vbuyy=_deref_pbuz1_ror_4 +ldy #0 +lda ({z1}),y +lsr +lsr +lsr +lsr +tay +//FRAGMENT _deref_pbuc1=_deref_pbuc1_bxor_vbuc2 +lda #{c2} +eor {c1} +sta {c1} +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_vwuc2 +ldy {z1} +clc +lda {c1},y +adc #<{c2} +sta {c1},y +lda {c1}+1,y +adc #>{c2} +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_plus_vwuc2 +tay +clc +lda {c1},y +adc #<{c2} +sta {c1},y +lda {c1}+1,y +adc #>{c2} +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_vwuc2 +clc +lda {c1},x +adc #<{c2} +sta {c1},x +lda {c1}+1,x +adc #>{c2} +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_vwuc2 +clc +lda {c1},y +adc #<{c2} +sta {c1},y +lda {c1}+1,y +adc #>{c2} +sta {c1}+1,y +//FRAGMENT vwsz1=_deref_pwsz2_minus__deref_pwsz3 +ldy #0 +sec +lda ({z2}),y +sbc ({z3}),y +sta {z1} +iny +lda ({z2}),y +sbc ({z3}),y +sta {z1}+1 +//FRAGMENT vduz1=vduz2_plus_vwuz3 +lda {z2} +clc +adc {z3} +sta {z1} +lda {z2}+1 +adc {z3}+1 +sta {z1}+1 +lda {z2}+2 +adc #0 +sta {z1}+2 +lda {z2}+3 +adc #0 +sta {z1}+3 +//FRAGMENT vduz1=vduz1_plus_vwuz2 +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +lda {z1}+2 +adc #0 +sta {z1}+2 +lda {z1}+3 +adc #0 +sta {z1}+3 +//FRAGMENT _deref_(_deref_qbuc1)=vbuc2 +lda #{c2} +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT vwsz1=vwsz2_minus_vwsc1 +lda {z2} +sec +sbc #<{c1} +sta {z1} +lda {z2}+1 +sbc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbsc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=_sword_vbsz2 +lda {z2} +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_rol_3 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwsz1=vwsz2_ror_6 +lda {z2} +sta $ff +lda {z2}+1 +sta {z1} +lda #0 +bit {z2}+1 +bpl !+ +lda #$ff +!: +sta {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +//FRAGMENT vwsz1=_deref_pwsc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbsc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbsc1_derefidx_vbuxx +lda {c1},x +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbsc1_derefidx_vbuyy +lda {c1},y +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=_sword_vbsaa +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=_sword_vbsxx +txa +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=_sword_vbsyy +tya +sta {z1} +// sign-extend the byte +ora #$7f +bmi !+ +lda #0 +!: +sta {z1}+1 +//FRAGMENT vwsz1=vwsz2_minus_vwsz1 +lda {z2} +sec +sbc {z1} +sta {z1} +lda {z2}+1 +sbc {z1}+1 +sta {z1}+1 +//FRAGMENT vwsz1=vwsz1_ror_6 +lda {z1} +sta $ff +lda {z1}+1 +sta {z1} +lda #0 +bit {z1}+1 +bpl !+ +lda #$ff +!: +sta {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +rol $ff +rol {z1} +rol {z1}+1 +//FRAGMENT vwsz1=vwsz1_rol_3 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vbsz1_le_vbsc1_then_la1 +lda #{c1} +sec +sbc {z1} +bvc !+ +eor #$80 +!: +bpl {la1} +//FRAGMENT vbsaa_le_vbsc1_then_la1 +sec +sbc #{c1} +beq {la1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsxx_le_vbsc1_then_la1 +txa +sec +sbc #{c1} +beq {la1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vbsyy_le_vbsc1_then_la1 +tya +sec +sbc #{c1} +beq {la1} +bvc !+ +eor #$80 +!: +bmi {la1} +//FRAGMENT vwsz1=vbsz2_plus_vwsc1 +lda {z2} +tax +clc +adc #<{c1} +sta {z1} +txa +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vbsaa_plus_vwsc1 +tax +clc +adc #<{c1} +sta {z1} +txa +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vbsxx_plus_vwsc1 +txa +tax +clc +adc #<{c1} +sta {z1} +txa +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT vwsz1=vbsyy_plus_vwsc1 +tya +tax +clc +adc #<{c1} +sta {z1} +txa +ora #$7f +bmi !+ +lda #0 +!: +adc #>{c1} +sta {z1}+1 +//FRAGMENT vbuaa_gt_vbuz1_then_la1 +cmp {z1} +beq !+ +bcs {la1} +!: +//FRAGMENT pduc1_derefidx_vbuz1=pduc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1},y +lda {c2}+1,y +sta {c1}+1,y +lda {c2}+2,y +sta {c1}+2,y +lda {c2}+3,y +sta {c1}+3,y +//FRAGMENT pbuz1_derefidx_vbuz2_eq_0_then_la1 +ldy {z2} +lda ({z1}),y + +cmp #0 +beq {la1} +//FRAGMENT pduc1_derefidx_vbuz1=pduc1_derefidx_vbuz1_plus_pduc2_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 +lda {c1}+2,y +adc {c2}+2,y +sta {c1}+2,y +lda {c1}+3,y +adc {c2}+3,y +sta {c1}+3,y +//FRAGMENT qbuc1_derefidx_vbuaa=pbuz1 +tay +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa +tay +lda {c2},y +sta {c1},y +lda {c2}+1,y +sta {c1}+1,y +lda {c2}+2,y +sta {c1}+2,y +lda {c2}+3,y +sta {c1}+3,y +//FRAGMENT pduc1_derefidx_vbuxx=pduc2_derefidx_vbuxx +lda {c2},x +sta {c1},x +lda {c2}+1,x +sta {c1}+1,x +lda {c2}+2,x +sta {c1}+2,x +lda {c2}+3,x +sta {c1}+3,x +//FRAGMENT pduc1_derefidx_vbuyy=pduc2_derefidx_vbuyy +lda {c2},y +sta {c1},y +lda {c2}+1,y +sta {c1}+1,y +lda {c2}+2,y +sta {c1}+2,y +lda {c2}+3,y +sta {c1}+3,y +//FRAGMENT pbuz1_derefidx_vbuxx_eq_0_then_la1 +txa +tay +lda ({z1}),y + +cmp #0 +beq {la1} +//FRAGMENT pbuz1_derefidx_vbuyy_eq_0_then_la1 +lda ({z1}),y + +cmp #0 +beq {la1} +//FRAGMENT pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa +tay +clc +lda {c1},y +adc {c2},y +sta {c1},y +lda {c1}+1,y +adc {c2}+1,y +sta {c1}+1,y +lda {c1}+2,y +adc {c2}+2,y +sta {c1}+2,y +lda {c1}+3,y +adc {c2}+3,y +sta {c1}+3,y +//FRAGMENT pduc1_derefidx_vbuxx=pduc1_derefidx_vbuxx_plus_pduc2_derefidx_vbuxx +clc +lda {c1},x +adc {c2},x +sta {c1},x +lda {c1}+1,x +adc {c2}+1,x +sta {c1}+1,x +lda {c1}+2,x +adc {c2}+2,x +sta {c1}+2,x +lda {c1}+3,x +adc {c2}+3,x +sta {c1}+3,x +//FRAGMENT pduc1_derefidx_vbuyy=pduc1_derefidx_vbuyy_plus_pduc2_derefidx_vbuyy +clc +lda {c1},y +adc {c2},y +sta {c1},y +lda {c1}+1,y +adc {c2}+1,y +sta {c1}+1,y +lda {c1}+2,y +adc {c2}+2,y +sta {c1}+2,y +lda {c1}+3,y +adc {c2}+3,y +sta {c1}+3,y +//FRAGMENT pbuz1=_dec_pbuz2 +lda {z2} +sec +sbc #1 +sta {z1} +lda {z2}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT vduz1_eq_vduz2_then_la1 +lda {z1} +cmp {z2} +bne !+ +lda {z1}+1 +cmp {z2}+1 +bne !+ +lda {z1}+2 +cmp {z2}+2 +bne !+ +lda {z1}+3 +cmp {z2}+3 +beq {la1} +!: +//FRAGMENT vdsz1_eq_vdsz2_then_la1 +lda {z1} +cmp {z2} +bne !+ +lda {z1}+1 +cmp {z2}+1 +bne !+ +lda {z1}+2 +cmp {z2}+2 +bne !+ +lda {z1}+3 +cmp {z2}+3 +beq {la1} +!: +//FRAGMENT vdsz1=vdsz1_plus_vwsz2 +lda {z2}+1 +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +lda {z1} +clc +adc {z2} +sta {z1} +lda {z1}+1 +adc {z2}+1 +sta {z1}+1 +lda {z1}+2 +adc $ff +sta {z1}+2 +lda {z1}+3 +adc $ff +sta {z1}+3 +//FRAGMENT vdsz1=vdsz1_minus_vwsz2 +lda {z2}+1 +ora #$7f +bmi !+ +lda #0 +!: +sta $ff +sec +lda {z1} +sbc {z2} +sta {z1} +lda {z1}+1 +sbc {z2}+1 +sta {z1}+1 +lda {z1}+2 +sbc $ff +sta {z1}+2 +lda {z1}+3 +sbc $ff +sta {z1}+3 +//FRAGMENT vwsz1=_dec_vwsz1 +lda {z1} +bne !+ +dec {z1}+1 +!: +dec {z1} +//FRAGMENT _deref_pwuc1=vbuz1 +lda {z1} +sta {c1} +lda #0 +sta {c1}+1 +//FRAGMENT pvoz1=_deref_qvoc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +//FRAGMENT _deref_pwuc1=vbuaa +sta {c1} +lda #0 +sta {c1}+1 +//FRAGMENT _deref_pwuc1=vbuxx +txa +sta {c1} +lda #0 +sta {c1}+1 +//FRAGMENT _deref_pwuc1=vbuyy +tya +sta {c1} +lda #0 +sta {c1}+1 +//FRAGMENT vwsz1_lt_vbsc1_then_la1 +NO_SYNTHESIS +//FRAGMENT vwsz1_lt_vwuc1_then_la1 +lda {z1}+1 +bmi {la1} +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vwsz1=pwsc1_derefidx_vbuz2_minus_pwsc2_derefidx_vbuz2 +ldy {z2} +sec +lda {c1},y +sbc {c2},y +sta {z1} +lda {c1}+1,y +sbc {c2}+1,y +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_rol_4 +ldy {z2} +lda {c1},y +asl +sta {z1} +lda {c1}+1,y +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT pbsc1_derefidx_vbuz1=vbsc2 +lda #{c2} +ldy {z1} +sta {c1},y +//FRAGMENT vwsz1=pwsc1_derefidx_vbuaa_minus_pwsc2_derefidx_vbuaa +tay +sec +lda {c1},y +sbc {c2},y +sta {z1} +lda {c1}+1,y +sbc {c2}+1,y +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuxx_minus_pwsc2_derefidx_vbuxx +sec +lda {c1},x +sbc {c2},x +sta {z1} +lda {c1}+1,x +sbc {c2}+1,x +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuyy_minus_pwsc2_derefidx_vbuyy +sec +lda {c1},y +sbc {c2},y +sta {z1} +lda {c1}+1,y +sbc {c2}+1,y +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbuc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwsz1=_sword_pbuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_rol_4 +lda {c1},x +asl +sta {z1} +lda {c1}+1,x +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_rol_4 +lda {c1},y +asl +sta {z1} +lda {c1}+1,y +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT pbsc1_derefidx_vbuxx=vbsc2 +lda #{c2} +sta {c1},x +//FRAGMENT pbsc1_derefidx_vbuyy=vbsc2 +lda #{c2} +sta {c1},y +//FRAGMENT _deref_pwuc1=_deref_pwuc1_plus_vwuc2 +lda #<{c2} +clc +adc {c1} +sta {c1} +lda #>{c2} +adc {c1}+1 +sta {c1}+1 +//FRAGMENT vbuz1=vbuz2_plus__deref_pbuc1 +lda {c1} +clc +adc {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus__deref_pbuc1 +lda {c1} +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus__deref_pbuc1 +lda {c1} +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus__deref_pbuc1 +lda {c1} +clc +adc {z1} +tay +//FRAGMENT vbuz1=vbuaa_plus__deref_pbuc1 +clc +adc {c1} +sta {z1} +//FRAGMENT vbuaa=vbuaa_plus__deref_pbuc1 +clc +adc {c1} +//FRAGMENT vbuxx=vbuaa_plus__deref_pbuc1 +clc +adc {c1} +tax +//FRAGMENT vbuyy=vbuaa_plus__deref_pbuc1 +clc +adc {c1} +tay +//FRAGMENT vbuz1=vbuxx_plus__deref_pbuc1 +txa +clc +adc {c1} +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus__deref_pbuc1 +txa +clc +adc {c1} +//FRAGMENT vbuxx=vbuxx_plus__deref_pbuc1 +txa +clc +adc {c1} +tax +//FRAGMENT vbuyy=vbuxx_plus__deref_pbuc1 +txa +clc +adc {c1} +tay +//FRAGMENT vbuz1=vbuyy_plus__deref_pbuc1 +tya +clc +adc {c1} +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus__deref_pbuc1 +tya +clc +adc {c1} +//FRAGMENT vbuxx=vbuyy_plus__deref_pbuc1 +tya +clc +adc {c1} +tax +//FRAGMENT vbuyy=vbuyy_plus__deref_pbuc1 +tya +clc +adc {c1} +tay +//FRAGMENT vwsz1=pwsc1_derefidx_vbuz2_plus__deref_pwsz3 +ldx {z2} +clc +ldy #0 +lda {c1},x +adc ({z3}),y +sta {z1} +iny +lda {c1}+1,x +adc ({z3}),y +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuaa_plus__deref_pwsz2 +tax +clc +ldy #0 +lda {c1},x +adc ({z2}),y +sta {z1} +iny +lda {c1}+1,x +adc ({z2}),y +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuxx_plus__deref_pwsz2 +clc +ldy #0 +lda {c1},x +adc ({z2}),y +sta {z1} +iny +lda {c1}+1,x +adc ({z2}),y +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuyy_plus__deref_pwsz2 +tya +tax +clc +ldy #0 +lda {c1},x +adc ({z2}),y +sta {z1} +iny +lda {c1}+1,x +adc ({z2}),y +sta {z1}+1 +//FRAGMENT vwsz1=pwsc1_derefidx_vbuaa_plus__deref_pwsz1 +tax +ldy #0 +clc +lda {c1},x +adc ({z1}),y +pha +iny +lda {c1}+1,x +adc ({z1}),y +sta {z1}+1 +pla +sta {z1} +//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 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_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_lt_vbuyy_then_la1 +lda {z1}+1 +bne !+ +sty $ff +lda {z1} +cmp $ff +bcc {la1} +!: +//FRAGMENT pwuc1_derefidx_vbuz1=vbuaa +ldy {z1} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=vbuaa +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vbuaa +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT vwuz1=vwuz2_rol_5 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT vwuz1=vwuz1_rol_5 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +asl {z1} +rol {z1}+1 +//FRAGMENT pprz1=_deref_qprc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +//FRAGMENT vbuaa_le_vbuyy_then_la1 +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT vbuxx_ge_vbuaa_then_la1 +tay +sty $ff +cpx $ff +bcs {la1} +//FRAGMENT vbuyy_ge_vbuaa_then_la1 +sta $ff +cpy $ff +bcs {la1} +//FRAGMENT pwuc1_derefidx_vbuz1=pwuz2_derefidx_vbuc2 +ldx {z1} +ldy #{c2} +lda ({z2}),y +sta {c1},x +iny +lda ({z2}),y +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuaa=pwuz1_derefidx_vbuc2 +ldy #{c2} +tax +lda ({z1}),y +sta {c1},x +iny +lda ({z1}),y +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuxx=pwuz1_derefidx_vbuc2 +ldy #{c2} +lda ({z1}),y +sta {c1},x +iny +lda ({z1}),y +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=pwuz1_derefidx_vbuc2 +tya +ldy #{c2} +tax +lda ({z1}),y +sta {c1},x +iny +lda ({z1}),y +sta {c1}+1,x +//FRAGMENT vbsaa=vbsc1 +lda #{c1} +//FRAGMENT vbsc1_neq_vbsyy_then_la1 +cpy #{c1} +bne {la1} +//FRAGMENT vbum1=vbum2 +lda {m2} +sta {m1} +//FRAGMENT vbum1=vbum1_plus_vbuc1 +lax {m1} +axs #-[{c1}] +stx {m1} +//FRAGMENT pbuc1_derefidx_vbum1=pbuc2_derefidx_vbum2 +ldy {m2} +lda {c2},y +ldy {m1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc1_derefidx_vbuz1_bor_vbuc2 +lda #{c2} +ldy {z1} +ora {c1},y +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc1_derefidx_vbuxx_bor_vbuc2 +lda #{c2} +ora {c1},x +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc1_derefidx_vbuyy_bor_vbuc2 +lda #{c2} +ora {c1},y +sta {c1},y +//FRAGMENT vduz1=vduz2_rol_0 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_rol_5 +lda {z2} +asl +sta {z1} +lda {z2}+1 +rol +sta {z1}+1 +lda {z2}+2 +rol +sta {z1}+2 +lda {z2}+3 +rol +sta {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vduz1=vduz2_rol_6 +lda {z2}+3 +lsr +sta $ff +lda {z2}+2 +ror +sta {z1}+3 +lda {z2}+1 +ror +sta {z1}+2 +lda {z2} +ror +sta {z1}+1 +lda #0 +ror +sta {z1} +lsr $ff +ror {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +//FRAGMENT vduz1=vduz2_rol_7 +lda {z2}+3 +lsr +lda {z2}+2 +ror +sta {z1}+3 +lda {z2}+1 +ror +sta {z1}+2 +lda {z2} +ror +sta {z1}+1 +lda #0 +ror +sta {z1} +//FRAGMENT vduz1=vduz2_rol_8 +lda #0 +sta {z1} +lda {z2} +sta {z1}+1 +lda {z2}+1 +sta {z1}+2 +lda {z2}+2 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_rol_9 +lda #0 +sta {z1} +lda {z2} +asl +sta {z1}+1 +lda {z2}+1 +rol +sta {z1}+2 +lda {z2}+2 +rol +sta {z1}+3 +//FRAGMENT vduz1=vduz2_rol_vbuc1 +ldy #{c1} +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dey +bne !- +!e: +//FRAGMENT vduz1=vduz2_rol_16 +lda #0 +sta {z1} +sta {z1}+1 +lda {z2} +sta {z1}+2 +lda {z2}+1 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_rol_24 +lda #0 +sta {z1} +sta {z1}+1 +sta {z1}+2 +lda {z2} +sta {z1}+3 +//FRAGMENT vduz1=vduz2_rol_32 +lda #0 +sta {z1} +sta {z1}+1 +sta {z1}+2 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_ror_0 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +//FRAGMENT vduz1=vduz2_ror_1 +lda {z2}+3 +lsr +sta {z1}+3 +lda {z2}+2 +ror +sta {z1}+2 +lda {z2}+1 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +//FRAGMENT vduz1=vduz2_ror_2 +lda {z2}+3 +lsr +sta {z1}+3 +lda {z2}+2 +ror +sta {z1}+2 +lda {z2}+1 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +//FRAGMENT vduz1=vduz2_ror_3 +lda {z2}+3 +lsr +sta {z1}+3 +lda {z2}+2 +ror +sta {z1}+2 +lda {z2}+1 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +//FRAGMENT vduz1=vduz2_ror_4 +lda {z2}+3 +lsr +sta {z1}+3 +lda {z2}+2 +ror +sta {z1}+2 +lda {z2}+1 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +//FRAGMENT vduz1=vduz2_ror_5 +lda {z2}+3 +lsr +sta {z1}+3 +lda {z2}+2 +ror +sta {z1}+2 +lda {z2}+1 +ror +sta {z1}+1 +lda {z2} +ror +sta {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +//FRAGMENT vduz1=vduz2_ror_6 +lda {z2} +asl +sta $ff +lda {z2}+1 +rol +sta {z1} +lda {z2}+2 +rol +sta {z1}+1 +lda {z2}+3 +rol +sta {z1}+2 +lda #0 +rol +sta {z1}+3 +asl $ff +rol {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +//FRAGMENT vduz1=vduz2_ror_7 +lda {z2} +asl +lda {z2}+1 +rol +sta {z1} +lda {z2}+2 +rol +sta {z1}+1 +lda {z2}+3 +rol +sta {z1}+2 +lda #0 +rol +sta {z1}+3 +//FRAGMENT vduz1=vduz2_ror_8 +lda #0 +sta {z1}+3 +lda {z2}+3 +sta {z1}+2 +lda {z2}+2 +sta {z1}+1 +lda {z2}+1 +sta {z1} +//FRAGMENT vduz1=vduz2_ror_9 +lda #0 +sta {z1}+3 +lda {z2}+3 +lsr +sta {z1}+2 +lda {z2}+2 +ror +sta {z1}+1 +lda {z2}+1 +ror +sta {z1} +//FRAGMENT vduz1=vduz2_ror_vbuc1 +ldx #{c1} +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +dex +bne !- +!e: +//FRAGMENT vduz1=vduz2_ror_16 +lda #0 +sta {z1}+3 +sta {z1}+2 +lda {z2}+3 +sta {z1}+1 +lda {z2}+2 +sta {z1} +//FRAGMENT vduz1=vduz2_ror_24 +lda #0 +sta {z1}+3 +sta {z1}+2 +sta {z1}+1 +lda {z2}+3 +sta {z1} +//FRAGMENT vduz1=vduz2_ror_32 +lda #0 +sta {z1}+3 +sta {z1}+2 +sta {z1}+1 +sta {z1} +//FRAGMENT vduz1=vduz2_ror_pbuc1_derefidx_vbuz3 +ldy {z3} +ldx {c1},y +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +dex +bne !- +!e: +//FRAGMENT vduz1=vduz2_rol_pbuc1_derefidx_vbuaa +tax +ldy {c1},x +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpy #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dey +bne !- +!e: +//FRAGMENT vduz1=vduz2_rol_pbuc1_derefidx_vbuyy +ldx {c1},y +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +asl {z1} +rol {z1}+1 +rol {z1}+2 +rol {z1}+3 +dex +bne !- +!e: +//FRAGMENT vduz1=vduz2_ror_pbuc1_derefidx_vbuaa +tay +ldx {c1},y +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +dex +bne !- +!e: +//FRAGMENT vduz1=vduz2_ror_pbuc1_derefidx_vbuxx +lda {c1},x +tax +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +dex +bne !- +!e: +//FRAGMENT vduz1=vduz2_ror_pbuc1_derefidx_vbuyy +ldx {c1},y +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +lda {z2}+2 +sta {z1}+2 +lda {z2}+3 +sta {z1}+3 +cpx #0 +beq !e+ +!: +lsr {z1}+3 +ror {z1}+2 +ror {z1}+1 +ror {z1} +dex +bne !- +!e: diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index ea7b4e41b..4e173505c 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 107d6cfa86 107d6d178e +//KICKC FRAGMENT CACHE 10dedb3bb9 10dedb58e1 //FRAGMENT vbuz1=_deref_pbuc1 lda {c1} sta {z1} diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index 317c50605..0315584dc 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -276,7 +276,7 @@ public class Compiler { new PassNAddTypeConversionAssignment(program, true).execute(); new Pass1EarlyConstantIdentification(program).execute(); - // new Pass1AsmUsesHandling(program).execute(); + new Pass1AsmUsesHandling(program).execute(); new PassNAssertConstantModification(program).execute(); new PassNAssertTypeDeref(program).check(); diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 012f95ef2..15e1bd6e5 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -3335,8 +3335,8 @@ public class TestPrograms { } @Test - public void testInlineAsmRefoutIllegal() throws IOException, URISyntaxException { - assertError("inline-asm-refout-illegal.c", "Inline ASM reference is not constant"); + public void testInlineAsmRefout() throws IOException, URISyntaxException { + compileAndCompare("inline-asm-refout-illegal.c"); } @Test @@ -3388,8 +3388,8 @@ public class TestPrograms { } @Test - public void testInlineAsmRefout() throws IOException, URISyntaxException { - compileAndCompare("inline-asm-refout.c"); + public void testInlineAsmRefoutVar() throws IOException, URISyntaxException { + compileAndCompare("inline-asm-refout-var.c"); } @Test diff --git a/src/test/kc/function-pointer-noarg-call-13.c b/src/test/kc/function-pointer-noarg-call-13.c index caee980df..d7c1688f8 100644 --- a/src/test/kc/function-pointer-noarg-call-13.c +++ b/src/test/kc/function-pointer-noarg-call-13.c @@ -22,11 +22,11 @@ void fn2() { *r = 2; } -void enableDLI(__ma void *dliptr) { +void enableDLI(void *dliptr) { asm { - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ diff --git a/src/test/kc/function-pointer-problem-1.c b/src/test/kc/function-pointer-problem-1.c index c8328d0e7..6ab88cc29 100644 --- a/src/test/kc/function-pointer-problem-1.c +++ b/src/test/kc/function-pointer-problem-1.c @@ -11,11 +11,11 @@ void fn1() { *r = 1; } -void enableDLI(__ma void *dliptr) { +void enableDLI(void *dliptr) { asm { - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ diff --git a/src/test/kc/inline-asm-refout-illegal.c b/src/test/kc/inline-asm-refout-var.c similarity index 54% rename from src/test/kc/inline-asm-refout-illegal.c rename to src/test/kc/inline-asm-refout-var.c index b61df3394..9e76cc118 100644 --- a/src/test/kc/inline-asm-refout-illegal.c +++ b/src/test/kc/inline-asm-refout-var.c @@ -1,9 +1,9 @@ -// Illustrates how inline assembler referencing variables is illegal +// Illustrates how inline assembler referencing variables is automatically converted to __ma byte* const SCREEN = $400; void main() { - for( __ssa byte i: 0..10) { + for(byte i: 0..10) { asm { lda #'a' ldx i diff --git a/src/test/kc/inline-kickasm-uses-problem.c b/src/test/kc/inline-kickasm-uses-problem.c index 75c79a4b8..4239c7cfc 100644 --- a/src/test/kc/inline-kickasm-uses-problem.c +++ b/src/test/kc/inline-kickasm-uses-problem.c @@ -21,9 +21,9 @@ void main() { // foo(b, a); } -void foo(__mem uint8_t *x1, uint8_t *x2) { - __ma volatile uint8_t * v1; - __ma uint8_t * v2; +void foo(uint8_t *x1, uint8_t *x2) { + volatile uint8_t * v1; + uint8_t * v2; uint8_t a1 = 1; uint8_t a2 = 2; v1 = x1; diff --git a/src/test/ref/address-5.cfg b/src/test/ref/address-5.cfg index 1d0fa9bb2..5966d395e 100644 --- a/src/test/ref/address-5.cfg +++ b/src/test/ref/address-5.cfg @@ -31,7 +31,7 @@ main::@return: scope:[main] from main::@2 [11] return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 asm { ldxidx ldach staSCREEN,x incidx } to:print::@return diff --git a/src/test/ref/address-5.log b/src/test/ref/address-5.log index ac9a069c5..d1eb2fc32 100644 --- a/src/test/ref/address-5.log +++ b/src/test/ref/address-5.log @@ -1,3 +1,4 @@ +Setting inferred volatile on symbol affected by address-of: print::ch in asm { ldxidx ldach staSCREEN,x incidx } Inlined call call __init CONTROL FLOW GRAPH SSA @@ -21,7 +22,7 @@ main::@return: scope:[main] from main::@3 return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 asm { ldxidx ldach staSCREEN,x incidx } to:print::@return @@ -49,8 +50,8 @@ const nomodify byte* SCREEN = (byte*)$400 void __start() volatile byte idx loadstore !zp[-1]:3 void main() -void print(byte print::ch) -byte print::ch loadstore !zp[-1]:2 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !zp[-1]:2 Simplifying constant pointer cast (byte*) 1024 Successful SSA optimization PassNCastSimplification @@ -103,7 +104,7 @@ main::@return: scope:[main] from main::@2 [11] return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 asm { ldxidx ldach staSCREEN,x incidx } to:print::@return @@ -116,8 +117,8 @@ VARIABLE REGISTER WEIGHTS void __start() volatile byte idx loadstore !zp[-1]:3 0.2222222222222222 void main() -void print(byte print::ch) -byte print::ch loadstore !zp[-1]:2 11.0 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !zp[-1]:2 11.0 Initial phi equivalence classes Added variable idx to live range equivalence class [ idx ] @@ -252,8 +253,8 @@ const nomodify byte* SCREEN = (byte*) 1024 void __start() volatile byte idx loadstore !zp[-1]:3 zp[1]:3 0.2222222222222222 void main() -void print(byte print::ch) -byte print::ch loadstore !zp[-1]:2 zp[1]:2 11.0 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !zp[-1]:2 zp[1]:2 11.0 zp[1]:3 [ idx ] zp[1]:2 [ print::ch ] diff --git a/src/test/ref/address-5.sym b/src/test/ref/address-5.sym index cdfae6b12..79dbaf4d0 100644 --- a/src/test/ref/address-5.sym +++ b/src/test/ref/address-5.sym @@ -2,8 +2,8 @@ const nomodify byte* SCREEN = (byte*) 1024 void __start() volatile byte idx loadstore !zp[-1]:3 zp[1]:3 0.2222222222222222 void main() -void print(byte print::ch) -byte print::ch loadstore !zp[-1]:2 zp[1]:2 11.0 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !zp[-1]:2 zp[1]:2 11.0 zp[1]:3 [ idx ] zp[1]:2 [ print::ch ] diff --git a/src/test/ref/address-6.cfg b/src/test/ref/address-6.cfg index 1d0fa9bb2..5966d395e 100644 --- a/src/test/ref/address-6.cfg +++ b/src/test/ref/address-6.cfg @@ -31,7 +31,7 @@ main::@return: scope:[main] from main::@2 [11] return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 asm { ldxidx ldach staSCREEN,x incidx } to:print::@return diff --git a/src/test/ref/address-6.log b/src/test/ref/address-6.log index 04760eb02..d569611dd 100644 --- a/src/test/ref/address-6.log +++ b/src/test/ref/address-6.log @@ -1,3 +1,4 @@ +Setting inferred volatile on symbol affected by address-of: print::ch in asm { ldxidx ldach staSCREEN,x incidx } Inlined call call __init CONTROL FLOW GRAPH SSA @@ -21,7 +22,7 @@ main::@return: scope:[main] from main::@3 return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 asm { ldxidx ldach staSCREEN,x incidx } to:print::@return @@ -49,8 +50,8 @@ const nomodify byte* SCREEN = (byte*)$400 void __start() volatile byte idx loadstore !mem[-1]:12288 void main() -void print(byte print::ch) -byte print::ch loadstore !mem[-1]:12289 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !mem[-1]:12289 Simplifying constant pointer cast (byte*) 1024 Successful SSA optimization PassNCastSimplification @@ -103,7 +104,7 @@ main::@return: scope:[main] from main::@2 [11] return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 asm { ldxidx ldach staSCREEN,x incidx } to:print::@return @@ -116,8 +117,8 @@ VARIABLE REGISTER WEIGHTS void __start() volatile byte idx loadstore !mem[-1]:12288 0.2222222222222222 void main() -void print(byte print::ch) -byte print::ch loadstore !mem[-1]:12289 11.0 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !mem[-1]:12289 11.0 Initial phi equivalence classes Added variable idx to live range equivalence class [ idx ] @@ -252,8 +253,8 @@ const nomodify byte* SCREEN = (byte*) 1024 void __start() volatile byte idx loadstore !mem[-1]:12288 mem[1]:12288 0.2222222222222222 void main() -void print(byte print::ch) -byte print::ch loadstore !mem[-1]:12289 mem[1]:12289 11.0 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !mem[-1]:12289 mem[1]:12289 11.0 mem[1]:12288 [ idx ] mem[1]:12289 [ print::ch ] diff --git a/src/test/ref/address-6.sym b/src/test/ref/address-6.sym index af349d55d..45d2f2c48 100644 --- a/src/test/ref/address-6.sym +++ b/src/test/ref/address-6.sym @@ -2,8 +2,8 @@ const nomodify byte* SCREEN = (byte*) 1024 void __start() volatile byte idx loadstore !mem[-1]:12288 mem[1]:12288 0.2222222222222222 void main() -void print(byte print::ch) -byte print::ch loadstore !mem[-1]:12289 mem[1]:12289 11.0 +void print(volatile byte print::ch) +volatile byte print::ch loadstore !mem[-1]:12289 mem[1]:12289 11.0 mem[1]:12288 [ idx ] mem[1]:12289 [ print::ch ] diff --git a/src/test/ref/atarixl-md5.asm b/src/test/ref/atarixl-md5.asm index bc4f43887..b05095190 100644 --- a/src/test/ref/atarixl-md5.asm +++ b/src/test/ref/atarixl-md5.asm @@ -1116,10 +1116,10 @@ cputc: { // Allocates memory and returns a pointer to it. Sets allocated memory to zero. // - nitems āˆ’ This is the number of elements to be allocated. // - size āˆ’ This is the size of elements. -// calloc(word zp($5a) nitems) +// calloc(word zp($5d) nitems) calloc: { .label return = $36 - .label nitems = $5a + .label nitems = $5d // malloc(nitems*size) lda.z nitems sta.z malloc.size @@ -1137,12 +1137,12 @@ calloc: { } // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. -// memcpy(void* zp($5a) destination, byte* zp($2c) source, word zp(2) num) +// memcpy(void* zp($5d) destination, byte* zp($2c) source, word zp(2) num) memcpy: { - .label src_end = $57 - .label dst = $5a + .label src_end = $5a + .label dst = $5d .label src = $2c - .label destination = $5a + .label destination = $5d .label source = $2c .label num = 2 // src_end = (char*)source+num @@ -1312,6 +1312,8 @@ leftRotate: { sta.z rotateLeft.p lda #>p sta.z rotateLeft.p+1 + lda.z r + sta.z rotateLeft.r jsr rotateLeft jmp __b5 } @@ -1371,7 +1373,7 @@ mod16: { mul3: { .label __1 = $2c .label return = $2c - .label __2 = $5a + .label __2 = $5d // ((uint16_t) a) * 3 sta.z __1 lda #0 @@ -1396,7 +1398,7 @@ mul3: { mul5: { .label __1 = $2c .label return = $2c - .label __2 = $57 + .label __2 = $5d // ((uint16_t) a) * 5 sta.z __1 lda #0 @@ -1421,7 +1423,7 @@ mul5: { } // Puts a character to the screen a the current location. Uses internal screencode. Deals with storing the old cursor value putchar: { - .label loc = $57 + .label loc = $5a // **OLDADR = *OLDCHR lda OLDCHR ldy OLDADR @@ -1447,7 +1449,7 @@ putchar: { } // Handles cursor movement, displaying it if required, and inverting character it is over if there is one (and enabled) setcursor: { - .label loc = $57 + .label loc = $5a // **OLDADR = *OLDCHR // save the current oldchr into oldadr lda OLDCHR @@ -1570,12 +1572,12 @@ malloc: { rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($2e) str, word zp($5a) num) +// memset(void* zp($2e) str, word zp($5d) num) memset: { - .label end = $5a + .label end = $5d .label dst = $2e .label str = $2e - .label num = $5a + .label num = $5d // if(num>0) lda.z num bne !+ @@ -1620,7 +1622,7 @@ memset: { // - radix : The radix to convert the number to (from the enum RADIX) // uctoa(byte register(X) value, byte* zp($2e) buffer) uctoa: { - .label digit_value = $59 + .label digit_value = $5c .label buffer = $2e .label digit = $30 .label started = $31 @@ -1785,10 +1787,10 @@ move16Left: { // } rts } -// rotateLeft(byte* zp($57) p, byte zp($49) r) +// rotateLeft(byte* zp($57) p, byte zp($59) r) rotateLeft: { .label p = $57 - .label r = $49 + .label r = $59 // kickasm ldx #r !s: @@ -1825,12 +1827,12 @@ move8Left: { } // Return a pointer to the location of the cursor cursorLocation: { - .label __0 = $57 - .label __1 = $57 - .label __3 = $57 - .label return = $57 - .label __4 = $5a - .label __5 = $57 + .label __0 = $5a + .label __1 = $5a + .label __3 = $5a + .label return = $5a + .label __4 = $5d + .label __5 = $5a // (word)(*ROWCRS)*CONIO_WIDTH lda ROWCRS sta.z __3 @@ -1884,10 +1886,10 @@ cursorLocation: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// uctoa_append(byte* zp($2e) buffer, byte register(X) value, byte zp($59) sub) +// uctoa_append(byte* zp($2e) buffer, byte register(X) value, byte zp($5c) sub) uctoa_append: { .label buffer = $2e - .label sub = $59 + .label sub = $5c ldy #0 __b1: // while (value >= sub) @@ -1910,11 +1912,11 @@ uctoa_append: { jmp __b1 } // Print a padding char a number of times -// printf_padding(byte zp($59) pad, byte zp($31) length) +// printf_padding(byte zp($5c) pad, byte zp($31) length) printf_padding: { .label i = $32 .label length = $31 - .label pad = $59 + .label pad = $5c lda #0 sta.z i __b1: diff --git a/src/test/ref/atarixl-md5.cfg b/src/test/ref/atarixl-md5.cfg index a180f0254..a2d3071f5 100644 --- a/src/test/ref/atarixl-md5.cfg +++ b/src/test/ref/atarixl-md5.cfg @@ -780,7 +780,7 @@ move16Left::@return: scope:[move16Left] from move16Left [373] return to:@return -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) rotateLeft: scope:[rotateLeft] from leftRotate::@1 leftRotate::@10 leftRotate::@11 kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r !s: diff --git a/src/test/ref/atarixl-md5.log b/src/test/ref/atarixl-md5.log index b5a12ab8c..40fd0ddfa 100644 --- a/src/test/ref/atarixl-md5.log +++ b/src/test/ref/atarixl-md5.log @@ -20,6 +20,32 @@ Added struct type cast to parameter value list call printf_uchar print32::dp[3] Added struct type cast to parameter value list call printf_uchar md5::i (struct printf_format_number){ 2, 0, 0, 0, 0, HEXADECIMAL } Added struct type cast to parameter value list call printf_uchar md5::g (struct printf_format_number){ 2, 0, 0, 0, 0, HEXADECIMAL } Added struct type cast to parameter value list call printf_uchar md5::r[md5::i] (struct printf_format_number){ 2, 0, 0, 0, 0, HEXADECIMAL } +Setting inferred volatile on symbol affected by address-of: rotateLeft::p in kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r + !s: + asl p+3 + rol p+2 + rol p+1 + rol p + bcc !+ + lda p+3 + adc #0 + !: + dex + bne !s- + }} +Setting inferred volatile on symbol affected by address-of: rotateLeft::r in kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r + !s: + asl p+3 + rol p+2 + rol p+1 + rol p + bcc !+ + lda p+3 + adc #0 + !: + dex + bne !s- + }} Inlined call cputc::$4 = call convertToScreenCode &cputc::c Inlined call call BREAK Inlined call call BREAK @@ -1198,7 +1224,7 @@ move16Left::@return: scope:[move16Left] from move16Left return to:@return -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) rotateLeft: scope:[rotateLeft] from leftRotate::@1 leftRotate::@12 leftRotate::@15 kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r !s: @@ -4344,9 +4370,9 @@ const byte* rawmap[$100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32 .byte mask | ht.get(idx) } }} -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) -byte* rotateLeft::p loadstore -byte rotateLeft::r loadstore +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) +volatile byte* rotateLeft::p loadstore +volatile byte rotateLeft::r loadstore void setcursor() byte*~ setcursor::$0 bool~ setcursor::$1 @@ -7130,7 +7156,7 @@ move16Left::@return: scope:[move16Left] from move16Left [373] return to:@return -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) rotateLeft: scope:[rotateLeft] from leftRotate::@1 leftRotate::@10 leftRotate::@11 kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r !s: @@ -7710,9 +7736,9 @@ byte* putchar::loc byte* putchar::loc#0 1.000000000001E12 byte putchar::newChar byte putchar::newChar#0 1.5000000000015E12 -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) -byte* rotateLeft::p loadstore 5000.5 -byte rotateLeft::r loadstore 10001.0 +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) +volatile byte* rotateLeft::p loadstore 5000.5 +volatile byte rotateLeft::r loadstore 10001.0 void setcursor() byte setcursor::c byte setcursor::c#0 7.50000000000075E12 @@ -8885,7 +8911,6 @@ Coalescing zero page register [ zp[2]:90 [ md5::$2 ] ] with [ zp[2]:92 [ md5::$3 Coalescing zero page register [ zp[2]:98 [ calloc::return#2 ] ] with [ zp[2]:100 [ md5::msg#1 ] ] - score: 1 Coalescing zero page register [ zp[2]:98 [ calloc::return#2 md5::msg#1 ] ] with [ zp[2]:206 [ calloc::return#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:126 [ md5::$66 ] ] with [ zp[4]:130 [ md5::$67 ] ] - score: 1 -Coalescing zero page register [ zp[1]:138 [ leftRotate::r#0 ] ] with [ zp[1]:215 [ rotateLeft::r ] ] - score: 1 Coalescing zero page register [ zp[4]:139 [ leftRotate::return#2 ] ] with [ zp[4]:143 [ md5::lr#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:139 [ leftRotate::return#2 md5::lr#0 ] ] with [ zp[4]:216 [ leftRotate::return#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:168 [ mul3::return#2 ] ] with [ zp[2]:238 [ mul3::return#0 ] ] - score: 1 @@ -8926,15 +8951,14 @@ Coalescing zero page register [ zp[2]:62 [ memset::num#2 memset::num#0 calloc::n Coalescing zero page register [ zp[2]:71 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ] ] with [ zp[2]:64 [ memset::str#3 memset::str#0 memset::str#8 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#1 newline::start#0 ] ] Coalescing zero page register [ zp[1]:74 [ printf_number_buffer::padding#10 printf_number_buffer::padding#1 ] ] with [ zp[1]:68 [ uctoa::digit#2 uctoa::digit#1 ] ] Coalescing zero page register [ zp[1]:77 [ printf_padding::length#4 printf_padding::length#1 printf_padding::length#0 ] ] with [ zp[1]:70 [ uctoa::started#2 uctoa::started#4 ] ] -Coalescing zero page register [ zp[1]:138 [ leftRotate::r#0 rotateLeft::r ] ] with [ zp[1]:59 [ printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] ] -Coalescing zero page register [ zp[2]:213 [ rotateLeft::p ] ] with [ zp[2]:208 [ memcpy::src_end#0 ] ] -Coalescing zero page register [ zp[2]:236 [ mul3::$2 ] ] with [ zp[2]:223 [ mul7::$2 mul7::$3 mul7::$4 ] ] -Coalescing zero page register [ zp[2]:246 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 ] ] with [ zp[2]:242 [ mul5::$2 ] ] +Coalescing zero page register [ zp[1]:138 [ leftRotate::r#0 ] ] with [ zp[1]:59 [ printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] ] +Coalescing zero page register [ zp[2]:223 [ mul7::$2 mul7::$3 mul7::$4 ] ] with [ zp[2]:208 [ memcpy::src_end#0 ] ] +Coalescing zero page register [ zp[2]:242 [ mul5::$2 ] ] with [ zp[2]:236 [ mul3::$2 ] ] Coalescing zero page register [ zp[1]:269 [ uctoa::digit_value#0 uctoa_append::sub#0 ] ] with [ zp[1]:78 [ printf_padding::pad#5 ] ] Coalescing zero page register [ zp[2]:102 [ md5::$74 ] ] with [ zp[2]:4 [ strlen::str#3 strlen::str#5 strlen::str#0 cputs::s#10 cputs::s#11 cputs::s#0 ] ] -Coalescing zero page register [ zp[2]:236 [ mul3::$2 mul7::$2 mul7::$3 mul7::$4 ] ] with [ zp[2]:62 [ memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] ] -Coalescing zero page register [ zp[2]:246 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul5::$2 ] ] with [ zp[2]:213 [ rotateLeft::p memcpy::src_end#0 ] ] -Coalescing zero page register [ zp[2]:283 [ cursorLocation::$4 ] ] with [ zp[2]:236 [ mul3::$2 mul7::$2 mul7::$3 mul7::$4 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] ] +Coalescing zero page register [ zp[2]:242 [ mul5::$2 mul3::$2 ] ] with [ zp[2]:62 [ memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] ] +Coalescing zero page register [ zp[2]:246 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 ] ] with [ zp[2]:223 [ mul7::$2 mul7::$3 mul7::$4 memcpy::src_end#0 ] ] +Coalescing zero page register [ zp[2]:283 [ cursorLocation::$4 ] ] with [ zp[2]:242 [ mul5::$2 mul3::$2 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] ] Allocated (was zp[2]:6) zp[2]:2 [ strlen::len#2 strlen::len#1 strlen::return#3 strlen::return#2 memcpy::num#3 memcpy::num#1 md5::initial_len#0 printf_number_buffer::$19 md5::$8 ] Allocated (was zp[2]:8) zp[2]:4 [ md5::offset#2 md5::offset#1 ] Allocated (was zp[4]:10) zp[4]:6 [ h0#10 h0#3 ] @@ -8962,14 +8986,16 @@ Allocated (was zp[2]:112) zp[2]:62 [ md5::w#0 ] Allocated (was zp[4]:114) zp[4]:64 [ print32::l ] Allocated (was zp[1]:121) zp[1]:68 [ md5::$72 ] Allocated (was zp[4]:134) zp[4]:69 [ leftRotate::a ] -Allocated (was zp[1]:138) zp[1]:73 [ leftRotate::r#0 rotateLeft::r printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] +Allocated (was zp[1]:138) zp[1]:73 [ leftRotate::r#0 printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] Allocated (was zp[4]:139) zp[4]:74 [ leftRotate::return#2 md5::lr#0 leftRotate::return#0 md5::b#1 ] Allocated (was zp[4]:177) zp[4]:78 [ md5::$31 md5::$32 ] Allocated (was zp[4]:195) zp[4]:82 [ md5::$27 md5::$28 ] Allocated (was zp[1]:210) zp[1]:86 [ printf_number_buffer::buffer_sign#0 ] -Allocated (was zp[2]:246) zp[2]:87 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul5::$2 rotateLeft::p memcpy::src_end#0 ] -Allocated (was zp[1]:269) zp[1]:89 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ] -Allocated (was zp[2]:283) zp[2]:90 [ cursorLocation::$4 mul3::$2 mul7::$2 mul7::$3 mul7::$4 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] +Allocated (was zp[2]:213) zp[2]:87 [ rotateLeft::p ] +Allocated (was zp[1]:215) zp[1]:89 [ rotateLeft::r ] +Allocated (was zp[2]:246) zp[2]:90 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul7::$2 mul7::$3 mul7::$4 memcpy::src_end#0 ] +Allocated (was zp[1]:269) zp[1]:92 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ] +Allocated (was zp[2]:283) zp[2]:93 [ cursorLocation::$4 mul5::$2 mul3::$2 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -10473,10 +10499,10 @@ cputc: { // Allocates memory and returns a pointer to it. Sets allocated memory to zero. // - nitems āˆ’ This is the number of elements to be allocated. // - size āˆ’ This is the size of elements. -// calloc(word zp($5a) nitems) +// calloc(word zp($5d) nitems) calloc: { .label return = $36 - .label nitems = $5a + .label nitems = $5d // [195] malloc::size#0 = calloc::nitems#0 -- vwuz1=vwuz2 lda.z nitems sta.z malloc.size @@ -10509,12 +10535,12 @@ calloc: { // memcpy // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. -// memcpy(void* zp($5a) destination, byte* zp($2c) source, word zp(2) num) +// memcpy(void* zp($5d) destination, byte* zp($2c) source, word zp(2) num) memcpy: { - .label src_end = $57 - .label dst = $5a + .label src_end = $5a + .label dst = $5d .label src = $2c - .label destination = $5a + .label destination = $5d .label source = $2c .label num = 2 // [203] memcpy::src_end#0 = (byte*)memcpy::source#3 + memcpy::num#3 -- pbuz1=pbuz2_plus_vwuz3 @@ -10797,7 +10823,9 @@ leftRotate: { sta.z rotateLeft.p lda #>p sta.z rotateLeft.p+1 - // [255] rotateLeft::r = leftRotate::r#0 + // [255] rotateLeft::r = leftRotate::r#0 -- vbuz1=vbuz2 + lda.z r + sta.z rotateLeft.r // [256] call rotateLeft jsr rotateLeft jmp __b5 @@ -10871,7 +10899,7 @@ mod16: { mul3: { .label __1 = $2c .label return = $2c - .label __2 = $5a + .label __2 = $5d // [267] mul3::$1 = (word)mul3::a#0 -- vwuz1=_word_vbuaa sta.z __1 lda #0 @@ -10902,7 +10930,7 @@ mul3: { mul5: { .label __1 = $2c .label return = $2c - .label __2 = $57 + .label __2 = $5d // [271] mul5::$1 = (word)mul5::a#0 -- vwuz1=_word_vbuaa sta.z __1 lda #0 @@ -10933,7 +10961,7 @@ mul5: { // putchar // Puts a character to the screen a the current location. Uses internal screencode. Deals with storing the old cursor value putchar: { - .label loc = $57 + .label loc = $5a // [275] *(*OLDADR) = *OLDCHR -- _deref_(_deref_qbuc1)=_deref_pbuc2 lda OLDCHR ldy OLDADR @@ -10967,7 +10995,7 @@ putchar: { // setcursor // Handles cursor movement, displaying it if required, and inverting character it is over if there is one (and enabled) setcursor: { - .label loc = $57 + .label loc = $5a // [284] *(*OLDADR) = *OLDCHR -- _deref_(_deref_qbuc1)=_deref_pbuc2 // save the current oldchr into oldadr lda OLDCHR @@ -11141,12 +11169,12 @@ malloc: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($2e) str, word zp($5a) num) +// memset(void* zp($2e) str, word zp($5d) num) memset: { - .label end = $5a + .label end = $5d .label dst = $2e .label str = $2e - .label num = $5a + .label num = $5d // [313] if(memset::num#2<=0) goto memset::@return -- vwuz1_le_0_then_la1 lda.z num bne !+ @@ -11205,7 +11233,7 @@ memset: { // - radix : The radix to convert the number to (from the enum RADIX) // uctoa(byte register(X) value, byte* zp($2e) buffer) uctoa: { - .label digit_value = $59 + .label digit_value = $5c .label buffer = $2e .label digit = $30 .label started = $31 @@ -11504,10 +11532,10 @@ move16Left: { rts } // rotateLeft -// rotateLeft(byte* zp($57) p, byte zp($49) r) +// rotateLeft(byte* zp($57) p, byte zp($59) r) rotateLeft: { .label p = $57 - .label r = $49 + .label r = $59 // kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r !s: asl p+3 rol p+2 rol p+1 rol p bcc !+ lda p+3 adc #0 !: dex bne !s- }} ldx #r !s: @@ -11552,12 +11580,12 @@ move8Left: { // cursorLocation // Return a pointer to the location of the cursor cursorLocation: { - .label __0 = $57 - .label __1 = $57 - .label __3 = $57 - .label return = $57 - .label __4 = $5a - .label __5 = $57 + .label __0 = $5a + .label __1 = $5a + .label __3 = $5a + .label return = $5a + .label __4 = $5d + .label __5 = $5a // [382] cursorLocation::$3 = (word)*ROWCRS -- vwuz1=_word__deref_pbuc1 lda ROWCRS sta.z __3 @@ -11618,10 +11646,10 @@ cursorLocation: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// uctoa_append(byte* zp($2e) buffer, byte register(X) value, byte zp($59) sub) +// uctoa_append(byte* zp($2e) buffer, byte register(X) value, byte zp($5c) sub) uctoa_append: { .label buffer = $2e - .label sub = $59 + .label sub = $5c // [390] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] __b1_from_uctoa_append: // [390] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 @@ -11662,11 +11690,11 @@ uctoa_append: { } // printf_padding // Print a padding char a number of times -// printf_padding(byte zp($59) pad, byte zp($31) length) +// printf_padding(byte zp($5c) pad, byte zp($31) length) printf_padding: { .label i = $32 .label length = $31 - .label pad = $59 + .label pad = $5c // [397] phi from printf_padding to printf_padding::@1 [phi:printf_padding->printf_padding::@1] __b1_from_printf_padding: // [397] phi printf_padding::i#2 = 0 [phi:printf_padding->printf_padding::@1#0] -- vbuz1=vbuc1 @@ -12136,7 +12164,7 @@ const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c void* calloc(word calloc::nitems , word calloc::size) void* calloc::mem word calloc::nitems -word calloc::nitems#0 nitems zp[2]:90 53.25 +word calloc::nitems#0 nitems zp[2]:93 53.25 void* calloc::return void* calloc::return#0 return zp[2]:54 35.5 void* calloc::return#2 return zp[2]:54 22.0 @@ -12156,15 +12184,15 @@ to_nomodify byte* cputs::s#0 s zp[2]:56 5.00000005E7 to_nomodify byte* cputs::s#10 s zp[2]:56 1.55000002E8 to_nomodify byte* cputs::s#11 s zp[2]:56 1.0000001E7 byte* cursorLocation() -word~ cursorLocation::$0 zp[2]:87 2.00000000000002E14 -byte*~ cursorLocation::$1 zp[2]:87 2.00000000000002E14 -word~ cursorLocation::$3 zp[2]:87 1.500000000000015E14 -word~ cursorLocation::$4 zp[2]:90 2.00000000000002E14 -word~ cursorLocation::$5 zp[2]:87 2.00000000000002E14 +word~ cursorLocation::$0 zp[2]:90 2.00000000000002E14 +byte*~ cursorLocation::$1 zp[2]:90 2.00000000000002E14 +word~ cursorLocation::$3 zp[2]:90 1.500000000000015E14 +word~ cursorLocation::$4 zp[2]:93 2.00000000000002E14 +word~ cursorLocation::$5 zp[2]:90 2.00000000000002E14 byte* cursorLocation::return -byte* cursorLocation::return#0 return zp[2]:87 2.000000000002E12 -byte* cursorLocation::return#1 return zp[2]:87 2.775000000000075E13 -byte* cursorLocation::return#3 return zp[2]:87 2.0000000000002E13 +byte* cursorLocation::return#0 return zp[2]:90 2.000000000002E12 +byte* cursorLocation::return#1 return zp[2]:90 2.775000000000075E13 +byte* cursorLocation::return#3 return zp[2]:90 2.0000000000002E13 dword h0 dword h0#10 h0 zp[4]:6 2.312977099236641 dword h0#3 h0 zp[4]:6 40.4 @@ -12286,15 +12314,15 @@ dword* md5::w byte* md5::w#0 w zp[2]:62 0.7829457364341085 void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num) void* memcpy::destination -void* memcpy::destination#0 destination zp[2]:90 1.000000000001E12 -byte* memcpy::destination#2 destination zp[2]:90 11.0 -void* memcpy::destination#3 destination zp[2]:90 3.33333333341E11 -void* memcpy::destination#7 destination zp[2]:90 22.0 -void* memcpy::destination#8 destination zp[2]:90 22.0 +void* memcpy::destination#0 destination zp[2]:93 1.000000000001E12 +byte* memcpy::destination#2 destination zp[2]:93 11.0 +void* memcpy::destination#3 destination zp[2]:93 3.33333333341E11 +void* memcpy::destination#7 destination zp[2]:93 22.0 +void* memcpy::destination#8 destination zp[2]:93 22.0 byte* memcpy::dst -byte* memcpy::dst#1 dst zp[2]:90 1.0E16 -byte* memcpy::dst#2 dst zp[2]:90 1.0003333333333334E16 -byte* memcpy::dst#4 dst zp[2]:90 2.0000000000002E13 +byte* memcpy::dst#1 dst zp[2]:93 1.0E16 +byte* memcpy::dst#2 dst zp[2]:93 1.0003333333333334E16 +byte* memcpy::dst#4 dst zp[2]:93 2.0000000000002E13 word memcpy::num word memcpy::num#1 num zp[2]:2 11.0 word memcpy::num#3 num zp[2]:2 1.0000000000012E13 @@ -12308,7 +12336,7 @@ byte* memcpy::src#1 src zp[2]:44 2.0E16 byte* memcpy::src#2 src zp[2]:44 1.00025E16 byte* memcpy::src#4 src zp[2]:44 1.0000000000001E13 byte* memcpy::src_end -byte* memcpy::src_end#0 src_end zp[2]:87 1.25125E15 +byte* memcpy::src_end#0 src_end zp[2]:90 1.25125E15 void* memset(void* memset::str , byte memset::c , word memset::num) byte memset::c byte* memset::dst @@ -12316,10 +12344,10 @@ byte* memset::dst#1 dst zp[2]:46 2.0E16 byte* memset::dst#2 dst zp[2]:46 1.3336666666666668E16 byte* memset::dst#4 dst zp[2]:46 2.0000000000002E13 byte* memset::end -byte* memset::end#0 end zp[2]:90 1.6683333333333335E15 +byte* memset::end#0 end zp[2]:93 1.6683333333333335E15 word memset::num -word memset::num#0 num zp[2]:90 101.0 -word memset::num#2 num zp[2]:90 1.00000000000515E13 +word memset::num#0 num zp[2]:93 101.0 +word memset::num#2 num zp[2]:93 1.00000000000515E13 void* memset::return void* memset::str void* memset::str#0 str zp[2]:46 202.0 @@ -12351,7 +12379,7 @@ byte move8Left::t byte move8Left::t#0 reg byte x 50000.5 word mul3(byte mul3::a) word~ mul3::$1 zp[2]:44 15001.5 -word~ mul3::$2 zp[2]:90 20002.0 +word~ mul3::$2 zp[2]:93 20002.0 byte mul3::a byte mul3::a#0 reg byte a 1001.0 word mul3::return @@ -12359,7 +12387,7 @@ word mul3::return#0 return zp[2]:44 3667.333333333333 word mul3::return#2 return zp[2]:44 2002.0 word mul5(byte mul5::a) word~ mul5::$1 zp[2]:44 15001.5 -word~ mul5::$2 zp[2]:87 20002.0 +word~ mul5::$2 zp[2]:93 20002.0 byte mul5::a byte mul5::a#0 reg byte a 1001.0 word mul5::return @@ -12415,7 +12443,7 @@ byte printf_padding::length#0 length zp[1]:49 2000002.0 byte printf_padding::length#1 length zp[1]:49 2000002.0 byte printf_padding::length#4 length zp[1]:49 1.6670000005E9 byte printf_padding::pad -byte printf_padding::pad#5 pad zp[1]:89 1.6666666668333333E9 +byte printf_padding::pad#5 pad zp[1]:92 1.6666666668333333E9 void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix) struct printf_format_number printf_uchar::format byte printf_uchar::format_justify_left @@ -12437,7 +12465,7 @@ byte printf_uchar::uvalue#6 reg byte x 2002.0 void putchar(byte putchar::code) byte putchar::code byte* putchar::loc -byte* putchar::loc#0 loc zp[2]:87 1.000000000001E12 +byte* putchar::loc#0 loc zp[2]:90 1.000000000001E12 byte putchar::newChar byte putchar::newChar#0 reg byte a 1.5000000000015E12 const byte* rawmap[$100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32, 3,96) // the table for converting bit 6,7 into ora value @@ -12447,15 +12475,15 @@ const byte* rawmap[$100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32 .byte mask | ht.get(idx) } }} -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) -byte* rotateLeft::p loadstore zp[2]:87 5000.5 -byte rotateLeft::r loadstore zp[1]:73 10001.0 +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) +volatile byte* rotateLeft::p loadstore zp[2]:87 5000.5 +volatile byte rotateLeft::r loadstore zp[1]:89 10001.0 void setcursor() byte setcursor::c byte setcursor::c#0 reg byte x 7.50000000000075E12 byte setcursor::c#1 reg byte a 2.0000000000002E13 byte* setcursor::loc -byte* setcursor::loc#0 loc zp[2]:87 1.0000000000001E13 +byte* setcursor::loc#0 loc zp[2]:90 1.0000000000001E13 word strlen(byte* strlen::str) word strlen::len word strlen::len#1 len zp[2]:2 1.00000001E8 @@ -12477,7 +12505,7 @@ byte uctoa::digit byte uctoa::digit#1 digit zp[1]:48 2.000000002E9 byte uctoa::digit#2 digit zp[1]:48 3.07692308E8 byte uctoa::digit_value -byte uctoa::digit_value#0 digit_value zp[1]:89 6.000000005999999E8 +byte uctoa::digit_value#0 digit_value zp[1]:92 6.000000005999999E8 byte* uctoa::digit_values byte uctoa::max_digits byte uctoa::radix @@ -12498,7 +12526,7 @@ byte uctoa_append::digit#2 reg byte y 1.000050000000015E14 byte uctoa_append::return byte uctoa_append::return#0 reg byte x 2.000000002E9 byte uctoa_append::sub -byte uctoa_append::sub#0 sub zp[1]:89 3.33335000000005E13 +byte uctoa_append::sub#0 sub zp[1]:92 3.33335000000005E13 byte uctoa_append::value byte uctoa_append::value#0 reg byte x 3.666666667333333E9 byte uctoa_append::value#1 reg byte x 2.00000000000002E14 @@ -12539,7 +12567,7 @@ reg byte a [ md5::$24 ] reg byte a [ md5::$25 ] zp[1]:68 [ md5::$72 ] zp[4]:69 [ leftRotate::a ] -zp[1]:73 [ leftRotate::r#0 rotateLeft::r printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] +zp[1]:73 [ leftRotate::r#0 printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] zp[4]:74 [ leftRotate::return#2 md5::lr#0 leftRotate::return#0 md5::b#1 ] reg byte a [ mul7::a#0 ] reg byte a [ mod16::return#4 ] @@ -12552,23 +12580,25 @@ zp[4]:82 [ md5::$27 md5::$28 ] reg byte x [ cputc::convertToScreenCode1_return#0 ] zp[1]:86 [ printf_number_buffer::buffer_sign#0 ] reg byte x [ leftRotate::$5 ] +zp[2]:87 [ rotateLeft::p ] +zp[1]:89 [ rotateLeft::r ] reg byte x [ leftRotate::$9 ] reg byte a [ mod16::return#0 ] -zp[2]:87 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul5::$2 rotateLeft::p memcpy::src_end#0 ] +zp[2]:90 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul7::$2 mul7::$3 mul7::$4 memcpy::src_end#0 ] reg byte a [ putchar::newChar#0 ] reg byte x [ setcursor::c#0 ] reg byte a [ setcursor::c#1 ] -zp[1]:89 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ] +zp[1]:92 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ] reg byte x [ uctoa_append::return#0 ] reg byte y [ move16Left::s#0 ] reg byte x [ move16Left::t#0 ] reg byte x [ move8Left::t#0 ] -zp[2]:90 [ cursorLocation::$4 mul3::$2 mul7::$2 mul7::$3 mul7::$4 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] +zp[2]:93 [ cursorLocation::$4 mul5::$2 mul3::$2 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] mem[12] [ printf_buffer ] FINAL ASSEMBLER -Score: 652901 +Score: 652907 // File Comments // 8 bit converted md5 calculator @@ -14039,10 +14069,10 @@ cputc: { // Allocates memory and returns a pointer to it. Sets allocated memory to zero. // - nitems āˆ’ This is the number of elements to be allocated. // - size āˆ’ This is the size of elements. -// calloc(word zp($5a) nitems) +// calloc(word zp($5d) nitems) calloc: { .label return = $36 - .label nitems = $5a + .label nitems = $5d // malloc(nitems*size) // [195] malloc::size#0 = calloc::nitems#0 -- vwuz1=vwuz2 lda.z nitems @@ -14073,12 +14103,12 @@ calloc: { // memcpy // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. -// memcpy(void* zp($5a) destination, byte* zp($2c) source, word zp(2) num) +// memcpy(void* zp($5d) destination, byte* zp($2c) source, word zp(2) num) memcpy: { - .label src_end = $57 - .label dst = $5a + .label src_end = $5a + .label dst = $5d .label src = $2c - .label destination = $5a + .label destination = $5d .label source = $2c .label num = 2 // src_end = (char*)source+num @@ -14342,7 +14372,9 @@ leftRotate: { sta.z rotateLeft.p lda #>p sta.z rotateLeft.p+1 - // [255] rotateLeft::r = leftRotate::r#0 + // [255] rotateLeft::r = leftRotate::r#0 -- vbuz1=vbuz2 + lda.z r + sta.z rotateLeft.r // [256] call rotateLeft jsr rotateLeft jmp __b5 @@ -14417,7 +14449,7 @@ mod16: { mul3: { .label __1 = $2c .label return = $2c - .label __2 = $5a + .label __2 = $5d // ((uint16_t) a) * 3 // [267] mul3::$1 = (word)mul3::a#0 -- vwuz1=_word_vbuaa sta.z __1 @@ -14448,7 +14480,7 @@ mul3: { mul5: { .label __1 = $2c .label return = $2c - .label __2 = $57 + .label __2 = $5d // ((uint16_t) a) * 5 // [271] mul5::$1 = (word)mul5::a#0 -- vwuz1=_word_vbuaa sta.z __1 @@ -14479,7 +14511,7 @@ mul5: { // putchar // Puts a character to the screen a the current location. Uses internal screencode. Deals with storing the old cursor value putchar: { - .label loc = $57 + .label loc = $5a // **OLDADR = *OLDCHR // [275] *(*OLDADR) = *OLDCHR -- _deref_(_deref_qbuc1)=_deref_pbuc2 lda OLDCHR @@ -14517,7 +14549,7 @@ putchar: { // setcursor // Handles cursor movement, displaying it if required, and inverting character it is over if there is one (and enabled) setcursor: { - .label loc = $57 + .label loc = $5a // **OLDADR = *OLDCHR // [284] *(*OLDADR) = *OLDCHR -- _deref_(_deref_qbuc1)=_deref_pbuc2 // save the current oldchr into oldadr @@ -14689,12 +14721,12 @@ malloc: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($2e) str, word zp($5a) num) +// memset(void* zp($2e) str, word zp($5d) num) memset: { - .label end = $5a + .label end = $5d .label dst = $2e .label str = $2e - .label num = $5a + .label num = $5d // if(num>0) // [313] if(memset::num#2<=0) goto memset::@return -- vwuz1_le_0_then_la1 lda.z num @@ -14753,7 +14785,7 @@ memset: { // - radix : The radix to convert the number to (from the enum RADIX) // uctoa(byte register(X) value, byte* zp($2e) buffer) uctoa: { - .label digit_value = $59 + .label digit_value = $5c .label buffer = $2e .label digit = $30 .label started = $31 @@ -15028,10 +15060,10 @@ move16Left: { rts } // rotateLeft -// rotateLeft(byte* zp($57) p, byte zp($49) r) +// rotateLeft(byte* zp($57) p, byte zp($59) r) rotateLeft: { .label p = $57 - .label r = $49 + .label r = $59 // kickasm // kickasm( uses rotateLeft::p uses rotateLeft::r) {{ ldx #r !s: asl p+3 rol p+2 rol p+1 rol p bcc !+ lda p+3 adc #0 !: dex bne !s- }} ldx #r @@ -15080,12 +15112,12 @@ move8Left: { // cursorLocation // Return a pointer to the location of the cursor cursorLocation: { - .label __0 = $57 - .label __1 = $57 - .label __3 = $57 - .label return = $57 - .label __4 = $5a - .label __5 = $57 + .label __0 = $5a + .label __1 = $5a + .label __3 = $5a + .label return = $5a + .label __4 = $5d + .label __5 = $5a // (word)(*ROWCRS)*CONIO_WIDTH // [382] cursorLocation::$3 = (word)*ROWCRS -- vwuz1=_word__deref_pbuc1 lda ROWCRS @@ -15148,10 +15180,10 @@ cursorLocation: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// uctoa_append(byte* zp($2e) buffer, byte register(X) value, byte zp($59) sub) +// uctoa_append(byte* zp($2e) buffer, byte register(X) value, byte zp($5c) sub) uctoa_append: { .label buffer = $2e - .label sub = $59 + .label sub = $5c // [390] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] // [390] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 ldy #0 @@ -15190,11 +15222,11 @@ uctoa_append: { } // printf_padding // Print a padding char a number of times -// printf_padding(byte zp($59) pad, byte zp($31) length) +// printf_padding(byte zp($5c) pad, byte zp($31) length) printf_padding: { .label i = $32 .label length = $31 - .label pad = $59 + .label pad = $5c // [397] phi from printf_padding to printf_padding::@1 [phi:printf_padding->printf_padding::@1] // [397] phi printf_padding::i#2 = 0 [phi:printf_padding->printf_padding::@1#0] -- vbuz1=vbuc1 lda #0 diff --git a/src/test/ref/atarixl-md5.sym b/src/test/ref/atarixl-md5.sym index 47c0a0347..4dd9db9d5 100644 --- a/src/test/ref/atarixl-md5.sym +++ b/src/test/ref/atarixl-md5.sym @@ -16,7 +16,7 @@ const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c void* calloc(word calloc::nitems , word calloc::size) void* calloc::mem word calloc::nitems -word calloc::nitems#0 nitems zp[2]:90 53.25 +word calloc::nitems#0 nitems zp[2]:93 53.25 void* calloc::return void* calloc::return#0 return zp[2]:54 35.5 void* calloc::return#2 return zp[2]:54 22.0 @@ -36,15 +36,15 @@ to_nomodify byte* cputs::s#0 s zp[2]:56 5.00000005E7 to_nomodify byte* cputs::s#10 s zp[2]:56 1.55000002E8 to_nomodify byte* cputs::s#11 s zp[2]:56 1.0000001E7 byte* cursorLocation() -word~ cursorLocation::$0 zp[2]:87 2.00000000000002E14 -byte*~ cursorLocation::$1 zp[2]:87 2.00000000000002E14 -word~ cursorLocation::$3 zp[2]:87 1.500000000000015E14 -word~ cursorLocation::$4 zp[2]:90 2.00000000000002E14 -word~ cursorLocation::$5 zp[2]:87 2.00000000000002E14 +word~ cursorLocation::$0 zp[2]:90 2.00000000000002E14 +byte*~ cursorLocation::$1 zp[2]:90 2.00000000000002E14 +word~ cursorLocation::$3 zp[2]:90 1.500000000000015E14 +word~ cursorLocation::$4 zp[2]:93 2.00000000000002E14 +word~ cursorLocation::$5 zp[2]:90 2.00000000000002E14 byte* cursorLocation::return -byte* cursorLocation::return#0 return zp[2]:87 2.000000000002E12 -byte* cursorLocation::return#1 return zp[2]:87 2.775000000000075E13 -byte* cursorLocation::return#3 return zp[2]:87 2.0000000000002E13 +byte* cursorLocation::return#0 return zp[2]:90 2.000000000002E12 +byte* cursorLocation::return#1 return zp[2]:90 2.775000000000075E13 +byte* cursorLocation::return#3 return zp[2]:90 2.0000000000002E13 dword h0 dword h0#10 h0 zp[4]:6 2.312977099236641 dword h0#3 h0 zp[4]:6 40.4 @@ -166,15 +166,15 @@ dword* md5::w byte* md5::w#0 w zp[2]:62 0.7829457364341085 void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num) void* memcpy::destination -void* memcpy::destination#0 destination zp[2]:90 1.000000000001E12 -byte* memcpy::destination#2 destination zp[2]:90 11.0 -void* memcpy::destination#3 destination zp[2]:90 3.33333333341E11 -void* memcpy::destination#7 destination zp[2]:90 22.0 -void* memcpy::destination#8 destination zp[2]:90 22.0 +void* memcpy::destination#0 destination zp[2]:93 1.000000000001E12 +byte* memcpy::destination#2 destination zp[2]:93 11.0 +void* memcpy::destination#3 destination zp[2]:93 3.33333333341E11 +void* memcpy::destination#7 destination zp[2]:93 22.0 +void* memcpy::destination#8 destination zp[2]:93 22.0 byte* memcpy::dst -byte* memcpy::dst#1 dst zp[2]:90 1.0E16 -byte* memcpy::dst#2 dst zp[2]:90 1.0003333333333334E16 -byte* memcpy::dst#4 dst zp[2]:90 2.0000000000002E13 +byte* memcpy::dst#1 dst zp[2]:93 1.0E16 +byte* memcpy::dst#2 dst zp[2]:93 1.0003333333333334E16 +byte* memcpy::dst#4 dst zp[2]:93 2.0000000000002E13 word memcpy::num word memcpy::num#1 num zp[2]:2 11.0 word memcpy::num#3 num zp[2]:2 1.0000000000012E13 @@ -188,7 +188,7 @@ byte* memcpy::src#1 src zp[2]:44 2.0E16 byte* memcpy::src#2 src zp[2]:44 1.00025E16 byte* memcpy::src#4 src zp[2]:44 1.0000000000001E13 byte* memcpy::src_end -byte* memcpy::src_end#0 src_end zp[2]:87 1.25125E15 +byte* memcpy::src_end#0 src_end zp[2]:90 1.25125E15 void* memset(void* memset::str , byte memset::c , word memset::num) byte memset::c byte* memset::dst @@ -196,10 +196,10 @@ byte* memset::dst#1 dst zp[2]:46 2.0E16 byte* memset::dst#2 dst zp[2]:46 1.3336666666666668E16 byte* memset::dst#4 dst zp[2]:46 2.0000000000002E13 byte* memset::end -byte* memset::end#0 end zp[2]:90 1.6683333333333335E15 +byte* memset::end#0 end zp[2]:93 1.6683333333333335E15 word memset::num -word memset::num#0 num zp[2]:90 101.0 -word memset::num#2 num zp[2]:90 1.00000000000515E13 +word memset::num#0 num zp[2]:93 101.0 +word memset::num#2 num zp[2]:93 1.00000000000515E13 void* memset::return void* memset::str void* memset::str#0 str zp[2]:46 202.0 @@ -231,7 +231,7 @@ byte move8Left::t byte move8Left::t#0 reg byte x 50000.5 word mul3(byte mul3::a) word~ mul3::$1 zp[2]:44 15001.5 -word~ mul3::$2 zp[2]:90 20002.0 +word~ mul3::$2 zp[2]:93 20002.0 byte mul3::a byte mul3::a#0 reg byte a 1001.0 word mul3::return @@ -239,7 +239,7 @@ word mul3::return#0 return zp[2]:44 3667.333333333333 word mul3::return#2 return zp[2]:44 2002.0 word mul5(byte mul5::a) word~ mul5::$1 zp[2]:44 15001.5 -word~ mul5::$2 zp[2]:87 20002.0 +word~ mul5::$2 zp[2]:93 20002.0 byte mul5::a byte mul5::a#0 reg byte a 1001.0 word mul5::return @@ -295,7 +295,7 @@ byte printf_padding::length#0 length zp[1]:49 2000002.0 byte printf_padding::length#1 length zp[1]:49 2000002.0 byte printf_padding::length#4 length zp[1]:49 1.6670000005E9 byte printf_padding::pad -byte printf_padding::pad#5 pad zp[1]:89 1.6666666668333333E9 +byte printf_padding::pad#5 pad zp[1]:92 1.6666666668333333E9 void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix) struct printf_format_number printf_uchar::format byte printf_uchar::format_justify_left @@ -317,7 +317,7 @@ byte printf_uchar::uvalue#6 reg byte x 2002.0 void putchar(byte putchar::code) byte putchar::code byte* putchar::loc -byte* putchar::loc#0 loc zp[2]:87 1.000000000001E12 +byte* putchar::loc#0 loc zp[2]:90 1.000000000001E12 byte putchar::newChar byte putchar::newChar#0 reg byte a 1.5000000000015E12 const byte* rawmap[$100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32, 3,96) // the table for converting bit 6,7 into ora value @@ -327,15 +327,15 @@ const byte* rawmap[$100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32 .byte mask | ht.get(idx) } }} -void rotateLeft(byte* rotateLeft::p , byte rotateLeft::r) -byte* rotateLeft::p loadstore zp[2]:87 5000.5 -byte rotateLeft::r loadstore zp[1]:73 10001.0 +void rotateLeft(volatile byte* rotateLeft::p , volatile byte rotateLeft::r) +volatile byte* rotateLeft::p loadstore zp[2]:87 5000.5 +volatile byte rotateLeft::r loadstore zp[1]:89 10001.0 void setcursor() byte setcursor::c byte setcursor::c#0 reg byte x 7.50000000000075E12 byte setcursor::c#1 reg byte a 2.0000000000002E13 byte* setcursor::loc -byte* setcursor::loc#0 loc zp[2]:87 1.0000000000001E13 +byte* setcursor::loc#0 loc zp[2]:90 1.0000000000001E13 word strlen(byte* strlen::str) word strlen::len word strlen::len#1 len zp[2]:2 1.00000001E8 @@ -357,7 +357,7 @@ byte uctoa::digit byte uctoa::digit#1 digit zp[1]:48 2.000000002E9 byte uctoa::digit#2 digit zp[1]:48 3.07692308E8 byte uctoa::digit_value -byte uctoa::digit_value#0 digit_value zp[1]:89 6.000000005999999E8 +byte uctoa::digit_value#0 digit_value zp[1]:92 6.000000005999999E8 byte* uctoa::digit_values byte uctoa::max_digits byte uctoa::radix @@ -378,7 +378,7 @@ byte uctoa_append::digit#2 reg byte y 1.000050000000015E14 byte uctoa_append::return byte uctoa_append::return#0 reg byte x 2.000000002E9 byte uctoa_append::sub -byte uctoa_append::sub#0 sub zp[1]:89 3.33335000000005E13 +byte uctoa_append::sub#0 sub zp[1]:92 3.33335000000005E13 byte uctoa_append::value byte uctoa_append::value#0 reg byte x 3.666666667333333E9 byte uctoa_append::value#1 reg byte x 2.00000000000002E14 @@ -419,7 +419,7 @@ reg byte a [ md5::$24 ] reg byte a [ md5::$25 ] zp[1]:68 [ md5::$72 ] zp[4]:69 [ leftRotate::a ] -zp[1]:73 [ leftRotate::r#0 rotateLeft::r printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] +zp[1]:73 [ leftRotate::r#0 printf_uchar::format_zero_padding#10 printf_number_buffer::format_zero_padding#0 ] zp[4]:74 [ leftRotate::return#2 md5::lr#0 leftRotate::return#0 md5::b#1 ] reg byte a [ mul7::a#0 ] reg byte a [ mod16::return#4 ] @@ -432,16 +432,18 @@ zp[4]:82 [ md5::$27 md5::$28 ] reg byte x [ cputc::convertToScreenCode1_return#0 ] zp[1]:86 [ printf_number_buffer::buffer_sign#0 ] reg byte x [ leftRotate::$5 ] +zp[2]:87 [ rotateLeft::p ] +zp[1]:89 [ rotateLeft::r ] reg byte x [ leftRotate::$9 ] reg byte a [ mod16::return#0 ] -zp[2]:87 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul5::$2 rotateLeft::p memcpy::src_end#0 ] +zp[2]:90 [ cursorLocation::return#0 putchar::loc#0 cursorLocation::return#1 cursorLocation::return#3 setcursor::loc#0 cursorLocation::$0 cursorLocation::$1 cursorLocation::$3 cursorLocation::$5 mul7::$2 mul7::$3 mul7::$4 memcpy::src_end#0 ] reg byte a [ putchar::newChar#0 ] reg byte x [ setcursor::c#0 ] reg byte a [ setcursor::c#1 ] -zp[1]:89 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ] +zp[1]:92 [ uctoa::digit_value#0 uctoa_append::sub#0 printf_padding::pad#5 ] reg byte x [ uctoa_append::return#0 ] reg byte y [ move16Left::s#0 ] reg byte x [ move16Left::t#0 ] reg byte x [ move8Left::t#0 ] -zp[2]:90 [ cursorLocation::$4 mul3::$2 mul7::$2 mul7::$3 mul7::$4 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] +zp[2]:93 [ cursorLocation::$4 mul5::$2 mul3::$2 memset::num#2 memset::num#0 calloc::nitems#0 memset::end#0 memcpy::destination#3 memcpy::destination#7 memcpy::destination#8 memcpy::destination#0 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 memcpy::destination#2 ] mem[12] [ printf_buffer ] diff --git a/src/test/ref/examples/atari2600/atari2600-sprites.log b/src/test/ref/examples/atari2600/atari2600-sprites.log index b7d7dd671..443b14a35 100644 --- a/src/test/ref/examples/atari2600/atari2600-sprites.log +++ b/src/test/ref/examples/atari2600/atari2600-sprites.log @@ -1,6 +1,7 @@ Fixing struct type size struct MOS6532_RIOT to 24 Fixing struct type SIZE_OF struct MOS6532_RIOT to 24 Fixing struct type SIZE_OF struct MOS6532_RIOT to 24 +Setting inferred volatile on symbol affected by address-of: p0_xpos in asm { ldap0_xpos staTIA_WSYNC sec !: sbc#$f bcs!- eor#7 asl asl asl asl staTIA_HMP0 staTIA_RESP0 } Inlined call call __init CONTROL FLOW GRAPH SSA @@ -305,7 +306,7 @@ byte main::p0_idx#6 byte main::p0_idx#7 byte main::p0_idx#8 byte main::p0_idx#9 -byte p0_xpos loadstore +volatile byte p0_xpos loadstore byte p0_ypos byte p0_ypos#0 byte p0_ypos#1 @@ -685,7 +686,7 @@ byte main::p0_idx byte main::p0_idx#3 2002.0 byte main::p0_idx#4 500.5 byte main::p0_idx#8 1501.5 -byte p0_xpos loadstore 2.452380952380952 +volatile byte p0_xpos loadstore 2.452380952380952 byte p0_ypos byte p0_ypos#0 52.476190476190474 @@ -1204,7 +1205,7 @@ byte main::p0_idx byte main::p0_idx#3 reg byte y 2002.0 byte main::p0_idx#4 reg byte y 500.5 byte main::p0_idx#8 reg byte y 1501.5 -byte p0_xpos loadstore zp[1]:130 2.452380952380952 +volatile byte p0_xpos loadstore zp[1]:130 2.452380952380952 byte p0_ypos byte p0_ypos#0 p0_ypos zp[1]:131 52.476190476190474 diff --git a/src/test/ref/examples/atari2600/atari2600-sprites.sym b/src/test/ref/examples/atari2600/atari2600-sprites.sym index 687021491..362e83b8e 100644 --- a/src/test/ref/examples/atari2600/atari2600-sprites.sym +++ b/src/test/ref/examples/atari2600/atari2600-sprites.sym @@ -33,7 +33,7 @@ byte main::p0_idx byte main::p0_idx#3 reg byte y 2002.0 byte main::p0_idx#4 reg byte y 500.5 byte main::p0_idx#8 reg byte y 1501.5 -byte p0_xpos loadstore zp[1]:130 2.452380952380952 +volatile byte p0_xpos loadstore zp[1]:130 2.452380952380952 byte p0_ypos byte p0_ypos#0 p0_ypos zp[1]:131 52.476190476190474 diff --git a/src/test/ref/examples/eightqueens/eightqueens-recursive.asm b/src/test/ref/examples/eightqueens/eightqueens-recursive.asm index c74ee2375..aa82aaa8c 100644 --- a/src/test/ref/examples/eightqueens/eightqueens-recursive.asm +++ b/src/test/ref/examples/eightqueens/eightqueens-recursive.asm @@ -27,13 +27,13 @@ .label CIA1 = $dc00 // The number of bytes on the screen // The current cursor x-position - .label conio_cursor_x = $10 + .label conio_cursor_x = $f // The current cursor y-position - .label conio_cursor_y = $11 + .label conio_cursor_y = $10 // The current text cursor line start - .label conio_line_text = $12 + .label conio_line_text = $11 // The current color cursor line start - .label conio_line_color = $14 + .label conio_line_color = $13 // The number of found solutions .label count = 2 __start: { @@ -66,19 +66,20 @@ __start: { // Generates all valid placements of queens on a NxN board recursively // Works by generating all legal placements af a queen for a specific row taking into consideration the queens already placed on the rows below // and then recursively generating all legal placements on the rows above. -// queen(byte zp($17) row) +// queen(byte zp($1e) row) queen: { .const OFFSET_STACK_ROW = 0 - .label r = $17 - .label column = $18 - .label __1 = $1c + .label r = $15 + .label column = $16 + .label __1 = $1a .label __4 = $17 - .label row = $17 + .label row = $1e // } tsx lda STACK_BASE+OFFSET_STACK_ROW,x sta.z row // r = row + sta.z r // column=1 lda #1 sta.z column @@ -91,6 +92,10 @@ queen: { rts __b2: // legal(r,column) + lda.z r + sta.z legal.row + lda.z column + sta.z legal.column jsr legal // legal(r,column) // if(legal(r,column)) @@ -114,10 +119,12 @@ queen: { tya pha // r+1 - inc.z __4 + tay + iny + sty.z __4 // queen(r+1) // Do recursion - lda.z __4 + tya pha jsr queen pla @@ -221,15 +228,15 @@ main: { // If no conflict for desired position returns 1 otherwise returns 0 // legal(byte zp($17) row, byte zp($18) column) legal: { - .label __0 = $1a - .label __3 = $1b - .label __4 = $d + .label __0 = $1c + .label __3 = $1d + .label __4 = $21 .label row = $17 .label column = $18 // Placement is legal // The same column is a conflict. // The same diagonal is a conflict. - .label return = $1c + .label return = $1a .label i = $19 lda #1 sta.z i @@ -383,8 +390,8 @@ print: { clrscr: { .label c = 6 .label line_text = $b - .label line_cols = $e - .label l = $1c + .label line_cols = $d + .label l = $1a lda #COLORRAM @@ -459,7 +466,7 @@ clrscr: { // Output a NUL-terminated string at the current cursor position // cputs(byte* zp($b) s) cputs: { - .label c = $d + .label c = $21 .label s = $b __b1: // while(c=*s++) @@ -512,12 +519,12 @@ printf_uint: { } // Initialize time-of-day clock // This uses the MOS6526 CIA#1 -// tod_init(byte zp($16) tod_TENTHS, byte zp($17) tod_SEC, byte zp($18) tod_MIN, byte zp($19) tod_HOURS) +// tod_init(byte zp($18) tod_TENTHS, byte zp($19) tod_SEC, byte zp($1a) tod_MIN, byte zp($1b) tod_HOURS) tod_init: { - .label tod_TENTHS = $16 - .label tod_SEC = $17 - .label tod_MIN = $18 - .label tod_HOURS = $19 + .label tod_TENTHS = $18 + .label tod_SEC = $19 + .label tod_MIN = $1a + .label tod_HOURS = $1b // CIA1->TIMER_A_CONTROL |= 0x80 // Set 50hz (this assumes PAL!) (bit7=1) lda #$80 @@ -574,16 +581,16 @@ tod_str: { .label __1 = $1d .label __2 = $1c .label __3 = $1c - .label __4 = $20 - .label __5 = $20 + .label __4 = $26 + .label __5 = $26 .label __6 = $1b .label __7 = $1b - .label __8 = $21 - .label __9 = $21 + .label __8 = $1e + .label __9 = $1e .label __10 = $1a .label __11 = $1a - .label __12 = $26 - .label __13 = $26 + .label __12 = $21 + .label __13 = $21 .label __14 = $19 .label __15 = $19 .label tod_TENTHS = $19 @@ -738,12 +745,12 @@ printf_string: { rts } // Find the absolute difference between two unsigned chars -// diff(byte zp($d) a, byte zp(6) b) +// diff(byte zp($21) a, byte zp(6) b) diff: { - .label a = $d + .label a = $21 .label b = 6 - .label return = $1b - .label return_1 = $d + .label return = $1d + .label return_1 = $21 // if(aprintf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS @@ -936,16 +943,16 @@ utoa: { } // Print the contents of the number buffer using a specific format. // This handles minimum length, zero-filling, and left/right justification from the format -// printf_number_buffer(byte zp($20) buffer_sign, byte zp($1a) format_min_length, byte zp($1b) format_justify_left, byte zp($1d) format_zero_padding, byte zp($21) format_upper_case) +// printf_number_buffer(byte zp($1c) buffer_sign, byte zp($17) format_min_length, byte zp($18) format_justify_left, byte zp($1b) format_zero_padding, byte zp($1d) format_upper_case) printf_number_buffer: { - .label __19 = $1e - .label buffer_sign = $20 - .label len = $d - .label padding = $1a - .label format_min_length = $1a - .label format_zero_padding = $1d - .label format_justify_left = $1b - .label format_upper_case = $21 + .label __19 = $1f + .label buffer_sign = $1c + .label len = $21 + .label padding = $17 + .label format_min_length = $17 + .label format_zero_padding = $1b + .label format_justify_left = $18 + .label format_upper_case = $1d // if(format.min_length) lda #0 cmp.z format_min_length @@ -1057,13 +1064,13 @@ printf_number_buffer: { // - radix : The radix to convert the number to (from the enum RADIX) // ultoa(dword zp(7) value, byte* zp($b) buffer) ultoa: { - .label __10 = $21 - .label __11 = $20 + .label __10 = $26 + .label __11 = $21 .label digit_value = $22 .label buffer = $b - .label digit = $1b + .label digit = $18 .label value = 7 - .label started = $1d + .label started = $1b lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS @@ -1152,13 +1159,13 @@ ultoa: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// uctoa(byte zp($21) value, byte* zp($e) buffer) +// uctoa(byte zp($1d) value, byte* zp($d) buffer) uctoa: { .label digit_value = $26 - .label buffer = $e - .label digit = $20 - .label value = $21 - .label started = $d + .label buffer = $d + .label digit = $1c + .label value = $1d + .label started = $21 lda #printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS @@ -1253,13 +1260,13 @@ cputln: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// utoa_append(byte* zp($b) buffer, word zp($e) value, word zp($1e) sub) +// utoa_append(byte* zp($b) buffer, word zp($d) value, word zp($1f) sub) utoa_append: { .label buffer = $b - .label value = $e - .label sub = $1e - .label return = $e - .label digit = $1c + .label value = $d + .label sub = $1f + .label return = $d + .label digit = $1a lda #0 sta.z digit __b1: @@ -1293,11 +1300,11 @@ utoa_append: { jmp __b1 } // Computes the length of the string str up to but not including the terminating null character. -// strlen(byte* zp($e) str) +// strlen(byte* zp($d) str) strlen: { - .label len = $1e - .label str = $e - .label return = $1e + .label len = $1f + .label str = $d + .label return = $1f lda #<0 sta.z len sta.z len+1 @@ -1327,11 +1334,11 @@ strlen: { jmp __b1 } // Print a padding char a number of times -// printf_padding(byte zp($d) pad, byte zp($1c) length) +// printf_padding(byte zp($21) pad, byte zp($1a) length) printf_padding: { .label i = $26 - .label length = $1c - .label pad = $d + .label length = $1a + .label pad = $21 lda #0 sta.z i __b1: @@ -1351,8 +1358,8 @@ printf_padding: { // Converts a string to uppercase. strupr: { .label str = printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS - .label __0 = $1c - .label src = $1e + .label __0 = $1a + .label src = $1f lda #str @@ -1451,13 +1458,13 @@ ultoa_append: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// uctoa_append(byte* zp($e) buffer, byte zp($21) value, byte zp($26) sub) +// uctoa_append(byte* zp($d) buffer, byte zp($1d) value, byte zp($26) sub) uctoa_append: { - .label buffer = $e - .label value = $21 + .label buffer = $d + .label value = $1d .label sub = $26 - .label return = $21 - .label digit = $1c + .label return = $1d + .label digit = $1a lda #0 sta.z digit __b1: @@ -1548,10 +1555,10 @@ cscroll: { } // Convert lowercase alphabet to uppercase // Returns uppercase equivalent to c, if such value exists, else c remains unchanged -// toupper(byte zp($1c) ch) +// toupper(byte zp($1a) ch) toupper: { - .label return = $1c - .label ch = $1c + .label return = $1a + .label ch = $1a // if(ch>='a' && ch<='z') lda.z ch cmp #'a' @@ -1571,13 +1578,13 @@ toupper: { } // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. -// memcpy(void* zp($e) destination, void* zp($1e) source) +// memcpy(void* zp($d) destination, void* zp($1f) source) memcpy: { .label src_end = $27 - .label dst = $e - .label src = $1e - .label source = $1e - .label destination = $e + .label dst = $d + .label src = $1f + .label source = $1f + .label destination = $d // src_end = (char*)source+num clc lda.z source @@ -1613,12 +1620,12 @@ memcpy: { jmp __b1 } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($e) str, byte zp($16) c) +// memset(void* zp($d) str, byte zp($1e) c) memset: { .label end = $27 - .label dst = $e - .label str = $e - .label c = $16 + .label dst = $d + .label str = $d + .label c = $1e // end = (char*)str + num lda #$28 clc diff --git a/src/test/ref/examples/eightqueens/eightqueens-recursive.log b/src/test/ref/examples/eightqueens/eightqueens-recursive.log index 763aabe64..26d3ad02e 100644 --- a/src/test/ref/examples/eightqueens/eightqueens-recursive.log +++ b/src/test/ref/examples/eightqueens/eightqueens-recursive.log @@ -8,6 +8,8 @@ Added struct type cast to parameter value list call printf_string main::$6 (stru Added struct type cast to parameter value list call printf_ulong count (struct printf_format_number){ 0, 0, 0, 0, 0, DECIMAL } Added struct type cast to parameter value list call printf_uchar print::i (struct printf_format_number){ 0, 0, 0, 0, 0, HEXADECIMAL } Added struct type cast to parameter value list call printf_uchar print::i1 (struct printf_format_number){ 0, 0, 0, 0, 0, HEXADECIMAL } +Setting inferred volatile on symbol affected by address-of: queen::column in asm { ldacolumn pha ldar pha } +Setting inferred volatile on symbol affected by address-of: queen::r in asm { ldacolumn pha ldar pha } Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx Inlined call call __init Eliminating unused variable with no statement main::$1 @@ -2760,8 +2762,8 @@ bool~ queen::$3 number~ queen::$4 bool~ queen::$7 const byte queen::OFFSET_STACK_ROW = 0 -byte queen::column loadstore -byte queen::r loadstore +volatile byte queen::column loadstore +volatile byte queen::r loadstore byte queen::row byte queen::row#0 word strlen(byte* strlen::str) @@ -6536,8 +6538,8 @@ dword printf_ulong::uvalue#2 61.5 __stackcall void queen(byte queen::row) byte~ queen::$1 2.000000000002E12 byte~ queen::$4 2.000000000002E12 -byte queen::column loadstore 2.9411764706505884E11 -byte queen::r loadstore 2.10526315795E11 +volatile byte queen::column loadstore 2.9411764706505884E11 +volatile byte queen::r loadstore 2.10526315795E11 byte queen::row byte queen::row#0 202.0 word strlen(byte* strlen::str) @@ -7710,8 +7712,6 @@ Coalescing zero page register [ zp[1]:69 [ toupper::return#2 toupper::return#0 t Coalescing zero page register [ zp[2]:70 [ memcpy::source#2 ] ] with [ zp[2]:74 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] - score: 1 Coalescing zero page register [ zp[2]:72 [ memcpy::destination#2 ] ] with [ zp[2]:76 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] - score: 1 Coalescing zero page register [ zp[2]:78 [ memset::str#3 ] ] with [ zp[2]:81 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] - score: 1 -Coalescing zero page register [ zp[1]:93 [ queen::row#0 ] ] with [ zp[1]:94 [ queen::r ] ] - score: 1 -Coalescing zero page register [ zp[1]:95 [ queen::column ] ] with [ zp[1]:97 [ legal::column#0 ] ] - score: 1 Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 ] ] with [ zp[1]:109 [ tod_str::tod_TENTHS#0 ] ] - score: 1 Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 ] ] with [ zp[1]:122 [ tod_read::return_TENTHS#0 ] ] - score: 1 Coalescing zero page register [ zp[1]:106 [ tod_read::return_SEC#2 ] ] with [ zp[1]:110 [ tod_str::tod_SEC#0 ] ] - score: 1 @@ -7738,8 +7738,6 @@ Coalescing zero page register [ zp[1]:4 [ print::i#2 print::i#1 printf_uchar::uv Coalescing zero page register [ zp[1]:19 [ diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 ] ] with [ zp[1]:116 [ diff::return#1 legal::$4 ] ] - score: 1 Coalescing zero page register [ zp[2]:55 [ strlen::len#2 strlen::len#1 strlen::return#2 ] ] with [ zp[2]:153 [ printf_number_buffer::$19 ] ] - score: 1 Coalescing zero page register [ zp[1]:69 [ toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 ] ] with [ zp[1]:181 [ strupr::$0 ] ] - score: 1 -Coalescing zero page register [ zp[1]:93 [ queen::row#0 queen::r ] ] with [ zp[1]:96 [ legal::row#0 ] ] - score: 1 -Coalescing zero page register [ zp[1]:93 [ queen::row#0 queen::r legal::row#0 ] ] with [ zp[1]:100 [ queen::$4 ] ] - score: 1 Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 ] ] with [ zp[1]:137 [ tod_str::$14 tod_str::$15 ] ] - score: 1 Coalescing zero page register [ zp[1]:106 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 ] ] with [ zp[1]:133 [ tod_str::$10 tod_str::$11 ] ] - score: 1 Coalescing zero page register [ zp[1]:107 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 ] ] with [ zp[1]:129 [ tod_str::$6 tod_str::$7 ] ] - score: 1 @@ -7764,58 +7762,62 @@ Coalescing zero page register [ zp[1]:66 [ ultoa_append::digit#2 ultoa_append::d Coalescing zero page register [ zp[1]:69 [ toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 ] ] with [ zp[1]:68 [ uctoa_append::digit#2 uctoa_append::digit#1 ] ] Coalescing zero page register [ zp[2]:70 [ memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] with [ zp[2]:60 [ strupr::src#2 strupr::src#1 ] ] Coalescing zero page register [ zp[2]:78 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 ] ] with [ zp[2]:72 [ memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] -Coalescing zero page register [ zp[1]:101 [ tod_init::tod_TENTHS#0 ] ] with [ zp[1]:80 [ memset::c#4 ] ] -Coalescing zero page register [ zp[1]:102 [ tod_init::tod_SEC#0 ] ] with [ zp[1]:93 [ queen::row#0 queen::r legal::row#0 queen::$4 ] ] -Coalescing zero page register [ zp[1]:103 [ tod_init::tod_MIN#0 ] ] with [ zp[1]:95 [ queen::column legal::column#0 ] ] -Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 ] ] with [ zp[1]:104 [ tod_init::tod_HOURS#0 ] ] -Coalescing zero page register [ zp[1]:113 [ legal::$0 ] ] with [ zp[1]:106 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 ] ] -Coalescing zero page register [ zp[1]:114 [ diff::return#0 legal::$3 ] ] with [ zp[1]:107 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 ] ] -Coalescing zero page register [ zp[1]:139 [ utoa::$11 ] ] with [ zp[1]:108 [ tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 ] ] -Coalescing zero page register [ zp[1]:142 [ utoa::$10 ] ] with [ zp[1]:123 [ tod_str::$0 tod_str::$1 ] ] +Coalescing zero page register [ zp[1]:93 [ queen::row#0 ] ] with [ zp[1]:80 [ memset::c#4 ] ] +Coalescing zero page register [ zp[1]:100 [ queen::$4 ] ] with [ zp[1]:96 [ legal::row#0 ] ] +Coalescing zero page register [ zp[1]:101 [ tod_init::tod_TENTHS#0 ] ] with [ zp[1]:97 [ legal::column#0 ] ] +Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 ] ] with [ zp[1]:102 [ tod_init::tod_SEC#0 ] ] +Coalescing zero page register [ zp[1]:106 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 ] ] with [ zp[1]:103 [ tod_init::tod_MIN#0 ] ] +Coalescing zero page register [ zp[1]:107 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 ] ] with [ zp[1]:104 [ tod_init::tod_HOURS#0 ] ] +Coalescing zero page register [ zp[1]:113 [ legal::$0 ] ] with [ zp[1]:108 [ tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 ] ] +Coalescing zero page register [ zp[1]:123 [ tod_str::$0 tod_str::$1 ] ] with [ zp[1]:114 [ diff::return#0 legal::$3 ] ] +Coalescing zero page register [ zp[1]:139 [ utoa::$11 ] ] with [ zp[1]:127 [ tod_str::$4 tod_str::$5 ] ] +Coalescing zero page register [ zp[1]:142 [ utoa::$10 ] ] with [ zp[1]:131 [ tod_str::$8 tod_str::$9 ] ] Coalescing zero page register [ zp[2]:143 [ utoa::digit_value#0 utoa_append::sub#0 ] ] with [ zp[2]:55 [ strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 ] ] -Coalescing zero page register [ zp[1]:155 [ ultoa::$11 ] ] with [ zp[1]:127 [ tod_str::$4 tod_str::$5 ] ] -Coalescing zero page register [ zp[1]:158 [ ultoa::$10 ] ] with [ zp[1]:131 [ tod_str::$8 tod_str::$9 ] ] -Coalescing zero page register [ zp[1]:175 [ uctoa::digit_value#0 uctoa_append::sub#0 ] ] with [ zp[1]:135 [ tod_str::$12 tod_str::$13 ] ] +Coalescing zero page register [ zp[1]:155 [ ultoa::$11 ] ] with [ zp[1]:135 [ tod_str::$12 tod_str::$13 ] ] +Coalescing zero page register [ zp[1]:175 [ uctoa::digit_value#0 uctoa_append::sub#0 ] ] with [ zp[1]:158 [ ultoa::$10 ] ] Coalescing zero page register [ zp[2]:184 [ memset::end#0 ] ] with [ zp[2]:182 [ memcpy::src_end#0 ] ] Coalescing zero page register [ zp[1]:24 [ utoa::digit#2 utoa::digit#1 diff::b#2 diff::b#0 diff::b#1 ] ] with [ zp[1]:12 [ clrscr::c#2 clrscr::c#1 print::j#2 print::j#1 ] ] Coalescing zero page register [ zp[2]:43 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 ] ] with [ zp[2]:13 [ cputs::s#13 cputs::s#14 cputs::s#0 clrscr::line_text#5 clrscr::line_text#1 ] ] Coalescing zero page register [ zp[1]:47 [ uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 ] ] with [ zp[1]:23 [ cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] ] Coalescing zero page register [ zp[2]:53 [ strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ] ] with [ zp[2]:25 [ utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] ] Coalescing zero page register [ zp[1]:69 [ toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 ] ] with [ zp[1]:57 [ printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] ] -Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_HOURS#0 ] ] with [ zp[1]:4 [ print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] ] -Coalescing zero page register [ zp[1]:113 [ legal::$0 tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 ] ] with [ zp[1]:30 [ printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] ] -Coalescing zero page register [ zp[1]:114 [ diff::return#0 legal::$3 tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 ] ] with [ zp[1]:37 [ ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] ] -Coalescing zero page register [ zp[1]:139 [ utoa::$11 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 ] ] with [ zp[1]:7 [ clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 ] ] -Coalescing zero page register [ zp[1]:142 [ utoa::$10 tod_str::$0 tod_str::$1 ] ] with [ zp[1]:42 [ ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] ] +Coalescing zero page register [ zp[1]:100 [ queen::$4 legal::row#0 ] ] with [ zp[1]:30 [ printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] ] +Coalescing zero page register [ zp[1]:101 [ tod_init::tod_TENTHS#0 legal::column#0 ] ] with [ zp[1]:37 [ ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] ] +Coalescing zero page register [ zp[1]:105 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_SEC#0 ] ] with [ zp[1]:4 [ print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] ] +Coalescing zero page register [ zp[1]:106 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 tod_init::tod_MIN#0 ] ] with [ zp[1]:7 [ clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 ] ] +Coalescing zero page register [ zp[1]:107 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 tod_init::tod_HOURS#0 ] ] with [ zp[1]:42 [ ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] ] +Coalescing zero page register [ zp[1]:113 [ legal::$0 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 ] ] with [ zp[1]:45 [ uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] ] +Coalescing zero page register [ zp[1]:123 [ tod_str::$0 tod_str::$1 diff::return#0 legal::$3 ] ] with [ zp[1]:46 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] ] +Coalescing zero page register [ zp[1]:139 [ utoa::$11 tod_str::$4 tod_str::$5 ] ] with [ zp[1]:66 [ ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] ] +Coalescing zero page register [ zp[1]:142 [ utoa::$10 tod_str::$8 tod_str::$9 ] ] with [ zp[1]:93 [ queen::row#0 memset::c#4 ] ] Coalescing zero page register [ zp[2]:143 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 ] ] with [ zp[2]:70 [ memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] ] -Coalescing zero page register [ zp[1]:155 [ ultoa::$11 tod_str::$4 tod_str::$5 ] ] with [ zp[1]:45 [ uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] ] -Coalescing zero page register [ zp[1]:158 [ ultoa::$10 tod_str::$8 tod_str::$9 ] ] with [ zp[1]:46 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] ] -Coalescing zero page register [ zp[1]:175 [ uctoa::digit_value#0 uctoa_append::sub#0 tod_str::$12 tod_str::$13 ] ] with [ zp[1]:66 [ ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] ] Coalescing zero page register [ zp[2]:78 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] with [ zp[2]:53 [ strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] ] -Coalescing zero page register [ zp[1]:139 [ utoa::$11 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 ] ] with [ zp[1]:69 [ toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] ] +Coalescing zero page register [ zp[1]:106 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 tod_init::tod_MIN#0 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 ] ] with [ zp[1]:69 [ toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] ] +Coalescing zero page register [ zp[1]:155 [ ultoa::$11 tod_str::$12 tod_str::$13 ] ] with [ zp[1]:47 [ uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] ] +Coalescing zero page register [ zp[1]:175 [ uctoa::digit_value#0 uctoa_append::sub#0 ultoa::$10 ] ] with [ zp[1]:139 [ utoa::$11 tod_str::$4 tod_str::$5 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] ] Allocated (was zp[4]:15) zp[4]:2 [ printf_ulong::uvalue#2 printf_ulong::uvalue#0 printf_ulong::uvalue#1 count ] Allocated (was zp[1]:24) zp[1]:6 [ utoa::digit#2 utoa::digit#1 diff::b#2 diff::b#0 diff::b#1 clrscr::c#2 clrscr::c#1 print::j#2 print::j#1 ] Allocated (was zp[4]:38) zp[4]:7 [ ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ] Allocated (was zp[2]:43) zp[2]:11 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 cputs::s#13 cputs::s#14 cputs::s#0 clrscr::line_text#5 clrscr::line_text#1 ] -Allocated (was zp[1]:47) zp[1]:13 [ uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] -Allocated (was zp[2]:78) zp[2]:14 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] -Allocated (was zp[1]:83) zp[1]:16 [ conio_cursor_x ] -Allocated (was zp[1]:84) zp[1]:17 [ conio_cursor_y ] -Allocated (was zp[2]:85) zp[2]:18 [ conio_line_text ] -Allocated (was zp[2]:87) zp[2]:20 [ conio_line_color ] -Allocated (was zp[1]:101) zp[1]:22 [ tod_init::tod_TENTHS#0 memset::c#4 ] -Allocated (was zp[1]:102) zp[1]:23 [ tod_init::tod_SEC#0 queen::row#0 queen::r legal::row#0 queen::$4 ] -Allocated (was zp[1]:103) zp[1]:24 [ tod_init::tod_MIN#0 queen::column legal::column#0 ] -Allocated (was zp[1]:105) zp[1]:25 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_HOURS#0 print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] -Allocated (was zp[1]:113) zp[1]:26 [ legal::$0 tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] -Allocated (was zp[1]:114) zp[1]:27 [ diff::return#0 legal::$3 tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] -Allocated (was zp[1]:139) zp[1]:28 [ utoa::$11 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] -Allocated (was zp[1]:142) zp[1]:29 [ utoa::$10 tod_str::$0 tod_str::$1 ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] -Allocated (was zp[2]:143) zp[2]:30 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] -Allocated (was zp[1]:155) zp[1]:32 [ ultoa::$11 tod_str::$4 tod_str::$5 uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] -Allocated (was zp[1]:158) zp[1]:33 [ ultoa::$10 tod_str::$8 tod_str::$9 uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] +Allocated (was zp[2]:78) zp[2]:13 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] +Allocated (was zp[1]:83) zp[1]:15 [ conio_cursor_x ] +Allocated (was zp[1]:84) zp[1]:16 [ conio_cursor_y ] +Allocated (was zp[2]:85) zp[2]:17 [ conio_line_text ] +Allocated (was zp[2]:87) zp[2]:19 [ conio_line_color ] +Allocated (was zp[1]:94) zp[1]:21 [ queen::r ] +Allocated (was zp[1]:95) zp[1]:22 [ queen::column ] +Allocated (was zp[1]:100) zp[1]:23 [ queen::$4 legal::row#0 printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] +Allocated (was zp[1]:101) zp[1]:24 [ tod_init::tod_TENTHS#0 legal::column#0 ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] +Allocated (was zp[1]:105) zp[1]:25 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_SEC#0 print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] +Allocated (was zp[1]:106) zp[1]:26 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 tod_init::tod_MIN#0 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] +Allocated (was zp[1]:107) zp[1]:27 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 tod_init::tod_HOURS#0 ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] +Allocated (was zp[1]:113) zp[1]:28 [ legal::$0 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] +Allocated (was zp[1]:123) zp[1]:29 [ tod_str::$0 tod_str::$1 diff::return#0 legal::$3 uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] +Allocated (was zp[1]:142) zp[1]:30 [ utoa::$10 tod_str::$8 tod_str::$9 queen::row#0 memset::c#4 ] +Allocated (was zp[2]:143) zp[2]:31 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] +Allocated (was zp[1]:155) zp[1]:33 [ ultoa::$11 tod_str::$12 tod_str::$13 uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] Allocated (was zp[4]:159) zp[4]:34 [ ultoa::digit_value#0 ultoa_append::sub#0 ] -Allocated (was zp[1]:175) zp[1]:38 [ uctoa::digit_value#0 uctoa_append::sub#0 tod_str::$12 tod_str::$13 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] +Allocated (was zp[1]:175) zp[1]:38 [ uctoa::digit_value#0 uctoa_append::sub#0 ultoa::$10 utoa::$11 tod_str::$4 tod_str::$5 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] Allocated (was zp[2]:184) zp[2]:39 [ memset::end#0 memcpy::src_end#0 ] ASSEMBLER BEFORE OPTIMIZATION @@ -7851,13 +7853,13 @@ ASSEMBLER BEFORE OPTIMIZATION .label CIA1 = $dc00 // The number of bytes on the screen // The current cursor x-position - .label conio_cursor_x = $10 + .label conio_cursor_x = $f // The current cursor y-position - .label conio_cursor_y = $11 + .label conio_cursor_y = $10 // The current text cursor line start - .label conio_line_text = $12 + .label conio_line_text = $11 // The current color cursor line start - .label conio_line_color = $14 + .label conio_line_color = $13 // The number of found solutions .label count = 2 // __start @@ -7909,19 +7911,21 @@ __start: { // Generates all valid placements of queens on a NxN board recursively // Works by generating all legal placements af a queen for a specific row taking into consideration the queens already placed on the rows below // and then recursively generating all legal placements on the rows above. -// queen(byte zp($17) row) +// queen(byte zp($1e) row) queen: { .const OFFSET_STACK_ROW = 0 - .label r = $17 - .label column = $18 - .label __1 = $1c + .label r = $15 + .label column = $16 + .label __1 = $1a .label __4 = $17 - .label row = $17 + .label row = $1e // [9] queen::row#0 = stackidx(byte,queen::OFFSET_STACK_ROW) -- vbuz1=_stackidxbyte_vbuc1 tsx lda STACK_BASE+OFFSET_STACK_ROW,x sta.z row - // [10] queen::r = queen::row#0 + // [10] queen::r = queen::row#0 -- vbuz1=vbuz2 + lda.z row + sta.z r // [11] queen::column = 1 -- vbuz1=vbuc1 lda #1 sta.z column @@ -7939,8 +7943,12 @@ queen: { rts // queen::@2 __b2: - // [14] legal::row#0 = queen::r - // [15] legal::column#0 = queen::column + // [14] legal::row#0 = queen::r -- vbuz1=vbuz2 + lda.z r + sta.z legal.row + // [15] legal::column#0 = queen::column -- vbuz1=vbuz2 + lda.z column + sta.z legal.column // [16] call legal // [68] phi from queen::@2 to legal [phi:queen::@2->legal] legal_from___b2: @@ -7976,8 +7984,10 @@ queen: { pha lda r pha - // [23] queen::$4 = queen::r + 1 -- vbuz1=vbuz1_plus_1 - inc.z __4 + // [23] queen::$4 = queen::r + 1 -- vbuz1=vbuz2_plus_1 + ldy.z r + iny + sty.z __4 // [24] stackpush(byte) = queen::$4 -- _stackpushbyte_=vbuz1 // Do recursion lda.z __4 @@ -8182,15 +8192,15 @@ main: { // If no conflict for desired position returns 1 otherwise returns 0 // legal(byte zp($17) row, byte zp($18) column) legal: { - .label __0 = $1a - .label __3 = $1b - .label __4 = $d + .label __0 = $1c + .label __3 = $1d + .label __4 = $21 .label row = $17 .label column = $18 // Placement is legal // The same column is a conflict. // The same diagonal is a conflict. - .label return = $1c + .label return = $1a .label i = $19 // [69] phi from legal to legal::@1 [phi:legal->legal::@1] __b1_from_legal: @@ -8484,8 +8494,8 @@ print: { clrscr: { .label c = 6 .label line_text = $b - .label line_cols = $e - .label l = $1c + .label line_cols = $d + .label l = $1a // [117] phi from clrscr to clrscr::@1 [phi:clrscr->clrscr::@1] __b1_from_clrscr: // [117] phi clrscr::line_cols#5 = COLORRAM [phi:clrscr->clrscr::@1#0] -- pbuz1=pbuc1 @@ -8592,7 +8602,7 @@ clrscr: { // Output a NUL-terminated string at the current cursor position // cputs(byte* zp($b) s) cputs: { - .label c = $d + .label c = $21 .label s = $b // [133] phi from cputs cputs::@2 to cputs::@1 [phi:cputs/cputs::@2->cputs::@1] __b1_from_cputs: @@ -8682,12 +8692,12 @@ printf_uint: { // tod_init // Initialize time-of-day clock // This uses the MOS6526 CIA#1 -// tod_init(byte zp($16) tod_TENTHS, byte zp($17) tod_SEC, byte zp($18) tod_MIN, byte zp($19) tod_HOURS) +// tod_init(byte zp($18) tod_TENTHS, byte zp($19) tod_SEC, byte zp($1a) tod_MIN, byte zp($1b) tod_HOURS) tod_init: { - .label tod_TENTHS = $16 - .label tod_SEC = $17 - .label tod_MIN = $18 - .label tod_HOURS = $19 + .label tod_TENTHS = $18 + .label tod_SEC = $19 + .label tod_MIN = $1a + .label tod_HOURS = $1b // [146] *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) | $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 // Set 50hz (this assumes PAL!) (bit7=1) lda #$80 @@ -8752,16 +8762,16 @@ tod_str: { .label __1 = $1d .label __2 = $1c .label __3 = $1c - .label __4 = $20 - .label __5 = $20 + .label __4 = $26 + .label __5 = $26 .label __6 = $1b .label __7 = $1b - .label __8 = $21 - .label __9 = $21 + .label __8 = $1e + .label __9 = $1e .label __10 = $1a .label __11 = $1a - .label __12 = $26 - .label __13 = $26 + .label __12 = $21 + .label __13 = $21 .label __14 = $19 .label __15 = $19 .label tod_TENTHS = $19 @@ -8956,12 +8966,12 @@ printf_string: { } // diff // Find the absolute difference between two unsigned chars -// diff(byte zp($d) a, byte zp(6) b) +// diff(byte zp($21) a, byte zp(6) b) diff: { - .label a = $d + .label a = $21 .label b = 6 - .label return = $1b - .label return_1 = $d + .label return = $1d + .label return_1 = $21 // [195] if(diff::a#2utoa::@1] __b1_from_utoa: // [225] phi utoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 @@ -9263,16 +9273,16 @@ utoa: { // printf_number_buffer // Print the contents of the number buffer using a specific format. // This handles minimum length, zero-filling, and left/right justification from the format -// printf_number_buffer(byte zp($20) buffer_sign, byte zp($1a) format_min_length, byte zp($1b) format_justify_left, byte zp($1d) format_zero_padding, byte zp($21) format_upper_case) +// printf_number_buffer(byte zp($1c) buffer_sign, byte zp($17) format_min_length, byte zp($18) format_justify_left, byte zp($1b) format_zero_padding, byte zp($1d) format_upper_case) printf_number_buffer: { - .label __19 = $1e - .label buffer_sign = $20 - .label len = $d - .label padding = $1a - .label format_min_length = $1a - .label format_zero_padding = $1d - .label format_justify_left = $1b - .label format_upper_case = $21 + .label __19 = $1f + .label buffer_sign = $1c + .label len = $21 + .label padding = $17 + .label format_min_length = $17 + .label format_zero_padding = $1b + .label format_justify_left = $18 + .label format_upper_case = $1d // [246] if(0==printf_number_buffer::format_min_length#3) goto printf_number_buffer::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z format_min_length @@ -9496,13 +9506,13 @@ printf_number_buffer: { // - radix : The radix to convert the number to (from the enum RADIX) // ultoa(dword zp(7) value, byte* zp($b) buffer) ultoa: { - .label __10 = $21 - .label __11 = $20 + .label __10 = $26 + .label __11 = $21 .label digit_value = $22 .label buffer = $b - .label digit = $1b + .label digit = $18 .label value = 7 - .label started = $1d + .label started = $1b // [283] phi from ultoa to ultoa::@1 [phi:ultoa->ultoa::@1] __b1_from_ultoa: // [283] phi ultoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 @@ -9641,13 +9651,13 @@ ultoa: { // - value : The number to be converted to RADIX // - buffer : receives the string representing the number and zero-termination. // - radix : The radix to convert the number to (from the enum RADIX) -// uctoa(byte zp($21) value, byte* zp($e) buffer) +// uctoa(byte zp($1d) value, byte* zp($d) buffer) uctoa: { .label digit_value = $26 - .label buffer = $e - .label digit = $20 - .label value = $21 - .label started = $d + .label buffer = $d + .label digit = $1c + .label value = $1d + .label started = $21 // [304] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] __b1_from_uctoa: // [304] phi uctoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 @@ -9794,13 +9804,13 @@ cputln: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// utoa_append(byte* zp($b) buffer, word zp($e) value, word zp($1e) sub) +// utoa_append(byte* zp($b) buffer, word zp($d) value, word zp($1f) sub) utoa_append: { .label buffer = $b - .label value = $e - .label sub = $1e - .label return = $e - .label digit = $1c + .label value = $d + .label sub = $1f + .label return = $d + .label digit = $1a // [329] phi from utoa_append to utoa_append::@1 [phi:utoa_append->utoa_append::@1] __b1_from_utoa_append: // [329] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuz1=vbuc1 @@ -9852,11 +9862,11 @@ utoa_append: { } // strlen // Computes the length of the string str up to but not including the terminating null character. -// strlen(byte* zp($e) str) +// strlen(byte* zp($d) str) strlen: { - .label len = $1e - .label str = $e - .label return = $1e + .label len = $1f + .label str = $d + .label return = $1f // [336] phi from strlen to strlen::@1 [phi:strlen->strlen::@1] __b1_from_strlen: // [336] phi strlen::len#2 = 0 [phi:strlen->strlen::@1#0] -- vwuz1=vwuc1 @@ -9902,11 +9912,11 @@ strlen: { } // printf_padding // Print a padding char a number of times -// printf_padding(byte zp($d) pad, byte zp($1c) length) +// printf_padding(byte zp($21) pad, byte zp($1a) length) printf_padding: { .label i = $26 - .label length = $1c - .label pad = $d + .label length = $1a + .label pad = $21 // [342] phi from printf_padding to printf_padding::@1 [phi:printf_padding->printf_padding::@1] __b1_from_printf_padding: // [342] phi printf_padding::i#2 = 0 [phi:printf_padding->printf_padding::@1#0] -- vbuz1=vbuc1 @@ -9946,8 +9956,8 @@ printf_padding: { // Converts a string to uppercase. strupr: { .label str = printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS - .label __0 = $1c - .label src = $1e + .label __0 = $1a + .label src = $1f // [349] phi from strupr to strupr::@1 [phi:strupr->strupr::@1] __b1_from_strupr: // [349] phi strupr::src#2 = strupr::str#0 [phi:strupr->strupr::@1#0] -- pbuz1=pbuc1 @@ -10083,13 +10093,13 @@ ultoa_append: { // - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. // (For decimal the subs used are 10000, 1000, 100, 10, 1) // returns : the value reduced by sub * digit so that it is less than sub. -// uctoa_append(byte* zp($e) buffer, byte zp($21) value, byte zp($26) sub) +// uctoa_append(byte* zp($d) buffer, byte zp($1d) value, byte zp($26) sub) uctoa_append: { - .label buffer = $e - .label value = $21 + .label buffer = $d + .label value = $1d .label sub = $26 - .label return = $21 - .label digit = $1c + .label return = $1d + .label digit = $1a // [366] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] __b1_from_uctoa_append: // [366] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuz1=vbuc1 @@ -10240,10 +10250,10 @@ cscroll: { // toupper // Convert lowercase alphabet to uppercase // Returns uppercase equivalent to c, if such value exists, else c remains unchanged -// toupper(byte zp($1c) ch) +// toupper(byte zp($1a) ch) toupper: { - .label return = $1c - .label ch = $1c + .label return = $1a + .label ch = $1a // [385] if(toupper::ch#0<'a') goto toupper::@return -- vbuz1_lt_vbuc1_then_la1 lda.z ch cmp #'a' @@ -10276,13 +10286,13 @@ toupper: { // memcpy // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. -// memcpy(void* zp($e) destination, void* zp($1e) source) +// memcpy(void* zp($d) destination, void* zp($1f) source) memcpy: { .label src_end = $27 - .label dst = $e - .label src = $1e - .label source = $1e - .label destination = $e + .label dst = $d + .label src = $1f + .label source = $1f + .label destination = $d // [391] memcpy::src_end#0 = (byte*)memcpy::source#2 + (word)$19*$28-$28 -- pbuz1=pbuz2_plus_vwuc1 clc lda.z source @@ -10334,12 +10344,12 @@ memcpy: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($e) str, byte zp($16) c) +// memset(void* zp($d) str, byte zp($1e) c) memset: { .label end = $27 - .label dst = $e - .label str = $e - .label c = $16 + .label dst = $d + .label str = $d + .label c = $1e jmp __b1 // memset::@1 __b1: @@ -10543,6 +10553,9 @@ Removing instruction jmp __breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #0 Removing instruction lda #>0 +Removing instruction lda.z row +Replacing instruction ldy.z r with TAY +Replacing instruction lda.z __4 with TYA Replacing instruction lda.z __0 with TXA Removing instruction lda #0 Removing instruction ldy.z c @@ -10590,7 +10603,6 @@ Replacing label __b1_from___b2 with __b1 Replacing label __b2_from___b3 with __b2 Removing instruction __b1_from___init1: Removing instruction main_from___b1: -Removing instruction legal_from___b2: Removing instruction __b1_from_main: Removing instruction cputs_from___b1: Removing instruction __b2_from___b1: @@ -10668,6 +10680,7 @@ Removing instruction __init1: Removing instruction __b1: Removing instruction __breturn: Removing instruction __breturn: +Removing instruction legal_from___b2: Removing instruction __b7: Removing instruction __b5: Removing instruction __b6: @@ -10872,29 +10885,29 @@ byte clrscr::c byte clrscr::c#1 c zp[1]:6 20002.0 byte clrscr::c#2 c zp[1]:6 12501.25 byte clrscr::l -byte clrscr::l#1 l zp[1]:28 2002.0 -byte clrscr::l#2 l zp[1]:28 333.6666666666667 +byte clrscr::l#1 l zp[1]:26 2002.0 +byte clrscr::l#2 l zp[1]:26 333.6666666666667 byte* clrscr::line_cols -byte* clrscr::line_cols#1 line_cols zp[2]:14 1001.0 -byte* clrscr::line_cols#5 line_cols zp[2]:14 1500.375 +byte* clrscr::line_cols#1 line_cols zp[2]:13 1001.0 +byte* clrscr::line_cols#5 line_cols zp[2]:13 1500.375 byte* clrscr::line_text byte* clrscr::line_text#1 line_text zp[2]:11 667.3333333333334 byte* clrscr::line_text#5 line_text zp[2]:11 1714.7142857142858 -byte conio_cursor_x loadstore zp[1]:16 8.241758241758241E27 -byte conio_cursor_y loadstore zp[1]:17 1.6243654822335025E29 -byte* conio_line_color loadstore zp[2]:20 1.1450777202072537E29 -byte* conio_line_text loadstore zp[2]:18 1.1333333333333334E29 +byte conio_cursor_x loadstore zp[1]:15 8.241758241758241E27 +byte conio_cursor_y loadstore zp[1]:16 1.6243654822335025E29 +byte* conio_line_color loadstore zp[2]:19 1.1450777202072537E29 +byte* conio_line_text loadstore zp[2]:17 1.1333333333333334E29 dword count loadstore zp[4]:2 2.4691358025012344E10 void cputc(byte cputc::c) byte cputc::c -byte cputc::c#0 c zp[1]:13 2.0E28 -byte cputc::c#1 c zp[1]:13 2.0E27 -byte cputc::c#2 c zp[1]:13 2.00000000000002E14 -byte cputc::c#3 c zp[1]:13 1.0550000000000004E29 +byte cputc::c#0 c zp[1]:33 2.0E28 +byte cputc::c#1 c zp[1]:33 2.0E27 +byte cputc::c#2 c zp[1]:33 2.00000000000002E14 +byte cputc::c#3 c zp[1]:33 1.0550000000000004E29 void cputln() void cputs(to_nomodify byte* cputs::s) byte cputs::c -byte cputs::c#1 c zp[1]:13 1.0E28 +byte cputs::c#1 c zp[1]:33 1.0E28 to_nomodify byte* cputs::s to_nomodify byte* cputs::s#0 s zp[2]:11 5.0E27 to_nomodify byte* cputs::s#13 s zp[2]:11 1.5000000000000497E28 @@ -10902,19 +10915,19 @@ to_nomodify byte* cputs::s#14 s zp[2]:11 1.000000000000001E15 void cscroll() byte diff(byte diff::a , byte diff::b) byte diff::a -byte diff::a#0 a zp[1]:13 1.000000000001E12 -byte diff::a#1 a zp[1]:13 1.000000000001E12 -byte diff::a#2 a zp[1]:13 1.60000000000025E13 +byte diff::a#0 a zp[1]:33 1.000000000001E12 +byte diff::a#1 a zp[1]:33 1.000000000001E12 +byte diff::a#2 a zp[1]:33 1.60000000000025E13 byte diff::b byte diff::b#0 b zp[1]:6 2.000000000002E12 byte diff::b#1 b zp[1]:6 2.000000000002E12 byte diff::b#2 b zp[1]:6 1.60000000000025E13 byte diff::return -byte diff::return#0 return zp[1]:27 2.000000000002E12 -byte diff::return#1 return_1 zp[1]:13 2.000000000002E12 -byte diff::return#2 return_1 zp[1]:13 2.0000000000002E13 -byte diff::return#3 return_1 zp[1]:13 2.0000000000002E13 -byte diff::return#4 return_1 zp[1]:13 5.500000000001E12 +byte diff::return#0 return zp[1]:29 2.000000000002E12 +byte diff::return#1 return_1 zp[1]:33 2.000000000002E12 +byte diff::return#2 return_1 zp[1]:33 2.0000000000002E13 +byte diff::return#3 return_1 zp[1]:33 2.0000000000002E13 +byte diff::return#4 return_1 zp[1]:33 5.500000000001E12 void gotoxy(byte gotoxy::x , byte gotoxy::y) word gotoxy::line_offset const word gotoxy::line_offset#0 line_offset = (word)gotoxy::y#2*$28 @@ -10923,17 +10936,17 @@ const byte gotoxy::x#2 x = 0 byte gotoxy::y const byte gotoxy::y#2 y = 5 byte legal(byte legal::row , byte legal::column) -byte~ legal::$0 zp[1]:26 2.000000000002E12 -byte~ legal::$3 zp[1]:27 3.333333333336667E11 -byte~ legal::$4 zp[1]:13 2.000000000002E12 +byte~ legal::$0 zp[1]:28 2.000000000002E12 +byte~ legal::$3 zp[1]:29 3.333333333336667E11 +byte~ legal::$4 zp[1]:33 2.000000000002E12 byte legal::column byte legal::column#0 column zp[1]:24 1.6666666666683334E11 byte legal::i byte legal::i#1 i zp[1]:25 2.000000000002E12 byte legal::i#2 i zp[1]:25 4.0000000000039996E11 byte legal::return -byte legal::return#0 return zp[1]:28 2.000000000002E12 -byte legal::return#4 return zp[1]:28 3.333333333336667E11 +byte legal::return#0 return zp[1]:26 2.000000000002E12 +byte legal::return#4 return zp[1]:26 3.333333333336667E11 byte legal::row byte legal::row#0 row zp[1]:23 1.5789473684226315E11 void main() @@ -10948,34 +10961,34 @@ const byte* main::s4[3] = ". " void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num) void* memcpy::destination -void* memcpy::destination#2 destination zp[2]:14 +void* memcpy::destination#2 destination zp[2]:13 byte* memcpy::dst -byte* memcpy::dst#1 dst zp[2]:14 1.0E46 -byte* memcpy::dst#2 dst zp[2]:14 1.0000000000000033E46 -byte* memcpy::dst#4 dst zp[2]:14 2.0E32 +byte* memcpy::dst#1 dst zp[2]:13 1.0E46 +byte* memcpy::dst#2 dst zp[2]:13 1.0000000000000033E46 +byte* memcpy::dst#4 dst zp[2]:13 2.0E32 word memcpy::num void* memcpy::return void* memcpy::source -void* memcpy::source#2 source zp[2]:30 +void* memcpy::source#2 source zp[2]:31 byte* memcpy::src -byte* memcpy::src#1 src zp[2]:30 2.0E46 -byte* memcpy::src#2 src zp[2]:30 1.0000000000000025E46 -byte* memcpy::src#4 src zp[2]:30 1.0E32 +byte* memcpy::src#1 src zp[2]:31 2.0E46 +byte* memcpy::src#2 src zp[2]:31 1.0000000000000025E46 +byte* memcpy::src#4 src zp[2]:31 1.0E32 byte* memcpy::src_end byte* memcpy::src_end#0 src_end zp[2]:39 1.2500000000000125E45 void* memset(void* memset::str , byte memset::c , word memset::num) byte memset::c -byte memset::c#4 c zp[1]:22 1.4285714285714287E45 +byte memset::c#4 c zp[1]:30 1.4285714285714287E45 byte* memset::dst -byte* memset::dst#1 dst zp[2]:14 2.0E46 -byte* memset::dst#2 dst zp[2]:14 1.3333333333333366E46 -byte* memset::dst#4 dst zp[2]:14 2.0E32 +byte* memset::dst#1 dst zp[2]:13 2.0E46 +byte* memset::dst#2 dst zp[2]:13 1.3333333333333366E46 +byte* memset::dst#4 dst zp[2]:13 2.0E32 byte* memset::end byte* memset::end#0 end zp[2]:39 1.6666666666666835E45 word memset::num void* memset::return void* memset::str -void* memset::str#3 str zp[2]:14 +void* memset::str#3 str zp[2]:13 void print() byte print::i byte print::i#1 i zp[1]:25 2.000000000002E12 @@ -10996,43 +11009,43 @@ const byte* print::s3[2] = "Q" const byte* print::s4[2] = "-" struct printf_buffer_number printf_buffer loadstore mem[12] = {} void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) -word~ printf_number_buffer::$19 zp[2]:30 1.00000000000001E14 +word~ printf_number_buffer::$19 zp[2]:31 1.00000000000001E14 struct printf_buffer_number printf_number_buffer::buffer byte* printf_number_buffer::buffer_digits byte printf_number_buffer::buffer_sign -byte printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:32 202.0 -byte printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:32 202.0 -byte printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:32 1.55000000000103E13 -byte printf_number_buffer::buffer_sign#2 buffer_sign zp[1]:32 2.0000000000002E13 +byte printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:28 202.0 +byte printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:28 202.0 +byte printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:28 1.55000000000103E13 +byte printf_number_buffer::buffer_sign#2 buffer_sign zp[1]:28 2.0000000000002E13 struct printf_format_number printf_number_buffer::format byte printf_number_buffer::format_justify_left -byte printf_number_buffer::format_justify_left#10 format_justify_left zp[1]:27 6.451612903225871E12 +byte printf_number_buffer::format_justify_left#10 format_justify_left zp[1]:24 6.451612903225871E12 byte printf_number_buffer::format_min_length -byte printf_number_buffer::format_min_length#3 format_min_length zp[1]:26 1.00000000000001E13 +byte printf_number_buffer::format_min_length#3 format_min_length zp[1]:23 1.00000000000001E13 byte printf_number_buffer::format_radix byte printf_number_buffer::format_sign_always byte printf_number_buffer::format_upper_case -byte printf_number_buffer::format_upper_case#10 format_upper_case zp[1]:33 3.846153846153885E12 +byte printf_number_buffer::format_upper_case#10 format_upper_case zp[1]:29 3.846153846153885E12 byte printf_number_buffer::format_zero_padding -byte printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:29 9.375000000000094E12 +byte printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:27 9.375000000000094E12 signed byte printf_number_buffer::len -signed byte printf_number_buffer::len#0 len zp[1]:13 1.500000000000015E14 -signed byte printf_number_buffer::len#1 len zp[1]:13 2.00000000000002E14 -signed byte printf_number_buffer::len#2 len zp[1]:13 3.00000000000003E14 +signed byte printf_number_buffer::len#0 len zp[1]:33 1.500000000000015E14 +signed byte printf_number_buffer::len#1 len zp[1]:33 2.00000000000002E14 +signed byte printf_number_buffer::len#2 len zp[1]:33 3.00000000000003E14 signed byte printf_number_buffer::padding -signed byte printf_number_buffer::padding#1 padding zp[1]:26 1.00000000000001E14 -signed byte printf_number_buffer::padding#10 padding zp[1]:26 1.904761904761924E13 +signed byte printf_number_buffer::padding#1 padding zp[1]:23 1.00000000000001E14 +signed byte printf_number_buffer::padding#10 padding zp[1]:23 1.904761904761924E13 void printf_padding(byte printf_padding::pad , byte printf_padding::length) byte printf_padding::i byte printf_padding::i#1 i zp[1]:38 2.0E27 byte printf_padding::i#2 i zp[1]:38 7.500000000000001E26 byte printf_padding::length -byte printf_padding::length#0 length zp[1]:28 2.00000000000002E14 -byte printf_padding::length#1 length zp[1]:28 2.00000000000002E14 -byte printf_padding::length#2 length zp[1]:28 2.00000000000002E14 -byte printf_padding::length#6 length zp[1]:28 1.6666666666671665E26 +byte printf_padding::length#0 length zp[1]:26 2.00000000000002E14 +byte printf_padding::length#1 length zp[1]:26 2.00000000000002E14 +byte printf_padding::length#2 length zp[1]:26 2.00000000000002E14 +byte printf_padding::length#6 length zp[1]:26 1.6666666666671665E26 byte printf_padding::pad -byte printf_padding::pad#7 pad zp[1]:13 1.6666666666666666E26 +byte printf_padding::pad#7 pad zp[1]:33 1.6666666666666666E26 void printf_string(byte* printf_string::str , byte printf_string::format_min_length , byte printf_string::format_justify_left) struct printf_format_string printf_string::format byte printf_string::format_justify_left @@ -11079,41 +11092,41 @@ dword printf_ulong::uvalue#0 uvalue zp[4]:2 22.0 dword printf_ulong::uvalue#1 uvalue zp[4]:2 22.0 dword printf_ulong::uvalue#2 uvalue zp[4]:2 61.5 __stackcall void queen(byte queen::row) -byte~ queen::$1 zp[1]:28 2.000000000002E12 +byte~ queen::$1 zp[1]:26 2.000000000002E12 byte~ queen::$4 zp[1]:23 2.000000000002E12 const byte queen::OFFSET_STACK_ROW = 0 -byte queen::column loadstore zp[1]:24 2.9411764706505884E11 -byte queen::r loadstore zp[1]:23 2.10526315795E11 +volatile byte queen::column loadstore zp[1]:22 2.9411764706505884E11 +volatile byte queen::r loadstore zp[1]:21 2.10526315795E11 byte queen::row -byte queen::row#0 row zp[1]:23 202.0 +byte queen::row#0 row zp[1]:30 202.0 word strlen(byte* strlen::str) word strlen::len -word strlen::len#1 len zp[2]:30 1.0E27 -word strlen::len#2 len zp[2]:30 5.00000000000025E26 +word strlen::len#1 len zp[2]:31 1.0E27 +word strlen::len#2 len zp[2]:31 5.00000000000025E26 word strlen::return -word strlen::return#2 return zp[2]:30 2.00000000000002E14 +word strlen::return#2 return zp[2]:31 2.00000000000002E14 byte* strlen::str -byte* strlen::str#0 str zp[2]:14 2.0E27 -byte* strlen::str#3 str zp[2]:14 1.0E27 +byte* strlen::str#0 str zp[2]:13 2.0E27 +byte* strlen::str#3 str zp[2]:13 1.0E27 byte* strupr(byte* strupr::str) -byte~ strupr::$0 zp[1]:28 2.0E27 +byte~ strupr::$0 zp[1]:26 2.0E27 byte* strupr::return byte* strupr::src -byte* strupr::src#1 src zp[2]:30 2.0E27 -byte* strupr::src#2 src zp[2]:30 7.142857142857143E26 +byte* strupr::src#1 src zp[2]:31 2.0E27 +byte* strupr::src#2 src zp[2]:31 7.142857142857143E26 byte* strupr::str const byte* strupr::str#0 str = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS const byte* tod_buffer[] = "00:00:00:00" void tod_init(byte tod_init::tod_TENTHS , byte tod_init::tod_SEC , byte tod_init::tod_MIN , byte tod_init::tod_HOURS) struct TIME_OF_DAY tod_init::tod byte tod_init::tod_HOURS -byte tod_init::tod_HOURS#0 tod_HOURS zp[1]:25 37.33333333333333 +byte tod_init::tod_HOURS#0 tod_HOURS zp[1]:27 37.33333333333333 byte tod_init::tod_MIN -byte tod_init::tod_MIN#0 tod_MIN zp[1]:24 22.4 +byte tod_init::tod_MIN#0 tod_MIN zp[1]:26 22.4 byte tod_init::tod_SEC -byte tod_init::tod_SEC#0 tod_SEC zp[1]:23 16.0 +byte tod_init::tod_SEC#0 tod_SEC zp[1]:25 16.0 byte tod_init::tod_TENTHS -byte tod_init::tod_TENTHS#0 tod_TENTHS zp[1]:22 12.444444444444443 +byte tod_init::tod_TENTHS#0 tod_TENTHS zp[1]:24 12.444444444444443 struct TIME_OF_DAY tod_read() byte tod_read::hours byte tod_read::mins @@ -11141,18 +11154,18 @@ byte~ tod_str::$0 zp[1]:29 202.0 byte~ tod_str::$1 zp[1]:29 202.0 byte~ tod_str::$10 zp[1]:26 202.0 byte~ tod_str::$11 zp[1]:26 202.0 -byte~ tod_str::$12 zp[1]:38 202.0 -byte~ tod_str::$13 zp[1]:38 202.0 +byte~ tod_str::$12 zp[1]:33 202.0 +byte~ tod_str::$13 zp[1]:33 202.0 byte~ tod_str::$14 zp[1]:25 202.0 byte~ tod_str::$15 zp[1]:25 202.0 byte~ tod_str::$2 zp[1]:28 202.0 byte~ tod_str::$3 zp[1]:28 202.0 -byte~ tod_str::$4 zp[1]:32 202.0 -byte~ tod_str::$5 zp[1]:32 202.0 +byte~ tod_str::$4 zp[1]:38 202.0 +byte~ tod_str::$5 zp[1]:38 202.0 byte~ tod_str::$6 zp[1]:27 202.0 byte~ tod_str::$7 zp[1]:27 202.0 -byte~ tod_str::$8 zp[1]:33 202.0 -byte~ tod_str::$9 zp[1]:33 202.0 +byte~ tod_str::$8 zp[1]:30 202.0 +byte~ tod_str::$9 zp[1]:30 202.0 byte* tod_str::return struct TIME_OF_DAY tod_str::tod byte tod_str::tod_HOURS @@ -11165,66 +11178,66 @@ byte tod_str::tod_TENTHS byte tod_str::tod_TENTHS#0 tod_TENTHS zp[1]:25 8.52 byte toupper(byte toupper::ch) byte toupper::ch -byte toupper::ch#0 ch zp[1]:28 1.6999999999999998E28 +byte toupper::ch#0 ch zp[1]:26 1.6999999999999998E28 byte toupper::return -byte toupper::return#0 return zp[1]:28 2.0E28 -byte toupper::return#2 return zp[1]:28 1.0333333333333333E28 -byte toupper::return#3 return zp[1]:28 2.0E27 +byte toupper::return#0 return zp[1]:26 2.0E28 +byte toupper::return#2 return zp[1]:26 1.0333333333333333E28 +byte toupper::return#3 return zp[1]:26 2.0E27 void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) byte* uctoa::buffer -byte* uctoa::buffer#11 buffer zp[2]:14 3.3333333333350004E25 -byte* uctoa::buffer#14 buffer zp[2]:14 1.5000000000000002E26 -byte* uctoa::buffer#3 buffer zp[2]:14 2.00000000000002E14 -byte* uctoa::buffer#4 buffer zp[2]:14 2.0E26 +byte* uctoa::buffer#11 buffer zp[2]:13 3.3333333333350004E25 +byte* uctoa::buffer#14 buffer zp[2]:13 1.5000000000000002E26 +byte* uctoa::buffer#3 buffer zp[2]:13 2.00000000000002E14 +byte* uctoa::buffer#4 buffer zp[2]:13 2.0E26 byte uctoa::digit -byte uctoa::digit#1 digit zp[1]:32 2.0E26 -byte uctoa::digit#2 digit zp[1]:32 3.076923076923077E25 +byte uctoa::digit#1 digit zp[1]:28 2.0E26 +byte uctoa::digit#2 digit zp[1]:28 3.076923076923077E25 byte uctoa::digit_value byte uctoa::digit_value#0 digit_value zp[1]:38 6.000000000000001E25 byte* uctoa::digit_values byte uctoa::max_digits byte uctoa::radix byte uctoa::started -byte uctoa::started#2 started zp[1]:13 6.000000000000001E25 -byte uctoa::started#4 started zp[1]:13 1.0E26 +byte uctoa::started#2 started zp[1]:33 6.000000000000001E25 +byte uctoa::started#4 started zp[1]:33 1.0E26 byte uctoa::value -byte uctoa::value#0 value zp[1]:33 1.0E26 -byte uctoa::value#1 value zp[1]:33 5.5000000000001E13 -byte uctoa::value#2 value zp[1]:33 6.666666666670001E25 -byte uctoa::value#6 value zp[1]:33 1.5000000000000002E26 +byte uctoa::value#0 value zp[1]:29 1.0E26 +byte uctoa::value#1 value zp[1]:29 5.5000000000001E13 +byte uctoa::value#2 value zp[1]:29 6.666666666670001E25 +byte uctoa::value#6 value zp[1]:29 1.5000000000000002E26 byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) byte* uctoa_append::buffer -byte* uctoa_append::buffer#0 buffer zp[2]:14 1.3750000000000001E26 +byte* uctoa_append::buffer#0 buffer zp[2]:13 1.3750000000000001E26 byte uctoa_append::digit -byte uctoa_append::digit#1 digit zp[1]:28 1.0E40 -byte uctoa_append::digit#2 digit zp[1]:28 1.00000000000005E40 +byte uctoa_append::digit#1 digit zp[1]:26 1.0E40 +byte uctoa_append::digit#2 digit zp[1]:26 1.00000000000005E40 byte uctoa_append::return -byte uctoa_append::return#0 return zp[1]:33 2.0E26 +byte uctoa_append::return#0 return zp[1]:29 2.0E26 byte uctoa_append::sub byte uctoa_append::sub#0 sub zp[1]:38 3.33333333333335E39 byte uctoa_append::value -byte uctoa_append::value#0 value zp[1]:33 3.666666666666667E26 -byte uctoa_append::value#1 value zp[1]:33 2.0E40 -byte uctoa_append::value#2 value zp[1]:33 5.0000000000001833E39 +byte uctoa_append::value#0 value zp[1]:29 3.666666666666667E26 +byte uctoa_append::value#1 value zp[1]:29 2.0E40 +byte uctoa_append::value#2 value zp[1]:29 5.0000000000001833E39 void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) -byte~ ultoa::$10 zp[1]:33 2.00000000000002E14 -byte~ ultoa::$11 zp[1]:32 2002.0 +byte~ ultoa::$10 zp[1]:38 2.00000000000002E14 +byte~ ultoa::$11 zp[1]:33 2002.0 byte* ultoa::buffer byte* ultoa::buffer#11 buffer zp[2]:11 2.8571428571571855E13 byte* ultoa::buffer#14 buffer zp[2]:11 1.500000000000015E14 byte* ultoa::buffer#3 buffer zp[2]:11 2002.0 byte* ultoa::buffer#4 buffer zp[2]:11 2.00000000000002E14 byte ultoa::digit -byte ultoa::digit#1 digit zp[1]:27 2.00000000000002E14 -byte ultoa::digit#2 digit zp[1]:27 2.8571428571428855E13 +byte ultoa::digit#1 digit zp[1]:24 2.00000000000002E14 +byte ultoa::digit#2 digit zp[1]:24 2.8571428571428855E13 dword ultoa::digit_value dword ultoa::digit_value#0 digit_value zp[4]:34 6.000000000000059E13 dword* ultoa::digit_values byte ultoa::max_digits byte ultoa::radix byte ultoa::started -byte ultoa::started#2 started zp[1]:29 5.00000000000005E13 -byte ultoa::started#4 started zp[1]:29 1.00000000000001E14 +byte ultoa::started#2 started zp[1]:27 5.00000000000005E13 +byte ultoa::started#4 started zp[1]:27 1.00000000000001E14 dword ultoa::value dword ultoa::value#0 value zp[4]:7 1.00000000000001E14 dword ultoa::value#1 value zp[4]:7 551.0 @@ -11245,8 +11258,8 @@ dword ultoa_append::value#0 value zp[4]:7 3.666666666666674E14 dword ultoa_append::value#1 value zp[4]:7 2.0E27 dword ultoa_append::value#2 value zp[4]:7 5.0000000000018335E26 void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) -byte~ utoa::$10 zp[1]:29 20002.0 -byte~ utoa::$11 zp[1]:28 2002.0 +byte~ utoa::$10 zp[1]:30 20002.0 +byte~ utoa::$11 zp[1]:38 2002.0 byte* utoa::buffer byte* utoa::buffer#11 buffer zp[2]:11 3000.4285714285716 byte* utoa::buffer#14 buffer zp[2]:11 15001.5 @@ -11256,56 +11269,56 @@ byte utoa::digit byte utoa::digit#1 digit zp[1]:6 20002.0 byte utoa::digit#2 digit zp[1]:6 2857.4285714285716 word utoa::digit_value -word utoa::digit_value#0 digit_value zp[2]:30 6000.6 +word utoa::digit_value#0 digit_value zp[2]:31 6000.6 word* utoa::digit_values byte utoa::max_digits const byte utoa::max_digits#1 max_digits = 5 byte utoa::radix byte utoa::started -byte utoa::started#2 started zp[1]:26 5000.5 -byte utoa::started#4 started zp[1]:26 10001.0 +byte utoa::started#2 started zp[1]:23 5000.5 +byte utoa::started#4 started zp[1]:23 10001.0 word utoa::value -word utoa::value#0 value zp[2]:14 10001.0 -word utoa::value#2 value zp[2]:14 5714.857142857143 -word utoa::value#6 value zp[2]:14 15001.5 +word utoa::value#0 value zp[2]:13 10001.0 +word utoa::value#2 value zp[2]:13 5714.857142857143 +word utoa::value#6 value zp[2]:13 15001.5 word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) byte* utoa_append::buffer byte* utoa_append::buffer#0 buffer zp[2]:11 13750.25 byte utoa_append::digit -byte utoa_append::digit#1 digit zp[1]:28 1.0000001E7 -byte utoa_append::digit#2 digit zp[1]:28 1.00500015E7 +byte utoa_append::digit#1 digit zp[1]:26 1.0000001E7 +byte utoa_append::digit#2 digit zp[1]:26 1.00500015E7 word utoa_append::return -word utoa_append::return#0 return zp[2]:14 20002.0 +word utoa_append::return#0 return zp[2]:13 20002.0 word utoa_append::sub -word utoa_append::sub#0 sub zp[2]:30 3335000.5 +word utoa_append::sub#0 sub zp[2]:31 3335000.5 word utoa_append::value -word utoa_append::value#0 value zp[2]:14 36667.33333333333 -word utoa_append::value#1 value zp[2]:14 2.0000002E7 -word utoa_append::value#2 value zp[2]:14 5018334.166666666 +word utoa_append::value#0 value zp[2]:13 36667.33333333333 +word utoa_append::value#1 value zp[2]:13 2.0000002E7 +word utoa_append::value#2 value zp[2]:13 5018334.166666666 zp[4]:2 [ printf_ulong::uvalue#2 printf_ulong::uvalue#0 printf_ulong::uvalue#1 count ] zp[1]:6 [ utoa::digit#2 utoa::digit#1 diff::b#2 diff::b#0 diff::b#1 clrscr::c#2 clrscr::c#1 print::j#2 print::j#1 ] zp[4]:7 [ ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ] zp[2]:11 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 cputs::s#13 cputs::s#14 cputs::s#0 clrscr::line_text#5 clrscr::line_text#1 ] -zp[1]:13 [ uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] -zp[2]:14 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] -zp[1]:16 [ conio_cursor_x ] -zp[1]:17 [ conio_cursor_y ] -zp[2]:18 [ conio_line_text ] -zp[2]:20 [ conio_line_color ] -zp[1]:22 [ tod_init::tod_TENTHS#0 memset::c#4 ] -zp[1]:23 [ tod_init::tod_SEC#0 queen::row#0 queen::r legal::row#0 queen::$4 ] -zp[1]:24 [ tod_init::tod_MIN#0 queen::column legal::column#0 ] -zp[1]:25 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_HOURS#0 print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] -zp[1]:26 [ legal::$0 tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] -zp[1]:27 [ diff::return#0 legal::$3 tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] -zp[1]:28 [ utoa::$11 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] -zp[1]:29 [ utoa::$10 tod_str::$0 tod_str::$1 ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] -zp[2]:30 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] -zp[1]:32 [ ultoa::$11 tod_str::$4 tod_str::$5 uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] -zp[1]:33 [ ultoa::$10 tod_str::$8 tod_str::$9 uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] +zp[2]:13 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] +zp[1]:15 [ conio_cursor_x ] +zp[1]:16 [ conio_cursor_y ] +zp[2]:17 [ conio_line_text ] +zp[2]:19 [ conio_line_color ] +zp[1]:21 [ queen::r ] +zp[1]:22 [ queen::column ] +zp[1]:23 [ queen::$4 legal::row#0 printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] +zp[1]:24 [ tod_init::tod_TENTHS#0 legal::column#0 ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] +zp[1]:25 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_SEC#0 print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] +zp[1]:26 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 tod_init::tod_MIN#0 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] +zp[1]:27 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 tod_init::tod_HOURS#0 ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] +zp[1]:28 [ legal::$0 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] +zp[1]:29 [ tod_str::$0 tod_str::$1 diff::return#0 legal::$3 uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] +zp[1]:30 [ utoa::$10 tod_str::$8 tod_str::$9 queen::row#0 memset::c#4 ] +zp[2]:31 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] +zp[1]:33 [ ultoa::$11 tod_str::$12 tod_str::$13 uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] zp[4]:34 [ ultoa::digit_value#0 ultoa_append::sub#0 ] -zp[1]:38 [ uctoa::digit_value#0 uctoa_append::sub#0 tod_str::$12 tod_str::$13 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] +zp[1]:38 [ uctoa::digit_value#0 uctoa_append::sub#0 ultoa::$10 utoa::$11 tod_str::$4 tod_str::$5 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] zp[2]:39 [ memset::end#0 memcpy::src_end#0 ] mem[12] [ printf_buffer ] mem[4] [ TOD_ZERO ] @@ -11346,13 +11359,13 @@ Score: 2147483647 .label CIA1 = $dc00 // The number of bytes on the screen // The current cursor x-position - .label conio_cursor_x = $10 + .label conio_cursor_x = $f // The current cursor y-position - .label conio_cursor_y = $11 + .label conio_cursor_y = $10 // The current text cursor line start - .label conio_line_text = $12 + .label conio_line_text = $11 // The current color cursor line start - .label conio_line_color = $14 + .label conio_line_color = $13 // The number of found solutions .label count = 2 // __start @@ -11399,21 +11412,22 @@ __start: { // Generates all valid placements of queens on a NxN board recursively // Works by generating all legal placements af a queen for a specific row taking into consideration the queens already placed on the rows below // and then recursively generating all legal placements on the rows above. -// queen(byte zp($17) row) +// queen(byte zp($1e) row) queen: { .const OFFSET_STACK_ROW = 0 - .label r = $17 - .label column = $18 - .label __1 = $1c + .label r = $15 + .label column = $16 + .label __1 = $1a .label __4 = $17 - .label row = $17 + .label row = $1e // } // [9] queen::row#0 = stackidx(byte,queen::OFFSET_STACK_ROW) -- vbuz1=_stackidxbyte_vbuc1 tsx lda STACK_BASE+OFFSET_STACK_ROW,x sta.z row // r = row - // [10] queen::r = queen::row#0 + // [10] queen::r = queen::row#0 -- vbuz1=vbuz2 + sta.z r // column=1 // [11] queen::column = 1 -- vbuz1=vbuc1 lda #1 @@ -11432,8 +11446,12 @@ queen: { // queen::@2 __b2: // legal(r,column) - // [14] legal::row#0 = queen::r - // [15] legal::column#0 = queen::column + // [14] legal::row#0 = queen::r -- vbuz1=vbuz2 + lda.z r + sta.z legal.row + // [15] legal::column#0 = queen::column -- vbuz1=vbuz2 + lda.z column + sta.z legal.column // [16] call legal // [68] phi from queen::@2 to legal [phi:queen::@2->legal] jsr legal @@ -11468,12 +11486,14 @@ queen: { tya pha // r+1 - // [23] queen::$4 = queen::r + 1 -- vbuz1=vbuz1_plus_1 - inc.z __4 + // [23] queen::$4 = queen::r + 1 -- vbuz1=vbuz2_plus_1 + tay + iny + sty.z __4 // queen(r+1) // [24] stackpush(byte) = queen::$4 -- _stackpushbyte_=vbuz1 // Do recursion - lda.z __4 + tya pha // [25] callexecute queen -- jsr jsr queen @@ -11651,15 +11671,15 @@ main: { // If no conflict for desired position returns 1 otherwise returns 0 // legal(byte zp($17) row, byte zp($18) column) legal: { - .label __0 = $1a - .label __3 = $1b - .label __4 = $d + .label __0 = $1c + .label __3 = $1d + .label __4 = $21 .label row = $17 .label column = $18 // Placement is legal // The same column is a conflict. // The same diagonal is a conflict. - .label return = $1c + .label return = $1a .label i = $19 // [69] phi from legal to legal::@1 [phi:legal->legal::@1] // [69] phi legal::i#2 = 1 [phi:legal->legal::@1#0] -- vbuz1=vbuc1 @@ -11922,8 +11942,8 @@ print: { clrscr: { .label c = 6 .label line_text = $b - .label line_cols = $e - .label l = $1c + .label line_cols = $d + .label l = $1a // [117] phi from clrscr to clrscr::@1 [phi:clrscr->clrscr::@1] // [117] phi clrscr::line_cols#5 = COLORRAM [phi:clrscr->clrscr::@1#0] -- pbuz1=pbuc1 lda #cputs::@1] // [133] phi cputs::s#13 = cputs::s#14 [phi:cputs/cputs::@2->cputs::@1#0] -- register_copy @@ -12113,12 +12133,12 @@ printf_uint: { // tod_init // Initialize time-of-day clock // This uses the MOS6526 CIA#1 -// tod_init(byte zp($16) tod_TENTHS, byte zp($17) tod_SEC, byte zp($18) tod_MIN, byte zp($19) tod_HOURS) +// tod_init(byte zp($18) tod_TENTHS, byte zp($19) tod_SEC, byte zp($1a) tod_MIN, byte zp($1b) tod_HOURS) tod_init: { - .label tod_TENTHS = $16 - .label tod_SEC = $17 - .label tod_MIN = $18 - .label tod_HOURS = $19 + .label tod_TENTHS = $18 + .label tod_SEC = $19 + .label tod_MIN = $1a + .label tod_HOURS = $1b // CIA1->TIMER_A_CONTROL |= 0x80 // [146] *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) | $80 -- _deref_pbuc1=_deref_pbuc1_bor_vbuc2 // Set 50hz (this assumes PAL!) (bit7=1) @@ -12191,16 +12211,16 @@ tod_str: { .label __1 = $1d .label __2 = $1c .label __3 = $1c - .label __4 = $20 - .label __5 = $20 + .label __4 = $26 + .label __5 = $26 .label __6 = $1b .label __7 = $1b - .label __8 = $21 - .label __9 = $21 + .label __8 = $1e + .label __9 = $1e .label __10 = $1a .label __11 = $1a - .label __12 = $26 - .label __13 = $26 + .label __12 = $21 + .label __13 = $21 .label __14 = $19 .label __15 = $19 .label tod_TENTHS = $19 @@ -12407,12 +12427,12 @@ printf_string: { } // diff // Find the absolute difference between two unsigned chars -// diff(byte zp($d) a, byte zp(6) b) +// diff(byte zp($21) a, byte zp(6) b) diff: { - .label a = $d + .label a = $21 .label b = 6 - .label return = $1b - .label return_1 = $d + .label return = $1d + .label return_1 = $21 // if(autoa::@1] // [225] phi utoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:utoa->utoa::@1#0] -- pbuz1=pbuc1 lda #ultoa::@1] // [283] phi ultoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:ultoa->ultoa::@1#0] -- pbuz1=pbuc1 lda #uctoa::@1] // [304] phi uctoa::buffer#11 = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 lda #utoa_append::@1] // [329] phi utoa_append::digit#2 = 0 [phi:utoa_append->utoa_append::@1#0] -- vbuz1=vbuc1 lda #0 @@ -13250,11 +13270,11 @@ utoa_append: { } // strlen // Computes the length of the string str up to but not including the terminating null character. -// strlen(byte* zp($e) str) +// strlen(byte* zp($d) str) strlen: { - .label len = $1e - .label str = $e - .label return = $1e + .label len = $1f + .label str = $d + .label return = $1f // [336] phi from strlen to strlen::@1 [phi:strlen->strlen::@1] // [336] phi strlen::len#2 = 0 [phi:strlen->strlen::@1#0] -- vwuz1=vwuc1 lda #<0 @@ -13298,11 +13318,11 @@ strlen: { } // printf_padding // Print a padding char a number of times -// printf_padding(byte zp($d) pad, byte zp($1c) length) +// printf_padding(byte zp($21) pad, byte zp($1a) length) printf_padding: { .label i = $26 - .label length = $1c - .label pad = $d + .label length = $1a + .label pad = $21 // [342] phi from printf_padding to printf_padding::@1 [phi:printf_padding->printf_padding::@1] // [342] phi printf_padding::i#2 = 0 [phi:printf_padding->printf_padding::@1#0] -- vbuz1=vbuc1 lda #0 @@ -13338,8 +13358,8 @@ printf_padding: { // Converts a string to uppercase. strupr: { .label str = printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS - .label __0 = $1c - .label src = $1e + .label __0 = $1a + .label src = $1f // [349] phi from strupr to strupr::@1 [phi:strupr->strupr::@1] // [349] phi strupr::src#2 = strupr::str#0 [phi:strupr->strupr::@1#0] -- pbuz1=pbuc1 lda #uctoa_append::@1] // [366] phi uctoa_append::digit#2 = 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuz1=vbuc1 lda #0 @@ -13616,10 +13636,10 @@ cscroll: { // toupper // Convert lowercase alphabet to uppercase // Returns uppercase equivalent to c, if such value exists, else c remains unchanged -// toupper(byte zp($1c) ch) +// toupper(byte zp($1a) ch) toupper: { - .label return = $1c - .label ch = $1c + .label return = $1a + .label ch = $1a // if(ch>='a' && ch<='z') // [385] if(toupper::ch#0<'a') goto toupper::@return -- vbuz1_lt_vbuc1_then_la1 lda.z ch @@ -13649,13 +13669,13 @@ toupper: { // memcpy // Copy block of memory (forwards) // Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination. -// memcpy(void* zp($e) destination, void* zp($1e) source) +// memcpy(void* zp($d) destination, void* zp($1f) source) memcpy: { .label src_end = $27 - .label dst = $e - .label src = $1e - .label source = $1e - .label destination = $e + .label dst = $d + .label src = $1f + .label source = $1f + .label destination = $d // src_end = (char*)source+num // [391] memcpy::src_end#0 = (byte*)memcpy::source#2 + (word)$19*$28-$28 -- pbuz1=pbuz2_plus_vwuc1 clc @@ -13706,12 +13726,12 @@ memcpy: { } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($e) str, byte zp($16) c) +// memset(void* zp($d) str, byte zp($1e) c) memset: { .label end = $27 - .label dst = $e - .label str = $e - .label c = $16 + .label dst = $d + .label str = $d + .label c = $1e // memset::@1 // end = (char*)str + num // [401] memset::end#0 = (byte*)memset::str#3 + $28 -- pbuz1=pbuz2_plus_vbuc1 diff --git a/src/test/ref/examples/eightqueens/eightqueens-recursive.sym b/src/test/ref/examples/eightqueens/eightqueens-recursive.sym index 1451101b6..62003c699 100644 --- a/src/test/ref/examples/eightqueens/eightqueens-recursive.sym +++ b/src/test/ref/examples/eightqueens/eightqueens-recursive.sym @@ -30,29 +30,29 @@ byte clrscr::c byte clrscr::c#1 c zp[1]:6 20002.0 byte clrscr::c#2 c zp[1]:6 12501.25 byte clrscr::l -byte clrscr::l#1 l zp[1]:28 2002.0 -byte clrscr::l#2 l zp[1]:28 333.6666666666667 +byte clrscr::l#1 l zp[1]:26 2002.0 +byte clrscr::l#2 l zp[1]:26 333.6666666666667 byte* clrscr::line_cols -byte* clrscr::line_cols#1 line_cols zp[2]:14 1001.0 -byte* clrscr::line_cols#5 line_cols zp[2]:14 1500.375 +byte* clrscr::line_cols#1 line_cols zp[2]:13 1001.0 +byte* clrscr::line_cols#5 line_cols zp[2]:13 1500.375 byte* clrscr::line_text byte* clrscr::line_text#1 line_text zp[2]:11 667.3333333333334 byte* clrscr::line_text#5 line_text zp[2]:11 1714.7142857142858 -byte conio_cursor_x loadstore zp[1]:16 8.241758241758241E27 -byte conio_cursor_y loadstore zp[1]:17 1.6243654822335025E29 -byte* conio_line_color loadstore zp[2]:20 1.1450777202072537E29 -byte* conio_line_text loadstore zp[2]:18 1.1333333333333334E29 +byte conio_cursor_x loadstore zp[1]:15 8.241758241758241E27 +byte conio_cursor_y loadstore zp[1]:16 1.6243654822335025E29 +byte* conio_line_color loadstore zp[2]:19 1.1450777202072537E29 +byte* conio_line_text loadstore zp[2]:17 1.1333333333333334E29 dword count loadstore zp[4]:2 2.4691358025012344E10 void cputc(byte cputc::c) byte cputc::c -byte cputc::c#0 c zp[1]:13 2.0E28 -byte cputc::c#1 c zp[1]:13 2.0E27 -byte cputc::c#2 c zp[1]:13 2.00000000000002E14 -byte cputc::c#3 c zp[1]:13 1.0550000000000004E29 +byte cputc::c#0 c zp[1]:33 2.0E28 +byte cputc::c#1 c zp[1]:33 2.0E27 +byte cputc::c#2 c zp[1]:33 2.00000000000002E14 +byte cputc::c#3 c zp[1]:33 1.0550000000000004E29 void cputln() void cputs(to_nomodify byte* cputs::s) byte cputs::c -byte cputs::c#1 c zp[1]:13 1.0E28 +byte cputs::c#1 c zp[1]:33 1.0E28 to_nomodify byte* cputs::s to_nomodify byte* cputs::s#0 s zp[2]:11 5.0E27 to_nomodify byte* cputs::s#13 s zp[2]:11 1.5000000000000497E28 @@ -60,19 +60,19 @@ to_nomodify byte* cputs::s#14 s zp[2]:11 1.000000000000001E15 void cscroll() byte diff(byte diff::a , byte diff::b) byte diff::a -byte diff::a#0 a zp[1]:13 1.000000000001E12 -byte diff::a#1 a zp[1]:13 1.000000000001E12 -byte diff::a#2 a zp[1]:13 1.60000000000025E13 +byte diff::a#0 a zp[1]:33 1.000000000001E12 +byte diff::a#1 a zp[1]:33 1.000000000001E12 +byte diff::a#2 a zp[1]:33 1.60000000000025E13 byte diff::b byte diff::b#0 b zp[1]:6 2.000000000002E12 byte diff::b#1 b zp[1]:6 2.000000000002E12 byte diff::b#2 b zp[1]:6 1.60000000000025E13 byte diff::return -byte diff::return#0 return zp[1]:27 2.000000000002E12 -byte diff::return#1 return_1 zp[1]:13 2.000000000002E12 -byte diff::return#2 return_1 zp[1]:13 2.0000000000002E13 -byte diff::return#3 return_1 zp[1]:13 2.0000000000002E13 -byte diff::return#4 return_1 zp[1]:13 5.500000000001E12 +byte diff::return#0 return zp[1]:29 2.000000000002E12 +byte diff::return#1 return_1 zp[1]:33 2.000000000002E12 +byte diff::return#2 return_1 zp[1]:33 2.0000000000002E13 +byte diff::return#3 return_1 zp[1]:33 2.0000000000002E13 +byte diff::return#4 return_1 zp[1]:33 5.500000000001E12 void gotoxy(byte gotoxy::x , byte gotoxy::y) word gotoxy::line_offset const word gotoxy::line_offset#0 line_offset = (word)gotoxy::y#2*$28 @@ -81,17 +81,17 @@ const byte gotoxy::x#2 x = 0 byte gotoxy::y const byte gotoxy::y#2 y = 5 byte legal(byte legal::row , byte legal::column) -byte~ legal::$0 zp[1]:26 2.000000000002E12 -byte~ legal::$3 zp[1]:27 3.333333333336667E11 -byte~ legal::$4 zp[1]:13 2.000000000002E12 +byte~ legal::$0 zp[1]:28 2.000000000002E12 +byte~ legal::$3 zp[1]:29 3.333333333336667E11 +byte~ legal::$4 zp[1]:33 2.000000000002E12 byte legal::column byte legal::column#0 column zp[1]:24 1.6666666666683334E11 byte legal::i byte legal::i#1 i zp[1]:25 2.000000000002E12 byte legal::i#2 i zp[1]:25 4.0000000000039996E11 byte legal::return -byte legal::return#0 return zp[1]:28 2.000000000002E12 -byte legal::return#4 return zp[1]:28 3.333333333336667E11 +byte legal::return#0 return zp[1]:26 2.000000000002E12 +byte legal::return#4 return zp[1]:26 3.333333333336667E11 byte legal::row byte legal::row#0 row zp[1]:23 1.5789473684226315E11 void main() @@ -106,34 +106,34 @@ const byte* main::s4[3] = ". " void* memcpy(void* memcpy::destination , void* memcpy::source , word memcpy::num) void* memcpy::destination -void* memcpy::destination#2 destination zp[2]:14 +void* memcpy::destination#2 destination zp[2]:13 byte* memcpy::dst -byte* memcpy::dst#1 dst zp[2]:14 1.0E46 -byte* memcpy::dst#2 dst zp[2]:14 1.0000000000000033E46 -byte* memcpy::dst#4 dst zp[2]:14 2.0E32 +byte* memcpy::dst#1 dst zp[2]:13 1.0E46 +byte* memcpy::dst#2 dst zp[2]:13 1.0000000000000033E46 +byte* memcpy::dst#4 dst zp[2]:13 2.0E32 word memcpy::num void* memcpy::return void* memcpy::source -void* memcpy::source#2 source zp[2]:30 +void* memcpy::source#2 source zp[2]:31 byte* memcpy::src -byte* memcpy::src#1 src zp[2]:30 2.0E46 -byte* memcpy::src#2 src zp[2]:30 1.0000000000000025E46 -byte* memcpy::src#4 src zp[2]:30 1.0E32 +byte* memcpy::src#1 src zp[2]:31 2.0E46 +byte* memcpy::src#2 src zp[2]:31 1.0000000000000025E46 +byte* memcpy::src#4 src zp[2]:31 1.0E32 byte* memcpy::src_end byte* memcpy::src_end#0 src_end zp[2]:39 1.2500000000000125E45 void* memset(void* memset::str , byte memset::c , word memset::num) byte memset::c -byte memset::c#4 c zp[1]:22 1.4285714285714287E45 +byte memset::c#4 c zp[1]:30 1.4285714285714287E45 byte* memset::dst -byte* memset::dst#1 dst zp[2]:14 2.0E46 -byte* memset::dst#2 dst zp[2]:14 1.3333333333333366E46 -byte* memset::dst#4 dst zp[2]:14 2.0E32 +byte* memset::dst#1 dst zp[2]:13 2.0E46 +byte* memset::dst#2 dst zp[2]:13 1.3333333333333366E46 +byte* memset::dst#4 dst zp[2]:13 2.0E32 byte* memset::end byte* memset::end#0 end zp[2]:39 1.6666666666666835E45 word memset::num void* memset::return void* memset::str -void* memset::str#3 str zp[2]:14 +void* memset::str#3 str zp[2]:13 void print() byte print::i byte print::i#1 i zp[1]:25 2.000000000002E12 @@ -154,43 +154,43 @@ const byte* print::s3[2] = "Q" const byte* print::s4[2] = "-" struct printf_buffer_number printf_buffer loadstore mem[12] = {} void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix) -word~ printf_number_buffer::$19 zp[2]:30 1.00000000000001E14 +word~ printf_number_buffer::$19 zp[2]:31 1.00000000000001E14 struct printf_buffer_number printf_number_buffer::buffer byte* printf_number_buffer::buffer_digits byte printf_number_buffer::buffer_sign -byte printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:32 202.0 -byte printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:32 202.0 -byte printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:32 1.55000000000103E13 -byte printf_number_buffer::buffer_sign#2 buffer_sign zp[1]:32 2.0000000000002E13 +byte printf_number_buffer::buffer_sign#0 buffer_sign zp[1]:28 202.0 +byte printf_number_buffer::buffer_sign#1 buffer_sign zp[1]:28 202.0 +byte printf_number_buffer::buffer_sign#10 buffer_sign zp[1]:28 1.55000000000103E13 +byte printf_number_buffer::buffer_sign#2 buffer_sign zp[1]:28 2.0000000000002E13 struct printf_format_number printf_number_buffer::format byte printf_number_buffer::format_justify_left -byte printf_number_buffer::format_justify_left#10 format_justify_left zp[1]:27 6.451612903225871E12 +byte printf_number_buffer::format_justify_left#10 format_justify_left zp[1]:24 6.451612903225871E12 byte printf_number_buffer::format_min_length -byte printf_number_buffer::format_min_length#3 format_min_length zp[1]:26 1.00000000000001E13 +byte printf_number_buffer::format_min_length#3 format_min_length zp[1]:23 1.00000000000001E13 byte printf_number_buffer::format_radix byte printf_number_buffer::format_sign_always byte printf_number_buffer::format_upper_case -byte printf_number_buffer::format_upper_case#10 format_upper_case zp[1]:33 3.846153846153885E12 +byte printf_number_buffer::format_upper_case#10 format_upper_case zp[1]:29 3.846153846153885E12 byte printf_number_buffer::format_zero_padding -byte printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:29 9.375000000000094E12 +byte printf_number_buffer::format_zero_padding#10 format_zero_padding zp[1]:27 9.375000000000094E12 signed byte printf_number_buffer::len -signed byte printf_number_buffer::len#0 len zp[1]:13 1.500000000000015E14 -signed byte printf_number_buffer::len#1 len zp[1]:13 2.00000000000002E14 -signed byte printf_number_buffer::len#2 len zp[1]:13 3.00000000000003E14 +signed byte printf_number_buffer::len#0 len zp[1]:33 1.500000000000015E14 +signed byte printf_number_buffer::len#1 len zp[1]:33 2.00000000000002E14 +signed byte printf_number_buffer::len#2 len zp[1]:33 3.00000000000003E14 signed byte printf_number_buffer::padding -signed byte printf_number_buffer::padding#1 padding zp[1]:26 1.00000000000001E14 -signed byte printf_number_buffer::padding#10 padding zp[1]:26 1.904761904761924E13 +signed byte printf_number_buffer::padding#1 padding zp[1]:23 1.00000000000001E14 +signed byte printf_number_buffer::padding#10 padding zp[1]:23 1.904761904761924E13 void printf_padding(byte printf_padding::pad , byte printf_padding::length) byte printf_padding::i byte printf_padding::i#1 i zp[1]:38 2.0E27 byte printf_padding::i#2 i zp[1]:38 7.500000000000001E26 byte printf_padding::length -byte printf_padding::length#0 length zp[1]:28 2.00000000000002E14 -byte printf_padding::length#1 length zp[1]:28 2.00000000000002E14 -byte printf_padding::length#2 length zp[1]:28 2.00000000000002E14 -byte printf_padding::length#6 length zp[1]:28 1.6666666666671665E26 +byte printf_padding::length#0 length zp[1]:26 2.00000000000002E14 +byte printf_padding::length#1 length zp[1]:26 2.00000000000002E14 +byte printf_padding::length#2 length zp[1]:26 2.00000000000002E14 +byte printf_padding::length#6 length zp[1]:26 1.6666666666671665E26 byte printf_padding::pad -byte printf_padding::pad#7 pad zp[1]:13 1.6666666666666666E26 +byte printf_padding::pad#7 pad zp[1]:33 1.6666666666666666E26 void printf_string(byte* printf_string::str , byte printf_string::format_min_length , byte printf_string::format_justify_left) struct printf_format_string printf_string::format byte printf_string::format_justify_left @@ -237,41 +237,41 @@ dword printf_ulong::uvalue#0 uvalue zp[4]:2 22.0 dword printf_ulong::uvalue#1 uvalue zp[4]:2 22.0 dword printf_ulong::uvalue#2 uvalue zp[4]:2 61.5 __stackcall void queen(byte queen::row) -byte~ queen::$1 zp[1]:28 2.000000000002E12 +byte~ queen::$1 zp[1]:26 2.000000000002E12 byte~ queen::$4 zp[1]:23 2.000000000002E12 const byte queen::OFFSET_STACK_ROW = 0 -byte queen::column loadstore zp[1]:24 2.9411764706505884E11 -byte queen::r loadstore zp[1]:23 2.10526315795E11 +volatile byte queen::column loadstore zp[1]:22 2.9411764706505884E11 +volatile byte queen::r loadstore zp[1]:21 2.10526315795E11 byte queen::row -byte queen::row#0 row zp[1]:23 202.0 +byte queen::row#0 row zp[1]:30 202.0 word strlen(byte* strlen::str) word strlen::len -word strlen::len#1 len zp[2]:30 1.0E27 -word strlen::len#2 len zp[2]:30 5.00000000000025E26 +word strlen::len#1 len zp[2]:31 1.0E27 +word strlen::len#2 len zp[2]:31 5.00000000000025E26 word strlen::return -word strlen::return#2 return zp[2]:30 2.00000000000002E14 +word strlen::return#2 return zp[2]:31 2.00000000000002E14 byte* strlen::str -byte* strlen::str#0 str zp[2]:14 2.0E27 -byte* strlen::str#3 str zp[2]:14 1.0E27 +byte* strlen::str#0 str zp[2]:13 2.0E27 +byte* strlen::str#3 str zp[2]:13 1.0E27 byte* strupr(byte* strupr::str) -byte~ strupr::$0 zp[1]:28 2.0E27 +byte~ strupr::$0 zp[1]:26 2.0E27 byte* strupr::return byte* strupr::src -byte* strupr::src#1 src zp[2]:30 2.0E27 -byte* strupr::src#2 src zp[2]:30 7.142857142857143E26 +byte* strupr::src#1 src zp[2]:31 2.0E27 +byte* strupr::src#2 src zp[2]:31 7.142857142857143E26 byte* strupr::str const byte* strupr::str#0 str = (byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS const byte* tod_buffer[] = "00:00:00:00" void tod_init(byte tod_init::tod_TENTHS , byte tod_init::tod_SEC , byte tod_init::tod_MIN , byte tod_init::tod_HOURS) struct TIME_OF_DAY tod_init::tod byte tod_init::tod_HOURS -byte tod_init::tod_HOURS#0 tod_HOURS zp[1]:25 37.33333333333333 +byte tod_init::tod_HOURS#0 tod_HOURS zp[1]:27 37.33333333333333 byte tod_init::tod_MIN -byte tod_init::tod_MIN#0 tod_MIN zp[1]:24 22.4 +byte tod_init::tod_MIN#0 tod_MIN zp[1]:26 22.4 byte tod_init::tod_SEC -byte tod_init::tod_SEC#0 tod_SEC zp[1]:23 16.0 +byte tod_init::tod_SEC#0 tod_SEC zp[1]:25 16.0 byte tod_init::tod_TENTHS -byte tod_init::tod_TENTHS#0 tod_TENTHS zp[1]:22 12.444444444444443 +byte tod_init::tod_TENTHS#0 tod_TENTHS zp[1]:24 12.444444444444443 struct TIME_OF_DAY tod_read() byte tod_read::hours byte tod_read::mins @@ -299,18 +299,18 @@ byte~ tod_str::$0 zp[1]:29 202.0 byte~ tod_str::$1 zp[1]:29 202.0 byte~ tod_str::$10 zp[1]:26 202.0 byte~ tod_str::$11 zp[1]:26 202.0 -byte~ tod_str::$12 zp[1]:38 202.0 -byte~ tod_str::$13 zp[1]:38 202.0 +byte~ tod_str::$12 zp[1]:33 202.0 +byte~ tod_str::$13 zp[1]:33 202.0 byte~ tod_str::$14 zp[1]:25 202.0 byte~ tod_str::$15 zp[1]:25 202.0 byte~ tod_str::$2 zp[1]:28 202.0 byte~ tod_str::$3 zp[1]:28 202.0 -byte~ tod_str::$4 zp[1]:32 202.0 -byte~ tod_str::$5 zp[1]:32 202.0 +byte~ tod_str::$4 zp[1]:38 202.0 +byte~ tod_str::$5 zp[1]:38 202.0 byte~ tod_str::$6 zp[1]:27 202.0 byte~ tod_str::$7 zp[1]:27 202.0 -byte~ tod_str::$8 zp[1]:33 202.0 -byte~ tod_str::$9 zp[1]:33 202.0 +byte~ tod_str::$8 zp[1]:30 202.0 +byte~ tod_str::$9 zp[1]:30 202.0 byte* tod_str::return struct TIME_OF_DAY tod_str::tod byte tod_str::tod_HOURS @@ -323,66 +323,66 @@ byte tod_str::tod_TENTHS byte tod_str::tod_TENTHS#0 tod_TENTHS zp[1]:25 8.52 byte toupper(byte toupper::ch) byte toupper::ch -byte toupper::ch#0 ch zp[1]:28 1.6999999999999998E28 +byte toupper::ch#0 ch zp[1]:26 1.6999999999999998E28 byte toupper::return -byte toupper::return#0 return zp[1]:28 2.0E28 -byte toupper::return#2 return zp[1]:28 1.0333333333333333E28 -byte toupper::return#3 return zp[1]:28 2.0E27 +byte toupper::return#0 return zp[1]:26 2.0E28 +byte toupper::return#2 return zp[1]:26 1.0333333333333333E28 +byte toupper::return#3 return zp[1]:26 2.0E27 void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix) byte* uctoa::buffer -byte* uctoa::buffer#11 buffer zp[2]:14 3.3333333333350004E25 -byte* uctoa::buffer#14 buffer zp[2]:14 1.5000000000000002E26 -byte* uctoa::buffer#3 buffer zp[2]:14 2.00000000000002E14 -byte* uctoa::buffer#4 buffer zp[2]:14 2.0E26 +byte* uctoa::buffer#11 buffer zp[2]:13 3.3333333333350004E25 +byte* uctoa::buffer#14 buffer zp[2]:13 1.5000000000000002E26 +byte* uctoa::buffer#3 buffer zp[2]:13 2.00000000000002E14 +byte* uctoa::buffer#4 buffer zp[2]:13 2.0E26 byte uctoa::digit -byte uctoa::digit#1 digit zp[1]:32 2.0E26 -byte uctoa::digit#2 digit zp[1]:32 3.076923076923077E25 +byte uctoa::digit#1 digit zp[1]:28 2.0E26 +byte uctoa::digit#2 digit zp[1]:28 3.076923076923077E25 byte uctoa::digit_value byte uctoa::digit_value#0 digit_value zp[1]:38 6.000000000000001E25 byte* uctoa::digit_values byte uctoa::max_digits byte uctoa::radix byte uctoa::started -byte uctoa::started#2 started zp[1]:13 6.000000000000001E25 -byte uctoa::started#4 started zp[1]:13 1.0E26 +byte uctoa::started#2 started zp[1]:33 6.000000000000001E25 +byte uctoa::started#4 started zp[1]:33 1.0E26 byte uctoa::value -byte uctoa::value#0 value zp[1]:33 1.0E26 -byte uctoa::value#1 value zp[1]:33 5.5000000000001E13 -byte uctoa::value#2 value zp[1]:33 6.666666666670001E25 -byte uctoa::value#6 value zp[1]:33 1.5000000000000002E26 +byte uctoa::value#0 value zp[1]:29 1.0E26 +byte uctoa::value#1 value zp[1]:29 5.5000000000001E13 +byte uctoa::value#2 value zp[1]:29 6.666666666670001E25 +byte uctoa::value#6 value zp[1]:29 1.5000000000000002E26 byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub) byte* uctoa_append::buffer -byte* uctoa_append::buffer#0 buffer zp[2]:14 1.3750000000000001E26 +byte* uctoa_append::buffer#0 buffer zp[2]:13 1.3750000000000001E26 byte uctoa_append::digit -byte uctoa_append::digit#1 digit zp[1]:28 1.0E40 -byte uctoa_append::digit#2 digit zp[1]:28 1.00000000000005E40 +byte uctoa_append::digit#1 digit zp[1]:26 1.0E40 +byte uctoa_append::digit#2 digit zp[1]:26 1.00000000000005E40 byte uctoa_append::return -byte uctoa_append::return#0 return zp[1]:33 2.0E26 +byte uctoa_append::return#0 return zp[1]:29 2.0E26 byte uctoa_append::sub byte uctoa_append::sub#0 sub zp[1]:38 3.33333333333335E39 byte uctoa_append::value -byte uctoa_append::value#0 value zp[1]:33 3.666666666666667E26 -byte uctoa_append::value#1 value zp[1]:33 2.0E40 -byte uctoa_append::value#2 value zp[1]:33 5.0000000000001833E39 +byte uctoa_append::value#0 value zp[1]:29 3.666666666666667E26 +byte uctoa_append::value#1 value zp[1]:29 2.0E40 +byte uctoa_append::value#2 value zp[1]:29 5.0000000000001833E39 void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix) -byte~ ultoa::$10 zp[1]:33 2.00000000000002E14 -byte~ ultoa::$11 zp[1]:32 2002.0 +byte~ ultoa::$10 zp[1]:38 2.00000000000002E14 +byte~ ultoa::$11 zp[1]:33 2002.0 byte* ultoa::buffer byte* ultoa::buffer#11 buffer zp[2]:11 2.8571428571571855E13 byte* ultoa::buffer#14 buffer zp[2]:11 1.500000000000015E14 byte* ultoa::buffer#3 buffer zp[2]:11 2002.0 byte* ultoa::buffer#4 buffer zp[2]:11 2.00000000000002E14 byte ultoa::digit -byte ultoa::digit#1 digit zp[1]:27 2.00000000000002E14 -byte ultoa::digit#2 digit zp[1]:27 2.8571428571428855E13 +byte ultoa::digit#1 digit zp[1]:24 2.00000000000002E14 +byte ultoa::digit#2 digit zp[1]:24 2.8571428571428855E13 dword ultoa::digit_value dword ultoa::digit_value#0 digit_value zp[4]:34 6.000000000000059E13 dword* ultoa::digit_values byte ultoa::max_digits byte ultoa::radix byte ultoa::started -byte ultoa::started#2 started zp[1]:29 5.00000000000005E13 -byte ultoa::started#4 started zp[1]:29 1.00000000000001E14 +byte ultoa::started#2 started zp[1]:27 5.00000000000005E13 +byte ultoa::started#4 started zp[1]:27 1.00000000000001E14 dword ultoa::value dword ultoa::value#0 value zp[4]:7 1.00000000000001E14 dword ultoa::value#1 value zp[4]:7 551.0 @@ -403,8 +403,8 @@ dword ultoa_append::value#0 value zp[4]:7 3.666666666666674E14 dword ultoa_append::value#1 value zp[4]:7 2.0E27 dword ultoa_append::value#2 value zp[4]:7 5.0000000000018335E26 void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix) -byte~ utoa::$10 zp[1]:29 20002.0 -byte~ utoa::$11 zp[1]:28 2002.0 +byte~ utoa::$10 zp[1]:30 20002.0 +byte~ utoa::$11 zp[1]:38 2002.0 byte* utoa::buffer byte* utoa::buffer#11 buffer zp[2]:11 3000.4285714285716 byte* utoa::buffer#14 buffer zp[2]:11 15001.5 @@ -414,56 +414,56 @@ byte utoa::digit byte utoa::digit#1 digit zp[1]:6 20002.0 byte utoa::digit#2 digit zp[1]:6 2857.4285714285716 word utoa::digit_value -word utoa::digit_value#0 digit_value zp[2]:30 6000.6 +word utoa::digit_value#0 digit_value zp[2]:31 6000.6 word* utoa::digit_values byte utoa::max_digits const byte utoa::max_digits#1 max_digits = 5 byte utoa::radix byte utoa::started -byte utoa::started#2 started zp[1]:26 5000.5 -byte utoa::started#4 started zp[1]:26 10001.0 +byte utoa::started#2 started zp[1]:23 5000.5 +byte utoa::started#4 started zp[1]:23 10001.0 word utoa::value -word utoa::value#0 value zp[2]:14 10001.0 -word utoa::value#2 value zp[2]:14 5714.857142857143 -word utoa::value#6 value zp[2]:14 15001.5 +word utoa::value#0 value zp[2]:13 10001.0 +word utoa::value#2 value zp[2]:13 5714.857142857143 +word utoa::value#6 value zp[2]:13 15001.5 word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub) byte* utoa_append::buffer byte* utoa_append::buffer#0 buffer zp[2]:11 13750.25 byte utoa_append::digit -byte utoa_append::digit#1 digit zp[1]:28 1.0000001E7 -byte utoa_append::digit#2 digit zp[1]:28 1.00500015E7 +byte utoa_append::digit#1 digit zp[1]:26 1.0000001E7 +byte utoa_append::digit#2 digit zp[1]:26 1.00500015E7 word utoa_append::return -word utoa_append::return#0 return zp[2]:14 20002.0 +word utoa_append::return#0 return zp[2]:13 20002.0 word utoa_append::sub -word utoa_append::sub#0 sub zp[2]:30 3335000.5 +word utoa_append::sub#0 sub zp[2]:31 3335000.5 word utoa_append::value -word utoa_append::value#0 value zp[2]:14 36667.33333333333 -word utoa_append::value#1 value zp[2]:14 2.0000002E7 -word utoa_append::value#2 value zp[2]:14 5018334.166666666 +word utoa_append::value#0 value zp[2]:13 36667.33333333333 +word utoa_append::value#1 value zp[2]:13 2.0000002E7 +word utoa_append::value#2 value zp[2]:13 5018334.166666666 zp[4]:2 [ printf_ulong::uvalue#2 printf_ulong::uvalue#0 printf_ulong::uvalue#1 count ] zp[1]:6 [ utoa::digit#2 utoa::digit#1 diff::b#2 diff::b#0 diff::b#1 clrscr::c#2 clrscr::c#1 print::j#2 print::j#1 ] zp[4]:7 [ ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ] zp[2]:11 [ ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 cputs::s#13 cputs::s#14 cputs::s#0 clrscr::line_text#5 clrscr::line_text#1 ] -zp[1]:13 [ uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] -zp[2]:14 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] -zp[1]:16 [ conio_cursor_x ] -zp[1]:17 [ conio_cursor_y ] -zp[2]:18 [ conio_line_text ] -zp[2]:20 [ conio_line_color ] -zp[1]:22 [ tod_init::tod_TENTHS#0 memset::c#4 ] -zp[1]:23 [ tod_init::tod_SEC#0 queen::row#0 queen::r legal::row#0 queen::$4 ] -zp[1]:24 [ tod_init::tod_MIN#0 queen::column legal::column#0 ] -zp[1]:25 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_HOURS#0 print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] -zp[1]:26 [ legal::$0 tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] -zp[1]:27 [ diff::return#0 legal::$3 tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] -zp[1]:28 [ utoa::$11 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] -zp[1]:29 [ utoa::$10 tod_str::$0 tod_str::$1 ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] -zp[2]:30 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] -zp[1]:32 [ ultoa::$11 tod_str::$4 tod_str::$5 uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] -zp[1]:33 [ ultoa::$10 tod_str::$8 tod_str::$9 uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] +zp[2]:13 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 strlen::str#3 strlen::str#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 utoa::value#2 utoa::value#6 utoa::value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_cols#5 clrscr::line_cols#1 ] +zp[1]:15 [ conio_cursor_x ] +zp[1]:16 [ conio_cursor_y ] +zp[2]:17 [ conio_line_text ] +zp[2]:19 [ conio_line_color ] +zp[1]:21 [ queen::r ] +zp[1]:22 [ queen::column ] +zp[1]:23 [ queen::$4 legal::row#0 printf_number_buffer::format_min_length#3 printf_number_buffer::padding#10 printf_number_buffer::padding#1 utoa::started#2 utoa::started#4 ] +zp[1]:24 [ tod_init::tod_TENTHS#0 legal::column#0 ultoa::digit#2 ultoa::digit#1 printf_number_buffer::format_justify_left#10 ] +zp[1]:25 [ tod_read::return_TENTHS#2 tod_str::tod_TENTHS#0 tod_read::return_TENTHS#0 tod_str::$14 tod_str::$15 tod_init::tod_SEC#0 print::i#2 print::i#1 printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 print::i1#2 print::i1#1 legal::i#2 legal::i#1 ] +zp[1]:26 [ tod_read::return_SEC#2 tod_str::tod_SEC#0 tod_read::return_SEC#0 tod_str::$10 tod_str::$11 tod_init::tod_MIN#0 clrscr::l#2 clrscr::l#1 legal::return#4 legal::return#0 queen::$1 toupper::return#2 toupper::return#0 toupper::ch#0 toupper::return#3 strupr::$0 uctoa_append::digit#2 uctoa_append::digit#1 printf_padding::length#6 printf_padding::length#1 printf_padding::length#2 printf_padding::length#0 utoa_append::digit#2 utoa_append::digit#1 ] +zp[1]:27 [ tod_read::return_MIN#2 tod_str::tod_MIN#0 tod_read::return_MIN#0 tod_str::$6 tod_str::$7 tod_init::tod_HOURS#0 ultoa::started#2 ultoa::started#4 printf_number_buffer::format_zero_padding#10 ] +zp[1]:28 [ legal::$0 tod_read::return_HOURS#2 tod_str::tod_HOURS#0 tod_read::return_HOURS#0 tod_str::$2 tod_str::$3 uctoa::digit#2 uctoa::digit#1 printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ] +zp[1]:29 [ tod_str::$0 tod_str::$1 diff::return#0 legal::$3 uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 uctoa_append::return#0 printf_number_buffer::format_upper_case#10 ] +zp[1]:30 [ utoa::$10 tod_str::$8 tod_str::$9 queen::row#0 memset::c#4 ] +zp[2]:31 [ utoa::digit_value#0 utoa_append::sub#0 strlen::len#2 strlen::len#1 strlen::return#2 printf_number_buffer::$19 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 strupr::src#2 strupr::src#1 ] +zp[1]:33 [ ultoa::$11 tod_str::$12 tod_str::$13 uctoa::started#2 uctoa::started#4 printf_number_buffer::len#2 printf_number_buffer::len#0 printf_number_buffer::len#1 cputc::c#3 cputc::c#0 cputc::c#2 cputc::c#1 printf_padding::pad#7 cputs::c#1 diff::a#2 diff::a#0 diff::a#1 diff::return#4 diff::return#2 diff::return#3 diff::return#1 legal::$4 ] zp[4]:34 [ ultoa::digit_value#0 ultoa_append::sub#0 ] -zp[1]:38 [ uctoa::digit_value#0 uctoa_append::sub#0 tod_str::$12 tod_str::$13 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] +zp[1]:38 [ uctoa::digit_value#0 uctoa_append::sub#0 ultoa::$10 utoa::$11 tod_str::$4 tod_str::$5 ultoa_append::digit#2 ultoa_append::digit#1 printf_padding::i#2 printf_padding::i#1 ] zp[2]:39 [ memset::end#0 memcpy::src_end#0 ] mem[12] [ printf_buffer ] mem[4] [ TOD_ZERO ] diff --git a/src/test/ref/function-pointer-noarg-3.asm b/src/test/ref/function-pointer-noarg-3.asm index 6b1830097..7cfa758fc 100644 --- a/src/test/ref/function-pointer-noarg-3.asm +++ b/src/test/ref/function-pointer-noarg-3.asm @@ -18,7 +18,11 @@ fn1: { } main: { .label f = 2 - ldx #0 + // f + lda #<0 + sta.z f + sta.z f+1 + tax __b2: // ++i; inx @@ -28,21 +32,23 @@ main: { // if((i&1)==0) cmp #0 beq __b3 + // f = &fn2 lda #fn2 sta.z f+1 - jmp __b4 - __b3: - lda #fn1 - sta.z f+1 __b4: // kickasm jsr ff jmp __b2 + __b3: + // f = &fn1 + lda #fn1 + sta.z f+1 + jmp __b4 } // Inline KickAsm function ff: diff --git a/src/test/ref/function-pointer-noarg-3.cfg b/src/test/ref/function-pointer-noarg-3.cfg index 9d45b46d2..c158235fc 100644 --- a/src/test/ref/function-pointer-noarg-3.cfg +++ b/src/test/ref/function-pointer-noarg-3.cfg @@ -17,7 +17,7 @@ fn1::@return: scope:[fn1] from fn1 void main() main: scope:[main] from - [4] phi() + [4] main::f = (void()*) 0 to:main::@1 main::@1: scope:[main] from main main::@4 [5] main::i#2 = phi( main/0, main::@4/main::i#1 ) @@ -26,12 +26,14 @@ main::@2: scope:[main] from main::@1 [6] main::i#1 = ++ main::i#2 [7] main::$0 = main::i#1 & 1 [8] if(main::$0==0) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@2 + [9] main::f = &fn2 to:main::@4 -main::@3: scope:[main] from main::@2 - [9] phi() - to:main::@4 -main::@4: scope:[main] from main::@2 main::@3 - [10] main::f#3 = phi( main::@3/&fn1, main::@2/&fn2 ) - kickasm( uses main::f#3 uses ff) {{ jsr ff +main::@4: scope:[main] from main::@3 main::@5 + kickasm( uses main::f uses ff) {{ jsr ff }} to:main::@1 +main::@3: scope:[main] from main::@2 + [11] main::f = &fn1 + to:main::@4 diff --git a/src/test/ref/function-pointer-noarg-3.log b/src/test/ref/function-pointer-noarg-3.log index 7a02a0d37..8b39e92b5 100644 --- a/src/test/ref/function-pointer-noarg-3.log +++ b/src/test/ref/function-pointer-noarg-3.log @@ -1,12 +1,14 @@ Resolved forward reference fn1 to void fn1() Resolved forward reference fn2 to void fn2() Resolved forward reference ff to ff +Setting inferred volatile on symbol affected by address-of: main::f in kickasm( uses main::f uses ff) {{ jsr ff + }} CONTROL FLOW GRAPH SSA void main() main: scope:[main] from __start - main::f#0 = (void()*) 0 + main::f = (void()*) 0 main::i#0 = 0 to:main::@1 main::@1: scope:[main] from main main::@4 @@ -22,16 +24,15 @@ main::@2: scope:[main] from main::@1 to:main::@5 main::@3: scope:[main] from main::@2 main::i#5 = phi( main::@2/main::i#1 ) - main::f#1 = &fn1 + main::f = &fn1 to:main::@4 main::@5: scope:[main] from main::@2 main::i#6 = phi( main::@2/main::i#1 ) - main::f#2 = &fn2 + main::f = &fn2 to:main::@4 main::@4: scope:[main] from main::@3 main::@5 main::i#4 = phi( main::@3/main::i#5, main::@5/main::i#6 ) - main::f#3 = phi( main::@3/main::f#1, main::@5/main::f#2 ) - kickasm( uses main::f#3 uses ff) {{ jsr ff + kickasm( uses main::f uses ff) {{ jsr ff }} to:main::@1 main::@return: scope:[main] from main::@1 @@ -75,11 +76,7 @@ const nomodify byte* fn2::BG_COLOR = (byte*)$d021 void main() number~ main::$0 bool~ main::$1 -void()* main::f -void()* main::f#0 -void()* main::f#1 -void()* main::f#2 -void()* main::f#3 +volatile void()* main::f loadstore byte main::i byte main::i#0 byte main::i#1 @@ -109,15 +106,10 @@ Alias main::i#1 = main::i#4 Successful SSA optimization Pass2AliasElimination Simple Condition main::$1 [7] if(main::$0==0) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant main::f#0 = (void()*) 0 Constant main::i#0 = 0 -Constant main::f#1 = &fn1 -Constant main::f#2 = &fn2 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [3] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Eliminating unused constant main::f#0 -Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Removing unused procedure __start @@ -126,23 +118,13 @@ Removing unused procedure block __start::@1 Removing unused procedure block __start::@return Successful SSA optimization PassNEliminateEmptyStart Inlining constant with var siblings main::i#0 -Inlining constant with var siblings main::f#1 -Inlining constant with var siblings main::f#2 Constant inlined main::i#0 = 0 -Constant inlined main::f#2 = &fn2 -Constant inlined main::f#1 = &fn1 Successful SSA optimization Pass2ConstantInlining -Adding NOP phi() at start of main -Adding NOP phi() at start of main::@5 -Adding NOP phi() at start of main::@3 CALL GRAPH -Created 2 initial phi equivalence classes -Coalesced [12] main::i#7 = main::i#1 -Coalesced down to 2 phi equivalence classes -Culled Empty Block label main::@5 -Adding NOP phi() at start of main -Adding NOP phi() at start of main::@3 +Created 1 initial phi equivalence classes +Coalesced [11] main::i#7 = main::i#1 +Coalesced down to 1 phi equivalence classes FINAL CONTROL FLOW GRAPH @@ -164,7 +146,7 @@ fn1::@return: scope:[fn1] from fn1 void main() main: scope:[main] from - [4] phi() + [4] main::f = (void()*) 0 to:main::@1 main::@1: scope:[main] from main main::@4 [5] main::i#2 = phi( main/0, main::@4/main::i#1 ) @@ -173,15 +155,17 @@ main::@2: scope:[main] from main::@1 [6] main::i#1 = ++ main::i#2 [7] main::$0 = main::i#1 & 1 [8] if(main::$0==0) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@2 + [9] main::f = &fn2 to:main::@4 -main::@3: scope:[main] from main::@2 - [9] phi() - to:main::@4 -main::@4: scope:[main] from main::@2 main::@3 - [10] main::f#3 = phi( main::@3/&fn1, main::@2/&fn2 ) - kickasm( uses main::f#3 uses ff) {{ jsr ff +main::@4: scope:[main] from main::@3 main::@5 + kickasm( uses main::f uses ff) {{ jsr ff }} to:main::@1 +main::@3: scope:[main] from main::@2 + [11] main::f = &fn1 + to:main::@4 VARIABLE REGISTER WEIGHTS @@ -189,39 +173,46 @@ void fn1() void fn2() void main() byte~ main::$0 22.0 -void()* main::f -void()* main::f#3 +volatile void()* main::f loadstore 12.0 byte main::i byte main::i#1 5.5 byte main::i#2 22.0 Initial phi equivalence classes [ main::i#2 main::i#1 ] -[ main::f#3 ] +Added variable main::f to live range equivalence class [ main::f ] Added variable main::$0 to live range equivalence class [ main::$0 ] Complete equivalence classes [ main::i#2 main::i#1 ] -[ main::f#3 ] +[ main::f ] [ main::$0 ] Allocated zp[1]:2 [ main::i#2 main::i#1 ] -Allocated zp[2]:3 [ main::f#3 ] +Allocated zp[2]:3 [ main::f ] Allocated zp[1]:5 [ main::$0 ] REGISTER UPLIFT POTENTIAL REGISTERS -Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:3 [ main::f#3 ] : zp[2]:3 , +Statement [4] main::f = (void()*) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [9] main::f = &fn2 [ main::f main::i#1 ] ( [ main::f main::i#1 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ] +Statement [11] main::f = &fn1 [ main::f main::i#1 ] ( [ main::f main::i#1 ] { } ) always clobbers reg byte a +Statement [4] main::f = (void()*) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [7] main::$0 = main::i#1 & 1 [ main::i#1 main::$0 ] ( [ main::i#1 main::$0 ] { } ) always clobbers reg byte a +Statement [9] main::f = &fn2 [ main::f main::i#1 ] ( [ main::f main::i#1 ] { } ) always clobbers reg byte a +Statement [11] main::f = &fn1 [ main::f main::i#1 ] ( [ main::f main::i#1 ] { } ) always clobbers reg byte a +Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , +Potential registers zp[2]:3 [ main::f ] : zp[2]:3 , Potential registers zp[1]:5 [ main::$0 ] : zp[1]:5 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [main] 27.5: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:5 [ main::$0 ] 0: zp[2]:3 [ main::f#3 ] +Uplift Scope [main] 27.5: zp[1]:2 [ main::i#2 main::i#1 ] 22: zp[1]:5 [ main::$0 ] 12: zp[2]:3 [ main::f ] Uplift Scope [fn1] Uplift Scope [fn2] Uplift Scope [] -Uplifting [main] best 3095 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$0 ] zp[2]:3 [ main::f#3 ] -Uplifting [fn1] best 3095 combination -Uplifting [fn2] best 3095 combination -Uplifting [] best 3095 combination -Allocated (was zp[2]:3) zp[2]:2 [ main::f#3 ] +Uplifting [main] best 3105 combination reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$0 ] zp[2]:3 [ main::f ] +Uplifting [fn1] best 3105 combination +Uplifting [fn2] best 3105 combination +Uplifting [] best 3105 combination +Allocated (was zp[2]:3) zp[2]:2 [ main::f ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -256,6 +247,11 @@ fn1: { // main main: { .label f = 2 + // [4] main::f = (void()*) 0 -- pprz1=pprc1 + lda #<0 + sta.z f + lda #>0 + sta.z f+1 // [5] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: // [5] phi main::i#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 @@ -273,37 +269,33 @@ main: { and #1 // [8] if(main::$0==0) goto main::@3 -- vbuaa_eq_0_then_la1 cmp #0 - beq __b3_from___b2 - // [10] phi from main::@2 to main::@4 [phi:main::@2->main::@4] - __b4_from___b2: - // [10] phi main::f#3 = &fn2 [phi:main::@2->main::@4#0] -- pprz1=pprc1 + beq __b3 + jmp __b5 + // main::@5 + __b5: + // [9] main::f = &fn2 -- pprz1=pprc1 lda #fn2 sta.z f+1 jmp __b4 - // [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - __b3_from___b2: - jmp __b3 - // main::@3 - __b3: - // [10] phi from main::@3 to main::@4 [phi:main::@3->main::@4] - __b4_from___b3: - // [10] phi main::f#3 = &fn1 [phi:main::@3->main::@4#0] -- pprz1=pprc1 - lda #fn1 - sta.z f+1 - jmp __b4 // main::@4 __b4: - // kickasm( uses main::f#3 uses ff) {{ jsr ff }} + // kickasm( uses main::f uses ff) {{ jsr ff }} jsr ff // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1] __b1_from___b4: // [5] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy jmp __b1 + // main::@3 + __b3: + // [11] main::f = &fn1 -- pprz1=pprc1 + lda #fn1 + sta.z f+1 + jmp __b4 } // File Data // Inline KickAsm function @@ -316,21 +308,21 @@ Removing instruction jmp __breturn Removing instruction jmp __breturn Removing instruction jmp __b1 Removing instruction jmp __b2 -Removing instruction jmp __b3 +Removing instruction jmp __b5 Removing instruction jmp __b4 Succesful ASM optimization Pass5NextJumpElimination -Replacing label __b3_from___b2 with __b3 +Removing instruction lda #>0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __b1 with __b2 Removing instruction __b1: -Removing instruction __b3_from___b2: -Removing instruction __b4_from___b3: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __breturn: Removing instruction __breturn: Removing instruction __b1_from_main: -Removing instruction __b4_from___b2: +Removing instruction __b5: Removing instruction __b1_from___b4: Succesful ASM optimization Pass5UnusedLabelElimination +Replacing instruction ldx #0 with TAX FINAL SYMBOL TABLE const byte* ff[] = kickasm {{ jmp (main.f) @@ -341,19 +333,18 @@ void fn2() const nomodify byte* fn2::BG_COLOR = (byte*) 53281 void main() byte~ main::$0 reg byte a 22.0 -void()* main::f -void()* main::f#3 f zp[2]:2 +volatile void()* main::f loadstore zp[2]:2 12.0 byte main::i byte main::i#1 reg byte x 5.5 byte main::i#2 reg byte x 22.0 reg byte x [ main::i#2 main::i#1 ] -zp[2]:2 [ main::f#3 ] +zp[2]:2 [ main::f ] reg byte a [ main::$0 ] FINAL ASSEMBLER -Score: 2969 +Score: 2977 // File Comments // Tests creating and assigning pointers to non-args no-return functions - plus inline kickasm-based calling @@ -387,9 +378,14 @@ fn1: { // main main: { .label f = 2 + // f + // [4] main::f = (void()*) 0 -- pprz1=pprc1 + lda #<0 + sta.z f + sta.z f+1 // [5] phi from main to main::@1 [phi:main->main::@1] // [5] phi main::i#2 = 0 [phi:main->main::@1#0] -- vbuxx=vbuc1 - ldx #0 + tax // main::@1 // main::@2 __b2: @@ -404,31 +400,31 @@ main: { // [8] if(main::$0==0) goto main::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq __b3 - // [10] phi from main::@2 to main::@4 [phi:main::@2->main::@4] - // [10] phi main::f#3 = &fn2 [phi:main::@2->main::@4#0] -- pprz1=pprc1 + // main::@5 + // f = &fn2 + // [9] main::f = &fn2 -- pprz1=pprc1 lda #fn2 sta.z f+1 - jmp __b4 - // [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - // main::@3 - __b3: - // [10] phi from main::@3 to main::@4 [phi:main::@3->main::@4] - // [10] phi main::f#3 = &fn1 [phi:main::@3->main::@4#0] -- pprz1=pprc1 - lda #fn1 - sta.z f+1 // main::@4 __b4: // kickasm - // kickasm( uses main::f#3 uses ff) {{ jsr ff }} + // kickasm( uses main::f uses ff) {{ jsr ff }} jsr ff // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1] // [5] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy jmp __b2 + // main::@3 + __b3: + // f = &fn1 + // [11] main::f = &fn1 -- pprz1=pprc1 + lda #fn1 + sta.z f+1 + jmp __b4 } // File Data // Inline KickAsm function diff --git a/src/test/ref/function-pointer-noarg-3.sym b/src/test/ref/function-pointer-noarg-3.sym index 954708130..dde6f11af 100644 --- a/src/test/ref/function-pointer-noarg-3.sym +++ b/src/test/ref/function-pointer-noarg-3.sym @@ -6,12 +6,11 @@ void fn2() const nomodify byte* fn2::BG_COLOR = (byte*) 53281 void main() byte~ main::$0 reg byte a 22.0 -void()* main::f -void()* main::f#3 f zp[2]:2 +volatile void()* main::f loadstore zp[2]:2 12.0 byte main::i byte main::i#1 reg byte x 5.5 byte main::i#2 reg byte x 22.0 reg byte x [ main::i#2 main::i#1 ] -zp[2]:2 [ main::f#3 ] +zp[2]:2 [ main::f ] reg byte a [ main::$0 ] diff --git a/src/test/ref/function-pointer-noarg-call-13.asm b/src/test/ref/function-pointer-noarg-call-13.asm index b15aeec92..548802818 100644 --- a/src/test/ref/function-pointer-noarg-call-13.asm +++ b/src/test/ref/function-pointer-noarg-call-13.asm @@ -59,9 +59,9 @@ main: { enableDLI: { .label dliptr = $80 // asm - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ dlivec: diff --git a/src/test/ref/function-pointer-noarg-call-13.cfg b/src/test/ref/function-pointer-noarg-call-13.cfg index efc1b0aff..ecb933a7b 100644 --- a/src/test/ref/function-pointer-noarg-call-13.cfg +++ b/src/test/ref/function-pointer-noarg-call-13.cfg @@ -28,9 +28,9 @@ main::@return: scope:[main] from main::@1 [8] return to:@return -void enableDLI(void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) enableDLI: scope:[enableDLI] from main main::@1 - asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } + asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } to:enableDLI::@return enableDLI::@return: scope:[enableDLI] from enableDLI [10] return diff --git a/src/test/ref/function-pointer-noarg-call-13.log b/src/test/ref/function-pointer-noarg-call-13.log index 41aa44c26..f9f0e421a 100644 --- a/src/test/ref/function-pointer-noarg-call-13.log +++ b/src/test/ref/function-pointer-noarg-call-13.log @@ -1,5 +1,6 @@ Resolved forward reference fn1 to void fn1() Resolved forward reference fn2 to void fn2() +Setting inferred volatile on symbol affected by address-of: enableDLI::dliptr in asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } Inlined call call __init CONTROL FLOW GRAPH SSA @@ -35,9 +36,9 @@ fn2::@return: scope:[fn2] from fn2 return to:@return -void enableDLI(void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) enableDLI: scope:[enableDLI] from main main::@1 - asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } + asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } to:enableDLI::@return enableDLI::@return: scope:[enableDLI] from enableDLI return @@ -59,8 +60,8 @@ __start::@return: scope:[__start] from __start::@2 SYMBOL TABLE SSA void __start() -void enableDLI(void* enableDLI::dliptr) -void* enableDLI::dliptr loadstore +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore void fn1() void fn2() void main() @@ -125,9 +126,9 @@ main::@return: scope:[main] from main::@1 [8] return to:@return -void enableDLI(void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) enableDLI: scope:[enableDLI] from main main::@1 - asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } + asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } to:enableDLI::@return enableDLI::@return: scope:[enableDLI] from enableDLI [10] return @@ -135,8 +136,8 @@ enableDLI::@return: scope:[enableDLI] from enableDLI VARIABLE REGISTER WEIGHTS -void enableDLI(void* enableDLI::dliptr) -void* enableDLI::dliptr loadstore 2.0 +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore 2.0 void fn1() void fn2() void main() @@ -151,7 +152,7 @@ Statement [0] *r = 2 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] *r = 1 [ ] ( [ ] { } ) always clobbers reg byte a Statement [4] enableDLI::dliptr = (void*)&fn1 [ enableDLI::dliptr ] ( [ enableDLI::dliptr ] { } ) always clobbers reg byte a Statement [6] enableDLI::dliptr = (void*)&fn2 [ enableDLI::dliptr ] ( [ enableDLI::dliptr ] { } ) always clobbers reg byte a -Statement asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } always clobbers reg byte a +Statement asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } always clobbers reg byte a Potential registers zp[2]:128 [ enableDLI::dliptr ] : zp[2]:128 , REGISTER UPLIFT SCOPES @@ -161,11 +162,11 @@ Uplift Scope [fn1] Uplift Scope [fn2] Uplift Scope [] -Uplifting [enableDLI] best 98 combination zp[2]:128 [ enableDLI::dliptr ] -Uplifting [main] best 98 combination -Uplifting [fn1] best 98 combination -Uplifting [fn2] best 98 combination -Uplifting [] best 98 combination +Uplifting [enableDLI] best 102 combination zp[2]:128 [ enableDLI::dliptr ] +Uplifting [main] best 102 combination +Uplifting [fn1] best 102 combination +Uplifting [fn2] best 102 combination +Uplifting [] best 102 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -249,10 +250,10 @@ main: { // enableDLI(void* zp($80) dliptr) enableDLI: { .label dliptr = $80 - // asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ dlivec: @@ -281,8 +282,8 @@ Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE -void enableDLI(void* enableDLI::dliptr) -void* enableDLI::dliptr loadstore zp[2]:128 2.0 +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore zp[2]:128 2.0 void fn1() void fn2() void main() @@ -292,7 +293,7 @@ zp[2]:128 [ enableDLI::dliptr ] FINAL ASSEMBLER -Score: 83 +Score: 87 // File Comments // Tests trouble passing a function pointer @@ -375,10 +376,10 @@ main: { enableDLI: { .label dliptr = $80 // asm - // asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ dlivec: diff --git a/src/test/ref/function-pointer-noarg-call-13.sym b/src/test/ref/function-pointer-noarg-call-13.sym index f1fbc76a3..fa0f0501e 100644 --- a/src/test/ref/function-pointer-noarg-call-13.sym +++ b/src/test/ref/function-pointer-noarg-call-13.sym @@ -1,5 +1,5 @@ -void enableDLI(void* enableDLI::dliptr) -void* enableDLI::dliptr loadstore zp[2]:128 2.0 +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore zp[2]:128 2.0 void fn1() void fn2() void main() diff --git a/src/test/ref/function-pointer-problem-1.asm b/src/test/ref/function-pointer-problem-1.asm index 7d2e8705f..f1d372c6a 100644 --- a/src/test/ref/function-pointer-problem-1.asm +++ b/src/test/ref/function-pointer-problem-1.asm @@ -13,17 +13,21 @@ fn1: { } main: { // enableDLI(&fn1) + lda #fn1 + sta.z enableDLI.dliptr+1 jsr enableDLI // } rts } -// enableDLI(void* dliptr) +// enableDLI(void* zp(2) dliptr) enableDLI: { - .label dliptr = fn1 + .label dliptr = 2 // asm - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ dlivec: diff --git a/src/test/ref/function-pointer-problem-1.cfg b/src/test/ref/function-pointer-problem-1.cfg index 5a950194e..a9bcd1338 100644 --- a/src/test/ref/function-pointer-problem-1.cfg +++ b/src/test/ref/function-pointer-problem-1.cfg @@ -9,16 +9,16 @@ fn1::@return: scope:[fn1] from fn1 void main() main: scope:[main] from - [2] phi() + [2] enableDLI::dliptr = (void*)&fn1 [3] call enableDLI to:main::@return main::@return: scope:[main] from main [4] return to:@return -void enableDLI(const void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) enableDLI: scope:[enableDLI] from main - asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } + asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } to:enableDLI::@return enableDLI::@return: scope:[enableDLI] from enableDLI [6] return diff --git a/src/test/ref/function-pointer-problem-1.log b/src/test/ref/function-pointer-problem-1.log index e87775ea7..9a194538f 100644 --- a/src/test/ref/function-pointer-problem-1.log +++ b/src/test/ref/function-pointer-problem-1.log @@ -1,4 +1,5 @@ Resolved forward reference fn1 to void fn1() +Setting inferred volatile on symbol affected by address-of: enableDLI::dliptr in asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } Inlined call call __init CONTROL FLOW GRAPH SSA @@ -22,9 +23,9 @@ fn1::@return: scope:[fn1] from fn1 return to:@return -void enableDLI(void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) enableDLI: scope:[enableDLI] from main - asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } + asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } to:enableDLI::@return enableDLI::@return: scope:[enableDLI] from enableDLI return @@ -46,8 +47,8 @@ __start::@return: scope:[__start] from __start::@2 SYMBOL TABLE SSA void __start() -void enableDLI(void* enableDLI::dliptr) -void* enableDLI::dliptr loadstore +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore void fn1() void main() const to_nomodify byte* r = (byte*)$8000 @@ -61,8 +62,6 @@ Simplifying constant integer cast 1 Successful SSA optimization PassNCastSimplification Finalized unsigned number type 1 Successful SSA optimization PassNFinalizeNumberTypeConversions -Constant enableDLI::dliptr = (void*)&fn1 -Successful SSA optimization Pass2ConstantIdentification Removing unused procedure __start Removing unused procedure block __start Removing unused procedure block __start::__init1 @@ -70,7 +69,6 @@ Removing unused procedure block __start::@1 Removing unused procedure block __start::@2 Removing unused procedure block __start::@return Successful SSA optimization PassNEliminateEmptyStart -Adding NOP phi() at start of main Adding NOP phi() at start of main::@1 CALL GRAPH Calls in [main] to enableDLI:3 @@ -78,7 +76,6 @@ Calls in [main] to enableDLI:3 Created 0 initial phi equivalence classes Coalesced down to 0 phi equivalence classes Culled Empty Block label main::@1 -Adding NOP phi() at start of main FINAL CONTROL FLOW GRAPH @@ -92,16 +89,16 @@ fn1::@return: scope:[fn1] from fn1 void main() main: scope:[main] from - [2] phi() + [2] enableDLI::dliptr = (void*)&fn1 [3] call enableDLI to:main::@return main::@return: scope:[main] from main [4] return to:@return -void enableDLI(const void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) enableDLI: scope:[enableDLI] from main - asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } + asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } to:enableDLI::@return enableDLI::@return: scope:[enableDLI] from enableDLI [6] return @@ -109,26 +106,32 @@ enableDLI::@return: scope:[enableDLI] from enableDLI VARIABLE REGISTER WEIGHTS -void enableDLI(const void* enableDLI::dliptr) +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore 2.0 void fn1() void main() Initial phi equivalence classes +Added variable enableDLI::dliptr to live range equivalence class [ enableDLI::dliptr ] Complete equivalence classes +[ enableDLI::dliptr ] +Allocated zp[2]:2 [ enableDLI::dliptr ] REGISTER UPLIFT POTENTIAL REGISTERS Statement [0] *r = 1 [ ] ( [ ] { } ) always clobbers reg byte a -Statement asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } always clobbers reg byte a +Statement [2] enableDLI::dliptr = (void*)&fn1 [ enableDLI::dliptr ] ( [ enableDLI::dliptr ] { } ) always clobbers reg byte a +Statement asm { ldadliptr stadlivec ldadliptr+1 stadlivec+1 jmp!+ dlivec: .byte0,0 !: } always clobbers reg byte a +Potential registers zp[2]:2 [ enableDLI::dliptr ] : zp[2]:2 , REGISTER UPLIFT SCOPES +Uplift Scope [enableDLI] 2: zp[2]:2 [ enableDLI::dliptr ] Uplift Scope [main] Uplift Scope [fn1] -Uplift Scope [enableDLI] Uplift Scope [] -Uplifting [main] best 54 combination -Uplifting [fn1] best 54 combination -Uplifting [enableDLI] best 54 combination -Uplifting [] best 54 combination +Uplifting [enableDLI] best 68 combination zp[2]:2 [ enableDLI::dliptr ] +Uplifting [main] best 68 combination +Uplifting [fn1] best 68 combination +Uplifting [] best 68 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -153,6 +156,11 @@ fn1: { } // main main: { + // [2] enableDLI::dliptr = (void*)&fn1 -- pvoz1=pvoc1 + lda #fn1 + sta.z enableDLI.dliptr+1 // [3] call enableDLI jsr enableDLI jmp __breturn @@ -162,13 +170,13 @@ main: { rts } // enableDLI -// enableDLI(void* dliptr) +// enableDLI(void* zp(2) dliptr) enableDLI: { - .label dliptr = fn1 - // asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ dlivec: @@ -193,16 +201,17 @@ Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE -void enableDLI(const void* enableDLI::dliptr) -const void* enableDLI::dliptr = (void*)&fn1 +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore zp[2]:2 2.0 void fn1() void main() const to_nomodify byte* r = (byte*) 32768 +zp[2]:2 [ enableDLI::dliptr ] FINAL ASSEMBLER -Score: 45 +Score: 59 // File Comments // The following casuses an exception in pass 2 @@ -227,6 +236,11 @@ fn1: { // main main: { // enableDLI(&fn1) + // [2] enableDLI::dliptr = (void*)&fn1 -- pvoz1=pvoc1 + lda #fn1 + sta.z enableDLI.dliptr+1 // [3] call enableDLI jsr enableDLI // main::@return @@ -235,14 +249,14 @@ main: { rts } // enableDLI -// enableDLI(void* dliptr) +// enableDLI(void* zp(2) dliptr) enableDLI: { - .label dliptr = fn1 + .label dliptr = 2 // asm - // asm { lda#dliptr stadlivec+1 jmp!+ dlivec: .byte0,0 !: } - lda #dliptr + lda dliptr+1 sta dlivec+1 jmp !+ dlivec: diff --git a/src/test/ref/function-pointer-problem-1.sym b/src/test/ref/function-pointer-problem-1.sym index 8b1edd4fe..2bc43bc44 100644 --- a/src/test/ref/function-pointer-problem-1.sym +++ b/src/test/ref/function-pointer-problem-1.sym @@ -1,6 +1,7 @@ -void enableDLI(const void* enableDLI::dliptr) -const void* enableDLI::dliptr = (void*)&fn1 +void enableDLI(volatile void* enableDLI::dliptr) +volatile void* enableDLI::dliptr loadstore zp[2]:2 2.0 void fn1() void main() const to_nomodify byte* r = (byte*) 32768 +zp[2]:2 [ enableDLI::dliptr ] diff --git a/src/test/ref/inline-asm-ma-var.log b/src/test/ref/inline-asm-ma-var.log index 0d64edff8..bf219b5b2 100644 --- a/src/test/ref/inline-asm-ma-var.log +++ b/src/test/ref/inline-asm-ma-var.log @@ -1,3 +1,4 @@ +Setting inferred volatile on symbol affected by address-of: main::value in asm { lda#$55 eorvalue staSCREEN } CONTROL FLOW GRAPH SSA @@ -41,7 +42,7 @@ byte main::i#0 byte main::i#1 byte main::i#2 byte main::i#3 -byte main::value loadstore +volatile byte main::value loadstore Adding number conversion cast (unumber) $a in main::$0 = main::i#2 < $a Successful SSA optimization PassNAddNumberTypeConversions @@ -95,7 +96,7 @@ void main() byte main::i byte main::i#1 22.0 byte main::i#2 11.0 -byte main::value loadstore 4.0 +volatile byte main::value loadstore 4.0 Initial phi equivalence classes [ main::i#2 main::i#1 ] @@ -192,7 +193,7 @@ void main() byte main::i byte main::i#1 reg byte x 22.0 byte main::i#2 reg byte x 11.0 -byte main::value loadstore zp[1]:2 4.0 +volatile byte main::value loadstore zp[1]:2 4.0 reg byte x [ main::i#2 main::i#1 ] zp[1]:2 [ main::value ] diff --git a/src/test/ref/inline-asm-ma-var.sym b/src/test/ref/inline-asm-ma-var.sym index 7b152ba2b..9019a6952 100644 --- a/src/test/ref/inline-asm-ma-var.sym +++ b/src/test/ref/inline-asm-ma-var.sym @@ -3,7 +3,7 @@ void main() byte main::i byte main::i#1 reg byte x 22.0 byte main::i#2 reg byte x 11.0 -byte main::value loadstore zp[1]:2 4.0 +volatile byte main::value loadstore zp[1]:2 4.0 reg byte x [ main::i#2 main::i#1 ] zp[1]:2 [ main::value ] diff --git a/src/test/ref/inline-asm-refout-var.asm b/src/test/ref/inline-asm-refout-var.asm new file mode 100644 index 000000000..3692544d5 --- /dev/null +++ b/src/test/ref/inline-asm-refout-var.asm @@ -0,0 +1,23 @@ +// Illustrates how inline assembler referencing variables is automatically converted to __ma +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label SCREEN = $400 +main: { + .label i = 2 + // for(byte i: 0..10) + lda #0 + sta.z i + __b1: + // asm + lda #'a' + ldx i + sta SCREEN,x + // for(byte i: 0..10) + inc.z i + lda #$b + cmp.z i + bne __b1 + // } + rts +} diff --git a/src/test/ref/inline-asm-refout-var.cfg b/src/test/ref/inline-asm-refout-var.cfg new file mode 100644 index 000000000..552dd4fba --- /dev/null +++ b/src/test/ref/inline-asm-refout-var.cfg @@ -0,0 +1,13 @@ + +void main() +main: scope:[main] from + [0] main::i = 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + asm { lda#'a' ldxi staSCREEN,x } + [2] main::i = ++ main::i + [3] if(main::i!=$b) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [4] return + to:@return diff --git a/src/test/ref/inline-asm-refout-var.log b/src/test/ref/inline-asm-refout-var.log new file mode 100644 index 000000000..f94da1731 --- /dev/null +++ b/src/test/ref/inline-asm-refout-var.log @@ -0,0 +1,187 @@ +Setting inferred volatile on symbol affected by address-of: main::i in asm { lda#'a' ldxi staSCREEN,x } + +CONTROL FLOW GRAPH SSA + +void main() +main: scope:[main] from __start + main::i = 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + asm { lda#'a' ldxi staSCREEN,x } + main::i = main::i + rangenext(0,$a) + main::$0 = main::i != rangelast(0,$a) + if(main::$0) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + return + to:@return + +void __start() +__start: scope:[__start] from + call main + to:__start::@1 +__start::@1: scope:[__start] from __start + to:__start::@return +__start::@return: scope:[__start] from __start::@1 + return + to:@return + +SYMBOL TABLE SSA +const nomodify byte* SCREEN = (byte*)$400 +void __start() +void main() +bool~ main::$0 +volatile byte main::i loadstore + +Simplifying constant pointer cast (byte*) 1024 +Successful SSA optimization PassNCastSimplification +Simple Condition main::$0 [4] if(main::i!=rangelast(0,$a)) goto main::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Resolved ranged next value [2] main::i = ++ main::i to ++ +Resolved ranged comparison value [4] if(main::i!=rangelast(0,$a)) goto main::@1 to $b +Removing unused procedure __start +Removing unused procedure block __start +Removing unused procedure block __start::@1 +Removing unused procedure block __start::@return +Successful SSA optimization PassNEliminateEmptyStart +Adding number conversion cast (unumber) $b in [3] if(main::i!=$b) goto main::@1 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast $b +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type $b +Successful SSA optimization PassNFinalizeNumberTypeConversions +CALL GRAPH + +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes + +FINAL CONTROL FLOW GRAPH + +void main() +main: scope:[main] from + [0] main::i = 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + asm { lda#'a' ldxi staSCREEN,x } + [2] main::i = ++ main::i + [3] if(main::i!=$b) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [4] return + to:@return + + +VARIABLE REGISTER WEIGHTS +void main() +volatile byte main::i loadstore 8.75 + +Initial phi equivalence classes +Added variable main::i to live range equivalence class [ main::i ] +Complete equivalence classes +[ main::i ] +Allocated zp[1]:2 [ main::i ] +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [0] main::i = 0 [ main::i ] ( [ main::i ] { } ) always clobbers reg byte a +Statement asm { lda#'a' ldxi staSCREEN,x } always clobbers reg byte a reg byte x +Statement [3] if(main::i!=$b) goto main::@1 [ main::i ] ( [ main::i ] { } ) always clobbers reg byte a +Potential registers zp[1]:2 [ main::i ] : zp[1]:2 , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 8.75: zp[1]:2 [ main::i ] +Uplift Scope [] + +Uplifting [main] best 279 combination zp[1]:2 [ main::i ] +Uplifting [] best 279 combination +Attempting to uplift remaining variables inzp[1]:2 [ main::i ] +Uplifting [main] best 279 combination zp[1]:2 [ main::i ] + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +// Illustrates how inline assembler referencing variables is automatically converted to __ma + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .label SCREEN = $400 + // main +main: { + .label i = 2 + // [0] main::i = 0 -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b1 + // main::@1 + __b1: + // asm { lda#'a' ldxi staSCREEN,x } + lda #'a' + ldx i + sta SCREEN,x + // [2] main::i = ++ main::i -- vbuz1=_inc_vbuz1 + inc.z i + // [3] if(main::i!=$b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$b + cmp.z i + bne __b1 + jmp __breturn + // main::@return + __breturn: + // [4] return + rts +} + // File Data + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction __breturn: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +const nomodify byte* SCREEN = (byte*) 1024 +void main() +volatile byte main::i loadstore zp[1]:2 8.75 + +zp[1]:2 [ main::i ] + + +FINAL ASSEMBLER +Score: 246 + + // File Comments +// Illustrates how inline assembler referencing variables is automatically converted to __ma + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .label SCREEN = $400 + // main +main: { + .label i = 2 + // for(byte i: 0..10) + // [0] main::i = 0 -- vbuz1=vbuc1 + lda #0 + sta.z i + // main::@1 + __b1: + // asm + // asm { lda#'a' ldxi staSCREEN,x } + lda #'a' + ldx i + sta SCREEN,x + // for(byte i: 0..10) + // [2] main::i = ++ main::i -- vbuz1=_inc_vbuz1 + inc.z i + // [3] if(main::i!=$b) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda #$b + cmp.z i + bne __b1 + // main::@return + // } + // [4] return + rts +} + // File Data + diff --git a/src/test/ref/inline-asm-refout-var.sym b/src/test/ref/inline-asm-refout-var.sym new file mode 100644 index 000000000..17d176b84 --- /dev/null +++ b/src/test/ref/inline-asm-refout-var.sym @@ -0,0 +1,5 @@ +const nomodify byte* SCREEN = (byte*) 1024 +void main() +volatile byte main::i loadstore zp[1]:2 8.75 + +zp[1]:2 [ main::i ] diff --git a/src/test/ref/inline-kickasm-uses-problem.log b/src/test/ref/inline-kickasm-uses-problem.log index bac83059a..2114befc0 100644 --- a/src/test/ref/inline-kickasm-uses-problem.log +++ b/src/test/ref/inline-kickasm-uses-problem.log @@ -1,4 +1,10 @@ Setting inferred volatile on symbol affected by address-of foo::v2 = &foo::a2 +Setting inferred volatile on symbol affected by address-of: foo::v1 in kickasm( uses foo::v1 uses foo::v2) {{ lda v1 + sta v2 + }} +Setting inferred volatile on symbol affected by address-of: foo::v2 in kickasm( uses foo::v1 uses foo::v2) {{ lda v1 + sta v2 + }} Inlined call call __init CONTROL FLOW GRAPH SSA @@ -51,8 +57,8 @@ const to_nomodify byte* OUT = (byte*)$8000 void __start() void foo(byte* foo::x1 , byte* foo::x2) volatile byte foo::a2 loadstore -to_volatile byte* foo::v1 loadstore -byte* foo::v2 loadstore +volatile to_volatile byte* foo::v1 loadstore +volatile byte* foo::v2 loadstore byte* foo::x1 byte* foo::x1#0 byte* foo::x1#1 @@ -124,8 +130,8 @@ foo::@return: scope:[foo] from foo VARIABLE REGISTER WEIGHTS void foo(byte* foo::x1 , byte* foo::x2) volatile byte foo::a2 loadstore 5.5 -to_volatile byte* foo::v1 loadstore 11.0 -byte* foo::v2 loadstore 22.0 +volatile to_volatile byte* foo::v1 loadstore 11.0 +volatile byte* foo::v2 loadstore 22.0 byte* foo::x1 byte* foo::x2 void main() @@ -266,8 +272,8 @@ FINAL SYMBOL TABLE const to_nomodify byte* OUT = (byte*) 32768 void foo(byte* foo::x1 , byte* foo::x2) volatile byte foo::a2 loadstore zp[1]:132 5.5 -to_volatile byte* foo::v1 loadstore zp[2]:128 11.0 -byte* foo::v2 loadstore zp[2]:130 22.0 +volatile to_volatile byte* foo::v1 loadstore zp[2]:128 11.0 +volatile byte* foo::v2 loadstore zp[2]:130 22.0 byte* foo::x1 byte* foo::x2 void main() diff --git a/src/test/ref/inline-kickasm-uses-problem.sym b/src/test/ref/inline-kickasm-uses-problem.sym index 074018744..7b9644691 100644 --- a/src/test/ref/inline-kickasm-uses-problem.sym +++ b/src/test/ref/inline-kickasm-uses-problem.sym @@ -1,8 +1,8 @@ const to_nomodify byte* OUT = (byte*) 32768 void foo(byte* foo::x1 , byte* foo::x2) volatile byte foo::a2 loadstore zp[1]:132 5.5 -to_volatile byte* foo::v1 loadstore zp[2]:128 11.0 -byte* foo::v2 loadstore zp[2]:130 22.0 +volatile to_volatile byte* foo::v1 loadstore zp[2]:128 11.0 +volatile byte* foo::v2 loadstore zp[2]:130 22.0 byte* foo::x1 byte* foo::x2 void main() diff --git a/src/test/ref/problem-ma-var-overwrite.asm b/src/test/ref/problem-ma-var-overwrite.asm index 425edffdf..bdb4ba7ee 100644 --- a/src/test/ref/problem-ma-var-overwrite.asm +++ b/src/test/ref/problem-ma-var-overwrite.asm @@ -27,7 +27,7 @@ test: { .label colorMem = $d800 .label other = $c000 .label dst = 6 - .label __1 = 6 + .label __1 = 4 .label diff = 4 .label videoMem = 4 // dst @@ -44,13 +44,17 @@ test: { sta.z diff+1 // other + ((unsigned int)diff) clc - lda.z diff + lda.z __1 adc #other sta.z __1+1 // dst = other + ((unsigned int)diff) + lda.z __1 + sta.z dst + lda.z __1+1 + sta.z dst+1 // dst[0] = 1 lda #1 ldy #0 diff --git a/src/test/ref/problem-ma-var-overwrite.log b/src/test/ref/problem-ma-var-overwrite.log index 18d7a19bd..25cfb2447 100644 --- a/src/test/ref/problem-ma-var-overwrite.log +++ b/src/test/ref/problem-ma-var-overwrite.log @@ -1,3 +1,4 @@ +Setting inferred volatile on symbol affected by address-of: test::dst in asm { ldy#0 lda#1 sta(dst),y } Inlined call call __init CONTROL FLOW GRAPH SSA @@ -63,7 +64,7 @@ byte* test::colorMem#1 byte* test::diff byte* test::diff#0 byte* test::diff#1 -byte* test::dst loadstore +volatile byte* test::dst loadstore byte* test::other byte* test::other#0 byte* test::other#1 @@ -169,7 +170,7 @@ byte*~ test::$1 202.0 byte* test::colorMem byte* test::diff word test::diff#1 101.0 -byte* test::dst loadstore 151.5 +volatile byte* test::dst loadstore 151.5 byte* test::other byte* test::videoMem byte* test::videoMem#0 56.0 @@ -217,7 +218,7 @@ Uplifting [] best 172 combination zp[2]:2 [ h1 ] Uplifting [main] best 172 combination Uplifting [__start] best 172 combination Coalescing zero page register [ zp[2]:4 [ test::videoMem#0 ] ] with [ zp[2]:8 [ test::diff#1 ] ] - score: 1 -Coalescing zero page register [ zp[2]:6 [ test::dst ] ] with [ zp[2]:10 [ test::$1 ] ] - score: 1 +Coalescing zero page register [ zp[2]:4 [ test::videoMem#0 test::diff#1 ] ] with [ zp[2]:10 [ test::$1 ] ] - score: 1 ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -273,7 +274,7 @@ test: { .label colorMem = $d800 .label other = $c000 .label dst = 6 - .label __1 = 6 + .label __1 = 4 .label diff = 4 .label videoMem = 4 // [8] test::dst = (byte*) 0 -- pbuz1=pbuc1 @@ -289,15 +290,19 @@ test: { lda #>colorMem sbc.z diff+1 sta.z diff+1 - // [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 -- pbuz1=pbuc1_plus_vwuz2 + // [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 -- pbuz1=pbuc1_plus_vwuz1 clc - lda.z diff + lda.z __1 adc #other sta.z __1+1 - // [11] test::dst = test::$1 + // [11] test::dst = test::$1 -- pbuz1=pbuz2 + lda.z __1 + sta.z dst + lda.z __1+1 + sta.z dst+1 // [12] *test::dst = 1 -- _deref_pbuz1=vbuc1 lda #1 ldy #0 @@ -340,24 +345,24 @@ void __start() volatile byte* h1 loadstore zp[2]:2 6.5 void main() void test(byte* test::videoMem , byte* test::colorMem , byte* test::other) -byte*~ test::$1 zp[2]:6 202.0 +byte*~ test::$1 zp[2]:4 202.0 byte* test::colorMem const byte* test::colorMem#0 colorMem = (byte*) 55296 byte* test::diff word test::diff#1 diff zp[2]:4 101.0 -byte* test::dst loadstore zp[2]:6 151.5 +volatile byte* test::dst loadstore zp[2]:6 151.5 byte* test::other const byte* test::other#0 other = (byte*) 49152 byte* test::videoMem byte* test::videoMem#0 videoMem zp[2]:4 56.0 zp[2]:2 [ h1 ] -zp[2]:4 [ test::videoMem#0 test::diff#1 ] -zp[2]:6 [ test::dst test::$1 ] +zp[2]:4 [ test::videoMem#0 test::diff#1 test::$1 ] +zp[2]:6 [ test::dst ] FINAL ASSEMBLER -Score: 110 +Score: 122 // File Comments // Demonstrates that a local __ma variable overwrites a parameterĀ§ @@ -405,7 +410,7 @@ test: { .label colorMem = $d800 .label other = $c000 .label dst = 6 - .label __1 = 6 + .label __1 = 4 .label diff = 4 .label videoMem = 4 // dst @@ -423,16 +428,20 @@ test: { sbc.z diff+1 sta.z diff+1 // other + ((unsigned int)diff) - // [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 -- pbuz1=pbuc1_plus_vwuz2 + // [10] test::$1 = test::other#0 + (word)(byte*)test::diff#1 -- pbuz1=pbuc1_plus_vwuz1 clc - lda.z diff + lda.z __1 adc #other sta.z __1+1 // dst = other + ((unsigned int)diff) - // [11] test::dst = test::$1 + // [11] test::dst = test::$1 -- pbuz1=pbuz2 + lda.z __1 + sta.z dst + lda.z __1+1 + sta.z dst+1 // dst[0] = 1 // [12] *test::dst = 1 -- _deref_pbuz1=vbuc1 lda #1 diff --git a/src/test/ref/problem-ma-var-overwrite.sym b/src/test/ref/problem-ma-var-overwrite.sym index e79c54e76..f85647212 100644 --- a/src/test/ref/problem-ma-var-overwrite.sym +++ b/src/test/ref/problem-ma-var-overwrite.sym @@ -2,17 +2,17 @@ void __start() volatile byte* h1 loadstore zp[2]:2 6.5 void main() void test(byte* test::videoMem , byte* test::colorMem , byte* test::other) -byte*~ test::$1 zp[2]:6 202.0 +byte*~ test::$1 zp[2]:4 202.0 byte* test::colorMem const byte* test::colorMem#0 colorMem = (byte*) 55296 byte* test::diff word test::diff#1 diff zp[2]:4 101.0 -byte* test::dst loadstore zp[2]:6 151.5 +volatile byte* test::dst loadstore zp[2]:6 151.5 byte* test::other const byte* test::other#0 other = (byte*) 49152 byte* test::videoMem byte* test::videoMem#0 videoMem zp[2]:4 56.0 zp[2]:2 [ h1 ] -zp[2]:4 [ test::videoMem#0 test::diff#1 ] -zp[2]:6 [ test::dst test::$1 ] +zp[2]:4 [ test::videoMem#0 test::diff#1 test::$1 ] +zp[2]:6 [ test::dst ] diff --git a/src/test/ref/register-0.cfg b/src/test/ref/register-0.cfg index 366da4753..53c14a067 100644 --- a/src/test/ref/register-0.cfg +++ b/src/test/ref/register-0.cfg @@ -16,27 +16,26 @@ __start::@return: scope:[__start] from __start::@1 void main() main: scope:[main] from __start::@1 - [5] phi() + [5] print::ch = 'c' [6] call print to:main::@1 main::@1: scope:[main] from main - [7] phi() + [7] print::ch = 'm' [8] call print to:main::@2 main::@2: scope:[main] from main::@1 - [9] phi() + [9] print::ch = 'l' [10] call print to:main::@return main::@return: scope:[main] from main::@2 [11] return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 - [12] print::ch#3 = phi( main/'c', main::@1/'m', main::@2/'l' ) - kickasm( uses print::ch#3) {{ }} + kickasm( uses print::ch) {{ }} asm { ldxidx staSCREEN,x incidx } to:print::@return print::@return: scope:[print] from print - [15] return + [14] return to:@return diff --git a/src/test/ref/register-0.log b/src/test/ref/register-0.log index 8e9f908cc..6978a7096 100644 --- a/src/test/ref/register-0.log +++ b/src/test/ref/register-0.log @@ -1,18 +1,19 @@ +Setting inferred volatile on symbol affected by address-of: print::ch in kickasm( uses print::ch) {{ }} Inlined call call __init CONTROL FLOW GRAPH SSA void main() main: scope:[main] from __start::@1 - print::ch#0 = 'c' + print::ch = 'c' call print to:main::@1 main::@1: scope:[main] from main - print::ch#1 = 'm' + print::ch = 'm' call print to:main::@2 main::@2: scope:[main] from main::@1 - print::ch#2 = 'l' + print::ch = 'l' call print to:main::@3 main::@3: scope:[main] from main::@2 @@ -21,10 +22,9 @@ main::@return: scope:[main] from main::@3 return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 - print::ch#3 = phi( main/print::ch#0, main::@1/print::ch#1, main::@2/print::ch#2 ) - kickasm( uses print::ch#3) {{ }} + kickasm( uses print::ch) {{ }} asm { ldxidx staSCREEN,x incidx } to:print::@return print::@return: scope:[print] from print @@ -51,46 +51,25 @@ const nomodify byte* SCREEN = (byte*)$400 void __start() volatile byte idx loadstore !zp[-1]:3 void main() -void print(byte print::ch) -byte print::ch !reg byte a -byte print::ch#0 !reg byte a -byte print::ch#1 !reg byte a -byte print::ch#2 !reg byte a -byte print::ch#3 !reg byte a +void print(volatile byte print::ch) +volatile byte print::ch loadstore !reg byte a Simplifying constant pointer cast (byte*) 1024 Successful SSA optimization PassNCastSimplification -Constant print::ch#0 = 'c' -Constant print::ch#1 = 'm' -Constant print::ch#2 = 'l' -Successful SSA optimization Pass2ConstantIdentification -Inlining constant with var siblings print::ch#0 -Inlining constant with var siblings print::ch#1 -Inlining constant with var siblings print::ch#2 -Constant inlined print::ch#2 = 'l' -Constant inlined print::ch#1 = 'm' -Constant inlined print::ch#0 = 'c' -Successful SSA optimization Pass2ConstantInlining Adding NOP phi() at start of __start Adding NOP phi() at start of __start::@1 Adding NOP phi() at start of __start::@2 -Adding NOP phi() at start of main -Adding NOP phi() at start of main::@1 -Adding NOP phi() at start of main::@2 Adding NOP phi() at start of main::@3 CALL GRAPH Calls in [__start] to main:3 Calls in [main] to print:7 print:9 print:11 -Created 1 initial phi equivalence classes -Coalesced down to 1 phi equivalence classes +Created 0 initial phi equivalence classes +Coalesced down to 0 phi equivalence classes Culled Empty Block label __start::@2 Culled Empty Block label main::@3 Adding NOP phi() at start of __start Adding NOP phi() at start of __start::@1 -Adding NOP phi() at start of main -Adding NOP phi() at start of main::@1 -Adding NOP phi() at start of main::@2 FINAL CONTROL FLOW GRAPH @@ -111,61 +90,62 @@ __start::@return: scope:[__start] from __start::@1 void main() main: scope:[main] from __start::@1 - [5] phi() + [5] print::ch = 'c' [6] call print to:main::@1 main::@1: scope:[main] from main - [7] phi() + [7] print::ch = 'm' [8] call print to:main::@2 main::@2: scope:[main] from main::@1 - [9] phi() + [9] print::ch = 'l' [10] call print to:main::@return main::@return: scope:[main] from main::@2 [11] return to:@return -void print(byte print::ch) +void print(volatile byte print::ch) print: scope:[print] from main main::@1 main::@2 - [12] print::ch#3 = phi( main/'c', main::@1/'m', main::@2/'l' ) - kickasm( uses print::ch#3) {{ }} + kickasm( uses print::ch) {{ }} asm { ldxidx staSCREEN,x incidx } to:print::@return print::@return: scope:[print] from print - [15] return + [14] return to:@return VARIABLE REGISTER WEIGHTS void __start() -volatile byte idx loadstore !zp[-1]:3 0.18181818181818182 +volatile byte idx loadstore !zp[-1]:3 0.2 void main() -void print(byte print::ch) -byte print::ch !reg byte a -byte print::ch#3 !reg byte a +void print(volatile byte print::ch) +volatile byte print::ch loadstore !reg byte a 11.0 Initial phi equivalence classes -[ print::ch#3 ] Added variable idx to live range equivalence class [ idx ] +Added variable print::ch to live range equivalence class [ print::ch ] Complete equivalence classes -[ print::ch#3 ] [ idx ] +[ print::ch ] REGISTER UPLIFT POTENTIAL REGISTERS Statement [1] idx = 0 [ idx ] ( [ idx ] { } ) always clobbers reg byte a +Statement [5] print::ch = 'c' [ idx print::ch ] ( main:3 [ idx print::ch ] { } ) always clobbers reg byte a +Statement [7] print::ch = 'm' [ idx print::ch ] ( main:3 [ idx print::ch ] { } ) always clobbers reg byte a +Statement [9] print::ch = 'l' [ idx print::ch ] ( main:3 [ idx print::ch ] { } ) always clobbers reg byte a Statement asm { ldxidx staSCREEN,x incidx } always clobbers reg byte x -Potential registers reg byte a [ print::ch#3 ] : reg byte a , Potential registers zp[1]:3 [ idx ] : zp[1]:3 , +Potential registers reg byte a [ print::ch ] : reg byte a , REGISTER UPLIFT SCOPES -Uplift Scope [] 0.18: zp[1]:3 [ idx ] +Uplift Scope [print] 11: reg byte a [ print::ch ] +Uplift Scope [] 0.2: zp[1]:3 [ idx ] Uplift Scope [main] -Uplift Scope [print] 0: reg byte a [ print::ch#3 ] Uplift Scope [__start] +Uplifting [print] best 372 combination reg byte a [ print::ch ] Uplifting [] best 372 combination zp[1]:3 [ idx ] Uplifting [main] best 372 combination -Uplifting [print] best 372 combination reg byte a [ print::ch#3 ] Uplifting [__start] best 372 combination Attempting to uplift remaining variables inzp[1]:3 [ idx ] Uplifting [] best 372 combination zp[1]:3 [ idx ] @@ -195,8 +175,6 @@ __start: { // __start::@1 __b1: // [3] call main - // [5] phi from __start::@1 to main [phi:__start::@1->main] - main_from___b1: jsr main jmp __breturn // __start::@return @@ -206,33 +184,23 @@ __start: { } // main main: { - // [6] call print - // [12] phi from main to print [phi:main->print] - print_from_main: - // [12] phi print::ch#3 = 'c' [phi:main->print#0] -- vbuaa=vbuc1 + // [5] print::ch = 'c' -- vbuaa=vbuc1 lda #'c' + // [6] call print jsr print - // [7] phi from main to main::@1 [phi:main->main::@1] - __b1_from_main: jmp __b1 // main::@1 __b1: - // [8] call print - // [12] phi from main::@1 to print [phi:main::@1->print] - print_from___b1: - // [12] phi print::ch#3 = 'm' [phi:main::@1->print#0] -- vbuaa=vbuc1 + // [7] print::ch = 'm' -- vbuaa=vbuc1 lda #'m' + // [8] call print jsr print - // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] - __b2_from___b1: jmp __b2 // main::@2 __b2: - // [10] call print - // [12] phi from main::@2 to print [phi:main::@2->print] - print_from___b2: - // [12] phi print::ch#3 = 'l' [phi:main::@2->print#0] -- vbuaa=vbuc1 + // [9] print::ch = 'l' -- vbuaa=vbuc1 lda #'l' + // [10] call print jsr print jmp __breturn // main::@return @@ -243,7 +211,7 @@ main: { // print // print(byte register(A) ch) print: { - // kickasm( uses print::ch#3) {{ }} + // kickasm( uses print::ch) {{ }} // Force usage of ch // asm { ldxidx staSCREEN,x incidx } @@ -253,7 +221,7 @@ print: { jmp __breturn // print::@return __breturn: - // [15] return + // [14] return rts } // File Data @@ -268,16 +236,10 @@ Removing instruction jmp __breturn Removing instruction jmp __breturn Succesful ASM optimization Pass5NextJumpElimination Removing instruction __b1_from___init1: -Removing instruction main_from___b1: -Removing instruction __b1_from_main: -Removing instruction print_from___b1: -Removing instruction __b2_from___b1: -Removing instruction print_from___b2: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __init1: Removing instruction __b1: Removing instruction __breturn: -Removing instruction print_from_main: Removing instruction __b1: Removing instruction __b2: Removing instruction __breturn: @@ -287,14 +249,13 @@ Succesful ASM optimization Pass5UnusedLabelElimination FINAL SYMBOL TABLE const nomodify byte* SCREEN = (byte*) 1024 void __start() -volatile byte idx loadstore !zp[-1]:3 zp[1]:3 0.18181818181818182 +volatile byte idx loadstore !zp[-1]:3 zp[1]:3 0.2 void main() -void print(byte print::ch) -byte print::ch !reg byte a -byte print::ch#3 !reg byte a +void print(volatile byte print::ch) +volatile byte print::ch loadstore !reg byte a 11.0 -reg byte a [ print::ch#3 ] zp[1]:3 [ idx ] +reg byte a [ print::ch ] FINAL ASSEMBLER @@ -320,7 +281,6 @@ __start: { // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 // [3] call main - // [5] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return // [4] return @@ -329,26 +289,21 @@ __start: { // main main: { // print('c') - // [6] call print - // [12] phi from main to print [phi:main->print] - // [12] phi print::ch#3 = 'c' [phi:main->print#0] -- vbuaa=vbuc1 + // [5] print::ch = 'c' -- vbuaa=vbuc1 lda #'c' + // [6] call print jsr print - // [7] phi from main to main::@1 [phi:main->main::@1] // main::@1 // print('m') - // [8] call print - // [12] phi from main::@1 to print [phi:main::@1->print] - // [12] phi print::ch#3 = 'm' [phi:main::@1->print#0] -- vbuaa=vbuc1 + // [7] print::ch = 'm' -- vbuaa=vbuc1 lda #'m' + // [8] call print jsr print - // [9] phi from main::@1 to main::@2 [phi:main::@1->main::@2] // main::@2 // print('l') - // [10] call print - // [12] phi from main::@2 to print [phi:main::@2->print] - // [12] phi print::ch#3 = 'l' [phi:main::@2->print#0] -- vbuaa=vbuc1 + // [9] print::ch = 'l' -- vbuaa=vbuc1 lda #'l' + // [10] call print jsr print // main::@return // } @@ -359,7 +314,7 @@ main: { // print(byte register(A) ch) print: { // kickasm - // kickasm( uses print::ch#3) {{ }} + // kickasm( uses print::ch) {{ }} // Force usage of ch // asm @@ -369,7 +324,7 @@ print: { inc idx // print::@return // } - // [15] return + // [14] return rts } // File Data diff --git a/src/test/ref/register-0.sym b/src/test/ref/register-0.sym index cdf40f6d5..714d5934d 100644 --- a/src/test/ref/register-0.sym +++ b/src/test/ref/register-0.sym @@ -1,10 +1,9 @@ const nomodify byte* SCREEN = (byte*) 1024 void __start() -volatile byte idx loadstore !zp[-1]:3 zp[1]:3 0.18181818181818182 +volatile byte idx loadstore !zp[-1]:3 zp[1]:3 0.2 void main() -void print(byte print::ch) -byte print::ch !reg byte a -byte print::ch#3 !reg byte a +void print(volatile byte print::ch) +volatile byte print::ch loadstore !reg byte a 11.0 -reg byte a [ print::ch#3 ] zp[1]:3 [ idx ] +reg byte a [ print::ch ] diff --git a/src/test/ref/string-escapes-4.cfg b/src/test/ref/string-escapes-4.cfg index 0de2ac36e..b85875b00 100644 --- a/src/test/ref/string-escapes-4.cfg +++ b/src/test/ref/string-escapes-4.cfg @@ -14,7 +14,7 @@ main::@return: scope:[main] from main::@3 [4] return to:@return main::@2: scope:[main] from main::@1 - [5] chrout::petscii#0 = MSG1[main::i#2] + [5] chrout::petscii = MSG1[main::i#2] [6] call chrout to:main::@4 main::@4: scope:[main] from main::@2 @@ -22,12 +22,11 @@ main::@4: scope:[main] from main::@2 [8] main::i#1 = ++ main::i#2 to:main::@1 -void chrout(byte chrout::petscii) +void chrout(volatile byte chrout::petscii) chrout: scope:[chrout] from main::@2 - [9] chrout::petscii#1 = phi( main::@2/chrout::petscii#0 ) - kickasm( uses chrout::petscii#1) {{ jsr $ffd2 + kickasm( uses chrout::petscii) {{ jsr $ffd2 }} to:chrout::@return chrout::@return: scope:[chrout] from chrout - [11] return + [10] return to:@return diff --git a/src/test/ref/string-escapes-4.log b/src/test/ref/string-escapes-4.log index 5e3d12ecf..e7b0319fc 100644 --- a/src/test/ref/string-escapes-4.log +++ b/src/test/ref/string-escapes-4.log @@ -1,3 +1,5 @@ +Setting inferred volatile on symbol affected by address-of: chrout::petscii in kickasm( uses chrout::petscii) {{ jsr $ffd2 + }} Inlined call call __init CONTROL FLOW GRAPH SSA @@ -14,7 +16,7 @@ main::@1: scope:[main] from main main::@4 to:main::@3 main::@2: scope:[main] from main::@1 main::i#3 = phi( main::@1/main::i#2 ) - chrout::petscii#0 = MSG1[main::i#3] + chrout::petscii = MSG1[main::i#3] call chrout to:main::@4 main::@4: scope:[main] from main::@2 @@ -29,10 +31,9 @@ main::@return: scope:[main] from main::@3 return to:@return -void chrout(byte chrout::petscii) +void chrout(volatile byte chrout::petscii) chrout: scope:[chrout] from main::@2 - chrout::petscii#1 = phi( main::@2/chrout::petscii#0 ) - kickasm( uses chrout::petscii#1) {{ jsr $ffd2 + kickasm( uses chrout::petscii) {{ jsr $ffd2 }} to:chrout::@return chrout::@return: scope:[chrout] from chrout @@ -60,10 +61,8 @@ const byte* MSG2[] = "CAMELOT"su const byte* SCREEN1 = (byte*)$400 const byte* SCREEN2 = (byte*)$428 void __start() -void chrout(byte chrout::petscii) -byte chrout::petscii !reg byte a -byte chrout::petscii#0 !reg byte a -byte chrout::petscii#1 !reg byte a +void chrout(volatile byte chrout::petscii) +volatile byte chrout::petscii loadstore !reg byte a void main() bool~ main::$1 byte main::i @@ -109,12 +108,11 @@ Inlining constant with var siblings main::i#0 Constant inlined main::i#0 = 0 Successful SSA optimization Pass2ConstantInlining CALL GRAPH -Calls in [main] to chrout:7 +Calls in [main] to chrout:6 -Created 2 initial phi equivalence classes -Coalesced [6] chrout::petscii#2 = chrout::petscii#0 -Coalesced [10] main::i#5 = main::i#1 -Coalesced down to 2 phi equivalence classes +Created 1 initial phi equivalence classes +Coalesced [9] main::i#5 = main::i#1 +Coalesced down to 1 phi equivalence classes FINAL CONTROL FLOW GRAPH @@ -133,7 +131,7 @@ main::@return: scope:[main] from main::@3 [4] return to:@return main::@2: scope:[main] from main::@1 - [5] chrout::petscii#0 = MSG1[main::i#2] + [5] chrout::petscii = MSG1[main::i#2] [6] call chrout to:main::@4 main::@4: scope:[main] from main::@2 @@ -141,22 +139,19 @@ main::@4: scope:[main] from main::@2 [8] main::i#1 = ++ main::i#2 to:main::@1 -void chrout(byte chrout::petscii) +void chrout(volatile byte chrout::petscii) chrout: scope:[chrout] from main::@2 - [9] chrout::petscii#1 = phi( main::@2/chrout::petscii#0 ) - kickasm( uses chrout::petscii#1) {{ jsr $ffd2 + kickasm( uses chrout::petscii) {{ jsr $ffd2 }} to:chrout::@return chrout::@return: scope:[chrout] from chrout - [11] return + [10] return to:@return VARIABLE REGISTER WEIGHTS -void chrout(byte chrout::petscii) -byte chrout::petscii !reg byte a -byte chrout::petscii#0 !reg byte a 22.0 -byte chrout::petscii#1 !reg byte a 11.0 +void chrout(volatile byte chrout::petscii) +volatile byte chrout::petscii loadstore !reg byte a 11.0 void main() byte main::i byte main::i#1 22.0 @@ -164,34 +159,34 @@ byte main::i#2 13.2 Initial phi equivalence classes [ main::i#2 main::i#1 ] -[ chrout::petscii#1 chrout::petscii#0 ] +Added variable chrout::petscii to live range equivalence class [ chrout::petscii ] Complete equivalence classes [ main::i#2 main::i#1 ] -[ chrout::petscii#1 chrout::petscii#0 ] +[ chrout::petscii ] Allocated zp[1]:2 [ main::i#2 main::i#1 ] REGISTER UPLIFT POTENTIAL REGISTERS Statement [0] *((byte*) 53272) = $17 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] if(0!=MSG1[main::i#2]) goto main::@2 [ main::i#2 ] ( [ main::i#2 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::i#2 main::i#1 ] Statement [3] *SCREEN2 = CH [ ] ( [ ] { } ) always clobbers reg byte a -Statement [5] chrout::petscii#0 = MSG1[main::i#2] [ main::i#2 chrout::petscii#0 ] ( [ main::i#2 chrout::petscii#0 ] { { chrout::petscii#0 = chrout::petscii#1 } } ) always clobbers reg byte a +Statement [5] chrout::petscii = MSG1[main::i#2] [ main::i#2 chrout::petscii ] ( [ main::i#2 chrout::petscii ] { } ) always clobbers reg byte a Statement [7] SCREEN1[main::i#2] = MSG2[main::i#2] [ main::i#2 ] ( [ main::i#2 ] { } ) always clobbers reg byte a Statement [0] *((byte*) 53272) = $17 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] if(0!=MSG1[main::i#2]) goto main::@2 [ main::i#2 ] ( [ main::i#2 ] { } ) always clobbers reg byte a Statement [3] *SCREEN2 = CH [ ] ( [ ] { } ) always clobbers reg byte a -Statement [5] chrout::petscii#0 = MSG1[main::i#2] [ main::i#2 chrout::petscii#0 ] ( [ main::i#2 chrout::petscii#0 ] { { chrout::petscii#0 = chrout::petscii#1 } } ) always clobbers reg byte a +Statement [5] chrout::petscii = MSG1[main::i#2] [ main::i#2 chrout::petscii ] ( [ main::i#2 chrout::petscii ] { } ) always clobbers reg byte a Statement [7] SCREEN1[main::i#2] = MSG2[main::i#2] [ main::i#2 ] ( [ main::i#2 ] { } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::i#2 main::i#1 ] : zp[1]:2 , reg byte x , reg byte y , -Potential registers reg byte a [ chrout::petscii#1 chrout::petscii#0 ] : reg byte a , +Potential registers reg byte a [ chrout::petscii ] : reg byte a , REGISTER UPLIFT SCOPES Uplift Scope [main] 35.2: zp[1]:2 [ main::i#2 main::i#1 ] -Uplift Scope [chrout] 33: reg byte a [ chrout::petscii#1 chrout::petscii#0 ] +Uplift Scope [chrout] 11: reg byte a [ chrout::petscii ] Uplift Scope [] -Uplifting [main] best 655 combination reg byte x [ main::i#2 main::i#1 ] -Uplifting [chrout] best 655 combination reg byte a [ chrout::petscii#1 chrout::petscii#0 ] -Uplifting [] best 655 combination +Uplifting [main] best 736 combination reg byte x [ main::i#2 main::i#1 ] +Uplifting [chrout] best 736 combination reg byte a [ chrout::petscii ] +Uplifting [] best 736 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -236,12 +231,9 @@ main: { rts // main::@2 __b2: - // [5] chrout::petscii#0 = MSG1[main::i#2] -- vbuaa=pbuc1_derefidx_vbuxx + // [5] chrout::petscii = MSG1[main::i#2] -- vbuaa=pbuc1_derefidx_vbuxx lda MSG1,x // [6] call chrout - // [9] phi from main::@2 to chrout [phi:main::@2->chrout] - chrout_from___b2: - // [9] phi chrout::petscii#1 = chrout::petscii#0 [phi:main::@2->chrout#0] -- register_copy jsr chrout jmp __b4 // main::@4 @@ -259,13 +251,13 @@ main: { // chrout // chrout(byte register(A) petscii) chrout: { - // kickasm( uses chrout::petscii#1) {{ jsr $ffd2 }} + // kickasm( uses chrout::petscii) {{ jsr $ffd2 }} jsr $ffd2 jmp __breturn // chrout::@return __breturn: - // [11] return + // [10] return rts } // File Data @@ -286,7 +278,6 @@ Succesful ASM optimization Pass5NextJumpElimination Removing instruction __b1_from_main: Removing instruction __b3: Removing instruction __breturn: -Removing instruction chrout_from___b2: Removing instruction __b4: Removing instruction __b1_from___b4: Removing instruction __breturn: @@ -298,21 +289,19 @@ const byte* MSG1[] = "cAmElot"pm const byte* MSG2[] = "CAMELOT"su const byte* SCREEN1 = (byte*) 1024 const byte* SCREEN2 = (byte*) 1064 -void chrout(byte chrout::petscii) -byte chrout::petscii !reg byte a -byte chrout::petscii#0 !reg byte a 22.0 -byte chrout::petscii#1 !reg byte a 11.0 +void chrout(volatile byte chrout::petscii) +volatile byte chrout::petscii loadstore !reg byte a 11.0 void main() byte main::i byte main::i#1 reg byte x 22.0 byte main::i#2 reg byte x 13.2 reg byte x [ main::i#2 main::i#1 ] -reg byte a [ chrout::petscii#1 chrout::petscii#0 ] +reg byte a [ chrout::petscii ] FINAL ASSEMBLER -Score: 586 +Score: 640 // File Comments // Test using some simple supported string escape @@ -355,11 +344,9 @@ main: { // main::@2 __b2: // chrout(MSG1[i]) - // [5] chrout::petscii#0 = MSG1[main::i#2] -- vbuaa=pbuc1_derefidx_vbuxx + // [5] chrout::petscii = MSG1[main::i#2] -- vbuaa=pbuc1_derefidx_vbuxx lda MSG1,x // [6] call chrout - // [9] phi from main::@2 to chrout [phi:main::@2->chrout] - // [9] phi chrout::petscii#1 = chrout::petscii#0 [phi:main::@2->chrout#0] -- register_copy jsr chrout // main::@4 // SCREEN1[i] = MSG2[i] @@ -377,12 +364,12 @@ main: { // chrout(byte register(A) petscii) chrout: { // kickasm - // kickasm( uses chrout::petscii#1) {{ jsr $ffd2 }} + // kickasm( uses chrout::petscii) {{ jsr $ffd2 }} jsr $ffd2 // chrout::@return // } - // [11] return + // [10] return rts } // File Data diff --git a/src/test/ref/string-escapes-4.sym b/src/test/ref/string-escapes-4.sym index f6c6974f4..7faf842bd 100644 --- a/src/test/ref/string-escapes-4.sym +++ b/src/test/ref/string-escapes-4.sym @@ -3,14 +3,12 @@ const byte* MSG1[] = "cAmElot"pm const byte* MSG2[] = "CAMELOT"su const byte* SCREEN1 = (byte*) 1024 const byte* SCREEN2 = (byte*) 1064 -void chrout(byte chrout::petscii) -byte chrout::petscii !reg byte a -byte chrout::petscii#0 !reg byte a 22.0 -byte chrout::petscii#1 !reg byte a 11.0 +void chrout(volatile byte chrout::petscii) +volatile byte chrout::petscii loadstore !reg byte a 11.0 void main() byte main::i byte main::i#1 reg byte x 22.0 byte main::i#2 reg byte x 13.2 reg byte x [ main::i#2 main::i#1 ] -reg byte a [ chrout::petscii#1 chrout::petscii#0 ] +reg byte a [ chrout::petscii ]