	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function output_switch_put
_output_switch_put:                     ## @output_switch_put
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	cmpl	$3, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movq	8(%r14), %r13
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	cmpl	(%r13), %eax
	setne	%r12b
	je	LBB0_11
## %bb.3:
	movl	%eax, (%r13)
	movq	8(%r13), %rcx
	movq	_CS4245_SIGNAL_SEL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	_CS4245_A_OUT_SEL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	(%rcx,%rsi,4), %edx
	cmpl	$2, %eax
	jne	LBB0_4
## %bb.5:
	movq	_CS4245_A_OUT_SEL_DAC@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_CS4245_A_OUT_SEL_HIZ@GOTPCREL(%rip), %rax
LBB0_6:
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_cs4245_write_cached
	movq	_CS4245_DAC_A_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%r15d, %r15d
	cmpl	$0, (%r13)
	movl	$0, %edx
	je	LBB0_8
## %bb.7:
	movl	16(%r13), %edx
LBB0_8:
	movq	%r14, %rdi
	callq	_cs4245_write_cached
	movq	_CS4245_DAC_B_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpl	$0, (%r13)
	je	LBB0_10
## %bb.9:
	movl	16(%r13), %r15d
LBB0_10:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_cs4245_write_cached
	movq	_OXYGEN_GPIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$1, (%r13)
	movq	_GPIO_HP_REAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmovel	%ecx, %edx
	movq	%r14, %rdi
	callq	_oxygen_write16_masked
LBB0_11:
	movb	%r12b, %bl
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CS4245_SIGNAL_SEL,8,3          ## @CS4245_SIGNAL_SEL
	.comm	_CS4245_A_OUT_SEL_MASK,4,2      ## @CS4245_A_OUT_SEL_MASK
	.comm	_CS4245_A_OUT_SEL_DAC,4,2       ## @CS4245_A_OUT_SEL_DAC
	.comm	_CS4245_A_OUT_SEL_HIZ,4,2       ## @CS4245_A_OUT_SEL_HIZ
	.comm	_CS4245_DAC_A_CTRL,8,3          ## @CS4245_DAC_A_CTRL
	.comm	_CS4245_DAC_B_CTRL,8,3          ## @CS4245_DAC_B_CTRL
	.comm	_OXYGEN_GPIO_DATA,4,2           ## @OXYGEN_GPIO_DATA
	.comm	_GPIO_HP_REAR,4,2               ## @GPIO_HP_REAR
	.no_dead_strip	_output_switch_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function output_switch_put
_output_switch_put:                     ; @output_switch_put
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x1]
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_2:
	mov	x20, x1
	ldr	x19, [x0]
	ldr	x21, [x19, #8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x21]
	cmp	w8, w9
	cset	w20, ne
	b.eq	LBB0_10
; %bb.3:
	str	w8, [x21]
	ldr	x9, [x21, #8]
Lloh3:
	adrp	x10, _CS4245_SIGNAL_SEL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CS4245_SIGNAL_SEL@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x10]
	ldr	w9, [x9, x1, lsl #2]
Lloh6:
	adrp	x10, _CS4245_A_OUT_SEL_MASK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CS4245_A_OUT_SEL_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	bic	w9, w9, w10
Lloh9:
	adrp	x10, _CS4245_A_OUT_SEL_DAC@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CS4245_A_OUT_SEL_DAC@GOTPAGEOFF]
Lloh11:
	adrp	x11, _CS4245_A_OUT_SEL_HIZ@GOTPAGE
Lloh12:
	ldr	x11, [x11, _CS4245_A_OUT_SEL_HIZ@GOTPAGEOFF]
	cmp	w8, #2
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_cs4245_write_cached
Lloh13:
	adrp	x8, _CS4245_DAC_A_CTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CS4245_DAC_A_CTRL@GOTPAGEOFF]
Lloh15:
	ldr	x1, [x8]
	ldr	w8, [x21]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	w2, [x21, #16]
	b	LBB0_6
LBB0_5:
	mov	w2, #0
LBB0_6:
	mov	x0, x19
	bl	_cs4245_write_cached
Lloh16:
	adrp	x8, _CS4245_DAC_B_CTRL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CS4245_DAC_B_CTRL@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	ldr	w8, [x21]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w2, [x21, #16]
	b	LBB0_9
LBB0_8:
	mov	w2, #0
LBB0_9:
	mov	x0, x19
	bl	_cs4245_write_cached
Lloh19:
	adrp	x8, _OXYGEN_GPIO_DATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OXYGEN_GPIO_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w8, [x21]
Lloh22:
	adrp	x9, _GPIO_HP_REAR@GOTPAGE
Lloh23:
	ldr	x9, [x9, _GPIO_HP_REAR@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x9]
	cmp	w8, #1
	csel	w2, w3, wzr, eq
	mov	x0, x19
	bl	_oxygen_write16_masked
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CS4245_SIGNAL_SEL,8,3          ; @CS4245_SIGNAL_SEL
	.comm	_CS4245_A_OUT_SEL_MASK,4,2      ; @CS4245_A_OUT_SEL_MASK
	.comm	_CS4245_A_OUT_SEL_DAC,4,2       ; @CS4245_A_OUT_SEL_DAC
	.comm	_CS4245_A_OUT_SEL_HIZ,4,2       ; @CS4245_A_OUT_SEL_HIZ
	.comm	_CS4245_DAC_A_CTRL,8,3          ; @CS4245_DAC_A_CTRL
	.comm	_CS4245_DAC_B_CTRL,8,3          ; @CS4245_DAC_B_CTRL
	.comm	_OXYGEN_GPIO_DATA,4,2           ; @OXYGEN_GPIO_DATA
	.comm	_GPIO_HP_REAR,4,2               ; @GPIO_HP_REAR
	.no_dead_strip	_output_switch_put
.subsections_via_symbols
