	.file	"extr_aic94xx_seq.c_asd_download_seq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"sequencer program not multiple of 4\n"
	.align 8
.LC1:
	.string	"out of memory for dma SEQ download\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"dma-ing %d bytes\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"%s: error DMA-ing sequencer code\n"
	.text
	.p2align 4
	.type	asd_download_seq, @function
asd_download_seq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	ecx, DWORD PTR MAX_DMA_OVLY_COUNT[rip]
	mov	QWORD PTR 16[rsp], rsi
	lea	eax, -1[rcx+rdx]
	cdq
	idiv	ecx
	mov	DWORD PTR 12[rsp], eax
	test	r14b, 3
	jne	.L24
	mov	rbp, rdi
	call	asd_pause_cseq@PLT
	mov	esi, 255
	mov	rdi, rbp
	call	asd_pause_lseq@PLT
	mov	esi, DWORD PTR COMSTATEN[rip]
	mov	rdi, rbp
	call	asd_read_reg_dword@PLT
	mov	esi, DWORD PTR COMSTATEN[rip]
	xor	edx, edx
	mov	rdi, rbp
	mov	DWORD PTR 28[rsp], eax
	call	asd_write_reg_dword@PLT
	mov	edx, DWORD PTR COMSTAT_MASK[rip]
	mov	esi, DWORD PTR COMSTAT[rip]
	mov	rdi, rbp
	call	asd_write_reg_dword@PLT
	mov	edx, DWORD PTR RST_CHIMINTEN[rip]
	mov	esi, DWORD PTR CHIMINTEN[rip]
	mov	rdi, rbp
	call	asd_write_reg_dword@PLT
	mov	edx, DWORD PTR CHIMINT_MASK[rip]
	mov	esi, DWORD PTR CHIMINT[rip]
	mov	rdi, rbp
	call	asd_write_reg_dword@PLT
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, DWORD PTR MAX_DMA_OVLY_COUNT[rip]
	mov	rdi, rbp
	call	asd_alloc_coherent@PLT
	mov	r13, rax
	test	rax, rax
	je	.L25
	mov	esi, r14d
	lea	rdi, .LC2[rip]
	call	ASD_DPRINTK@PLT
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	jle	.L6
	mov	eax, r15d
	xor	r12d, r12d
	sal	eax, 8
	mov	DWORD PTR 24[rsp], eax
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, DWORD PTR MAX_DMA_OVLY_COUNT[rip]
	mov	edi, r14d
	mov	eax, esi
	imul	eax, r12d
	sub	edi, eax
	call	min@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR 4[r13]
	mov	ebx, eax
	mov	eax, DWORD PTR MAX_DMA_OVLY_COUNT[rip]
	mov	edx, ebx
	imul	eax, r12d
	cdqe
	lea	rsi, [rcx+rax*8]
	call	memcpy@PLT
	mov	edx, DWORD PTR 0[r13]
	mov	esi, DWORD PTR OVLYDMAADR[rip]
	mov	rdi, rbp
	call	asd_write_reg_addr@PLT
	mov	esi, DWORD PTR OVLYDMACNT[rip]
	mov	edx, ebx
	mov	rdi, rbp
	call	asd_write_reg_dword@PLT
	test	r12d, r12d
	mov	eax, 0
	mov	rdi, rbp
	cmove	eax, DWORD PTR RESETOVLYDMA[rip]
	mov	edx, DWORD PTR STARTOVLYDMA[rip]
	or	edx, DWORD PTR OVLYHALTERR[rip]
	mov	esi, DWORD PTR OVLYDMACTL[rip]
	or	edx, eax
	test	r15, r15
	mov	eax, DWORD PTR 24[rsp]
	cmove	eax, DWORD PTR OVLYCSEQ[rip]
	or	edx, eax
	call	asd_write_reg_dword@PLT
	imul	ebx, DWORD PTR PAUSE_TRIES[rip], 100
	test	ebx, ebx
	jg	.L10
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, DWORD PTR PAUSE_DELAY[rip]
	call	udelay@PLT
	sub	ebx, 1
	je	.L9
.L10:
	mov	esi, DWORD PTR OVLYDMACTL[rip]
	mov	rdi, rbp
	call	asd_read_reg_dword@PLT
	test	DWORD PTR OVLYDMAACT[rip], eax
	jne	.L26
.L9:
	add	r12d, 1
	cmp	DWORD PTR 12[rsp], r12d
	jne	.L11
.L6:
	mov	esi, DWORD PTR COMSTAT[rip]
	mov	rdi, rbp
	call	asd_read_reg_dword@PLT
	test	DWORD PTR OVLYDMADONE[rip], eax
	je	.L14
	test	DWORD PTR OVLYERR[rip], eax
	je	.L27
.L14:
	mov	edi, DWORD PTR 0[rbp]
	call	pci_name@PLT
	lea	rdi, .LC3[rip]
	mov	esi, eax
	xor	eax, eax
	call	asd_printk@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
