	.file	"extr_tw686x-audio.c_tw686x_audio_dma_alloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"B"
.LC1:
	.string	"P"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"dma%d: unable to allocate audio DMA %s-buffer\n"
	.text
	.p2align 4
	.type	tw686x_audio_dma_alloc, @function
tw686x_audio_dma_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR TW686X_DMA_MODE_MEMCPY[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L9
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	mov	r14d, r13d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR [r12]
	test	r13, r13
	je	.L4
.L18:
	mov	rdx, QWORD PTR ADMA_B_ADDR[rip]
	mov	r15d, DWORD PTR [rdx+rax*4]
.L5:
	mov	rdx, QWORD PTR 8[r12]
	mov	rbx, r13
	mov	rdi, QWORD PTR 8[rbp]
	sal	rbx, 4
	mov	esi, DWORD PTR AUDIO_DMA_SIZE_MAX[rip]
	add	rdx, rbx
	call	pci_alloc_consistent@PLT
	test	rax, rax
	je	.L16
	add	rbx, QWORD PTR 8[r12]
	mov	esi, r15d
	mov	rdi, rbp
	mov	QWORD PTR 8[rbx], rax
	mov	eax, DWORD PTR AUDIO_DMA_SIZE_MAX[rip]
	mov	edx, DWORD PTR [rbx]
	mov	DWORD PTR 4[rbx], eax
	call	reg_write@PLT
	cmp	r13, 1
	jne	.L17
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	r13d, 1
	mov	rax, QWORD PTR [r12]
	mov	r14d, r13d
	test	r13, r13
	jne	.L18
.L4:
	mov	rdx, QWORD PTR ADMA_P_ADDR[rip]
	mov	r15d, DWORD PTR [rdx+rax*4]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	test	r14d, r14d
	lea	rax, .LC1[rip]
	mov	rdi, QWORD PTR 8[rbp]
	mov	rdx, QWORD PTR [r12]
	lea	rcx, .LC0[rip]
	lea	rsi, .LC2[rip]
	cmove	rcx, rax
	call	dev_err@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	tw686x_audio_dma_alloc, .-tw686x_audio_dma_alloc
	.comm	TW686X_DMA_MODE_MEMCPY,8,8
	.comm	ENOMEM,4,4
	.comm	AUDIO_DMA_SIZE_MAX,4,4
	.comm	ADMA_P_ADDR,8,8
	.comm	ADMA_B_ADDR,8,8
	.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_tw686x-audio.c_tw686x_audio_dma_alloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"B\000"
	.align	2
.LC1:
	.ascii	"P\000"
	.align	2
.LC2:
	.ascii	"dma%d: unable to allocate audio DMA %s-buffer\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tw686x_audio_dma_alloc, %function
tw686x_audio_dma_alloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L16
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L8
	mov	r5, r0
	mov	r6, r1
	mov	r7, #0
	ldr	r8, .L16+4
	ldr	r10, .L16+8
	ldr	r9, .L16+12
.L2:
	cmp	r7, #0
	ldrne	r2, [r9]
	ldreq	r2, [r10]
	ldr	r3, [r6]
	lsl	r4, r7, #1
	ldr	fp, [r2, r3, lsl #2]
	ldr	r2, [r6, #4]
	add	r4, r4, r7
	ldr	r1, [r8]
	ldr	r0, [r5, #4]
	add	r2, r2, r4, lsl #2
	bl	pci_alloc_consistent
	cmp	r0, #0
	lsl	r3, r4, #2
	beq	.L14
	ldr	r2, [r6, #4]
	ldr	ip, [r8]
	add	r3, r2, r3
	str	r0, [r3, #8]
	ldr	r2, [r2, r4, lsl #2]
	mov	r1, fp
	mov	r0, r5
	str	ip, [r3, #4]
	bl	reg_write
	cmp	r7, #1
	bne	.L15
.L8:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r7, #1
	b	.L2
.L14:
	ldr	r1, .L16+16
	cmp	r7, #0
	ldr	r3, .L16+20
	ldr	r2, [r6]
	movne	r3, r1
	ldr	r0, [r5, #4]
	ldr	r1, .L16+24
	bl	dev_err
	ldr	r3, .L16+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	TW686X_DMA_MODE_MEMCPY
	.word	AUDIO_DMA_SIZE_MAX
	.word	ADMA_P_ADDR
	.word	ADMA_B_ADDR
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	ENOMEM
	.size	tw686x_audio_dma_alloc, .-tw686x_audio_dma_alloc
	.comm	TW686X_DMA_MODE_MEMCPY,4,4
	.comm	ENOMEM,4,4
	.comm	AUDIO_DMA_SIZE_MAX,4,4
	.comm	ADMA_P_ADDR,4,4
	.comm	ADMA_B_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
