	.file	"extr_emupcm.c_snd_emu10k1_playback_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_emu10k1_playback_prepare, @function
snd_emu10k1_playback_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
	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
	mov	rbx, rdi
	call	snd_pcm_substream_chip@PLT
	mov	r14, QWORD PTR 8[rbx]
	mov	rdi, rbx
	mov	rbp, rax
	mov	r12, QWORD PTR 8[r14]
	mov	r13d, DWORD PTR [r12]
	call	snd_pcm_lib_period_bytes@PLT
	cmp	DWORD PTR [r14], 2
	jne	.L2
	shr	r13d
	shr	eax
.L2:
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rcx, QWORD PTR 16[r12]
	mov	r8d, r13d
	mov	rdi, rbp
	push	0
	.cfi_def_cfa_offset 64
	lea	r9d, 0[r13+rax]
	mov	edx, 1
	mov	esi, 1
	call	snd_emu10k1_pcm_init_voice@PLT
	mov	r14d, DWORD PTR [r12]
	mov	rdi, rbx
	call	snd_pcm_lib_buffer_bytes@PLT
	mov	rcx, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 0[rbp]
	mov	rdi, rbp
	lea	r13d, [rax+r14]
	mov	rax, QWORD PTR 8[r12]
	mov	esi, 1
	mov	r8d, r14d
	lea	rdx, [rdx+rcx*4]
	mov	r9d, r13d
	mov	rcx, QWORD PTR [rax]
	mov	QWORD PTR [rsp], rdx
	xor	edx, edx
	call	snd_emu10k1_pcm_init_voice@PLT
	mov	rax, QWORD PTR 8[r12]
	pop	rsi
	.cfi_def_cfa_offset 56
	pop	rdi
	.cfi_def_cfa_offset 48
	mov	rcx, QWORD PTR 8[rax]
	test	rcx, rcx
	jne	.L9
	pop	rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR 0[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	r9d, r13d
	mov	r8d, r14d
	mov	rdi, rbp
	xor	esi, esi
	lea	rax, [rax+rdx*4]
	xor	edx, edx
	push	rax
	.cfi_def_cfa_offset 64
	call	snd_emu10k1_pcm_init_voice@PLT
	pop	rax
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rdx
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	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_emu10k1_playback_prepare, .-snd_emu10k1_playback_prepare
	.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_emupcm.c_snd_emu10k1_playback_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_emu10k1_playback_prepare, %function
snd_emu10k1_playback_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	sub	sp, sp, #20
	bl	snd_pcm_substream_chip
	ldr	r8, [r4, #4]
	mov	r5, r0
	ldr	r6, [r8, #4]
	mov	r0, r4
	ldr	r7, [r6]
	bl	snd_pcm_lib_period_bytes
	ldr	r3, [r8]
	mov	r2, #1
	mov	r8, #0
	cmp	r3, #2
	lsreq	r7, r7, #1
	lsreq	r0, r0, #1
	add	r1, r7, r0
	ldr	r3, [r6, #8]
	mov	r0, r5
	str	r1, [sp, #4]
	str	r7, [sp]
	mov	r1, r2
	str	r8, [sp, #8]
	bl	snd_emu10k1_pcm_init_voice
	mov	r0, r4
	ldr	r9, [r6]
	bl	snd_pcm_lib_buffer_bytes
	ldr	r1, [r4]
	ldr	r2, [r5]
	ldr	r3, [r6, #4]
	add	r2, r2, r1, lsl #2
	add	r7, r0, r9
	ldr	r3, [r3]
	mov	r1, #1
	str	r2, [sp, #8]
	mov	r0, r5
	mov	r2, r8
	str	r7, [sp, #4]
	str	r9, [sp]
	bl	snd_emu10k1_pcm_init_voice
	ldr	r3, [r6, #4]
	ldr	r3, [r3, #4]
	cmp	r3, r8
	bne	.L9
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L9:
	ldr	r1, [r4]
	ldr	r2, [r5]
	mov	r0, r5
	add	r2, r2, r1, lsl #2
	str	r2, [sp, #8]
	mov	r1, r8
	mov	r2, r8
	str	r7, [sp, #4]
	str	r9, [sp]
	bl	snd_emu10k1_pcm_init_voice
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
	.size	snd_emu10k1_playback_prepare, .-snd_emu10k1_playback_prepare
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