.L13:
	mov	rsi, r13
	mov	rdi, rbp
	call	asd_free_coherent@PLT
.L5:
	mov	edx, DWORD PTR 28[rsp]
	mov	esi, DWORD PTR COMSTATEN[rip]
	mov	rdi, rbp
	call	asd_write_reg_dword@PLT
	test	r12d, r12d
	je	.L28
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	mov	rsi, QWORD PTR 16[rsp]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rcx, r15
	mov	edx, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	asd_verify_seq@PLT
.L27:
	.cfi_restore_state
	mov	esi, DWORD PTR CHIMINT[rip]
	mov	rdi, rbp
	call	asd_read_reg_dword@PLT
	and	eax, DWORD PTR DEVEXCEPT_MASK[rip]
	mov	r12d, eax
	jne	.L14
	jmp	.L13
.L25:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	asd_printk@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L5
.L24:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	mov	r12d, -1
	call	asd_printk@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	asd_download_seq, .-asd_download_seq
	.comm	STARTOVLYDMA,4,4
	.comm	RST_CHIMINTEN,4,4
	.comm	RESETOVLYDMA,4,4
	.comm	PAUSE_TRIES,4,4
	.comm	PAUSE_DELAY,4,4
	.comm	OVLYHALTERR,4,4
	.comm	OVLYERR,4,4
	.comm	OVLYDMADONE,4,4
	.comm	OVLYDMACTL,4,4
	.comm	OVLYDMACNT,4,4
	.comm	OVLYDMAADR,4,4
	.comm	OVLYDMAACT,4,4
	.comm	OVLYCSEQ,4,4
	.comm	MAX_DMA_OVLY_COUNT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	DEVEXCEPT_MASK,4,4
	.comm	COMSTAT_MASK,4,4
	.comm	COMSTATEN,4,4
	.comm	COMSTAT,4,4
	.comm	CHIMINT_MASK,4,4
	.comm	CHIMINTEN,4,4
	.comm	CHIMINT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_aic94xx_seq.c_asd_download_seq.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"sequencer program not multiple of 4\012\000"
	.align	2
.LC1:
	.ascii	"out of memory for dma SEQ download\012\000"
	.align	2
.LC2:
	.ascii	"dma-ing %d bytes\012\000"
	.align	2
.LC3:
	.ascii	"%s: error DMA-ing sequencer code\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	asd_download_seq, %function
