	.file	"extr_kirkwood-dma.c_kirkwood_dma_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kirkwood_dma_prepare, @function
kirkwood_dma_prepare:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR 8[rdi]
	call	kirkwood_priv@PLT
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, r13
	mov	r12, rax
	call	frames_to_bytes@PLT
	mov	rdi, rbx
	shr	rax, 2
	lea	rbp, -1[rax]
	call	snd_pcm_lib_period_bytes@PLT
	mov	rdi, rax
	mov	rax, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L6
	mov	rsi, QWORD PTR KIRKWOOD_REC_BYTE_INT_COUNT[rip]
	add	rsi, QWORD PTR [r12]
	call	writel@PLT
	mov	rdi, QWORD PTR 0[r13]
	mov	rsi, QWORD PTR KIRKWOOD_REC_BUF_ADDR[rip]
	add	rsi, QWORD PTR [r12]
	call	writel@PLT
	mov	rsi, QWORD PTR KIRKWOOD_REC_BUF_SIZE[rip]
	mov	rdi, rbp
	add	rsi, QWORD PTR [r12]
	call	writel@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rsi, QWORD PTR KIRKWOOD_PLAY_BYTE_INT_COUNT[rip]
	add	rsi, QWORD PTR [r12]
	call	writel@PLT
	mov	rdi, QWORD PTR 0[r13]
	mov	rsi, QWORD PTR KIRKWOOD_PLAY_BUF_ADDR[rip]
	add	rsi, QWORD PTR [r12]
	call	writel@PLT
	mov	rsi, QWORD PTR KIRKWOOD_PLAY_BUF_SIZE[rip]
	mov	rdi, rbp
	add	rsi, QWORD PTR [r12]
	call	writel@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	kirkwood_dma_prepare, .-kirkwood_dma_prepare
	.comm	SNDRV_PCM_STREAM_PLAYBACK,8,8
	.comm	KIRKWOOD_REC_BYTE_INT_COUNT,8,8
	.comm	KIRKWOOD_REC_BUF_SIZE,8,8
	.comm	KIRKWOOD_REC_BUF_ADDR,8,8
	.comm	KIRKWOOD_PLAY_BYTE_INT_COUNT,8,8
	.comm	KIRKWOOD_PLAY_BUF_SIZE,8,8
	.comm	KIRKWOOD_PLAY_BUF_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_kirkwood-dma.c_kirkwood_dma_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kirkwood_dma_prepare, %function
kirkwood_dma_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r7, [r0, #4]
	bl	kirkwood_priv
	ldr	r1, [r7, #4]
	mov	r5, r0
	mov	r0, r7
	bl	frames_to_bytes
	mov	r4, r0
	mov	r0, r6
	bl	snd_pcm_lib_period_bytes
	ldr	r3, .L8
	ldr	r2, [r6]
	ldr	r3, [r3]
	lsr	r4, r4, #2
	cmp	r2, r3
	sub	r4, r4, #1
	beq	.L7
	ldr	r3, .L8+4
	ldr	r1, [r5]
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L8+8
	ldr	r1, [r5]
	ldr	r3, [r3]
	ldr	r0, [r7]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L8+12
.L5:
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r0, r4
	add	r1, r1, r3
	bl	writel
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r3, .L8+16
	ldr	r1, [r5]
	ldr	r3, [r3]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L8+20
	ldr	r1, [r5]
	ldr	r3, [r3]
	ldr	r0, [r7]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L8+24
	b	.L5
.L9:
	.align	2
.L8:
	.word	SNDRV_PCM_STREAM_PLAYBACK
	.word	KIRKWOOD_REC_BYTE_INT_COUNT
	.word	KIRKWOOD_REC_BUF_ADDR
	.word	KIRKWOOD_REC_BUF_SIZE
	.word	KIRKWOOD_PLAY_BYTE_INT_COUNT
	.word	KIRKWOOD_PLAY_BUF_ADDR
	.word	KIRKWOOD_PLAY_BUF_SIZE
	.size	kirkwood_dma_prepare, .-kirkwood_dma_prepare
	.comm	SNDRV_PCM_STREAM_PLAYBACK,4,4
	.comm	KIRKWOOD_REC_BYTE_INT_COUNT,4,4
	.comm	KIRKWOOD_REC_BUF_SIZE,4,4
	.comm	KIRKWOOD_REC_BUF_ADDR,4,4
	.comm	KIRKWOOD_PLAY_BYTE_INT_COUNT,4,4
	.comm	KIRKWOOD_PLAY_BUF_SIZE,4,4
	.comm	KIRKWOOD_PLAY_BUF_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
