	.file	"extr_xonar_dg.c_output_switch_put.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	output_switch_put, @function
output_switch_put:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR [rsi]
	cmp	DWORD PTR [rax], 2
	jle	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rbp, QWORD PTR [rdi]
	mov	rbx, rsi
	xor	r12d, r12d
	mov	rdi, rbp
	mov	r13, QWORD PTR 8[rbp]
	call	mutex_lock@PLT
	mov	rax, QWORD PTR [rbx]
	mov	edx, DWORD PTR 0[r13]
	mov	eax, DWORD PTR [rax]
	cmp	eax, edx
	setne	r12b
	je	.L4
	mov	rcx, QWORD PTR 8[r13]
	mov	rsi, QWORD PTR CS4245_SIGNAL_SEL[rip]
	mov	DWORD PTR 0[r13], eax
	mov	rdi, rbp
	mov	edx, DWORD PTR CS4245_A_OUT_SEL_MASK[rip]
	not	edx
	and	edx, DWORD PTR [rcx+rsi*4]
	cmp	eax, 2
	mov	eax, DWORD PTR CS4245_A_OUT_SEL_DAC[rip]
	cmovne	eax, DWORD PTR CS4245_A_OUT_SEL_HIZ[rip]
	mov	ecx, edx
	mov	edx, eax
	or	edx, ecx
	call	cs4245_write_cached@PLT
	mov	edx, DWORD PTR 0[r13]
	test	edx, edx
	je	.L7
	mov	edx, DWORD PTR 16[r13]
.L7:
	mov	rsi, QWORD PTR CS4245_DAC_A_CTRL[rip]
	mov	rdi, rbp
	call	cs4245_write_cached@PLT
	mov	edx, DWORD PTR 0[r13]
	test	edx, edx
	jne	.L19
.L8:
	mov	rsi, QWORD PTR CS4245_DAC_B_CTRL[rip]
	mov	rdi, rbp
	call	cs4245_write_cached@PLT
	mov	ecx, DWORD PTR GPIO_HP_REAR[rip]
	cmp	DWORD PTR 0[r13], 1
	mov	edx, 0
	mov	esi, DWORD PTR OXYGEN_GPIO_DATA[rip]
	mov	rdi, rbp
	cmove	edx, ecx
	call	oxygen_write16_masked@PLT
.L4:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edx, DWORD PTR 16[r13]
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	output_switch_put, .-output_switch_put
	.comm	OXYGEN_GPIO_DATA,4,4
	.comm	GPIO_HP_REAR,4,4
	.comm	EINVAL,4,4
	.comm	CS4245_SIGNAL_SEL,8,8
	.comm	CS4245_DAC_B_CTRL,8,8
	.comm	CS4245_DAC_A_CTRL,8,8
	.comm	CS4245_A_OUT_SEL_MASK,4,4
	.comm	CS4245_A_OUT_SEL_HIZ,4,4
	.comm	CS4245_A_OUT_SEL_DAC,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_xonar_dg.c_output_switch_put.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	output_switch_put, %function
output_switch_put:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1]
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	cmp	r3, #2
	ble	.L2
	ldr	r3, .L19
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	mov	r4, r1
	ldr	r5, [r0]
	mov	r0, r5
	ldr	r6, [r5, #4]
	bl	mutex_lock
	ldr	r3, [r4]
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r3, r2
	movne	r4, #1
	moveq	r4, #0
	beq	.L4
	ldr	r1, .L19+4
	ldr	r2, [r6, #4]
	ldr	r1, [r1]
	ldr	r0, .L19+8
	str	r3, [r6]
	ldr	r2, [r2, r1, lsl #2]
	ldr	r0, [r0]
	cmp	r3, #2
	bic	r0, r2, r0
	ldreq	r2, .L19+12
	ldrne	r2, .L19+16
	ldr	r2, [r2]
	orr	r2, r2, r0
	mov	r0, r5
	bl	cs4245_write_cached
	ldr	r2, [r6]
	ldr	r3, .L19+20
	cmp	r2, #0
	ldr	r1, [r3]
	ldrne	r2, [r6, #8]
	mov	r0, r5
	bl	cs4245_write_cached
	ldr	r2, [r6]
	ldr	r3, .L19+24
	cmp	r2, #0
	ldr	r1, [r3]
	ldrne	r2, [r6, #8]
	mov	r0, r5
	bl	cs4245_write_cached
	ldr	r3, .L19+28
	ldr	r2, [r6]
	ldr	r1, [r3]
	ldr	r3, .L19+32
	cmp	r2, #1
	ldreq	r2, [r3]
	movne	r2, #0
	moveq	r3, r2
	mov	r0, r5
	ldrne	r3, [r3]
	bl	oxygen_write16_masked
.L4:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L20:
	.align	2
.L19:
	.word	EINVAL
	.word	CS4245_SIGNAL_SEL
	.word	CS4245_A_OUT_SEL_MASK
	.word	CS4245_A_OUT_SEL_DAC
	.word	CS4245_A_OUT_SEL_HIZ
	.word	CS4245_DAC_A_CTRL
	.word	CS4245_DAC_B_CTRL
	.word	OXYGEN_GPIO_DATA
	.word	GPIO_HP_REAR
	.size	output_switch_put, .-output_switch_put
	.comm	OXYGEN_GPIO_DATA,4,4
	.comm	GPIO_HP_REAR,4,4
	.comm	EINVAL,4,4
	.comm	CS4245_SIGNAL_SEL,4,4
	.comm	CS4245_DAC_B_CTRL,4,4
	.comm	CS4245_DAC_A_CTRL,4,4
	.comm	CS4245_A_OUT_SEL_MASK,4,4
	.comm	CS4245_A_OUT_SEL_HIZ,4,4
	.comm	CS4245_A_OUT_SEL_DAC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
