	.file	"extr_cs47l92.c_cs47l92_put_demux.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to read outputs: %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Failed to disable outputs: %d\n"
	.section	.rodata.str1.1
.LC2:
	.string	"Failed to set OUT3 demux: %d\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"Failed to set output mode: %d\n"
	.align 8
.LC4:
	.string	"Failed to restore outputs: %d\n"
	.text
	.p2align 4
	.type	cs47l92_put_demux, @function
cs47l92_put_demux:
.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	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	snd_soc_dapm_kcontrol_component@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	snd_soc_component_get_dapm@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	snd_soc_component_get_drvdata@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	r15, QWORD PTR [r12]
	mov	r14d, DWORD PTR [rdx]
	cmp	DWORD PTR [r15], r14d
	jg	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L23
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L2:
	.cfi_restore_state
	mov	rdi, r13
	mov	rbx, QWORD PTR [rax]
	call	snd_soc_dapm_mutex_lock@PLT
	mov	ecx, DWORD PTR 4[r15]
	mov	eax, r14d
	mov	rdi, rbp
	mov	edx, DWORD PTR MADERA_EP_SEL_MASK[rip]
	mov	esi, DWORD PTR MADERA_OUTPUT_ENABLES_1[rip]
	sal	eax, cl
	mov	ecx, eax
	mov	DWORD PTR 12[rsp], eax
	call	snd_soc_component_test_bits@PLT
	test	eax, eax
	je	.L4
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR MADERA_OUTPUT_ENABLES_1[rip]
	lea	rdx, 20[rsp]
	call	regmap_read@PLT
	test	eax, eax
	jne	.L24
.L5:
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR MADERA_OUTPUT_ENABLES_1[rip]
	xor	ecx, ecx
	mov	edx, DWORD PTR MADERA_OUT3L_ENA[rip]
	or	edx, DWORD PTR MADERA_OUT3R_ENA[rip]
	call	regmap_update_bits@PLT
	test	eax, eax
	jne	.L25
.L6:
	mov	esi, 3000
	mov	edi, 2000
	call	usleep_range@PLT
	mov	edx, DWORD PTR MADERA_EP_SEL[rip]
	mov	edi, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR MADERA_OUTPUT_ENABLES_1[rip]
	call	regmap_update_bits@PLT
	mov	edx, eax
	test	eax, eax
	jne	.L26
	mov	rdx, QWORD PTR 8[rbx]
	lea	eax, 2[r14]
	mov	esi, 3
	mov	rdi, rbp
	mov	edx, DWORD PTR [rdx+rax*4]
	call	madera_set_output_mode@PLT
	test	eax, eax
	js	.L27
.L8:
	mov	edi, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR 20[rsp]
	mov	esi, DWORD PTR MADERA_OUTPUT_ENABLES_1[rip]
	mov	edx, DWORD PTR MADERA_OUT3L_ENA[rip]
	or	edx, DWORD PTR MADERA_OUT3R_ENA[rip]
	call	regmap_update_bits@PLT
	test	eax, eax
	jne	.L28
	mov	eax, DWORD PTR MADERA_OUT3L_ENA[rip]
	or	eax, DWORD PTR MADERA_OUT3R_ENA[rip]
	test	DWORD PTR 20[rsp], eax
	je	.L10
	mov	edi, 34
	call	msleep@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r13
	call	snd_soc_dapm_mutex_unlock@PLT
	xor	r8d, r8d
	mov	rcx, r15
	mov	edx, r14d
	mov	rsi, r12
	mov	rdi, r13
	call	snd_soc_dapm_mux_update_power@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR [rbx]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	call	dev_warn@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR [rbx]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, 3000
	mov	edi, 2000
	call	usleep_range@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR [rbx]
	mov	edx, eax
	lea	rsi, .LC4[rip]
	call	dev_warn@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR [rbx]
	mov	edx, eax
	lea	rsi, .LC3[rip]
	call	dev_warn@PLT
	jmp	.L8
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cs47l92_put_demux, .-cs47l92_put_demux
	.comm	MADERA_OUTPUT_ENABLES_1,4,4
	.comm	MADERA_OUT3R_ENA,4,4
	.comm	MADERA_OUT3L_ENA,4,4
	.comm	MADERA_EP_SEL_MASK,4,4
	.comm	MADERA_EP_SEL,4,4
	.comm	EINVAL,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_cs47l92.c_cs47l92_put_demux.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to read outputs: %d\012\000"
	.align	2
.LC1:
	.ascii	"Failed to disable outputs: %d\012\000"
	.align	2
.LC2:
	.ascii	"Failed to set OUT3 demux: %d\012\000"
	.align	2
