	.file	"extr_hdaa.c_hdaa_channel_stop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hdaa_channel_stop, @function
hdaa_channel_stop:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR [rdi]
	mov	eax, DWORD PTR HDAA_CHN_RUNNING[rip]
	test	edx, eax
	jne	.L21
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	not	eax
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	and	eax, edx
	xor	r13d, r13d
	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	r12, QWORD PTR 32[rdi]
	mov	rbx, rdi
	mov	DWORD PTR [rdi], eax
	mov	r14d, DWORD PTR 24[rdi]
	mov	ebp, DWORD PTR [r12]
	mov	rax, QWORD PTR PCMDIR_PLAY[rip]
	cmp	QWORD PTR 8[rdi], rax
	mov	edi, ebp
	sete	r13b
	call	device_get_parent@PLT
	mov	esi, ebp
	mov	ecx, r14d
	mov	edx, r13d
	mov	edi, eax
	call	HDAC_STREAM_STOP@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	esi, DWORD PTR [rax]
	cmp	esi, -1
	je	.L3
	xor	ebp, ebp
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 16[rbx]
	xor	edi, edi
	xor	edx, edx
	mov	esi, DWORD PTR [rax+rbp]
	call	HDA_CMD_SET_CONV_STREAM_CHAN@PLT
	mov	edi, DWORD PTR [r12]
	mov	esi, eax
	call	hda_command@PLT
.L4:
	mov	rax, QWORD PTR 16[rbx]
	add	rbp, 4
	mov	esi, DWORD PTR [rax+rbp]
	cmp	esi, -1
	je	.L3
.L6:
	mov	rdi, QWORD PTR 32[rbx]
	call	hdaa_widget_get@PLT
	test	rax, rax
	je	.L4
	mov	edi, DWORD PTR [rax]
	call	HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL@PLT
	test	rax, rax
	je	.L5
	mov	rax, QWORD PTR 16[rbx]
	xor	edi, edi
	xor	edx, edx
	mov	esi, DWORD PTR [rax+rbp]
	call	HDA_CMD_SET_DIGITAL_CONV_FMT1@PLT
	mov	edi, DWORD PTR [r12]
	mov	esi, eax
	call	hda_command@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	ebp, DWORD PTR [r12]
	mov	r14d, DWORD PTR 24[rbx]
	xor	r13d, r13d
	mov	rax, QWORD PTR PCMDIR_PLAY[rip]
	cmp	QWORD PTR 8[rbx], rax
	mov	edi, ebp
	sete	r13b
	call	device_get_parent@PLT
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	mov	ecx, r14d
	mov	edx, r13d
	mov	esi, ebp
	mov	edi, eax
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	HDAC_STREAM_FREE@PLT
	.cfi_endproc
.LFE0:
	.size	hdaa_channel_stop, .-hdaa_channel_stop
	.comm	PCMDIR_PLAY,8,8
	.comm	HDAA_CHN_RUNNING,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_hdaa.c_hdaa_channel_stop.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hdaa_channel_stop, %function
hdaa_channel_stop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L21
	ldr	r3, [r0]
	ldr	r2, [r2]
	tst	r3, r2
	bxeq	lr
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r6, [r0, #16]
	bic	r3, r3, r2
	ldr	r7, .L21+4
	str	r3, [r0]
	ldr	r0, [r6]
	bl	device_get_parent
	ldr	r3, [r7]
	ldr	r2, [r4, #4]
	ldr	r1, [r6]
	sub	r2, r2, r3
	clz	r2, r2
	ldr	r3, [r4, #12]
	lsr	r2, r2, #5
	bl	HDAC_STREAM_STOP
	ldr	r3, [r4, #8]
	ldr	r1, [r3]
	cmn	r1, #1
	beq	.L3
	mov	r5, #0
	b	.L6
.L5:
	mov	r2, #0
	ldr	r3, [r4, #8]
	mov	r0, r2
	ldr	r1, [r3, r5]
	ldr	r8, [r6]
	bl	HDA_CMD_SET_CONV_STREAM_CHAN
	mov	r1, r0
	mov	r0, r8
	bl	hda_command
.L4:
	ldr	r3, [r4, #8]
	add	r5, r5, #4
	ldr	r1, [r3, r5]
	cmn	r1, #1
	beq	.L3
.L6:
	ldr	r0, [r4, #16]
	bl	hdaa_widget_get
	cmp	r0, #0
	beq	.L4
	ldr	r0, [r0]
	bl	HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL
	cmp	r0, #0
	beq	.L5
	mov	r2, #0
	ldr	r3, [r4, #8]
	mov	r0, r2
	ldr	r1, [r3, r5]
	ldr	r8, [r6]
	bl	HDA_CMD_SET_DIGITAL_CONV_FMT1
	mov	r1, r0
	mov	r0, r8
	bl	hda_command
	b	.L5
.L3:
	ldr	r0, [r6]
	bl	device_get_parent
	ldr	r3, [r7]
	ldr	r2, [r4, #4]
	ldr	r1, [r6]
	sub	r2, r2, r3
	clz	r2, r2
	ldr	r3, [r4, #12]
	lsr	r2, r2, #5
	pop	{r4, r5, r6, r7, r8, lr}
	b	HDAC_STREAM_FREE
.L22:
	.align	2
.L21:
	.word	HDAA_CHN_RUNNING
	.word	PCMDIR_PLAY
	.size	hdaa_channel_stop, .-hdaa_channel_stop
	.comm	PCMDIR_PLAY,4,4
	.comm	HDAA_CHN_RUNNING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
