;
; File generated by cc65 v 2.10.0
;
	.fopt		compiler,"cc65 v 2.10.0"
	.setcpu		"6502"
	.smart		on
	.autoimport	on
	.case		on
	.debuginfo	off
	.importzp	sp, sreg, regsave, regbank, tmp1, ptr1, ptr2
	.macpack	longbranch
	.import		_rand
	.import		_memset
	.import		_asmentry
	.export		_main

.segment	"DATA"

_sprite:
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$FF
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.res	1,$00
_col:
	.word	$0001
	.word	$000C
	.word	$0009
	.word	$0002
	.word	$0005
	.word	$000B
	.word	$000F
	.res	2,$00

; ---------------------------------------------------------------
; int __near__ main (void)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	_main: near

.segment	"CODE"

	jsr     decsp4
	ldx     #$D8
	lda     #$00
	jsr     pushax
	ldx     #$00
	lda     #$01
	jsr     pushax
	ldx     #$03
	lda     #$E8
	jsr     _memset
	ldx     #$07
	lda     #$F8
	ldy     #$02
	jsr     staxysp
L004F:	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	ldx     #$08
	lda     #$00
	jsr     tosltax
	jne     L0052
	jmp     L0050
L0052:	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	ldx     #$00
	lda     #$0D
	ldy     #$00
	jsr     staspidx
	ldy     #$02
	ldx     #$00
	lda     #$01
	jsr     addeqysp
	jmp     L004F
L0050:	ldx     #$00
	lda     #$00
	ldy     #$02
	jsr     staxysp
L005C:	ldy     #$03
	jsr     ldaxysp
	cpx     #$00
	bne     L0063
	cmp     #$40
L0063:	jsr     boolult
	jne     L005F
	jmp     L005D
L005F:	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	ldx     #$03
	lda     #$40
	jsr     tosaddax
	jsr     pushax
	lda     #<(_sprite)
	ldx     #>(_sprite)
	ldy     #$04
	clc
	adc     (sp),y
	pha
	txa
	iny
	adc     (sp),y
	tax
	pla
	ldy     #$00
	jsr     ldauidx
	ldy     #$00
	jsr     staspidx
	ldy     #$02
	ldx     #$00
	lda     #$01
	jsr     addeqysp
	jmp     L005C
L005D:	ldx     #$00
	lda     #$FF
	sta     $D015
	ldx     #$00
	lda     #$00
	sta     $D010
	ldx     #$00
	lda     #$00
	sta     $D027
	ldx     #$00
	lda     #$00
	sta     $D028
	ldx     #$00
	lda     #$00
	sta     $D029
	ldx     #$00
	lda     #$00
	sta     $D02A
	ldx     #$00
	lda     #$00
	sta     $D02B
	ldx     #$00
	lda     #$00
	sta     $D02C
	ldx     #$00
	lda     #$00
	sta     $D02D
	ldx     #$00
	lda     #$00
	sta     $D02E
	ldx     #$00
	lda     #$00
	ldy     #$02
	jsr     staxysp
L0089:	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	lda     #$08
	jsr     toslta0
	jne     L008C
	jmp     L008A
L008C:	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	lda     #$30
	jsr     tosmula0
	ldy     #$14
	jsr     incaxy
	ldy     #$00
	jsr     staxysp
	ldy     #$03
	jsr     ldaxysp
	jsr     aslax1
	jsr     axlong
	jsr     pusheax
	ldx     #$D0
	lda     #$00
	sta     sreg
	sta     sreg+1
	jsr     tosaddeax
	jsr     pushax
	ldy     #$03
	jsr     ldaxysp
	ldx     #$00
	ldy     #$00
	jsr     staspidx
	ldy     #$01
	jsr     ldaxysp
	jsr     pushax
	ldx     #$01
	lda     #$00
	jsr     tosgeax
	jeq     L0099
	ldx     #$00
	lda     $D010
	jsr     pushax
	ldx     #$00
	lda     #$01
	jsr     pushax
	ldy     #$07
	jsr     ldaxysp
	jsr     tosaslax
	jsr     tosorax
	sta     $D010
L0099:	ldy     #$03
	jsr     ldaxysp
	jsr     aslax1
	jsr     axlong
	jsr     pusheax
	ldx     #$D0
	lda     #$00
	sta     sreg
	lda     #$00
	sta     sreg+1
	lda     #$01
	jsr     tosaddeax
	jsr     pushax
	ldx     #$00
	lda     #$B9
	ldy     #$00
	jsr     staspidx
	ldy     #$02
	ldx     #$00
	lda     #$01
	jsr     addeqysp
	jmp     L0089
L008A:	ldx     #$00
	lda     #$FF
	sta     $D01D
	ldx     #$00
	lda     #$00
	sta     $D017
	ldx     #$00
	lda     #$00
	sta     $D01B
	ldx     #$00
	lda     #$00
	ldy     #$02
	jsr     staxysp
L00AC:	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	ldx     #$02
	lda     #$D0
	jsr     tosltax
	jne     L00AF
	jmp     L00AD
L00AF:	ldy     #$03
	jsr     ldaxysp
	jsr     axlong
	jsr     pusheax
	ldx     #$04
	lda     #$00
	sta     sreg
	sta     sreg+1
	jsr     tosaddeax
	jsr     pushax
	ldx     #$00
	lda     #$A0
	ldy     #$00
	jsr     staspidx
	ldy     #$03
	jsr     ldaxysp
	jsr     pushax
	ldx     #$D8
	lda     #$00
	jsr     tosaddax
	jsr     pushax
	jsr     _rand
	jsr     pushax
	lda     #$08
	jsr     tosmoda0
	jsr     aslax1
	clc
	adc     #<(_col)
	tay
	txa
	adc     #>(_col)
	tax
	tya
	ldy     #$00
	jsr     ldauidx
	ldy     #$00
	jsr     staspidx
	ldy     #$03
	jsr     ldaxysp
	sta     regsave
	stx     regsave+1
	jsr     incax1
	ldy     #$02
	jsr     staxysp
	lda     regsave
	ldx     regsave+1
	jmp     L00AC
L00AD:	jsr     _asmentry
	ldx     #$00
	lda     #$00
	jmp     L004A
L004A:	jsr     incsp4
	rts

.endproc

