	.file	"extr_ice1712.c_snd_ice1712_playback_ds_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ice1712_playback_ds_prepare, @function
snd_ice1712_playback_ds_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
	mov	r12d, 1048575
	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	r13, QWORD PTR 8[rbx]
	mov	rdi, rbx
	mov	rbp, rax
	call	snd_pcm_lib_period_bytes@PLT
	mov	edi, DWORD PTR 16[r13]
	mov	DWORD PTR 12[rsp], eax
	lea	r15d, -1[rax]
	call	snd_pcm_format_width@PLT
	xor	r9d, r9d
	cmp	eax, 16
	setne	r9b
	lea	r9d, 96[0+r9*4]
	mov	eax, r9d
	or	eax, 8
	cmp	DWORD PTR 0[r13], 2
	cmove	r9d, eax
	mov	eax, DWORD PTR 4[r13]
	sal	eax, 13
	cmp	eax, 393215999
	jg	.L4
	movsx	r12, eax
	sar	eax, 31
	imul	r12, r12, 91625969
	sar	r12, 35
	sub	r12d, eax
.L4:
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR 16[rbp]
	lea	r14, 8[rbp]
	mov	DWORD PTR 8[rsp], r9d
	mov	rdi, r14
	mov	QWORD PTR [rax+rdx*8], 0
	mov	edx, DWORD PTR 8[r13]
	mov	rbx, QWORD PTR [rbx]
	mov	rax, QWORD PTR 0[rbp]
	mov	DWORD PTR [rax+rbx*4], edx
	add	ebx, ebx
	call	spin_lock_irq@PLT
	mov	ecx, DWORD PTR 8[r13]
	mov	esi, ebx
	mov	rdi, rbp
	mov	edx, DWORD PTR ICE1712_DSC_ADDR0[rip]
	call	snd_ice1712_ds_write@PLT
	mov	edx, DWORD PTR ICE1712_DSC_COUNT0[rip]
	mov	ecx, r15d
	mov	esi, ebx
	mov	rdi, rbp
	call	snd_ice1712_ds_write@PLT
	cmp	DWORD PTR 12[r13], 1
	mov	ecx, DWORD PTR 8[r13]
	mov	r9d, DWORD PTR 8[rsp]
	jle	.L5
	add	ecx, DWORD PTR 12[rsp]
.L5:
	mov	edx, DWORD PTR ICE1712_DSC_ADDR1[rip]
	mov	esi, ebx
	mov	rdi, rbp
	mov	DWORD PTR 8[rsp], r9d
	call	snd_ice1712_ds_write@PLT
	mov	edx, DWORD PTR ICE1712_DSC_COUNT1[rip]
	mov	ecx, r15d
	mov	esi, ebx
	mov	rdi, rbp
	call	snd_ice1712_ds_write@PLT
	mov	edx, DWORD PTR ICE1712_DSC_RATE[rip]
	mov	ecx, r12d
	mov	esi, ebx
	mov	rdi, rbp
	call	snd_ice1712_ds_write@PLT
	mov	edx, DWORD PTR ICE1712_DSC_VOLUME[rip]
	xor	ecx, ecx
	mov	esi, ebx
	mov	rdi, rbp
	call	snd_ice1712_ds_write@PLT
	mov	r9d, DWORD PTR 8[rsp]
	mov	esi, ebx
	mov	rdi, rbp
	mov	edx, DWORD PTR ICE1712_DSC_CONTROL[rip]
	mov	ecx, r9d
	call	snd_ice1712_ds_write@PLT
	cmp	DWORD PTR 0[r13], 2
	je	.L12
.L6:
	mov	rdi, r14
	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
.L12:
	.cfi_restore_state
	lea	r13d, 1[rbx]
	mov	edx, DWORD PTR ICE1712_DSC_RATE[rip]
	mov	ecx, r12d
	mov	rdi, rbp
	mov	esi, r13d
	call	snd_ice1712_ds_write@PLT
	mov	edx, DWORD PTR ICE1712_DSC_VOLUME[rip]
	xor	ecx, ecx
	mov	esi, r13d
	mov	rdi, rbp
	call	snd_ice1712_ds_write@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	snd_ice1712_playback_ds_prepare, .-snd_ice1712_playback_ds_prepare
	.comm	ICE1712_DSC_VOLUME,4,4
	.comm	ICE1712_DSC_RATE,4,4
	.comm	ICE1712_DSC_COUNT1,4,4
	.comm	ICE1712_DSC_COUNT0,4,4
	.comm	ICE1712_DSC_CONTROL,4,4
	.comm	ICE1712_DSC_ADDR1,4,4
	.comm	ICE1712_DSC_ADDR0,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_ice1712.c_snd_ice1712_playback_ds_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ice1712_playback_ds_prepare, %function
