diff --git a/src/main/fragment/cache/fragment-cache-mos6502x.asm b/src/main/fragment/cache/fragment-cache-mos6502x.asm index 18554632f..e421d3094 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502x.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm @@ -1,94 +1,122 @@ -//KICKC FRAGMENT CACHE 13bb8fa634 13bb8fbf63 +//KICKC FRAGMENT CACHE 12fc0379b9 12fc039308 +//FRAGMENT vbuz1=vbuz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} +//FRAGMENT vbuc1_eq_vbuz1_then_la1 +lda #{c1} +cmp {z1} +beq {la1} +//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 +inc {c1} +//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 +dec {c1} +//FRAGMENT _deref_pbuc1=vbuc2 +lda #{c2} +sta {c1} +//FRAGMENT vbuz1=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +sta {z1} //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} -//FRAGMENT pbuz1=pbuc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 +//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2 +lda #{c2} +ldy {z1} +sta {c1},y +//FRAGMENT vbuz1=_inc_vbuz1 +inc {z1} +//FRAGMENT vbuc1_neq_vbuz1_then_la1 +lda #{c1} +cmp {z1} +bne {la1} //FRAGMENT vwuz1=vwuc1 lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 -//FRAGMENT vwsz1=vwsc1 +//FRAGMENT pvoz1=pvoc1 lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 -//FRAGMENT vwsz1=vwsz1_plus_vbsc1 +//FRAGMENT vwuz1=vbuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1_lt_vbuc1_then_la1 lda {z1} +cmp #{c1} +bcc {la1} +//FRAGMENT pbuz1=pbuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=pbuc1_plus_vbuz2 +lda {z2} clc adc #<{c1} sta {z1} -lda {z1}+1 -adc #>{c1} +lda #>{c1} +adc #0 sta {z1}+1 -//FRAGMENT vwuz1=vwuz1_plus_vwuc1 -clc +//FRAGMENT pvoz1=pvoz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT vbuz1=vbuz1_plus_2 lda {z1} -adc #<{c1} +clc +adc #2 sta {z1} +//FRAGMENT vbuz1=vbuz2_rol_1 +lda {z2} +asl +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT vwuz1_lt_vwuc1_then_la1 lda {z1}+1 -adc #>{c1} -sta {z1}+1 -//FRAGMENT vwsz1=vwsz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT vwuz1=vwuz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT vbuz1=_inc_vbuz1 -inc {z1} -//FRAGMENT vbuz1_neq_vbuc1_then_la1 -lda #{c1} -cmp {z1} -bne {la1} -//FRAGMENT pbuz1=pbuz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT vwsz1_lt_0_then_la1 -lda {z1}+1 -bmi {la1} -//FRAGMENT vwsz1=_neg_vwsz1 -sec -lda #0 -sbc {z1} -sta {z1} -lda #0 -sbc {z1}+1 -sta {z1}+1 -//FRAGMENT _deref_pbuz1=vbuz2 -lda {z2} +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT vbuz1=_deref_pbuz2 ldy #0 -sta ({z1}),y +lda ({z2}),y +sta {z1} +//FRAGMENT _deref_pbuc1=vbuz1 +lda {z1} +sta {c1} //FRAGMENT pbuz1=_inc_pbuz1 inc {z1} bne !+ inc {z1}+1 !: -//FRAGMENT vbuz1=_hi_vwuz2 -lda {z2}+1 -sta {z1} -//FRAGMENT vbuz1=_lo_vwuz2 -lda {z2} -sta {z1} -//FRAGMENT pbuz1=pbuz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -sta {z1} -bcc !+ +//FRAGMENT vwuz1=_inc_vwuz1 +inc {z1} +bne !+ inc {z1}+1 !: -//FRAGMENT pbuz1_lt_pbuz2_then_la1 +//FRAGMENT vbuz1=_hi_pvoz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=_lo_pvoz2 +lda {z2} +sta {z1} +//FRAGMENT vwuz1_lt_vwuz2_then_la1 lda {z1}+1 cmp {z2}+1 bcc {la1} @@ -97,191 +125,82 @@ lda {z1} cmp {z2} bcc {la1} !: -//FRAGMENT vbuz1=vbuz2_ror_4 -lda {z2} -lsr -lsr -lsr -lsr +//FRAGMENT vbuz1=pbuz2_derefidx_vbuc1 +ldy #{c1} +lda ({z2}),y sta {z1} -//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2 -ldy {z2} -lda {c1},y -sta {z1} -//FRAGMENT vbuz1=vbuz2_band_vbuc1 +//FRAGMENT pbuz1=pbuz2_plus_vbuc1 lda #{c1} -and {z2} +clc +adc {z2} sta {z1} -//FRAGMENT vbuxx_neq_vbuc1_then_la1 -cpx #{c1} -bne {la1} -//FRAGMENT _deref_pbuz1=vbuaa -ldy #0 -sta ({z1}),y -//FRAGMENT _deref_pbuz1=vbuxx -txa -ldy #0 -sta ({z1}),y -//FRAGMENT _deref_pbuz1=vbuyy -tya -ldy #0 -sta ({z1}),y -//FRAGMENT vbuaa=_hi_vwuz1 +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT pbuz1_neq_pbuc1_then_la1 lda {z1}+1 -//FRAGMENT vbuxx=_hi_vwuz1 -ldx {z1}+1 -//FRAGMENT vbuaa=_lo_vwuz1 +cmp #>{c1} +bne {la1} lda {z1} -//FRAGMENT vbuxx=_lo_vwuz1 +cmp #<{c1} +bne {la1} +//FRAGMENT _deref_pbuz1=_deref_pbuz2 +ldy #0 +lda ({z2}),y +ldy #0 +sta ({z1}),y +//FRAGMENT vbuz1=vbuaa +sta {z1} +//FRAGMENT vbuaa=vbuz1 +lda {z1} +//FRAGMENT vbuxx=vbuz1 ldx {z1} -//FRAGMENT vbuaa=vbuz1_ror_4 -lda {z1} -lsr -lsr -lsr -lsr -//FRAGMENT vbuxx=vbuz1_ror_4 -lda {z1} -lsr -lsr -lsr -lsr -tax -//FRAGMENT vbuyy=vbuz1_ror_4 -lda {z1} -lsr -lsr -lsr -lsr -tay -//FRAGMENT vbuz1=vbuaa_ror_4 -lsr -lsr -lsr -lsr -sta {z1} -//FRAGMENT vbuaa=vbuaa_ror_4 -lsr -lsr -lsr -lsr -//FRAGMENT vbuxx=vbuaa_ror_4 -lsr -lsr -lsr -lsr -tax -//FRAGMENT vbuyy=vbuaa_ror_4 -lsr -lsr -lsr -lsr -tay -//FRAGMENT vbuz1=vbuxx_ror_4 -txa -lsr -lsr -lsr -lsr -sta {z1} -//FRAGMENT vbuaa=vbuxx_ror_4 -txa -lsr -lsr -lsr -lsr -//FRAGMENT vbuxx=vbuxx_ror_4 -txa -lsr -lsr -lsr -lsr -tax -//FRAGMENT vbuyy=vbuxx_ror_4 -txa -lsr -lsr -lsr -lsr -tay -//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1 -ldy {z1} -lda {c1},y -//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1 -ldy {z1} -ldx {c1},y -//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1 -ldx {z1} -ldy {c1},x -//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa -tay -lda {c1},y -sta {z1} -//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa -tay -lda {c1},y -//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa -tay -ldx {c1},y -//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa -tax -ldy {c1},x -//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx -lda {c1},x +//FRAGMENT vbuz1=vbuaa_band_vbuc1 +and #{c1} sta {z1} //FRAGMENT vbuz1=vbuxx_band_vbuc1 lda #{c1} sax {z1} +//FRAGMENT vbuz1=vbuyy_band_vbuc1 +tya +and #{c1} +sta {z1} //FRAGMENT vbuaa=vbuz1_band_vbuc1 lda #{c1} and {z1} +//FRAGMENT vbuaa=vbuaa_band_vbuc1 +and #{c1} //FRAGMENT vbuaa=vbuxx_band_vbuc1 txa and #{c1} +//FRAGMENT vbuaa=vbuyy_band_vbuc1 +tya +and #{c1} //FRAGMENT vbuxx=vbuz1_band_vbuc1 lda #{c1} and {z1} tax -//FRAGMENT vbuxx=vbuxx_band_vbuc1 -lda #{c1} +//FRAGMENT vbuxx=vbuaa_band_vbuc1 +ldx #{c1} axs #0 +//FRAGMENT vbuc1_eq_vbuaa_then_la1 +cmp #{c1} +beq {la1} //FRAGMENT vbuyy=vbuz1_band_vbuc1 lda #{c1} and {z1} tay -//FRAGMENT vbuyy=vbuxx_band_vbuc1 -txa -and #{c1} +//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 vbuaa=vbuc1 -lda #{c1} -//FRAGMENT vbuxx=vbuc1 -ldx #{c1} -//FRAGMENT vbuyy=vbuc1 -ldy #{c1} -//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx -lda {c1},x -//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy -lda {c1},y -//FRAGMENT vbuz1_lt_vbuc1_then_la1 -lda {z1} -cmp #{c1} -bcc {la1} -//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2 -lda #{c2} -ldy {z1} -sta {c1},y -//FRAGMENT _deref_pbuc1=vbuc2 -lda #{c2} -sta {c1} -//FRAGMENT vbuz1=vbuz1_plus_2 -lda {z1} -clc -adc #2 -sta {z1} -//FRAGMENT vbuaa_lt_vbuc1_then_la1 -cmp #{c1} -bcc {la1} //FRAGMENT pbuc1_derefidx_vbuaa=vbuc2 tay lda #{c2} @@ -292,1618 +211,12 @@ sta {c1},x //FRAGMENT pbuc1_derefidx_vbuyy=vbuc2 lda #{c2} sta {c1},y -//FRAGMENT vbuxx=vbuxx_plus_2 -inx -inx -//FRAGMENT vbuxx_lt_vbuc1_then_la1 +//FRAGMENT vbuc1_neq_vbuxx_then_la1 cpx #{c1} -bcc {la1} -//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 vbuz1=vbuz2 -lda {z2} -sta {z1} -//FRAGMENT vwuz1=vwuz1_plus_vwuz2 -lda {z1} -clc -adc {z2} -sta {z1} -lda {z1}+1 -adc {z2}+1 -sta {z1}+1 -//FRAGMENT vwuz1=_inc_vwuz1 -inc {z1} -bne !+ -inc {z1}+1 -!: -//FRAGMENT pbuz1_neq_pbuc1_then_la1 -lda {z1}+1 -cmp #>{c1} bne {la1} -lda {z1} -cmp #<{c1} -bne {la1} -//FRAGMENT _deref_pbuz1=vbuc1 -lda #{c1} -ldy #0 -sta ({z1}),y -//FRAGMENT vbuc1_neq__deref_pbuz1_then_la1 -ldy #0 -lda ({z1}),y +//FRAGMENT vbuaa_lt_vbuc1_then_la1 cmp #{c1} -bne {la1} -//FRAGMENT vbuz1=_deref_pbuz2 -ldy #0 -lda ({z2}),y -sta {z1} -//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 vwuz1=vwuz2_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 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 vbuz1_eq_0_then_la1 -lda {z1} -cmp #0 -beq {la1} -//FRAGMENT vbsz1=_neg_vbsz2 -lda {z2} -eor #$ff -clc -adc #$01 -sta {z1} -//FRAGMENT vbsz1_ge_0_then_la1 -lda {z1} -cmp #0 -bpl {la1} -//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=vbuc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT vwuz1=vwuz1_rol_1 -asl {z1} -rol {z1}+1 -//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 vwuz1=_word_vbuz2 -lda {z2} -sta {z1} -lda #0 -sta {z1}+1 -//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 vbuz1=vbuxx -stx {z1} -//FRAGMENT vbuaa=_deref_pbuz1 -ldy #0 -lda ({z1}),y -//FRAGMENT vbuxx=_deref_pbuz1 -ldy #0 -lda ({z1}),y -tax -//FRAGMENT vbuyy=_deref_pbuz1 -ldy #0 -lda ({z1}),y -tay -//FRAGMENT vbuz1=vbuyy_ror_4 -tya -lsr -lsr -lsr -lsr -sta {z1} -//FRAGMENT vbuaa=vbuyy_ror_4 -tya -lsr -lsr -lsr -lsr -//FRAGMENT vbuxx=vbuyy_ror_4 -tya -lsr -lsr -lsr -lsr -tax -//FRAGMENT vbuyy=vbuyy_ror_4 -tya -lsr -lsr -lsr -lsr -tay -//FRAGMENT vbuz1=vbuyy_band_vbuc1 -tya -and #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuyy_band_vbuc1 -tya -and #{c1} -//FRAGMENT vbuxx=vbuyy_band_vbuc1 -ldx #{c1} -tya -axs #0 -//FRAGMENT vbuyy=vbuyy_band_vbuc1 -tya -and #{c1} -tay -//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy -lda {c1},y -sta {z1} -//FRAGMENT vbuaa=vbuz1 -lda {z1} -//FRAGMENT vbuxx=vbuz1 -ldx {z1} -//FRAGMENT vbuz1=vbuaa -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=vbuxx_minus_vbuz1 -txa -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=vbuxx_minus_vbuaa -sta $ff -txa -sec -sbc $ff -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=vbuxx_minus_vbuxx -lda #0 -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=vbuxx_minus_vbuyy -txa -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 vbuxx_eq_0_then_la1 -cpx #0 -beq {la1} -//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 vbsxx_ge_0_then_la1 -cpx #0 -bpl {la1} -//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 vbuz1=vbuaa_band_vbuc1 -and #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuaa_band_vbuc1 -and #{c1} -//FRAGMENT vbuxx=vbuaa_band_vbuc1 -ldx #{c1} -axs #0 -//FRAGMENT vbuaa_eq_0_then_la1 -cmp #0 -beq {la1} -//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 vwuz1=_word_vbuaa -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=_word_vbuxx -txa -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=_word_vbuyy -tya -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vbuxx_neq_0_then_la1 -cpx #0 -bne {la1} -//FRAGMENT vbsz1=vbsxx -stx {z1} -//FRAGMENT vbuyy_eq_0_then_la1 -cpy #0 -beq {la1} -//FRAGMENT vbuxx=vbuxx_ror_1 -txa -lsr -tax -//FRAGMENT vbuyy=vbuz1 -ldy {z1} -//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=vbuaa_band_vbuc1 -and #{c1} -tay -//FRAGMENT vbuxx=_inc_vbuxx -inx -//FRAGMENT vbuyy=_inc_vbuyy -iny -//FRAGMENT vbuyy_neq_vbuc1_then_la1 -cpy #{c1} -bne {la1} -//FRAGMENT vbuxx=vbuaa -tax -//FRAGMENT vbuxx=vbuyy -tya -tax -//FRAGMENT vbuaa=vbuyy -tya -//FRAGMENT vbuz1=vbuyy -sty {z1} -//FRAGMENT vbuaa=vbuxx -txa -//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 vbuyy=vbuaa -tay -//FRAGMENT vwuz1=vwuz1_sethi_vbuxx -stx {z1}+1 -//FRAGMENT vbuxx=vbuxx_minus_vbuc1 -txa -axs #{c1} -//FRAGMENT vbuxx=vbuyy_minus_vbuc1 -tya -tax -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_3 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -//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 _deref_pbuc1=vbuz1 -lda {z1} -sta {c1} -//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=vbuz1_minus_vbuz2 -lda {z1} -sec -sbc {z2} -sta {z1} -//FRAGMENT _deref_pbuc1=vbuaa -sta {c1} -//FRAGMENT vbuz1_neq_vbuaa_then_la1 -cmp {z1} -bne {la1} -//FRAGMENT vbuz1_gt_vbuaa_then_la1 -cmp {z1} -bcc {la1} -//FRAGMENT vbuz1=vbuz1_minus_vbuaa -eor #$ff -sec -adc {z1} -sta {z1} -//FRAGMENT vbuz1=vbuz1_minus_vbuxx -txa -eor #$ff -sec -adc {z1} -sta {z1} -//FRAGMENT vbuz1=vbuz1_minus_vbuyy -tya -eor #$ff -sec -adc {z1} -sta {z1} -//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 vbuyy=vbuxx -txa -tay -//FRAGMENT _deref_pbuc1=vbuxx -stx {c1} -//FRAGMENT _deref_pbuc1=vbuyy -sty {c1} -//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 _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=_inc__deref_pbuc1 -inc {c1} -//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=vbsc1 -lda #{c1} -sta {z1} -//FRAGMENT vbsz1=pbsc1_derefidx_vbuz2 -ldy {z2} -lda {c1},y -sta {z1} -//FRAGMENT vwsz1=vwsz2_plus_vwsc1 -lda {z2} -clc -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 vbuc1_neq_vbuz1_then_la1 -lda #{c1} -cmp {z1} -bne {la1} -//FRAGMENT _deref_pbuc1=_deref_pbuc2 -lda {c2} -sta {c1} -//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuz2 -ldy {z2} -lda {c1},y -ldy #0 -sta ({z1}),y -//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 vwuz1=vwuz2_rol_2 -lda {z2} -asl -sta {z1} -lda {z2}+1 -rol -sta {z1}+1 -asl {z1} -rol {z1}+1 -//FRAGMENT vwuz1=vwuz2_plus_vwuz3 -lda {z2} -clc -adc {z3} -sta {z1} -lda {z2}+1 -adc {z3}+1 -sta {z1}+1 -//FRAGMENT vbuz1=vbuz2_rol_1 -lda {z2} -asl -sta {z1} -//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 pbuz1_derefidx_vbuc1=vbuc2 -lda #{c2} -ldy #{c1} -sta ({z1}),y -//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 -lda {z2} -clc -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 vbuz1=vbuz2_rol_2 -lda {z2} -asl -asl -sta {z1} -//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 pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuz2 -ldy {z2} -lda {c2},y -ldy #{c1} -sta ({z1}),y -//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 vbuc1_eq_vbuz1_then_la1 -lda #{c1} -cmp {z1} -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 vbuc1_neq_vbuaa_then_la1 -cmp #{c1} -bne {la1} -//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuxx -lda {c1},x -ldy #0 -sta ({z1}),y -//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuyy -lda {c1},y -ldy #0 -sta ({z1}),y -//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} @@ -1927,6 +240,12 @@ sta {z1} lda #>{c1} adc #0 sta {z1}+1 +//FRAGMENT vbuxx=vbuxx_plus_2 +inx +inx +//FRAGMENT vbuz1=vbuaa_rol_1 +asl +sta {z1} //FRAGMENT vbuz1=vbuxx_rol_1 txa asl @@ -1938,6 +257,8 @@ sta {z1} //FRAGMENT vbuaa=vbuz1_rol_1 lda {z1} asl +//FRAGMENT vbuaa=vbuaa_rol_1 +asl //FRAGMENT vbuaa=vbuxx_rol_1 txa asl @@ -1948,6 +269,9 @@ asl lda {z1} asl tax +//FRAGMENT vbuxx=vbuaa_rol_1 +asl +tax //FRAGMENT vbuxx=vbuxx_rol_1 txa asl @@ -1960,6 +284,9 @@ tax lda {z1} asl tay +//FRAGMENT vbuyy=vbuaa_rol_1 +asl +tay //FRAGMENT vbuyy=vbuxx_rol_1 txa asl @@ -1968,658 +295,179 @@ tay tya asl tay -//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 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 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=vbuxx_rol_2 -txa -asl -asl -sta {z1} -//FRAGMENT vbuz1=vbuyy_rol_2 -tya -asl -asl -sta {z1} -//FRAGMENT vbuaa=vbuz1_rol_2 -lda {z1} -asl -asl -//FRAGMENT vbuaa=vbuaa_rol_2 -asl -asl -//FRAGMENT vbuaa=vbuxx_rol_2 -txa -asl -asl -//FRAGMENT vbuaa=vbuyy_rol_2 -tya -asl -asl -//FRAGMENT vbuxx=vbuz1_rol_2 -lda {z1} -asl -asl -tax -//FRAGMENT vbuxx=vbuaa_rol_2 -asl -asl -tax -//FRAGMENT vbuxx=vbuxx_rol_2 -txa -asl -asl -tax -//FRAGMENT vbuxx=vbuyy_rol_2 -tya -asl -asl -tax -//FRAGMENT vbuyy=vbuz1_rol_2 -lda {z1} -asl -asl -tay -//FRAGMENT vbuyy=vbuaa_rol_2 -asl -asl -tay -//FRAGMENT vbuyy=vbuxx_rol_2 -txa -asl -asl -tay -//FRAGMENT vbuyy=vbuyy_rol_2 -tya -asl -asl -tay -//FRAGMENT pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuxx -lda {c2},x -ldy #{c1} -sta ({z1}),y -//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 vbuc1_eq_vbuaa_then_la1 -cmp #{c1} -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 vbuz1=vbuyy_bor_vbuz2 +tya +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuaa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuaa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuaa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuxx +stx {z1} +//FRAGMENT vbuaa=_deref_pbuz1 +ldy #0 +lda ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1 +ldy #0 +lda ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1 +ldy #0 +lda ({z1}),y +tay +//FRAGMENT _deref_pbuc1=vbuaa +sta {c1} +//FRAGMENT vbuaa=_hi_pvoz1 +lda {z1}+1 +//FRAGMENT vbuxx=_hi_pvoz1 +ldx {z1}+1 +//FRAGMENT vbuaa=_lo_pvoz1 +lda {z1} +//FRAGMENT vbuxx=_lo_pvoz1 +ldx {z1} +//FRAGMENT _deref_pbuc1=vbuxx +stx {c1} +//FRAGMENT vbuaa=pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +//FRAGMENT vbuxx=pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +tax +//FRAGMENT vbuyy=pbuz1_derefidx_vbuc1 +ldy #{c1} +lda ({z1}),y +tay +//FRAGMENT vbuxx_lt_vbuc1_then_la1 +cpx #{c1} +bcc {la1} +//FRAGMENT vbuyy=_hi_pvoz1 +ldy {z1}+1 +//FRAGMENT _deref_pbuc1=vbuyy +sty {c1} +//FRAGMENT vbuyy=_lo_pvoz1 +ldy {z1} +//FRAGMENT vbuxx=vbuc1 +ldx #{c1} +//FRAGMENT vbuxx=_inc_vbuxx +inx +//FRAGMENT vbuyy=vbuc1 +ldy #{c1} +//FRAGMENT vbuyy_lt_vbuc1_then_la1 +cpy #{c1} +bcc {la1} +//FRAGMENT vbuyy=_inc_vbuyy +iny +//FRAGMENT vbuz1=vbuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuc1 +lda #{c1} +//FRAGMENT vbuaa=vbuz1_bor_vbuz2 +lda {z1} +ora {z2} +//FRAGMENT vbuaa=vbuz1_bor_vbuaa +ora {z1} +//FRAGMENT vbuaa=vbuz1_bor_vbuxx +txa +ora {z1} +//FRAGMENT vbuaa=vbuz1_bor_vbuyy +tya +ora {z1} +//FRAGMENT vbuz1=vbuxx +stx {z1} +//FRAGMENT vbuxx=vbuz1_bor_vbuz2 +lda {z1} +ora {z2} +tax +//FRAGMENT vbuxx=vbuz1_bor_vbuaa +ora {z1} +tax +//FRAGMENT vbuxx=vbuz1_bor_vbuxx +txa +ora {z1} +tax +//FRAGMENT vbuxx=vbuz1_bor_vbuyy +tya +ora {z1} +tax +//FRAGMENT vbuz1=vbuyy +sty {z1} +//FRAGMENT vbuyy=vbuz1_bor_vbuz2 +lda {z1} +ora {z2} +tay +//FRAGMENT vbuyy=vbuz1_bor_vbuaa +ora {z1} +tay +//FRAGMENT vbuyy=vbuz1_bor_vbuxx +txa +ora {z1} +tay +//FRAGMENT vbuyy=vbuz1_bor_vbuyy +tya +ora {z1} +tay +//FRAGMENT vbuz1=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff +sta {z1} //FRAGMENT vbuaa=vbuxx_bor_vbuz1 txa ora {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuaa +stx $ff +ora $ff +//FRAGMENT vbuaa=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff //FRAGMENT vbuxx=vbuxx_bor_vbuz1 txa ora {z1} tax +//FRAGMENT vbuxx=vbuxx_bor_vbuaa +stx $ff +ora $ff +tax +//FRAGMENT vbuxx=vbuxx_bor_vbuyy +txa +sty $ff +ora $ff +tax //FRAGMENT vbuyy=vbuxx_bor_vbuz1 txa ora {z1} tay -//FRAGMENT 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 +//FRAGMENT vbuyy=vbuxx_bor_vbuyy +txa 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 +//FRAGMENT vbuc1_neq_vbuyy_then_la1 +cpy #{c1} bne {la1} //FRAGMENT vbuc1_eq_vbuxx_then_la1 cpx #{c1} @@ -2627,3992 +475,150 @@ beq {la1} //FRAGMENT vbuc1_eq_vbuyy_then_la1 cpy #{c1} beq {la1} -//FRAGMENT vbuc1_neq_vbuxx_then_la1 -cpx #{c1} -bne {la1} -//FRAGMENT vbuc1_neq_vbuyy_then_la1 -cpy #{c1} -bne {la1} -//FRAGMENT vbuz1=vbuyy_bor_vbuxx -txa +//FRAGMENT vbuaa=vbuyy_bor_vbuaa 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} +//FRAGMENT vbuxx=vbuaa +tax +//FRAGMENT vbuyy=vbuaa 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 vwuz1=vwuz2_plus_vwuz1 -lda {z1} -clc -adc {z2} -sta {z1} -lda {z1}+1 -adc {z2}+1 -sta {z1}+1 -//FRAGMENT pbuz1=pbuc1_plus_vwuz1 -clc -lda {z1} -adc #<{c1} -sta {z1} -lda {z1}+1 -adc #>{c1} -sta {z1}+1 -//FRAGMENT pbuz1=pbuz1_plus_vbuxx -txa +//FRAGMENT pbuz1=pbuz1_plus_vbuc1 +lda #{c1} clc adc {z1} sta {z1} bcc !+ inc {z1}+1 !: -//FRAGMENT vwsz1=vwsz1_rol_1 -asl {z1} -rol {z1}+1 -//FRAGMENT pbuc1_derefidx_vbuaa=vbuz1 -tay +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 +lda #{c2} +ldy {z2} +clc +adc {c1},y +sta {z1} +//FRAGMENT vbuz1=vbuz2_bxor_vbuc1 +lda #{c1} +eor {z2} +sta {z1} +//FRAGMENT vbuz1_ge_vbuc1_then_la1 lda {z1} -sta {c1},y +cmp #{c1} +bcs {la1} //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 pbuc1_derefidx_vbuyy=vbuaa -sta {c1},y -//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 -lda #<{c1} -clc -adc {z2} -sta {z1} -lda #>{c1} -adc {z2}+1 -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 vduz1=vduz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -lda {z2}+2 -sta {z1}+2 -lda {z2}+3 -sta {z1}+3 -//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 vduz1=vduc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -lda #<{c1}>>$10 -sta {z1}+2 -lda #>{c1}>>$10 -sta {z1}+3 -//FRAGMENT vwuz1_neq_0_then_la1 -lda {z1} -bne {la1} -lda {z1}+1 -bne {la1} -//FRAGMENT vbuz1=vwuz2_band_vbuc1 -lda #{c1} -and {z2} -sta {z1} -//FRAGMENT vduz1=vduz1_plus_vduz2 -lda {z1} -clc -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 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 pbuz1=_inc_pbuz2 -lda {z2} -clc -adc #1 -sta {z1} -lda {z2}+1 -adc #0 -sta {z1}+1 -//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=vwuz1_band_vbuc1 -lda #{c1} -and {z1} -//FRAGMENT vbuxx=vwuz1_band_vbuc1 -lda #{c1} -and {z1} -tax -//FRAGMENT vbuyy=vwuz1_band_vbuc1 -lda #{c1} -and {z1} -tay -//FRAGMENT vbuxx=vbuxx_bxor_vbuc1 -txa -eor #{c1} -tax -//FRAGMENT vbuyy=vbuyy_bxor_vbuc1 -tya -eor #{c1} -tay -//FRAGMENT vbuaa=_byte_vwuz1 -lda {z1} -//FRAGMENT vbuxx=_byte_vwuz1 -lda {z1} -tax -//FRAGMENT vbuyy=_byte_vwuz1 -lda {z1} -tay -//FRAGMENT _deref_pbuz1=pbuc1_derefidx_vbuaa -tay -lda {c1},y -ldy #0 -sta ({z1}),y -//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 pbuz1_lt_vwuc1_then_la1 -lda {z1}+1 -cmp #>{c1} -bcc {la1} -bne !+ -lda {z1} -cmp #<{c1} -bcc {la1} -!: -//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 vbuz1=vbuz2_plus_vbuc1 -lax {z2} -axs #-[{c1}] -stx {z1} -//FRAGMENT vbuz1=vbuaa_plus_vbuc1 -clc -adc #{c1} -sta {z1} -//FRAGMENT vbuz1=vbuxx_plus_vbuc1 -txa -axs #-[{c1}] -stx {z1} -//FRAGMENT vbuz1=vbuyy_plus_vbuc1 -tya -clc -adc #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuc1 -clc -adc #{c1} -//FRAGMENT vbuaa=vbuxx_plus_vbuc1 -txa -clc -adc #{c1} -//FRAGMENT vbuaa=vbuyy_plus_vbuc1 -tya -clc -adc #{c1} -//FRAGMENT vbuxx=vbuz1_plus_vbuc1 -lax {z1} -axs #-[{c1}] -//FRAGMENT vbuxx=vbuaa_plus_vbuc1 -tax -axs #-[{c1}] -//FRAGMENT vbuxx=vbuyy_plus_vbuc1 -tya -tax -axs #-[{c1}] -//FRAGMENT vbuyy=vbuz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -tay -//FRAGMENT vbuyy=vbuxx_plus_vbuc1 -txa -clc -adc #{c1} -tay -//FRAGMENT _deref_pbuz1=_deref_pbuz2 -ldy #0 -lda ({z2}),y -ldy #0 -sta ({z1}),y -//FRAGMENT vbuz1=vbuz2_plus_vbuz2 -lda {z2} -asl -sta {z1} -//FRAGMENT vbuz1=vbuz2_plus_1 -ldy {z2} -iny -sty {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 vbuz1_lt_vbuz2_then_la1 -lda {z1} -cmp {z2} -bcc {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 vbuz1=vbuaa_plus_1 -clc -adc #1 -sta {z1} -//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 vbuz1=vbuxx_plus_1 -inx -stx {z1} -//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_lt_vbuz1_then_la1 -cpx {z1} -bcc {la1} -//FRAGMENT vbuxx=vbuz1_plus_1 -ldx {z1} -inx -//FRAGMENT vbuz1=vbuaa_plus_vbuz2 -clc -adc {z2} -sta {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuz1 -clc -adc {z1} -//FRAGMENT vbuxx=vbuaa_plus_vbuz1 -clc -adc {z1} -tax -//FRAGMENT vbuyy=vbuaa_plus_vbuz1 -clc -adc {z1} -tay -//FRAGMENT vbuz1=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -sta {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -//FRAGMENT vbuxx=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -tax -//FRAGMENT vbuyy=vbuaa_plus_vbuxx -stx $ff -clc -adc $ff -tay -//FRAGMENT vwuz1=vbuaa_rol_3 -sta {z1} -lda #0 -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 vbuz1=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -sta {z1} -//FRAGMENT vbuaa=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -//FRAGMENT vbuxx=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -tax -//FRAGMENT vbuyy=vbuaa_plus_vbuyy -sty $ff -clc -adc $ff -tay -//FRAGMENT vbuaa_lt_vbuz1_then_la1 -cmp {z1} -bcc {la1} -//FRAGMENT vbuz1_lt_vbuxx_then_la1 -cpx {z1} -beq !+ -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 pbuz1=pbuz2_plus_vwsz3 -lda {z2} -clc -adc {z3} -sta {z1} -lda {z2}+1 -adc {z3}+1 -sta {z1}+1 -//FRAGMENT pbuz1_neq_pbuz2_then_la1 -lda {z1}+1 -cmp {z2}+1 -bne {la1} -lda {z1} -cmp {z2} -bne {la1} -//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 -lda {z2} -clc -adc #<{c1} -sta {z1} -lda {z2}+1 -adc #>{c1} -sta {z1}+1 -//FRAGMENT vwsz1=vwsc1_plus_vwsz2 -lda {z2} -clc -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 -lda #<{c1} -clc -adc {z2} -sta {z1} -lda #>{c1} -adc {z2}+1 -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 +//FRAGMENT vbuz1_neq_vbuc1_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 vbuz1=_deref_pbuc1 -lda {c1} -sta {z1} -//FRAGMENT vbuaa=_deref_pbuc1 -lda {c1} -//FRAGMENT vbuxx=_deref_pbuc1 -ldx {c1} -//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 vbuyy=_deref_pbuc1 -ldy {c1} -//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 +//FRAGMENT pwuc1_derefidx_vbuz1=vbuc2 lda {z1} -asl -asl -asl -//FRAGMENT vbuaa=vbuaa_rol_3 -asl -asl -asl -//FRAGMENT vbuaa=vbuxx_rol_3 +ldx #{c2} +tay 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 +//FRAGMENT vbuz1_lt_vbuz2_then_la1 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 _deref_qbuc1=pbuz1 -lda {z1} -sta {c1} -lda {z1}+1 -sta {c1}+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 vwuz1=vwuz2_plus_vbuc1 -lda #{c1} -clc -adc {z2} -sta {z1} -lda #0 -adc {z2}+1 -sta {z1}+1 -//FRAGMENT vbuz1=vbuz2_minus__deref_pbuz3 -lda {z2} -sec -ldy #0 -sbc ({z3}),y -sta {z1} -//FRAGMENT vbsz1=_inc_vbsz1 -inc {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 pbuz1_derefidx_vbuz2=vbuc1 -lda #{c1} -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 vbuz1_eq_vbuc1_then_la1 -lda #{c1} -cmp {z1} -beq {la1} -//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 vbuxx_eq_vbuc1_then_la1 -cpx #{c1} -beq {la1} -//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 vbuyy_eq_vbuc1_then_la1 -cpy #{c1} -beq {la1} -//FRAGMENT vbuz1=vbuz2_bor_vbuyy -tya -ora {z2} -sta {z1} -//FRAGMENT vbuaa=vbuz1_bor_vbuyy -tya -ora {z1} -//FRAGMENT pbuz1_derefidx_vbuz2=vbuxx -ldy {z2} -txa -sta ({z1}),y -//FRAGMENT vbuxx=vbuz1_bor_vbuyy -tya -ora {z1} -tax -//FRAGMENT pbuz1_derefidx_vbuz2=vbuyy -tya -ldy {z2} -sta ({z1}),y -//FRAGMENT vbuyy=vbuz1_bor_vbuyy -tya -ora {z1} -tay -//FRAGMENT pbuz1_derefidx_vbuxx=vbuyy -stx $ff -tya -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 vwuz1=vwuz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -sta {z1} -bcc !+ -inc {z1}+1 -!: -//FRAGMENT vbuaa_eq_vbuc1_then_la1 -cmp #{c1} -beq {la1} -//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_vbuz2=pbuc1_derefidx_vbuz3 -ldy {z3} -lda {c1},y -ldy {z2} -sta ({z1}),y -//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_vbuz2=pbuc1_derefidx_vbuxx -lda {c1},x -ldy {z2} -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_vbuz2=pbuc1_derefidx_vbuyy -lda {c1},y -ldy {z2} -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 _deref_pbuc1_neq_vbuc2_then_la1 -lda #{c2} -cmp {c1} -bne {la1} -//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 vbuz1=vbuz2_bxor_vbuc1 -lda #{c1} -eor {z2} -sta {z1} -//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 vbuaa=vbuz1_bxor_vbuc1 -lda #{c1} -eor {z1} -//FRAGMENT vbuxx=vbuz1_bxor_vbuc1 -lda #{c1} -eor {z1} -tax -//FRAGMENT vbuyy=vbuz1_bxor_vbuc1 -lda #{c1} -eor {z1} -tay -//FRAGMENT vbuz1=vbuaa_bxor_vbuc1 -eor #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuaa_bxor_vbuc1 -eor #{c1} -//FRAGMENT vbuxx=vbuaa_bxor_vbuc1 -eor #{c1} -tax -//FRAGMENT vbuyy=vbuaa_bxor_vbuc1 -eor #{c1} -tay -//FRAGMENT vbuz1=vbuxx_bxor_vbuc1 -txa -eor #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuxx_bxor_vbuc1 -txa -eor #{c1} -//FRAGMENT vbuyy=vbuxx_bxor_vbuc1 -txa -eor #{c1} -tay -//FRAGMENT vbuz1=vbuyy_bxor_vbuc1 -tya -eor #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuyy_bxor_vbuc1 -tya -eor #{c1} -//FRAGMENT vbuxx=vbuyy_bxor_vbuc1 -tya -eor #{c1} -tax -//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuaa -and {c1} -sta {c1} -//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 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 pbuz1=pbuz2_plus_vbuc1 -lda #{c1} -clc -adc {z2} -sta {z1} -lda #0 -adc {z2}+1 -sta {z1}+1 -//FRAGMENT _deref_pwuz1_le_vwuz2_then_la1 -ldy #1 -lda ({z1}),y -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} +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_pwuc2_derefidx_vbuz1 +ldy {z1} 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} +lda {c1},y +adc {c2},y +sta {c1},y +lda {c1}+1,y +adc {c2}+1,y +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_vbuc2 +ldy {z1} clc -adc {z2} -sta {z1} -lda #0 -adc {z2}+1 -sta {z1}+1 -//FRAGMENT pbuz1=pbuz2_plus_1 -lda {z2} -clc -adc #1 -sta {z1} -lda {z2}+1 +lda {c1},y +adc #{c2} +sta {c1},y +lda {c1}+1,y 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} +sta {c1}+1,y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_ror_8 +ldy {z2} 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} +lda {c1}+1,y sta {z1} +//FRAGMENT vwuz1_ge_vbuc1_then_la1 lda {z1}+1 -sbc #>{c1} -sta {z1}+1 -//FRAGMENT vduz1=vduz1_minus_vduc1 +bne {la1} 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 +cmp #{c1} +bcs {la1} !: -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 +//FRAGMENT pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_bxor_vwuc2 ldy {z1} +lda {c1},y +eor #<{c2} 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 +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT vbuz1=vbuz2_plus_vbuc1 +lax {z2} +axs #-[{c1}] stx {z1} -//FRAGMENT vbuaa=vbuz1_minus_1 +//FRAGMENT vwuz1_lt_vbuz2_then_la1 +lda {z1}+1 +bne !+ 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 +cmp {z2} +bcc {la1} +!: +//FRAGMENT vwuz1_ge_vbuz2_then_la1 +lda {z1}+1 +bne {la1} lda {z1} -tay -dey -//FRAGMENT vbuz1=vbuaa_minus_1 +cmp {z2} +bcs {la1} +!: +//FRAGMENT vbuz1=vbuz2_minus_2 +lda {z2} sec -sbc #1 +sbc #2 sta {z1} -//FRAGMENT vbuaa=vbuaa_minus_1 -sec -sbc #1 -//FRAGMENT vbuxx=vbuaa_minus_1 -tax -dex -//FRAGMENT pbuc1_derefidx_vbuaa=vbuxx -tay -txa +//FRAGMENT vwuz1=_word_vbuz2 +lda {z2} +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz2_rol_8 +lda {z2} +sta {z1}+1 +lda #0 +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuz1=vwuz2 +ldy {z1} +lda {z2} sta {c1},y -//FRAGMENT vbuyy=vbuaa_plus_vbuc1 -clc -adc #{c1} -tay -//FRAGMENT pbuc1_derefidx_vbuaa=vbuyy -tax -tya -sta {c1},x -//FRAGMENT vbuz1=_lo_pbuz2 -lda {z2} -sta {z1} -//FRAGMENT vbuz1=_hi_pbuz2 lda {z2}+1 +sta {c1}+1,y +//FRAGMENT vbuz1=vbuz2_rol_2 +lda {z2} +asl +asl sta {z1} -//FRAGMENT pbuz1=pbuz1_plus_vwuc1 -clc -lda {z1} -adc #<{c1} -sta {z1} -lda {z1}+1 -adc #>{c1} -sta {z1}+1 -//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 vbuz1_ge_vbuz2_then_la1 -lda {z1} -cmp {z2} -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 vbuxx_ge_vbuz1_then_la1 -cpx {z1} -bcs {la1} -//FRAGMENT vbuz1_ge_vbuaa_then_la1 +//FRAGMENT pbuc1_derefidx_vbuz1=_byte_vwuz2 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 vbuz1_ge_vbuxx_then_la1 -lda {z1} -stx $ff -cmp $ff -bcs {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 pvoz1=pvoc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {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 !+ +sta {c1},y +//FRAGMENT vwuz1=vwuz2 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_le_0_then_la1 -lda {z1} -bne !+ -lda {z1}+1 -beq {la1} -!: -//FRAGMENT pbuz1=pbuz2_plus_vwuz3 -lda {z2} -clc -adc {z3} sta {z1} lda {z2}+1 -adc {z3}+1 sta {z1}+1 //FRAGMENT vwuz1=vwuz2_band_vwuc1 lda {z2} @@ -6621,1479 +627,30 @@ 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=pbuz2_plus_vwuz1 -lda {z1} -clc -adc {z2} -sta {z1} -lda {z1}+1 -adc {z2}+1 -sta {z1}+1 -//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 pvoz1=pvoz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//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 +//FRAGMENT vbuz1=vwuz2_band_vbuc1 lda #{c1} -cpy #0 -beq !e+ -!: -asl -dey -bne !- -!e: +and {z2} 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 +//FRAGMENT pwuc1_derefidx_vbuz1=vbuz2 +lda {z1} 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 pbuz1=pbuz2_plus_vwuc1 +tay +txa +sta {c1},y +//FRAGMENT pbuz1=pbuz2 lda {z2} -clc -adc #<{c1} sta {z1} lda {z2}+1 -adc #>{c1} sta {z1}+1 -//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=vwuz2_rol_6 -lda {z2}+1 -lsr -sta $ff -lda {z2} -ror -sta {z1}+1 -lda #0 -ror -sta {z1} -lsr $ff -ror {z1}+1 -ror {z1} -//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 pbuc1_derefidx_vbuaa=_byte_vwuz1 -tay -lda {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=_byte_vwuz1 -lda {z1} -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=_byte_vwuz1 -lda {z1} -sta {c1},y -//FRAGMENT pwuz1_derefidx_vbuc1=pwuz1_derefidx_vbuc1_plus_pwuc2_derefidx_vbuaa -ldy #{c1} -tax -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 vbuaa_ge_vbuz1_then_la1 -cmp {z1} -bcs {la1} -//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_vbuz1_then_la1 -cpy {z1} -bcs {la1} -//FRAGMENT vbuyy_ge_vbuxx_then_la1 -stx $ff -cpy $ff -bcs {la1} -//FRAGMENT vbuz1_ge_vbuyy_then_la1 -lda {z1} -sty $ff -cmp $ff -bcs {la1} -//FRAGMENT vbuxx_ge_vbuyy_then_la1 -sty $ff -cpx $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=vwuz1_rol_6 -lda {z1}+1 -lsr -sta $ff -lda {z1} -ror -sta {z1}+1 -lda #0 -ror -sta {z1} -lsr $ff -ror {z1}+1 -ror {z1} -//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 !+ +//FRAGMENT vwuz1_lt_vbuc1_then_la1 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 vwuz1=vwuz2_rol_1 -lda {z2} -asl -sta {z1} -lda {z2}+1 -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=_sbyte_vwuz2 -lda {z2} -sta {z1} -//FRAGMENT vbsz1=vbsz2_minus_vbsz3 -lda {z2} -sec -sbc {z3} -sta {z1} -//FRAGMENT vbsc1_neq_vbsz1_then_la1 -lda #{c1} -cmp {z1} -bne {la1} -//FRAGMENT vbuz1=_byte_vduz2 -lda {z2} -sta {z1} -//FRAGMENT vduz1=pduc1_derefidx_vbuz2 -ldy {z2} -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_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 vbsaa=_sbyte_vwuz1 -lda {z1} -//FRAGMENT vbsxx=_sbyte_vwuz1 -ldx {z1} -//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 vbsc1_neq_vbsxx_then_la1 -cpx #{c1} -bne {la1} -//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_vbuxx -lda {c1},x -sta {z1} -lda {c1}+1,x -sta {z1}+1 -lda {c1}+2,x -sta {z1}+2 -lda {c1}+3,x -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 vbsaa=_inc_vbsaa -clc -adc #1 -//FRAGMENT vbsxx=_inc_vbsxx -inx -//FRAGMENT vbsyy=_sbyte_vwuz1 -ldy {z1} -//FRAGMENT vbsyy=_inc_vbsyy -iny -//FRAGMENT vbsxx=vbsc1 -ldx #{c1} -//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 @@ -8116,4174 +673,517 @@ 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 -cmp #>{c1} -bcc {la1} -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 +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_plus_vbuc2 lda #{c2} ldy {z1} -and {c1},y -//FRAGMENT vbuxx=pwuc1_derefidx_vbuz1_band_vbuc2 -lda #{c2} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_plus_vbuc2 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 +tax +axs #-[{c2}] +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_plus_vbuc2 +lda #{c2} ldy {z1} clc adc {c1},y tay -//FRAGMENT vbuz1=vbuz1_plus_pbuc1_derefidx_vbuaa +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_plus_vbuc2 tay -lda {c1},y +lda #{c2} clc -adc {z1} +adc {c1},y sta {z1} -//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuaa +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_plus_vbuc2 +tay +lda #{c2} +clc +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_plus_vbuc2 tax -tya +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=vbuz1_plus_pbuc1_derefidx_vbuxx -lda {c1},x +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} clc -adc {z1} +adc {c1},y sta {z1} -//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuxx -tya +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} clc -adc {c1},x -tay -//FRAGMENT vbuz1=vbuz1_plus_pbuc1_derefidx_vbuyy +adc {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_plus_vbuc2 lda {c1},y -clc -adc {z1} -sta {z1} -//FRAGMENT vbuyy=vbuyy_plus_pbuc1_derefidx_vbuyy -tya +tax +axs #-[{c2}] +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_plus_vbuc2 +lda #{c2} 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 +//FRAGMENT vbuz1=vbuaa_bxor_vbuc1 +eor #{c1} 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} +//FRAGMENT vbuz1=vbuxx_bxor_vbuc1 txa -clc -adc ({z2}),y +eor #{c1} 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 +//FRAGMENT vbuz1=vbuyy_bxor_vbuc1 tya -ldy #{c1} -clc -adc ({z2}),y +eor #{c1} 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 pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuaa -tay -lda {c2},y -ldy #{c1} -sta ({z1}),y -//FRAGMENT pbuz1_derefidx_vbuc1=pbuc2_derefidx_vbuyy -lda {c2},y -ldy #{c1} -sta ({z1}),y -//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 vbsyy=vbsc1 -ldy #{c1} -//FRAGMENT vwsz1=vwsz2_ror_7 -// ROL once instead of RORing 7 times -lda {z2} // {z2} low byte to tmp $ff -sta $ff -lda {z2}+1 // {z2} high byte to {z1} low byte -sta {z1} -lda #0 -bit {z2}+1 -bpl !+ // {z2} high byte positive? -lda #$ff -!: -sta {z1}+1 // sign extended {z2} into {z1} high byte -// ROL once -rol $ff -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 +//FRAGMENT vbuaa=vbuz1_bxor_vbuc1 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 +eor {z1} +//FRAGMENT vbuaa=vbuaa_bxor_vbuc1 +eor #{c1} +//FRAGMENT vbuaa=vbuxx_bxor_vbuc1 +txa +eor #{c1} +//FRAGMENT vbuaa=vbuyy_bxor_vbuc1 +tya +eor #{c1} +//FRAGMENT vbuxx=vbuz1_bxor_vbuc1 lda #{c1} -clc -adc {c2} -//FRAGMENT vbuxx=vbuc1_plus__deref_pbuc2 -lda {c2} +eor {z1} tax -axs #-[{c1}] -//FRAGMENT vbuyy=vbuc1_plus__deref_pbuc2 +//FRAGMENT vbuxx=vbuaa_bxor_vbuc1 +eor #{c1} +tax +//FRAGMENT vbuxx=vbuxx_bxor_vbuc1 +txa +eor #{c1} +tax +//FRAGMENT vbuxx=vbuyy_bxor_vbuc1 +tya +eor #{c1} +tax +//FRAGMENT vbuyy=vbuz1_bxor_vbuc1 lda #{c1} -clc -adc {c2} +eor {z1} tay -//FRAGMENT vbsxx=vbsxx_minus_vbsc1 -txa -axs #{c1} -//FRAGMENT vbsyy=vbsyy_minus_vbsc1 -tya -sec -sbc #{c1} +//FRAGMENT vbuyy=vbuaa_bxor_vbuc1 +eor #{c1} tay -//FRAGMENT vbsz1=vbsz2_plus_vbsaa -clc -adc {z2} -sta {z1} -//FRAGMENT vbsz1=vbsz2_plus_vbsxx +//FRAGMENT vbuyy=vbuxx_bxor_vbuc1 txa -clc -adc {z2} -sta {z1} -//FRAGMENT vbsz1=vbsz2_plus_vbsyy +eor #{c1} +tay +//FRAGMENT vbuyy=vbuyy_bxor_vbuc1 tya -clc -adc {z2} -sta {z1} -//FRAGMENT vbsaa=vbsz1_plus_vbsz2 +eor #{c1} +tay +//FRAGMENT vbuxx_ge_vbuc1_then_la1 +cpx #{c1} +bcs {la1} +//FRAGMENT vbuaa=_inc_vbuz1 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=_word__deref_pbuc1 -lda {c1} -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=vwuz2_plus_1 -lda {z2} -clc adc #1 -sta {z1} -lda {z2}+1 -adc #0 -sta {z1}+1 -//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 vwuz1=vwuz1_plus_1 -inc {z1} -bne !+ -inc {z1}+1 -!: -//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=_deref_pbuz2_band_vbuc1 -lda #{c1} -ldy #0 -and ({z2}),y -sta {z1} -//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 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 vwuz1=vwuz2_ror_6 -lda {z2} -asl -sta $ff -lda {z2}+1 -rol -sta {z1} -lda #0 -rol -sta {z1}+1 -asl $ff -rol {z1} -rol {z1}+1 -//FRAGMENT pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuz3) -ldx {z3} -ldy {c2},x -lda {c1},y -ldy {z2} -sta ({z1}),y -//FRAGMENT vbsz1=_dec_vbsz1 -dec {z1} -//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 -lda {z2} -clc -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 vbsxx=_dec_vbsxx -dex -//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=vwuz1_ror_6 -lda {z1} -asl -sta $ff -lda {z1}+1 -rol -sta {z1} -lda #0 -rol -sta {z1}+1 -asl $ff -rol {z1} -rol {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 +//FRAGMENT vbuxx_neq_vbuc1_then_la1 cpx #{c1} -bcc {la1} -//FRAGMENT vwuz1=vbuz2_rol_1 -lda {z2} +bne {la1} +//FRAGMENT vbuaa=vbuz1_rol_3 +lda {z1} asl -sta {z1} -lda #0 -rol -sta {z1}+1 -//FRAGMENT vwuz1=vbuxx_rol_1 +asl +asl +//FRAGMENT vbuxx=vbuz1_rol_3 +lda {z1} +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_3 +lda {z1} +asl +asl +asl +tay +//FRAGMENT vbuz1=vbuxx_rol_3 txa asl -sta {z1} -lda #0 -rol -sta {z1}+1 -//FRAGMENT vwuz1=vbuyy_rol_1 -tya +asl asl sta {z1} -lda #0 -rol -sta {z1}+1 -//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy -lda {c1},y -tay -//FRAGMENT vbsz1=vbsc1_minus_vbsz2 -lda #{c1} -sec -sbc {z2} -sta {z1} -//FRAGMENT vbsz1=vbsc1_minus_vbsaa -eor #$ff -sec -adc #{c1} -sta {z1} -//FRAGMENT vbsz1=vbsc1_minus_vbsxx +//FRAGMENT vbuaa=vbuxx_rol_3 txa -eor #$ff -sec -adc #{c1} -sta {z1} -//FRAGMENT vbsz1=vbsc1_minus_vbsyy -tya -eor #$ff -sec -adc #{c1} -sta {z1} -//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 +asl +asl +asl +//FRAGMENT vbuxx=vbuxx_rol_3 txa -eor #$ff -sec -adc #{c1} -//FRAGMENT vbsaa=vbsc1_minus_vbsyy -tya -eor #$ff -sec -adc #{c1} -//FRAGMENT vbsxx=vbsc1_minus_vbsz1 -lda #{c1} -sec -sbc {z1} +asl +asl +asl tax -//FRAGMENT vbsxx=vbsc1_minus_vbsaa -eor #$ff -tax -axs #-{c1}-1 -//FRAGMENT vbsxx=vbsc1_minus_vbsxx +//FRAGMENT vbuyy=vbuxx_rol_3 txa -eor #$ff -tax -axs #-{c1}-1 -//FRAGMENT vbsxx=vbsc1_minus_vbsyy +asl +asl +asl +tay +//FRAGMENT vbuz1=vbuyy_rol_3 tya -eor #$ff -tax -axs #-{c1}-1 -//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 vbsaa_ge_0_then_la1 -cmp #0 -bpl {la1} -//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} -ora #$7f -bmi !+ -lda #0 -!: -sta {z1}+1 -//FRAGMENT vbsaa_neq_0_then_la1 -cmp #0 -bne {la1} -//FRAGMENT vwsz1=vbsaa -sta {z1} -ora #$7f -bmi !+ -lda #0 -!: -sta {z1}+1 -//FRAGMENT vwsz1=vbsxx -txa -sta {z1} -ora #$7f -bmi !+ -lda #0 -!: -sta {z1}+1 -//FRAGMENT vwsz1=vbsyy -tya -sta {z1} -ora #$7f -bmi !+ -lda #0 -!: -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 -lda {z2} -clc -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 +asl 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 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -lda {z2}+2 -sta {z1}+2 -lda {z2}+3 -sta {z1}+3 -ldx {z3} -beq !e+ -!: -asl {z1} -rol {z1}+1 -rol {z1}+2 -rol {z1}+3 -dex -bne !- -!e: -//FRAGMENT vbuaa=_byte_vwsz1 -lda {z1} -//FRAGMENT vbuxx=_byte_vwsz1 -lda {z1} +//FRAGMENT vbuaa=vbuyy_rol_3 +tya +asl +asl +asl +//FRAGMENT vbuxx=vbuyy_rol_3 +tya +asl +asl +asl tax -//FRAGMENT vbuyy=_byte_vwsz1 -lda {z1} +//FRAGMENT vbuyy=vbuyy_rol_3 +tya +asl +asl +asl 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 vwsz1_neq_vwsc1_then_la1 -lda {z1}+1 -cmp #>{c1} -bne {la1} -lda {z1} -cmp #<{c1} -bne {la1} -//FRAGMENT pwuc1_derefidx_vbuz1=vbuz2 -lda {z1} -ldx {z2} +//FRAGMENT pwuc1_derefidx_vbuaa=vbuc2 +ldx #{c2} tay txa sta {c1},y -//FRAGMENT vbuz1=_deref_pbuc1_band_vbuc2 +//FRAGMENT pwuc1_derefidx_vbuxx=vbuc2 lda #{c2} -and {c1} -sta {z1} -//FRAGMENT _deref_pbuc1_lt_vbuz1_then_la1 -lda {c1} +sta {c1},x +lda #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vbuc2 +lda #{c2} +sta {c1},y +lda #0 +sta {c1}+1,y +//FRAGMENT vbuaa_lt_vbuz1_then_la1 cmp {z1} bcc {la1} -//FRAGMENT vbuz1_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 +//FRAGMENT vbuz1=vbuaa_rol_3 +asl +asl +asl sta {z1} -//FRAGMENT vbuz1=_hi_pwuc1_derefidx_vbuz2 -ldy {z2} +//FRAGMENT vbuaa=vbuaa_rol_3 +asl +asl +asl +//FRAGMENT vbuxx=vbuaa_rol_3 +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuaa_rol_3 +asl +asl +asl +tay +//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_plus_pwuc2_derefidx_vbuaa +tax +tay +clc +lda {c1},y +adc {c2},x +sta {c1},y +lda {c1}+1,y +adc {c2}+1,x +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuxx +txa +tay +txa +sty $ff +ldx $ff +tay +clc +lda {c1},y +adc {c2},x +sta {c1},y +lda {c1}+1,y +adc {c2}+1,x +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy +clc +lda {c1},y +adc {c2},y +sta {c1},y +lda {c1}+1,y +adc {c2}+1,y +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_plus_vbuc2 +clc +lda {c1},x +adc #{c2} +sta {c1},x +lda {c1}+1,x +adc #0 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_vbuc2 +clc +lda {c1},y +adc #{c2} +sta {c1},y +lda {c1}+1,y +adc #0 +sta {c1}+1,y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_ror_8 +txa +tay +lda #0 +sta {z1}+1 lda {c1}+1,y sta {z1} +//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_ror_8 +lda #0 +sta {z1}+1 +lda {c1}+1,y +sta {z1} +//FRAGMENT pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_bxor_vwuc2 +tay +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuxx=pwuc1_derefidx_vbuxx_bxor_vwuc2 +txa +tay +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_bxor_vwuc2 +lda {c1},y +eor #<{c2} +sta {c1},y +lda {c1}+1,y +eor #>{c2} +sta {c1}+1,y +//FRAGMENT vwuz1=pwuc1_derefidx_vbuaa_ror_8 +tay +lda #0 +sta {z1}+1 +lda {c1}+1,y +sta {z1} +//FRAGMENT vbuz1=vbuxx_plus_vbuc1 +txa +axs #-[{c1}] +stx {z1} +//FRAGMENT vbuz1=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +//FRAGMENT vbuaa=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +//FRAGMENT vbuaa=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +//FRAGMENT vbuxx=vbuz1_plus_vbuc1 +lax {z1} +axs #-[{c1}] +//FRAGMENT vbuxx=vbuxx_plus_vbuc1 +txa +axs #-[{c1}] +//FRAGMENT vbuxx=vbuyy_plus_vbuc1 +tya +tax +axs #-[{c1}] +//FRAGMENT vbuyy=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +tay +//FRAGMENT vbuyy=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +tay +//FRAGMENT vwuz1_lt_vbuxx_then_la1 +lda {z1}+1 +bne !+ +stx $ff +lda {z1} +cmp $ff +bcc {la1} +!: +//FRAGMENT vwuz1_lt_vbuyy_then_la1 +lda {z1}+1 +bne !+ +sty $ff +lda {z1} +cmp $ff +bcc {la1} +!: +//FRAGMENT vwuz1_ge_vbuxx_then_la1 +lda {z1}+1 +bne {la1} +stx $ff +lda {z1} +cmp $ff +bcs {la1} +!: +//FRAGMENT vwuz1_ge_vbuyy_then_la1 +lda {z1}+1 +bne {la1} +sty $ff +lda {z1} +cmp $ff +bcs {la1} +!: +//FRAGMENT vbuz1=vbuxx_minus_2 +dex +dex +stx {z1} +//FRAGMENT vwuz1=_word_vbuaa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_vbuxx +txa +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT vwuz1=_word_vbuyy +tya +sta {z1} +lda #0 +sta {z1}+1 +//FRAGMENT pwuc1_derefidx_vbuxx=vwuz1 +lda {z1} +sta {c1},x +lda {z1}+1 +sta {c1}+1,x +//FRAGMENT pwuc1_derefidx_vbuyy=vwuz1 +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT vbuaa=vbuz1_rol_2 +lda {z1} +asl +asl +//FRAGMENT vbuxx=vbuz1_rol_2 +lda {z1} +asl +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_2 +lda {z1} +asl +asl +tay +//FRAGMENT vbuz1=vbuxx_rol_2 +txa +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuxx_rol_2 +txa +asl +asl +//FRAGMENT vbuxx=vbuxx_rol_2 +txa +asl +asl +tax +//FRAGMENT vbuyy=vbuxx_rol_2 +txa +asl +asl +tay +//FRAGMENT vbuz1=vbuyy_rol_2 +tya +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuyy_rol_2 +tya +asl +asl +//FRAGMENT vbuxx=vbuyy_rol_2 +tya +asl +asl +tax +//FRAGMENT vbuyy=vbuyy_rol_2 +tya +asl +asl +tay +//FRAGMENT pbuc1_derefidx_vbuaa=_byte_vwuz1 +tay +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=_byte_vwuz1 +lda {z1} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=_byte_vwuz1 +lda {z1} +sta {c1},y +//FRAGMENT pwuc1_derefidx_vbuaa=vwuz1 +tay +lda {z1} +sta {c1},y +lda {z1}+1 +sta {c1}+1,y +//FRAGMENT vbuaa=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +//FRAGMENT vbuxx=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tax +//FRAGMENT vbuyy=vwuz1_band_vbuc1 +lda #{c1} +and {z1} +tay //FRAGMENT pwuc1_derefidx_vbuz1=vbuxx lda {z1} tay @@ -12340,2622 +1240,9 @@ 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 pssz1=pssc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT pssz1=pssz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -sta {z1} -bcc !+ -inc {z1}+1 -!: -//FRAGMENT pbuc1_derefidx_vbuaa=pbuz1_derefidx_vbuc2 -ldy #{c2} -tax -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 vwuz1=vwuz1_minus_vbuc1 -sec -lda {z1} -sbc #{c1} -sta {z1} -lda {z1}+1 -sbc #0 -sta {z1}+1 -//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_plus_vduz3 -lda {z2} -clc -adc {z3} -sta {z1} -lda {z2}+1 -adc {z3}+1 -sta {z1}+1 -lda {z2}+2 -adc {z3}+2 -sta {z1}+2 -lda {z2}+3 -adc {z3}+3 -sta {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 pbuz1=_deref_qbuc1 -lda {c1} -sta {z1} -lda {c1}+1 -sta {z1}+1 -//FRAGMENT vbsz1_gt_0_then_la1 -lda {z1} -cmp #0 -beq !+ -bpl {la1} -!: -//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 vbsaa_gt_0_then_la1 -cmp #0 -beq !+ -bpl {la1} -!: -//FRAGMENT vbsxx_gt_0_then_la1 -txa -cmp #0 -beq !+ -bpl {la1} -!: -//FRAGMENT vbsyy_gt_0_then_la1 -tya -cmp #0 -beq !+ -bpl {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 -lda {z2} -clc -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} -!e: -//FRAGMENT vwsz1_gt_vwsz2_then_la1 -lda {z2} -cmp {z1} -lda {z2}+1 -sbc {z1}+1 -bvc !+ -eor #$80 -!: -bmi {la1} -!e: -//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 +//FRAGMENT vbuxx_lt_vbuz1_then_la1 cpx {z1} -bne {la1} -//FRAGMENT vbsxx_neq_vbsz1_then_la1 -cpx {z1} -bne {la1} -//FRAGMENT pwuz1=pwuc1_plus_vwuz2 -lda {z2} -clc -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 _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 -tya -tay -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 vbuyy=vbuxx_bor_vbuyy -txa -sty $ff -ora $ff -tay -//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 _deref_pboc1=vboc2 -lda #{c2} -sta {c1} -//FRAGMENT _deref_pboc1_then_la1 -lda {c1} -cmp #0 -bne {la1} -//FRAGMENT _deref_pbuz1=_byte_vwuz2 -lda {z2} -ldy #0 -sta ({z1}),y -//FRAGMENT pssz1=pssc1_plus_vwuz2 -lda {z2} -clc -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 pbsc1_derefidx_vbuz1=vbsz2 -lda {z2} -ldy {z1} -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuaa=vbsz1 -tay -lda {z1} -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuxx=vbsz1 -lda {z1} -sta {c1},x -//FRAGMENT pbsc1_derefidx_vbuyy=vbsz1 -lda {z1} -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuz1=vbsxx -ldy {z1} -txa -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuaa=vbsxx -tay -txa -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuxx=vbsxx -txa -sta {c1},x -//FRAGMENT pbsc1_derefidx_vbuyy=vbsxx -txa -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuz1=vbsyy -tya -ldy {z1} -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuaa=vbsyy -tax -tya -sta {c1},x -//FRAGMENT pbsc1_derefidx_vbuxx=vbsyy -tya -sta {c1},x -//FRAGMENT pbsc1_derefidx_vbuyy=vbsyy -tya -sta {c1},y -//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 _deref_pwuc1=vbuc2 -lda #0 -sta {c1}+1 -lda #<{c2} -sta {c1} -//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=vbuz2_minus_2 -lda {z2} -sec -sbc #2 -sta {z1} //FRAGMENT vbuaa=vbuz1_minus_2 lda {z1} sec @@ -14964,2948 +1251,32 @@ sbc #2 ldx {z1} dex dex -//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 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 +//FRAGMENT vbuyy=vbuz1_minus_2 +ldy {z1} dey -tya -eor #$ff -sta {z1} -//FRAGMENT vbuaa=_neg_vbuyy dey -tya -eor #$ff -//FRAGMENT vbuxx=_neg_vbuyy -tya -eor #$ff -tax +//FRAGMENT vbuxx=_inc_vbuz1 +ldx {z1} 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 -lda {z2} -clc -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 -lda {z1} -clc -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} +//FRAGMENT vbuyy=_inc_vbuz1 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 +//FRAGMENT vwuz1=vwuz1_bxor_vwuz2 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 +eor {z2} sta {z1} lda {z1}+1 -sbc $ff +eor {z2}+1 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 +//FRAGMENT vwuz1=vwuz1_rol_8 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 +sta {z1} +//FRAGMENT vwuz1=vwuz1_band_vwuc1 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=_dec_vbsyy -dey -//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 vbuz1=_hi_pvoz2 -lda {z2}+1 -sta {z1} -//FRAGMENT vbuz1=_lo_pvoz2 -lda {z2} -sta {z1} -//FRAGMENT vbuaa=_hi_pvoz1 -lda {z1}+1 -//FRAGMENT vbuxx=_hi_pvoz1 -ldx {z1}+1 -//FRAGMENT vbuaa=_lo_pvoz1 -lda {z1} -//FRAGMENT vbuxx=_lo_pvoz1 -ldx {z1} -//FRAGMENT vbuyy=_hi_pvoz1 -ldy {z1}+1 -//FRAGMENT vbuyy=_lo_pvoz1 -ldy {z1} -//FRAGMENT vbsz1_eq_vbsc1_then_la1 -lda #{c1} -cmp {z1} -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 vwuz1=vwuz2_minus_vbuc1 -sec -lda {z2} -sbc #{c1} -sta {z1} -lda {z2}+1 -sbc #0 -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 +lda {z1}+1 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 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 _deref_(_deref_qbuc1)=vbuz1 -lda {z1} -ldy {c1} -sty $fe -ldy {c1}+1 -sty $ff -ldy #0 -sta ($fe),y -//FRAGMENT _deref_(_deref_qbuc1)=vbuaa -ldy {c1} -sty $fe -ldy {c1}+1 -sty $ff -ldy #0 -sta ($fe),y -//FRAGMENT _deref_(_deref_qbuc1)=vbuxx -txa -ldy {c1} -sty $fe -ldy {c1}+1 -sty $ff -ldy #0 -sta ($fe),y -//FRAGMENT _deref_(_deref_qbuc1)=vbuyy -tya -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 vbuxx=vbuxx_minus_1 -dex -//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 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_vbuaa_rol_4 -tay -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 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 pbsc1_derefidx_vbuz1=vbsaa -ldy {z1} -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 vbuz1=vbuz1_minus_1 -dec {z1} -//FRAGMENT vbuyy=vbuyy_minus_1 -tya -tay -dey -//FRAGMENT vwsz1=pwsc1_derefidx_vbuz2_plus__deref_pwsz3 -ldx {z2} -clc -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 -clc -ldy #0 -lda {c1},x -adc ({z1}),y -pha -iny -lda {c1}+1,x -adc ({z1}),y -sta {z1}+1 -pla -sta {z1} -//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 vbuz1=_byte_pwuc1_derefidx_vbuz2 -ldy {z2} -lda {c1},y -sta {z1} -//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 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 diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index b91bc35b6..5bb48956b 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -222,24 +222,24 @@ public class TestPrograms { compileAndCompare("minus-precedence-problem.c"); } - //@Test - //public void testNesBalls() throws IOException, URISyntaxException { - // compileAndCompare("complex/nes-balls/kickballs.c"); - //} + @Test + public void testNesBalls() throws IOException, URISyntaxException { + compileAndCompare("complex/nes-balls/kickballs-2.c"); + } @Test public void testNesDxycp() throws IOException, URISyntaxException { - compileAndCompare("examples/nes-dxycp/nes-dxycp.c"); + compileAndCompare("examples/nes/nes-dxycp.c"); } @Test public void testNesConio() throws IOException, URISyntaxException { - compileAndCompare("examples/nes-conio/nes-conio.c"); + compileAndCompare("examples/nes/nes-conio.c"); } @Test public void testNesDemo() throws IOException, URISyntaxException { - compileAndCompare("examples/nes-demo/nes-demo.c"); + compileAndCompare("examples/nes/nes-demo.c"); } //@Test diff --git a/src/test/ref/complex/nes-balls/kickballs-2.asm b/src/test/ref/complex/nes-balls/kickballs-2.asm new file mode 100644 index 000000000..1e75229cc --- /dev/null +++ b/src/test/ref/complex/nes-balls/kickballs-2.asm @@ -0,0 +1,689 @@ +//#pragma emulator("java -jar /Applications/Nintaco_bin_2020-05-01/Nintaco.jar") +// Nintendo Entertainment System (NES +// https://en.wikipedia.org/wiki/Nintendo_Entertainment_System_(Model_NES-101) +// https://github.com/gregkrsak/first_nes +// Ricoh 2C02 - NES Picture Processing Unit (PPU) +// Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), +// https://en.wikipedia.org/wiki/Picture_Processing_Unit +// https://wiki.nesdev.com/w/index.php/PPU_registers +// http://nesdev.com/2C02%20technical%20reference.TXT +// Based on: https://github.com/gregkrsak/first_nes written by Greg M. Krsak, 2018. + // Nintendo Entertainment System (NES) ROM (Mapper 0 NROM, Vertical Mirroring) +// https://sadistech.com/nesromtool/romdoc.html +// https://forums.nesdev.com/viewtopic.php?f=2&t=9896 +// https://github.com/gregkrsak/first_nes +.file [name="kickballs-2.nes", type="bin", segments="NesRom"] +.file [name="kickballs-2.nes_hdr", type="bin", segments="Header"] +.file [name="kickballs-2.nes_prg", type="bin", segments="ProgramRom"] +.file [name="kickballs-2.nes_chr", type="bin", segments="CharacterRom"] +.segmentdef Header [ start=$0000, min=$0000, max=$000f, fill ] +.segmentdef Tiles [ start=$0000, min=$0000, max=$1fff, fill ] +.segmentdef Code [ start=$c000, min=$c000, max=$fff9 ] +.segmentdef Data [ startAfter="Code", min=$c000, max=$fff9 ] +.segmentdef Vectors [ start=$fffa, min=$fffa, max=$ffff ] +.segmentdef GameRam [start=$200,max=$7ff, virtual] +.segmentdef ProgramRom [ segments="Code, Data, Vectors" ] +.segmentdef CharacterRom [ segments="Tiles" ] +.segmentdef NesRom +.segment NesRom +.segmentout [ segments="Header" ] +.segmentout [ segments="ProgramRom" ] +.segmentout [ segments="CharacterRom" ] +.segment Header +.text @"NES\$1a" +.byte $01 // 1x 16KB ROM (PRG) +.byte $01 // 1x 8KB VROM (CHR) +.byte %00000001 // Mapper nibble 0000 == No mapping (a simple 16KB PRG + 8KB CHR game) + // Mirroring nibble 0001 == Vertical mirroring only +.segment Code + + .const OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = $10 + .const OFFSET_STRUCT_RICOH_2C02_PPUMASK = 1 + .const OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = 2 + .const OFFSET_STRUCT_RICOH_2C02_OAMADDR = 3 + .const OFFSET_STRUCT_RICOH_2A03_OAMDMA = $14 + .const OFFSET_STRUCT_RICOH_2C02_PPUADDR = 6 + .const OFFSET_STRUCT_RICOH_2C02_PPUDATA = 7 + .const OFFSET_STRUCT_SPRITEDATA_TILE = 1 + .const OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = 2 + .const OFFSET_STRUCT_SPRITEDATA_X = 3 + .const OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = 5 + .const SIZEOF_BYTE = 1 + // $2000-$23bf $03c0 Name table 0 + .label PPU_NAME_TABLE_0 = $2000 + // $23c0-$23ff $0040 Attribute table 0 + .label PPU_ATTRIBUTE_TABLE_0 = $23c0 + // $3000-$3eff $0f00 Mirrors of $2000-$2eff + // $3f00-$3f1f $0020 Palette RAM indexes + .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // APU Frame Counter + // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. + // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter + // ------+-----+--------------------------------------------------------------- + // $4017 | W | FR_COUNTER Frame Counter Set mode and interrupt + // ------+-----+--------------------------------------------------------------- + // | 7 | Sequencer mode: 0 selects 4-step sequence, 1 selects 5-step sequence + // | 6 | Interrupt inhibit flag. If set, the frame interrupt flag is cleared, otherwise it is unaffected. + // ------+-----+--------------------------------------------------------------- + // Side effects After 3 or 4 CPU clock cycles*, the timer is reset. + // If the mode flag is set, then both "quarter frame" and "half frame" signals are also generated. + .label FR_COUNTER = $4017 + // Pointer to the start of RAM memory + .label MEMORY = 0 + // NES Picture Processing Unit (PPU) + .label PPU = $2000 + // NES CPU and audion processing unit (APU) + .label APU = $4000 + .label scroll_y = $a + .label vblank_hit = $b + // The random state variable + .label rand_state = 8 +.segment Code +__start: { + // scroll_y = 0 + lda #0 + sta.z scroll_y + // vblank_hit = 0 + sta.z vblank_hit + jsr main + rts +} +// NMI Called when the PPU refreshes the screen (also known as the V-Blank period) +vblank: { + pha + txa + pha + tya + pha + // PPU->PPUSCROLL = 0 + // Set scroll + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + // PPU->PPUSCROLL = scroll_y + lda.z scroll_y + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + // PPU->OAMADDR = 0 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_OAMADDR + // APU->OAMDMA = >spriteBuffer + lda #>SPRITE_BUFFER + sta APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA + // vblank_hit++; + inc.z vblank_hit + // } + pla + tay + pla + tax + pla + rti +} +main: { + .label __9 = $1a + .label __10 = $1a + .label __11 = $1a + .label __20 = $d + .label __23 = $f + .label __25 = $11 + .label __26 = $13 + .label __31 = $14 + .label __32 = $16 + .label __33 = $18 + .label __56 = $14 + .label i = 2 + .label timer_2 = 3 + .label h_bar = $c + .label active_balls = 4 + .label sprite_idx = 7 + .label i_1 = 6 + .label timer = 5 + // asm + cld + ldx #$ff + txs + // PPU->PPUCTRL = 0 + lda #0 + sta PPU + // PPU->PPUMASK = 0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + // *FR_COUNTER = 0b01000000 + lda #$40 + sta FR_COUNTER + // APU->DMC_FREQ = 0b01000000 + sta APU+OFFSET_STRUCT_RICOH_2A03_DMC_FREQ + // asm + lda PPU_PPUSTATUS + initNES1_waitForVBlank1: + // PPU->PPUSTATUS&0x80 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + // while(!(PPU->PPUSTATUS&0x80)) + cmp #0 + beq initNES1_waitForVBlank1 + ldx #0 + initNES1___b1: + // (MEMORY+0x000)[i] = 0 + lda #0 + sta MEMORY,x + // (MEMORY+0x100)[i] = 0 + sta MEMORY+$100,x + // (MEMORY+0x200)[i] = 0 + sta MEMORY+$200,x + // (MEMORY+0x300)[i] = 0 + sta MEMORY+$300,x + // (MEMORY+0x400)[i] = 0 + sta MEMORY+$400,x + // (MEMORY+0x500)[i] = 0 + sta MEMORY+$500,x + // (MEMORY+0x600)[i] = 0 + sta MEMORY+$600,x + // (MEMORY+0x700)[i] = 0 + sta MEMORY+$700,x + // while (++i) + inx + cpx #0 + bne initNES1___b1 + initNES1_waitForVBlank2: + // PPU->PPUSTATUS&0x80 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + // while(!(PPU->PPUSTATUS&0x80)) + cmp #0 + beq initNES1_waitForVBlank2 + // asm + lda PPU_PPUSTATUS + // ppuDataTransfer(PPU_PALETTE, palette, sizeof(palette)) + // Transfer the palette + lda #palette + sta.z ppuDataTransfer.cpuData+1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + // ppuDataFill(PPU_NAME_TABLE_0, 0, 32*30) + // Fill the PPU attribute table + lda #<$20*$1e + sta.z ppuDataFill.size + lda #>$20*$1e + sta.z ppuDataFill.size+1 + lda #PPU_NAME_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // ppuDataFill(PPU_ATTRIBUTE_TABLE_0, 0, 0x40) + lda #<$40 + sta.z ppuDataFill.size + lda #>$40 + sta.z ppuDataFill.size+1 + lda #PPU_ATTRIBUTE_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // ppuDataTransfer(0x2040, h_bar_tilemap, sizeof(h_bar_tilemap)) + lda #h_bar_tilemap + sta.z ppuDataTransfer.cpuData+1 + lda #<$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData + lda #>$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + // PPU->PPUCTRL = 0b10000000 + lda #$80 + sta PPU + // PPU->PPUMASK = 0b00011110 + lda #$1e + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + // PPU->PPUCTRL = 0b10001000 + // Enable vertical blank interrupt, select sprite pattern table 1 + lda #$88 + sta PPU + lda #<1 + sta.z rand_state + lda #>1 + sta.z rand_state+1 + sta.z i + __b1: + // for (i = 0; i < MAX_BALLS; i++) + lda.z i + cmp #$20 + bcs !__b2+ + jmp __b2 + !__b2: + lda #0 + sta.z timer + sta.z active_balls + sta.z timer_2 + __b4: + // timer_2++; + inc.z timer_2 + // h_bar = sine_table[timer_2] + 0x60 + lda #$60 + ldy.z timer_2 + clc + adc sine_table,y + sta.z h_bar + // h_bar ^ 0xFF + lda #$ff + eor.z h_bar + // scroll_y = h_bar ^ 0xFF + sta.z scroll_y + // if (active_balls < MAX_BALLS) + lda.z active_balls + cmp #$20 + bcs __b5 + // if (timer++ == RELEASE_TIMER) + ldx.z timer + inx + lda #9 + cmp.z timer + beq !__b25+ + jmp __b25 + !__b25: + // active_balls++; + inc.z active_balls + // balls[active_balls].x_position = 0 + lda.z active_balls + asl + asl + asl + tax + lda #0 + sta balls,x + sta balls+1,x + // balls[active_balls].y_position = 0 + sta balls+2,x + sta balls+2+1,x + sta.z timer + __b5: + lda #0 + sta.z sprite_idx + sta.z i_1 + __b6: + // for (i = 0; i < active_balls; i++) + lda.z i_1 + cmp.z active_balls + bcc __b7 + // poke(0x2001) = 0x98 + lda #$98 + sta $2001 + __b13: + // while (!vblank_hit) + lda #0 + cmp.z vblank_hit + beq __b13 + // vblank_hit = 0 + // wait for vblank + sta.z vblank_hit + // poke(0x2001) = 0x18 + lda #$18 + sta $2001 + jmp __b4 + __b7: + // balls[i].x_position += balls[i].x_velocity + lda.z i_1 + asl + asl + asl + tay + clc + lda balls,y + adc balls+4,y + sta balls,y + lda balls+1,y + adc balls+4+1,y + sta balls+1,y + // balls[i].y_velocity += WEIGHT + clc + lda balls+6,y + adc #$10 + sta balls+6,y + lda balls+6+1,y + adc #0 + sta balls+6+1,y + // balls[i].y_position += (balls[i].y_velocity += WEIGHT) + clc + lda balls+2,y + adc balls+6,y + sta balls+2,y + lda balls+2+1,y + adc balls+6+1,y + sta balls+2+1,y + // balls[i].x_position >> 8 + lda #0 + sta.z __20+1 + lda balls+1,y + sta.z __20 + // if ((balls[i].x_position >> 8) < 8) + lda.z __20+1 + bne __b9 + lda.z __20 + cmp #8 + bcs __b9 + !: + // balls[i].x_velocity ^= 0xFFFF + lda.z i_1 + asl + asl + asl + tay + lda balls+4,y + eor #<$ffff + sta balls+4,y + lda balls+4+1,y + eor #>$ffff + sta balls+4+1,y + __b9: + // balls[i].y_position >> 8 + lda.z i_1 + asl + asl + asl + tay + lda #0 + sta.z __23+1 + lda balls+2+1,y + sta.z __23 + lda #0 + sta.z __25+1 + lda balls+2+1,y + sta.z __25 + // h_bar + 8 + lax.z h_bar + axs #-[8] + stx.z __26 + // if (((balls[i].y_position >> 8) >= h_bar) && (balls[i].y_position >> 8) < h_bar + 8) + lda.z __23+1 + bne !+ + lda.z __23 + cmp.z h_bar + bcc __b10 + !: + lda.z __25+1 + bne __b10 + lda.z __25 + cmp.z __26 + bcs __b10 + !: + // balls[i].y_velocity ^= 0xFFFF + lda.z i_1 + asl + asl + asl + tay + lda balls+6,y + eor #<$ffff + sta balls+6,y + lda balls+6+1,y + eor #>$ffff + sta balls+6+1,y + // h_bar - 2 + lda.z h_bar + sec + sbc #2 + // (unsigned short)(h_bar - 2) << 8 + sta.z __56 + lda #0 + sta.z __56+1 + lda.z __31 + sta.z __31+1 + lda #0 + sta.z __31 + // balls[i].y_position = ((unsigned short)(h_bar - 2) << 8) + sta balls+2,y + lda.z __31+1 + sta balls+2+1,y + __b10: + // balls[i].y_position >> 8 + lda.z i_1 + asl + asl + asl + tay + lda #0 + sta.z __32+1 + lda balls+2+1,y + sta.z __32 + // SPRITE_BUFFER[sprite_idx].y = (unsigned char) (balls[i].y_position >> 8) + lda.z sprite_idx + asl + asl + tax + lda.z __32 + sta SPRITE_BUFFER,x + // SPRITE_BUFFER[sprite_idx].tile = 0x0a + lda #$a + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_TILE,x + // SPRITE_BUFFER[sprite_idx].attributes = 3 + lda #3 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES,x + // balls[i].x_position >> 8 + lda #0 + sta.z __33+1 + lda balls+1,y + sta.z __33 + // SPRITE_BUFFER[sprite_idx].x = (unsigned char) (balls[i].x_position >> 8) + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_X,x + // sprite_idx++; + inc.z sprite_idx + // for (i = 0; i < active_balls; i++) + inc.z i_1 + jmp __b6 + __b25: + stx.z timer + jmp __b5 + __b2: + // rand() + jsr rand + // rand() + // rand() & 0x3FF + lda.z __10 + and #<$3ff + sta.z __10 + lda.z __10+1 + and #>$3ff + sta.z __10+1 + // balls[i].x_velocity = rand() & 0x3FF + lda.z i + asl + asl + asl + tay + lda.z __10 + sta balls+4,y + lda.z __10+1 + sta balls+4+1,y + // rand() + jsr rand + // rand() + // rand() & 0x0FF + lda #$ff + and.z __11 + tax + // balls[i].y_velocity = rand() & 0x0FF + lda.z i + asl + asl + asl + tay + txa + sta balls+6,y + // for (i = 0; i < MAX_BALLS; i++) + inc.z i + jmp __b1 +} +// Transfer a number of bytes from the CPU memory to the PPU memory +// - ppuData : Pointer in the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp($f) cpuData) +ppuDataTransfer: { + .label ppuDataPrepare1_ppuData = $d + .label cpuSrc = $f + .label i = $11 + .label cpuData = $f + // >ppuData + lda.z ppuDataPrepare1_ppuData+1 + // PPU->PPUADDR = >ppuData + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // PPUADDR = $20*SIZEOF_BYTE + bcc __b2 + bne !+ + lda.z i + cmp #<$20*SIZEOF_BYTE + bcc __b2 + !: + // } + rts + __b2: + // ppuDataPut(*cpuSrc++) + ldy #0 + lda (cpuSrc),y + // PPU->PPUDATA = val + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataPut(*cpuSrc++); + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // for(unsigned int i=0;ippuData + lda.z ppuDataPrepare1_ppuData+1 + // PPU->PPUADDR = >ppuData + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // PPUADDR = PPUDATA = val + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // for(unsigned int i=0;i> 9 + lsr + sta.z __1 + lda #0 + sta.z __1+1 + // rand_state ^= rand_state >> 9 + lda.z rand_state + eor.z __1 + sta.z rand_state + lda.z rand_state+1 + eor.z __1+1 + sta.z rand_state+1 + // rand_state << 8 + lda.z rand_state + sta.z __2+1 + lda #0 + sta.z __2 + // rand_state ^= rand_state << 8 + lda.z rand_state + eor.z __2 + sta.z rand_state + lda.z rand_state+1 + eor.z __2+1 + sta.z rand_state+1 + // return rand_state; + lda.z rand_state + sta.z return + lda.z rand_state+1 + sta.z return+1 + // } + rts +} +.segment GameRam + // Moving balls (in GameRAM) + balls: .fill 8*$40, 0 +.segment Data + sine_table: .byte $40, $42, $43, $45, $46, $48, $49, $4b, $4c, $4e, $50, $51, $53, $54, $56, $57, $58, $5a, $5b, $5d, $5e, $60, $61, $62, $64, $65, $66, $67, $69, $6a, $6b, $6c, $6d, $6e, $6f, $70, $71, $72, $73, $74, $75, $76, $77, $78, $78, $79, $7a, $7b, $7b, $7c, $7c, $7d, $7d, $7e, $7e, $7e, $7f, $7f, $7f, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $7f, $7f, $7f, $7e, $7e, $7e, $7d, $7d, $7c, $7c, $7b, $7b, $7a, $79, $78, $78, $77, $76, $75, $74, $73, $72, $71, $70, $6f, $6e, $6d, $6c, $6b, $6a, $69, $67, $66, $65, $64, $62, $61, $60, $5e, $5d, $5b, $5a, $58, $57, $56, $54, $53, $51, $50, $4e, $4c, $4b, $49, $48, $46, $45, $43, $42, $40, $3e, $3d, $3b, $3a, $38, $37, $35, $34, $32, $30, $2f, $2d, $2c, $2a, $29, $28, $26, $25, $23, $22, $20, $1f, $1e, $1c, $1b, $1a, $19, $17, $16, $15, $14, $13, $12, $11, $10, $f, $e, $d, $c, $b, $a, 9, 8, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, $a, $b, $c, $d, $e, $f, $10, $11, $12, $13, $14, $15, $16, $17, $19, $1a, $1b, $1c, $1e, $1f, $20, $22, $23, $25, $26, $28, $29, $2a, $2c, $2d, $2f, $30, $32, $34, $35, $37, $38, $3a, $3b, $3d, $3e + palette: .byte $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4 + h_bar_tilemap: .byte 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +.segment Tiles +TILES: +.import binary "lazydata.chr" + +.segment GameRam + .align $100 + SPRITE_BUFFER: .fill 4*$100, 0 +.segment Vectors + VECTORS: .word vblank, main, 0 diff --git a/src/test/ref/complex/nes-balls/kickballs-2.cfg b/src/test/ref/complex/nes-balls/kickballs-2.cfg new file mode 100644 index 000000000..5bcd3f3e3 --- /dev/null +++ b/src/test/ref/complex/nes-balls/kickballs-2.cfg @@ -0,0 +1,288 @@ + +(void()) __start() +__start: scope:[__start] from + [0] phi() + to:__start::__init1 +__start::__init1: scope:[__start] from __start + [1] (volatile byte) scroll_y ← (byte) 0 + [2] (volatile byte) vblank_hit ← (byte) 0 + to:__start::@1 +__start::@1: scope:[__start] from __start::__init1 + [3] phi() + [4] call main + to:__start::@return +__start::@return: scope:[__start] from __start::@1 + [5] return + to:@return + +interrupt(HARDWARE_STACK)(void()) vblank() +vblank: scope:[vblank] from + [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 + [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y + to:vblank::ppuSpriteBufferDmaTransfer1 +vblank::ppuSpriteBufferDmaTransfer1: scope:[vblank] from vblank + [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 + [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER + to:vblank::@1 +vblank::@1: scope:[vblank] from vblank::ppuSpriteBufferDmaTransfer1 + [10] (volatile byte) vblank_hit ← ++ (volatile byte) vblank_hit + to:vblank::@return +vblank::@return: scope:[vblank] from vblank::@1 + [11] return + to:@return + +(signed word()) main() +main: scope:[main] from __start::@1 + [12] phi() + to:main::initNES1 +main::initNES1: scope:[main] from main + asm { cld ldx#$ff txs } + to:main::initNES1_disableVideoOutput1 +main::initNES1_disableVideoOutput1: scope:[main] from main::initNES1 + [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 + [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 + to:main::initNES1_disableAudioOutput1 +main::initNES1_disableAudioOutput1: scope:[main] from main::initNES1_disableVideoOutput1 + [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 + [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 + to:main::initNES1_clearVBlankFlag1 +main::initNES1_clearVBlankFlag1: scope:[main] from main::initNES1_disableAudioOutput1 + asm { ldaPPU_PPUSTATUS } + to:main::initNES1_waitForVBlank1 +main::initNES1_waitForVBlank1: scope:[main] from main::initNES1_clearVBlankFlag1 + [19] phi() + to:main::initNES1_waitForVBlank1_@1 +main::initNES1_waitForVBlank1_@1: scope:[main] from main::initNES1_waitForVBlank1 main::initNES1_waitForVBlank1_@1 + [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 + [21] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 + to:main::initNES1_@1 +main::initNES1_@1: scope:[main] from main::initNES1_@1 main::initNES1_waitForVBlank1_@1 + [22] (byte) main::initNES1_i#2 ← phi( main::initNES1_@1/(byte) main::initNES1_i#1 main::initNES1_waitForVBlank1_@1/(byte) 0 ) + [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 + [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 + [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 + [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 + [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 + [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 + [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 + [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 + [31] (byte) main::initNES1_i#1 ← ++ (byte) main::initNES1_i#2 + [32] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 + to:main::initNES1_waitForVBlank2 +main::initNES1_waitForVBlank2: scope:[main] from main::initNES1_@1 + [33] phi() + to:main::initNES1_waitForVBlank2_@1 +main::initNES1_waitForVBlank2_@1: scope:[main] from main::initNES1_waitForVBlank2 main::initNES1_waitForVBlank2_@1 + [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 + [35] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 + to:main::initNES1_@7 +main::initNES1_@7: scope:[main] from main::initNES1_waitForVBlank2_@1 + asm { ldaPPU_PPUSTATUS } + to:main::@17 +main::@17: scope:[main] from main::initNES1_@7 + [37] phi() + [38] call ppuDataTransfer + to:main::@19 +main::@19: scope:[main] from main::@17 + [39] phi() + [40] call ppuDataFill + to:main::@20 +main::@20: scope:[main] from main::@19 + [41] phi() + [42] call ppuDataFill + to:main::@21 +main::@21: scope:[main] from main::@20 + [43] phi() + [44] call ppuDataTransfer + to:main::enableVideoOutput1 +main::enableVideoOutput1: scope:[main] from main::@21 + [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 + [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e + to:main::@18 +main::@18: scope:[main] from main::enableVideoOutput1 + [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 + to:main::@1 +main::@1: scope:[main] from main::@18 main::@23 + [48] (word) rand_state#17 ← phi( main::@18/(word) 1 main::@23/(word) rand_state#11 ) + [48] (byte) main::i#14 ← phi( main::@18/(byte) 0 main::@23/(byte) main::i#2 ) + [49] if((byte) main::i#14<(byte) $20) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@1 main::@14 + [50] (byte) main::timer#3 ← phi( main::@1/(byte) 0 main::@14/(byte) main::timer#15 ) + [50] (byte) main::active_balls#2 ← phi( main::@1/(byte) 0 main::@14/(byte) main::active_balls#8 ) + [50] (byte) main::timer_2#2 ← phi( main::@1/(byte) 0 main::@14/(byte) main::timer_2#1 ) + to:main::@4 +main::@4: scope:[main] from main::@3 + [51] (byte) main::timer_2#1 ← ++ (byte) main::timer_2#2 + [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 + [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff + [54] (volatile byte) scroll_y ← (byte~) main::$14 + [55] if((byte) main::active_balls#2>=(byte) $20) goto main::@5 + to:main::@15 +main::@15: scope:[main] from main::@4 + [56] (byte) main::timer#1 ← ++ (byte) main::timer#3 + [57] if((byte) main::timer#3!=(byte) 9) goto main::@25 + to:main::@16 +main::@16: scope:[main] from main::@15 + [58] (byte) main::active_balls#1 ← ++ (byte) main::active_balls#2 + [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 + [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 + [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@16 main::@25 main::@4 + [62] (byte) main::timer#15 ← phi( main::@25/(byte) main::timer#21 main::@16/(byte) 0 main::@4/(byte) main::timer#3 ) + [62] (byte) main::active_balls#8 ← phi( main::@25/(byte) main::active_balls#2 main::@16/(byte) main::active_balls#1 main::@4/(byte) main::active_balls#2 ) + to:main::@6 +main::@6: scope:[main] from main::@10 main::@5 + [63] (byte) main::sprite_idx#3 ← phi( main::@10/(byte) main::sprite_idx#2 main::@5/(byte) 0 ) + [63] (byte) main::i#10 ← phi( main::@10/(byte) main::i#4 main::@5/(byte) 0 ) + [64] if((byte) main::i#10<(byte) main::active_balls#8) goto main::@7 + to:main::@8 +main::@8: scope:[main] from main::@6 + [65] *((byte*) 8193) ← (byte) $98 + to:main::@13 +main::@13: scope:[main] from main::@13 main::@8 + [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 + to:main::@14 +main::@14: scope:[main] from main::@13 + [67] (volatile byte) vblank_hit ← (byte) 0 + [68] *((byte*) 8193) ← (byte) $18 + to:main::@3 +main::@7: scope:[main] from main::@6 + [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 + [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) + [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 + [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 + [74] if((word~) main::$20>=(byte) 8) goto main::@9 + to:main::@11 +main::@11: scope:[main] from main::@7 + [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 + [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff + to:main::@9 +main::@9: scope:[main] from main::@11 main::@7 + [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 + [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 + [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 + [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 + [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 + to:main::@24 +main::@24: scope:[main] from main::@9 + [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 + to:main::@12 +main::@12: scope:[main] from main::@24 + [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 + [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff + [85] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2 + [86] (word~) main::$56 ← (word)(byte~) main::$30 + [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 + [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 + to:main::@10 +main::@10: scope:[main] from main::@12 main::@24 main::@9 + [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 + [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 + [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 + [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 + [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a + [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 + [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 + [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 + [97] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 + [98] (byte) main::i#4 ← ++ (byte) main::i#10 + to:main::@6 +main::@25: scope:[main] from main::@15 + [99] (byte) main::timer#21 ← (byte) main::timer#1 + to:main::@5 +main::@2: scope:[main] from main::@1 + [100] phi() + [101] call rand + [102] (word) rand::return#2 ← (word) rand::return#0 + to:main::@22 +main::@22: scope:[main] from main::@2 + [103] (word~) main::$9 ← (word) rand::return#2 + [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff + [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 + [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 + [107] call rand + [108] (word) rand::return#3 ← (word) rand::return#0 + to:main::@23 +main::@23: scope:[main] from main::@22 + [109] (word~) main::$11 ← (word) rand::return#3 + [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff + [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 + [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 + [113] (byte) main::i#2 ← ++ (byte) main::i#14 + to:main::@1 + +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +ppuDataTransfer: scope:[ppuDataTransfer] from main::@17 main::@21 + [114] (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( main::@17/(void*)(const to_nomodify byte*) palette main::@21/(void*)(const to_nomodify byte*) h_bar_tilemap ) + [114] (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← phi( main::@17/(void*)(const nomodify byte*) PPU_PALETTE main::@21/(void*) 8256 ) + to:ppuDataTransfer::ppuDataPrepare1 +ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer + [115] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [116] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 + [117] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [118] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 + to:ppuDataTransfer::@3 +ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 + [119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 + to:ppuDataTransfer::@1 +ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 + [120] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#6 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) + [120] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) 0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) + [121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 + to:ppuDataTransfer::@return +ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 + [122] return + to:@return +ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 + [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) + to:ppuDataTransfer::ppuDataPut1 +ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 + [124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 + to:ppuDataTransfer::@4 +ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 + [125] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 + [126] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 + to:ppuDataTransfer::@1 + +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +ppuDataFill: scope:[ppuDataFill] from main::@19 main::@20 + [127] (word) ppuDataFill::size#3 ← phi( main::@19/(word)(number) $20*(number) $1e main::@20/(byte) $40 ) + [127] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( main::@19/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 main::@20/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 ) + to:ppuDataFill::ppuDataPrepare1 +ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill + [128] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [129] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 + [130] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [131] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 + to:ppuDataFill::@1 +ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 + [132] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) + [133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 + to:ppuDataFill::@return +ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 + [134] return + to:@return +ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 + [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 + to:ppuDataFill::@2 +ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 + [136] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 + to:ppuDataFill::@1 + +(word()) rand() +rand: scope:[rand] from main::@2 main::@22 + [137] (word) rand_state#10 ← phi( main::@2/(word) rand_state#17 main::@22/(word) rand_state#11 ) + [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 + [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 + [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 + [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 + [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 + [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 + [144] (word) rand::return#0 ← (word) rand_state#11 + to:rand::@return +rand::@return: scope:[rand] from rand + [145] return + to:@return diff --git a/src/test/ref/complex/nes-balls/kickballs-2.log b/src/test/ref/complex/nes-balls/kickballs-2.log new file mode 100644 index 000000000..347fee044 --- /dev/null +++ b/src/test/ref/complex/nes-balls/kickballs-2.log @@ -0,0 +1,6310 @@ +Resolved forward reference SPRITE_BUFFER to (const struct SpriteData*) SPRITE_BUFFER +Resolved forward reference SPRITE_BUFFER to (const struct SpriteData*) SPRITE_BUFFER +Resolved forward reference SPRITE_BUFFER to (const struct SpriteData*) SPRITE_BUFFER +Resolved forward reference SPRITE_BUFFER to (const struct SpriteData*) SPRITE_BUFFER +Resolved forward reference SPRITE_BUFFER to (const struct SpriteData*) SPRITE_BUFFER +Fixing struct type size struct printf_buffer_number to 12 +Fixing struct type size struct printf_buffer_number to 12 +Fixing struct type SIZE_OF struct printf_buffer_number to 12 +Fixing struct type SIZE_OF struct printf_buffer_number to 12 +Inlined call call disableVideoOutput +Inlined call call disableAudioOutput +Inlined call call clearVBlankFlag +Inlined call call waitForVBlank +Inlined call call waitForVBlank +Inlined call call ppuDataPrepare (nomodify void*) ppuDataFill::ppuData +Inlined call call ppuDataPut (byte) ppuDataFill::val +Inlined call call ppuDataPrepare (nomodify void*) ppuDataTransfer::ppuData +Inlined call call ppuDataPut *((byte*) ppuDataTransfer::cpuSrc) +Inlined call call ppuDataPrepare (nomodify void*) ppuDataFetch::ppuData +Inlined call (byte~) ppuDataFetch::$2 ← call ppuDataRead +Inlined call call ppuDataPrepare (nomodify void*) ppuDataPutTile::ppuData +Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 0) +Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 1) +Inlined call call ppuDataPrepare (void*)(byte*~) ppuDataPutTile::$3 +Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 2) +Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 3) +Inlined call call ppuDataPrepare (nomodify void*) ppuDataSet::ppuData +Inlined call call ppuDataPut (byte) ppuDataSet::val +Inlined call call ppuDataPrepare (nomodify void*) ppuDataGet::ppuData +Inlined call (byte~) ppuDataGet::$1 ← call ppuDataRead +Inlined call call initNES +Inlined call call enableVideoOutput +Inlined call call ppuSpriteBufferDmaTransfer (const struct SpriteData*) SPRITE_BUFFER +Inlined call call __init +Eliminating unused variable with no statement (struct printf_buffer_number) printf_buffer + +CONTROL FLOW GRAPH SSA + +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +ppuDataFill: scope:[ppuDataFill] from main::@20 main::@21 + (byte) ppuDataFill::val#8 ← phi( main::@20/(byte) ppuDataFill::val#0 main::@21/(byte) ppuDataFill::val#1 ) + (word) ppuDataFill::size#7 ← phi( main::@20/(word) ppuDataFill::size#0 main::@21/(word) ppuDataFill::size#1 ) + (nomodify void*) ppuDataFill::ppuData#2 ← phi( main::@20/(nomodify void*) ppuDataFill::ppuData#0 main::@21/(nomodify void*) ppuDataFill::ppuData#1 ) + (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataFill::ppuData#2 + to:ppuDataFill::ppuDataPrepare1 +ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill + (byte) ppuDataFill::val#6 ← phi( ppuDataFill/(byte) ppuDataFill::val#8 ) + (word) ppuDataFill::size#5 ← phi( ppuDataFill/(word) ppuDataFill::size#7 ) + (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#1 ← phi( ppuDataFill/(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ) + (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#1 + (byte*~) ppuDataFill::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataFill::ppuDataPrepare1_$2 ← (byte*~) ppuDataFill::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR + *((byte*~) ppuDataFill::ppuDataPrepare1_$2) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 + (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#1 + (byte*~) ppuDataFill::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataFill::ppuDataPrepare1_$3 ← (byte*~) ppuDataFill::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR + *((byte*~) ppuDataFill::ppuDataPrepare1_$3) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 + to:ppuDataFill::@3 +ppuDataFill::@3: scope:[ppuDataFill] from ppuDataFill::ppuDataPrepare1 + (byte) ppuDataFill::val#4 ← phi( ppuDataFill::ppuDataPrepare1/(byte) ppuDataFill::val#6 ) + (word) ppuDataFill::size#3 ← phi( ppuDataFill::ppuDataPrepare1/(word) ppuDataFill::size#5 ) + (word) ppuDataFill::i#0 ← (word) 0 + to:ppuDataFill::@1 +ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@3 ppuDataFill::@4 + (byte) ppuDataFill::val#3 ← phi( ppuDataFill::@3/(byte) ppuDataFill::val#4 ppuDataFill::@4/(byte) ppuDataFill::val#5 ) + (word) ppuDataFill::size#2 ← phi( ppuDataFill::@3/(word) ppuDataFill::size#3 ppuDataFill::@4/(word) ppuDataFill::size#4 ) + (word) ppuDataFill::i#2 ← phi( ppuDataFill::@3/(word) ppuDataFill::i#0 ppuDataFill::@4/(word) ppuDataFill::i#1 ) + (bool~) ppuDataFill::$1 ← (word) ppuDataFill::i#2 < (word) ppuDataFill::size#2 + if((bool~) ppuDataFill::$1) goto ppuDataFill::@2 + to:ppuDataFill::@return +ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::@1 + (word) ppuDataFill::size#8 ← phi( ppuDataFill::@1/(word) ppuDataFill::size#2 ) + (word) ppuDataFill::i#5 ← phi( ppuDataFill::@1/(word) ppuDataFill::i#2 ) + (byte) ppuDataFill::val#2 ← phi( ppuDataFill::@1/(byte) ppuDataFill::val#3 ) + (byte) ppuDataFill::ppuDataPut1_val#0 ← (byte) ppuDataFill::val#2 + to:ppuDataFill::ppuDataPut1 +ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@2 + (byte) ppuDataFill::val#7 ← phi( ppuDataFill::@2/(byte) ppuDataFill::val#2 ) + (word) ppuDataFill::size#6 ← phi( ppuDataFill::@2/(word) ppuDataFill::size#8 ) + (word) ppuDataFill::i#4 ← phi( ppuDataFill::@2/(word) ppuDataFill::i#5 ) + (byte) ppuDataFill::ppuDataPut1_val#1 ← phi( ppuDataFill::@2/(byte) ppuDataFill::ppuDataPut1_val#0 ) + (byte*~) ppuDataFill::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataFill::ppuDataPut1_$0 ← (byte*~) ppuDataFill::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA + *((byte*~) ppuDataFill::ppuDataPut1_$0) ← (byte) ppuDataFill::ppuDataPut1_val#1 + to:ppuDataFill::@4 +ppuDataFill::@4: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 + (byte) ppuDataFill::val#5 ← phi( ppuDataFill::ppuDataPut1/(byte) ppuDataFill::val#7 ) + (word) ppuDataFill::size#4 ← phi( ppuDataFill::ppuDataPut1/(word) ppuDataFill::size#6 ) + (word) ppuDataFill::i#3 ← phi( ppuDataFill::ppuDataPut1/(word) ppuDataFill::i#4 ) + (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#3 + to:ppuDataFill::@1 +ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 + return + to:@return + +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +ppuDataTransfer: scope:[ppuDataTransfer] from main::@18 main::@22 + (word) ppuDataTransfer::size#7 ← phi( main::@18/(word) ppuDataTransfer::size#0 main::@22/(word) ppuDataTransfer::size#1 ) + (nomodify void*) ppuDataTransfer::cpuData#4 ← phi( main::@18/(nomodify void*) ppuDataTransfer::cpuData#0 main::@22/(nomodify void*) ppuDataTransfer::cpuData#1 ) + (nomodify void*) ppuDataTransfer::ppuData#2 ← phi( main::@18/(nomodify void*) ppuDataTransfer::ppuData#0 main::@22/(nomodify void*) ppuDataTransfer::ppuData#1 ) + (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataTransfer::ppuData#2 + to:ppuDataTransfer::ppuDataPrepare1 +ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer + (word) ppuDataTransfer::size#5 ← phi( ppuDataTransfer/(word) ppuDataTransfer::size#7 ) + (nomodify void*) ppuDataTransfer::cpuData#3 ← phi( ppuDataTransfer/(nomodify void*) ppuDataTransfer::cpuData#4 ) + (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#1 ← phi( ppuDataTransfer/(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ) + (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#1 + (byte*~) ppuDataTransfer::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 ← (byte*~) ppuDataTransfer::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR + *((byte*~) ppuDataTransfer::ppuDataPrepare1_$2) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 + (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#1 + (byte*~) ppuDataTransfer::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 ← (byte*~) ppuDataTransfer::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR + *((byte*~) ppuDataTransfer::ppuDataPrepare1_$3) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 + to:ppuDataTransfer::@3 +ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 + (word) ppuDataTransfer::size#3 ← phi( ppuDataTransfer::ppuDataPrepare1/(word) ppuDataTransfer::size#5 ) + (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(nomodify void*) ppuDataTransfer::cpuData#3 ) + (byte*) ppuDataTransfer::cpuSrc#0 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 + (word) ppuDataTransfer::i#0 ← (word) 0 + to:ppuDataTransfer::@1 +ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 + (byte*) ppuDataTransfer::cpuSrc#4 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#0 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) + (word) ppuDataTransfer::size#2 ← phi( ppuDataTransfer::@3/(word) ppuDataTransfer::size#3 ppuDataTransfer::@4/(word) ppuDataTransfer::size#4 ) + (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) ppuDataTransfer::i#0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) + (bool~) ppuDataTransfer::$1 ← (word) ppuDataTransfer::i#2 < (word) ppuDataTransfer::size#2 + if((bool~) ppuDataTransfer::$1) goto ppuDataTransfer::@2 + to:ppuDataTransfer::@return +ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 + (word) ppuDataTransfer::size#8 ← phi( ppuDataTransfer::@1/(word) ppuDataTransfer::size#2 ) + (word) ppuDataTransfer::i#5 ← phi( ppuDataTransfer::@1/(word) ppuDataTransfer::i#2 ) + (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@1/(byte*) ppuDataTransfer::cpuSrc#4 ) + (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) + to:ppuDataTransfer::ppuDataPut1 +ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 + (word) ppuDataTransfer::size#6 ← phi( ppuDataTransfer::@2/(word) ppuDataTransfer::size#8 ) + (word) ppuDataTransfer::i#4 ← phi( ppuDataTransfer::@2/(word) ppuDataTransfer::i#5 ) + (byte*) ppuDataTransfer::cpuSrc#5 ← phi( ppuDataTransfer::@2/(byte*) ppuDataTransfer::cpuSrc#2 ) + (byte) ppuDataTransfer::ppuDataPut1_val#1 ← phi( ppuDataTransfer::@2/(byte) ppuDataTransfer::ppuDataPut1_val#0 ) + (byte*~) ppuDataTransfer::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataTransfer::ppuDataPut1_$0 ← (byte*~) ppuDataTransfer::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA + *((byte*~) ppuDataTransfer::ppuDataPut1_$0) ← (byte) ppuDataTransfer::ppuDataPut1_val#1 + to:ppuDataTransfer::@4 +ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 + (word) ppuDataTransfer::size#4 ← phi( ppuDataTransfer::ppuDataPut1/(word) ppuDataTransfer::size#6 ) + (word) ppuDataTransfer::i#3 ← phi( ppuDataTransfer::ppuDataPut1/(word) ppuDataTransfer::i#4 ) + (byte*) ppuDataTransfer::cpuSrc#3 ← phi( ppuDataTransfer::ppuDataPut1/(byte*) ppuDataTransfer::cpuSrc#5 ) + (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#3 + (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#3 + to:ppuDataTransfer::@1 +ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 + return + to:@return + +(word()) rand() +rand: scope:[rand] from main::@2 main::@24 + (word) rand_state#10 ← phi( main::@2/(word) rand_state#17 main::@24/(word) rand_state#4 ) + (word~) rand::$0 ← (word) rand_state#10 << (number) 7 + (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 + (word~) rand::$1 ← (word) rand_state#0 >> (number) 9 + (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 + (word~) rand::$2 ← (word) rand_state#1 << (number) 8 + (word) rand_state#2 ← (word) rand_state#1 ^ (word~) rand::$2 + (word) rand::return#0 ← (word) rand_state#2 + to:rand::@return +rand::@return: scope:[rand] from rand + (word) rand_state#11 ← phi( rand/(word) rand_state#2 ) + (word) rand::return#4 ← phi( rand/(word) rand::return#0 ) + (word) rand::return#1 ← (word) rand::return#4 + (word) rand_state#3 ← (word) rand_state#11 + return + to:@return + +(signed word()) main() +main: scope:[main] from __start::@1 + (word) rand_state#53 ← phi( __start::@1/(word) rand_state#19 ) + to:main::initNES1 +main::initNES1: scope:[main] from main + (word) rand_state#52 ← phi( main/(word) rand_state#53 ) + asm { cld ldx#$ff txs } + to:main::initNES1_disableVideoOutput1 +main::initNES1_disableVideoOutput1: scope:[main] from main::initNES1 + (word) rand_state#51 ← phi( main::initNES1/(word) rand_state#52 ) + (byte*~) main::initNES1_disableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::initNES1_disableVideoOutput1_$0 ← (byte*~) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL + *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (number) 0 + (byte*~) main::initNES1_disableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::initNES1_disableVideoOutput1_$1 ← (byte*~) main::initNES1_disableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK + *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (number) 0 + to:main::initNES1_disableAudioOutput1 +main::initNES1_disableAudioOutput1: scope:[main] from main::initNES1_disableVideoOutput1 + (word) rand_state#50 ← phi( main::initNES1_disableVideoOutput1/(word) rand_state#51 ) + *((const nomodify byte*) FR_COUNTER) ← (number) $40 + (byte*~) main::initNES1_disableAudioOutput1_$1 ← (byte*)(const struct RICOH_2A03*) APU + (byte*~) main::initNES1_disableAudioOutput1_$0 ← (byte*~) main::initNES1_disableAudioOutput1_$1 + (const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ + *((byte*~) main::initNES1_disableAudioOutput1_$0) ← (number) $40 + to:main::initNES1_clearVBlankFlag1 +main::initNES1_clearVBlankFlag1: scope:[main] from main::initNES1_disableAudioOutput1 + (word) rand_state#49 ← phi( main::initNES1_disableAudioOutput1/(word) rand_state#50 ) + asm { ldaPPU_PPUSTATUS } + to:main::initNES1_waitForVBlank1 +main::initNES1_waitForVBlank1: scope:[main] from main::initNES1_clearVBlankFlag1 + (word) rand_state#48 ← phi( main::initNES1_clearVBlankFlag1/(word) rand_state#49 ) + to:main::initNES1_waitForVBlank1_@1 +main::initNES1_waitForVBlank1_@1: scope:[main] from main::initNES1_waitForVBlank1 main::initNES1_waitForVBlank1_@1 + (word) rand_state#47 ← phi( main::initNES1_waitForVBlank1/(word) rand_state#48 main::initNES1_waitForVBlank1_@1/(word) rand_state#47 ) + (byte*~) main::initNES1_waitForVBlank1_$3 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::initNES1_waitForVBlank1_$2 ← (byte*~) main::initNES1_waitForVBlank1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + (number~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (number) $80 + (bool~) main::initNES1_waitForVBlank1_$4 ← (number) 0 != (number~) main::initNES1_waitForVBlank1_$0 + (bool~) main::initNES1_waitForVBlank1_$1 ← ! (bool~) main::initNES1_waitForVBlank1_$4 + if((bool~) main::initNES1_waitForVBlank1_$1) goto main::initNES1_waitForVBlank1_@1 + to:main::initNES1_@6 +main::initNES1_@6: scope:[main] from main::initNES1_waitForVBlank1_@1 + (word) rand_state#46 ← phi( main::initNES1_waitForVBlank1_@1/(word) rand_state#47 ) + (byte) main::initNES1_i#0 ← (byte) 0 + to:main::initNES1_@1 +main::initNES1_@1: scope:[main] from main::initNES1_@1 main::initNES1_@6 + (word) rand_state#45 ← phi( main::initNES1_@1/(word) rand_state#45 main::initNES1_@6/(word) rand_state#46 ) + (byte) main::initNES1_i#2 ← phi( main::initNES1_@1/(byte) main::initNES1_i#1 main::initNES1_@6/(byte) main::initNES1_i#0 ) + *((const nomodify byte*) MEMORY+(number) 0 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $100 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $200 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $300 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $400 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $500 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $600 + (byte) main::initNES1_i#2) ← (number) 0 + *((const nomodify byte*) MEMORY+(number) $700 + (byte) main::initNES1_i#2) ← (number) 0 + (byte) main::initNES1_i#1 ← ++ (byte) main::initNES1_i#2 + (bool~) main::initNES1_$5 ← (number) 0 != (byte) main::initNES1_i#1 + if((bool~) main::initNES1_$5) goto main::initNES1_@1 + to:main::initNES1_waitForVBlank2 +main::initNES1_waitForVBlank2: scope:[main] from main::initNES1_@1 + (word) rand_state#44 ← phi( main::initNES1_@1/(word) rand_state#45 ) + to:main::initNES1_waitForVBlank2_@1 +main::initNES1_waitForVBlank2_@1: scope:[main] from main::initNES1_waitForVBlank2 main::initNES1_waitForVBlank2_@1 + (word) rand_state#43 ← phi( main::initNES1_waitForVBlank2/(word) rand_state#44 main::initNES1_waitForVBlank2_@1/(word) rand_state#43 ) + (byte*~) main::initNES1_waitForVBlank2_$3 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::initNES1_waitForVBlank2_$2 ← (byte*~) main::initNES1_waitForVBlank2_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + (number~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (number) $80 + (bool~) main::initNES1_waitForVBlank2_$4 ← (number) 0 != (number~) main::initNES1_waitForVBlank2_$0 + (bool~) main::initNES1_waitForVBlank2_$1 ← ! (bool~) main::initNES1_waitForVBlank2_$4 + if((bool~) main::initNES1_waitForVBlank2_$1) goto main::initNES1_waitForVBlank2_@1 + to:main::initNES1_@7 +main::initNES1_@7: scope:[main] from main::initNES1_waitForVBlank2_@1 + (word) rand_state#42 ← phi( main::initNES1_waitForVBlank2_@1/(word) rand_state#43 ) + asm { ldaPPU_PPUSTATUS } + to:main::@18 +main::@18: scope:[main] from main::initNES1_@7 + (word) rand_state#39 ← phi( main::initNES1_@7/(word) rand_state#42 ) + (byte~) main::$1 ← sizeof (const to_nomodify byte*) palette + (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(const nomodify byte*) PPU_PALETTE + (nomodify void*) ppuDataTransfer::cpuData#0 ← (void*)(const to_nomodify byte*) palette + (word) ppuDataTransfer::size#0 ← (byte~) main::$1 + call ppuDataTransfer + to:main::@20 +main::@20: scope:[main] from main::@18 + (word) rand_state#33 ← phi( main::@18/(word) rand_state#39 ) + (nomodify void*) ppuDataFill::ppuData#0 ← (void*)(const nomodify byte*) PPU_NAME_TABLE_0 + (byte) ppuDataFill::val#0 ← (number) 0 + (word) ppuDataFill::size#0 ← (number) $20*(number) $1e + call ppuDataFill + to:main::@21 +main::@21: scope:[main] from main::@20 + (word) rand_state#30 ← phi( main::@20/(word) rand_state#33 ) + (nomodify void*) ppuDataFill::ppuData#1 ← (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 + (byte) ppuDataFill::val#1 ← (number) 0 + (word) ppuDataFill::size#1 ← (number) $40 + call ppuDataFill + to:main::@22 +main::@22: scope:[main] from main::@21 + (word) rand_state#28 ← phi( main::@21/(word) rand_state#30 ) + (byte~) main::$5 ← sizeof (const to_nomodify byte*) h_bar_tilemap + (nomodify void*) ppuDataTransfer::ppuData#1 ← (void*)(number) $2040 + (nomodify void*) ppuDataTransfer::cpuData#1 ← (void*)(const to_nomodify byte*) h_bar_tilemap + (word) ppuDataTransfer::size#1 ← (byte~) main::$5 + call ppuDataTransfer + to:main::@23 +main::@23: scope:[main] from main::@22 + (word) rand_state#26 ← phi( main::@22/(word) rand_state#28 ) + to:main::enableVideoOutput1 +main::enableVideoOutput1: scope:[main] from main::@23 + (word) rand_state#24 ← phi( main::@23/(word) rand_state#26 ) + (byte*~) main::enableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::enableVideoOutput1_$0 ← (byte*~) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL + *((byte*~) main::enableVideoOutput1_$0) ← (number) $80 + (byte*~) main::enableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::enableVideoOutput1_$1 ← (byte*~) main::enableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK + *((byte*~) main::enableVideoOutput1_$1) ← (number) $1e + to:main::@19 +main::@19: scope:[main] from main::enableVideoOutput1 + (word) rand_state#22 ← phi( main::enableVideoOutput1/(word) rand_state#24 ) + (byte*~) main::$55 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) main::$54 ← (byte*~) main::$55 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL + *((byte*~) main::$54) ← (number) $88 + (byte) main::i#0 ← (byte) 0 + (byte) main::active_balls#0 ← (byte) 0 + (byte) main::timer#0 ← (byte) 0 + (byte) main::timer_2#0 ← (byte) 0 + (byte) main::h_bar#0 ← (byte) $80 + (byte) main::sprite_idx#0 ← (byte) 0 + (byte) main::i#1 ← (number) 0 + to:main::@1 +main::@1: scope:[main] from main::@19 main::@25 + (byte) main::timer#6 ← phi( main::@19/(byte) main::timer#0 main::@25/(byte) main::timer#8 ) + (byte) main::active_balls#9 ← phi( main::@19/(byte) main::active_balls#0 main::@25/(byte) main::active_balls#13 ) + (byte) main::timer_2#4 ← phi( main::@19/(byte) main::timer_2#0 main::@25/(byte) main::timer_2#6 ) + (word) rand_state#20 ← phi( main::@19/(word) rand_state#22 main::@25/(word) rand_state#5 ) + (byte) main::i#5 ← phi( main::@19/(byte) main::i#1 main::@25/(byte) main::i#2 ) + (bool~) main::$8 ← (byte) main::i#5 < (number) $20 + if((bool~) main::$8) goto main::@2 + to:main::@3 +main::@2: scope:[main] from main::@1 + (byte) main::timer#12 ← phi( main::@1/(byte) main::timer#6 ) + (byte) main::active_balls#19 ← phi( main::@1/(byte) main::active_balls#9 ) + (byte) main::timer_2#10 ← phi( main::@1/(byte) main::timer_2#4 ) + (byte) main::i#14 ← phi( main::@1/(byte) main::i#5 ) + (word) rand_state#17 ← phi( main::@1/(word) rand_state#20 ) + call rand + (word) rand::return#2 ← (word) rand::return#1 + to:main::@24 +main::@24: scope:[main] from main::@2 + (byte) main::timer#10 ← phi( main::@2/(byte) main::timer#12 ) + (byte) main::active_balls#17 ← phi( main::@2/(byte) main::active_balls#19 ) + (byte) main::timer_2#8 ← phi( main::@2/(byte) main::timer_2#10 ) + (byte) main::i#6 ← phi( main::@2/(byte) main::i#14 ) + (word) rand_state#12 ← phi( main::@2/(word) rand_state#3 ) + (word) rand::return#5 ← phi( main::@2/(word) rand::return#2 ) + (word~) main::$9 ← (word) rand::return#5 + (word) rand_state#4 ← (word) rand_state#12 + (number~) main::$10 ← (word~) main::$9 & (number) $3ff + (byte~) main::$35 ← (byte) main::i#6 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$35) ← (number~) main::$10 + call rand + (word) rand::return#3 ← (word) rand::return#1 + to:main::@25 +main::@25: scope:[main] from main::@24 + (byte) main::timer#8 ← phi( main::@24/(byte) main::timer#10 ) + (byte) main::active_balls#13 ← phi( main::@24/(byte) main::active_balls#17 ) + (byte) main::timer_2#6 ← phi( main::@24/(byte) main::timer_2#8 ) + (byte) main::i#7 ← phi( main::@24/(byte) main::i#6 ) + (word) rand_state#13 ← phi( main::@24/(word) rand_state#3 ) + (word) rand::return#6 ← phi( main::@24/(word) rand::return#3 ) + (word~) main::$11 ← (word) rand::return#6 + (word) rand_state#5 ← (word) rand_state#13 + (number~) main::$12 ← (word~) main::$11 & (number) $ff + (byte~) main::$36 ← (byte) main::i#7 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$36) ← (number~) main::$12 + (byte) main::i#2 ← ++ (byte) main::i#7 + to:main::@1 +main::@3: scope:[main] from main::@1 main::@15 + (word) rand_state#21 ← phi( main::@1/(word) rand_state#20 main::@15/(word) rand_state#23 ) + (byte) main::timer#5 ← phi( main::@1/(byte) main::timer#6 main::@15/(byte) main::timer#7 ) + (byte) main::active_balls#5 ← phi( main::@1/(byte) main::active_balls#9 main::@15/(byte) main::active_balls#10 ) + (byte) main::timer_2#3 ← phi( main::@1/(byte) main::timer_2#4 main::@15/(byte) main::timer_2#5 ) + (bool~) main::$57 ← (number) 0 != (number) 1 + if((bool~) main::$57) goto main::@4 + to:main::@5 +main::@4: scope:[main] from main::@3 + (word) rand_state#36 ← phi( main::@3/(word) rand_state#21 ) + (byte) main::timer#4 ← phi( main::@3/(byte) main::timer#5 ) + (byte) main::active_balls#2 ← phi( main::@3/(byte) main::active_balls#5 ) + (byte) main::timer_2#2 ← phi( main::@3/(byte) main::timer_2#3 ) + (byte) main::timer_2#1 ← ++ (byte) main::timer_2#2 + (number~) main::$13 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (number) $60 + (byte) main::h_bar#1 ← (number~) main::$13 + (number~) main::$14 ← (byte) main::h_bar#1 ^ (number) $ff + (volatile byte) scroll_y ← (number~) main::$14 + (bool~) main::$15 ← (byte) main::active_balls#2 < (number) $20 + (bool~) main::$16 ← ! (bool~) main::$15 + if((bool~) main::$16) goto main::@6 + to:main::@16 +main::@5: scope:[main] from main::@3 + (word) rand_state#18 ← phi( main::@3/(word) rand_state#21 ) + (signed word) main::return#0 ← (number) 0 + to:main::@return +main::@6: scope:[main] from main::@16 main::@17 main::@4 + (word) rand_state#32 ← phi( main::@16/(word) rand_state#34 main::@17/(word) rand_state#35 main::@4/(word) rand_state#36 ) + (byte) main::timer#15 ← phi( main::@16/(byte) main::timer#1 main::@17/(byte) main::timer#2 main::@4/(byte) main::timer#4 ) + (byte) main::timer_2#13 ← phi( main::@16/(byte) main::timer_2#14 main::@17/(byte) main::timer_2#15 main::@4/(byte) main::timer_2#1 ) + (byte) main::h_bar#8 ← phi( main::@16/(byte) main::h_bar#9 main::@17/(byte) main::h_bar#10 main::@4/(byte) main::h_bar#1 ) + (byte) main::active_balls#8 ← phi( main::@16/(byte) main::active_balls#6 main::@17/(byte) main::active_balls#1 main::@4/(byte) main::active_balls#2 ) + (byte) main::sprite_idx#1 ← (number) 0 + (byte) main::i#3 ← (number) 0 + to:main::@7 +main::@16: scope:[main] from main::@4 + (word) rand_state#34 ← phi( main::@4/(word) rand_state#36 ) + (byte) main::timer_2#14 ← phi( main::@4/(byte) main::timer_2#1 ) + (byte) main::h_bar#9 ← phi( main::@4/(byte) main::h_bar#1 ) + (byte) main::active_balls#6 ← phi( main::@4/(byte) main::active_balls#2 ) + (byte) main::timer#3 ← phi( main::@4/(byte) main::timer#4 ) + (bool~) main::$17 ← (byte) main::timer#3 == (number) 9 + (byte) main::timer#1 ← ++ (byte) main::timer#3 + (bool~) main::$18 ← ! (bool~) main::$17 + if((bool~) main::$18) goto main::@6 + to:main::@17 +main::@17: scope:[main] from main::@16 + (word) rand_state#35 ← phi( main::@16/(word) rand_state#34 ) + (byte) main::timer_2#15 ← phi( main::@16/(byte) main::timer_2#14 ) + (byte) main::h_bar#10 ← phi( main::@16/(byte) main::h_bar#9 ) + (byte) main::active_balls#3 ← phi( main::@16/(byte) main::active_balls#6 ) + (byte) main::timer#2 ← (number) 0 + (byte) main::active_balls#1 ← ++ (byte) main::active_balls#3 + (byte~) main::$37 ← (byte) main::active_balls#1 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$37) ← (number) 0 + (byte~) main::$38 ← (byte) main::active_balls#1 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$38) ← (number) 0 + to:main::@6 +main::@7: scope:[main] from main::@11 main::@6 + (word) rand_state#29 ← phi( main::@11/(word) rand_state#31 main::@6/(word) rand_state#32 ) + (byte) main::timer#13 ← phi( main::@11/(byte) main::timer#14 main::@6/(byte) main::timer#15 ) + (byte) main::timer_2#11 ← phi( main::@11/(byte) main::timer_2#12 main::@6/(byte) main::timer_2#13 ) + (byte) main::sprite_idx#8 ← phi( main::@11/(byte) main::sprite_idx#2 main::@6/(byte) main::sprite_idx#1 ) + (byte) main::h_bar#6 ← phi( main::@11/(byte) main::h_bar#7 main::@6/(byte) main::h_bar#8 ) + (byte) main::active_balls#4 ← phi( main::@11/(byte) main::active_balls#7 main::@6/(byte) main::active_balls#8 ) + (byte) main::i#8 ← phi( main::@11/(byte) main::i#4 main::@6/(byte) main::i#3 ) + (bool~) main::$19 ← (byte) main::i#8 < (byte) main::active_balls#4 + if((bool~) main::$19) goto main::@8 + to:main::@9 +main::@8: scope:[main] from main::@7 + (word) rand_state#41 ← phi( main::@7/(word) rand_state#29 ) + (byte) main::timer#19 ← phi( main::@7/(byte) main::timer#13 ) + (byte) main::timer_2#19 ← phi( main::@7/(byte) main::timer_2#11 ) + (byte) main::active_balls#15 ← phi( main::@7/(byte) main::active_balls#4 ) + (byte) main::sprite_idx#7 ← phi( main::@7/(byte) main::sprite_idx#8 ) + (byte) main::h_bar#5 ← phi( main::@7/(byte) main::h_bar#6 ) + (byte) main::i#9 ← phi( main::@7/(byte) main::i#8 ) + (byte~) main::$39 ← (byte) main::i#9 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$39) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$39) + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$39) + (byte~) main::$40 ← (byte) main::i#9 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$40) + (number) $10 + (byte~) main::$41 ← (byte) main::i#9 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$41) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$41) + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$41) + (byte~) main::$42 ← (byte) main::i#9 * (const byte) SIZEOF_STRUCT_$0 + (word~) main::$20 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$42) >> (number) 8 + (bool~) main::$21 ← (word~) main::$20 < (number) 8 + (bool~) main::$22 ← ! (bool~) main::$21 + if((bool~) main::$22) goto main::@10 + to:main::@12 +main::@9: scope:[main] from main::@7 + (word) rand_state#27 ← phi( main::@7/(word) rand_state#29 ) + (byte) main::timer#11 ← phi( main::@7/(byte) main::timer#13 ) + (byte) main::active_balls#18 ← phi( main::@7/(byte) main::active_balls#4 ) + (byte) main::timer_2#9 ← phi( main::@7/(byte) main::timer_2#11 ) + *((byte*)(number) $2001) ← (number) $98 + to:main::@14 +main::@10: scope:[main] from main::@12 main::@8 + (word) rand_state#37 ← phi( main::@12/(word) rand_state#40 main::@8/(word) rand_state#41 ) + (byte) main::timer#16 ← phi( main::@12/(byte) main::timer#18 main::@8/(byte) main::timer#19 ) + (byte) main::timer_2#16 ← phi( main::@12/(byte) main::timer_2#18 main::@8/(byte) main::timer_2#19 ) + (byte) main::active_balls#11 ← phi( main::@12/(byte) main::active_balls#14 main::@8/(byte) main::active_balls#15 ) + (byte) main::sprite_idx#4 ← phi( main::@12/(byte) main::sprite_idx#6 main::@8/(byte) main::sprite_idx#7 ) + (byte) main::h_bar#2 ← phi( main::@12/(byte) main::h_bar#4 main::@8/(byte) main::h_bar#5 ) + (byte) main::i#10 ← phi( main::@12/(byte) main::i#11 main::@8/(byte) main::i#9 ) + (byte~) main::$43 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 + (word~) main::$23 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$43) >> (number) 8 + (bool~) main::$24 ← (word~) main::$23 >= (byte) main::h_bar#2 + (byte~) main::$44 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 + (word~) main::$25 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$44) >> (number) 8 + (number~) main::$26 ← (byte) main::h_bar#2 + (number) 8 + (bool~) main::$27 ← (word~) main::$25 < (number~) main::$26 + (bool~) main::$28 ← (bool~) main::$24 && (bool~) main::$27 + (bool~) main::$29 ← ! (bool~) main::$28 + if((bool~) main::$29) goto main::@11 + to:main::@13 +main::@12: scope:[main] from main::@8 + (word) rand_state#40 ← phi( main::@8/(word) rand_state#41 ) + (byte) main::timer#18 ← phi( main::@8/(byte) main::timer#19 ) + (byte) main::timer_2#18 ← phi( main::@8/(byte) main::timer_2#19 ) + (byte) main::active_balls#14 ← phi( main::@8/(byte) main::active_balls#15 ) + (byte) main::sprite_idx#6 ← phi( main::@8/(byte) main::sprite_idx#7 ) + (byte) main::h_bar#4 ← phi( main::@8/(byte) main::h_bar#5 ) + (byte) main::i#11 ← phi( main::@8/(byte) main::i#9 ) + (byte~) main::$45 ← (byte) main::i#11 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$45) ^ (number) $ffff + to:main::@10 +main::@11: scope:[main] from main::@10 main::@13 + (word) rand_state#31 ← phi( main::@10/(word) rand_state#37 main::@13/(word) rand_state#38 ) + (byte) main::timer#14 ← phi( main::@10/(byte) main::timer#16 main::@13/(byte) main::timer#17 ) + (byte) main::timer_2#12 ← phi( main::@10/(byte) main::timer_2#16 main::@13/(byte) main::timer_2#17 ) + (byte) main::h_bar#7 ← phi( main::@10/(byte) main::h_bar#2 main::@13/(byte) main::h_bar#3 ) + (byte) main::active_balls#7 ← phi( main::@10/(byte) main::active_balls#11 main::@13/(byte) main::active_balls#12 ) + (byte) main::sprite_idx#3 ← phi( main::@10/(byte) main::sprite_idx#4 main::@13/(byte) main::sprite_idx#5 ) + (byte) main::i#12 ← phi( main::@10/(byte) main::i#10 main::@13/(byte) main::i#13 ) + (byte~) main::$46 ← (byte) main::i#12 * (const byte) SIZEOF_STRUCT_$0 + (word~) main::$32 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$46) >> (number) 8 + (byte~) main::$47 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA + *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_Y + (byte~) main::$47) ← (byte)(word~) main::$32 + (byte~) main::$48 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA + *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (number) $a + (byte~) main::$49 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA + *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$49) ← (number) 3 + (byte~) main::$50 ← (byte) main::i#12 * (const byte) SIZEOF_STRUCT_$0 + (word~) main::$33 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$50) >> (number) 8 + (byte~) main::$51 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA + *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$51) ← (byte)(word~) main::$33 + (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 + (byte) main::i#4 ← ++ (byte) main::i#12 + to:main::@7 +main::@13: scope:[main] from main::@10 + (word) rand_state#38 ← phi( main::@10/(word) rand_state#37 ) + (byte) main::timer#17 ← phi( main::@10/(byte) main::timer#16 ) + (byte) main::timer_2#17 ← phi( main::@10/(byte) main::timer_2#16 ) + (byte) main::active_balls#12 ← phi( main::@10/(byte) main::active_balls#11 ) + (byte) main::sprite_idx#5 ← phi( main::@10/(byte) main::sprite_idx#4 ) + (byte) main::h_bar#3 ← phi( main::@10/(byte) main::h_bar#2 ) + (byte) main::i#13 ← phi( main::@10/(byte) main::i#10 ) + (byte~) main::$52 ← (byte) main::i#13 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$52) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$52) ^ (number) $ffff + (number~) main::$30 ← (byte) main::h_bar#3 - (number) 2 + (word~) main::$56 ← (word)(number~) main::$30 + (word~) main::$31 ← (word~) main::$56 << (number) 8 + (byte~) main::$53 ← (byte) main::i#13 * (const byte) SIZEOF_STRUCT_$0 + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$53) ← (word~) main::$31 + to:main::@11 +main::@14: scope:[main] from main::@14 main::@9 + (word) rand_state#25 ← phi( main::@14/(word) rand_state#25 main::@9/(word) rand_state#27 ) + (byte) main::timer#9 ← phi( main::@14/(byte) main::timer#9 main::@9/(byte) main::timer#11 ) + (byte) main::active_balls#16 ← phi( main::@14/(byte) main::active_balls#16 main::@9/(byte) main::active_balls#18 ) + (byte) main::timer_2#7 ← phi( main::@14/(byte) main::timer_2#7 main::@9/(byte) main::timer_2#9 ) + (bool~) main::$58 ← (number) 0 != (volatile byte) vblank_hit + (bool~) main::$34 ← ! (bool~) main::$58 + if((bool~) main::$34) goto main::@14 + to:main::@15 +main::@15: scope:[main] from main::@14 + (word) rand_state#23 ← phi( main::@14/(word) rand_state#25 ) + (byte) main::timer#7 ← phi( main::@14/(byte) main::timer#9 ) + (byte) main::active_balls#10 ← phi( main::@14/(byte) main::active_balls#16 ) + (byte) main::timer_2#5 ← phi( main::@14/(byte) main::timer_2#7 ) + (volatile byte) vblank_hit ← (number) 0 + *((byte*)(number) $2001) ← (number) $18 + to:main::@3 +main::@return: scope:[main] from main::@5 + (word) rand_state#14 ← phi( main::@5/(word) rand_state#18 ) + (signed word) main::return#3 ← phi( main::@5/(signed word) main::return#0 ) + (signed word) main::return#1 ← (signed word) main::return#3 + (word) rand_state#6 ← (word) rand_state#14 + return + to:@return + +interrupt(HARDWARE_STACK)(void()) vblank() +vblank: scope:[vblank] from + (byte*~) vblank::$3 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) vblank::$1 ← (byte*~) vblank::$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + *((byte*~) vblank::$1) ← (number) 0 + (byte*~) vblank::$4 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) vblank::$2 ← (byte*~) vblank::$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + *((byte*~) vblank::$2) ← (volatile byte) scroll_y + (struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 ← (const struct SpriteData*) SPRITE_BUFFER + to:vblank::ppuSpriteBufferDmaTransfer1 +vblank::ppuSpriteBufferDmaTransfer1: scope:[vblank] from vblank + (struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#1 ← phi( vblank/(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 ) + (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$3 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1 ← (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR + *((byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1) ← (number) 0 + (byte~) vblank::ppuSpriteBufferDmaTransfer1_$0 ← > (struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#1 + (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$4 ← (byte*)(const struct RICOH_2A03*) APU + (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$2 ← (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$4 + (const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA + *((byte*~) vblank::ppuSpriteBufferDmaTransfer1_$2) ← (byte~) vblank::ppuSpriteBufferDmaTransfer1_$0 + to:vblank::@1 +vblank::@1: scope:[vblank] from vblank::ppuSpriteBufferDmaTransfer1 + (volatile byte) vblank_hit ← ++ (volatile byte) vblank_hit + to:vblank::@return +vblank::@return: scope:[vblank] from vblank::@1 + return + to:@return + +(void()) __start() +__start: scope:[__start] from + to:__start::__init1 +__start::__init1: scope:[__start] from __start + (word) rand_state#7 ← (word) 1 + (volatile byte) scroll_y ← (byte) 0 + (volatile byte) vblank_hit ← (byte) 0 + to:__start::@1 +__start::@1: scope:[__start] from __start::__init1 + (word) rand_state#19 ← phi( __start::__init1/(word) rand_state#7 ) + call main + (signed word) main::return#2 ← (signed word) main::return#1 + to:__start::@2 +__start::@2: scope:[__start] from __start::@1 + (word) rand_state#15 ← phi( __start::@1/(word) rand_state#6 ) + (word) rand_state#8 ← (word) rand_state#15 + to:__start::@return +__start::@return: scope:[__start] from __start::@2 + (word) rand_state#16 ← phi( __start::@2/(word) rand_state#8 ) + (word) rand_state#9 ← (word) rand_state#16 + return + to:@return + +SYMBOL TABLE SSA +(word) $0::x_position +(word) $0::x_velocity +(word) $0::y_position +(word) $0::y_velocity +(const struct RICOH_2A03*) APU = (struct RICOH_2A03*)(number) $4000 +(const nomodify byte*) FR_COUNTER = (byte*)(number) $4017 +(const nomodify byte*) MEMORY = (byte*)(number) 0 +(const byte) OFFSET_STRUCT_$0_X_POSITION = (byte) 0 +(const byte) OFFSET_STRUCT_$0_X_VELOCITY = (byte) 4 +(const byte) OFFSET_STRUCT_$0_Y_POSITION = (byte) 2 +(const byte) OFFSET_STRUCT_$0_Y_VELOCITY = (byte) 6 +(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = (byte) $10 +(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA = (byte) $14 +(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR = (byte) 3 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR = (byte) 6 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL = (byte) 0 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA = (byte) 7 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK = (byte) 1 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = (byte) 5 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = (byte) 2 +(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = (byte) 2 +(const byte) OFFSET_STRUCT_SPRITEDATA_TILE = (byte) 1 +(const byte) OFFSET_STRUCT_SPRITEDATA_X = (byte) 3 +(const byte) OFFSET_STRUCT_SPRITEDATA_Y = (byte) 0 +(const struct RICOH_2C02*) PPU = (struct RICOH_2C02*)(number) $2000 +(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 = (byte*)(number) $23c0 +(const nomodify byte*) PPU_NAME_TABLE_0 = (byte*)(number) $2000 +(const nomodify byte*) PPU_PALETTE = (byte*)(number) $3f00 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*)(number) $2002 +(const byte) RADIX::BINARY = (number) 2 +(const byte) RADIX::DECIMAL = (number) $a +(const byte) RADIX::HEXADECIMAL = (number) $10 +(const byte) RADIX::OCTAL = (number) 8 +(byte) RICOH_2A03::DMC_FREQ +(byte) RICOH_2A03::DMC_LEN +(byte) RICOH_2A03::DMC_RAW +(byte) RICOH_2A03::DMC_START +(byte) RICOH_2A03::JOY1 +(byte) RICOH_2A03::JOY2 +(byte) RICOH_2A03::NOISE_HI +(byte) RICOH_2A03::NOISE_LO +(byte) RICOH_2A03::NOISE_VOL +(byte) RICOH_2A03::OAMDMA +(byte) RICOH_2A03::SND_CHN +(byte) RICOH_2A03::SQ1_HI +(byte) RICOH_2A03::SQ1_LO +(byte) RICOH_2A03::SQ1_SWEEP +(byte) RICOH_2A03::SQ1_VOL +(byte) RICOH_2A03::SQ2_HI +(byte) RICOH_2A03::SQ2_LO +(byte) RICOH_2A03::SQ2_SWEEP +(byte) RICOH_2A03::SQ2_VOL +(byte) RICOH_2A03::TRI_HI +(byte) RICOH_2A03::TRI_LINEAR +(byte) RICOH_2A03::TRI_LO +(byte) RICOH_2A03::UNUSED1 +(byte) RICOH_2A03::UNUSED2 +(byte) RICOH_2C02::OAMADDR +(byte) RICOH_2C02::OAMDATA +(byte) RICOH_2C02::PPUADDR +(byte) RICOH_2C02::PPUCTRL +(byte) RICOH_2C02::PPUDATA +(byte) RICOH_2C02::PPUMASK +(byte) RICOH_2C02::PPUSCROLL +(volatile byte) RICOH_2C02::PPUSTATUS loadstore +(const byte) SIZEOF_STRUCT_$0 = (byte) 8 +(const byte) SIZEOF_STRUCT_SPRITEDATA = (byte) 4 +(const struct SpriteData*) SPRITE_BUFFER[(number) $100] = { fill( $100, 0) } +(byte) SpriteData::attributes +(byte) SpriteData::tile +(byte) SpriteData::x +(byte) SpriteData::y +(const byte*) TILES[] = kickasm {{ .import binary "lazydata.chr" + }} +(const to_nomodify void()**) VECTORS[] = { &interrupt(HARDWARE_STACK)(void()) vblank(), &(signed word()) main(), (void()*)(number) 0 } +(void()) __start() +(label) __start::@1 +(label) __start::@2 +(label) __start::@return +(label) __start::__init1 +(const struct $0*) balls[(number) $40] = { fill( $40, 0) } +(const to_nomodify byte*) h_bar_tilemap[] = { (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1 } +(signed word()) main() +(byte~) main::$1 +(number~) main::$10 +(word~) main::$11 +(number~) main::$12 +(number~) main::$13 +(number~) main::$14 +(bool~) main::$15 +(bool~) main::$16 +(bool~) main::$17 +(bool~) main::$18 +(bool~) main::$19 +(word~) main::$20 +(bool~) main::$21 +(bool~) main::$22 +(word~) main::$23 +(bool~) main::$24 +(word~) main::$25 +(number~) main::$26 +(bool~) main::$27 +(bool~) main::$28 +(bool~) main::$29 +(number~) main::$30 +(word~) main::$31 +(word~) main::$32 +(word~) main::$33 +(bool~) main::$34 +(byte~) main::$35 +(byte~) main::$36 +(byte~) main::$37 +(byte~) main::$38 +(byte~) main::$39 +(byte~) main::$40 +(byte~) main::$41 +(byte~) main::$42 +(byte~) main::$43 +(byte~) main::$44 +(byte~) main::$45 +(byte~) main::$46 +(byte~) main::$47 +(byte~) main::$48 +(byte~) main::$49 +(byte~) main::$5 +(byte~) main::$50 +(byte~) main::$51 +(byte~) main::$52 +(byte~) main::$53 +(byte*~) main::$54 +(byte*~) main::$55 +(word~) main::$56 +(bool~) main::$57 +(bool~) main::$58 +(bool~) main::$8 +(word~) main::$9 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(label) main::@return +(byte) main::active_balls +(byte) main::active_balls#0 +(byte) main::active_balls#1 +(byte) main::active_balls#10 +(byte) main::active_balls#11 +(byte) main::active_balls#12 +(byte) main::active_balls#13 +(byte) main::active_balls#14 +(byte) main::active_balls#15 +(byte) main::active_balls#16 +(byte) main::active_balls#17 +(byte) main::active_balls#18 +(byte) main::active_balls#19 +(byte) main::active_balls#2 +(byte) main::active_balls#3 +(byte) main::active_balls#4 +(byte) main::active_balls#5 +(byte) main::active_balls#6 +(byte) main::active_balls#7 +(byte) main::active_balls#8 +(byte) main::active_balls#9 +(label) main::enableVideoOutput1 +(byte*~) main::enableVideoOutput1_$0 +(byte*~) main::enableVideoOutput1_$1 +(byte*~) main::enableVideoOutput1_$2 +(byte*~) main::enableVideoOutput1_$3 +(byte) main::h_bar +(byte) main::h_bar#0 +(byte) main::h_bar#1 +(byte) main::h_bar#10 +(byte) main::h_bar#2 +(byte) main::h_bar#3 +(byte) main::h_bar#4 +(byte) main::h_bar#5 +(byte) main::h_bar#6 +(byte) main::h_bar#7 +(byte) main::h_bar#8 +(byte) main::h_bar#9 +(byte) main::i +(byte) main::i#0 +(byte) main::i#1 +(byte) main::i#10 +(byte) main::i#11 +(byte) main::i#12 +(byte) main::i#13 +(byte) main::i#14 +(byte) main::i#2 +(byte) main::i#3 +(byte) main::i#4 +(byte) main::i#5 +(byte) main::i#6 +(byte) main::i#7 +(byte) main::i#8 +(byte) main::i#9 +(label) main::initNES1 +(bool~) main::initNES1_$5 +(label) main::initNES1_@1 +(label) main::initNES1_@6 +(label) main::initNES1_@7 +(label) main::initNES1_clearVBlankFlag1 +(label) main::initNES1_disableAudioOutput1 +(byte*~) main::initNES1_disableAudioOutput1_$0 +(byte*~) main::initNES1_disableAudioOutput1_$1 +(label) main::initNES1_disableVideoOutput1 +(byte*~) main::initNES1_disableVideoOutput1_$0 +(byte*~) main::initNES1_disableVideoOutput1_$1 +(byte*~) main::initNES1_disableVideoOutput1_$2 +(byte*~) main::initNES1_disableVideoOutput1_$3 +(byte) main::initNES1_i +(byte) main::initNES1_i#0 +(byte) main::initNES1_i#1 +(byte) main::initNES1_i#2 +(label) main::initNES1_waitForVBlank1 +(number~) main::initNES1_waitForVBlank1_$0 +(bool~) main::initNES1_waitForVBlank1_$1 +(byte*~) main::initNES1_waitForVBlank1_$2 +(byte*~) main::initNES1_waitForVBlank1_$3 +(bool~) main::initNES1_waitForVBlank1_$4 +(label) main::initNES1_waitForVBlank1_@1 +(label) main::initNES1_waitForVBlank2 +(number~) main::initNES1_waitForVBlank2_$0 +(bool~) main::initNES1_waitForVBlank2_$1 +(byte*~) main::initNES1_waitForVBlank2_$2 +(byte*~) main::initNES1_waitForVBlank2_$3 +(bool~) main::initNES1_waitForVBlank2_$4 +(label) main::initNES1_waitForVBlank2_@1 +(signed word) main::return +(signed word) main::return#0 +(signed word) main::return#1 +(signed word) main::return#2 +(signed word) main::return#3 +(byte) main::sprite_idx +(byte) main::sprite_idx#0 +(byte) main::sprite_idx#1 +(byte) main::sprite_idx#2 +(byte) main::sprite_idx#3 +(byte) main::sprite_idx#4 +(byte) main::sprite_idx#5 +(byte) main::sprite_idx#6 +(byte) main::sprite_idx#7 +(byte) main::sprite_idx#8 +(byte) main::timer +(byte) main::timer#0 +(byte) main::timer#1 +(byte) main::timer#10 +(byte) main::timer#11 +(byte) main::timer#12 +(byte) main::timer#13 +(byte) main::timer#14 +(byte) main::timer#15 +(byte) main::timer#16 +(byte) main::timer#17 +(byte) main::timer#18 +(byte) main::timer#19 +(byte) main::timer#2 +(byte) main::timer#3 +(byte) main::timer#4 +(byte) main::timer#5 +(byte) main::timer#6 +(byte) main::timer#7 +(byte) main::timer#8 +(byte) main::timer#9 +(byte) main::timer_2 +(byte) main::timer_2#0 +(byte) main::timer_2#1 +(byte) main::timer_2#10 +(byte) main::timer_2#11 +(byte) main::timer_2#12 +(byte) main::timer_2#13 +(byte) main::timer_2#14 +(byte) main::timer_2#15 +(byte) main::timer_2#16 +(byte) main::timer_2#17 +(byte) main::timer_2#18 +(byte) main::timer_2#19 +(byte) main::timer_2#2 +(byte) main::timer_2#3 +(byte) main::timer_2#4 +(byte) main::timer_2#5 +(byte) main::timer_2#6 +(byte) main::timer_2#7 +(byte) main::timer_2#8 +(byte) main::timer_2#9 +(const to_nomodify byte*) palette[] = { (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4 } +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +(bool~) ppuDataFill::$1 +(label) ppuDataFill::@1 +(label) ppuDataFill::@2 +(label) ppuDataFill::@3 +(label) ppuDataFill::@4 +(label) ppuDataFill::@return +(word) ppuDataFill::i +(word) ppuDataFill::i#0 +(word) ppuDataFill::i#1 +(word) ppuDataFill::i#2 +(word) ppuDataFill::i#3 +(word) ppuDataFill::i#4 +(word) ppuDataFill::i#5 +(nomodify void*) ppuDataFill::ppuData +(nomodify void*) ppuDataFill::ppuData#0 +(nomodify void*) ppuDataFill::ppuData#1 +(nomodify void*) ppuDataFill::ppuData#2 +(label) ppuDataFill::ppuDataPrepare1 +(byte~) ppuDataFill::ppuDataPrepare1_$0 +(byte~) ppuDataFill::ppuDataPrepare1_$1 +(byte*~) ppuDataFill::ppuDataPrepare1_$2 +(byte*~) ppuDataFill::ppuDataPrepare1_$3 +(byte*~) ppuDataFill::ppuDataPrepare1_$4 +(byte*~) ppuDataFill::ppuDataPrepare1_$5 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#1 +(label) ppuDataFill::ppuDataPut1 +(byte*~) ppuDataFill::ppuDataPut1_$0 +(byte*~) ppuDataFill::ppuDataPut1_$1 +(byte) ppuDataFill::ppuDataPut1_val +(byte) ppuDataFill::ppuDataPut1_val#0 +(byte) ppuDataFill::ppuDataPut1_val#1 +(word) ppuDataFill::size +(word) ppuDataFill::size#0 +(word) ppuDataFill::size#1 +(word) ppuDataFill::size#2 +(word) ppuDataFill::size#3 +(word) ppuDataFill::size#4 +(word) ppuDataFill::size#5 +(word) ppuDataFill::size#6 +(word) ppuDataFill::size#7 +(word) ppuDataFill::size#8 +(byte) ppuDataFill::val +(byte) ppuDataFill::val#0 +(byte) ppuDataFill::val#1 +(byte) ppuDataFill::val#2 +(byte) ppuDataFill::val#3 +(byte) ppuDataFill::val#4 +(byte) ppuDataFill::val#5 +(byte) ppuDataFill::val#6 +(byte) ppuDataFill::val#7 +(byte) ppuDataFill::val#8 +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +(bool~) ppuDataTransfer::$1 +(label) ppuDataTransfer::@1 +(label) ppuDataTransfer::@2 +(label) ppuDataTransfer::@3 +(label) ppuDataTransfer::@4 +(label) ppuDataTransfer::@return +(nomodify void*) ppuDataTransfer::cpuData +(nomodify void*) ppuDataTransfer::cpuData#0 +(nomodify void*) ppuDataTransfer::cpuData#1 +(nomodify void*) ppuDataTransfer::cpuData#2 +(nomodify void*) ppuDataTransfer::cpuData#3 +(nomodify void*) ppuDataTransfer::cpuData#4 +(byte*) ppuDataTransfer::cpuSrc +(byte*) ppuDataTransfer::cpuSrc#0 +(byte*) ppuDataTransfer::cpuSrc#1 +(byte*) ppuDataTransfer::cpuSrc#2 +(byte*) ppuDataTransfer::cpuSrc#3 +(byte*) ppuDataTransfer::cpuSrc#4 +(byte*) ppuDataTransfer::cpuSrc#5 +(word) ppuDataTransfer::i +(word) ppuDataTransfer::i#0 +(word) ppuDataTransfer::i#1 +(word) ppuDataTransfer::i#2 +(word) ppuDataTransfer::i#3 +(word) ppuDataTransfer::i#4 +(word) ppuDataTransfer::i#5 +(nomodify void*) ppuDataTransfer::ppuData +(nomodify void*) ppuDataTransfer::ppuData#0 +(nomodify void*) ppuDataTransfer::ppuData#1 +(nomodify void*) ppuDataTransfer::ppuData#2 +(label) ppuDataTransfer::ppuDataPrepare1 +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 +(byte*~) ppuDataTransfer::ppuDataPrepare1_$2 +(byte*~) ppuDataTransfer::ppuDataPrepare1_$3 +(byte*~) ppuDataTransfer::ppuDataPrepare1_$4 +(byte*~) ppuDataTransfer::ppuDataPrepare1_$5 +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#1 +(label) ppuDataTransfer::ppuDataPut1 +(byte*~) ppuDataTransfer::ppuDataPut1_$0 +(byte*~) ppuDataTransfer::ppuDataPut1_$1 +(byte) ppuDataTransfer::ppuDataPut1_val +(byte) ppuDataTransfer::ppuDataPut1_val#0 +(byte) ppuDataTransfer::ppuDataPut1_val#1 +(word) ppuDataTransfer::size +(word) ppuDataTransfer::size#0 +(word) ppuDataTransfer::size#1 +(word) ppuDataTransfer::size#2 +(word) ppuDataTransfer::size#3 +(word) ppuDataTransfer::size#4 +(word) ppuDataTransfer::size#5 +(word) ppuDataTransfer::size#6 +(word) ppuDataTransfer::size#7 +(word) ppuDataTransfer::size#8 +(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) } +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length +(word()) rand() +(word~) rand::$0 +(word~) rand::$1 +(word~) rand::$2 +(label) rand::@return +(word) rand::return +(word) rand::return#0 +(word) rand::return#1 +(word) rand::return#2 +(word) rand::return#3 +(word) rand::return#4 +(word) rand::return#5 +(word) rand::return#6 +(word) rand_state +(word) rand_state#0 +(word) rand_state#1 +(word) rand_state#10 +(word) rand_state#11 +(word) rand_state#12 +(word) rand_state#13 +(word) rand_state#14 +(word) rand_state#15 +(word) rand_state#16 +(word) rand_state#17 +(word) rand_state#18 +(word) rand_state#19 +(word) rand_state#2 +(word) rand_state#20 +(word) rand_state#21 +(word) rand_state#22 +(word) rand_state#23 +(word) rand_state#24 +(word) rand_state#25 +(word) rand_state#26 +(word) rand_state#27 +(word) rand_state#28 +(word) rand_state#29 +(word) rand_state#3 +(word) rand_state#30 +(word) rand_state#31 +(word) rand_state#32 +(word) rand_state#33 +(word) rand_state#34 +(word) rand_state#35 +(word) rand_state#36 +(word) rand_state#37 +(word) rand_state#38 +(word) rand_state#39 +(word) rand_state#4 +(word) rand_state#40 +(word) rand_state#41 +(word) rand_state#42 +(word) rand_state#43 +(word) rand_state#44 +(word) rand_state#45 +(word) rand_state#46 +(word) rand_state#47 +(word) rand_state#48 +(word) rand_state#49 +(word) rand_state#5 +(word) rand_state#50 +(word) rand_state#51 +(word) rand_state#52 +(word) rand_state#53 +(word) rand_state#6 +(word) rand_state#7 +(word) rand_state#8 +(word) rand_state#9 +(volatile byte) scroll_y loadstore +(const to_nomodify byte*) sine_table[(number) $100] = { (byte) $40, (byte) $42, (byte) $43, (byte) $45, (byte) $46, (byte) $48, (byte) $49, (byte) $4b, (byte) $4c, (byte) $4e, (byte) $50, (byte) $51, (byte) $53, (byte) $54, (byte) $56, (byte) $57, (byte) $58, (byte) $5a, (byte) $5b, (byte) $5d, (byte) $5e, (byte) $60, (byte) $61, (byte) $62, (byte) $64, (byte) $65, (byte) $66, (byte) $67, (byte) $69, (byte) $6a, (byte) $6b, (byte) $6c, (byte) $6d, (byte) $6e, (byte) $6f, (byte) $70, (byte) $71, (byte) $72, (byte) $73, (byte) $74, (byte) $75, (byte) $76, (byte) $77, (byte) $78, (byte) $78, (byte) $79, (byte) $7a, (byte) $7b, (byte) $7b, (byte) $7c, (byte) $7c, (byte) $7d, (byte) $7d, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7d, (byte) $7d, (byte) $7c, (byte) $7c, (byte) $7b, (byte) $7b, (byte) $7a, (byte) $79, (byte) $78, (byte) $78, (byte) $77, (byte) $76, (byte) $75, (byte) $74, (byte) $73, (byte) $72, (byte) $71, (byte) $70, (byte) $6f, (byte) $6e, (byte) $6d, (byte) $6c, (byte) $6b, (byte) $6a, (byte) $69, (byte) $67, (byte) $66, (byte) $65, (byte) $64, (byte) $62, (byte) $61, (byte) $60, (byte) $5e, (byte) $5d, (byte) $5b, (byte) $5a, (byte) $58, (byte) $57, (byte) $56, (byte) $54, (byte) $53, (byte) $51, (byte) $50, (byte) $4e, (byte) $4c, (byte) $4b, (byte) $49, (byte) $48, (byte) $46, (byte) $45, (byte) $43, (byte) $42, (byte) $40, (byte) $3e, (byte) $3d, (byte) $3b, (byte) $3a, (byte) $38, (byte) $37, (byte) $35, (byte) $34, (byte) $32, (byte) $30, (byte) $2f, (byte) $2d, (byte) $2c, (byte) $2a, (byte) $29, (byte) $28, (byte) $26, (byte) $25, (byte) $23, (byte) $22, (byte) $20, (byte) $1f, (byte) $1e, (byte) $1c, (byte) $1b, (byte) $1a, (byte) $19, (byte) $17, (byte) $16, (byte) $15, (byte) $14, (byte) $13, (byte) $12, (byte) $11, (byte) $10, (byte) $f, (byte) $e, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 9, (byte) 8, (byte) 8, (byte) 7, (byte) 6, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 4, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 8, (byte) 9, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $e, (byte) $f, (byte) $10, (byte) $11, (byte) $12, (byte) $13, (byte) $14, (byte) $15, (byte) $16, (byte) $17, (byte) $19, (byte) $1a, (byte) $1b, (byte) $1c, (byte) $1e, (byte) $1f, (byte) $20, (byte) $22, (byte) $23, (byte) $25, (byte) $26, (byte) $28, (byte) $29, (byte) $2a, (byte) $2c, (byte) $2d, (byte) $2f, (byte) $30, (byte) $32, (byte) $34, (byte) $35, (byte) $37, (byte) $38, (byte) $3a, (byte) $3b, (byte) $3d, (byte) $3e } +interrupt(HARDWARE_STACK)(void()) vblank() +(byte*~) vblank::$1 +(byte*~) vblank::$2 +(byte*~) vblank::$3 +(byte*~) vblank::$4 +(label) vblank::@1 +(label) vblank::@return +(label) vblank::ppuSpriteBufferDmaTransfer1 +(byte~) vblank::ppuSpriteBufferDmaTransfer1_$0 +(byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1 +(byte*~) vblank::ppuSpriteBufferDmaTransfer1_$2 +(byte*~) vblank::ppuSpriteBufferDmaTransfer1_$3 +(byte*~) vblank::ppuSpriteBufferDmaTransfer1_$4 +(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer +(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 +(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#1 +(volatile byte) vblank_hit loadstore + +Adding number conversion cast (unumber) 7 in (word~) rand::$0 ← (word) rand_state#10 << (number) 7 +Adding number conversion cast (unumber) 9 in (word~) rand::$1 ← (word) rand_state#0 >> (number) 9 +Adding number conversion cast (unumber) 8 in (word~) rand::$2 ← (word) rand_state#1 << (number) 8 +Adding number conversion cast (unumber) 0 in *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (number) 0 +Adding number conversion cast (unumber) $40 in *((const nomodify byte*) FR_COUNTER) ← (number) $40 +Adding number conversion cast (unumber) $40 in *((byte*~) main::initNES1_disableAudioOutput1_$0) ← (number) $40 +Adding number conversion cast (unumber) $80 in (number~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (number) $80 +Adding number conversion cast (unumber) main::initNES1_waitForVBlank1_$0 in (number~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (unumber)(number) $80 +Adding number conversion cast (unumber) 0 in (bool~) main::initNES1_waitForVBlank1_$4 ← (number) 0 != (unumber~) main::initNES1_waitForVBlank1_$0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) 0 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) 0 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $100 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $100 in *((const nomodify byte*) MEMORY+(number) $100 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $200 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $200 in *((const nomodify byte*) MEMORY+(number) $200 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $300 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $300 in *((const nomodify byte*) MEMORY+(number) $300 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $400 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $400 in *((const nomodify byte*) MEMORY+(number) $400 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $500 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $500 in *((const nomodify byte*) MEMORY+(number) $500 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $600 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $600 in *((const nomodify byte*) MEMORY+(number) $600 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in *((const nomodify byte*) MEMORY+(number) $700 + (byte) main::initNES1_i#2) ← (number) 0 +Adding number conversion cast (unumber) $700 in *((const nomodify byte*) MEMORY+(number) $700 + (byte) main::initNES1_i#2) ← ((unumber)) (number) 0 +Adding number conversion cast (unumber) 0 in (bool~) main::initNES1_$5 ← (number) 0 != (byte) main::initNES1_i#1 +Adding number conversion cast (unumber) $80 in (number~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (number) $80 +Adding number conversion cast (unumber) main::initNES1_waitForVBlank2_$0 in (number~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (unumber)(number) $80 +Adding number conversion cast (unumber) 0 in (bool~) main::initNES1_waitForVBlank2_$4 ← (number) 0 != (unumber~) main::initNES1_waitForVBlank2_$0 +Adding number conversion cast (unumber) 0 in (byte) ppuDataFill::val#0 ← (number) 0 +Adding number conversion cast (unumber) $20*$1e in (word) ppuDataFill::size#0 ← (number) $20*(number) $1e +Adding number conversion cast (unumber) 0 in (byte) ppuDataFill::val#1 ← (number) 0 +Adding number conversion cast (unumber) $40 in (word) ppuDataFill::size#1 ← (number) $40 +Adding number conversion cast (unumber) $80 in *((byte*~) main::enableVideoOutput1_$0) ← (number) $80 +Adding number conversion cast (unumber) $1e in *((byte*~) main::enableVideoOutput1_$1) ← (number) $1e +Adding number conversion cast (unumber) $88 in *((byte*~) main::$54) ← (number) $88 +Adding number conversion cast (unumber) 0 in (byte) main::i#1 ← (number) 0 +Adding number conversion cast (unumber) $20 in (bool~) main::$8 ← (byte) main::i#5 < (number) $20 +Adding number conversion cast (unumber) $3ff in (number~) main::$10 ← (word~) main::$9 & (number) $3ff +Adding number conversion cast (unumber) main::$10 in (number~) main::$10 ← (word~) main::$9 & (unumber)(number) $3ff +Adding number conversion cast (unumber) $ff in (number~) main::$12 ← (word~) main::$11 & (number) $ff +Adding number conversion cast (unumber) main::$12 in (number~) main::$12 ← (word~) main::$11 & (unumber)(number) $ff +Adding number conversion cast (unumber) $60 in (number~) main::$13 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (number) $60 +Adding number conversion cast (unumber) main::$13 in (number~) main::$13 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (unumber)(number) $60 +Adding number conversion cast (unumber) $ff in (number~) main::$14 ← (byte) main::h_bar#1 ^ (number) $ff +Adding number conversion cast (unumber) main::$14 in (number~) main::$14 ← (byte) main::h_bar#1 ^ (unumber)(number) $ff +Adding number conversion cast (unumber) $20 in (bool~) main::$15 ← (byte) main::active_balls#2 < (number) $20 +Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) main::sprite_idx#1 ← (number) 0 +Adding number conversion cast (unumber) 0 in (byte) main::i#3 ← (number) 0 +Adding number conversion cast (unumber) 9 in (bool~) main::$17 ← (byte) main::timer#3 == (number) 9 +Adding number conversion cast (unumber) 0 in (byte) main::timer#2 ← (number) 0 +Adding number conversion cast (unumber) 0 in *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$37) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$38) ← (number) 0 +Adding number conversion cast (unumber) $10 in *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$40) + (number) $10 +Adding number conversion cast (unumber) 8 in (word~) main::$20 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$42) >> (number) 8 +Adding number conversion cast (unumber) 8 in (bool~) main::$21 ← (word~) main::$20 < (number) 8 +Adding number conversion cast (unumber) $98 in *((byte*)(number) $2001) ← (number) $98 +Adding number conversion cast (unumber) 8 in (word~) main::$23 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$43) >> (number) 8 +Adding number conversion cast (unumber) 8 in (word~) main::$25 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$44) >> (number) 8 +Adding number conversion cast (unumber) 8 in (number~) main::$26 ← (byte) main::h_bar#2 + (number) 8 +Adding number conversion cast (unumber) main::$26 in (number~) main::$26 ← (byte) main::h_bar#2 + (unumber)(number) 8 +Adding number conversion cast (unumber) $ffff in *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$45) ^ (number) $ffff +Adding number conversion cast (unumber) 8 in (word~) main::$32 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$46) >> (number) 8 +Adding number conversion cast (unumber) $a in *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (number) $a +Adding number conversion cast (unumber) 3 in *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$49) ← (number) 3 +Adding number conversion cast (unumber) 8 in (word~) main::$33 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$50) >> (number) 8 +Adding number conversion cast (unumber) $ffff in *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$52) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_VELOCITY + (byte~) main::$52) ^ (number) $ffff +Adding number conversion cast (unumber) 2 in (number~) main::$30 ← (byte) main::h_bar#3 - (number) 2 +Adding number conversion cast (unumber) main::$30 in (number~) main::$30 ← (byte) main::h_bar#3 - (unumber)(number) 2 +Adding number conversion cast (unumber) 8 in (word~) main::$31 ← (word~) main::$56 << (number) 8 +Adding number conversion cast (unumber) 0 in (bool~) main::$58 ← (number) 0 != (volatile byte) vblank_hit +Adding number conversion cast (unumber) 0 in (volatile byte) vblank_hit ← (number) 0 +Adding number conversion cast (unumber) $18 in *((byte*)(number) $2001) ← (number) $18 +Adding number conversion cast (unumber) 0 in *((byte*~) vblank::$1) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1) ← (number) 0 +Successful SSA optimization PassNAddNumberTypeConversions +Inlining cast *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (unumber)(number) 0 +Inlining cast *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) FR_COUNTER) ← (unumber)(number) $40 +Inlining cast *((byte*~) main::initNES1_disableAudioOutput1_$0) ← (unumber)(number) $40 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) 0 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $100 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $200 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $300 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $400 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $500 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $600 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast *((const nomodify byte*) MEMORY+(unumber)(number) $700 + (byte) main::initNES1_i#2) ← (unumber)(number) 0 +Inlining cast (byte) ppuDataFill::val#0 ← (unumber)(number) 0 +Inlining cast (word) ppuDataFill::size#0 ← (unumber)(number) $20*(number) $1e +Inlining cast (byte) ppuDataFill::val#1 ← (unumber)(number) 0 +Inlining cast (word) ppuDataFill::size#1 ← (unumber)(number) $40 +Inlining cast *((byte*~) main::enableVideoOutput1_$0) ← (unumber)(number) $80 +Inlining cast *((byte*~) main::enableVideoOutput1_$1) ← (unumber)(number) $1e +Inlining cast *((byte*~) main::$54) ← (unumber)(number) $88 +Inlining cast (byte) main::i#1 ← (unumber)(number) 0 +Inlining cast (signed word) main::return#0 ← (snumber)(number) 0 +Inlining cast (byte) main::sprite_idx#1 ← (unumber)(number) 0 +Inlining cast (byte) main::i#3 ← (unumber)(number) 0 +Inlining cast (byte) main::timer#2 ← (unumber)(number) 0 +Inlining cast *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$37) ← (unumber)(number) 0 +Inlining cast *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_Y_POSITION + (byte~) main::$38) ← (unumber)(number) 0 +Inlining cast *((byte*)(number) $2001) ← (unumber)(number) $98 +Inlining cast *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (unumber)(number) $a +Inlining cast *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$49) ← (unumber)(number) 3 +Inlining cast (volatile byte) vblank_hit ← (unumber)(number) 0 +Inlining cast *((byte*)(number) $2001) ← (unumber)(number) $18 +Inlining cast *((byte*~) vblank::$1) ← (unumber)(number) 0 +Inlining cast *((byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1) ← (unumber)(number) 0 +Successful SSA optimization Pass2InlineCast +Simplifying constant pointer cast (byte*) 8192 +Simplifying constant pointer cast (byte*) 9152 +Simplifying constant pointer cast (byte*) 16128 +Simplifying constant pointer cast (byte*) 8194 +Simplifying constant pointer cast (byte*) 16407 +Simplifying constant pointer cast (byte*) 0 +Simplifying constant pointer cast (void()*) 0 +Simplifying constant pointer cast (struct RICOH_2C02*) 8192 +Simplifying constant pointer cast (struct RICOH_2A03*) 16384 +Simplifying constant integer cast 7 +Simplifying constant integer cast 9 +Simplifying constant integer cast 8 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $40 +Simplifying constant integer cast $40 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $100 +Simplifying constant integer cast 0 +Simplifying constant integer cast $200 +Simplifying constant integer cast 0 +Simplifying constant integer cast $300 +Simplifying constant integer cast 0 +Simplifying constant integer cast $400 +Simplifying constant integer cast 0 +Simplifying constant integer cast $500 +Simplifying constant integer cast 0 +Simplifying constant integer cast $600 +Simplifying constant integer cast 0 +Simplifying constant integer cast $700 +Simplifying constant integer cast 0 +Simplifying constant integer cast $80 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $40 +Simplifying constant pointer cast (void*) 8256 +Simplifying constant integer cast $80 +Simplifying constant integer cast $1e +Simplifying constant integer cast $88 +Simplifying constant integer cast 0 +Simplifying constant integer cast $20 +Simplifying constant integer cast $3ff +Simplifying constant integer cast $ff +Simplifying constant integer cast $60 +Simplifying constant integer cast $ff +Simplifying constant integer cast $20 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 9 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $10 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Simplifying constant integer cast $98 +Simplifying constant pointer cast (byte*) 8193 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 +Simplifying constant integer cast $ffff +Simplifying constant integer cast 8 +Simplifying constant integer cast $a +Simplifying constant integer cast 3 +Simplifying constant integer cast 8 +Simplifying constant integer cast $ffff +Simplifying constant integer cast 2 +Simplifying constant integer cast 8 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast $18 +Simplifying constant pointer cast (byte*) 8193 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 7 +Finalized unsigned number type (byte) 9 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $100 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $200 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $300 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $400 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $500 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $600 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (word) $700 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) $80 +Finalized unsigned number type (byte) $1e +Finalized unsigned number type (byte) $88 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (word) $3ff +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) $60 +Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) $20 +Finalized signed number type (signed byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 9 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $10 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $98 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (word) $ffff +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) $a +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (word) $ffff +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Inferred type updated to byte in (unumber~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (byte) $80 +Inferred type updated to byte in (unumber~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (byte) $80 +Inferred type updated to word in (unumber~) main::$10 ← (word~) main::$9 & (word) $3ff +Inferred type updated to byte in (unumber~) main::$12 ← (word~) main::$11 & (byte) $ff +Inferred type updated to byte in (unumber~) main::$13 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 +Inferred type updated to byte in (unumber~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff +Inferred type updated to byte in (unumber~) main::$26 ← (byte) main::h_bar#2 + (byte) 8 +Inferred type updated to byte in (unumber~) main::$30 ← (byte) main::h_bar#3 - (byte) 2 +Inversing boolean not [87] (bool~) main::initNES1_waitForVBlank1_$1 ← (byte) 0 == (byte~) main::initNES1_waitForVBlank1_$0 from [86] (bool~) main::initNES1_waitForVBlank1_$4 ← (byte) 0 != (byte~) main::initNES1_waitForVBlank1_$0 +Inversing boolean not [109] (bool~) main::initNES1_waitForVBlank2_$1 ← (byte) 0 == (byte~) main::initNES1_waitForVBlank2_$0 from [108] (bool~) main::initNES1_waitForVBlank2_$4 ← (byte) 0 != (byte~) main::initNES1_waitForVBlank2_$0 +Inversing boolean not [185] (bool~) main::$16 ← (byte) main::active_balls#2 >= (byte) $20 from [184] (bool~) main::$15 ← (byte) main::active_balls#2 < (byte) $20 +Inversing boolean not [195] (bool~) main::$18 ← (byte) main::timer#3 != (byte) 9 from [193] (bool~) main::$17 ← (byte) main::timer#3 == (byte) 9 +Inversing boolean not [217] (bool~) main::$22 ← (word~) main::$20 >= (byte) 8 from [216] (bool~) main::$21 ← (word~) main::$20 < (byte) 8 +Inversing boolean not [260] (bool~) main::$34 ← (byte) 0 == (volatile byte) vblank_hit from [259] (bool~) main::$58 ← (byte) 0 != (volatile byte) vblank_hit +Successful SSA optimization Pass2UnaryNotSimplification +Alias candidate removed (volatile)scroll_y = main::$14 +Alias ppuDataFill::ppuDataPrepare1_ppuData#0 = ppuDataFill::ppuData#2 ppuDataFill::ppuDataPrepare1_ppuData#1 +Alias ppuDataFill::size#3 = ppuDataFill::size#5 ppuDataFill::size#7 +Alias ppuDataFill::val#4 = ppuDataFill::val#6 ppuDataFill::val#8 +Alias ppuDataFill::val#2 = ppuDataFill::val#3 ppuDataFill::ppuDataPut1_val#0 ppuDataFill::ppuDataPut1_val#1 ppuDataFill::val#7 ppuDataFill::val#5 +Alias ppuDataFill::i#2 = ppuDataFill::i#5 ppuDataFill::i#4 ppuDataFill::i#3 +Alias ppuDataFill::size#2 = ppuDataFill::size#8 ppuDataFill::size#6 ppuDataFill::size#4 +Alias ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#2 ppuDataTransfer::ppuDataPrepare1_ppuData#1 +Alias ppuDataTransfer::cpuData#2 = ppuDataTransfer::cpuData#3 ppuDataTransfer::cpuData#4 +Alias ppuDataTransfer::size#3 = ppuDataTransfer::size#5 ppuDataTransfer::size#7 +Alias ppuDataTransfer::cpuSrc#2 = ppuDataTransfer::cpuSrc#4 ppuDataTransfer::cpuSrc#5 ppuDataTransfer::cpuSrc#3 +Alias ppuDataTransfer::i#2 = ppuDataTransfer::i#5 ppuDataTransfer::i#4 ppuDataTransfer::i#3 +Alias ppuDataTransfer::size#2 = ppuDataTransfer::size#8 ppuDataTransfer::size#6 ppuDataTransfer::size#4 +Alias ppuDataTransfer::ppuDataPut1_val#0 = ppuDataTransfer::ppuDataPut1_val#1 +Alias rand::return#0 = rand::return#4 rand::return#1 +Alias rand_state#11 = rand_state#2 rand_state#3 +Alias rand_state#48 = rand_state#52 rand_state#53 rand_state#51 rand_state#50 rand_state#49 +Alias rand_state#46 = rand_state#47 +Alias rand_state#44 = rand_state#45 +Alias rand_state#22 = rand_state#42 rand_state#43 rand_state#39 rand_state#33 rand_state#30 rand_state#28 rand_state#26 rand_state#24 +Alias ppuDataTransfer::size#0 = main::$1 +Alias ppuDataTransfer::size#1 = main::$5 +Alias rand_state#17 = rand_state#20 +Alias main::i#14 = main::i#5 main::i#6 main::i#7 +Alias main::timer_2#10 = main::timer_2#4 main::timer_2#8 main::timer_2#6 +Alias main::active_balls#13 = main::active_balls#19 main::active_balls#9 main::active_balls#17 +Alias main::timer#10 = main::timer#12 main::timer#6 main::timer#8 +Alias rand::return#2 = rand::return#5 +Alias rand_state#12 = rand_state#4 +Alias rand::return#3 = rand::return#6 +Alias rand_state#13 = rand_state#5 +Alias main::timer_2#2 = main::timer_2#3 +Alias main::active_balls#2 = main::active_balls#5 main::active_balls#6 main::active_balls#3 +Alias main::timer#3 = main::timer#4 main::timer#5 +Alias rand_state#14 = rand_state#36 rand_state#21 rand_state#18 rand_state#34 rand_state#35 rand_state#6 +Alias main::h_bar#1 = main::$13 main::h_bar#9 main::h_bar#10 +Alias main::timer_2#1 = main::timer_2#14 main::timer_2#15 +Alias main::i#11 = main::i#9 main::i#8 +Alias main::h_bar#4 = main::h_bar#5 main::h_bar#6 +Alias main::sprite_idx#6 = main::sprite_idx#7 main::sprite_idx#8 +Alias main::active_balls#14 = main::active_balls#15 main::active_balls#4 main::active_balls#18 +Alias main::timer_2#11 = main::timer_2#19 main::timer_2#9 main::timer_2#18 +Alias main::timer#11 = main::timer#19 main::timer#13 main::timer#18 +Alias rand_state#27 = rand_state#41 rand_state#29 rand_state#40 +Alias main::i#10 = main::i#13 +Alias main::h_bar#2 = main::h_bar#3 +Alias main::sprite_idx#4 = main::sprite_idx#5 +Alias main::active_balls#11 = main::active_balls#12 +Alias main::timer_2#16 = main::timer_2#17 +Alias main::timer#16 = main::timer#17 +Alias rand_state#37 = rand_state#38 +Alias main::timer_2#5 = main::timer_2#7 +Alias main::active_balls#10 = main::active_balls#16 +Alias main::timer#7 = main::timer#9 +Alias rand_state#23 = rand_state#25 +Alias main::return#0 = main::return#3 main::return#1 +Alias vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 = vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#1 +Alias rand_state#19 = rand_state#7 +Alias rand_state#15 = rand_state#8 rand_state#16 rand_state#9 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)scroll_y = main::$14 +Alias main::h_bar#1 = main::h_bar#8 +Alias main::timer_2#1 = main::timer_2#13 +Alias rand_state#14 = rand_state#32 +Alias main::i#10 = main::i#11 main::i#12 +Alias main::h_bar#2 = main::h_bar#4 main::h_bar#7 +Alias main::sprite_idx#3 = main::sprite_idx#4 main::sprite_idx#6 +Alias main::active_balls#11 = main::active_balls#14 main::active_balls#7 +Alias main::timer_2#11 = main::timer_2#16 main::timer_2#12 +Alias main::timer#11 = main::timer#16 main::timer#14 +Alias rand_state#27 = rand_state#37 rand_state#31 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)scroll_y = main::$14 +Identical Phi Values (word) ppuDataFill::size#2 (word) ppuDataFill::size#3 +Identical Phi Values (byte) ppuDataFill::val#2 (byte) ppuDataFill::val#4 +Identical Phi Values (word) ppuDataTransfer::size#2 (word) ppuDataTransfer::size#3 +Identical Phi Values (word) rand_state#48 (word) rand_state#19 +Identical Phi Values (word) rand_state#46 (word) rand_state#48 +Identical Phi Values (word) rand_state#44 (word) rand_state#46 +Identical Phi Values (word) rand_state#22 (word) rand_state#44 +Identical Phi Values (byte) main::timer_2#10 (byte) main::timer_2#0 +Identical Phi Values (byte) main::active_balls#13 (byte) main::active_balls#0 +Identical Phi Values (byte) main::timer#10 (byte) main::timer#0 +Identical Phi Values (word) rand_state#12 (word) rand_state#11 +Identical Phi Values (word) rand_state#13 (word) rand_state#11 +Identical Phi Values (byte) main::active_balls#11 (byte) main::active_balls#8 +Identical Phi Values (byte) main::h_bar#2 (byte) main::h_bar#1 +Identical Phi Values (byte) main::timer_2#11 (byte) main::timer_2#1 +Identical Phi Values (byte) main::timer#11 (byte) main::timer#15 +Identical Phi Values (word) rand_state#27 (word) rand_state#14 +Identical Phi Values (byte) main::timer_2#5 (byte) main::timer_2#11 +Identical Phi Values (byte) main::active_balls#10 (byte) main::active_balls#11 +Identical Phi Values (byte) main::timer#7 (byte) main::timer#11 +Identical Phi Values (word) rand_state#23 (word) rand_state#27 +Identical Phi Values (word) rand_state#15 (word) rand_state#14 +Successful SSA optimization Pass2IdenticalPhiElimination +Identical Phi Values (word) rand_state#14 (word) rand_state#17 +Successful SSA optimization Pass2IdenticalPhiElimination +Identified duplicate assignment right side [202] (byte~) main::$38 ← (byte) main::active_balls#1 * (const byte) SIZEOF_STRUCT_$0 +Identified duplicate assignment right side [210] (byte~) main::$40 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Identified duplicate assignment right side [212] (byte~) main::$41 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Identified duplicate assignment right side [214] (byte~) main::$42 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Identified duplicate assignment right side [225] (byte~) main::$44 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Identified duplicate assignment right side [240] (byte~) main::$48 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA +Identified duplicate assignment right side [242] (byte~) main::$49 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA +Identified duplicate assignment right side [244] (byte~) main::$50 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Identified duplicate assignment right side [246] (byte~) main::$51 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA +Identified duplicate assignment right side [256] (byte~) main::$53 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Successful SSA optimization Pass2DuplicateRValueIdentification +Simple Condition (bool~) ppuDataFill::$1 [12] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::@2 +Simple Condition (bool~) ppuDataTransfer::$1 [31] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 +Simple Condition (bool~) main::initNES1_waitForVBlank1_$1 [66] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 +Simple Condition (bool~) main::initNES1_$5 [79] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 +Simple Condition (bool~) main::initNES1_waitForVBlank2_$1 [85] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 +Simple Condition (bool~) main::$8 [121] if((byte) main::i#14<(byte) $20) goto main::@2 +Simple Condition (bool~) main::$57 [139] if((number) 0!=(number) 1) goto main::@4 +Simple Condition (bool~) main::$16 [145] if((byte) main::active_balls#2>=(byte) $20) goto main::@6 +Simple Condition (bool~) main::$18 [152] if((byte) main::timer#3!=(byte) 9) goto main::@6 +Simple Condition (bool~) main::$19 [161] if((byte) main::i#10<(byte) main::active_balls#8) goto main::@8 +Simple Condition (bool~) main::$22 [171] if((word~) main::$20>=(byte) 8) goto main::@10 +Simple Condition (bool~) main::$34 [208] if((byte) 0==(volatile byte) vblank_hit) goto main::@14 +Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting ! if()-condition to reversed if() [181] (bool~) main::$29 ← ! (bool~) main::$28 +Rewriting && if()-condition to two if()s [180] (bool~) main::$28 ← (bool~) main::$24 && (bool~) main::$27 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Constant right-side identified [2] (byte*~) ppuDataFill::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [6] (byte*~) ppuDataFill::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [13] (byte*~) ppuDataFill::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [20] (byte*~) ppuDataTransfer::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [24] (byte*~) ppuDataTransfer::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [33] (byte*~) ppuDataTransfer::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [50] (byte*~) main::initNES1_disableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [53] (byte*~) main::initNES1_disableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [57] (byte*~) main::initNES1_disableAudioOutput1_$1 ← (byte*)(const struct RICOH_2A03*) APU +Constant right-side identified [62] (byte*~) main::initNES1_waitForVBlank1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [81] (byte*~) main::initNES1_waitForVBlank2_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [87] (word) ppuDataTransfer::size#0 ← sizeof (const to_nomodify byte*) palette +Constant right-side identified [93] (word) ppuDataFill::size#0 ← (unumber)(number) $20*(number) $1e +Constant right-side identified [99] (word) ppuDataTransfer::size#1 ← sizeof (const to_nomodify byte*) h_bar_tilemap +Constant right-side identified [103] (byte*~) main::enableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [106] (byte*~) main::enableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [109] (byte*~) main::$55 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [212] (byte*~) vblank::$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [215] (byte*~) vblank::$4 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [219] (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [223] (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$4 ← (byte*)(const struct RICOH_2A03*) APU +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte*) ppuDataFill::ppuDataPrepare1_$4 = (byte*)PPU +Constant (const byte*) ppuDataFill::ppuDataPrepare1_$5 = (byte*)PPU +Constant (const word) ppuDataFill::i#0 = 0 +Constant (const byte*) ppuDataFill::ppuDataPut1_$1 = (byte*)PPU +Constant (const byte*) ppuDataTransfer::ppuDataPrepare1_$4 = (byte*)PPU +Constant (const byte*) ppuDataTransfer::ppuDataPrepare1_$5 = (byte*)PPU +Constant (const word) ppuDataTransfer::i#0 = 0 +Constant (const byte*) ppuDataTransfer::ppuDataPut1_$1 = (byte*)PPU +Constant (const byte*) main::initNES1_disableVideoOutput1_$2 = (byte*)PPU +Constant (const byte*) main::initNES1_disableVideoOutput1_$3 = (byte*)PPU +Constant (const byte*) main::initNES1_disableAudioOutput1_$1 = (byte*)APU +Constant (const byte*) main::initNES1_waitForVBlank1_$3 = (byte*)PPU +Constant (const byte) main::initNES1_i#0 = 0 +Constant (const byte*) main::initNES1_waitForVBlank2_$3 = (byte*)PPU +Constant (const word) ppuDataTransfer::size#0 = sizeof palette +Constant (const nomodify void*) ppuDataTransfer::ppuData#0 = (void*)PPU_PALETTE +Constant (const nomodify void*) ppuDataTransfer::cpuData#0 = (void*)palette +Constant (const nomodify void*) ppuDataFill::ppuData#0 = (void*)PPU_NAME_TABLE_0 +Constant (const byte) ppuDataFill::val#0 = 0 +Constant (const word) ppuDataFill::size#0 = (unumber)$20*$1e +Constant (const nomodify void*) ppuDataFill::ppuData#1 = (void*)PPU_ATTRIBUTE_TABLE_0 +Constant (const byte) ppuDataFill::val#1 = 0 +Constant (const word) ppuDataFill::size#1 = $40 +Constant (const word) ppuDataTransfer::size#1 = sizeof h_bar_tilemap +Constant (const nomodify void*) ppuDataTransfer::ppuData#1 = (void*) 8256 +Constant (const nomodify void*) ppuDataTransfer::cpuData#1 = (void*)h_bar_tilemap +Constant (const byte*) main::enableVideoOutput1_$2 = (byte*)PPU +Constant (const byte*) main::enableVideoOutput1_$3 = (byte*)PPU +Constant (const byte*) main::$55 = (byte*)PPU +Constant (const byte) main::i#0 = 0 +Constant (const byte) main::active_balls#0 = 0 +Constant (const byte) main::timer#0 = 0 +Constant (const byte) main::timer_2#0 = 0 +Constant (const byte) main::h_bar#0 = $80 +Constant (const byte) main::sprite_idx#0 = 0 +Constant (const byte) main::i#1 = 0 +Constant (const signed word) main::return#0 = 0 +Constant (const byte) main::sprite_idx#1 = 0 +Constant (const byte) main::i#3 = 0 +Constant (const byte) main::timer#2 = 0 +Constant (const byte*) vblank::$3 = (byte*)PPU +Constant (const byte*) vblank::$4 = (byte*)PPU +Constant (const struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 = SPRITE_BUFFER +Constant (const byte*) vblank::ppuSpriteBufferDmaTransfer1_$3 = (byte*)PPU +Constant (const byte*) vblank::ppuSpriteBufferDmaTransfer1_$4 = (byte*)APU +Constant (const word) rand_state#19 = 1 +Successful SSA optimization Pass2ConstantIdentification +Constant (const signed word) main::return#2 = main::return#0 +Successful SSA optimization Pass2ConstantIdentification +if() condition always true - replacing block destination [139] if((number) 0!=(number) 1) goto main::@4 +Successful SSA optimization Pass2ConstantIfs +Converting *(pointer+n) to pointer[n] [4] *((byte*~) ppuDataFill::ppuDataPrepare1_$2) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- *(ppuDataFill::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [8] *((byte*~) ppuDataFill::ppuDataPrepare1_$3) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- *(ppuDataFill::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [15] *((byte*~) ppuDataFill::ppuDataPut1_$0) ← (byte) ppuDataFill::val#4 -- *(ppuDataFill::ppuDataPut1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) +Converting *(pointer+n) to pointer[n] [22] *((byte*~) ppuDataTransfer::ppuDataPrepare1_$2) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- *(ppuDataTransfer::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [26] *((byte*~) ppuDataTransfer::ppuDataPrepare1_$3) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 -- *(ppuDataTransfer::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [35] *((byte*~) ppuDataTransfer::ppuDataPut1_$0) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- *(ppuDataTransfer::ppuDataPut1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) +Converting *(pointer+n) to pointer[n] [52] *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (byte) 0 -- *(main::initNES1_disableVideoOutput1_$2 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) +Converting *(pointer+n) to pointer[n] [55] *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (byte) 0 -- *(main::initNES1_disableVideoOutput1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUMASK) +Converting *(pointer+n) to pointer[n] [59] *((byte*~) main::initNES1_disableAudioOutput1_$0) ← (byte) $40 -- *(main::initNES1_disableAudioOutput1_$1 + OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) +Converting *(pointer+n) to pointer[n] [64] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (byte) $80 -- *(main::initNES1_waitForVBlank1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) +Converting *(pointer+n) to pointer[n] [83] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (byte) $80 -- *(main::initNES1_waitForVBlank2_$3 + OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) +Converting *(pointer+n) to pointer[n] [105] *((byte*~) main::enableVideoOutput1_$0) ← (byte) $80 -- *(main::enableVideoOutput1_$2 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) +Converting *(pointer+n) to pointer[n] [108] *((byte*~) main::enableVideoOutput1_$1) ← (byte) $1e -- *(main::enableVideoOutput1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUMASK) +Converting *(pointer+n) to pointer[n] [111] *((byte*~) main::$54) ← (byte) $88 -- *(main::$55 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) +Converting *(pointer+n) to pointer[n] [214] *((byte*~) vblank::$1) ← (byte) 0 -- *(vblank::$3 + OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) +Converting *(pointer+n) to pointer[n] [217] *((byte*~) vblank::$2) ← (volatile byte) scroll_y -- *(vblank::$4 + OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) +Converting *(pointer+n) to pointer[n] [221] *((byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1) ← (byte) 0 -- *(vblank::ppuSpriteBufferDmaTransfer1_$3 + OFFSET_STRUCT_RICOH_2C02_OAMADDR) +Converting *(pointer+n) to pointer[n] [225] *((byte*~) vblank::ppuSpriteBufferDmaTransfer1_$2) ← (byte~) vblank::ppuSpriteBufferDmaTransfer1_$0 -- *(vblank::ppuSpriteBufferDmaTransfer1_$4 + OFFSET_STRUCT_RICOH_2A03_OAMDMA) +Successful SSA optimization Pass2InlineDerefIdx +Simplifying expression containing zero main::initNES1_disableVideoOutput1_$2 in [51] (byte*~) main::initNES1_disableVideoOutput1_$0 ← (const byte*) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL +Simplifying expression containing zero main::initNES1_disableVideoOutput1_$2 in [52] *((const byte*) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) 0 +Simplifying expression containing zero MEMORY in [69] *((const nomodify byte*) MEMORY+(byte) 0 + (byte) main::initNES1_i#2) ← (byte) 0 +Simplifying expression containing zero main::enableVideoOutput1_$2 in [104] (byte*~) main::enableVideoOutput1_$0 ← (const byte*) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL +Simplifying expression containing zero main::enableVideoOutput1_$2 in [105] *((const byte*) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) $80 +Simplifying expression containing zero main::$55 in [110] (byte*~) main::$54 ← (const byte*) main::$55 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL +Simplifying expression containing zero main::$55 in [111] *((const byte*) main::$55 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) $88 +Simplifying expression containing zero (word*)balls in [156] *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$37) ← (byte) 0 +Simplifying expression containing zero (word*)balls in [163] *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$39) ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$39) + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$39) +Simplifying expression containing zero (word*)balls in [163] *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$39) ← *((word*)(const struct $0*) balls + (byte~) main::$39) + *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_VELOCITY + (byte~) main::$39) +Simplifying expression containing zero (word*)balls in [169] (word~) main::$20 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$42) >> (byte) 8 +Simplifying expression containing zero (byte*)SPRITE_BUFFER in [188] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_Y + (byte~) main::$47) ← (byte)(word~) main::$32 +Simplifying expression containing zero (word*)balls in [194] (word~) main::$33 ← *((word*)(const struct $0*) balls+(const byte) OFFSET_STRUCT_$0_X_POSITION + (byte~) main::$50) >> (byte) 8 +Successful SSA optimization PassNSimplifyExpressionWithZero +Eliminating unused variable (byte*~) ppuDataFill::ppuDataPrepare1_$2 and assignment [2] (byte*~) ppuDataFill::ppuDataPrepare1_$2 ← (const byte*) ppuDataFill::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataFill::ppuDataPrepare1_$3 and assignment [5] (byte*~) ppuDataFill::ppuDataPrepare1_$3 ← (const byte*) ppuDataFill::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataFill::ppuDataPut1_$0 and assignment [9] (byte*~) ppuDataFill::ppuDataPut1_$0 ← (const byte*) ppuDataFill::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA +Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 and assignment [15] (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 ← (const byte*) ppuDataTransfer::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 and assignment [18] (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 ← (const byte*) ppuDataTransfer::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPut1_$0 and assignment [24] (byte*~) ppuDataTransfer::ppuDataPut1_$0 ← (const byte*) ppuDataTransfer::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA +Eliminating unused variable (byte*~) main::initNES1_disableVideoOutput1_$0 and assignment [39] (byte*~) main::initNES1_disableVideoOutput1_$0 ← (const byte*) main::initNES1_disableVideoOutput1_$2 +Eliminating unused variable (byte*~) main::initNES1_disableVideoOutput1_$1 and assignment [41] (byte*~) main::initNES1_disableVideoOutput1_$1 ← (const byte*) main::initNES1_disableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK +Eliminating unused variable (byte*~) main::initNES1_disableAudioOutput1_$0 and assignment [44] (byte*~) main::initNES1_disableAudioOutput1_$0 ← (const byte*) main::initNES1_disableAudioOutput1_$1 + (const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ +Eliminating unused variable (byte*~) main::initNES1_waitForVBlank1_$2 and assignment [47] (byte*~) main::initNES1_waitForVBlank1_$2 ← (const byte*) main::initNES1_waitForVBlank1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS +Eliminating unused variable (byte*~) main::initNES1_waitForVBlank2_$2 and assignment [61] (byte*~) main::initNES1_waitForVBlank2_$2 ← (const byte*) main::initNES1_waitForVBlank2_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS +Eliminating unused variable (byte*~) main::enableVideoOutput1_$0 and assignment [69] (byte*~) main::enableVideoOutput1_$0 ← (const byte*) main::enableVideoOutput1_$2 +Eliminating unused variable (byte*~) main::enableVideoOutput1_$1 and assignment [71] (byte*~) main::enableVideoOutput1_$1 ← (const byte*) main::enableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK +Eliminating unused variable (byte*~) main::$54 and assignment [73] (byte*~) main::$54 ← (const byte*) main::$55 +Eliminating unused variable (byte*~) vblank::$1 and assignment [151] (byte*~) vblank::$1 ← (const byte*) vblank::$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL +Eliminating unused variable (byte*~) vblank::$2 and assignment [153] (byte*~) vblank::$2 ← (const byte*) vblank::$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL +Eliminating unused variable (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1 and assignment [155] (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$1 ← (const byte*) vblank::ppuSpriteBufferDmaTransfer1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR +Eliminating unused variable (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$2 and assignment [158] (byte*~) vblank::ppuSpriteBufferDmaTransfer1_$2 ← (const byte*) vblank::ppuSpriteBufferDmaTransfer1_$4 + (const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA +Eliminating unused constant (const byte) main::i#0 +Eliminating unused constant (const byte) main::h_bar#0 +Eliminating unused constant (const byte) main::sprite_idx#0 +Eliminating unused constant (const signed word) main::return#2 +Eliminating unused constant (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL +Eliminating unused constant (const byte) OFFSET_STRUCT_$0_X_POSITION +Eliminating unused constant (const byte) OFFSET_STRUCT_SPRITEDATA_Y +Successful SSA optimization PassNEliminateUnusedVars +Eliminating unused constant (const signed word) main::return#0 +Successful SSA optimization PassNEliminateUnusedVars +Removing unused block main::@5 +Removing unused block main::@return +Successful SSA optimization Pass2EliminateUnusedBlocks +Resolving array sizeof() sizeof (const to_nomodify byte*) palette +Resolving array sizeof() sizeof (const to_nomodify byte*) h_bar_tilemap +Successful SSA optimization PassNSizeOfSimplification +Alias candidate removed (volatile)scroll_y = main::$14 +Alias main::$38 = main::$37 +Alias main::$40 = main::$39 main::$41 main::$42 +Alias main::$44 = main::$43 +Alias main::$48 = main::$47 main::$49 main::$51 +Alias main::$50 = main::$46 +Alias main::$53 = main::$52 +Successful SSA optimization Pass2AliasElimination +Alias candidate removed (volatile)scroll_y = main::$14 +Simple Condition (bool~) main::$24 [104] if((word~) main::$23>=(byte) main::h_bar#1) goto main::@26 +Simple Condition (bool~) main::$27 [137] if((word~) main::$25<(byte~) main::$26) goto main::@13 +Successful SSA optimization Pass2ConditionalJumpSimplification +Negating conditional jump and destination [104] if((word~) main::$23<(byte) main::h_bar#1) goto main::@11 +Negating conditional jump and destination [137] if((word~) main::$25>=(byte~) main::$26) goto main::@11 +Successful SSA optimization Pass2ConditionalJumpSequenceImprovement +Constant right-side identified [129] (byte~) vblank::ppuSpriteBufferDmaTransfer1_$0 ← > (const struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 +Successful SSA optimization Pass2ConstantRValueConsolidation +Constant (const byte) vblank::ppuSpriteBufferDmaTransfer1_$0 = >vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 +Successful SSA optimization Pass2ConstantIdentification +Adding number conversion cast (unumber) $20 in +Adding number conversion cast (unumber) $20 in +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast $20 +Simplifying constant integer cast $20 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $20 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Alias candidate removed (volatile)scroll_y = main::$14 +Alias candidate removed (volatile)scroll_y = main::$14 +Inlining Noop Cast [15] (byte*) ppuDataTransfer::cpuSrc#0 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 keeping ppuDataTransfer::cpuData#2 +Successful SSA optimization Pass2NopCastInlining +Rewriting multiplication to use shift [67] (byte~) main::$35 ← (byte) main::i#14 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [73] (byte~) main::$36 ← (byte) main::i#14 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [86] (byte~) main::$38 ← (byte) main::active_balls#1 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [91] (byte~) main::$40 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [98] (byte~) main::$44 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [103] (byte~) main::$45 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [105] (byte~) main::$50 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Rewriting multiplication to use shift [107] (byte~) main::$48 ← (byte) main::sprite_idx#3 * (const byte) SIZEOF_STRUCT_SPRITEDATA +Rewriting multiplication to use shift [115] (byte~) main::$53 ← (byte) main::i#10 * (const byte) SIZEOF_STRUCT_$0 +Successful SSA optimization Pass2MultiplyToShiftRewriting +Inlining constant with var siblings (const word) ppuDataFill::i#0 +Inlining constant with different constant siblings (const nomodify void*) ppuDataFill::ppuData#0 +Inlining constant with var siblings (const byte) ppuDataFill::val#0 +Inlining constant with var siblings (const word) ppuDataFill::size#0 +Inlining constant with different constant siblings (const nomodify void*) ppuDataFill::ppuData#1 +Inlining constant with var siblings (const byte) ppuDataFill::val#1 +Inlining constant with var siblings (const word) ppuDataFill::size#1 +Inlining constant with var siblings (const word) ppuDataTransfer::i#0 +Inlining constant with var siblings (const word) ppuDataTransfer::size#0 +Inlining constant with different constant siblings (const nomodify void*) ppuDataTransfer::ppuData#0 +Inlining constant with var siblings (const nomodify void*) ppuDataTransfer::cpuData#0 +Inlining constant with var siblings (const word) ppuDataTransfer::size#1 +Inlining constant with different constant siblings (const nomodify void*) ppuDataTransfer::ppuData#1 +Inlining constant with var siblings (const nomodify void*) ppuDataTransfer::cpuData#1 +Inlining constant with var siblings (const byte) main::initNES1_i#0 +Inlining constant with var siblings (const byte) main::active_balls#0 +Inlining constant with var siblings (const byte) main::timer#0 +Inlining constant with var siblings (const byte) main::timer_2#0 +Inlining constant with var siblings (const byte) main::i#1 +Inlining constant with var siblings (const byte) main::sprite_idx#1 +Inlining constant with var siblings (const byte) main::i#3 +Inlining constant with var siblings (const byte) main::timer#2 +Inlining constant with var siblings (const word) rand_state#19 +Constant inlined OFFSET_STRUCT_$0_Y_POSITION = (byte) 2 +Constant inlined ppuDataTransfer::i#0 = (word) 0 +Constant inlined main::active_balls#0 = (byte) 0 +Constant inlined OFFSET_STRUCT_$0_X_VELOCITY = (byte) 4 +Constant inlined main::enableVideoOutput1_$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined main::enableVideoOutput1_$2 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataTransfer::ppuDataPut1_$1 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFill::val#1 = (byte) 0 +Constant inlined ppuDataFill::ppuDataPut1_$1 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined main::$55 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFill::val#0 = (byte) 0 +Constant inlined vblank::$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined OFFSET_STRUCT_$0_Y_VELOCITY = (byte) 6 +Constant inlined vblank::$4 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined main::initNES1_waitForVBlank2_$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFill::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataTransfer::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFill::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataTransfer::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined main::initNES1_disableVideoOutput1_$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined main::initNES1_disableVideoOutput1_$2 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFill::ppuData#1 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 +Constant inlined ppuDataFill::ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 +Constant inlined main::i#1 = (byte) 0 +Constant inlined main::initNES1_disableAudioOutput1_$1 = (byte*)(const struct RICOH_2A03*) APU +Constant inlined ppuDataTransfer::cpuData#1 = (void*)(const to_nomodify byte*) h_bar_tilemap +Constant inlined ppuDataTransfer::cpuData#0 = (void*)(const to_nomodify byte*) palette +Constant inlined ppuDataTransfer::ppuData#1 = (void*) 8256 +Constant inlined ppuDataTransfer::ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE +Constant inlined main::timer_2#0 = (byte) 0 +Constant inlined main::i#3 = (byte) 0 +Constant inlined main::initNES1_i#0 = (byte) 0 +Constant inlined rand_state#19 = (word) 1 +Constant inlined ppuDataTransfer::size#1 = (byte) $20*(const byte) SIZEOF_BYTE +Constant inlined ppuDataTransfer::size#0 = (byte) $20*(const byte) SIZEOF_BYTE +Constant inlined main::timer#0 = (byte) 0 +Constant inlined vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer#0 = (const struct SpriteData*) SPRITE_BUFFER +Constant inlined main::timer#2 = (byte) 0 +Constant inlined main::initNES1_waitForVBlank1_$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined SIZEOF_STRUCT_$0 = (byte) 8 +Constant inlined vblank::ppuSpriteBufferDmaTransfer1_$0 = >(const struct SpriteData*) SPRITE_BUFFER +Constant inlined ppuDataFill::size#1 = (byte) $40 +Constant inlined ppuDataFill::size#0 = (word)(number) $20*(number) $1e +Constant inlined main::sprite_idx#1 = (byte) 0 +Constant inlined vblank::ppuSpriteBufferDmaTransfer1_$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFill::i#0 = (word) 0 +Constant inlined vblank::ppuSpriteBufferDmaTransfer1_$4 = (byte*)(const struct RICOH_2A03*) APU +Successful SSA optimization Pass2ConstantInlining +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK) +Consolidated array index constant in *((byte*)APU+OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) +Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_OAMADDR) +Consolidated array index constant in *((byte*)APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA) +Successful SSA optimization Pass2ConstantAdditionElimination +Alias candidate removed (volatile)scroll_y = main::$14 +Identical Phi Values (byte) ppuDataFill::val#4 (byte) 0 +Identical Phi Values (word) ppuDataTransfer::size#3 (byte) $20*(const byte) SIZEOF_BYTE +Successful SSA optimization Pass2IdenticalPhiElimination +Eliminating unused constant (const byte) SIZEOF_STRUCT_SPRITEDATA +Successful SSA optimization PassNEliminateUnusedVars +Alias candidate removed (volatile)scroll_y = main::$14 +Added new block during phi lifting main::@27(between main::initNES1_@1 and main::initNES1_@1) +Added new block during phi lifting main::@28(between main::@16 and main::@6) +Added new block during phi lifting main::@29(between main::@4 and main::@6) +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::initNES1_waitForVBlank1 +Adding NOP phi() at start of main::initNES1_@6 +Adding NOP phi() at start of main::initNES1_waitForVBlank2 +Adding NOP phi() at start of main::@18 +Adding NOP phi() at start of main::@20 +Adding NOP phi() at start of main::@21 +Adding NOP phi() at start of main::@22 +Adding NOP phi() at start of main::@23 +Adding NOP phi() at start of ppuDataFill::@3 +Adding NOP phi() at start of ppuDataFill::@2 +CALL GRAPH +Calls in [__start] to main:4 +Calls in [main] to ppuDataTransfer:40 ppuDataFill:42 ppuDataFill:44 ppuDataTransfer:46 rand:113 rand:120 + +Created 18 initial phi equivalence classes +Coalesced [65] main::active_balls#22 ← main::active_balls#1 +Coalesced [73] main::timer_2#20 ← main::timer_2#1 +Coalesced [74] main::active_balls#20 ← main::active_balls#8 +Coalesced [75] main::timer#20 ← main::timer#15 +Coalesced [106] main::i#16 ← main::i#4 +Coalesced [107] main::sprite_idx#9 ← main::sprite_idx#2 +Coalesced (already) [108] main::active_balls#21 ← main::active_balls#2 +Not coalescing [109] main::timer#21 ← main::timer#1 +Coalesced (already) [110] main::active_balls#23 ← main::active_balls#2 +Coalesced (already) [111] main::timer#22 ← main::timer#3 +Coalesced [112] rand_state#54 ← rand_state#17 +Coalesced [119] rand_state#55 ← rand_state#11 +Coalesced [127] main::i#15 ← main::i#2 +Coalesced (already) [128] rand_state#56 ← rand_state#11 +Coalesced [129] main::initNES1_i#3 ← main::initNES1_i#1 +Coalesced [143] ppuDataTransfer::i#6 ← ppuDataTransfer::i#1 +Coalesced [144] ppuDataTransfer::cpuSrc#7 ← ppuDataTransfer::cpuSrc#1 +Coalesced [157] ppuDataFill::i#6 ← ppuDataFill::i#1 +Coalesced down to 16 phi equivalence classes +Culled Empty Block (label) __start::@2 +Culled Empty Block (label) main::initNES1_@6 +Culled Empty Block (label) main::@23 +Culled Empty Block (label) main::@29 +Culled Empty Block (label) main::@27 +Culled Empty Block (label) ppuDataFill::@3 +Culled Empty Block (label) ppuDataFill::@2 +Renumbering block ppuDataFill::@4 to ppuDataFill::@2 +Renumbering block main::@6 to main::@5 +Renumbering block main::@7 to main::@6 +Renumbering block main::@8 to main::@7 +Renumbering block main::@9 to main::@8 +Renumbering block main::@10 to main::@9 +Renumbering block main::@11 to main::@10 +Renumbering block main::@12 to main::@11 +Renumbering block main::@13 to main::@12 +Renumbering block main::@14 to main::@13 +Renumbering block main::@15 to main::@14 +Renumbering block main::@16 to main::@15 +Renumbering block main::@17 to main::@16 +Renumbering block main::@18 to main::@17 +Renumbering block main::@19 to main::@18 +Renumbering block main::@20 to main::@19 +Renumbering block main::@21 to main::@20 +Renumbering block main::@22 to main::@21 +Renumbering block main::@24 to main::@22 +Renumbering block main::@25 to main::@23 +Renumbering block main::@26 to main::@24 +Renumbering block main::@28 to main::@25 +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::initNES1_waitForVBlank1 +Adding NOP phi() at start of main::initNES1_waitForVBlank2 +Adding NOP phi() at start of main::@17 +Adding NOP phi() at start of main::@19 +Adding NOP phi() at start of main::@20 +Adding NOP phi() at start of main::@21 +Adding NOP phi() at start of main::@2 + +FINAL CONTROL FLOW GRAPH + +(void()) __start() +__start: scope:[__start] from + [0] phi() + to:__start::__init1 +__start::__init1: scope:[__start] from __start + [1] (volatile byte) scroll_y ← (byte) 0 + [2] (volatile byte) vblank_hit ← (byte) 0 + to:__start::@1 +__start::@1: scope:[__start] from __start::__init1 + [3] phi() + [4] call main + to:__start::@return +__start::@return: scope:[__start] from __start::@1 + [5] return + to:@return + +interrupt(HARDWARE_STACK)(void()) vblank() +vblank: scope:[vblank] from + [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 + [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y + to:vblank::ppuSpriteBufferDmaTransfer1 +vblank::ppuSpriteBufferDmaTransfer1: scope:[vblank] from vblank + [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 + [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER + to:vblank::@1 +vblank::@1: scope:[vblank] from vblank::ppuSpriteBufferDmaTransfer1 + [10] (volatile byte) vblank_hit ← ++ (volatile byte) vblank_hit + to:vblank::@return +vblank::@return: scope:[vblank] from vblank::@1 + [11] return + to:@return + +(signed word()) main() +main: scope:[main] from __start::@1 + [12] phi() + to:main::initNES1 +main::initNES1: scope:[main] from main + asm { cld ldx#$ff txs } + to:main::initNES1_disableVideoOutput1 +main::initNES1_disableVideoOutput1: scope:[main] from main::initNES1 + [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 + [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 + to:main::initNES1_disableAudioOutput1 +main::initNES1_disableAudioOutput1: scope:[main] from main::initNES1_disableVideoOutput1 + [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 + [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 + to:main::initNES1_clearVBlankFlag1 +main::initNES1_clearVBlankFlag1: scope:[main] from main::initNES1_disableAudioOutput1 + asm { ldaPPU_PPUSTATUS } + to:main::initNES1_waitForVBlank1 +main::initNES1_waitForVBlank1: scope:[main] from main::initNES1_clearVBlankFlag1 + [19] phi() + to:main::initNES1_waitForVBlank1_@1 +main::initNES1_waitForVBlank1_@1: scope:[main] from main::initNES1_waitForVBlank1 main::initNES1_waitForVBlank1_@1 + [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 + [21] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 + to:main::initNES1_@1 +main::initNES1_@1: scope:[main] from main::initNES1_@1 main::initNES1_waitForVBlank1_@1 + [22] (byte) main::initNES1_i#2 ← phi( main::initNES1_@1/(byte) main::initNES1_i#1 main::initNES1_waitForVBlank1_@1/(byte) 0 ) + [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 + [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 + [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 + [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 + [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 + [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 + [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 + [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 + [31] (byte) main::initNES1_i#1 ← ++ (byte) main::initNES1_i#2 + [32] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 + to:main::initNES1_waitForVBlank2 +main::initNES1_waitForVBlank2: scope:[main] from main::initNES1_@1 + [33] phi() + to:main::initNES1_waitForVBlank2_@1 +main::initNES1_waitForVBlank2_@1: scope:[main] from main::initNES1_waitForVBlank2 main::initNES1_waitForVBlank2_@1 + [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 + [35] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 + to:main::initNES1_@7 +main::initNES1_@7: scope:[main] from main::initNES1_waitForVBlank2_@1 + asm { ldaPPU_PPUSTATUS } + to:main::@17 +main::@17: scope:[main] from main::initNES1_@7 + [37] phi() + [38] call ppuDataTransfer + to:main::@19 +main::@19: scope:[main] from main::@17 + [39] phi() + [40] call ppuDataFill + to:main::@20 +main::@20: scope:[main] from main::@19 + [41] phi() + [42] call ppuDataFill + to:main::@21 +main::@21: scope:[main] from main::@20 + [43] phi() + [44] call ppuDataTransfer + to:main::enableVideoOutput1 +main::enableVideoOutput1: scope:[main] from main::@21 + [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 + [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e + to:main::@18 +main::@18: scope:[main] from main::enableVideoOutput1 + [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 + to:main::@1 +main::@1: scope:[main] from main::@18 main::@23 + [48] (word) rand_state#17 ← phi( main::@18/(word) 1 main::@23/(word) rand_state#11 ) + [48] (byte) main::i#14 ← phi( main::@18/(byte) 0 main::@23/(byte) main::i#2 ) + [49] if((byte) main::i#14<(byte) $20) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@1 main::@14 + [50] (byte) main::timer#3 ← phi( main::@1/(byte) 0 main::@14/(byte) main::timer#15 ) + [50] (byte) main::active_balls#2 ← phi( main::@1/(byte) 0 main::@14/(byte) main::active_balls#8 ) + [50] (byte) main::timer_2#2 ← phi( main::@1/(byte) 0 main::@14/(byte) main::timer_2#1 ) + to:main::@4 +main::@4: scope:[main] from main::@3 + [51] (byte) main::timer_2#1 ← ++ (byte) main::timer_2#2 + [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 + [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff + [54] (volatile byte) scroll_y ← (byte~) main::$14 + [55] if((byte) main::active_balls#2>=(byte) $20) goto main::@5 + to:main::@15 +main::@15: scope:[main] from main::@4 + [56] (byte) main::timer#1 ← ++ (byte) main::timer#3 + [57] if((byte) main::timer#3!=(byte) 9) goto main::@25 + to:main::@16 +main::@16: scope:[main] from main::@15 + [58] (byte) main::active_balls#1 ← ++ (byte) main::active_balls#2 + [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 + [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 + [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 + to:main::@5 +main::@5: scope:[main] from main::@16 main::@25 main::@4 + [62] (byte) main::timer#15 ← phi( main::@25/(byte) main::timer#21 main::@16/(byte) 0 main::@4/(byte) main::timer#3 ) + [62] (byte) main::active_balls#8 ← phi( main::@25/(byte) main::active_balls#2 main::@16/(byte) main::active_balls#1 main::@4/(byte) main::active_balls#2 ) + to:main::@6 +main::@6: scope:[main] from main::@10 main::@5 + [63] (byte) main::sprite_idx#3 ← phi( main::@10/(byte) main::sprite_idx#2 main::@5/(byte) 0 ) + [63] (byte) main::i#10 ← phi( main::@10/(byte) main::i#4 main::@5/(byte) 0 ) + [64] if((byte) main::i#10<(byte) main::active_balls#8) goto main::@7 + to:main::@8 +main::@8: scope:[main] from main::@6 + [65] *((byte*) 8193) ← (byte) $98 + to:main::@13 +main::@13: scope:[main] from main::@13 main::@8 + [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 + to:main::@14 +main::@14: scope:[main] from main::@13 + [67] (volatile byte) vblank_hit ← (byte) 0 + [68] *((byte*) 8193) ← (byte) $18 + to:main::@3 +main::@7: scope:[main] from main::@6 + [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 + [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) + [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 + [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 + [74] if((word~) main::$20>=(byte) 8) goto main::@9 + to:main::@11 +main::@11: scope:[main] from main::@7 + [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 + [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff + to:main::@9 +main::@9: scope:[main] from main::@11 main::@7 + [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 + [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 + [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 + [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 + [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 + to:main::@24 +main::@24: scope:[main] from main::@9 + [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 + to:main::@12 +main::@12: scope:[main] from main::@24 + [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 + [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff + [85] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2 + [86] (word~) main::$56 ← (word)(byte~) main::$30 + [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 + [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 + to:main::@10 +main::@10: scope:[main] from main::@12 main::@24 main::@9 + [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 + [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 + [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 + [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 + [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a + [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 + [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 + [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 + [97] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 + [98] (byte) main::i#4 ← ++ (byte) main::i#10 + to:main::@6 +main::@25: scope:[main] from main::@15 + [99] (byte) main::timer#21 ← (byte) main::timer#1 + to:main::@5 +main::@2: scope:[main] from main::@1 + [100] phi() + [101] call rand + [102] (word) rand::return#2 ← (word) rand::return#0 + to:main::@22 +main::@22: scope:[main] from main::@2 + [103] (word~) main::$9 ← (word) rand::return#2 + [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff + [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 + [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 + [107] call rand + [108] (word) rand::return#3 ← (word) rand::return#0 + to:main::@23 +main::@23: scope:[main] from main::@22 + [109] (word~) main::$11 ← (word) rand::return#3 + [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff + [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 + [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 + [113] (byte) main::i#2 ← ++ (byte) main::i#14 + to:main::@1 + +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +ppuDataTransfer: scope:[ppuDataTransfer] from main::@17 main::@21 + [114] (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( main::@17/(void*)(const to_nomodify byte*) palette main::@21/(void*)(const to_nomodify byte*) h_bar_tilemap ) + [114] (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← phi( main::@17/(void*)(const nomodify byte*) PPU_PALETTE main::@21/(void*) 8256 ) + to:ppuDataTransfer::ppuDataPrepare1 +ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer + [115] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [116] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 + [117] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [118] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 + to:ppuDataTransfer::@3 +ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 + [119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 + to:ppuDataTransfer::@1 +ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 + [120] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#6 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) + [120] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) 0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) + [121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 + to:ppuDataTransfer::@return +ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 + [122] return + to:@return +ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 + [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) + to:ppuDataTransfer::ppuDataPut1 +ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 + [124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 + to:ppuDataTransfer::@4 +ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 + [125] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 + [126] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 + to:ppuDataTransfer::@1 + +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +ppuDataFill: scope:[ppuDataFill] from main::@19 main::@20 + [127] (word) ppuDataFill::size#3 ← phi( main::@19/(word)(number) $20*(number) $1e main::@20/(byte) $40 ) + [127] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( main::@19/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 main::@20/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 ) + to:ppuDataFill::ppuDataPrepare1 +ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill + [128] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [129] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 + [130] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [131] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 + to:ppuDataFill::@1 +ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 + [132] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) + [133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 + to:ppuDataFill::@return +ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 + [134] return + to:@return +ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 + [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 + to:ppuDataFill::@2 +ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 + [136] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 + to:ppuDataFill::@1 + +(word()) rand() +rand: scope:[rand] from main::@2 main::@22 + [137] (word) rand_state#10 ← phi( main::@2/(word) rand_state#17 main::@22/(word) rand_state#11 ) + [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 + [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 + [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 + [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 + [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 + [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 + [144] (word) rand::return#0 ← (word) rand_state#11 + to:rand::@return +rand::@return: scope:[rand] from rand + [145] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(word) $0::x_position +(word) $0::x_velocity +(word) $0::y_position +(word) $0::y_velocity +(byte) RICOH_2A03::DMC_FREQ +(byte) RICOH_2A03::DMC_LEN +(byte) RICOH_2A03::DMC_RAW +(byte) RICOH_2A03::DMC_START +(byte) RICOH_2A03::JOY1 +(byte) RICOH_2A03::JOY2 +(byte) RICOH_2A03::NOISE_HI +(byte) RICOH_2A03::NOISE_LO +(byte) RICOH_2A03::NOISE_VOL +(byte) RICOH_2A03::OAMDMA +(byte) RICOH_2A03::SND_CHN +(byte) RICOH_2A03::SQ1_HI +(byte) RICOH_2A03::SQ1_LO +(byte) RICOH_2A03::SQ1_SWEEP +(byte) RICOH_2A03::SQ1_VOL +(byte) RICOH_2A03::SQ2_HI +(byte) RICOH_2A03::SQ2_LO +(byte) RICOH_2A03::SQ2_SWEEP +(byte) RICOH_2A03::SQ2_VOL +(byte) RICOH_2A03::TRI_HI +(byte) RICOH_2A03::TRI_LINEAR +(byte) RICOH_2A03::TRI_LO +(byte) RICOH_2A03::UNUSED1 +(byte) RICOH_2A03::UNUSED2 +(byte) RICOH_2C02::OAMADDR +(byte) RICOH_2C02::OAMDATA +(byte) RICOH_2C02::PPUADDR +(byte) RICOH_2C02::PPUCTRL +(byte) RICOH_2C02::PPUDATA +(byte) RICOH_2C02::PPUMASK +(byte) RICOH_2C02::PPUSCROLL +(volatile byte) RICOH_2C02::PPUSTATUS loadstore +(byte) SpriteData::attributes +(byte) SpriteData::tile +(byte) SpriteData::x +(byte) SpriteData::y +(void()) __start() +(signed word()) main() +(word~) main::$10 101.0 +(word~) main::$11 202.0 +(byte~) main::$12 101.0 +(byte~) main::$14 202.0 +(word~) main::$20 2002.0 +(word~) main::$23 667.3333333333334 +(word~) main::$25 667.3333333333334 +(byte~) main::$26 1001.0 +(byte~) main::$30 1001.0 +(word~) main::$31 2002.0 +(word~) main::$32 500.5 +(word~) main::$33 1001.0 +(byte~) main::$35 202.0 +(byte~) main::$36 202.0 +(byte~) main::$38 151.5 +(byte~) main::$40 2502.5 +(byte~) main::$44 1501.5 +(byte~) main::$45 3003.0 +(byte~) main::$48 1001.0 +(byte~) main::$50 500.5 +(byte~) main::$53 800.8 +(word~) main::$56 2002.0 +(word~) main::$9 202.0 +(byte) main::active_balls +(byte) main::active_balls#1 75.75 +(byte) main::active_balls#2 56.11111111111111 +(byte) main::active_balls#8 37.97297297297297 +(byte) main::h_bar +(byte) main::h_bar#1 72.8409090909091 +(byte) main::i +(byte) main::i#10 258.3225806451613 +(byte) main::i#14 33.666666666666664 +(byte) main::i#2 202.0 +(byte) main::i#4 2002.0 +(byte) main::initNES1_i +(byte) main::initNES1_i#1 151.5 +(byte) main::initNES1_i#2 112.22222222222223 +(byte~) main::initNES1_waitForVBlank1_$0 202.0 +(byte~) main::initNES1_waitForVBlank2_$0 202.0 +(signed word) main::return +(byte) main::sprite_idx +(byte) main::sprite_idx#2 1001.0 +(byte) main::sprite_idx#3 100.1 +(byte) main::timer +(byte) main::timer#1 101.0 +(byte) main::timer#15 8.18918918918919 +(byte) main::timer#21 202.0 +(byte) main::timer#3 57.714285714285715 +(byte) main::timer_2 +(byte) main::timer_2#1 6.183673469387754 +(byte) main::timer_2#2 202.0 +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +(word) ppuDataFill::i +(word) ppuDataFill::i#1 2002.0 +(word) ppuDataFill::i#2 1001.0 +(nomodify void*) ppuDataFill::ppuData +(byte~) ppuDataFill::ppuDataPrepare1_$0 202.0 +(byte~) ppuDataFill::ppuDataPrepare1_$1 202.0 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 67.33333333333333 +(byte) ppuDataFill::ppuDataPut1_val +(word) ppuDataFill::size +(word) ppuDataFill::size#3 111.22222222222223 +(byte) ppuDataFill::val +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +(nomodify void*) ppuDataTransfer::cpuData +(nomodify void*) ppuDataTransfer::cpuData#2 +(byte*) ppuDataTransfer::cpuSrc +(byte*) ppuDataTransfer::cpuSrc#1 1001.0 +(byte*) ppuDataTransfer::cpuSrc#2 776.0 +(byte*) ppuDataTransfer::cpuSrc#6 202.0 +(word) ppuDataTransfer::i +(word) ppuDataTransfer::i#1 2002.0 +(word) ppuDataTransfer::i#2 600.5999999999999 +(nomodify void*) ppuDataTransfer::ppuData +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 202.0 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 202.0 +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 67.33333333333333 +(byte) ppuDataTransfer::ppuDataPut1_val +(byte) ppuDataTransfer::ppuDataPut1_val#0 2002.0 +(word) ppuDataTransfer::size +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length +(word()) rand() +(word~) rand::$0 2002.0 +(word~) rand::$1 2002.0 +(word~) rand::$2 2002.0 +(word) rand::return +(word) rand::return#0 300.75 +(word) rand::return#2 202.0 +(word) rand::return#3 202.0 +(word) rand_state +(word) rand_state#0 1501.5 +(word) rand_state#1 1501.5 +(word) rand_state#10 1102.0 +(word) rand_state#11 137.75 +(word) rand_state#17 67.33333333333333 +(volatile byte) scroll_y loadstore 105.0 +interrupt(HARDWARE_STACK)(void()) vblank() +(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer +(volatile byte) vblank_hit loadstore 10.25925925925926 + +Initial phi equivalence classes +[ main::initNES1_i#2 main::initNES1_i#1 ] +[ main::i#14 main::i#2 ] +[ main::timer_2#2 main::timer_2#1 ] +[ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +[ main::timer#3 main::timer#15 main::timer#21 ] +[ main::i#10 main::i#4 ] +[ main::sprite_idx#3 main::sprite_idx#2 ] +[ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] +[ ppuDataTransfer::cpuData#2 ] +[ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +[ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +[ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +[ ppuDataFill::size#3 ] +[ ppuDataFill::i#2 ppuDataFill::i#1 ] +[ rand_state#10 rand_state#17 rand_state#11 ] +Added variable scroll_y to live range equivalence class [ scroll_y ] +Added variable vblank_hit to live range equivalence class [ vblank_hit ] +Added variable main::initNES1_waitForVBlank1_$0 to live range equivalence class [ main::initNES1_waitForVBlank1_$0 ] +Added variable main::initNES1_waitForVBlank2_$0 to live range equivalence class [ main::initNES1_waitForVBlank2_$0 ] +Added variable main::h_bar#1 to live range equivalence class [ main::h_bar#1 ] +Added variable main::$14 to live range equivalence class [ main::$14 ] +Added variable main::timer#1 to live range equivalence class [ main::timer#1 ] +Added variable main::$38 to live range equivalence class [ main::$38 ] +Added variable main::$40 to live range equivalence class [ main::$40 ] +Added variable main::$20 to live range equivalence class [ main::$20 ] +Added variable main::$45 to live range equivalence class [ main::$45 ] +Added variable main::$44 to live range equivalence class [ main::$44 ] +Added variable main::$23 to live range equivalence class [ main::$23 ] +Added variable main::$25 to live range equivalence class [ main::$25 ] +Added variable main::$26 to live range equivalence class [ main::$26 ] +Added variable main::$53 to live range equivalence class [ main::$53 ] +Added variable main::$30 to live range equivalence class [ main::$30 ] +Added variable main::$56 to live range equivalence class [ main::$56 ] +Added variable main::$31 to live range equivalence class [ main::$31 ] +Added variable main::$50 to live range equivalence class [ main::$50 ] +Added variable main::$32 to live range equivalence class [ main::$32 ] +Added variable main::$48 to live range equivalence class [ main::$48 ] +Added variable main::$33 to live range equivalence class [ main::$33 ] +Added variable rand::return#2 to live range equivalence class [ rand::return#2 ] +Added variable main::$9 to live range equivalence class [ main::$9 ] +Added variable main::$10 to live range equivalence class [ main::$10 ] +Added variable main::$35 to live range equivalence class [ main::$35 ] +Added variable rand::return#3 to live range equivalence class [ rand::return#3 ] +Added variable main::$11 to live range equivalence class [ main::$11 ] +Added variable main::$12 to live range equivalence class [ main::$12 ] +Added variable main::$36 to live range equivalence class [ main::$36 ] +Added variable ppuDataTransfer::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataTransfer::ppuDataPrepare1_$0 ] +Added variable ppuDataTransfer::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataTransfer::ppuDataPrepare1_$1 ] +Added variable ppuDataTransfer::ppuDataPut1_val#0 to live range equivalence class [ ppuDataTransfer::ppuDataPut1_val#0 ] +Added variable ppuDataFill::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataFill::ppuDataPrepare1_$0 ] +Added variable ppuDataFill::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataFill::ppuDataPrepare1_$1 ] +Added variable rand::$0 to live range equivalence class [ rand::$0 ] +Added variable rand_state#0 to live range equivalence class [ rand_state#0 ] +Added variable rand::$1 to live range equivalence class [ rand::$1 ] +Added variable rand_state#1 to live range equivalence class [ rand_state#1 ] +Added variable rand::$2 to live range equivalence class [ rand::$2 ] +Added variable rand::return#0 to live range equivalence class [ rand::return#0 ] +Complete equivalence classes +[ main::initNES1_i#2 main::initNES1_i#1 ] +[ main::i#14 main::i#2 ] +[ main::timer_2#2 main::timer_2#1 ] +[ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +[ main::timer#3 main::timer#15 main::timer#21 ] +[ main::i#10 main::i#4 ] +[ main::sprite_idx#3 main::sprite_idx#2 ] +[ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] +[ ppuDataTransfer::cpuData#2 ] +[ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +[ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +[ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +[ ppuDataFill::size#3 ] +[ ppuDataFill::i#2 ppuDataFill::i#1 ] +[ rand_state#10 rand_state#17 rand_state#11 ] +[ scroll_y ] +[ vblank_hit ] +[ main::initNES1_waitForVBlank1_$0 ] +[ main::initNES1_waitForVBlank2_$0 ] +[ main::h_bar#1 ] +[ main::$14 ] +[ main::timer#1 ] +[ main::$38 ] +[ main::$40 ] +[ main::$20 ] +[ main::$45 ] +[ main::$44 ] +[ main::$23 ] +[ main::$25 ] +[ main::$26 ] +[ main::$53 ] +[ main::$30 ] +[ main::$56 ] +[ main::$31 ] +[ main::$50 ] +[ main::$32 ] +[ main::$48 ] +[ main::$33 ] +[ rand::return#2 ] +[ main::$9 ] +[ main::$10 ] +[ main::$35 ] +[ rand::return#3 ] +[ main::$11 ] +[ main::$12 ] +[ main::$36 ] +[ ppuDataTransfer::ppuDataPrepare1_$0 ] +[ ppuDataTransfer::ppuDataPrepare1_$1 ] +[ ppuDataTransfer::ppuDataPut1_val#0 ] +[ ppuDataFill::ppuDataPrepare1_$0 ] +[ ppuDataFill::ppuDataPrepare1_$1 ] +[ rand::$0 ] +[ rand_state#0 ] +[ rand::$1 ] +[ rand_state#1 ] +[ rand::$2 ] +[ rand::return#0 ] +Allocated zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] +Allocated zp[1]:3 [ main::i#14 main::i#2 ] +Allocated zp[1]:4 [ main::timer_2#2 main::timer_2#1 ] +Allocated zp[1]:5 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +Allocated zp[1]:6 [ main::timer#3 main::timer#15 main::timer#21 ] +Allocated zp[1]:7 [ main::i#10 main::i#4 ] +Allocated zp[1]:8 [ main::sprite_idx#3 main::sprite_idx#2 ] +Allocated zp[2]:9 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] +Allocated zp[2]:11 [ ppuDataTransfer::cpuData#2 ] +Allocated zp[2]:13 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +Allocated zp[2]:15 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +Allocated zp[2]:17 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +Allocated zp[2]:19 [ ppuDataFill::size#3 ] +Allocated zp[2]:21 [ ppuDataFill::i#2 ppuDataFill::i#1 ] +Allocated zp[2]:23 [ rand_state#10 rand_state#17 rand_state#11 ] +Allocated zp[1]:25 [ scroll_y ] +Allocated zp[1]:26 [ vblank_hit ] +Allocated zp[1]:27 [ main::initNES1_waitForVBlank1_$0 ] +Allocated zp[1]:28 [ main::initNES1_waitForVBlank2_$0 ] +Allocated zp[1]:29 [ main::h_bar#1 ] +Allocated zp[1]:30 [ main::$14 ] +Allocated zp[1]:31 [ main::timer#1 ] +Allocated zp[1]:32 [ main::$38 ] +Allocated zp[1]:33 [ main::$40 ] +Allocated zp[2]:34 [ main::$20 ] +Allocated zp[1]:36 [ main::$45 ] +Allocated zp[1]:37 [ main::$44 ] +Allocated zp[2]:38 [ main::$23 ] +Allocated zp[2]:40 [ main::$25 ] +Allocated zp[1]:42 [ main::$26 ] +Allocated zp[1]:43 [ main::$53 ] +Allocated zp[1]:44 [ main::$30 ] +Allocated zp[2]:45 [ main::$56 ] +Allocated zp[2]:47 [ main::$31 ] +Allocated zp[1]:49 [ main::$50 ] +Allocated zp[2]:50 [ main::$32 ] +Allocated zp[1]:52 [ main::$48 ] +Allocated zp[2]:53 [ main::$33 ] +Allocated zp[2]:55 [ rand::return#2 ] +Allocated zp[2]:57 [ main::$9 ] +Allocated zp[2]:59 [ main::$10 ] +Allocated zp[1]:61 [ main::$35 ] +Allocated zp[2]:62 [ rand::return#3 ] +Allocated zp[2]:64 [ main::$11 ] +Allocated zp[1]:66 [ main::$12 ] +Allocated zp[1]:67 [ main::$36 ] +Allocated zp[1]:68 [ ppuDataTransfer::ppuDataPrepare1_$0 ] +Allocated zp[1]:69 [ ppuDataTransfer::ppuDataPrepare1_$1 ] +Allocated zp[1]:70 [ ppuDataTransfer::ppuDataPut1_val#0 ] +Allocated zp[1]:71 [ ppuDataFill::ppuDataPrepare1_$0 ] +Allocated zp[1]:72 [ ppuDataFill::ppuDataPrepare1_$1 ] +Allocated zp[2]:73 [ rand::$0 ] +Allocated zp[2]:75 [ rand_state#0 ] +Allocated zp[2]:77 [ rand::$1 ] +Allocated zp[2]:79 [ rand_state#1 ] +Allocated zp[2]:81 [ rand::$2 ] +Allocated zp[2]:83 [ rand::return#0 ] + +INITIAL ASM +Target platform is nes / MOS6502X + // File Comments +//#pragma emulator("java -jar /Applications/Nintaco_bin_2020-05-01/Nintaco.jar") +// Nintendo Entertainment System (NES +// https://en.wikipedia.org/wiki/Nintendo_Entertainment_System_(Model_NES-101) +// https://github.com/gregkrsak/first_nes +// Ricoh 2C02 - NES Picture Processing Unit (PPU) +// Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), +// https://en.wikipedia.org/wiki/Picture_Processing_Unit +// https://wiki.nesdev.com/w/index.php/PPU_registers +// http://nesdev.com/2C02%20technical%20reference.TXT +// Based on: https://github.com/gregkrsak/first_nes written by Greg M. Krsak, 2018. + // Upstart + // Nintendo Entertainment System (NES) ROM (Mapper 0 NROM, Vertical Mirroring) +// https://sadistech.com/nesromtool/romdoc.html +// https://forums.nesdev.com/viewtopic.php?f=2&t=9896 +// https://github.com/gregkrsak/first_nes +.file [name="kickballs-2.nes", type="bin", segments="NesRom"] +.file [name="kickballs-2.nes_hdr", type="bin", segments="Header"] +.file [name="kickballs-2.nes_prg", type="bin", segments="ProgramRom"] +.file [name="kickballs-2.nes_chr", type="bin", segments="CharacterRom"] +.segmentdef Header [ start=$0000, min=$0000, max=$000f, fill ] +.segmentdef Tiles [ start=$0000, min=$0000, max=$1fff, fill ] +.segmentdef Code [ start=$c000, min=$c000, max=$fff9 ] +.segmentdef Data [ startAfter="Code", min=$c000, max=$fff9 ] +.segmentdef Vectors [ start=$fffa, min=$fffa, max=$ffff ] +.segmentdef GameRam [start=$200,max=$7ff, virtual] +.segmentdef ProgramRom [ segments="Code, Data, Vectors" ] +.segmentdef CharacterRom [ segments="Tiles" ] +.segmentdef NesRom +.segment NesRom +.segmentout [ segments="Header" ] +.segmentout [ segments="ProgramRom" ] +.segmentout [ segments="CharacterRom" ] +.segment Header +.text @"NES\$1a" +.byte $01 // 1x 16KB ROM (PRG) +.byte $01 // 1x 8KB VROM (CHR) +.byte %00000001 // Mapper nibble 0000 == No mapping (a simple 16KB PRG + 8KB CHR game) + // Mirroring nibble 0001 == Vertical mirroring only +.segment Code + + // Global Constants & labels + .const OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = $10 + .const OFFSET_STRUCT_RICOH_2C02_PPUMASK = 1 + .const OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = 2 + .const OFFSET_STRUCT_RICOH_2C02_OAMADDR = 3 + .const OFFSET_STRUCT_RICOH_2A03_OAMDMA = $14 + .const OFFSET_STRUCT_RICOH_2C02_PPUADDR = 6 + .const OFFSET_STRUCT_RICOH_2C02_PPUDATA = 7 + .const OFFSET_STRUCT_SPRITEDATA_TILE = 1 + .const OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = 2 + .const OFFSET_STRUCT_SPRITEDATA_X = 3 + .const OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = 5 + .const SIZEOF_BYTE = 1 + // $2000-$23bf $03c0 Name table 0 + .label PPU_NAME_TABLE_0 = $2000 + // $23c0-$23ff $0040 Attribute table 0 + .label PPU_ATTRIBUTE_TABLE_0 = $23c0 + // $3000-$3eff $0f00 Mirrors of $2000-$2eff + // $3f00-$3f1f $0020 Palette RAM indexes + .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // APU Frame Counter + // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. + // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter + // ------+-----+--------------------------------------------------------------- + // $4017 | W | FR_COUNTER Frame Counter Set mode and interrupt + // ------+-----+--------------------------------------------------------------- + // | 7 | Sequencer mode: 0 selects 4-step sequence, 1 selects 5-step sequence + // | 6 | Interrupt inhibit flag. If set, the frame interrupt flag is cleared, otherwise it is unaffected. + // ------+-----+--------------------------------------------------------------- + // Side effects After 3 or 4 CPU clock cycles*, the timer is reset. + // If the mode flag is set, then both "quarter frame" and "half frame" signals are also generated. + .label FR_COUNTER = $4017 + // Pointer to the start of RAM memory + .label MEMORY = 0 + // NES Picture Processing Unit (PPU) + .label PPU = $2000 + // NES CPU and audion processing unit (APU) + .label APU = $4000 + .label scroll_y = $19 + .label vblank_hit = $1a + // The random state variable + .label rand_state = $4b + // The random state variable + .label rand_state_1 = $4f + // The random state variable + .label rand_state_2 = $17 +.segment Code + // __start +__start: { + jmp __init1 + // __start::__init1 + __init1: + // [1] (volatile byte) scroll_y ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z scroll_y + // [2] (volatile byte) vblank_hit ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z vblank_hit + // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + __b1_from___init1: + jmp __b1 + // __start::@1 + __b1: + // [4] call main + // [12] phi from __start::@1 to main [phi:__start::@1->main] + main_from___b1: + jsr main + jmp __breturn + // __start::@return + __breturn: + // [5] return + rts +} + // vblank +// NMI Called when the PPU refreshes the screen (also known as the V-Blank period) +vblank: { + // entry interrupt(HARDWARE_STACK) + pha + txa + pha + tya + pha + // [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // Set scroll + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + // [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y -- _deref_pbuc1=vbuz1 + lda.z scroll_y + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + jmp ppuSpriteBufferDmaTransfer1 + // vblank::ppuSpriteBufferDmaTransfer1 + ppuSpriteBufferDmaTransfer1: + // [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_OAMADDR + // [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER -- _deref_pbuc1=vbuc2 + lda #>SPRITE_BUFFER + sta APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA + jmp __b1 + // vblank::@1 + __b1: + // [10] (volatile byte) vblank_hit ← ++ (volatile byte) vblank_hit -- vbuz1=_inc_vbuz1 + inc.z vblank_hit + jmp __breturn + // vblank::@return + __breturn: + // [11] return - exit interrupt(HARDWARE_STACK) + pla + tay + pla + tax + pla + rti +} + // main +main: { + .label __9 = $39 + .label __10 = $3b + .label __11 = $40 + .label __12 = $42 + .label __14 = $1e + .label __20 = $22 + .label __23 = $26 + .label __25 = $28 + .label __26 = $2a + .label __30 = $2c + .label __31 = $2f + .label __32 = $32 + .label __33 = $35 + .label __35 = $3d + .label __36 = $43 + .label __38 = $20 + .label __40 = $21 + .label __44 = $25 + .label __45 = $24 + .label __48 = $34 + .label __50 = $31 + .label __53 = $2b + .label __56 = $2d + .label initNES1_waitForVBlank1___0 = $1b + .label initNES1_waitForVBlank2___0 = $1c + .label initNES1_i = 2 + .label i = 3 + .label timer_2 = 4 + .label h_bar = $1d + .label timer = $1f + .label active_balls = 5 + .label sprite_idx = 8 + .label i_1 = 7 + .label timer_1 = 6 + jmp initNES1 + // main::initNES1 + initNES1: + // asm { cld ldx#$ff txs } + cld + ldx #$ff + txs + jmp initNES1_disableVideoOutput1 + // main::initNES1_disableVideoOutput1 + initNES1_disableVideoOutput1: + // [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU + // [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + jmp initNES1_disableAudioOutput1 + // main::initNES1_disableAudioOutput1 + initNES1_disableAudioOutput1: + // [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 -- _deref_pbuc1=vbuc2 + lda #$40 + sta FR_COUNTER + // [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 -- _deref_pbuc1=vbuc2 + lda #$40 + sta APU+OFFSET_STRUCT_RICOH_2A03_DMC_FREQ + jmp initNES1_clearVBlankFlag1 + // main::initNES1_clearVBlankFlag1 + initNES1_clearVBlankFlag1: + // asm { ldaPPU_PPUSTATUS } + lda PPU_PPUSTATUS + // [19] phi from main::initNES1_clearVBlankFlag1 to main::initNES1_waitForVBlank1 [phi:main::initNES1_clearVBlankFlag1->main::initNES1_waitForVBlank1] + initNES1_waitForVBlank1_from_initNES1_clearVBlankFlag1: + jmp initNES1_waitForVBlank1 + // main::initNES1_waitForVBlank1 + initNES1_waitForVBlank1: + jmp initNES1_waitForVBlank1___b1 + // main::initNES1_waitForVBlank1_@1 + initNES1_waitForVBlank1___b1: + // [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 -- vbuz1=_deref_pbuc1_band_vbuc2 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + sta.z initNES1_waitForVBlank1___0 + // [21] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp.z initNES1_waitForVBlank1___0 + beq initNES1_waitForVBlank1___b1 + // [22] phi from main::initNES1_waitForVBlank1_@1 to main::initNES1_@1 [phi:main::initNES1_waitForVBlank1_@1->main::initNES1_@1] + initNES1___b1_from_initNES1_waitForVBlank1___b1: + // [22] phi (byte) main::initNES1_i#2 = (byte) 0 [phi:main::initNES1_waitForVBlank1_@1->main::initNES1_@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z initNES1_i + jmp initNES1___b1 + // [22] phi from main::initNES1_@1 to main::initNES1_@1 [phi:main::initNES1_@1->main::initNES1_@1] + initNES1___b1_from_initNES1___b1: + // [22] phi (byte) main::initNES1_i#2 = (byte) main::initNES1_i#1 [phi:main::initNES1_@1->main::initNES1_@1#0] -- register_copy + jmp initNES1___b1 + // main::initNES1_@1 + initNES1___b1: + // [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY,y + // [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$100,y + // [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$200,y + // [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$300,y + // [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$400,y + // [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$500,y + // [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$600,y + // [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #0 + ldy.z initNES1_i + sta MEMORY+$700,y + // [31] (byte) main::initNES1_i#1 ← ++ (byte) main::initNES1_i#2 -- vbuz1=_inc_vbuz1 + inc.z initNES1_i + // [32] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z initNES1_i + bne initNES1___b1_from_initNES1___b1 + // [33] phi from main::initNES1_@1 to main::initNES1_waitForVBlank2 [phi:main::initNES1_@1->main::initNES1_waitForVBlank2] + initNES1_waitForVBlank2_from_initNES1___b1: + jmp initNES1_waitForVBlank2 + // main::initNES1_waitForVBlank2 + initNES1_waitForVBlank2: + jmp initNES1_waitForVBlank2___b1 + // main::initNES1_waitForVBlank2_@1 + initNES1_waitForVBlank2___b1: + // [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 -- vbuz1=_deref_pbuc1_band_vbuc2 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + sta.z initNES1_waitForVBlank2___0 + // [35] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp.z initNES1_waitForVBlank2___0 + beq initNES1_waitForVBlank2___b1 + jmp initNES1___b7 + // main::initNES1_@7 + initNES1___b7: + // asm { ldaPPU_PPUSTATUS } + lda PPU_PPUSTATUS + // [37] phi from main::initNES1_@7 to main::@17 [phi:main::initNES1_@7->main::@17] + __b17_from_initNES1___b7: + jmp __b17 + // main::@17 + __b17: + // [38] call ppuDataTransfer + // Transfer the palette + // [114] phi from main::@17 to ppuDataTransfer [phi:main::@17->ppuDataTransfer] + ppuDataTransfer_from___b17: + // [114] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const to_nomodify byte*) palette [phi:main::@17->ppuDataTransfer#0] -- pvoz1=pvoc1 + lda #palette + sta.z ppuDataTransfer.cpuData+1 + // [114] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE [phi:main::@17->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + // [39] phi from main::@17 to main::@19 [phi:main::@17->main::@19] + __b19_from___b17: + jmp __b19 + // main::@19 + __b19: + // [40] call ppuDataFill + // Fill the PPU attribute table + // [127] phi from main::@19 to ppuDataFill [phi:main::@19->ppuDataFill] + ppuDataFill_from___b19: + // [127] phi (word) ppuDataFill::size#3 = (word)(number) $20*(number) $1e [phi:main::@19->ppuDataFill#0] -- vwuz1=vwuc1 + lda #<$20*$1e + sta.z ppuDataFill.size + lda #>$20*$1e + sta.z ppuDataFill.size+1 + // [127] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:main::@19->ppuDataFill#1] -- pvoz1=pvoc1 + lda #PPU_NAME_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // [41] phi from main::@19 to main::@20 [phi:main::@19->main::@20] + __b20_from___b19: + jmp __b20 + // main::@20 + __b20: + // [42] call ppuDataFill + // [127] phi from main::@20 to ppuDataFill [phi:main::@20->ppuDataFill] + ppuDataFill_from___b20: + // [127] phi (word) ppuDataFill::size#3 = (byte) $40 [phi:main::@20->ppuDataFill#0] -- vwuz1=vbuc1 + lda #<$40 + sta.z ppuDataFill.size + lda #>$40 + sta.z ppuDataFill.size+1 + // [127] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@20->ppuDataFill#1] -- pvoz1=pvoc1 + lda #PPU_ATTRIBUTE_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // [43] phi from main::@20 to main::@21 [phi:main::@20->main::@21] + __b21_from___b20: + jmp __b21 + // main::@21 + __b21: + // [44] call ppuDataTransfer + // [114] phi from main::@21 to ppuDataTransfer [phi:main::@21->ppuDataTransfer] + ppuDataTransfer_from___b21: + // [114] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const to_nomodify byte*) h_bar_tilemap [phi:main::@21->ppuDataTransfer#0] -- pvoz1=pvoc1 + lda #h_bar_tilemap + sta.z ppuDataTransfer.cpuData+1 + // [114] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*) 8256 [phi:main::@21->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #<$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData + lda #>$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + jmp enableVideoOutput1 + // main::enableVideoOutput1 + enableVideoOutput1: + // [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 + lda #$80 + sta PPU + // [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 + lda #$1e + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + jmp __b18 + // main::@18 + __b18: + // [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 -- _deref_pbuc1=vbuc2 + // Enable vertical blank interrupt, select sprite pattern table 1 + lda #$88 + sta PPU + // [48] phi from main::@18 to main::@1 [phi:main::@18->main::@1] + __b1_from___b18: + // [48] phi (word) rand_state#17 = (word) 1 [phi:main::@18->main::@1#0] -- vwuz1=vwuc1 + lda #<1 + sta.z rand_state_2 + lda #>1 + sta.z rand_state_2+1 + // [48] phi (byte) main::i#14 = (byte) 0 [phi:main::@18->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b1 + // main::@1 + __b1: + // [49] if((byte) main::i#14<(byte) $20) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #$20 + bcc __b2_from___b1 + // [50] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + __b3_from___b1: + // [50] phi (byte) main::timer#3 = (byte) 0 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta.z timer_1 + // [50] phi (byte) main::active_balls#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + lda #0 + sta.z active_balls + // [50] phi (byte) main::timer_2#2 = (byte) 0 [phi:main::@1->main::@3#2] -- vbuz1=vbuc1 + lda #0 + sta.z timer_2 + jmp __b3 + // main::@3 + __b3: + jmp __b4 + // main::@4 + __b4: + // [51] (byte) main::timer_2#1 ← ++ (byte) main::timer_2#2 -- vbuz1=_inc_vbuz1 + inc.z timer_2 + // [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 -- vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 + lda #$60 + ldy.z timer_2 + clc + adc sine_table,y + sta.z h_bar + // [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff -- vbuz1=vbuz2_bxor_vbuc1 + lda #$ff + eor.z h_bar + sta.z __14 + // [54] (volatile byte) scroll_y ← (byte~) main::$14 -- vbuz1=vbuz2 + lda.z __14 + sta.z scroll_y + // [55] if((byte) main::active_balls#2>=(byte) $20) goto main::@5 -- vbuz1_ge_vbuc1_then_la1 + lda.z active_balls + cmp #$20 + bcs __b5_from___b4 + jmp __b15 + // main::@15 + __b15: + // [56] (byte) main::timer#1 ← ++ (byte) main::timer#3 -- vbuz1=_inc_vbuz2 + ldy.z timer_1 + iny + sty.z timer + // [57] if((byte) main::timer#3!=(byte) 9) goto main::@25 -- vbuz1_neq_vbuc1_then_la1 + lda #9 + cmp.z timer_1 + bne __b25 + jmp __b16 + // main::@16 + __b16: + // [58] (byte) main::active_balls#1 ← ++ (byte) main::active_balls#2 -- vbuz1=_inc_vbuz1 + inc.z active_balls + // [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z active_balls + asl + asl + asl + sta.z __38 + // [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + lda.z __38 + ldx #0 + tay + txa + sta balls,y + // [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + lda.z __38 + ldx #0 + tay + txa + sta balls+2,y + // [62] phi from main::@16 to main::@5 [phi:main::@16->main::@5] + __b5_from___b16: + // [62] phi (byte) main::timer#15 = (byte) 0 [phi:main::@16->main::@5#0] -- vbuz1=vbuc1 + lda #0 + sta.z timer_1 + // [62] phi (byte) main::active_balls#8 = (byte) main::active_balls#1 [phi:main::@16->main::@5#1] -- register_copy + jmp __b5 + // [62] phi from main::@25 main::@4 to main::@5 [phi:main::@25/main::@4->main::@5] + __b5_from___b25: + __b5_from___b4: + // [62] phi (byte) main::timer#15 = (byte) main::timer#21 [phi:main::@25/main::@4->main::@5#0] -- register_copy + // [62] phi (byte) main::active_balls#8 = (byte) main::active_balls#2 [phi:main::@25/main::@4->main::@5#1] -- register_copy + jmp __b5 + // main::@5 + __b5: + // [63] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + __b6_from___b5: + // [63] phi (byte) main::sprite_idx#3 = (byte) 0 [phi:main::@5->main::@6#0] -- vbuz1=vbuc1 + lda #0 + sta.z sprite_idx + // [63] phi (byte) main::i#10 = (byte) 0 [phi:main::@5->main::@6#1] -- vbuz1=vbuc1 + lda #0 + sta.z i_1 + jmp __b6 + // main::@6 + __b6: + // [64] if((byte) main::i#10<(byte) main::active_balls#8) goto main::@7 -- vbuz1_lt_vbuz2_then_la1 + lda.z i_1 + cmp.z active_balls + bcc __b7 + jmp __b8 + // main::@8 + __b8: + // [65] *((byte*) 8193) ← (byte) $98 -- _deref_pbuc1=vbuc2 + lda #$98 + sta $2001 + jmp __b13 + // main::@13 + __b13: + // [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp.z vblank_hit + beq __b13 + jmp __b14 + // main::@14 + __b14: + // [67] (volatile byte) vblank_hit ← (byte) 0 -- vbuz1=vbuc1 + // wait for vblank + lda #0 + sta.z vblank_hit + // [68] *((byte*) 8193) ← (byte) $18 -- _deref_pbuc1=vbuc2 + lda #$18 + sta $2001 + // [50] phi from main::@14 to main::@3 [phi:main::@14->main::@3] + __b3_from___b14: + // [50] phi (byte) main::timer#3 = (byte) main::timer#15 [phi:main::@14->main::@3#0] -- register_copy + // [50] phi (byte) main::active_balls#2 = (byte) main::active_balls#8 [phi:main::@14->main::@3#1] -- register_copy + // [50] phi (byte) main::timer_2#2 = (byte) main::timer_2#1 [phi:main::@14->main::@3#2] -- register_copy + jmp __b3 + // main::@7 + __b7: + // [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i_1 + asl + asl + asl + sta.z __40 + // [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_pwuc2_derefidx_vbuz1 + ldy.z __40 + clc + lda balls,y + adc balls+4,y + sta balls,y + lda balls+1,y + adc balls+4+1,y + sta balls+1,y + // [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_vbuc2 + ldy.z __40 + clc + lda balls+6,y + adc #$10 + sta balls+6,y + lda balls+6+1,y + adc #0 + sta balls+6+1,y + // [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_plus_pwuc2_derefidx_vbuz1 + ldy.z __40 + clc + lda balls+2,y + adc balls+6,y + sta balls+2,y + lda balls+2+1,y + adc balls+6+1,y + sta balls+2+1,y + // [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuz2_ror_8 + ldy.z __40 + lda #0 + sta.z __20+1 + lda balls+1,y + sta.z __20 + // [74] if((word~) main::$20>=(byte) 8) goto main::@9 -- vwuz1_ge_vbuc1_then_la1 + lda.z __20+1 + bne __b9 + lda.z __20 + cmp #8 + bcs __b9 + !: + jmp __b11 + // main::@11 + __b11: + // [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i_1 + asl + asl + asl + sta.z __45 + // [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_bxor_vwuc2 + ldy.z __45 + lda balls+4,y + eor #<$ffff + sta balls+4,y + lda balls+4+1,y + eor #>$ffff + sta balls+4+1,y + jmp __b9 + // main::@9 + __b9: + // [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i_1 + asl + asl + asl + sta.z __44 + // [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuz2_ror_8 + ldy.z __44 + lda #0 + sta.z __23+1 + lda balls+2+1,y + sta.z __23 + // [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuz2_ror_8 + ldy.z __44 + lda #0 + sta.z __25+1 + lda balls+2+1,y + sta.z __25 + // [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 -- vbuz1=vbuz2_plus_vbuc1 + lax.z h_bar + axs #-[8] + stx.z __26 + // [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 -- vwuz1_lt_vbuz2_then_la1 + lda.z __23+1 + bne !+ + lda.z __23 + cmp.z h_bar + bcc __b10 + !: + jmp __b24 + // main::@24 + __b24: + // [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 -- vwuz1_ge_vbuz2_then_la1 + lda.z __25+1 + bne __b10 + lda.z __25 + cmp.z __26 + bcs __b10 + !: + jmp __b12 + // main::@12 + __b12: + // [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i_1 + asl + asl + asl + sta.z __53 + // [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff -- pwuc1_derefidx_vbuz1=pwuc1_derefidx_vbuz1_bxor_vwuc2 + ldy.z __53 + lda balls+6,y + eor #<$ffff + sta balls+6,y + lda balls+6+1,y + eor #>$ffff + sta balls+6+1,y + // [85] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2 -- vbuz1=vbuz2_minus_2 + lda.z h_bar + sec + sbc #2 + sta.z __30 + // [86] (word~) main::$56 ← (word)(byte~) main::$30 -- vwuz1=_word_vbuz2 + lda.z __30 + sta.z __56 + lda #0 + sta.z __56+1 + // [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 -- vwuz1=vwuz2_rol_8 + lda.z __56 + sta.z __31+1 + lda #0 + sta.z __31 + // [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 -- pwuc1_derefidx_vbuz1=vwuz2 + ldy.z __53 + lda.z __31 + sta balls+2,y + lda.z __31+1 + sta balls+2+1,y + jmp __b10 + // main::@10 + __b10: + // [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i_1 + asl + asl + asl + sta.z __50 + // [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuz2_ror_8 + ldy.z __50 + lda #0 + sta.z __32+1 + lda balls+2+1,y + sta.z __32 + // [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 -- vbuz1=vbuz2_rol_2 + lda.z sprite_idx + asl + asl + sta.z __48 + // [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 -- pbuc1_derefidx_vbuz1=_byte_vwuz2 + ldy.z __48 + lda.z __32 + sta SPRITE_BUFFER,y + // [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a -- pbuc1_derefidx_vbuz1=vbuc2 + lda #$a + ldy.z __48 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_TILE,y + // [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #3 + ldy.z __48 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES,y + // [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuz2_ror_8 + ldy.z __50 + lda #0 + sta.z __33+1 + lda balls+1,y + sta.z __33 + // [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 -- pbuc1_derefidx_vbuz1=_byte_vwuz2 + ldy.z __48 + lda.z __33 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_X,y + // [97] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 -- vbuz1=_inc_vbuz1 + inc.z sprite_idx + // [98] (byte) main::i#4 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 + inc.z i_1 + // [63] phi from main::@10 to main::@6 [phi:main::@10->main::@6] + __b6_from___b10: + // [63] phi (byte) main::sprite_idx#3 = (byte) main::sprite_idx#2 [phi:main::@10->main::@6#0] -- register_copy + // [63] phi (byte) main::i#10 = (byte) main::i#4 [phi:main::@10->main::@6#1] -- register_copy + jmp __b6 + // main::@25 + __b25: + // [99] (byte) main::timer#21 ← (byte) main::timer#1 -- vbuz1=vbuz2 + lda.z timer + sta.z timer_1 + jmp __b5_from___b25 + // [100] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + __b2_from___b1: + jmp __b2 + // main::@2 + __b2: + // [101] call rand + // [137] phi from main::@2 to rand [phi:main::@2->rand] + rand_from___b2: + // [137] phi (word) rand_state#10 = (word) rand_state#17 [phi:main::@2->rand#0] -- register_copy + jsr rand + // [102] (word) rand::return#2 ← (word) rand::return#0 -- vwuz1=vwuz2 + lda.z rand.return + sta.z rand.return_1 + lda.z rand.return+1 + sta.z rand.return_1+1 + jmp __b22 + // main::@22 + __b22: + // [103] (word~) main::$9 ← (word) rand::return#2 -- vwuz1=vwuz2 + lda.z rand.return_1 + sta.z __9 + lda.z rand.return_1+1 + sta.z __9+1 + // [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff -- vwuz1=vwuz2_band_vwuc1 + lda.z __9 + and #<$3ff + sta.z __10 + lda.z __9+1 + and #>$3ff + sta.z __10+1 + // [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i + asl + asl + asl + sta.z __35 + // [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 -- pwuc1_derefidx_vbuz1=vwuz2 + ldy.z __35 + lda.z __10 + sta balls+4,y + lda.z __10+1 + sta balls+4+1,y + // [107] call rand + // [137] phi from main::@22 to rand [phi:main::@22->rand] + rand_from___b22: + // [137] phi (word) rand_state#10 = (word) rand_state#11 [phi:main::@22->rand#0] -- register_copy + jsr rand + // [108] (word) rand::return#3 ← (word) rand::return#0 -- vwuz1=vwuz2 + lda.z rand.return + sta.z rand.return_2 + lda.z rand.return+1 + sta.z rand.return_2+1 + jmp __b23 + // main::@23 + __b23: + // [109] (word~) main::$11 ← (word) rand::return#3 -- vwuz1=vwuz2 + lda.z rand.return_2 + sta.z __11 + lda.z rand.return_2+1 + sta.z __11+1 + // [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff -- vbuz1=vwuz2_band_vbuc1 + lda #$ff + and.z __11 + sta.z __12 + // [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 -- vbuz1=vbuz2_rol_3 + lda.z i + asl + asl + asl + sta.z __36 + // [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 -- pwuc1_derefidx_vbuz1=vbuz2 + lda.z __36 + ldx.z __12 + tay + txa + sta balls+6,y + // [113] (byte) main::i#2 ← ++ (byte) main::i#14 -- vbuz1=_inc_vbuz1 + inc.z i + // [48] phi from main::@23 to main::@1 [phi:main::@23->main::@1] + __b1_from___b23: + // [48] phi (word) rand_state#17 = (word) rand_state#11 [phi:main::@23->main::@1#0] -- register_copy + // [48] phi (byte) main::i#14 = (byte) main::i#2 [phi:main::@23->main::@1#1] -- register_copy + jmp __b1 +} + // ppuDataTransfer +// Transfer a number of bytes from the CPU memory to the PPU memory +// - ppuData : Pointer in the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp($b) cpuData) +ppuDataTransfer: { + .label ppuDataPrepare1___0 = $44 + .label ppuDataPrepare1___1 = $45 + .label ppuDataPrepare1_ppuData = 9 + .label ppuDataPut1_val = $46 + .label cpuSrc = $f + .label i = $d + .label cpuData = $b + jmp ppuDataPrepare1 + // ppuDataTransfer::ppuDataPrepare1 + ppuDataPrepare1: + // [115] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuz1=_hi_pvoz2 + lda.z ppuDataPrepare1_ppuData+1 + sta.z ppuDataPrepare1___0 + // [116] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPrepare1___0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [117] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuz1=_lo_pvoz2 + lda.z ppuDataPrepare1_ppuData + sta.z ppuDataPrepare1___1 + // [118] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPrepare1___1 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + jmp __b3 + // ppuDataTransfer::@3 + __b3: + // [119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 -- pbuz1=pbuz2 + lda.z cpuData + sta.z cpuSrc + lda.z cpuData+1 + sta.z cpuSrc+1 + // [120] phi from ppuDataTransfer::@3 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1] + __b1_from___b3: + // [120] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#6 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy + // [120] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // ppuDataTransfer::@1 + __b1: + // [121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 -- vwuz1_lt_vbuc1_then_la1 + lda.z i+1 + cmp #>$20*SIZEOF_BYTE + bcc __b2 + bne !+ + lda.z i + cmp #<$20*SIZEOF_BYTE + bcc __b2 + !: + jmp __breturn + // ppuDataTransfer::@return + __breturn: + // [122] return + rts + // ppuDataTransfer::@2 + __b2: + // [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (cpuSrc),y + sta.z ppuDataPut1_val + jmp ppuDataPut1 + // ppuDataTransfer::ppuDataPut1 + ppuDataPut1: + // [124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPut1_val + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b4 + // ppuDataTransfer::@4 + __b4: + // [125] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // [126] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 -- vwuz1=_inc_vwuz1 + inc.z i + bne !+ + inc.z i+1 + !: + // [120] phi from ppuDataTransfer::@4 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1] + __b1_from___b4: + // [120] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#0] -- register_copy + // [120] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#1] -- register_copy + jmp __b1 +} + // ppuDataFill +// Fill a number of bytes in the PPU memory +// - ppuData : Pointer in the PPU memory +// - size : The number of bytes to transfer +// ppuDataFill(word zp($13) size) +ppuDataFill: { + .label ppuDataPrepare1___0 = $47 + .label ppuDataPrepare1___1 = $48 + .label ppuDataPrepare1_ppuData = $11 + .label i = $15 + .label size = $13 + jmp ppuDataPrepare1 + // ppuDataFill::ppuDataPrepare1 + ppuDataPrepare1: + // [128] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuz1=_hi_pvoz2 + lda.z ppuDataPrepare1_ppuData+1 + sta.z ppuDataPrepare1___0 + // [129] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPrepare1___0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [130] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuz1=_lo_pvoz2 + lda.z ppuDataPrepare1_ppuData + sta.z ppuDataPrepare1___1 + // [131] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPrepare1___1 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [132] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] + __b1_from_ppuDataPrepare1: + // [132] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // Transfer to PPU + // ppuDataFill::@1 + __b1: + // [133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 -- vwuz1_lt_vwuz2_then_la1 + lda.z i+1 + cmp.z size+1 + bcc ppuDataPut1 + bne !+ + lda.z i + cmp.z size + bcc ppuDataPut1 + !: + jmp __breturn + // ppuDataFill::@return + __breturn: + // [134] return + rts + // ppuDataFill::ppuDataPut1 + ppuDataPut1: + // [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b2 + // ppuDataFill::@2 + __b2: + // [136] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 -- vwuz1=_inc_vwuz1 + inc.z i + bne !+ + inc.z i+1 + !: + // [132] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] + __b1_from___b2: + // [132] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + jmp __b1 +} + // rand +// Returns a pseudo-random number in the range of 0 to RAND_MAX (65535) +// Uses an xorshift pseudorandom number generator that hits all different values +// Information https://en.wikipedia.org/wiki/Xorshift +// Source http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html +rand: { + .label __0 = $49 + .label __1 = $4d + .label __2 = $51 + .label return = $53 + .label return_1 = $37 + .label return_2 = $3e + // [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 -- vwuz1=vwuz2_rol_7 + lda.z rand_state_2+1 + lsr + lda.z rand_state_2 + ror + sta.z __0+1 + lda #0 + ror + sta.z __0 + // [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 -- vwuz1=vwuz2_bxor_vwuz3 + lda.z rand_state_2 + eor.z __0 + sta.z rand_state + lda.z rand_state_2+1 + eor.z __0+1 + sta.z rand_state+1 + // [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 -- vwuz1=vwuz2_ror_9 + lda.z rand_state+1 + lsr + sta.z __1 + lda #0 + sta.z __1+1 + // [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 -- vwuz1=vwuz2_bxor_vwuz3 + lda.z rand_state + eor.z __1 + sta.z rand_state_1 + lda.z rand_state+1 + eor.z __1+1 + sta.z rand_state_1+1 + // [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 -- vwuz1=vwuz2_rol_8 + lda.z rand_state_1 + sta.z __2+1 + lda #0 + sta.z __2 + // [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 -- vwuz1=vwuz2_bxor_vwuz3 + lda.z rand_state_1 + eor.z __2 + sta.z rand_state_2 + lda.z rand_state_1+1 + eor.z __2+1 + sta.z rand_state_2+1 + // [144] (word) rand::return#0 ← (word) rand_state#11 -- vwuz1=vwuz2 + lda.z rand_state_2 + sta.z return + lda.z rand_state_2+1 + sta.z return+1 + jmp __breturn + // rand::@return + __breturn: + // [145] return + rts +} + // File Data +.segment GameRam + // Moving balls (in GameRAM) + balls: .fill 8*$40, 0 +.segment Data + sine_table: .byte $40, $42, $43, $45, $46, $48, $49, $4b, $4c, $4e, $50, $51, $53, $54, $56, $57, $58, $5a, $5b, $5d, $5e, $60, $61, $62, $64, $65, $66, $67, $69, $6a, $6b, $6c, $6d, $6e, $6f, $70, $71, $72, $73, $74, $75, $76, $77, $78, $78, $79, $7a, $7b, $7b, $7c, $7c, $7d, $7d, $7e, $7e, $7e, $7f, $7f, $7f, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $7f, $7f, $7f, $7e, $7e, $7e, $7d, $7d, $7c, $7c, $7b, $7b, $7a, $79, $78, $78, $77, $76, $75, $74, $73, $72, $71, $70, $6f, $6e, $6d, $6c, $6b, $6a, $69, $67, $66, $65, $64, $62, $61, $60, $5e, $5d, $5b, $5a, $58, $57, $56, $54, $53, $51, $50, $4e, $4c, $4b, $49, $48, $46, $45, $43, $42, $40, $3e, $3d, $3b, $3a, $38, $37, $35, $34, $32, $30, $2f, $2d, $2c, $2a, $29, $28, $26, $25, $23, $22, $20, $1f, $1e, $1c, $1b, $1a, $19, $17, $16, $15, $14, $13, $12, $11, $10, $f, $e, $d, $c, $b, $a, 9, 8, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, $a, $b, $c, $d, $e, $f, $10, $11, $12, $13, $14, $15, $16, $17, $19, $1a, $1b, $1c, $1e, $1f, $20, $22, $23, $25, $26, $28, $29, $2a, $2c, $2d, $2f, $30, $32, $34, $35, $37, $38, $3a, $3b, $3d, $3e + palette: .byte $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4 + h_bar_tilemap: .byte 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +.segment Tiles +TILES: +.import binary "lazydata.chr" + +.segment GameRam + .align $100 + SPRITE_BUFFER: .fill 4*$100, 0 +.segment Vectors + VECTORS: .word vblank, main, 0 + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [1] (volatile byte) scroll_y ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) vblank_hit ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 [ scroll_y vblank_hit ] ( [ scroll_y vblank_hit ] { } ) always clobbers reg byte a +Statement [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [11] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement asm { cld ldx#$ff txs } always clobbers reg byte x +Statement [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement asm { ldaPPU_PPUSTATUS } always clobbers reg byte a +Statement [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 [ vblank_hit main::initNES1_waitForVBlank1_$0 ] ( [ vblank_hit main::initNES1_waitForVBlank1_$0 ] { } main:4 [ vblank_hit main::initNES1_waitForVBlank1_$0 ] { } ) always clobbers reg byte a +Statement [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] +Statement [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 [ vblank_hit main::initNES1_waitForVBlank2_$0 ] ( [ vblank_hit main::initNES1_waitForVBlank2_$0 ] { } main:4 [ vblank_hit main::initNES1_waitForVBlank2_$0 ] { } ) always clobbers reg byte a +Statement asm { ldaPPU_PPUSTATUS } always clobbers reg byte a +Statement [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 ] ( [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 ] { } main:4 [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:6 [ main::timer#3 main::timer#15 main::timer#21 ] +Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::timer_2#2 main::timer_2#1 ] +Statement [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 main::$14 ] ( [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 main::$14 ] { } main:4 [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 main::$14 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:29 [ main::h_bar#1 ] +Statement [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] ( [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } main:4 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } ) always clobbers reg byte a +Statement [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] ( [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } main:4 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:32 [ main::$38 ] +Statement [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 ] ( [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 ] { } main:4 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 ] { } ) always clobbers reg byte a +Statement [65] *((byte*) 8193) ← (byte) $98 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [67] (volatile byte) vblank_hit ← (byte) 0 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [68] *((byte*) 8193) ← (byte) $18 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:7 [ main::i#10 main::i#4 ] +Removing always clobbered register reg byte a as potential for zp[1]:8 [ main::sprite_idx#3 main::sprite_idx#2 ] +Statement [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:33 [ main::$40 ] +Statement [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Statement [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Statement [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$20 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$20 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$20 ] { } ) always clobbers reg byte a +Statement [74] if((word~) main::$20>=(byte) 8) goto main::@9 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$45 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$45 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$45 ] { } ) always clobbers reg byte a +Statement [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 ] { } ) always clobbers reg byte a +Statement [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 main::$23 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 main::$23 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 main::$23 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:37 [ main::$44 ] +Statement [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 ] { } ) always clobbers reg byte a +Statement [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 main::$26 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 main::$26 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 main::$26 ] { } ) always clobbers reg byte a +Statement [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$25 main::$26 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$25 main::$26 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$25 main::$26 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:42 [ main::$26 ] +Statement [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } ) always clobbers reg byte a +Statement [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:43 [ main::$53 ] +Statement [86] (word~) main::$56 ← (word)(byte~) main::$30 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$56 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$56 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$56 ] { } ) always clobbers reg byte a +Statement [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$31 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$31 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$31 ] { } ) always clobbers reg byte a +Statement [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 ] { } ) always clobbers reg byte a +Statement [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:49 [ main::$50 ] +Statement [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 main::$48 ] { } ) always clobbers reg byte a +Statement [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:52 [ main::$48 ] +Statement [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } ) always clobbers reg byte a +Statement [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } ) always clobbers reg byte a +Statement [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$48 main::$33 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$48 main::$33 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$48 main::$33 ] { } ) always clobbers reg byte a +Statement [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [102] (word) rand::return#2 ← (word) rand::return#0 [ vblank_hit main::i#14 rand_state#11 rand::return#2 ] ( [ vblank_hit main::i#14 rand_state#11 rand::return#2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4 [ vblank_hit main::i#14 rand_state#11 rand::return#2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::i#14 main::i#2 ] +Statement [103] (word~) main::$9 ← (word) rand::return#2 [ vblank_hit main::i#14 rand_state#11 main::$9 ] ( [ vblank_hit main::i#14 rand_state#11 main::$9 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 main::$9 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff [ vblank_hit main::i#14 rand_state#11 main::$10 ] ( [ vblank_hit main::i#14 rand_state#11 main::$10 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 main::$10 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 [ vblank_hit main::i#14 rand_state#11 main::$10 main::$35 ] ( [ vblank_hit main::i#14 rand_state#11 main::$10 main::$35 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 main::$10 main::$35 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 [ vblank_hit main::i#14 rand_state#11 ] ( [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [108] (word) rand::return#3 ← (word) rand::return#0 [ vblank_hit main::i#14 rand_state#11 rand::return#3 ] ( [ vblank_hit main::i#14 rand_state#11 rand::return#3 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 rand::return#3 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [109] (word~) main::$11 ← (word) rand::return#3 [ vblank_hit main::i#14 rand_state#11 main::$11 ] ( [ vblank_hit main::i#14 rand_state#11 main::$11 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 main::$11 ] { } ) always clobbers reg byte a +Statement [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff [ vblank_hit main::i#14 rand_state#11 main::$12 ] ( [ vblank_hit main::i#14 rand_state#11 main::$12 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 main::$12 ] { } ) always clobbers reg byte a +Statement [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 [ vblank_hit main::i#14 rand_state#11 main::$12 main::$36 ] ( [ vblank_hit main::i#14 rand_state#11 main::$12 main::$36 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 main::$12 main::$36 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:66 [ main::$12 ] +Statement [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 [ vblank_hit main::i#14 rand_state#11 ] ( [ vblank_hit main::i#14 rand_state#11 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 ] { } ) always clobbers reg byte a +Statement [119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 [ ppuDataTransfer::cpuSrc#6 ] ( ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } main:4::ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } main:4::ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } ) always clobbers reg byte a +Statement [121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] ( ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:4::ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:4::ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } ) always clobbers reg byte a +Statement [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] ( ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:4::ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:4::ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } ) always clobbers reg byte a reg byte y +Statement [133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 [ ppuDataFill::size#3 ppuDataFill::i#2 ] ( ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ) always clobbers reg byte a +Statement [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 [ ppuDataFill::size#3 ppuDataFill::i#2 ] ( ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ) always clobbers reg byte a +Statement [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 [ rand_state#10 rand::$0 ] ( rand:101 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 [ rand_state#0 ] ( rand:101 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 [ rand_state#0 rand::$1 ] ( rand:101 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 [ rand_state#1 ] ( rand:101 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 [ rand_state#1 rand::$2 ] ( rand:101 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 [ rand_state#11 ] ( rand:101 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [144] (word) rand::return#0 ← (word) rand_state#11 [ rand_state#11 rand::return#0 ] ( rand:101 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [1] (volatile byte) scroll_y ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a +Statement [2] (volatile byte) vblank_hit ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 [ scroll_y vblank_hit ] ( [ scroll_y vblank_hit ] { } ) always clobbers reg byte a +Statement [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER [ vblank_hit ] ( [ vblank_hit ] { } ) always clobbers reg byte a +Statement [11] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement asm { cld ldx#$ff txs } always clobbers reg byte x +Statement [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement asm { ldaPPU_PPUSTATUS } always clobbers reg byte a +Statement [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 [ vblank_hit main::initNES1_waitForVBlank1_$0 ] ( [ vblank_hit main::initNES1_waitForVBlank1_$0 ] { } main:4 [ vblank_hit main::initNES1_waitForVBlank1_$0 ] { } ) always clobbers reg byte a +Statement [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 [ vblank_hit main::initNES1_i#2 ] ( [ vblank_hit main::initNES1_i#2 ] { } main:4 [ vblank_hit main::initNES1_i#2 ] { } ) always clobbers reg byte a +Statement [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 [ vblank_hit main::initNES1_waitForVBlank2_$0 ] ( [ vblank_hit main::initNES1_waitForVBlank2_$0 ] { } main:4 [ vblank_hit main::initNES1_waitForVBlank2_$0 ] { } ) always clobbers reg byte a +Statement asm { ldaPPU_PPUSTATUS } always clobbers reg byte a +Statement [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 [ vblank_hit ] ( [ vblank_hit ] { } main:4 [ vblank_hit ] { } ) always clobbers reg byte a +Statement [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 ] ( [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 ] { } main:4 [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 ] { } ) always clobbers reg byte a +Statement [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 main::$14 ] ( [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 main::$14 ] { } main:4 [ vblank_hit main::active_balls#2 main::timer#3 main::timer_2#1 main::h_bar#1 main::$14 ] { } ) always clobbers reg byte a +Statement [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] ( [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } main:4 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } ) always clobbers reg byte a +Statement [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] ( [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } main:4 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 main::$38 ] { } ) always clobbers reg byte a +Statement [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 ] ( [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 ] { } main:4 [ vblank_hit main::timer_2#1 main::h_bar#1 main::active_balls#1 ] { } ) always clobbers reg byte a +Statement [65] *((byte*) 8193) ← (byte) $98 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [67] (volatile byte) vblank_hit ← (byte) 0 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [68] *((byte*) 8193) ← (byte) $18 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 ] { } ) always clobbers reg byte a +Statement [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Statement [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Statement [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Statement [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$40 ] { } ) always clobbers reg byte a +Statement [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$20 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$20 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$20 ] { } ) always clobbers reg byte a +Statement [74] if((word~) main::$20>=(byte) 8) goto main::@9 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$45 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$45 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$45 ] { } ) always clobbers reg byte a +Statement [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 ] { } ) always clobbers reg byte a +Statement [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 main::$23 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 main::$23 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$44 main::$23 ] { } ) always clobbers reg byte a +Statement [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 ] { } ) always clobbers reg byte a +Statement [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 main::$26 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 main::$26 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$23 main::$25 main::$26 ] { } ) always clobbers reg byte a +Statement [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$25 main::$26 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$25 main::$26 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$25 main::$26 ] { } ) always clobbers reg byte a +Statement [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } ) always clobbers reg byte a +Statement [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 ] { } ) always clobbers reg byte a +Statement [86] (word~) main::$56 ← (word)(byte~) main::$30 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$56 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$56 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$56 ] { } ) always clobbers reg byte a +Statement [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$31 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$31 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$53 main::$31 ] { } ) always clobbers reg byte a +Statement [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 ] { } ) always clobbers reg byte a +Statement [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 ] { } ) always clobbers reg byte a +Statement [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$32 main::$48 ] { } ) always clobbers reg byte a +Statement [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } ) always clobbers reg byte a +Statement [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } ) always clobbers reg byte a +Statement [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$50 main::$48 ] { } ) always clobbers reg byte a +Statement [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$48 main::$33 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$48 main::$33 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 main::$48 main::$33 ] { } ) always clobbers reg byte a +Statement [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] ( [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } main:4 [ vblank_hit main::timer_2#1 main::active_balls#8 main::timer#15 main::h_bar#1 main::i#10 main::sprite_idx#3 ] { } ) always clobbers reg byte a +Statement [102] (word) rand::return#2 ← (word) rand::return#0 [ vblank_hit main::i#14 rand_state#11 rand::return#2 ] ( [ vblank_hit main::i#14 rand_state#11 rand::return#2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4 [ vblank_hit main::i#14 rand_state#11 rand::return#2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } ) always clobbers reg byte a +Statement [103] (word~) main::$9 ← (word) rand::return#2 [ vblank_hit main::i#14 rand_state#11 main::$9 ] ( [ vblank_hit main::i#14 rand_state#11 main::$9 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 main::$9 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff [ vblank_hit main::i#14 rand_state#11 main::$10 ] ( [ vblank_hit main::i#14 rand_state#11 main::$10 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 main::$10 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 [ vblank_hit main::i#14 rand_state#11 main::$10 main::$35 ] ( [ vblank_hit main::i#14 rand_state#11 main::$10 main::$35 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 main::$10 main::$35 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 [ vblank_hit main::i#14 rand_state#11 ] ( [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [108] (word) rand::return#3 ← (word) rand::return#0 [ vblank_hit main::i#14 rand_state#11 rand::return#3 ] ( [ vblank_hit main::i#14 rand_state#11 rand::return#3 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4 [ vblank_hit main::i#14 rand_state#11 rand::return#3 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [109] (word~) main::$11 ← (word) rand::return#3 [ vblank_hit main::i#14 rand_state#11 main::$11 ] ( [ vblank_hit main::i#14 rand_state#11 main::$11 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 main::$11 ] { } ) always clobbers reg byte a +Statement [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff [ vblank_hit main::i#14 rand_state#11 main::$12 ] ( [ vblank_hit main::i#14 rand_state#11 main::$12 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 main::$12 ] { } ) always clobbers reg byte a +Statement [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 [ vblank_hit main::i#14 rand_state#11 main::$12 main::$36 ] ( [ vblank_hit main::i#14 rand_state#11 main::$12 main::$36 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 main::$12 main::$36 ] { } ) always clobbers reg byte a +Statement [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 [ vblank_hit main::i#14 rand_state#11 ] ( [ vblank_hit main::i#14 rand_state#11 ] { } main:4 [ vblank_hit main::i#14 rand_state#11 ] { } ) always clobbers reg byte a +Statement [119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 [ ppuDataTransfer::cpuSrc#6 ] ( ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } main:4::ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } main:4::ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::cpuSrc#6 ] { } ) always clobbers reg byte a +Statement [121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] ( ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:4::ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:4::ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } ) always clobbers reg byte a +Statement [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] ( ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:4::ppuDataTransfer:38 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:4::ppuDataTransfer:44 [ vblank_hit ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } ) always clobbers reg byte a reg byte y +Statement [133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 [ ppuDataFill::size#3 ppuDataFill::i#2 ] ( ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ) always clobbers reg byte a +Statement [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 [ ppuDataFill::size#3 ppuDataFill::i#2 ] ( ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:40 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } main:4::ppuDataFill:42 [ vblank_hit ppuDataFill::size#3 ppuDataFill::i#2 ] { } ) always clobbers reg byte a +Statement [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 [ rand_state#10 rand::$0 ] ( rand:101 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#10 rand::$0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 [ rand_state#0 ] ( rand:101 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 [ rand_state#0 rand::$1 ] ( rand:101 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#0 rand::$1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 [ rand_state#1 ] ( rand:101 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#1 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 [ rand_state#1 rand::$2 ] ( rand:101 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#1 rand::$2 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 [ rand_state#11 ] ( rand:101 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#11 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Statement [144] (word) rand::return#0 ← (word) rand_state#11 [ rand_state#11 rand::return#0 ] ( rand:101 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } main:4::rand:101 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#17 } { rand::return#0 = rand::return#2 } } rand:107 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } main:4::rand:107 [ vblank_hit main::i#14 rand_state#11 rand::return#0 ] { { rand_state#10 = rand_state#11 } { rand::return#0 = rand::return#3 } } ) always clobbers reg byte a +Potential registers zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] : zp[1]:2 , reg byte x , reg byte y , +Potential registers zp[1]:3 [ main::i#14 main::i#2 ] : zp[1]:3 , reg byte x , reg byte y , +Potential registers zp[1]:4 [ main::timer_2#2 main::timer_2#1 ] : zp[1]:4 , reg byte x , reg byte y , +Potential registers zp[1]:5 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] : zp[1]:5 , reg byte x , reg byte y , +Potential registers zp[1]:6 [ main::timer#3 main::timer#15 main::timer#21 ] : zp[1]:6 , reg byte x , reg byte y , +Potential registers zp[1]:7 [ main::i#10 main::i#4 ] : zp[1]:7 , reg byte x , reg byte y , +Potential registers zp[1]:8 [ main::sprite_idx#3 main::sprite_idx#2 ] : zp[1]:8 , reg byte x , reg byte y , +Potential registers zp[2]:9 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] : zp[2]:9 , +Potential registers zp[2]:11 [ ppuDataTransfer::cpuData#2 ] : zp[2]:11 , +Potential registers zp[2]:13 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] : zp[2]:13 , +Potential registers zp[2]:15 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] : zp[2]:15 , +Potential registers zp[2]:17 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] : zp[2]:17 , +Potential registers zp[2]:19 [ ppuDataFill::size#3 ] : zp[2]:19 , +Potential registers zp[2]:21 [ ppuDataFill::i#2 ppuDataFill::i#1 ] : zp[2]:21 , +Potential registers zp[2]:23 [ rand_state#10 rand_state#17 rand_state#11 ] : zp[2]:23 , +Potential registers zp[1]:25 [ scroll_y ] : zp[1]:25 , +Potential registers zp[1]:26 [ vblank_hit ] : zp[1]:26 , +Potential registers zp[1]:27 [ main::initNES1_waitForVBlank1_$0 ] : zp[1]:27 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:28 [ main::initNES1_waitForVBlank2_$0 ] : zp[1]:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:29 [ main::h_bar#1 ] : zp[1]:29 , reg byte x , reg byte y , +Potential registers zp[1]:30 [ main::$14 ] : zp[1]:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:31 [ main::timer#1 ] : zp[1]:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:32 [ main::$38 ] : zp[1]:32 , reg byte x , reg byte y , +Potential registers zp[1]:33 [ main::$40 ] : zp[1]:33 , reg byte x , reg byte y , +Potential registers zp[2]:34 [ main::$20 ] : zp[2]:34 , +Potential registers zp[1]:36 [ main::$45 ] : zp[1]:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:37 [ main::$44 ] : zp[1]:37 , reg byte x , reg byte y , +Potential registers zp[2]:38 [ main::$23 ] : zp[2]:38 , +Potential registers zp[2]:40 [ main::$25 ] : zp[2]:40 , +Potential registers zp[1]:42 [ main::$26 ] : zp[1]:42 , reg byte x , reg byte y , +Potential registers zp[1]:43 [ main::$53 ] : zp[1]:43 , reg byte x , reg byte y , +Potential registers zp[1]:44 [ main::$30 ] : zp[1]:44 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:45 [ main::$56 ] : zp[2]:45 , +Potential registers zp[2]:47 [ main::$31 ] : zp[2]:47 , +Potential registers zp[1]:49 [ main::$50 ] : zp[1]:49 , reg byte x , reg byte y , +Potential registers zp[2]:50 [ main::$32 ] : zp[2]:50 , +Potential registers zp[1]:52 [ main::$48 ] : zp[1]:52 , reg byte x , reg byte y , +Potential registers zp[2]:53 [ main::$33 ] : zp[2]:53 , +Potential registers zp[2]:55 [ rand::return#2 ] : zp[2]:55 , +Potential registers zp[2]:57 [ main::$9 ] : zp[2]:57 , +Potential registers zp[2]:59 [ main::$10 ] : zp[2]:59 , +Potential registers zp[1]:61 [ main::$35 ] : zp[1]:61 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:62 [ rand::return#3 ] : zp[2]:62 , +Potential registers zp[2]:64 [ main::$11 ] : zp[2]:64 , +Potential registers zp[1]:66 [ main::$12 ] : zp[1]:66 , reg byte x , reg byte y , +Potential registers zp[1]:67 [ main::$36 ] : zp[1]:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:68 [ ppuDataTransfer::ppuDataPrepare1_$0 ] : zp[1]:68 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:69 [ ppuDataTransfer::ppuDataPrepare1_$1 ] : zp[1]:69 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:70 [ ppuDataTransfer::ppuDataPut1_val#0 ] : zp[1]:70 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:71 [ ppuDataFill::ppuDataPrepare1_$0 ] : zp[1]:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:72 [ ppuDataFill::ppuDataPrepare1_$1 ] : zp[1]:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:73 [ rand::$0 ] : zp[2]:73 , +Potential registers zp[2]:75 [ rand_state#0 ] : zp[2]:75 , +Potential registers zp[2]:77 [ rand::$1 ] : zp[2]:77 , +Potential registers zp[2]:79 [ rand_state#1 ] : zp[2]:79 , +Potential registers zp[2]:81 [ rand::$2 ] : zp[2]:81 , +Potential registers zp[2]:83 [ rand::return#0 ] : zp[2]:83 , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 3,003: zp[1]:36 [ main::$45 ] 2,502.5: zp[1]:33 [ main::$40 ] 2,260.32: zp[1]:7 [ main::i#10 main::i#4 ] 2,002: zp[2]:34 [ main::$20 ] 2,002: zp[2]:45 [ main::$56 ] 2,002: zp[2]:47 [ main::$31 ] 1,501.5: zp[1]:37 [ main::$44 ] 1,101.1: zp[1]:8 [ main::sprite_idx#3 main::sprite_idx#2 ] 1,001: zp[1]:42 [ main::$26 ] 1,001: zp[1]:44 [ main::$30 ] 1,001: zp[1]:52 [ main::$48 ] 1,001: zp[2]:53 [ main::$33 ] 800.8: zp[1]:43 [ main::$53 ] 667.33: zp[2]:38 [ main::$23 ] 667.33: zp[2]:40 [ main::$25 ] 500.5: zp[1]:49 [ main::$50 ] 500.5: zp[2]:50 [ main::$32 ] 267.9: zp[1]:6 [ main::timer#3 main::timer#15 main::timer#21 ] 263.72: zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] 235.67: zp[1]:3 [ main::i#14 main::i#2 ] 208.18: zp[1]:4 [ main::timer_2#2 main::timer_2#1 ] 202: zp[1]:27 [ main::initNES1_waitForVBlank1_$0 ] 202: zp[1]:28 [ main::initNES1_waitForVBlank2_$0 ] 202: zp[1]:30 [ main::$14 ] 202: zp[2]:57 [ main::$9 ] 202: zp[1]:61 [ main::$35 ] 202: zp[2]:64 [ main::$11 ] 202: zp[1]:67 [ main::$36 ] 169.83: zp[1]:5 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] 151.5: zp[1]:32 [ main::$38 ] 101: zp[1]:31 [ main::timer#1 ] 101: zp[2]:59 [ main::$10 ] 101: zp[1]:66 [ main::$12 ] 72.84: zp[1]:29 [ main::h_bar#1 ] +Uplift Scope [ppuDataTransfer] 2,602.6: zp[2]:13 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] 2,002: zp[1]:70 [ ppuDataTransfer::ppuDataPut1_val#0 ] 1,979: zp[2]:15 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] 202: zp[1]:68 [ ppuDataTransfer::ppuDataPrepare1_$0 ] 202: zp[1]:69 [ ppuDataTransfer::ppuDataPrepare1_$1 ] 67.33: zp[2]:9 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] 0: zp[2]:11 [ ppuDataTransfer::cpuData#2 ] +Uplift Scope [rand] 2,002: zp[2]:73 [ rand::$0 ] 2,002: zp[2]:77 [ rand::$1 ] 2,002: zp[2]:81 [ rand::$2 ] 300.75: zp[2]:83 [ rand::return#0 ] 202: zp[2]:55 [ rand::return#2 ] 202: zp[2]:62 [ rand::return#3 ] +Uplift Scope [] 1,501.5: zp[2]:75 [ rand_state#0 ] 1,501.5: zp[2]:79 [ rand_state#1 ] 1,307.08: zp[2]:23 [ rand_state#10 rand_state#17 rand_state#11 ] 105: zp[1]:25 [ scroll_y ] 10.26: zp[1]:26 [ vblank_hit ] +Uplift Scope [ppuDataFill] 3,003: zp[2]:21 [ ppuDataFill::i#2 ppuDataFill::i#1 ] 202: zp[1]:71 [ ppuDataFill::ppuDataPrepare1_$0 ] 202: zp[1]:72 [ ppuDataFill::ppuDataPrepare1_$1 ] 111.22: zp[2]:19 [ ppuDataFill::size#3 ] 67.33: zp[2]:17 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +Uplift Scope [RICOH_2C02] +Uplift Scope [RICOH_2A03] +Uplift Scope [SpriteData] +Uplift Scope [RADIX] +Uplift Scope [printf_format_number] +Uplift Scope [printf_buffer_number] +Uplift Scope [printf_format_string] +Uplift Scope [$0] +Uplift Scope [vblank] +Uplift Scope [__start] + +Uplifting [ppuDataTransfer] best 56865 combination zp[2]:13 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] zp[2]:15 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] zp[2]:9 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] zp[2]:11 [ ppuDataTransfer::cpuData#2 ] +Uplifting [rand] best 56865 combination zp[2]:73 [ rand::$0 ] zp[2]:77 [ rand::$1 ] zp[2]:81 [ rand::$2 ] zp[2]:83 [ rand::return#0 ] zp[2]:55 [ rand::return#2 ] zp[2]:62 [ rand::return#3 ] +Uplifting [] best 56865 combination zp[2]:75 [ rand_state#0 ] zp[2]:79 [ rand_state#1 ] zp[2]:23 [ rand_state#10 rand_state#17 rand_state#11 ] zp[1]:25 [ scroll_y ] zp[1]:26 [ vblank_hit ] +Uplifting [ppuDataFill] best 56853 combination zp[2]:21 [ ppuDataFill::i#2 ppuDataFill::i#1 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] zp[2]:19 [ ppuDataFill::size#3 ] zp[2]:17 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +Uplifting [RICOH_2C02] best 56853 combination +Uplifting [RICOH_2A03] best 56853 combination +Uplifting [SpriteData] best 56853 combination +Uplifting [RADIX] best 56853 combination +Uplifting [printf_format_number] best 56853 combination +Uplifting [printf_buffer_number] best 56853 combination +Uplifting [printf_format_string] best 56853 combination +Uplifting [$0] best 56853 combination +Uplifting [vblank] best 56853 combination +Uplifting [__start] best 56853 combination +Attempting to uplift remaining variables inzp[1]:36 [ main::$45 ] +Uplifting [main] best 56453 combination reg byte a [ main::$45 ] +Attempting to uplift remaining variables inzp[1]:33 [ main::$40 ] +Uplifting [main] best 55153 combination reg byte y [ main::$40 ] +Attempting to uplift remaining variables inzp[1]:7 [ main::i#10 main::i#4 ] +Uplifting [main] best 55153 combination zp[1]:7 [ main::i#10 main::i#4 ] +Attempting to uplift remaining variables inzp[1]:37 [ main::$44 ] +Uplifting [main] best 54453 combination reg byte y [ main::$44 ] +Attempting to uplift remaining variables inzp[1]:8 [ main::sprite_idx#3 main::sprite_idx#2 ] +Uplifting [main] best 54453 combination zp[1]:8 [ main::sprite_idx#3 main::sprite_idx#2 ] +Attempting to uplift remaining variables inzp[1]:42 [ main::$26 ] +Uplifting [main] best 54453 combination zp[1]:42 [ main::$26 ] +Attempting to uplift remaining variables inzp[1]:44 [ main::$30 ] +Uplifting [main] best 53853 combination reg byte a [ main::$30 ] +Attempting to uplift remaining variables inzp[1]:52 [ main::$48 ] +Uplifting [main] best 52553 combination reg byte x [ main::$48 ] +Attempting to uplift remaining variables inzp[1]:43 [ main::$53 ] +Uplifting [main] best 51853 combination reg byte y [ main::$53 ] +Attempting to uplift remaining variables inzp[1]:49 [ main::$50 ] +Uplifting [main] best 51153 combination reg byte y [ main::$50 ] +Attempting to uplift remaining variables inzp[1]:6 [ main::timer#3 main::timer#15 main::timer#21 ] +Uplifting [main] best 51153 combination zp[1]:6 [ main::timer#3 main::timer#15 main::timer#21 ] +Attempting to uplift remaining variables inzp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] +Uplifting [main] best 50823 combination reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] +Attempting to uplift remaining variables inzp[1]:3 [ main::i#14 main::i#2 ] +Uplifting [main] best 50823 combination zp[1]:3 [ main::i#14 main::i#2 ] +Attempting to uplift remaining variables inzp[1]:4 [ main::timer_2#2 main::timer_2#1 ] +Uplifting [main] best 50823 combination zp[1]:4 [ main::timer_2#2 main::timer_2#1 ] +Attempting to uplift remaining variables inzp[1]:27 [ main::initNES1_waitForVBlank1_$0 ] +Uplifting [main] best 50763 combination reg byte a [ main::initNES1_waitForVBlank1_$0 ] +Attempting to uplift remaining variables inzp[1]:28 [ main::initNES1_waitForVBlank2_$0 ] +Uplifting [main] best 50703 combination reg byte a [ main::initNES1_waitForVBlank2_$0 ] +Attempting to uplift remaining variables inzp[1]:30 [ main::$14 ] +Uplifting [main] best 50643 combination reg byte a [ main::$14 ] +Attempting to uplift remaining variables inzp[1]:61 [ main::$35 ] +Uplifting [main] best 50603 combination reg byte a [ main::$35 ] +Attempting to uplift remaining variables inzp[1]:67 [ main::$36 ] +Uplifting [main] best 50543 combination reg byte a [ main::$36 ] +Attempting to uplift remaining variables inzp[1]:5 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +Uplifting [main] best 50543 combination zp[1]:5 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +Attempting to uplift remaining variables inzp[1]:32 [ main::$38 ] +Uplifting [main] best 50533 combination reg byte x [ main::$38 ] +Attempting to uplift remaining variables inzp[1]:25 [ scroll_y ] +Uplifting [] best 50533 combination zp[1]:25 [ scroll_y ] +Attempting to uplift remaining variables inzp[1]:31 [ main::timer#1 ] +Uplifting [main] best 50473 combination reg byte x [ main::timer#1 ] +Attempting to uplift remaining variables inzp[1]:66 [ main::$12 ] +Uplifting [main] best 50433 combination reg byte x [ main::$12 ] +Attempting to uplift remaining variables inzp[1]:29 [ main::h_bar#1 ] +Uplifting [main] best 50433 combination zp[1]:29 [ main::h_bar#1 ] +Attempting to uplift remaining variables inzp[1]:26 [ vblank_hit ] +Uplifting [] best 50433 combination zp[1]:26 [ vblank_hit ] +Coalescing zero page register [ zp[2]:11 [ ppuDataTransfer::cpuData#2 ] ] with [ zp[2]:15 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] ] - score: 1 +Coalescing zero page register [ zp[2]:23 [ rand_state#10 rand_state#17 rand_state#11 ] ] with [ zp[2]:75 [ rand_state#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:23 [ rand_state#10 rand_state#17 rand_state#11 rand_state#0 ] ] with [ zp[2]:79 [ rand_state#1 ] ] - score: 1 +Coalescing zero page register [ zp[2]:45 [ main::$56 ] ] with [ zp[2]:47 [ main::$31 ] ] - score: 1 +Coalescing zero page register [ zp[2]:55 [ rand::return#2 ] ] with [ zp[2]:57 [ main::$9 ] ] - score: 1 +Coalescing zero page register [ zp[2]:55 [ rand::return#2 main::$9 ] ] with [ zp[2]:83 [ rand::return#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:62 [ rand::return#3 ] ] with [ zp[2]:64 [ main::$11 ] ] - score: 1 +Coalescing zero page register [ zp[2]:55 [ rand::return#2 main::$9 rand::return#0 ] ] with [ zp[2]:59 [ main::$10 ] ] - score: 1 +Coalescing zero page register [ zp[2]:55 [ rand::return#2 main::$9 rand::return#0 main::$10 ] ] with [ zp[2]:62 [ rand::return#3 main::$11 ] ] - score: 1 +Coalescing zero page register [ zp[2]:17 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] ] with [ zp[2]:9 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] ] +Coalescing zero page register [ zp[2]:19 [ ppuDataFill::size#3 ] ] with [ zp[2]:11 [ ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] ] +Coalescing zero page register [ zp[2]:21 [ ppuDataFill::i#2 ppuDataFill::i#1 ] ] with [ zp[2]:13 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] ] +Coalescing zero page register [ zp[2]:34 [ main::$20 ] ] with [ zp[2]:17 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] ] +Coalescing zero page register [ zp[2]:38 [ main::$23 ] ] with [ zp[2]:19 [ ppuDataFill::size#3 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] ] +Coalescing zero page register [ zp[2]:40 [ main::$25 ] ] with [ zp[2]:21 [ ppuDataFill::i#2 ppuDataFill::i#1 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] ] +Allocated (was zp[1]:3) zp[1]:2 [ main::i#14 main::i#2 ] +Allocated (was zp[1]:4) zp[1]:3 [ main::timer_2#2 main::timer_2#1 ] +Allocated (was zp[1]:5) zp[1]:4 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +Allocated (was zp[1]:6) zp[1]:5 [ main::timer#3 main::timer#15 main::timer#21 ] +Allocated (was zp[1]:7) zp[1]:6 [ main::i#10 main::i#4 ] +Allocated (was zp[1]:8) zp[1]:7 [ main::sprite_idx#3 main::sprite_idx#2 ] +Allocated (was zp[2]:23) zp[2]:8 [ rand_state#10 rand_state#17 rand_state#11 rand_state#0 rand_state#1 ] +Allocated (was zp[1]:25) zp[1]:10 [ scroll_y ] +Allocated (was zp[1]:26) zp[1]:11 [ vblank_hit ] +Allocated (was zp[1]:29) zp[1]:12 [ main::h_bar#1 ] +Allocated (was zp[2]:34) zp[2]:13 [ main::$20 ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] +Allocated (was zp[2]:38) zp[2]:15 [ main::$23 ppuDataFill::size#3 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +Allocated (was zp[2]:40) zp[2]:17 [ main::$25 ppuDataFill::i#2 ppuDataFill::i#1 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +Allocated (was zp[1]:42) zp[1]:19 [ main::$26 ] +Allocated (was zp[2]:45) zp[2]:20 [ main::$56 main::$31 ] +Allocated (was zp[2]:50) zp[2]:22 [ main::$32 ] +Allocated (was zp[2]:53) zp[2]:24 [ main::$33 ] +Allocated (was zp[2]:55) zp[2]:26 [ rand::return#2 main::$9 rand::return#0 main::$10 rand::return#3 main::$11 ] +Allocated (was zp[2]:73) zp[2]:28 [ rand::$0 ] +Allocated (was zp[2]:77) zp[2]:30 [ rand::$1 ] +Allocated (was zp[2]:81) zp[2]:32 [ rand::$2 ] + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +//#pragma emulator("java -jar /Applications/Nintaco_bin_2020-05-01/Nintaco.jar") +// Nintendo Entertainment System (NES +// https://en.wikipedia.org/wiki/Nintendo_Entertainment_System_(Model_NES-101) +// https://github.com/gregkrsak/first_nes +// Ricoh 2C02 - NES Picture Processing Unit (PPU) +// Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), +// https://en.wikipedia.org/wiki/Picture_Processing_Unit +// https://wiki.nesdev.com/w/index.php/PPU_registers +// http://nesdev.com/2C02%20technical%20reference.TXT +// Based on: https://github.com/gregkrsak/first_nes written by Greg M. Krsak, 2018. + // Upstart + // Nintendo Entertainment System (NES) ROM (Mapper 0 NROM, Vertical Mirroring) +// https://sadistech.com/nesromtool/romdoc.html +// https://forums.nesdev.com/viewtopic.php?f=2&t=9896 +// https://github.com/gregkrsak/first_nes +.file [name="kickballs-2.nes", type="bin", segments="NesRom"] +.file [name="kickballs-2.nes_hdr", type="bin", segments="Header"] +.file [name="kickballs-2.nes_prg", type="bin", segments="ProgramRom"] +.file [name="kickballs-2.nes_chr", type="bin", segments="CharacterRom"] +.segmentdef Header [ start=$0000, min=$0000, max=$000f, fill ] +.segmentdef Tiles [ start=$0000, min=$0000, max=$1fff, fill ] +.segmentdef Code [ start=$c000, min=$c000, max=$fff9 ] +.segmentdef Data [ startAfter="Code", min=$c000, max=$fff9 ] +.segmentdef Vectors [ start=$fffa, min=$fffa, max=$ffff ] +.segmentdef GameRam [start=$200,max=$7ff, virtual] +.segmentdef ProgramRom [ segments="Code, Data, Vectors" ] +.segmentdef CharacterRom [ segments="Tiles" ] +.segmentdef NesRom +.segment NesRom +.segmentout [ segments="Header" ] +.segmentout [ segments="ProgramRom" ] +.segmentout [ segments="CharacterRom" ] +.segment Header +.text @"NES\$1a" +.byte $01 // 1x 16KB ROM (PRG) +.byte $01 // 1x 8KB VROM (CHR) +.byte %00000001 // Mapper nibble 0000 == No mapping (a simple 16KB PRG + 8KB CHR game) + // Mirroring nibble 0001 == Vertical mirroring only +.segment Code + + // Global Constants & labels + .const OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = $10 + .const OFFSET_STRUCT_RICOH_2C02_PPUMASK = 1 + .const OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = 2 + .const OFFSET_STRUCT_RICOH_2C02_OAMADDR = 3 + .const OFFSET_STRUCT_RICOH_2A03_OAMDMA = $14 + .const OFFSET_STRUCT_RICOH_2C02_PPUADDR = 6 + .const OFFSET_STRUCT_RICOH_2C02_PPUDATA = 7 + .const OFFSET_STRUCT_SPRITEDATA_TILE = 1 + .const OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = 2 + .const OFFSET_STRUCT_SPRITEDATA_X = 3 + .const OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = 5 + .const SIZEOF_BYTE = 1 + // $2000-$23bf $03c0 Name table 0 + .label PPU_NAME_TABLE_0 = $2000 + // $23c0-$23ff $0040 Attribute table 0 + .label PPU_ATTRIBUTE_TABLE_0 = $23c0 + // $3000-$3eff $0f00 Mirrors of $2000-$2eff + // $3f00-$3f1f $0020 Palette RAM indexes + .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // APU Frame Counter + // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. + // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter + // ------+-----+--------------------------------------------------------------- + // $4017 | W | FR_COUNTER Frame Counter Set mode and interrupt + // ------+-----+--------------------------------------------------------------- + // | 7 | Sequencer mode: 0 selects 4-step sequence, 1 selects 5-step sequence + // | 6 | Interrupt inhibit flag. If set, the frame interrupt flag is cleared, otherwise it is unaffected. + // ------+-----+--------------------------------------------------------------- + // Side effects After 3 or 4 CPU clock cycles*, the timer is reset. + // If the mode flag is set, then both "quarter frame" and "half frame" signals are also generated. + .label FR_COUNTER = $4017 + // Pointer to the start of RAM memory + .label MEMORY = 0 + // NES Picture Processing Unit (PPU) + .label PPU = $2000 + // NES CPU and audion processing unit (APU) + .label APU = $4000 + .label scroll_y = $a + .label vblank_hit = $b + // The random state variable + .label rand_state = 8 +.segment Code + // __start +__start: { + jmp __init1 + // __start::__init1 + __init1: + // [1] (volatile byte) scroll_y ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z scroll_y + // [2] (volatile byte) vblank_hit ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z vblank_hit + // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + __b1_from___init1: + jmp __b1 + // __start::@1 + __b1: + // [4] call main + // [12] phi from __start::@1 to main [phi:__start::@1->main] + main_from___b1: + jsr main + jmp __breturn + // __start::@return + __breturn: + // [5] return + rts +} + // vblank +// NMI Called when the PPU refreshes the screen (also known as the V-Blank period) +vblank: { + // entry interrupt(HARDWARE_STACK) + pha + txa + pha + tya + pha + // [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // Set scroll + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + // [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y -- _deref_pbuc1=vbuz1 + lda.z scroll_y + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + jmp ppuSpriteBufferDmaTransfer1 + // vblank::ppuSpriteBufferDmaTransfer1 + ppuSpriteBufferDmaTransfer1: + // [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_OAMADDR + // [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER -- _deref_pbuc1=vbuc2 + lda #>SPRITE_BUFFER + sta APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA + jmp __b1 + // vblank::@1 + __b1: + // [10] (volatile byte) vblank_hit ← ++ (volatile byte) vblank_hit -- vbuz1=_inc_vbuz1 + inc.z vblank_hit + jmp __breturn + // vblank::@return + __breturn: + // [11] return - exit interrupt(HARDWARE_STACK) + pla + tay + pla + tax + pla + rti +} + // main +main: { + .label __9 = $1a + .label __10 = $1a + .label __11 = $1a + .label __20 = $d + .label __23 = $f + .label __25 = $11 + .label __26 = $13 + .label __31 = $14 + .label __32 = $16 + .label __33 = $18 + .label __56 = $14 + .label i = 2 + .label timer_2 = 3 + .label h_bar = $c + .label active_balls = 4 + .label sprite_idx = 7 + .label i_1 = 6 + .label timer = 5 + jmp initNES1 + // main::initNES1 + initNES1: + // asm { cld ldx#$ff txs } + cld + ldx #$ff + txs + jmp initNES1_disableVideoOutput1 + // main::initNES1_disableVideoOutput1 + initNES1_disableVideoOutput1: + // [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU + // [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + jmp initNES1_disableAudioOutput1 + // main::initNES1_disableAudioOutput1 + initNES1_disableAudioOutput1: + // [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 -- _deref_pbuc1=vbuc2 + lda #$40 + sta FR_COUNTER + // [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 -- _deref_pbuc1=vbuc2 + lda #$40 + sta APU+OFFSET_STRUCT_RICOH_2A03_DMC_FREQ + jmp initNES1_clearVBlankFlag1 + // main::initNES1_clearVBlankFlag1 + initNES1_clearVBlankFlag1: + // asm { ldaPPU_PPUSTATUS } + lda PPU_PPUSTATUS + // [19] phi from main::initNES1_clearVBlankFlag1 to main::initNES1_waitForVBlank1 [phi:main::initNES1_clearVBlankFlag1->main::initNES1_waitForVBlank1] + initNES1_waitForVBlank1_from_initNES1_clearVBlankFlag1: + jmp initNES1_waitForVBlank1 + // main::initNES1_waitForVBlank1 + initNES1_waitForVBlank1: + jmp initNES1_waitForVBlank1___b1 + // main::initNES1_waitForVBlank1_@1 + initNES1_waitForVBlank1___b1: + // [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 -- vbuaa=_deref_pbuc1_band_vbuc2 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + // [21] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 -- vbuc1_eq_vbuaa_then_la1 + cmp #0 + beq initNES1_waitForVBlank1___b1 + // [22] phi from main::initNES1_waitForVBlank1_@1 to main::initNES1_@1 [phi:main::initNES1_waitForVBlank1_@1->main::initNES1_@1] + initNES1___b1_from_initNES1_waitForVBlank1___b1: + // [22] phi (byte) main::initNES1_i#2 = (byte) 0 [phi:main::initNES1_waitForVBlank1_@1->main::initNES1_@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp initNES1___b1 + // [22] phi from main::initNES1_@1 to main::initNES1_@1 [phi:main::initNES1_@1->main::initNES1_@1] + initNES1___b1_from_initNES1___b1: + // [22] phi (byte) main::initNES1_i#2 = (byte) main::initNES1_i#1 [phi:main::initNES1_@1->main::initNES1_@1#0] -- register_copy + jmp initNES1___b1 + // main::initNES1_@1 + initNES1___b1: + // [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY,x + // [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$100,x + // [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$200,x + // [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$300,x + // [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$400,x + // [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$500,x + // [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$600,x + // [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY+$700,x + // [31] (byte) main::initNES1_i#1 ← ++ (byte) main::initNES1_i#2 -- vbuxx=_inc_vbuxx + inx + // [32] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 -- vbuc1_neq_vbuxx_then_la1 + cpx #0 + bne initNES1___b1_from_initNES1___b1 + // [33] phi from main::initNES1_@1 to main::initNES1_waitForVBlank2 [phi:main::initNES1_@1->main::initNES1_waitForVBlank2] + initNES1_waitForVBlank2_from_initNES1___b1: + jmp initNES1_waitForVBlank2 + // main::initNES1_waitForVBlank2 + initNES1_waitForVBlank2: + jmp initNES1_waitForVBlank2___b1 + // main::initNES1_waitForVBlank2_@1 + initNES1_waitForVBlank2___b1: + // [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 -- vbuaa=_deref_pbuc1_band_vbuc2 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + // [35] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 -- vbuc1_eq_vbuaa_then_la1 + cmp #0 + beq initNES1_waitForVBlank2___b1 + jmp initNES1___b7 + // main::initNES1_@7 + initNES1___b7: + // asm { ldaPPU_PPUSTATUS } + lda PPU_PPUSTATUS + // [37] phi from main::initNES1_@7 to main::@17 [phi:main::initNES1_@7->main::@17] + __b17_from_initNES1___b7: + jmp __b17 + // main::@17 + __b17: + // [38] call ppuDataTransfer + // Transfer the palette + // [114] phi from main::@17 to ppuDataTransfer [phi:main::@17->ppuDataTransfer] + ppuDataTransfer_from___b17: + // [114] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const to_nomodify byte*) palette [phi:main::@17->ppuDataTransfer#0] -- pvoz1=pvoc1 + lda #palette + sta.z ppuDataTransfer.cpuData+1 + // [114] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE [phi:main::@17->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + // [39] phi from main::@17 to main::@19 [phi:main::@17->main::@19] + __b19_from___b17: + jmp __b19 + // main::@19 + __b19: + // [40] call ppuDataFill + // Fill the PPU attribute table + // [127] phi from main::@19 to ppuDataFill [phi:main::@19->ppuDataFill] + ppuDataFill_from___b19: + // [127] phi (word) ppuDataFill::size#3 = (word)(number) $20*(number) $1e [phi:main::@19->ppuDataFill#0] -- vwuz1=vwuc1 + lda #<$20*$1e + sta.z ppuDataFill.size + lda #>$20*$1e + sta.z ppuDataFill.size+1 + // [127] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:main::@19->ppuDataFill#1] -- pvoz1=pvoc1 + lda #PPU_NAME_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // [41] phi from main::@19 to main::@20 [phi:main::@19->main::@20] + __b20_from___b19: + jmp __b20 + // main::@20 + __b20: + // [42] call ppuDataFill + // [127] phi from main::@20 to ppuDataFill [phi:main::@20->ppuDataFill] + ppuDataFill_from___b20: + // [127] phi (word) ppuDataFill::size#3 = (byte) $40 [phi:main::@20->ppuDataFill#0] -- vwuz1=vbuc1 + lda #<$40 + sta.z ppuDataFill.size + lda #>$40 + sta.z ppuDataFill.size+1 + // [127] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@20->ppuDataFill#1] -- pvoz1=pvoc1 + lda #PPU_ATTRIBUTE_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // [43] phi from main::@20 to main::@21 [phi:main::@20->main::@21] + __b21_from___b20: + jmp __b21 + // main::@21 + __b21: + // [44] call ppuDataTransfer + // [114] phi from main::@21 to ppuDataTransfer [phi:main::@21->ppuDataTransfer] + ppuDataTransfer_from___b21: + // [114] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const to_nomodify byte*) h_bar_tilemap [phi:main::@21->ppuDataTransfer#0] -- pvoz1=pvoc1 + lda #h_bar_tilemap + sta.z ppuDataTransfer.cpuData+1 + // [114] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*) 8256 [phi:main::@21->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #<$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData + lda #>$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + jmp enableVideoOutput1 + // main::enableVideoOutput1 + enableVideoOutput1: + // [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 + lda #$80 + sta PPU + // [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 + lda #$1e + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + jmp __b18 + // main::@18 + __b18: + // [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 -- _deref_pbuc1=vbuc2 + // Enable vertical blank interrupt, select sprite pattern table 1 + lda #$88 + sta PPU + // [48] phi from main::@18 to main::@1 [phi:main::@18->main::@1] + __b1_from___b18: + // [48] phi (word) rand_state#17 = (word) 1 [phi:main::@18->main::@1#0] -- vwuz1=vwuc1 + lda #<1 + sta.z rand_state + lda #>1 + sta.z rand_state+1 + // [48] phi (byte) main::i#14 = (byte) 0 [phi:main::@18->main::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp __b1 + // main::@1 + __b1: + // [49] if((byte) main::i#14<(byte) $20) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #$20 + bcc __b2_from___b1 + // [50] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + __b3_from___b1: + // [50] phi (byte) main::timer#3 = (byte) 0 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta.z timer + // [50] phi (byte) main::active_balls#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + lda #0 + sta.z active_balls + // [50] phi (byte) main::timer_2#2 = (byte) 0 [phi:main::@1->main::@3#2] -- vbuz1=vbuc1 + lda #0 + sta.z timer_2 + jmp __b3 + // main::@3 + __b3: + jmp __b4 + // main::@4 + __b4: + // [51] (byte) main::timer_2#1 ← ++ (byte) main::timer_2#2 -- vbuz1=_inc_vbuz1 + inc.z timer_2 + // [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 -- vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 + lda #$60 + ldy.z timer_2 + clc + adc sine_table,y + sta.z h_bar + // [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff -- vbuaa=vbuz1_bxor_vbuc1 + lda #$ff + eor.z h_bar + // [54] (volatile byte) scroll_y ← (byte~) main::$14 -- vbuz1=vbuaa + sta.z scroll_y + // [55] if((byte) main::active_balls#2>=(byte) $20) goto main::@5 -- vbuz1_ge_vbuc1_then_la1 + lda.z active_balls + cmp #$20 + bcs __b5_from___b4 + jmp __b15 + // main::@15 + __b15: + // [56] (byte) main::timer#1 ← ++ (byte) main::timer#3 -- vbuxx=_inc_vbuz1 + ldx.z timer + inx + // [57] if((byte) main::timer#3!=(byte) 9) goto main::@25 -- vbuz1_neq_vbuc1_then_la1 + lda #9 + cmp.z timer + bne __b25 + jmp __b16 + // main::@16 + __b16: + // [58] (byte) main::active_balls#1 ← ++ (byte) main::active_balls#2 -- vbuz1=_inc_vbuz1 + inc.z active_balls + // [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 -- vbuxx=vbuz1_rol_3 + lda.z active_balls + asl + asl + asl + tax + // [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta balls,x + lda #0 + sta balls+1,x + // [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta balls+2,x + lda #0 + sta balls+2+1,x + // [62] phi from main::@16 to main::@5 [phi:main::@16->main::@5] + __b5_from___b16: + // [62] phi (byte) main::timer#15 = (byte) 0 [phi:main::@16->main::@5#0] -- vbuz1=vbuc1 + lda #0 + sta.z timer + // [62] phi (byte) main::active_balls#8 = (byte) main::active_balls#1 [phi:main::@16->main::@5#1] -- register_copy + jmp __b5 + // [62] phi from main::@25 main::@4 to main::@5 [phi:main::@25/main::@4->main::@5] + __b5_from___b25: + __b5_from___b4: + // [62] phi (byte) main::timer#15 = (byte) main::timer#21 [phi:main::@25/main::@4->main::@5#0] -- register_copy + // [62] phi (byte) main::active_balls#8 = (byte) main::active_balls#2 [phi:main::@25/main::@4->main::@5#1] -- register_copy + jmp __b5 + // main::@5 + __b5: + // [63] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + __b6_from___b5: + // [63] phi (byte) main::sprite_idx#3 = (byte) 0 [phi:main::@5->main::@6#0] -- vbuz1=vbuc1 + lda #0 + sta.z sprite_idx + // [63] phi (byte) main::i#10 = (byte) 0 [phi:main::@5->main::@6#1] -- vbuz1=vbuc1 + lda #0 + sta.z i_1 + jmp __b6 + // main::@6 + __b6: + // [64] if((byte) main::i#10<(byte) main::active_balls#8) goto main::@7 -- vbuz1_lt_vbuz2_then_la1 + lda.z i_1 + cmp.z active_balls + bcc __b7 + jmp __b8 + // main::@8 + __b8: + // [65] *((byte*) 8193) ← (byte) $98 -- _deref_pbuc1=vbuc2 + lda #$98 + sta $2001 + jmp __b13 + // main::@13 + __b13: + // [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp.z vblank_hit + beq __b13 + jmp __b14 + // main::@14 + __b14: + // [67] (volatile byte) vblank_hit ← (byte) 0 -- vbuz1=vbuc1 + // wait for vblank + lda #0 + sta.z vblank_hit + // [68] *((byte*) 8193) ← (byte) $18 -- _deref_pbuc1=vbuc2 + lda #$18 + sta $2001 + // [50] phi from main::@14 to main::@3 [phi:main::@14->main::@3] + __b3_from___b14: + // [50] phi (byte) main::timer#3 = (byte) main::timer#15 [phi:main::@14->main::@3#0] -- register_copy + // [50] phi (byte) main::active_balls#2 = (byte) main::active_balls#8 [phi:main::@14->main::@3#1] -- register_copy + // [50] phi (byte) main::timer_2#2 = (byte) main::timer_2#1 [phi:main::@14->main::@3#2] -- register_copy + jmp __b3 + // main::@7 + __b7: + // [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy + clc + lda balls,y + adc balls+4,y + sta balls,y + lda balls+1,y + adc balls+4+1,y + sta balls+1,y + // [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_vbuc2 + clc + lda balls+6,y + adc #$10 + sta balls+6,y + lda balls+6+1,y + adc #0 + sta balls+6+1,y + // [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy + clc + lda balls+2,y + adc balls+6,y + sta balls+2,y + lda balls+2+1,y + adc balls+6+1,y + sta balls+2+1,y + // [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __20+1 + lda balls+1,y + sta.z __20 + // [74] if((word~) main::$20>=(byte) 8) goto main::@9 -- vwuz1_ge_vbuc1_then_la1 + lda.z __20+1 + bne __b9 + lda.z __20 + cmp #8 + bcs __b9 + !: + jmp __b11 + // main::@11 + __b11: + // [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + // [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff -- pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_bxor_vwuc2 + tay + lda balls+4,y + eor #<$ffff + sta balls+4,y + lda balls+4+1,y + eor #>$ffff + sta balls+4+1,y + jmp __b9 + // main::@9 + __b9: + // [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __23+1 + lda balls+2+1,y + sta.z __23 + // [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __25+1 + lda balls+2+1,y + sta.z __25 + // [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 -- vbuz1=vbuz2_plus_vbuc1 + lax.z h_bar + axs #-[8] + stx.z __26 + // [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 -- vwuz1_lt_vbuz2_then_la1 + lda.z __23+1 + bne !+ + lda.z __23 + cmp.z h_bar + bcc __b10 + !: + jmp __b24 + // main::@24 + __b24: + // [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 -- vwuz1_ge_vbuz2_then_la1 + lda.z __25+1 + bne __b10 + lda.z __25 + cmp.z __26 + bcs __b10 + !: + jmp __b12 + // main::@12 + __b12: + // [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_bxor_vwuc2 + lda balls+6,y + eor #<$ffff + sta balls+6,y + lda balls+6+1,y + eor #>$ffff + sta balls+6+1,y + // [85] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2 -- vbuaa=vbuz1_minus_2 + lda.z h_bar + sec + sbc #2 + // [86] (word~) main::$56 ← (word)(byte~) main::$30 -- vwuz1=_word_vbuaa + sta.z __56 + lda #0 + sta.z __56+1 + // [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 -- vwuz1=vwuz1_rol_8 + lda.z __31 + sta.z __31+1 + lda #0 + sta.z __31 + // [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 -- pwuc1_derefidx_vbuyy=vwuz1 + lda.z __31 + sta balls+2,y + lda.z __31+1 + sta balls+2+1,y + jmp __b10 + // main::@10 + __b10: + // [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __32+1 + lda balls+2+1,y + sta.z __32 + // [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 -- vbuxx=vbuz1_rol_2 + lda.z sprite_idx + asl + asl + tax + // [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 -- pbuc1_derefidx_vbuxx=_byte_vwuz1 + lda.z __32 + sta SPRITE_BUFFER,x + // [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a -- pbuc1_derefidx_vbuxx=vbuc2 + lda #$a + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_TILE,x + // [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #3 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES,x + // [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __33+1 + lda balls+1,y + sta.z __33 + // [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 -- pbuc1_derefidx_vbuxx=_byte_vwuz1 + lda.z __33 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_X,x + // [97] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 -- vbuz1=_inc_vbuz1 + inc.z sprite_idx + // [98] (byte) main::i#4 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 + inc.z i_1 + // [63] phi from main::@10 to main::@6 [phi:main::@10->main::@6] + __b6_from___b10: + // [63] phi (byte) main::sprite_idx#3 = (byte) main::sprite_idx#2 [phi:main::@10->main::@6#0] -- register_copy + // [63] phi (byte) main::i#10 = (byte) main::i#4 [phi:main::@10->main::@6#1] -- register_copy + jmp __b6 + // main::@25 + __b25: + // [99] (byte) main::timer#21 ← (byte) main::timer#1 -- vbuz1=vbuxx + stx.z timer + jmp __b5_from___b25 + // [100] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + __b2_from___b1: + jmp __b2 + // main::@2 + __b2: + // [101] call rand + // [137] phi from main::@2 to rand [phi:main::@2->rand] + rand_from___b2: + // [137] phi (word) rand_state#10 = (word) rand_state#17 [phi:main::@2->rand#0] -- register_copy + jsr rand + // [102] (word) rand::return#2 ← (word) rand::return#0 + jmp __b22 + // main::@22 + __b22: + // [103] (word~) main::$9 ← (word) rand::return#2 + // [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff -- vwuz1=vwuz1_band_vwuc1 + lda.z __10 + and #<$3ff + sta.z __10 + lda.z __10+1 + and #>$3ff + sta.z __10+1 + // [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 -- vbuaa=vbuz1_rol_3 + lda.z i + asl + asl + asl + // [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z __10 + sta balls+4,y + lda.z __10+1 + sta balls+4+1,y + // [107] call rand + // [137] phi from main::@22 to rand [phi:main::@22->rand] + rand_from___b22: + // [137] phi (word) rand_state#10 = (word) rand_state#11 [phi:main::@22->rand#0] -- register_copy + jsr rand + // [108] (word) rand::return#3 ← (word) rand::return#0 + jmp __b23 + // main::@23 + __b23: + // [109] (word~) main::$11 ← (word) rand::return#3 + // [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff -- vbuxx=vwuz1_band_vbuc1 + lda #$ff + and.z __11 + tax + // [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 -- vbuaa=vbuz1_rol_3 + lda.z i + asl + asl + asl + // [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 -- pwuc1_derefidx_vbuaa=vbuxx + tay + txa + sta balls+6,y + // [113] (byte) main::i#2 ← ++ (byte) main::i#14 -- vbuz1=_inc_vbuz1 + inc.z i + // [48] phi from main::@23 to main::@1 [phi:main::@23->main::@1] + __b1_from___b23: + // [48] phi (word) rand_state#17 = (word) rand_state#11 [phi:main::@23->main::@1#0] -- register_copy + // [48] phi (byte) main::i#14 = (byte) main::i#2 [phi:main::@23->main::@1#1] -- register_copy + jmp __b1 +} + // ppuDataTransfer +// Transfer a number of bytes from the CPU memory to the PPU memory +// - ppuData : Pointer in the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp($f) cpuData) +ppuDataTransfer: { + .label ppuDataPrepare1_ppuData = $d + .label cpuSrc = $f + .label i = $11 + .label cpuData = $f + jmp ppuDataPrepare1 + // ppuDataTransfer::ppuDataPrepare1 + ppuDataPrepare1: + // [115] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + lda.z ppuDataPrepare1_ppuData+1 + // [116] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [117] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuaa=_lo_pvoz1 + lda.z ppuDataPrepare1_ppuData + // [118] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + jmp __b3 + // ppuDataTransfer::@3 + __b3: + // [119] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 + // [120] phi from ppuDataTransfer::@3 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1] + __b1_from___b3: + // [120] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#6 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy + // [120] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // ppuDataTransfer::@1 + __b1: + // [121] if((word) ppuDataTransfer::i#2<(byte) $20*(const byte) SIZEOF_BYTE) goto ppuDataTransfer::@2 -- vwuz1_lt_vbuc1_then_la1 + lda.z i+1 + cmp #>$20*SIZEOF_BYTE + bcc __b2 + bne !+ + lda.z i + cmp #<$20*SIZEOF_BYTE + bcc __b2 + !: + jmp __breturn + // ppuDataTransfer::@return + __breturn: + // [122] return + rts + // ppuDataTransfer::@2 + __b2: + // [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) -- vbuaa=_deref_pbuz1 + ldy #0 + lda (cpuSrc),y + jmp ppuDataPut1 + // ppuDataTransfer::ppuDataPut1 + ppuDataPut1: + // [124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b4 + // ppuDataTransfer::@4 + __b4: + // [125] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // [126] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 -- vwuz1=_inc_vwuz1 + inc.z i + bne !+ + inc.z i+1 + !: + // [120] phi from ppuDataTransfer::@4 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1] + __b1_from___b4: + // [120] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#0] -- register_copy + // [120] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#1] -- register_copy + jmp __b1 +} + // ppuDataFill +// Fill a number of bytes in the PPU memory +// - ppuData : Pointer in the PPU memory +// - size : The number of bytes to transfer +// ppuDataFill(word zp($f) size) +ppuDataFill: { + .label ppuDataPrepare1_ppuData = $d + .label i = $11 + .label size = $f + jmp ppuDataPrepare1 + // ppuDataFill::ppuDataPrepare1 + ppuDataPrepare1: + // [128] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + lda.z ppuDataPrepare1_ppuData+1 + // [129] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [130] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_lo_pvoz1 + lda.z ppuDataPrepare1_ppuData + // [131] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [132] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] + __b1_from_ppuDataPrepare1: + // [132] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // Transfer to PPU + // ppuDataFill::@1 + __b1: + // [133] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#3) goto ppuDataFill::ppuDataPut1 -- vwuz1_lt_vwuz2_then_la1 + lda.z i+1 + cmp.z size+1 + bcc ppuDataPut1 + bne !+ + lda.z i + cmp.z size + bcc ppuDataPut1 + !: + jmp __breturn + // ppuDataFill::@return + __breturn: + // [134] return + rts + // ppuDataFill::ppuDataPut1 + ppuDataPut1: + // [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b2 + // ppuDataFill::@2 + __b2: + // [136] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 -- vwuz1=_inc_vwuz1 + inc.z i + bne !+ + inc.z i+1 + !: + // [132] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] + __b1_from___b2: + // [132] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + jmp __b1 +} + // rand +// Returns a pseudo-random number in the range of 0 to RAND_MAX (65535) +// Uses an xorshift pseudorandom number generator that hits all different values +// Information https://en.wikipedia.org/wiki/Xorshift +// Source http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html +rand: { + .label __0 = $1c + .label __1 = $1e + .label __2 = $20 + .label return = $1a + // [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 -- vwuz1=vwuz2_rol_7 + lda.z rand_state+1 + lsr + lda.z rand_state + ror + sta.z __0+1 + lda #0 + ror + sta.z __0 + // [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 -- vwuz1=vwuz1_bxor_vwuz2 + lda.z rand_state + eor.z __0 + sta.z rand_state + lda.z rand_state+1 + eor.z __0+1 + sta.z rand_state+1 + // [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 -- vwuz1=vwuz2_ror_9 + lda.z rand_state+1 + lsr + sta.z __1 + lda #0 + sta.z __1+1 + // [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 -- vwuz1=vwuz1_bxor_vwuz2 + lda.z rand_state + eor.z __1 + sta.z rand_state + lda.z rand_state+1 + eor.z __1+1 + sta.z rand_state+1 + // [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 -- vwuz1=vwuz2_rol_8 + lda.z rand_state + sta.z __2+1 + lda #0 + sta.z __2 + // [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 -- vwuz1=vwuz1_bxor_vwuz2 + lda.z rand_state + eor.z __2 + sta.z rand_state + lda.z rand_state+1 + eor.z __2+1 + sta.z rand_state+1 + // [144] (word) rand::return#0 ← (word) rand_state#11 -- vwuz1=vwuz2 + lda.z rand_state + sta.z return + lda.z rand_state+1 + sta.z return+1 + jmp __breturn + // rand::@return + __breturn: + // [145] return + rts +} + // File Data +.segment GameRam + // Moving balls (in GameRAM) + balls: .fill 8*$40, 0 +.segment Data + sine_table: .byte $40, $42, $43, $45, $46, $48, $49, $4b, $4c, $4e, $50, $51, $53, $54, $56, $57, $58, $5a, $5b, $5d, $5e, $60, $61, $62, $64, $65, $66, $67, $69, $6a, $6b, $6c, $6d, $6e, $6f, $70, $71, $72, $73, $74, $75, $76, $77, $78, $78, $79, $7a, $7b, $7b, $7c, $7c, $7d, $7d, $7e, $7e, $7e, $7f, $7f, $7f, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $7f, $7f, $7f, $7e, $7e, $7e, $7d, $7d, $7c, $7c, $7b, $7b, $7a, $79, $78, $78, $77, $76, $75, $74, $73, $72, $71, $70, $6f, $6e, $6d, $6c, $6b, $6a, $69, $67, $66, $65, $64, $62, $61, $60, $5e, $5d, $5b, $5a, $58, $57, $56, $54, $53, $51, $50, $4e, $4c, $4b, $49, $48, $46, $45, $43, $42, $40, $3e, $3d, $3b, $3a, $38, $37, $35, $34, $32, $30, $2f, $2d, $2c, $2a, $29, $28, $26, $25, $23, $22, $20, $1f, $1e, $1c, $1b, $1a, $19, $17, $16, $15, $14, $13, $12, $11, $10, $f, $e, $d, $c, $b, $a, 9, 8, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, $a, $b, $c, $d, $e, $f, $10, $11, $12, $13, $14, $15, $16, $17, $19, $1a, $1b, $1c, $1e, $1f, $20, $22, $23, $25, $26, $28, $29, $2a, $2c, $2d, $2f, $30, $32, $34, $35, $37, $38, $3a, $3b, $3d, $3e + palette: .byte $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4 + h_bar_tilemap: .byte 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +.segment Tiles +TILES: +.import binary "lazydata.chr" + +.segment GameRam + .align $100 + SPRITE_BUFFER: .fill 4*$100, 0 +.segment Vectors + VECTORS: .word vblank, main, 0 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __init1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp ppuSpriteBufferDmaTransfer1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp initNES1 +Removing instruction jmp initNES1_disableVideoOutput1 +Removing instruction jmp initNES1_disableAudioOutput1 +Removing instruction jmp initNES1_clearVBlankFlag1 +Removing instruction jmp initNES1_waitForVBlank1 +Removing instruction jmp initNES1_waitForVBlank1___b1 +Removing instruction jmp initNES1___b1 +Removing instruction jmp initNES1_waitForVBlank2 +Removing instruction jmp initNES1_waitForVBlank2___b1 +Removing instruction jmp initNES1___b7 +Removing instruction jmp __b17 +Removing instruction jmp __b19 +Removing instruction jmp __b20 +Removing instruction jmp __b21 +Removing instruction jmp enableVideoOutput1 +Removing instruction jmp __b18 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __b4 +Removing instruction jmp __b15 +Removing instruction jmp __b16 +Removing instruction jmp __b5 +Removing instruction jmp __b6 +Removing instruction jmp __b8 +Removing instruction jmp __b13 +Removing instruction jmp __b14 +Removing instruction jmp __b11 +Removing instruction jmp __b9 +Removing instruction jmp __b24 +Removing instruction jmp __b12 +Removing instruction jmp __b10 +Removing instruction jmp __b2 +Removing instruction jmp __b22 +Removing instruction jmp __b23 +Removing instruction jmp ppuDataPrepare1 +Removing instruction jmp __b3 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp ppuDataPut1 +Removing instruction jmp __b4 +Removing instruction jmp ppuDataPrepare1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b2 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #$40 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda.z __31 +Removing instruction lda.z __33 +Removing instruction lda #>0 +Removing instruction lda #>0 +Removing instruction lda.z rand_state+1 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label initNES1_waitForVBlank1___b1 with initNES1_waitForVBlank1 +Replacing label initNES1___b1_from_initNES1___b1 with initNES1___b1 +Replacing label initNES1_waitForVBlank2___b1 with initNES1_waitForVBlank2 +Replacing label __b2_from___b1 with __b2 +Replacing label __b5_from___b4 with __b5 +Replacing label __b3 with __b4 +Replacing label __b5_from___b25 with __b5 +Removing instruction __b1_from___init1: +Removing instruction main_from___b1: +Removing instruction initNES1_waitForVBlank1_from_initNES1_clearVBlankFlag1: +Removing instruction initNES1_waitForVBlank1___b1: +Removing instruction initNES1___b1_from_initNES1___b1: +Removing instruction initNES1_waitForVBlank2_from_initNES1___b1: +Removing instruction initNES1_waitForVBlank2___b1: +Removing instruction __b17_from_initNES1___b7: +Removing instruction __b19_from___b17: +Removing instruction __b20_from___b19: +Removing instruction ppuDataFill_from___b20: +Removing instruction __b21_from___b20: +Removing instruction ppuDataTransfer_from___b21: +Removing instruction __b3: +Removing instruction __b5_from___b25: +Removing instruction __b5_from___b4: +Removing instruction __b6_from___b5: +Removing instruction __b2_from___b1: +Removing instruction rand_from___b2: +Removing instruction __b1_from___b3: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction __init1: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction ppuSpriteBufferDmaTransfer1: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction initNES1: +Removing instruction initNES1_disableVideoOutput1: +Removing instruction initNES1_disableAudioOutput1: +Removing instruction initNES1_clearVBlankFlag1: +Removing instruction initNES1___b1_from_initNES1_waitForVBlank1___b1: +Removing instruction initNES1___b7: +Removing instruction __b17: +Removing instruction ppuDataTransfer_from___b17: +Removing instruction __b19: +Removing instruction ppuDataFill_from___b19: +Removing instruction __b20: +Removing instruction __b21: +Removing instruction enableVideoOutput1: +Removing instruction __b18: +Removing instruction __b1_from___b18: +Removing instruction __b3_from___b1: +Removing instruction __b15: +Removing instruction __b16: +Removing instruction __b5_from___b16: +Removing instruction __b8: +Removing instruction __b14: +Removing instruction __b3_from___b14: +Removing instruction __b11: +Removing instruction __b24: +Removing instruction __b12: +Removing instruction __b6_from___b10: +Removing instruction __b22: +Removing instruction rand_from___b22: +Removing instruction __b23: +Removing instruction __b1_from___b23: +Removing instruction ppuDataPrepare1: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction ppuDataPut1: +Removing instruction __b4: +Removing instruction __b1_from___b4: +Removing instruction ppuDataPrepare1: +Removing instruction __b1_from_ppuDataPrepare1: +Removing instruction __breturn: +Removing instruction __b2: +Removing instruction __b1_from___b2: +Removing instruction __breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Removing instruction jmp initNES1___b1 +Removing instruction jmp __b5 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Fixing long branch [221] bcc __b2 to bcs +Fixing long branch [245] bne __b25 to beq + +FINAL SYMBOL TABLE +(word) $0::x_position +(word) $0::x_velocity +(word) $0::y_position +(word) $0::y_velocity +(const struct RICOH_2A03*) APU = (struct RICOH_2A03*) 16384 +(const nomodify byte*) FR_COUNTER = (byte*) 16407 +(const nomodify byte*) MEMORY = (byte*) 0 +(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = (byte) $10 +(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA = (byte) $14 +(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR = (byte) 3 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR = (byte) 6 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA = (byte) 7 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK = (byte) 1 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = (byte) 5 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = (byte) 2 +(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = (byte) 2 +(const byte) OFFSET_STRUCT_SPRITEDATA_TILE = (byte) 1 +(const byte) OFFSET_STRUCT_SPRITEDATA_X = (byte) 3 +(const struct RICOH_2C02*) PPU = (struct RICOH_2C02*) 8192 +(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 = (byte*) 9152 +(const nomodify byte*) PPU_NAME_TABLE_0 = (byte*) 8192 +(const nomodify byte*) PPU_PALETTE = (byte*) 16128 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const byte) RADIX::BINARY = (number) 2 +(const byte) RADIX::DECIMAL = (number) $a +(const byte) RADIX::HEXADECIMAL = (number) $10 +(const byte) RADIX::OCTAL = (number) 8 +(byte) RICOH_2A03::DMC_FREQ +(byte) RICOH_2A03::DMC_LEN +(byte) RICOH_2A03::DMC_RAW +(byte) RICOH_2A03::DMC_START +(byte) RICOH_2A03::JOY1 +(byte) RICOH_2A03::JOY2 +(byte) RICOH_2A03::NOISE_HI +(byte) RICOH_2A03::NOISE_LO +(byte) RICOH_2A03::NOISE_VOL +(byte) RICOH_2A03::OAMDMA +(byte) RICOH_2A03::SND_CHN +(byte) RICOH_2A03::SQ1_HI +(byte) RICOH_2A03::SQ1_LO +(byte) RICOH_2A03::SQ1_SWEEP +(byte) RICOH_2A03::SQ1_VOL +(byte) RICOH_2A03::SQ2_HI +(byte) RICOH_2A03::SQ2_LO +(byte) RICOH_2A03::SQ2_SWEEP +(byte) RICOH_2A03::SQ2_VOL +(byte) RICOH_2A03::TRI_HI +(byte) RICOH_2A03::TRI_LINEAR +(byte) RICOH_2A03::TRI_LO +(byte) RICOH_2A03::UNUSED1 +(byte) RICOH_2A03::UNUSED2 +(byte) RICOH_2C02::OAMADDR +(byte) RICOH_2C02::OAMDATA +(byte) RICOH_2C02::PPUADDR +(byte) RICOH_2C02::PPUCTRL +(byte) RICOH_2C02::PPUDATA +(byte) RICOH_2C02::PPUMASK +(byte) RICOH_2C02::PPUSCROLL +(volatile byte) RICOH_2C02::PPUSTATUS loadstore +(const byte) SIZEOF_BYTE = (byte) 1 +(const struct SpriteData*) SPRITE_BUFFER[(number) $100] = { fill( $100, 0) } +(byte) SpriteData::attributes +(byte) SpriteData::tile +(byte) SpriteData::x +(byte) SpriteData::y +(const byte*) TILES[] = kickasm {{ .import binary "lazydata.chr" + }} +(const to_nomodify void()**) VECTORS[] = { &interrupt(HARDWARE_STACK)(void()) vblank(), &(signed word()) main(), (void()*) 0 } +(void()) __start() +(label) __start::@1 +(label) __start::@return +(label) __start::__init1 +(const struct $0*) balls[(number) $40] = { fill( $40, 0) } +(const to_nomodify byte*) h_bar_tilemap[] = { (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1 } +(signed word()) main() +(word~) main::$10 zp[2]:26 101.0 +(word~) main::$11 zp[2]:26 202.0 +(byte~) main::$12 reg byte x 101.0 +(byte~) main::$14 reg byte a 202.0 +(word~) main::$20 zp[2]:13 2002.0 +(word~) main::$23 zp[2]:15 667.3333333333334 +(word~) main::$25 zp[2]:17 667.3333333333334 +(byte~) main::$26 zp[1]:19 1001.0 +(byte~) main::$30 reg byte a 1001.0 +(word~) main::$31 zp[2]:20 2002.0 +(word~) main::$32 zp[2]:22 500.5 +(word~) main::$33 zp[2]:24 1001.0 +(byte~) main::$35 reg byte a 202.0 +(byte~) main::$36 reg byte a 202.0 +(byte~) main::$38 reg byte x 151.5 +(byte~) main::$40 reg byte y 2502.5 +(byte~) main::$44 reg byte y 1501.5 +(byte~) main::$45 reg byte a 3003.0 +(byte~) main::$48 reg byte x 1001.0 +(byte~) main::$50 reg byte y 500.5 +(byte~) main::$53 reg byte y 800.8 +(word~) main::$56 zp[2]:20 2002.0 +(word~) main::$9 zp[2]:26 202.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(byte) main::active_balls +(byte) main::active_balls#1 active_balls zp[1]:4 75.75 +(byte) main::active_balls#2 active_balls zp[1]:4 56.11111111111111 +(byte) main::active_balls#8 active_balls zp[1]:4 37.97297297297297 +(label) main::enableVideoOutput1 +(byte) main::h_bar +(byte) main::h_bar#1 h_bar zp[1]:12 72.8409090909091 +(byte) main::i +(byte) main::i#10 i_1 zp[1]:6 258.3225806451613 +(byte) main::i#14 i zp[1]:2 33.666666666666664 +(byte) main::i#2 i zp[1]:2 202.0 +(byte) main::i#4 i_1 zp[1]:6 2002.0 +(label) main::initNES1 +(label) main::initNES1_@1 +(label) main::initNES1_@7 +(label) main::initNES1_clearVBlankFlag1 +(label) main::initNES1_disableAudioOutput1 +(label) main::initNES1_disableVideoOutput1 +(byte) main::initNES1_i +(byte) main::initNES1_i#1 reg byte x 151.5 +(byte) main::initNES1_i#2 reg byte x 112.22222222222223 +(label) main::initNES1_waitForVBlank1 +(byte~) main::initNES1_waitForVBlank1_$0 reg byte a 202.0 +(label) main::initNES1_waitForVBlank1_@1 +(label) main::initNES1_waitForVBlank2 +(byte~) main::initNES1_waitForVBlank2_$0 reg byte a 202.0 +(label) main::initNES1_waitForVBlank2_@1 +(signed word) main::return +(byte) main::sprite_idx +(byte) main::sprite_idx#2 sprite_idx zp[1]:7 1001.0 +(byte) main::sprite_idx#3 sprite_idx zp[1]:7 100.1 +(byte) main::timer +(byte) main::timer#1 reg byte x 101.0 +(byte) main::timer#15 timer zp[1]:5 8.18918918918919 +(byte) main::timer#21 timer zp[1]:5 202.0 +(byte) main::timer#3 timer zp[1]:5 57.714285714285715 +(byte) main::timer_2 +(byte) main::timer_2#1 timer_2 zp[1]:3 6.183673469387754 +(byte) main::timer_2#2 timer_2 zp[1]:3 202.0 +(const to_nomodify byte*) palette[] = { (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4 } +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +(label) ppuDataFill::@1 +(label) ppuDataFill::@2 +(label) ppuDataFill::@return +(word) ppuDataFill::i +(word) ppuDataFill::i#1 i zp[2]:17 2002.0 +(word) ppuDataFill::i#2 i zp[2]:17 1001.0 +(nomodify void*) ppuDataFill::ppuData +(label) ppuDataFill::ppuDataPrepare1 +(byte~) ppuDataFill::ppuDataPrepare1_$0 reg byte a 202.0 +(byte~) ppuDataFill::ppuDataPrepare1_$1 reg byte a 202.0 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:13 67.33333333333333 +(label) ppuDataFill::ppuDataPut1 +(byte) ppuDataFill::ppuDataPut1_val +(word) ppuDataFill::size +(word) ppuDataFill::size#3 size zp[2]:15 111.22222222222223 +(byte) ppuDataFill::val +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +(label) ppuDataTransfer::@1 +(label) ppuDataTransfer::@2 +(label) ppuDataTransfer::@3 +(label) ppuDataTransfer::@4 +(label) ppuDataTransfer::@return +(nomodify void*) ppuDataTransfer::cpuData +(nomodify void*) ppuDataTransfer::cpuData#2 cpuData zp[2]:15 +(byte*) ppuDataTransfer::cpuSrc +(byte*) ppuDataTransfer::cpuSrc#1 cpuSrc zp[2]:15 1001.0 +(byte*) ppuDataTransfer::cpuSrc#2 cpuSrc zp[2]:15 776.0 +(byte*) ppuDataTransfer::cpuSrc#6 cpuSrc zp[2]:15 202.0 +(word) ppuDataTransfer::i +(word) ppuDataTransfer::i#1 i zp[2]:17 2002.0 +(word) ppuDataTransfer::i#2 i zp[2]:17 600.5999999999999 +(nomodify void*) ppuDataTransfer::ppuData +(label) ppuDataTransfer::ppuDataPrepare1 +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 reg byte a 202.0 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 reg byte a 202.0 +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:13 67.33333333333333 +(label) ppuDataTransfer::ppuDataPut1 +(byte) ppuDataTransfer::ppuDataPut1_val +(byte) ppuDataTransfer::ppuDataPut1_val#0 reg byte a 2002.0 +(word) ppuDataTransfer::size +(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) } +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length +(word()) rand() +(word~) rand::$0 zp[2]:28 2002.0 +(word~) rand::$1 zp[2]:30 2002.0 +(word~) rand::$2 zp[2]:32 2002.0 +(label) rand::@return +(word) rand::return +(word) rand::return#0 return zp[2]:26 300.75 +(word) rand::return#2 return zp[2]:26 202.0 +(word) rand::return#3 return zp[2]:26 202.0 +(word) rand_state +(word) rand_state#0 rand_state zp[2]:8 1501.5 +(word) rand_state#1 rand_state zp[2]:8 1501.5 +(word) rand_state#10 rand_state zp[2]:8 1102.0 +(word) rand_state#11 rand_state zp[2]:8 137.75 +(word) rand_state#17 rand_state zp[2]:8 67.33333333333333 +(volatile byte) scroll_y loadstore zp[1]:10 105.0 +(const to_nomodify byte*) sine_table[(number) $100] = { (byte) $40, (byte) $42, (byte) $43, (byte) $45, (byte) $46, (byte) $48, (byte) $49, (byte) $4b, (byte) $4c, (byte) $4e, (byte) $50, (byte) $51, (byte) $53, (byte) $54, (byte) $56, (byte) $57, (byte) $58, (byte) $5a, (byte) $5b, (byte) $5d, (byte) $5e, (byte) $60, (byte) $61, (byte) $62, (byte) $64, (byte) $65, (byte) $66, (byte) $67, (byte) $69, (byte) $6a, (byte) $6b, (byte) $6c, (byte) $6d, (byte) $6e, (byte) $6f, (byte) $70, (byte) $71, (byte) $72, (byte) $73, (byte) $74, (byte) $75, (byte) $76, (byte) $77, (byte) $78, (byte) $78, (byte) $79, (byte) $7a, (byte) $7b, (byte) $7b, (byte) $7c, (byte) $7c, (byte) $7d, (byte) $7d, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7d, (byte) $7d, (byte) $7c, (byte) $7c, (byte) $7b, (byte) $7b, (byte) $7a, (byte) $79, (byte) $78, (byte) $78, (byte) $77, (byte) $76, (byte) $75, (byte) $74, (byte) $73, (byte) $72, (byte) $71, (byte) $70, (byte) $6f, (byte) $6e, (byte) $6d, (byte) $6c, (byte) $6b, (byte) $6a, (byte) $69, (byte) $67, (byte) $66, (byte) $65, (byte) $64, (byte) $62, (byte) $61, (byte) $60, (byte) $5e, (byte) $5d, (byte) $5b, (byte) $5a, (byte) $58, (byte) $57, (byte) $56, (byte) $54, (byte) $53, (byte) $51, (byte) $50, (byte) $4e, (byte) $4c, (byte) $4b, (byte) $49, (byte) $48, (byte) $46, (byte) $45, (byte) $43, (byte) $42, (byte) $40, (byte) $3e, (byte) $3d, (byte) $3b, (byte) $3a, (byte) $38, (byte) $37, (byte) $35, (byte) $34, (byte) $32, (byte) $30, (byte) $2f, (byte) $2d, (byte) $2c, (byte) $2a, (byte) $29, (byte) $28, (byte) $26, (byte) $25, (byte) $23, (byte) $22, (byte) $20, (byte) $1f, (byte) $1e, (byte) $1c, (byte) $1b, (byte) $1a, (byte) $19, (byte) $17, (byte) $16, (byte) $15, (byte) $14, (byte) $13, (byte) $12, (byte) $11, (byte) $10, (byte) $f, (byte) $e, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 9, (byte) 8, (byte) 8, (byte) 7, (byte) 6, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 4, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 8, (byte) 9, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $e, (byte) $f, (byte) $10, (byte) $11, (byte) $12, (byte) $13, (byte) $14, (byte) $15, (byte) $16, (byte) $17, (byte) $19, (byte) $1a, (byte) $1b, (byte) $1c, (byte) $1e, (byte) $1f, (byte) $20, (byte) $22, (byte) $23, (byte) $25, (byte) $26, (byte) $28, (byte) $29, (byte) $2a, (byte) $2c, (byte) $2d, (byte) $2f, (byte) $30, (byte) $32, (byte) $34, (byte) $35, (byte) $37, (byte) $38, (byte) $3a, (byte) $3b, (byte) $3d, (byte) $3e } +interrupt(HARDWARE_STACK)(void()) vblank() +(label) vblank::@1 +(label) vblank::@return +(label) vblank::ppuSpriteBufferDmaTransfer1 +(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer +(volatile byte) vblank_hit loadstore zp[1]:11 10.25925925925926 + +reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] +zp[1]:2 [ main::i#14 main::i#2 ] +zp[1]:3 [ main::timer_2#2 main::timer_2#1 ] +zp[1]:4 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +zp[1]:5 [ main::timer#3 main::timer#15 main::timer#21 ] +zp[1]:6 [ main::i#10 main::i#4 ] +zp[1]:7 [ main::sprite_idx#3 main::sprite_idx#2 ] +zp[2]:8 [ rand_state#10 rand_state#17 rand_state#11 rand_state#0 rand_state#1 ] +zp[1]:10 [ scroll_y ] +zp[1]:11 [ vblank_hit ] +reg byte a [ main::initNES1_waitForVBlank1_$0 ] +reg byte a [ main::initNES1_waitForVBlank2_$0 ] +zp[1]:12 [ main::h_bar#1 ] +reg byte a [ main::$14 ] +reg byte x [ main::timer#1 ] +reg byte x [ main::$38 ] +reg byte y [ main::$40 ] +zp[2]:13 [ main::$20 ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] +reg byte a [ main::$45 ] +reg byte y [ main::$44 ] +zp[2]:15 [ main::$23 ppuDataFill::size#3 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +zp[2]:17 [ main::$25 ppuDataFill::i#2 ppuDataFill::i#1 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +zp[1]:19 [ main::$26 ] +reg byte y [ main::$53 ] +reg byte a [ main::$30 ] +zp[2]:20 [ main::$56 main::$31 ] +reg byte y [ main::$50 ] +zp[2]:22 [ main::$32 ] +reg byte x [ main::$48 ] +zp[2]:24 [ main::$33 ] +zp[2]:26 [ rand::return#2 main::$9 rand::return#0 main::$10 rand::return#3 main::$11 ] +reg byte a [ main::$35 ] +reg byte x [ main::$12 ] +reg byte a [ main::$36 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] +reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] +reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] +zp[2]:28 [ rand::$0 ] +zp[2]:30 [ rand::$1 ] +zp[2]:32 [ rand::$2 ] + + +FINAL ASSEMBLER +Score: 45588 + + // File Comments +//#pragma emulator("java -jar /Applications/Nintaco_bin_2020-05-01/Nintaco.jar") +// Nintendo Entertainment System (NES +// https://en.wikipedia.org/wiki/Nintendo_Entertainment_System_(Model_NES-101) +// https://github.com/gregkrsak/first_nes +// Ricoh 2C02 - NES Picture Processing Unit (PPU) +// Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), +// https://en.wikipedia.org/wiki/Picture_Processing_Unit +// https://wiki.nesdev.com/w/index.php/PPU_registers +// http://nesdev.com/2C02%20technical%20reference.TXT +// Based on: https://github.com/gregkrsak/first_nes written by Greg M. Krsak, 2018. + // Upstart + // Nintendo Entertainment System (NES) ROM (Mapper 0 NROM, Vertical Mirroring) +// https://sadistech.com/nesromtool/romdoc.html +// https://forums.nesdev.com/viewtopic.php?f=2&t=9896 +// https://github.com/gregkrsak/first_nes +.file [name="kickballs-2.nes", type="bin", segments="NesRom"] +.file [name="kickballs-2.nes_hdr", type="bin", segments="Header"] +.file [name="kickballs-2.nes_prg", type="bin", segments="ProgramRom"] +.file [name="kickballs-2.nes_chr", type="bin", segments="CharacterRom"] +.segmentdef Header [ start=$0000, min=$0000, max=$000f, fill ] +.segmentdef Tiles [ start=$0000, min=$0000, max=$1fff, fill ] +.segmentdef Code [ start=$c000, min=$c000, max=$fff9 ] +.segmentdef Data [ startAfter="Code", min=$c000, max=$fff9 ] +.segmentdef Vectors [ start=$fffa, min=$fffa, max=$ffff ] +.segmentdef GameRam [start=$200,max=$7ff, virtual] +.segmentdef ProgramRom [ segments="Code, Data, Vectors" ] +.segmentdef CharacterRom [ segments="Tiles" ] +.segmentdef NesRom +.segment NesRom +.segmentout [ segments="Header" ] +.segmentout [ segments="ProgramRom" ] +.segmentout [ segments="CharacterRom" ] +.segment Header +.text @"NES\$1a" +.byte $01 // 1x 16KB ROM (PRG) +.byte $01 // 1x 8KB VROM (CHR) +.byte %00000001 // Mapper nibble 0000 == No mapping (a simple 16KB PRG + 8KB CHR game) + // Mirroring nibble 0001 == Vertical mirroring only +.segment Code + + // Global Constants & labels + .const OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = $10 + .const OFFSET_STRUCT_RICOH_2C02_PPUMASK = 1 + .const OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = 2 + .const OFFSET_STRUCT_RICOH_2C02_OAMADDR = 3 + .const OFFSET_STRUCT_RICOH_2A03_OAMDMA = $14 + .const OFFSET_STRUCT_RICOH_2C02_PPUADDR = 6 + .const OFFSET_STRUCT_RICOH_2C02_PPUDATA = 7 + .const OFFSET_STRUCT_SPRITEDATA_TILE = 1 + .const OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = 2 + .const OFFSET_STRUCT_SPRITEDATA_X = 3 + .const OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = 5 + .const SIZEOF_BYTE = 1 + // $2000-$23bf $03c0 Name table 0 + .label PPU_NAME_TABLE_0 = $2000 + // $23c0-$23ff $0040 Attribute table 0 + .label PPU_ATTRIBUTE_TABLE_0 = $23c0 + // $3000-$3eff $0f00 Mirrors of $2000-$2eff + // $3f00-$3f1f $0020 Palette RAM indexes + .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // APU Frame Counter + // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. + // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter + // ------+-----+--------------------------------------------------------------- + // $4017 | W | FR_COUNTER Frame Counter Set mode and interrupt + // ------+-----+--------------------------------------------------------------- + // | 7 | Sequencer mode: 0 selects 4-step sequence, 1 selects 5-step sequence + // | 6 | Interrupt inhibit flag. If set, the frame interrupt flag is cleared, otherwise it is unaffected. + // ------+-----+--------------------------------------------------------------- + // Side effects After 3 or 4 CPU clock cycles*, the timer is reset. + // If the mode flag is set, then both "quarter frame" and "half frame" signals are also generated. + .label FR_COUNTER = $4017 + // Pointer to the start of RAM memory + .label MEMORY = 0 + // NES Picture Processing Unit (PPU) + .label PPU = $2000 + // NES CPU and audion processing unit (APU) + .label APU = $4000 + .label scroll_y = $a + .label vblank_hit = $b + // The random state variable + .label rand_state = 8 +.segment Code + // __start +__start: { + // __start::__init1 + // scroll_y = 0 + // [1] (volatile byte) scroll_y ← (byte) 0 -- vbuz1=vbuc1 + lda #0 + sta.z scroll_y + // vblank_hit = 0 + // [2] (volatile byte) vblank_hit ← (byte) 0 -- vbuz1=vbuc1 + sta.z vblank_hit + // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] + // __start::@1 + // [4] call main + // [12] phi from __start::@1 to main [phi:__start::@1->main] + jsr main + // __start::@return + // [5] return + rts +} + // vblank +// NMI Called when the PPU refreshes the screen (also known as the V-Blank period) +vblank: { + // entry interrupt(HARDWARE_STACK) + pha + txa + pha + tya + pha + // PPU->PPUSCROLL = 0 + // [6] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // Set scroll + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + // PPU->PPUSCROLL = scroll_y + // [7] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) scroll_y -- _deref_pbuc1=vbuz1 + lda.z scroll_y + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL + // vblank::ppuSpriteBufferDmaTransfer1 + // PPU->OAMADDR = 0 + // [8] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_OAMADDR + // APU->OAMDMA = >spriteBuffer + // [9] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA) ← >(const struct SpriteData*) SPRITE_BUFFER -- _deref_pbuc1=vbuc2 + lda #>SPRITE_BUFFER + sta APU+OFFSET_STRUCT_RICOH_2A03_OAMDMA + // vblank::@1 + // vblank_hit++; + // [10] (volatile byte) vblank_hit ← ++ (volatile byte) vblank_hit -- vbuz1=_inc_vbuz1 + inc.z vblank_hit + // vblank::@return + // } + // [11] return - exit interrupt(HARDWARE_STACK) + pla + tay + pla + tax + pla + rti +} + // main +main: { + .label __9 = $1a + .label __10 = $1a + .label __11 = $1a + .label __20 = $d + .label __23 = $f + .label __25 = $11 + .label __26 = $13 + .label __31 = $14 + .label __32 = $16 + .label __33 = $18 + .label __56 = $14 + .label i = 2 + .label timer_2 = 3 + .label h_bar = $c + .label active_balls = 4 + .label sprite_idx = 7 + .label i_1 = 6 + .label timer = 5 + // main::initNES1 + // asm + // asm { cld ldx#$ff txs } + cld + ldx #$ff + txs + // main::initNES1_disableVideoOutput1 + // PPU->PPUCTRL = 0 + // [14] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU + // PPU->PPUMASK = 0 + // [15] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + // main::initNES1_disableAudioOutput1 + // *FR_COUNTER = 0b01000000 + // [16] *((const nomodify byte*) FR_COUNTER) ← (byte) $40 -- _deref_pbuc1=vbuc2 + lda #$40 + sta FR_COUNTER + // APU->DMC_FREQ = 0b01000000 + // [17] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) ← (byte) $40 -- _deref_pbuc1=vbuc2 + sta APU+OFFSET_STRUCT_RICOH_2A03_DMC_FREQ + // main::initNES1_clearVBlankFlag1 + // asm + // asm { ldaPPU_PPUSTATUS } + lda PPU_PPUSTATUS + // [19] phi from main::initNES1_clearVBlankFlag1 to main::initNES1_waitForVBlank1 [phi:main::initNES1_clearVBlankFlag1->main::initNES1_waitForVBlank1] + // main::initNES1_waitForVBlank1 + initNES1_waitForVBlank1: + // main::initNES1_waitForVBlank1_@1 + // PPU->PPUSTATUS&0x80 + // [20] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 -- vbuaa=_deref_pbuc1_band_vbuc2 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + // while(!(PPU->PPUSTATUS&0x80)) + // [21] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 -- vbuc1_eq_vbuaa_then_la1 + cmp #0 + beq initNES1_waitForVBlank1 + // [22] phi from main::initNES1_waitForVBlank1_@1 to main::initNES1_@1 [phi:main::initNES1_waitForVBlank1_@1->main::initNES1_@1] + // [22] phi (byte) main::initNES1_i#2 = (byte) 0 [phi:main::initNES1_waitForVBlank1_@1->main::initNES1_@1#0] -- vbuxx=vbuc1 + ldx #0 + // [22] phi from main::initNES1_@1 to main::initNES1_@1 [phi:main::initNES1_@1->main::initNES1_@1] + // [22] phi (byte) main::initNES1_i#2 = (byte) main::initNES1_i#1 [phi:main::initNES1_@1->main::initNES1_@1#0] -- register_copy + // main::initNES1_@1 + initNES1___b1: + // (MEMORY+0x000)[i] = 0 + // [23] *((const nomodify byte*) MEMORY + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta MEMORY,x + // (MEMORY+0x100)[i] = 0 + // [24] *((const nomodify byte*) MEMORY+(word) $100 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$100,x + // (MEMORY+0x200)[i] = 0 + // [25] *((const nomodify byte*) MEMORY+(word) $200 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$200,x + // (MEMORY+0x300)[i] = 0 + // [26] *((const nomodify byte*) MEMORY+(word) $300 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$300,x + // (MEMORY+0x400)[i] = 0 + // [27] *((const nomodify byte*) MEMORY+(word) $400 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$400,x + // (MEMORY+0x500)[i] = 0 + // [28] *((const nomodify byte*) MEMORY+(word) $500 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$500,x + // (MEMORY+0x600)[i] = 0 + // [29] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$600,x + // (MEMORY+0x700)[i] = 0 + // [30] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + sta MEMORY+$700,x + // while (++i) + // [31] (byte) main::initNES1_i#1 ← ++ (byte) main::initNES1_i#2 -- vbuxx=_inc_vbuxx + inx + // [32] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 -- vbuc1_neq_vbuxx_then_la1 + cpx #0 + bne initNES1___b1 + // [33] phi from main::initNES1_@1 to main::initNES1_waitForVBlank2 [phi:main::initNES1_@1->main::initNES1_waitForVBlank2] + // main::initNES1_waitForVBlank2 + initNES1_waitForVBlank2: + // main::initNES1_waitForVBlank2_@1 + // PPU->PPUSTATUS&0x80 + // [34] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 -- vbuaa=_deref_pbuc1_band_vbuc2 + lda #$80 + and PPU+OFFSET_STRUCT_RICOH_2C02_PPUSTATUS + // while(!(PPU->PPUSTATUS&0x80)) + // [35] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 -- vbuc1_eq_vbuaa_then_la1 + cmp #0 + beq initNES1_waitForVBlank2 + // main::initNES1_@7 + // asm + // asm { ldaPPU_PPUSTATUS } + lda PPU_PPUSTATUS + // [37] phi from main::initNES1_@7 to main::@17 [phi:main::initNES1_@7->main::@17] + // main::@17 + // ppuDataTransfer(PPU_PALETTE, palette, sizeof(palette)) + // [38] call ppuDataTransfer + // Transfer the palette + // [114] phi from main::@17 to ppuDataTransfer [phi:main::@17->ppuDataTransfer] + // [114] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const to_nomodify byte*) palette [phi:main::@17->ppuDataTransfer#0] -- pvoz1=pvoc1 + lda #palette + sta.z ppuDataTransfer.cpuData+1 + // [114] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE [phi:main::@17->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + // [39] phi from main::@17 to main::@19 [phi:main::@17->main::@19] + // main::@19 + // ppuDataFill(PPU_NAME_TABLE_0, 0, 32*30) + // [40] call ppuDataFill + // Fill the PPU attribute table + // [127] phi from main::@19 to ppuDataFill [phi:main::@19->ppuDataFill] + // [127] phi (word) ppuDataFill::size#3 = (word)(number) $20*(number) $1e [phi:main::@19->ppuDataFill#0] -- vwuz1=vwuc1 + lda #<$20*$1e + sta.z ppuDataFill.size + lda #>$20*$1e + sta.z ppuDataFill.size+1 + // [127] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:main::@19->ppuDataFill#1] -- pvoz1=pvoc1 + lda #PPU_NAME_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // [41] phi from main::@19 to main::@20 [phi:main::@19->main::@20] + // main::@20 + // ppuDataFill(PPU_ATTRIBUTE_TABLE_0, 0, 0x40) + // [42] call ppuDataFill + // [127] phi from main::@20 to ppuDataFill [phi:main::@20->ppuDataFill] + // [127] phi (word) ppuDataFill::size#3 = (byte) $40 [phi:main::@20->ppuDataFill#0] -- vwuz1=vbuc1 + lda #<$40 + sta.z ppuDataFill.size + lda #>$40 + sta.z ppuDataFill.size+1 + // [127] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@20->ppuDataFill#1] -- pvoz1=pvoc1 + lda #PPU_ATTRIBUTE_TABLE_0 + sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 + jsr ppuDataFill + // [43] phi from main::@20 to main::@21 [phi:main::@20->main::@21] + // main::@21 + // ppuDataTransfer(0x2040, h_bar_tilemap, sizeof(h_bar_tilemap)) + // [44] call ppuDataTransfer + // [114] phi from main::@21 to ppuDataTransfer [phi:main::@21->ppuDataTransfer] + // [114] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const to_nomodify byte*) h_bar_tilemap [phi:main::@21->ppuDataTransfer#0] -- pvoz1=pvoc1 + lda #h_bar_tilemap + sta.z ppuDataTransfer.cpuData+1 + // [114] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*) 8256 [phi:main::@21->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #<$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData + lda #>$2040 + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 + jsr ppuDataTransfer + // main::enableVideoOutput1 + // PPU->PPUCTRL = 0b10000000 + // [45] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 + lda #$80 + sta PPU + // PPU->PPUMASK = 0b00011110 + // [46] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 + lda #$1e + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK + // main::@18 + // PPU->PPUCTRL = 0b10001000 + // [47] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $88 -- _deref_pbuc1=vbuc2 + // Enable vertical blank interrupt, select sprite pattern table 1 + lda #$88 + sta PPU + // [48] phi from main::@18 to main::@1 [phi:main::@18->main::@1] + // [48] phi (word) rand_state#17 = (word) 1 [phi:main::@18->main::@1#0] -- vwuz1=vwuc1 + lda #<1 + sta.z rand_state + lda #>1 + sta.z rand_state+1 + // [48] phi (byte) main::i#14 = (byte) 0 [phi:main::@18->main::@1#1] -- vbuz1=vbuc1 + sta.z i + // main::@1 + __b1: + // for (i = 0; i < MAX_BALLS; i++) + // [49] if((byte) main::i#14<(byte) $20) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #$20 + bcs !__b2+ + jmp __b2 + !__b2: + // [50] phi from main::@1 to main::@3 [phi:main::@1->main::@3] + // [50] phi (byte) main::timer#3 = (byte) 0 [phi:main::@1->main::@3#0] -- vbuz1=vbuc1 + lda #0 + sta.z timer + // [50] phi (byte) main::active_balls#2 = (byte) 0 [phi:main::@1->main::@3#1] -- vbuz1=vbuc1 + sta.z active_balls + // [50] phi (byte) main::timer_2#2 = (byte) 0 [phi:main::@1->main::@3#2] -- vbuz1=vbuc1 + sta.z timer_2 + // main::@3 + // main::@4 + __b4: + // timer_2++; + // [51] (byte) main::timer_2#1 ← ++ (byte) main::timer_2#2 -- vbuz1=_inc_vbuz1 + inc.z timer_2 + // h_bar = sine_table[timer_2] + 0x60 + // [52] (byte) main::h_bar#1 ← *((const to_nomodify byte*) sine_table + (byte) main::timer_2#1) + (byte) $60 -- vbuz1=pbuc1_derefidx_vbuz2_plus_vbuc2 + lda #$60 + ldy.z timer_2 + clc + adc sine_table,y + sta.z h_bar + // h_bar ^ 0xFF + // [53] (byte~) main::$14 ← (byte) main::h_bar#1 ^ (byte) $ff -- vbuaa=vbuz1_bxor_vbuc1 + lda #$ff + eor.z h_bar + // scroll_y = h_bar ^ 0xFF + // [54] (volatile byte) scroll_y ← (byte~) main::$14 -- vbuz1=vbuaa + sta.z scroll_y + // if (active_balls < MAX_BALLS) + // [55] if((byte) main::active_balls#2>=(byte) $20) goto main::@5 -- vbuz1_ge_vbuc1_then_la1 + lda.z active_balls + cmp #$20 + bcs __b5 + // main::@15 + // if (timer++ == RELEASE_TIMER) + // [56] (byte) main::timer#1 ← ++ (byte) main::timer#3 -- vbuxx=_inc_vbuz1 + ldx.z timer + inx + // [57] if((byte) main::timer#3!=(byte) 9) goto main::@25 -- vbuz1_neq_vbuc1_then_la1 + lda #9 + cmp.z timer + beq !__b25+ + jmp __b25 + !__b25: + // main::@16 + // active_balls++; + // [58] (byte) main::active_balls#1 ← ++ (byte) main::active_balls#2 -- vbuz1=_inc_vbuz1 + inc.z active_balls + // balls[active_balls].x_position = 0 + // [59] (byte~) main::$38 ← (byte) main::active_balls#1 << (byte) 3 -- vbuxx=vbuz1_rol_3 + lda.z active_balls + asl + asl + asl + tax + // [60] *((word*)(const struct $0*) balls + (byte~) main::$38) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + lda #0 + sta balls,x + sta balls+1,x + // balls[active_balls].y_position = 0 + // [61] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$38) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + sta balls+2,x + sta balls+2+1,x + // [62] phi from main::@16 to main::@5 [phi:main::@16->main::@5] + // [62] phi (byte) main::timer#15 = (byte) 0 [phi:main::@16->main::@5#0] -- vbuz1=vbuc1 + sta.z timer + // [62] phi (byte) main::active_balls#8 = (byte) main::active_balls#1 [phi:main::@16->main::@5#1] -- register_copy + // [62] phi from main::@25 main::@4 to main::@5 [phi:main::@25/main::@4->main::@5] + // [62] phi (byte) main::timer#15 = (byte) main::timer#21 [phi:main::@25/main::@4->main::@5#0] -- register_copy + // [62] phi (byte) main::active_balls#8 = (byte) main::active_balls#2 [phi:main::@25/main::@4->main::@5#1] -- register_copy + // main::@5 + __b5: + // [63] phi from main::@5 to main::@6 [phi:main::@5->main::@6] + // [63] phi (byte) main::sprite_idx#3 = (byte) 0 [phi:main::@5->main::@6#0] -- vbuz1=vbuc1 + lda #0 + sta.z sprite_idx + // [63] phi (byte) main::i#10 = (byte) 0 [phi:main::@5->main::@6#1] -- vbuz1=vbuc1 + sta.z i_1 + // main::@6 + __b6: + // for (i = 0; i < active_balls; i++) + // [64] if((byte) main::i#10<(byte) main::active_balls#8) goto main::@7 -- vbuz1_lt_vbuz2_then_la1 + lda.z i_1 + cmp.z active_balls + bcc __b7 + // main::@8 + // poke(0x2001) = 0x98 + // [65] *((byte*) 8193) ← (byte) $98 -- _deref_pbuc1=vbuc2 + lda #$98 + sta $2001 + // main::@13 + __b13: + // while (!vblank_hit) + // [66] if((byte) 0==(volatile byte) vblank_hit) goto main::@13 -- vbuc1_eq_vbuz1_then_la1 + lda #0 + cmp.z vblank_hit + beq __b13 + // main::@14 + // vblank_hit = 0 + // [67] (volatile byte) vblank_hit ← (byte) 0 -- vbuz1=vbuc1 + // wait for vblank + sta.z vblank_hit + // poke(0x2001) = 0x18 + // [68] *((byte*) 8193) ← (byte) $18 -- _deref_pbuc1=vbuc2 + lda #$18 + sta $2001 + // [50] phi from main::@14 to main::@3 [phi:main::@14->main::@3] + // [50] phi (byte) main::timer#3 = (byte) main::timer#15 [phi:main::@14->main::@3#0] -- register_copy + // [50] phi (byte) main::active_balls#2 = (byte) main::active_balls#8 [phi:main::@14->main::@3#1] -- register_copy + // [50] phi (byte) main::timer_2#2 = (byte) main::timer_2#1 [phi:main::@14->main::@3#2] -- register_copy + jmp __b4 + // main::@7 + __b7: + // balls[i].x_position += balls[i].x_velocity + // [69] (byte~) main::$40 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [70] *((word*)(const struct $0*) balls + (byte~) main::$40) ← *((word*)(const struct $0*) balls + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$40) -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy + clc + lda balls,y + adc balls+4,y + sta balls,y + lda balls+1,y + adc balls+4+1,y + sta balls+1,y + // balls[i].y_velocity += WEIGHT + // [71] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) + (byte) $10 -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_vbuc2 + clc + lda balls+6,y + adc #$10 + sta balls+6,y + lda balls+6+1,y + adc #0 + sta balls+6+1,y + // balls[i].y_position += (balls[i].y_velocity += WEIGHT) + // [72] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$40) + *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$40) -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_plus_pwuc2_derefidx_vbuyy + clc + lda balls+2,y + adc balls+6,y + sta balls+2,y + lda balls+2+1,y + adc balls+6+1,y + sta balls+2+1,y + // balls[i].x_position >> 8 + // [73] (word~) main::$20 ← *((word*)(const struct $0*) balls + (byte~) main::$40) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __20+1 + lda balls+1,y + sta.z __20 + // if ((balls[i].x_position >> 8) < 8) + // [74] if((word~) main::$20>=(byte) 8) goto main::@9 -- vwuz1_ge_vbuc1_then_la1 + lda.z __20+1 + bne __b9 + lda.z __20 + cmp #8 + bcs __b9 + !: + // main::@11 + // balls[i].x_velocity ^= 0xFFFF + // [75] (byte~) main::$45 ← (byte) main::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + // [76] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ← *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$45) ^ (word) $ffff -- pwuc1_derefidx_vbuaa=pwuc1_derefidx_vbuaa_bxor_vwuc2 + tay + lda balls+4,y + eor #<$ffff + sta balls+4,y + lda balls+4+1,y + eor #>$ffff + sta balls+4+1,y + // main::@9 + __b9: + // balls[i].y_position >> 8 + // [77] (byte~) main::$44 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [78] (word~) main::$23 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __23+1 + lda balls+2+1,y + sta.z __23 + // [79] (word~) main::$25 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$44) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __25+1 + lda balls+2+1,y + sta.z __25 + // h_bar + 8 + // [80] (byte~) main::$26 ← (byte) main::h_bar#1 + (byte) 8 -- vbuz1=vbuz2_plus_vbuc1 + lax.z h_bar + axs #-[8] + stx.z __26 + // if (((balls[i].y_position >> 8) >= h_bar) && (balls[i].y_position >> 8) < h_bar + 8) + // [81] if((word~) main::$23<(byte) main::h_bar#1) goto main::@10 -- vwuz1_lt_vbuz2_then_la1 + lda.z __23+1 + bne !+ + lda.z __23 + cmp.z h_bar + bcc __b10 + !: + // main::@24 + // [82] if((word~) main::$25>=(byte~) main::$26) goto main::@10 -- vwuz1_ge_vbuz2_then_la1 + lda.z __25+1 + bne __b10 + lda.z __25 + cmp.z __26 + bcs __b10 + !: + // main::@12 + // balls[i].y_velocity ^= 0xFFFF + // [83] (byte~) main::$53 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [84] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ← *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$53) ^ (word) $ffff -- pwuc1_derefidx_vbuyy=pwuc1_derefidx_vbuyy_bxor_vwuc2 + lda balls+6,y + eor #<$ffff + sta balls+6,y + lda balls+6+1,y + eor #>$ffff + sta balls+6+1,y + // h_bar - 2 + // [85] (byte~) main::$30 ← (byte) main::h_bar#1 - (byte) 2 -- vbuaa=vbuz1_minus_2 + lda.z h_bar + sec + sbc #2 + // (unsigned short)(h_bar - 2) << 8 + // [86] (word~) main::$56 ← (word)(byte~) main::$30 -- vwuz1=_word_vbuaa + sta.z __56 + lda #0 + sta.z __56+1 + // [87] (word~) main::$31 ← (word~) main::$56 << (byte) 8 -- vwuz1=vwuz1_rol_8 + lda.z __31 + sta.z __31+1 + lda #0 + sta.z __31 + // balls[i].y_position = ((unsigned short)(h_bar - 2) << 8) + // [88] *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$53) ← (word~) main::$31 -- pwuc1_derefidx_vbuyy=vwuz1 + sta balls+2,y + lda.z __31+1 + sta balls+2+1,y + // main::@10 + __b10: + // balls[i].y_position >> 8 + // [89] (byte~) main::$50 ← (byte) main::i#10 << (byte) 3 -- vbuyy=vbuz1_rol_3 + lda.z i_1 + asl + asl + asl + tay + // [90] (word~) main::$32 ← *((word*)(const struct $0*) balls+(byte) 2 + (byte~) main::$50) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __32+1 + lda balls+2+1,y + sta.z __32 + // SPRITE_BUFFER[sprite_idx].y = (unsigned char) (balls[i].y_position >> 8) + // [91] (byte~) main::$48 ← (byte) main::sprite_idx#3 << (byte) 2 -- vbuxx=vbuz1_rol_2 + lda.z sprite_idx + asl + asl + tax + // [92] *((byte*)(const struct SpriteData*) SPRITE_BUFFER + (byte~) main::$48) ← (byte)(word~) main::$32 -- pbuc1_derefidx_vbuxx=_byte_vwuz1 + lda.z __32 + sta SPRITE_BUFFER,x + // SPRITE_BUFFER[sprite_idx].tile = 0x0a + // [93] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_TILE + (byte~) main::$48) ← (byte) $a -- pbuc1_derefidx_vbuxx=vbuc2 + lda #$a + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_TILE,x + // SPRITE_BUFFER[sprite_idx].attributes = 3 + // [94] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES + (byte~) main::$48) ← (byte) 3 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #3 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES,x + // balls[i].x_position >> 8 + // [95] (word~) main::$33 ← *((word*)(const struct $0*) balls + (byte~) main::$50) >> (byte) 8 -- vwuz1=pwuc1_derefidx_vbuyy_ror_8 + lda #0 + sta.z __33+1 + lda balls+1,y + sta.z __33 + // SPRITE_BUFFER[sprite_idx].x = (unsigned char) (balls[i].x_position >> 8) + // [96] *((byte*)(const struct SpriteData*) SPRITE_BUFFER+(const byte) OFFSET_STRUCT_SPRITEDATA_X + (byte~) main::$48) ← (byte)(word~) main::$33 -- pbuc1_derefidx_vbuxx=_byte_vwuz1 + sta SPRITE_BUFFER+OFFSET_STRUCT_SPRITEDATA_X,x + // sprite_idx++; + // [97] (byte) main::sprite_idx#2 ← ++ (byte) main::sprite_idx#3 -- vbuz1=_inc_vbuz1 + inc.z sprite_idx + // for (i = 0; i < active_balls; i++) + // [98] (byte) main::i#4 ← ++ (byte) main::i#10 -- vbuz1=_inc_vbuz1 + inc.z i_1 + // [63] phi from main::@10 to main::@6 [phi:main::@10->main::@6] + // [63] phi (byte) main::sprite_idx#3 = (byte) main::sprite_idx#2 [phi:main::@10->main::@6#0] -- register_copy + // [63] phi (byte) main::i#10 = (byte) main::i#4 [phi:main::@10->main::@6#1] -- register_copy + jmp __b6 + // main::@25 + __b25: + // [99] (byte) main::timer#21 ← (byte) main::timer#1 -- vbuz1=vbuxx + stx.z timer + jmp __b5 + // [100] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + // main::@2 + __b2: + // rand() + // [101] call rand + // [137] phi from main::@2 to rand [phi:main::@2->rand] + // [137] phi (word) rand_state#10 = (word) rand_state#17 [phi:main::@2->rand#0] -- register_copy + jsr rand + // rand() + // [102] (word) rand::return#2 ← (word) rand::return#0 + // main::@22 + // [103] (word~) main::$9 ← (word) rand::return#2 + // rand() & 0x3FF + // [104] (word~) main::$10 ← (word~) main::$9 & (word) $3ff -- vwuz1=vwuz1_band_vwuc1 + lda.z __10 + and #<$3ff + sta.z __10 + lda.z __10+1 + and #>$3ff + sta.z __10+1 + // balls[i].x_velocity = rand() & 0x3FF + // [105] (byte~) main::$35 ← (byte) main::i#14 << (byte) 3 -- vbuaa=vbuz1_rol_3 + lda.z i + asl + asl + asl + // [106] *((word*)(const struct $0*) balls+(byte) 4 + (byte~) main::$35) ← (word~) main::$10 -- pwuc1_derefidx_vbuaa=vwuz1 + tay + lda.z __10 + sta balls+4,y + lda.z __10+1 + sta balls+4+1,y + // rand() + // [107] call rand + // [137] phi from main::@22 to rand [phi:main::@22->rand] + // [137] phi (word) rand_state#10 = (word) rand_state#11 [phi:main::@22->rand#0] -- register_copy + jsr rand + // rand() + // [108] (word) rand::return#3 ← (word) rand::return#0 + // main::@23 + // [109] (word~) main::$11 ← (word) rand::return#3 + // rand() & 0x0FF + // [110] (byte~) main::$12 ← (word~) main::$11 & (byte) $ff -- vbuxx=vwuz1_band_vbuc1 + lda #$ff + and.z __11 + tax + // balls[i].y_velocity = rand() & 0x0FF + // [111] (byte~) main::$36 ← (byte) main::i#14 << (byte) 3 -- vbuaa=vbuz1_rol_3 + lda.z i + asl + asl + asl + // [112] *((word*)(const struct $0*) balls+(byte) 6 + (byte~) main::$36) ← (byte~) main::$12 -- pwuc1_derefidx_vbuaa=vbuxx + tay + txa + sta balls+6,y + // for (i = 0; i < MAX_BALLS; i++) + // [113] (byte) main::i#2 ← ++ (byte) main::i#14 -- vbuz1=_inc_vbuz1 + inc.z i + // [48] phi from main::@23 to main::@1 [phi:main::@23->main::@1] + // [48] phi (word) rand_state#17 = (word) rand_state#11 [phi:main::@23->main::@1#0] -- register_copy + // [48] phi (byte) main::i#14 = (byte) main::i#2 [phi:main::@23->main::@1#1] -- register_copy + jmp __b1 +} + // ppuDataTransfer +// Transfer a number of bytes from the CPU memory to the PPU memory +// - ppuData : Pointer in the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp($f) cpuData) +ppuDataTransfer: { + .label ppuDataPrepare1_ppuData = $d + .label cpuSrc = $f + .label i = $11 + .label cpuData = $f + // ppuDataTransfer::ppuDataPrepare1 + // >ppuData + // [115] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + lda.z ppuDataPrepare1_ppuData+1 + // PPU->PPUADDR = >ppuData + // [116] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // PPUADDR = ppuDataTransfer::@1] + // [120] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#6 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy + // [120] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + sta.z i+1 + // ppuDataTransfer::@1 + __b1: + // for(unsigned int i=0;i$20*SIZEOF_BYTE + bcc __b2 + bne !+ + lda.z i + cmp #<$20*SIZEOF_BYTE + bcc __b2 + !: + // ppuDataTransfer::@return + // } + // [122] return + rts + // ppuDataTransfer::@2 + __b2: + // ppuDataPut(*cpuSrc++) + // [123] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) -- vbuaa=_deref_pbuz1 + ldy #0 + lda (cpuSrc),y + // ppuDataTransfer::ppuDataPut1 + // PPU->PPUDATA = val + // [124] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataTransfer::@4 + // ppuDataPut(*cpuSrc++); + // [125] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // for(unsigned int i=0;ippuDataTransfer::@1] + // [120] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#0] -- register_copy + // [120] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#1] -- register_copy + jmp __b1 +} + // ppuDataFill +// Fill a number of bytes in the PPU memory +// - ppuData : Pointer in the PPU memory +// - size : The number of bytes to transfer +// ppuDataFill(word zp($f) size) +ppuDataFill: { + .label ppuDataPrepare1_ppuData = $d + .label i = $11 + .label size = $f + // ppuDataFill::ppuDataPrepare1 + // >ppuData + // [128] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + lda.z ppuDataPrepare1_ppuData+1 + // PPU->PPUADDR = >ppuData + // [129] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // PPUADDR = ppuDataFill::@1] + // [132] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 + lda #<0 + sta.z i + sta.z i+1 + // Transfer to PPU + // ppuDataFill::@1 + __b1: + // for(unsigned int i=0;iPPUDATA = val + // [135] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataFill::@2 + // for(unsigned int i=0;ippuDataFill::@1] + // [132] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + jmp __b1 +} + // rand +// Returns a pseudo-random number in the range of 0 to RAND_MAX (65535) +// Uses an xorshift pseudorandom number generator that hits all different values +// Information https://en.wikipedia.org/wiki/Xorshift +// Source http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html +rand: { + .label __0 = $1c + .label __1 = $1e + .label __2 = $20 + .label return = $1a + // rand_state << 7 + // [138] (word~) rand::$0 ← (word) rand_state#10 << (byte) 7 -- vwuz1=vwuz2_rol_7 + lda.z rand_state+1 + lsr + lda.z rand_state + ror + sta.z __0+1 + lda #0 + ror + sta.z __0 + // rand_state ^= rand_state << 7 + // [139] (word) rand_state#0 ← (word) rand_state#10 ^ (word~) rand::$0 -- vwuz1=vwuz1_bxor_vwuz2 + lda.z rand_state + eor.z __0 + sta.z rand_state + lda.z rand_state+1 + eor.z __0+1 + sta.z rand_state+1 + // rand_state >> 9 + // [140] (word~) rand::$1 ← (word) rand_state#0 >> (byte) 9 -- vwuz1=vwuz2_ror_9 + lsr + sta.z __1 + lda #0 + sta.z __1+1 + // rand_state ^= rand_state >> 9 + // [141] (word) rand_state#1 ← (word) rand_state#0 ^ (word~) rand::$1 -- vwuz1=vwuz1_bxor_vwuz2 + lda.z rand_state + eor.z __1 + sta.z rand_state + lda.z rand_state+1 + eor.z __1+1 + sta.z rand_state+1 + // rand_state << 8 + // [142] (word~) rand::$2 ← (word) rand_state#1 << (byte) 8 -- vwuz1=vwuz2_rol_8 + lda.z rand_state + sta.z __2+1 + lda #0 + sta.z __2 + // rand_state ^= rand_state << 8 + // [143] (word) rand_state#11 ← (word) rand_state#1 ^ (word~) rand::$2 -- vwuz1=vwuz1_bxor_vwuz2 + lda.z rand_state + eor.z __2 + sta.z rand_state + lda.z rand_state+1 + eor.z __2+1 + sta.z rand_state+1 + // return rand_state; + // [144] (word) rand::return#0 ← (word) rand_state#11 -- vwuz1=vwuz2 + lda.z rand_state + sta.z return + lda.z rand_state+1 + sta.z return+1 + // rand::@return + // } + // [145] return + rts +} + // File Data +.segment GameRam + // Moving balls (in GameRAM) + balls: .fill 8*$40, 0 +.segment Data + sine_table: .byte $40, $42, $43, $45, $46, $48, $49, $4b, $4c, $4e, $50, $51, $53, $54, $56, $57, $58, $5a, $5b, $5d, $5e, $60, $61, $62, $64, $65, $66, $67, $69, $6a, $6b, $6c, $6d, $6e, $6f, $70, $71, $72, $73, $74, $75, $76, $77, $78, $78, $79, $7a, $7b, $7b, $7c, $7c, $7d, $7d, $7e, $7e, $7e, $7f, $7f, $7f, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80, $7f, $7f, $7f, $7e, $7e, $7e, $7d, $7d, $7c, $7c, $7b, $7b, $7a, $79, $78, $78, $77, $76, $75, $74, $73, $72, $71, $70, $6f, $6e, $6d, $6c, $6b, $6a, $69, $67, $66, $65, $64, $62, $61, $60, $5e, $5d, $5b, $5a, $58, $57, $56, $54, $53, $51, $50, $4e, $4c, $4b, $49, $48, $46, $45, $43, $42, $40, $3e, $3d, $3b, $3a, $38, $37, $35, $34, $32, $30, $2f, $2d, $2c, $2a, $29, $28, $26, $25, $23, $22, $20, $1f, $1e, $1c, $1b, $1a, $19, $17, $16, $15, $14, $13, $12, $11, $10, $f, $e, $d, $c, $b, $a, 9, 8, 8, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, $a, $b, $c, $d, $e, $f, $10, $11, $12, $13, $14, $15, $16, $17, $19, $1a, $1b, $1c, $1e, $1f, $20, $22, $23, $25, $26, $28, $29, $2a, $2c, $2d, $2f, $30, $32, $34, $35, $37, $38, $3a, $3b, $3d, $3e + palette: .byte $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4, $34, $24, $14, 4 + h_bar_tilemap: .byte 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +.segment Tiles +TILES: +.import binary "lazydata.chr" + +.segment GameRam + .align $100 + SPRITE_BUFFER: .fill 4*$100, 0 +.segment Vectors + VECTORS: .word vblank, main, 0 + diff --git a/src/test/ref/complex/nes-balls/kickballs-2.sym b/src/test/ref/complex/nes-balls/kickballs-2.sym new file mode 100644 index 000000000..68b233077 --- /dev/null +++ b/src/test/ref/complex/nes-balls/kickballs-2.sym @@ -0,0 +1,282 @@ +(word) $0::x_position +(word) $0::x_velocity +(word) $0::y_position +(word) $0::y_velocity +(const struct RICOH_2A03*) APU = (struct RICOH_2A03*) 16384 +(const nomodify byte*) FR_COUNTER = (byte*) 16407 +(const nomodify byte*) MEMORY = (byte*) 0 +(const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = (byte) $10 +(const byte) OFFSET_STRUCT_RICOH_2A03_OAMDMA = (byte) $14 +(const byte) OFFSET_STRUCT_RICOH_2C02_OAMADDR = (byte) 3 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR = (byte) 6 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA = (byte) 7 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK = (byte) 1 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL = (byte) 5 +(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS = (byte) 2 +(const byte) OFFSET_STRUCT_SPRITEDATA_ATTRIBUTES = (byte) 2 +(const byte) OFFSET_STRUCT_SPRITEDATA_TILE = (byte) 1 +(const byte) OFFSET_STRUCT_SPRITEDATA_X = (byte) 3 +(const struct RICOH_2C02*) PPU = (struct RICOH_2C02*) 8192 +(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 = (byte*) 9152 +(const nomodify byte*) PPU_NAME_TABLE_0 = (byte*) 8192 +(const nomodify byte*) PPU_PALETTE = (byte*) 16128 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const byte) RADIX::BINARY = (number) 2 +(const byte) RADIX::DECIMAL = (number) $a +(const byte) RADIX::HEXADECIMAL = (number) $10 +(const byte) RADIX::OCTAL = (number) 8 +(byte) RICOH_2A03::DMC_FREQ +(byte) RICOH_2A03::DMC_LEN +(byte) RICOH_2A03::DMC_RAW +(byte) RICOH_2A03::DMC_START +(byte) RICOH_2A03::JOY1 +(byte) RICOH_2A03::JOY2 +(byte) RICOH_2A03::NOISE_HI +(byte) RICOH_2A03::NOISE_LO +(byte) RICOH_2A03::NOISE_VOL +(byte) RICOH_2A03::OAMDMA +(byte) RICOH_2A03::SND_CHN +(byte) RICOH_2A03::SQ1_HI +(byte) RICOH_2A03::SQ1_LO +(byte) RICOH_2A03::SQ1_SWEEP +(byte) RICOH_2A03::SQ1_VOL +(byte) RICOH_2A03::SQ2_HI +(byte) RICOH_2A03::SQ2_LO +(byte) RICOH_2A03::SQ2_SWEEP +(byte) RICOH_2A03::SQ2_VOL +(byte) RICOH_2A03::TRI_HI +(byte) RICOH_2A03::TRI_LINEAR +(byte) RICOH_2A03::TRI_LO +(byte) RICOH_2A03::UNUSED1 +(byte) RICOH_2A03::UNUSED2 +(byte) RICOH_2C02::OAMADDR +(byte) RICOH_2C02::OAMDATA +(byte) RICOH_2C02::PPUADDR +(byte) RICOH_2C02::PPUCTRL +(byte) RICOH_2C02::PPUDATA +(byte) RICOH_2C02::PPUMASK +(byte) RICOH_2C02::PPUSCROLL +(volatile byte) RICOH_2C02::PPUSTATUS loadstore +(const byte) SIZEOF_BYTE = (byte) 1 +(const struct SpriteData*) SPRITE_BUFFER[(number) $100] = { fill( $100, 0) } +(byte) SpriteData::attributes +(byte) SpriteData::tile +(byte) SpriteData::x +(byte) SpriteData::y +(const byte*) TILES[] = kickasm {{ .import binary "lazydata.chr" + }} +(const to_nomodify void()**) VECTORS[] = { &interrupt(HARDWARE_STACK)(void()) vblank(), &(signed word()) main(), (void()*) 0 } +(void()) __start() +(label) __start::@1 +(label) __start::@return +(label) __start::__init1 +(const struct $0*) balls[(number) $40] = { fill( $40, 0) } +(const to_nomodify byte*) h_bar_tilemap[] = { (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1 } +(signed word()) main() +(word~) main::$10 zp[2]:26 101.0 +(word~) main::$11 zp[2]:26 202.0 +(byte~) main::$12 reg byte x 101.0 +(byte~) main::$14 reg byte a 202.0 +(word~) main::$20 zp[2]:13 2002.0 +(word~) main::$23 zp[2]:15 667.3333333333334 +(word~) main::$25 zp[2]:17 667.3333333333334 +(byte~) main::$26 zp[1]:19 1001.0 +(byte~) main::$30 reg byte a 1001.0 +(word~) main::$31 zp[2]:20 2002.0 +(word~) main::$32 zp[2]:22 500.5 +(word~) main::$33 zp[2]:24 1001.0 +(byte~) main::$35 reg byte a 202.0 +(byte~) main::$36 reg byte a 202.0 +(byte~) main::$38 reg byte x 151.5 +(byte~) main::$40 reg byte y 2502.5 +(byte~) main::$44 reg byte y 1501.5 +(byte~) main::$45 reg byte a 3003.0 +(byte~) main::$48 reg byte x 1001.0 +(byte~) main::$50 reg byte y 500.5 +(byte~) main::$53 reg byte y 800.8 +(word~) main::$56 zp[2]:20 2002.0 +(word~) main::$9 zp[2]:26 202.0 +(label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 +(label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 +(label) main::@24 +(label) main::@25 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@9 +(byte) main::active_balls +(byte) main::active_balls#1 active_balls zp[1]:4 75.75 +(byte) main::active_balls#2 active_balls zp[1]:4 56.11111111111111 +(byte) main::active_balls#8 active_balls zp[1]:4 37.97297297297297 +(label) main::enableVideoOutput1 +(byte) main::h_bar +(byte) main::h_bar#1 h_bar zp[1]:12 72.8409090909091 +(byte) main::i +(byte) main::i#10 i_1 zp[1]:6 258.3225806451613 +(byte) main::i#14 i zp[1]:2 33.666666666666664 +(byte) main::i#2 i zp[1]:2 202.0 +(byte) main::i#4 i_1 zp[1]:6 2002.0 +(label) main::initNES1 +(label) main::initNES1_@1 +(label) main::initNES1_@7 +(label) main::initNES1_clearVBlankFlag1 +(label) main::initNES1_disableAudioOutput1 +(label) main::initNES1_disableVideoOutput1 +(byte) main::initNES1_i +(byte) main::initNES1_i#1 reg byte x 151.5 +(byte) main::initNES1_i#2 reg byte x 112.22222222222223 +(label) main::initNES1_waitForVBlank1 +(byte~) main::initNES1_waitForVBlank1_$0 reg byte a 202.0 +(label) main::initNES1_waitForVBlank1_@1 +(label) main::initNES1_waitForVBlank2 +(byte~) main::initNES1_waitForVBlank2_$0 reg byte a 202.0 +(label) main::initNES1_waitForVBlank2_@1 +(signed word) main::return +(byte) main::sprite_idx +(byte) main::sprite_idx#2 sprite_idx zp[1]:7 1001.0 +(byte) main::sprite_idx#3 sprite_idx zp[1]:7 100.1 +(byte) main::timer +(byte) main::timer#1 reg byte x 101.0 +(byte) main::timer#15 timer zp[1]:5 8.18918918918919 +(byte) main::timer#21 timer zp[1]:5 202.0 +(byte) main::timer#3 timer zp[1]:5 57.714285714285715 +(byte) main::timer_2 +(byte) main::timer_2#1 timer_2 zp[1]:3 6.183673469387754 +(byte) main::timer_2#2 timer_2 zp[1]:3 202.0 +(const to_nomodify byte*) palette[] = { (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4, (byte) $34, (byte) $24, (byte) $14, (byte) 4 } +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +(label) ppuDataFill::@1 +(label) ppuDataFill::@2 +(label) ppuDataFill::@return +(word) ppuDataFill::i +(word) ppuDataFill::i#1 i zp[2]:17 2002.0 +(word) ppuDataFill::i#2 i zp[2]:17 1001.0 +(nomodify void*) ppuDataFill::ppuData +(label) ppuDataFill::ppuDataPrepare1 +(byte~) ppuDataFill::ppuDataPrepare1_$0 reg byte a 202.0 +(byte~) ppuDataFill::ppuDataPrepare1_$1 reg byte a 202.0 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:13 67.33333333333333 +(label) ppuDataFill::ppuDataPut1 +(byte) ppuDataFill::ppuDataPut1_val +(word) ppuDataFill::size +(word) ppuDataFill::size#3 size zp[2]:15 111.22222222222223 +(byte) ppuDataFill::val +(void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) +(label) ppuDataTransfer::@1 +(label) ppuDataTransfer::@2 +(label) ppuDataTransfer::@3 +(label) ppuDataTransfer::@4 +(label) ppuDataTransfer::@return +(nomodify void*) ppuDataTransfer::cpuData +(nomodify void*) ppuDataTransfer::cpuData#2 cpuData zp[2]:15 +(byte*) ppuDataTransfer::cpuSrc +(byte*) ppuDataTransfer::cpuSrc#1 cpuSrc zp[2]:15 1001.0 +(byte*) ppuDataTransfer::cpuSrc#2 cpuSrc zp[2]:15 776.0 +(byte*) ppuDataTransfer::cpuSrc#6 cpuSrc zp[2]:15 202.0 +(word) ppuDataTransfer::i +(word) ppuDataTransfer::i#1 i zp[2]:17 2002.0 +(word) ppuDataTransfer::i#2 i zp[2]:17 600.5999999999999 +(nomodify void*) ppuDataTransfer::ppuData +(label) ppuDataTransfer::ppuDataPrepare1 +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 reg byte a 202.0 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 reg byte a 202.0 +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:13 67.33333333333333 +(label) ppuDataTransfer::ppuDataPut1 +(byte) ppuDataTransfer::ppuDataPut1_val +(byte) ppuDataTransfer::ppuDataPut1_val#0 reg byte a 2002.0 +(word) ppuDataTransfer::size +(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) } +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length +(word()) rand() +(word~) rand::$0 zp[2]:28 2002.0 +(word~) rand::$1 zp[2]:30 2002.0 +(word~) rand::$2 zp[2]:32 2002.0 +(label) rand::@return +(word) rand::return +(word) rand::return#0 return zp[2]:26 300.75 +(word) rand::return#2 return zp[2]:26 202.0 +(word) rand::return#3 return zp[2]:26 202.0 +(word) rand_state +(word) rand_state#0 rand_state zp[2]:8 1501.5 +(word) rand_state#1 rand_state zp[2]:8 1501.5 +(word) rand_state#10 rand_state zp[2]:8 1102.0 +(word) rand_state#11 rand_state zp[2]:8 137.75 +(word) rand_state#17 rand_state zp[2]:8 67.33333333333333 +(volatile byte) scroll_y loadstore zp[1]:10 105.0 +(const to_nomodify byte*) sine_table[(number) $100] = { (byte) $40, (byte) $42, (byte) $43, (byte) $45, (byte) $46, (byte) $48, (byte) $49, (byte) $4b, (byte) $4c, (byte) $4e, (byte) $50, (byte) $51, (byte) $53, (byte) $54, (byte) $56, (byte) $57, (byte) $58, (byte) $5a, (byte) $5b, (byte) $5d, (byte) $5e, (byte) $60, (byte) $61, (byte) $62, (byte) $64, (byte) $65, (byte) $66, (byte) $67, (byte) $69, (byte) $6a, (byte) $6b, (byte) $6c, (byte) $6d, (byte) $6e, (byte) $6f, (byte) $70, (byte) $71, (byte) $72, (byte) $73, (byte) $74, (byte) $75, (byte) $76, (byte) $77, (byte) $78, (byte) $78, (byte) $79, (byte) $7a, (byte) $7b, (byte) $7b, (byte) $7c, (byte) $7c, (byte) $7d, (byte) $7d, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $80, (byte) $7f, (byte) $7f, (byte) $7f, (byte) $7e, (byte) $7e, (byte) $7e, (byte) $7d, (byte) $7d, (byte) $7c, (byte) $7c, (byte) $7b, (byte) $7b, (byte) $7a, (byte) $79, (byte) $78, (byte) $78, (byte) $77, (byte) $76, (byte) $75, (byte) $74, (byte) $73, (byte) $72, (byte) $71, (byte) $70, (byte) $6f, (byte) $6e, (byte) $6d, (byte) $6c, (byte) $6b, (byte) $6a, (byte) $69, (byte) $67, (byte) $66, (byte) $65, (byte) $64, (byte) $62, (byte) $61, (byte) $60, (byte) $5e, (byte) $5d, (byte) $5b, (byte) $5a, (byte) $58, (byte) $57, (byte) $56, (byte) $54, (byte) $53, (byte) $51, (byte) $50, (byte) $4e, (byte) $4c, (byte) $4b, (byte) $49, (byte) $48, (byte) $46, (byte) $45, (byte) $43, (byte) $42, (byte) $40, (byte) $3e, (byte) $3d, (byte) $3b, (byte) $3a, (byte) $38, (byte) $37, (byte) $35, (byte) $34, (byte) $32, (byte) $30, (byte) $2f, (byte) $2d, (byte) $2c, (byte) $2a, (byte) $29, (byte) $28, (byte) $26, (byte) $25, (byte) $23, (byte) $22, (byte) $20, (byte) $1f, (byte) $1e, (byte) $1c, (byte) $1b, (byte) $1a, (byte) $19, (byte) $17, (byte) $16, (byte) $15, (byte) $14, (byte) $13, (byte) $12, (byte) $11, (byte) $10, (byte) $f, (byte) $e, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 9, (byte) 8, (byte) 8, (byte) 7, (byte) 6, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 4, (byte) 5, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 8, (byte) 9, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $e, (byte) $f, (byte) $10, (byte) $11, (byte) $12, (byte) $13, (byte) $14, (byte) $15, (byte) $16, (byte) $17, (byte) $19, (byte) $1a, (byte) $1b, (byte) $1c, (byte) $1e, (byte) $1f, (byte) $20, (byte) $22, (byte) $23, (byte) $25, (byte) $26, (byte) $28, (byte) $29, (byte) $2a, (byte) $2c, (byte) $2d, (byte) $2f, (byte) $30, (byte) $32, (byte) $34, (byte) $35, (byte) $37, (byte) $38, (byte) $3a, (byte) $3b, (byte) $3d, (byte) $3e } +interrupt(HARDWARE_STACK)(void()) vblank() +(label) vblank::@1 +(label) vblank::@return +(label) vblank::ppuSpriteBufferDmaTransfer1 +(struct SpriteData*) vblank::ppuSpriteBufferDmaTransfer1_spriteBuffer +(volatile byte) vblank_hit loadstore zp[1]:11 10.25925925925926 + +reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] +zp[1]:2 [ main::i#14 main::i#2 ] +zp[1]:3 [ main::timer_2#2 main::timer_2#1 ] +zp[1]:4 [ main::active_balls#2 main::active_balls#8 main::active_balls#1 ] +zp[1]:5 [ main::timer#3 main::timer#15 main::timer#21 ] +zp[1]:6 [ main::i#10 main::i#4 ] +zp[1]:7 [ main::sprite_idx#3 main::sprite_idx#2 ] +zp[2]:8 [ rand_state#10 rand_state#17 rand_state#11 rand_state#0 rand_state#1 ] +zp[1]:10 [ scroll_y ] +zp[1]:11 [ vblank_hit ] +reg byte a [ main::initNES1_waitForVBlank1_$0 ] +reg byte a [ main::initNES1_waitForVBlank2_$0 ] +zp[1]:12 [ main::h_bar#1 ] +reg byte a [ main::$14 ] +reg byte x [ main::timer#1 ] +reg byte x [ main::$38 ] +reg byte y [ main::$40 ] +zp[2]:13 [ main::$20 ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ] +reg byte a [ main::$45 ] +reg byte y [ main::$44 ] +zp[2]:15 [ main::$23 ppuDataFill::size#3 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +zp[2]:17 [ main::$25 ppuDataFill::i#2 ppuDataFill::i#1 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +zp[1]:19 [ main::$26 ] +reg byte y [ main::$53 ] +reg byte a [ main::$30 ] +zp[2]:20 [ main::$56 main::$31 ] +reg byte y [ main::$50 ] +zp[2]:22 [ main::$32 ] +reg byte x [ main::$48 ] +zp[2]:24 [ main::$33 ] +zp[2]:26 [ rand::return#2 main::$9 rand::return#0 main::$10 rand::return#3 main::$11 ] +reg byte a [ main::$35 ] +reg byte x [ main::$12 ] +reg byte a [ main::$36 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] +reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] +reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] +zp[2]:28 [ rand::$0 ] +zp[2]:30 [ rand::$1 ] +zp[2]:32 [ rand::$2 ] diff --git a/src/test/ref/examples/nes-conio/nes-conio.asm b/src/test/ref/examples/nes/nes-conio.asm similarity index 100% rename from src/test/ref/examples/nes-conio/nes-conio.asm rename to src/test/ref/examples/nes/nes-conio.asm diff --git a/src/test/ref/examples/nes-conio/nes-conio.cfg b/src/test/ref/examples/nes/nes-conio.cfg similarity index 100% rename from src/test/ref/examples/nes-conio/nes-conio.cfg rename to src/test/ref/examples/nes/nes-conio.cfg diff --git a/src/test/ref/examples/nes-conio/nes-conio.log b/src/test/ref/examples/nes/nes-conio.log similarity index 100% rename from src/test/ref/examples/nes-conio/nes-conio.log rename to src/test/ref/examples/nes/nes-conio.log diff --git a/src/test/ref/examples/nes-conio/nes-conio.sym b/src/test/ref/examples/nes/nes-conio.sym similarity index 100% rename from src/test/ref/examples/nes-conio/nes-conio.sym rename to src/test/ref/examples/nes/nes-conio.sym diff --git a/src/test/ref/examples/nes-demo/nes-demo.asm b/src/test/ref/examples/nes/nes-demo.asm similarity index 100% rename from src/test/ref/examples/nes-demo/nes-demo.asm rename to src/test/ref/examples/nes/nes-demo.asm diff --git a/src/test/ref/examples/nes-demo/nes-demo.cfg b/src/test/ref/examples/nes/nes-demo.cfg similarity index 100% rename from src/test/ref/examples/nes-demo/nes-demo.cfg rename to src/test/ref/examples/nes/nes-demo.cfg diff --git a/src/test/ref/examples/nes-demo/nes-demo.log b/src/test/ref/examples/nes/nes-demo.log similarity index 100% rename from src/test/ref/examples/nes-demo/nes-demo.log rename to src/test/ref/examples/nes/nes-demo.log diff --git a/src/test/ref/examples/nes-demo/nes-demo.sym b/src/test/ref/examples/nes/nes-demo.sym similarity index 100% rename from src/test/ref/examples/nes-demo/nes-demo.sym rename to src/test/ref/examples/nes/nes-demo.sym diff --git a/src/test/ref/examples/nes-dxycp/nes-dxycp.asm b/src/test/ref/examples/nes/nes-dxycp.asm similarity index 100% rename from src/test/ref/examples/nes-dxycp/nes-dxycp.asm rename to src/test/ref/examples/nes/nes-dxycp.asm diff --git a/src/test/ref/examples/nes-dxycp/nes-dxycp.cfg b/src/test/ref/examples/nes/nes-dxycp.cfg similarity index 100% rename from src/test/ref/examples/nes-dxycp/nes-dxycp.cfg rename to src/test/ref/examples/nes/nes-dxycp.cfg diff --git a/src/test/ref/examples/nes-dxycp/nes-dxycp.log b/src/test/ref/examples/nes/nes-dxycp.log similarity index 100% rename from src/test/ref/examples/nes-dxycp/nes-dxycp.log rename to src/test/ref/examples/nes/nes-dxycp.log diff --git a/src/test/ref/examples/nes-dxycp/nes-dxycp.sym b/src/test/ref/examples/nes/nes-dxycp.sym similarity index 100% rename from src/test/ref/examples/nes-dxycp/nes-dxycp.sym rename to src/test/ref/examples/nes/nes-dxycp.sym