.LC3:
	.ascii	"Failed to set output mode: %d\012\000"
	.align	2
.LC4:
	.ascii	"Failed to restore outputs: %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cs47l92_put_demux, %function
cs47l92_put_demux:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L29
	sub	sp, sp, #20
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	snd_soc_dapm_kcontrol_component
	mov	r4, r0
	bl	snd_soc_component_get_dapm
	mov	r6, r0
	mov	r0, r4
	bl	snd_soc_component_get_drvdata
	ldr	r3, [r7]
	ldr	r8, [r5]
	ldr	r7, [r3]
	ldr	r2, [r8]
	cmp	r2, r7
	bgt	.L2
	ldr	r3, .L29+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L29
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r3, r0
	mov	r0, r6
	ldr	r10, [r3]
	bl	snd_soc_dapm_mutex_lock
	ldr	r9, [r8, #4]
	ldr	r2, .L29+8
	ldr	fp, .L29+12
	lsl	r9, r7, r9
	mov	r3, r9
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [fp]
	bl	snd_soc_component_test_bits
	cmp	r0, #0
	beq	.L4
	add	r2, sp, #8
	ldr	r1, [fp]
	ldr	r0, [r10, #4]
	bl	regmap_read
	subs	r2, r0, #0
	bne	.L24
.L5:
	ldr	r3, .L29+16
	ldr	r0, [r10, #4]
	ldr	r1, [r3]
	ldr	r3, .L29+20
	ldr	r2, [r3]
	mov	r3, #0
	orr	r2, r1, r2
	ldr	r1, [fp]
	bl	regmap_update_bits
	subs	r2, r0, #0
	bne	.L25
.L6:
	ldr	r1, .L29+24
	mov	r0, #2000
	bl	usleep_range
	ldr	r2, .L29+28
	mov	r3, r9
	ldr	r2, [r2]
	ldr	r1, [fp]
	ldr	r0, [r10, #4]
	bl	regmap_update_bits
	subs	r2, r0, #0
	bne	.L26
	ldr	r2, [r10, #8]
	add	r3, r7, #2
	ldr	r2, [r2, r3, lsl #2]
	mov	r0, r4
	mov	r1, #3
	bl	madera_set_output_mode
	subs	r2, r0, #0
	blt	.L27
.L8:
	ldr	r3, .L29+16
	ldr	r1, [fp]
	ldr	r2, [r3]
	ldr	r3, .L29+20
	ldr	r0, [r10, #4]
	ldr	r3, [r3]
	orr	r2, r2, r3
	ldr	r3, [sp, #8]
	bl	regmap_update_bits
	subs	r2, r0, #0
	bne	.L28
	ldr	r2, .L29+20
	ldr	r3, .L29+16
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [sp, #8]
	orr	r3, r3, r1
	tst	r3, r2
	beq	.L10
	mov	r0, #34
	bl	msleep
.L4:
	mov	r0, r6
	bl	snd_soc_dapm_mutex_unlock
	mov	ip, #0
	mov	r3, r8
	mov	r2, r7
	mov	r1, r5
	mov	r0, r6
	str	ip, [sp]
	bl	snd_soc_dapm_mux_update_power
	b	.L1
.L26:
	ldr	r1, .L29+32
	ldr	r0, [r10]
	bl	dev_err
	b	.L8
.L25:
	ldr	r1, .L29+36
	ldr	r0, [r10]
	bl	dev_warn
	b	.L6
.L24:
	ldr	r1, .L29+40
	ldr	r0, [r10]
	bl	dev_warn
	b	.L5
.L10:
	ldr	r1, .L29+24
	mov	r0, #2000
	bl	usleep_range
	b	.L4
.L28:
	ldr	r0, [r10]
	ldr	r1, .L29+44
	bl	dev_warn
	b	.L4
.L27:
	ldr	r1, .L29+48
	ldr	r0, [r10]
	bl	dev_warn
	b	.L8
.L23:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	.LC5
	.word	EINVAL
	.word	MADERA_EP_SEL_MASK
	.word	MADERA_OUTPUT_ENABLES_1
	.word	MADERA_OUT3L_ENA
	.word	MADERA_OUT3R_ENA
	.word	3000
	.word	MADERA_EP_SEL
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	.LC4
	.word	.LC3
	.size	cs47l92_put_demux, .-cs47l92_put_demux
	.comm	MADERA_OUTPUT_ENABLES_1,4,4
	.comm	MADERA_OUT3R_ENA,4,4
	.comm	MADERA_OUT3L_ENA,4,4
	.comm	MADERA_EP_SEL_MASK,4,4
	.comm	MADERA_EP_SEL,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