snd_ice1712_playback_ds_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	bl	snd_pcm_substream_chip
	mov	r4, r0
	mov	r0, r5
	ldr	r6, [r5, #4]
	bl	snd_pcm_lib_period_bytes
	mov	r10, r0
	ldr	r0, [r6, #16]
	bl	snd_pcm_format_width
	cmp	r0, #16
	moveq	fp, #96
	mov	r0, #0
	mov	r7, r4
	ldr	r3, [r6]
	movne	fp, #100
	ldr	r2, [r6, #4]
	ldr	r1, .L12
	cmp	r3, #2
	orreq	fp, fp, #8
	cmp	r1, r2, lsl #13
	lsl	r3, r2, #13
	ldrge	r2, .L12+4
	asrge	r8, r3, #31
	smullge	r1, r3, r2, r3
	ldr	r1, [r5]
	ldr	r2, [r4, #8]
	rsbge	r8, r8, r3, asr #3
	ldr	r3, [r7], #4
	str	r0, [r2, r1, lsl #2]
	ldr	r5, [r5]
	ldr	r2, [r6, #8]
	mov	r0, r7
	str	r2, [r3, r5, lsl #2]
	ldrlt	r8, .L12+8
	bl	spin_lock_irq
	ldr	r3, .L12+12
	lsl	r5, r5, #1
	ldr	r2, [r3]
	mov	r1, r5
	ldr	r3, [r6, #8]
	mov	r0, r4
	bl	snd_ice1712_ds_write
	ldr	r3, .L12+16
	sub	r9, r10, #1
	ldr	r2, [r3]
	mov	r1, r5
	mov	r3, r9
	mov	r0, r4
	bl	snd_ice1712_ds_write
	ldr	r2, [r6, #12]
	ldr	r3, .L12+20
	cmp	r2, #1
	ldr	r2, [r3]
	ldr	r3, [r6, #8]
	mov	r1, r5
	addgt	r3, r3, r10
	mov	r0, r4
	bl	snd_ice1712_ds_write
	ldr	r2, .L12+24
	ldr	r10, .L12+28
	mov	r3, r9
	mov	r1, r5
	ldr	r2, [r2]
	mov	r0, r4
	ldr	r9, .L12+32
	bl	snd_ice1712_ds_write
	mov	r3, r8
	mov	r1, r5
	ldr	r2, [r10]
	mov	r0, r4
	bl	snd_ice1712_ds_write
	mov	r3, #0
	mov	r1, r5
	ldr	r2, [r9]
	mov	r0, r4
	bl	snd_ice1712_ds_write
	ldr	r2, .L12+36
	mov	r3, fp
	mov	r1, r5
	mov	r0, r4
	ldr	r2, [r2]
	bl	snd_ice1712_ds_write
	ldr	r3, [r6]
	cmp	r3, #2
	beq	.L11
.L6:
	mov	r0, r7
	bl	spin_unlock_irq
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	add	r5, r5, #1
	mov	r3, r8
	mov	r1, r5
	ldr	r2, [r10]
	mov	r0, r4
	bl	snd_ice1712_ds_write
	mov	r1, r5
	mov	r0, r4
	mov	r3, #0
	ldr	r2, [r9]
	bl	snd_ice1712_ds_write
	b	.L6
.L13:
	.align	2
.L12:
	.word	393215999
	.word	91625969
	.word	1048575
	.word	ICE1712_DSC_ADDR0
	.word	ICE1712_DSC_COUNT0
	.word	ICE1712_DSC_ADDR1
	.word	ICE1712_DSC_COUNT1
	.word	ICE1712_DSC_RATE
	.word	ICE1712_DSC_VOLUME
	.word	ICE1712_DSC_CONTROL
	.size	snd_ice1712_playback_ds_prepare, .-snd_ice1712_playback_ds_prepare
	.comm	ICE1712_DSC_VOLUME,4,4
	.comm	ICE1712_DSC_RATE,4,4
	.comm	ICE1712_DSC_COUNT1,4,4
	.comm	ICE1712_DSC_COUNT0,4,4
	.comm	ICE1712_DSC_CONTROL,4,4
	.comm	ICE1712_DSC_ADDR1,4,4
	.comm	ICE1712_DSC_ADDR0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