asd_download_seq:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r2
	ldr	fp, .L30
	sub	sp, sp, #28
	str	r2, [sp]
	ldr	r2, [fp]
	mov	r5, r0
	add	r0, r2, r4
	str	r1, [sp, #12]
	sub	r0, r0, #1
	mov	r1, r2
	str	r3, [sp, #4]
	bl	__aeabi_idiv
	ands	r9, r4, #3
	str	r0, [sp, #8]
	bne	.L25
	ldr	r4, .L30+4
	mov	r0, r5
	bl	asd_pause_cseq
	mov	r1, #255
	mov	r0, r5
	bl	asd_pause_lseq
	ldr	r1, [r4]
	mov	r0, r5
	bl	asd_read_reg_dword
	mov	r3, r0
	mov	r2, r9
	ldr	r1, [r4]
	mov	r0, r5
	str	r3, [sp, #20]
	bl	asd_write_reg_dword
	ldr	r3, .L30+8
	ldr	r2, .L30+12
	mov	r0, r5
	ldr	r1, [r2]
	ldr	r2, [r3]
	bl	asd_write_reg_dword
	ldr	r3, .L30+16
	ldr	r2, .L30+20
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r5
	bl	asd_write_reg_dword
	ldr	r3, .L30+24
	ldr	r2, .L30+28
	mov	r0, r5
	ldr	r1, [r2]
	ldr	r2, [r3]
	bl	asd_write_reg_dword
	ldr	r3, .L30+32
	mov	r0, r5
	ldr	r1, [fp]
	ldr	r2, [r3]
	bl	asd_alloc_coherent
	subs	r10, r0, #0
	beq	.L26
	ldr	r1, [sp]
	ldr	r0, .L30+36
	bl	ASD_DPRINTK
	ldr	r3, [sp, #8]
	cmp	r3, #0
	ble	.L6
	ldr	r3, [sp, #4]
	ldr	r6, .L30+40
	lsl	r3, r3, #8
	ldr	r7, .L30+44
	ldr	r8, .L30+48
	str	r3, [sp, #16]
.L11:
	ldr	r1, [fp]
	ldr	r3, [sp]
	mul	r0, r9, r1
	sub	r0, r3, r0
	bl	min
	mov	r4, r0
	ldr	r1, [fp]
	ldr	r3, [sp, #12]
	mul	r1, r9, r1
	mov	r2, r0
	add	r1, r3, r1, lsl #2
	ldr	r0, [r10, #4]
	bl	memcpy
	ldr	r3, .L30+52
	ldr	r2, [r10]
	ldr	r1, [r3]
	mov	r0, r5
	bl	asd_write_reg_addr
	ldr	r3, .L30+56
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r5
	bl	asd_write_reg_dword
	cmp	r9, #0
	movne	r1, #0
	ldreq	r3, .L30+60
	ldr	r2, .L30+64
	ldreq	r1, [r3]
	ldr	r3, .L30+68
	ldr	r0, [sp, #4]
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r0, #0
	orr	r3, r3, r2
	ldreq	r2, .L30+72
	ldrne	r2, [sp, #16]
	ldreq	r2, [r2]
	orr	r3, r3, r1
	orr	r2, r2, r3
	mov	r0, r5
	ldr	r1, [r6]
	bl	asd_write_reg_dword
	ldr	r3, .L30+76
	ldr	r4, [r3]
	add	r4, r4, r4, lsl #2
	add	r4, r4, r4, lsl #2
	lsl	r4, r4, #2
	cmp	r4, #0
	bgt	.L10
	b	.L9
.L27:
	ldr	r0, [r8]
	bl	udelay
	subs	r4, r4, #1
	beq	.L9
.L10:
	mov	r0, r5
	ldr	r1, [r6]
	bl	asd_read_reg_dword
	ldr	r3, [r7]
	tst	r0, r3
	bne	.L27
.L9:
	ldr	r3, [sp, #8]
	add	r9, r9, #1
	cmp	r3, r9
	bne	.L11
.L6:
	ldr	r3, .L30+12
	mov	r0, r5
	ldr	r1, [r3]
	bl	asd_read_reg_dword
	ldr	r3, .L30+80
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L14
	ldr	r3, .L30+84
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L28
.L14:
	ldr	r0, [r5]
	bl	pci_name
	mov	r1, r0
	ldr	r0, .L30+88
	bl	asd_printk
	ldr	r3, .L30+92
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L13:
	mov	r1, r10
	mov	r0, r5
	bl	asd_free_coherent
.L5:
	ldr	r3, .L30+4
	mov	r0, r5
	ldr	r2, [sp, #20]
	ldr	r1, [r3]
	bl	asd_write_reg_dword
	cmp	r4, #0
	beq	.L29
.L1:
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	mov	r0, r5
	ldm	sp, {r2, r3}
	ldr	r1, [sp, #12]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	asd_verify_seq
.L28:
	ldr	r3, .L30+28
	mov	r0, r5
	ldr	r1, [r3]
	bl	asd_read_reg_dword
	ldr	r3, .L30+96
	ldr	r4, [r3]
	ands	r4, r0, r4
	bne	.L14
	b	.L13
.L26:
	ldr	r0, .L30+100
	bl	asd_printk
	ldr	r3, .L30+104
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L5
.L25:
	ldr	r0, .L30+108
	bl	asd_printk
	mvn	r4, #0
	b	.L1
.L31:
	.align	2
.L30:
	.word	MAX_DMA_OVLY_COUNT
	.word	COMSTATEN
	.word	COMSTAT_MASK
	.word	COMSTAT
	.word	CHIMINTEN
	.word	RST_CHIMINTEN
	.word	CHIMINT_MASK
	.word	CHIMINT
	.word	GFP_KERNEL
	.word	.LC2
	.word	OVLYDMACTL
	.word	OVLYDMAACT
	.word	PAUSE_DELAY
	.word	OVLYDMAADR
	.word	OVLYDMACNT
	.word	RESETOVLYDMA
	.word	OVLYHALTERR
	.word	STARTOVLYDMA
	.word	OVLYCSEQ
	.word	PAUSE_TRIES
	.word	OVLYDMADONE
	.word	OVLYERR
	.word	.LC3
	.word	ENODEV
	.word	DEVEXCEPT_MASK
	.word	.LC1
	.word	ENOMEM
	.word	.LC0
	.size	asd_download_seq, .-asd_download_seq
	.comm	STARTOVLYDMA,4,4
	.comm	RST_CHIMINTEN,4,4
	.comm	RESETOVLYDMA,4,4
	.comm	PAUSE_TRIES,4,4
	.comm	PAUSE_DELAY,4,4
	.comm	OVLYHALTERR,4,4
	.comm	OVLYERR,4,4
	.comm	OVLYDMADONE,4,4
	.comm	OVLYDMACTL,4,4
	.comm	OVLYDMACNT,4,4
	.comm	OVLYDMAADR,4,4
	.comm	OVLYDMAACT,4,4
	.comm	OVLYCSEQ,4,4
	.comm	MAX_DMA_OVLY_COUNT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	DEVEXCEPT_MASK,4,4
	.comm	COMSTAT_MASK,4,4
	.comm	COMSTATEN,4,4
	.comm	COMSTAT,4,4
	.comm	CHIMINT_MASK,4,4
	.comm	CHIMINTEN,4,4
	.comm	CHIMINT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
