	.file	"extr_ens1370.c_snd_ensoniq_playback1_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ensoniq_playback1_prepare, @function
snd_ensoniq_playback1_prepare:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	call	snd_pcm_substream_chip@PLT
	mov	rdi, r13
	mov	r12, QWORD PTR 0[r13]
	mov	rbp, rax
	call	snd_pcm_lib_buffer_bytes@PLT
	mov	rdi, r13
	lea	r13, 16[rbp]
	mov	DWORD PTR 0[rbp], eax
	call	snd_pcm_lib_period_bytes@PLT
	mov	edi, DWORD PTR 12[r12]
	mov	DWORD PTR 4[rbp], eax
	call	snd_pcm_format_width@PLT
	mov	rdi, r13
	cmp	eax, 16
	sete	bl
	add	ebx, ebx
	mov	eax, ebx
	or	eax, 1
	cmp	DWORD PTR [r12], 1
	cmovg	rbx, rax
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR ES_DAC1_EN[rip]
	mov	esi, DWORD PTR CONTROL[rip]
	mov	rdi, rbp
	not	eax
	and	DWORD PTR 8[rbp], eax
	call	ES_REG@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	esi, eax
	call	outl@PLT
	mov	esi, DWORD PTR MEM_PAGE[rip]
	mov	rdi, rbp
	call	ES_REG@PLT
	mov	edi, DWORD PTR ES_PAGE_DAC[rip]
	mov	r14d, eax
	call	ES_MEM_PAGEO@PLT
	mov	esi, r14d
	mov	edi, eax
	call	outl@PLT
	mov	esi, DWORD PTR DAC1_FRAME[rip]
	mov	rdi, rbp
	call	ES_REG@PLT
	mov	edi, DWORD PTR 8[r12]
	mov	esi, eax
	call	outl@PLT
	mov	esi, DWORD PTR DAC1_SIZE[rip]
	mov	rdi, rbp
	call	ES_REG@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, eax
	sar	edi, 2
	sub	edi, 1
	call	outl@PLT
	mov	eax, DWORD PTR ES_P1_LOOP_SEL[rip]
	mov	edi, ebx
	or	eax, DWORD PTR ES_P1_PAUSE[rip]
	or	eax, DWORD PTR ES_P1_SCT_RLD[rip]
	or	eax, DWORD PTR ES_P1_MODEM[rip]
	not	eax
	and	DWORD PTR 12[rbp], eax
	call	ES_P1_MODEO@PLT
	mov	esi, DWORD PTR SERIAL[rip]
	mov	rdi, rbp
	mov	r8d, eax
	mov	eax, DWORD PTR ES_P1_INT_EN[rip]
	or	eax, DWORD PTR 12[rbp]
	or	eax, r8d
	mov	DWORD PTR 12[rbp], eax
	call	ES_REG@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, eax
	call	outl@PLT
	mov	esi, DWORD PTR DAC1_COUNT[rip]
	mov	rdi, rbp
	call	ES_REG@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	esi, eax
	mov	rax, QWORD PTR snd_ensoniq_sample_shift[rip]
	mov	ecx, DWORD PTR [rax+rbx*4]
	sar	edi, cl
	sub	edi, 1
	call	outl@PLT
	mov	esi, DWORD PTR CONTROL[rip]
	mov	rdi, rbp
	call	ES_REG@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	esi, eax
	call	outl@PLT
	mov	rdi, r13
	call	spin_unlock_irq@PLT
	mov	esi, DWORD PTR 4[r12]
	mov	rdi, rbp
	call	snd_es1371_dac1_rate@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	snd_ensoniq_playback1_prepare, .-snd_ensoniq_playback1_prepare
	.comm	snd_ensoniq_sample_shift,8,8
	.comm	SERIAL,4,4
	.comm	MEM_PAGE,4,4
	.comm	ES_PAGE_DAC,4,4
	.comm	ES_P1_SCT_RLD,4,4
	.comm	ES_P1_PAUSE,4,4
	.comm	ES_P1_MODEM,4,4
	.comm	ES_P1_LOOP_SEL,4,4
	.comm	ES_P1_INT_EN,4,4
	.comm	ES_DAC1_EN,4,4
	.comm	ES_1373_BYPASS_P1,4,4
	.comm	ES_1370_WTSRSELM,4,4
	.comm	DAC1_SIZE,4,4
	.comm	DAC1_FRAME,4,4
	.comm	DAC1_COUNT,4,4
	.comm	CONTROL,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_ens1370.c_snd_ensoniq_playback1_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ensoniq_playback1_prepare, %function
