	.file	"extr_ali5451.c_snd_ali_playback_hw_params.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ali_playback_hw_params, @function
snd_ali_playback_hw_params:
.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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	snd_pcm_substream_chip@PLT
	mov	rdi, rbp
	mov	r13, rax
	mov	rax, QWORD PTR [rbx]
	mov	r14, QWORD PTR [rax]
	mov	r15, QWORD PTR [r14]
	call	params_buffer_bytes@PLT
	mov	rdi, rbx
	mov	esi, eax
	call	snd_pcm_lib_malloc_pages@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	rdi, rbp
	call	params_buffer_size@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	params_period_size@PLT
	mov	r8d, eax
	mov	eax, r12d
	shr	eax, 31
	add	eax, r12d
	xor	r12d, r12d
	sar	eax
	cmp	eax, r8d
	je	.L3
	test	r15, r15
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L3:
	.cfi_restore_state
	test	r15, r15
	je	.L1
	mov	rsi, r15
	mov	rdi, r13
	call	snd_ali_free_voice@PLT
	mov	QWORD PTR [r14], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, DWORD PTR SNDRV_ALI_VOICE_TYPE_PCM[rip]
	xor	edx, edx
	mov	ecx, -1
	mov	rdi, r13
	call	snd_ali_alloc_voice@PLT
	test	rax, rax
	je	.L11
	mov	QWORD PTR [r14], rax
	mov	QWORD PTR 8[rax], rbx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	snd_ali_playback_hw_params, .-snd_ali_playback_hw_params
	.comm	SNDRV_ALI_VOICE_TYPE_PCM,4,4
	.comm	ENOMEM,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_ali5451.c_snd_ali_playback_hw_params.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ali_playback_hw_params, %function
snd_ali_playback_hw_params:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r4, r1
	bl	snd_pcm_substream_chip
	ldr	r3, [r5]
	mov	r6, r0
	ldr	r7, [r3]
	mov	r0, r4
	ldr	r8, [r7]
	bl	params_buffer_bytes
	mov	r1, r0
	mov	r0, r5
	bl	snd_pcm_lib_malloc_pages
	cmp	r0, #0
	poplt	{r4, r5, r6, r7, r8, pc}
	mov	r0, r4
	bl	params_buffer_size
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	params_period_size
	add	r4, r4, r4, lsr #31
	cmp	r0, r4, asr #1
	beq	.L3
	cmp	r8, #0
	beq	.L9
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	cmp	r8, #0
	beq	.L5
	mov	r1, r8
	mov	r0, r6
	bl	snd_ali_free_voice
	mov	r0, #0
	str	r0, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r3, .L10
	mov	r0, r6
	ldr	r1, [r3]
	mov	r2, r8
	mvn	r3, #0
	bl	snd_ali_alloc_voice
	subs	r3, r0, #0
	ldreq	r3, .L10+4
	strne	r3, [r7]
	ldreq	r0, [r3]
	strne	r5, [r3, #4]
	rsbeq	r0, r0, #0
	movne	r0, r8
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	.align	2
.L10:
	.word	SNDRV_ALI_VOICE_TYPE_PCM
	.word	ENOMEM
	.size	snd_ali_playback_hw_params, .-snd_ali_playback_hw_params
	.comm	SNDRV_ALI_VOICE_TYPE_PCM,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
