	.file	"extr_au88x0_pcm.c_snd_vortex_pcm_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_vortex_pcm_prepare, @function
snd_vortex_pcm_prepare:
.LFB0:
	.cfi_startproc
	endbr64
	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
	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
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	snd_pcm_substream_chip@PLT
	mov	r15, QWORD PTR 16[rbx]
	mov	r14, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rbp, rax
	mov	rax, QWORD PTR 8[r15]
	mov	edi, DWORD PTR 4[r15]
	mov	r13d, DWORD PTR [rax]
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 8[rsp], rax
	call	vortex_alsafmt_aspfmt@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	spin_lock_irq@PLT
	mov	edi, DWORD PTR 8[rbx]
	call	VORTEX_PCM_TYPE@PLT
	cmp	rax, QWORD PTR VORTEX_PCM_WT[rip]
	je	.L2
	cmp	QWORD PTR 8[rsp], r14
	mov	r8d, r12d
	mov	edx, 1
	mov	esi, r13d
	sete	r14b
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	xor	r9d, r9d
	mov	rdi, rbp
	push	0
	.cfi_def_cfa_offset 96
	movzx	r14d, r14b
	mov	ecx, r14d
	call	vortex_adbdma_setmode@PLT
	xor	edx, edx
	mov	esi, r13d
	mov	rdi, rbp
	call	vortex_adbdma_setstartbuffer@PLT
	mov	edi, DWORD PTR 8[rbx]
	call	VORTEX_PCM_TYPE@PLT
	cmp	rax, QWORD PTR VORTEX_PCM_SPDIF[rip]
	pop	rdx
	.cfi_def_cfa_offset 88
	pop	rcx
	.cfi_def_cfa_offset 80
	jne	.L6
.L3:
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L6:
	.cfi_restore_state
	mov	edx, DWORD PTR [r15]
	mov	ecx, r14d
	mov	esi, r13d
	mov	rdi, rbp
	call	vortex_adb_setsrc@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, r13d
	mov	rdi, rbp
	xor	r9d, r9d
	xor	r8d, r8d
	mov	ecx, r12d
	mov	edx, 1
	call	vortex_wtdma_setmode@PLT
	xor	edx, edx
	mov	esi, r13d
	mov	rdi, rbp
	call	vortex_wtdma_setstartbuffer@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	snd_vortex_pcm_prepare, .-snd_vortex_pcm_prepare
	.comm	VORTEX_PCM_WT,8,8
	.comm	VORTEX_PCM_SPDIF,8,8
	.comm	SNDRV_PCM_STREAM_PLAYBACK,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_au88x0_pcm.c_snd_vortex_pcm_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_vortex_pcm_prepare, %function
snd_vortex_pcm_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	sub	sp, sp, #16
	bl	snd_pcm_substream_chip
	ldr	r8, [r5, #8]
	ldr	r3, .L7
	ldr	r2, [r8, #8]
	mov	r4, r0
	ldr	r0, [r8, #4]
	ldr	r7, [r2]
	ldr	r9, [r3]
	ldr	r10, [r5]
	bl	vortex_alsafmt_aspfmt
	mov	r6, r0
	mov	r0, r4
	bl	spin_lock_irq
	ldr	r0, [r5, #4]
	bl	VORTEX_PCM_TYPE
	ldr	r3, .L7+4
	ldr	r2, [r3]
	cmp	r0, r2
	beq	.L2
	sub	r9, r10, r9
	clz	r9, r9
	mov	r10, #0
	lsr	r9, r9, #5
	mov	r3, r9
	mov	r2, #1
	mov	r1, r7
	mov	r0, r4
	str	r6, [sp]
	str	r10, [sp, #8]
	str	r10, [sp, #4]
	bl	vortex_adbdma_setmode
	mov	r2, r10
	mov	r1, r7
	mov	r0, r4
	bl	vortex_adbdma_setstartbuffer
	ldr	r0, [r5, #4]
	bl	VORTEX_PCM_TYPE
	ldr	r3, .L7+8
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L6
.L3:
	mov	r0, r4
	bl	spin_unlock_irq
	mov	r0, #0
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	mov	r3, r9
	mov	r1, r7
	mov	r0, r4
	ldr	r2, [r8]
	bl	vortex_adb_setsrc
	b	.L3
.L2:
	mov	r5, #0
	mov	r1, r7
	mov	r3, r6
	mov	r2, #1
	mov	r0, r4
	str	r5, [sp, #4]
	str	r5, [sp]
	bl	vortex_wtdma_setmode
	mov	r2, r5
	mov	r1, r7
	mov	r0, r4
	bl	vortex_wtdma_setstartbuffer
	b	.L3
.L8:
	.align	2
.L7:
	.word	SNDRV_PCM_STREAM_PLAYBACK
	.word	VORTEX_PCM_WT
	.word	VORTEX_PCM_SPDIF
	.size	snd_vortex_pcm_prepare, .-snd_vortex_pcm_prepare
	.comm	VORTEX_PCM_WT,4,4
	.comm	VORTEX_PCM_SPDIF,4,4
	.comm	SNDRV_PCM_STREAM_PLAYBACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