snd_ensoniq_playback1_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
	bl	snd_pcm_substream_chip
	mov	r4, r0
	mov	r0, r5
	ldr	r6, [r5]
	bl	snd_pcm_lib_buffer_bytes
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4]
	bl	snd_pcm_lib_period_bytes
	mov	r3, r0
	ldr	r0, [r6, #12]
	str	r3, [r4, #4]
	bl	snd_pcm_format_width
	cmp	r0, #16
	movne	r7, #0
	moveq	r7, #2
	ldr	r3, [r6]
	add	r8, r4, #16
	cmp	r3, #1
	mov	r0, r8
	orrgt	r7, r7, #1
	bl	spin_lock_irq
	ldr	r3, .L7
	ldr	r5, [r4, #8]
	ldr	r3, [r3]
	ldr	r9, .L7+4
	bic	r5, r5, r3
	ldr	r1, [r9]
	str	r5, [r4, #8]
	mov	r0, r4
	bl	ES_REG
	mov	r1, r0
	mov	r0, r5
	bl	outl
	ldr	r3, .L7+8
	ldr	r0, [r3]
	bl	ES_MEM_PAGEO
	ldr	r3, .L7+12
	mov	r5, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	ES_REG
	mov	r1, r0
	mov	r0, r5
	bl	outl
	ldr	r3, .L7+16
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r5, [r6, #8]
	bl	ES_REG
	mov	r1, r0
	mov	r0, r5
	bl	outl
	ldr	r3, .L7+20
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r5, [r4]
	bl	ES_REG
	asr	r5, r5, #2
	sub	r5, r5, #1
	mov	r1, r0
	mov	r0, r5
	bl	outl
	ldr	r1, .L7+24
	ldr	r3, .L7+28
	ldr	r2, .L7+32
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, .L7+36
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r3, r3, r0
	orr	r3, r3, r2
	ldr	r2, [r4, #12]
	orr	r3, r3, r1
	bic	r3, r2, r3
	str	r3, [r4, #12]
	mov	r0, r7
	bl	ES_P1_MODEO
	ldr	r3, .L7+40
	ldr	r2, [r4, #12]
	ldr	r5, [r3]
	ldr	r3, .L7+44
	orr	r5, r5, r2
	orr	r5, r5, r0
	ldr	r1, [r3]
	str	r5, [r4, #12]
	mov	r0, r4
	bl	ES_REG
	mov	r1, r0
	mov	r0, r5
	bl	outl
	ldr	r3, .L7+48
	ldr	r2, .L7+52
	ldr	r3, [r3]
	ldr	r5, [r4, #4]
	ldr	r3, [r3, r7, lsl #2]
	ldr	r1, [r2]
	mov	r0, r4
	asr	r5, r5, r3
	bl	ES_REG
	sub	r5, r5, #1
	mov	r1, r0
	mov	r0, r5
	bl	outl
	ldr	r1, [r9]
	mov	r0, r4
	ldr	r5, [r4, #8]
	bl	ES_REG
	mov	r1, r0
	mov	r0, r5
	bl	outl
	mov	r0, r8
	bl	spin_unlock_irq
	mov	r0, r4
	ldr	r1, [r6, #4]
	bl	snd_es1371_dac1_rate
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	.align	2
.L7:
	.word	ES_DAC1_EN
	.word	CONTROL
	.word	ES_PAGE_DAC
	.word	MEM_PAGE
	.word	DAC1_FRAME
	.word	DAC1_SIZE
	.word	ES_P1_PAUSE
	.word	ES_P1_LOOP_SEL
	.word	ES_P1_SCT_RLD
	.word	ES_P1_MODEM
	.word	ES_P1_INT_EN
	.word	SERIAL
	.word	snd_ensoniq_sample_shift
	.word	DAC1_COUNT
	.size	snd_ensoniq_playback1_prepare, .-snd_ensoniq_playback1_prepare
	.comm	snd_ensoniq_sample_shift,4,4
	.comm	SERIAL,4,4
	.comm	MEM_PAGE,4,4
	.comm	ES_PAGE_DAC,4,4
	.comm	ES_P1_SCT_RLD,4,4
	.comm	ES_P1_PAUSE,4,4
	.comm	ES_P1_MODEM,4,4
	.comm	ES_P1_LOOP_SEL,4,4
	.comm	ES_P1_INT_EN,4,4
	.comm	ES_DAC1_EN,4,4
	.comm	ES_1373_BYPASS_P1,4,4
	.comm	ES_1370_WTSRSELM,4,4
	.comm	DAC1_SIZE,4,4
	.comm	DAC1_FRAME,4,4
	.comm	DAC1_COUNT,4,4
	.comm	CONTROL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
