	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function input_sel_put
_input_sel_put:                         ## @input_sel_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	cmpl	$4, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movq	8(%r14), %r12
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movslq	(%rax), %rax
	xorl	%ebx, %ebx
	cmpq	%rax, (%r12)
	setne	%r15b
	je	LBB0_4
## %bb.3:
	movq	%rax, (%r12)
	movq	_CS4245_ANALOG_IN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	8(%r12), %rcx
	movq	_CS4245_SEL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	(%rcx,%rsi,4), %edx
	leaq	_input_sel_put.sel_values(%rip), %rcx
	orl	(%rcx,%rax,4), %edx
	movq	%r14, %rdi
	callq	_cs4245_write
	movq	_CS4245_PGA_A_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	movq	16(%r12), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_cs4245_write_cached
	movq	_CS4245_PGA_B_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	movq	16(%r12), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	4(%rax), %edx
	movq	%r14, %rdi
	callq	_cs4245_write_cached
	movq	_OXYGEN_GPIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpq	$0, (%r12)
	movq	_GPIO_INPUT_ROUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmovel	%ecx, %edx
	movq	%r14, %rdi
	callq	_oxygen_write16_masked
LBB0_4:
	movb	%r15b, %bl
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @input_sel_put.sel_values
_input_sel_put.sel_values:
	.long	128                             ## 0x80
	.long	131                             ## 0x83
	.long	130                             ## 0x82
	.long	129                             ## 0x81

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CS4245_ANALOG_IN,8,3           ## @CS4245_ANALOG_IN
	.comm	_CS4245_SEL_MASK,4,2            ## @CS4245_SEL_MASK
	.comm	_CS4245_PGA_A_CTRL,4,2          ## @CS4245_PGA_A_CTRL
	.comm	_CS4245_PGA_B_CTRL,4,2          ## @CS4245_PGA_B_CTRL
	.comm	_OXYGEN_GPIO_DATA,4,2           ## @OXYGEN_GPIO_DATA
	.comm	_GPIO_INPUT_ROUTE,4,2           ## @GPIO_INPUT_ROUTE
	.no_dead_strip	_input_sel_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function input_sel_put
_input_sel_put:                         ; @input_sel_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, #4
	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_5
LBB0_2:
	mov	x20, x1
	ldr	x19, [x0]
	ldr	x21, [x19, #8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
	ldrsw	x8, [x8]
	ldr	x9, [x21]
	cmp	x9, x8
	cset	w20, ne
	b.eq	LBB0_4
; %bb.3:
	str	x8, [x21]
Lloh3:
	adrp	x9, _CS4245_ANALOG_IN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CS4245_ANALOG_IN@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x9]
	ldr	x9, [x21, #8]
	ldr	w9, [x9, x1, lsl #2]
Lloh6:
	adrp	x10, _CS4245_SEL_MASK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CS4245_SEL_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	bic	w9, w9, w10
Lloh9:
	adrp	x10, _input_sel_put.sel_values@PAGE
Lloh10:
	add	x10, x10, _input_sel_put.sel_values@PAGEOFF
	ldr	w8, [x10, x8, lsl #2]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_cs4245_write
Lloh11:
	adrp	x8, _CS4245_PGA_A_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CS4245_PGA_A_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x8, [x21, #16]
	ldr	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_cs4245_write_cached
Lloh14:
	adrp	x8, _CS4245_PGA_B_CTRL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CS4245_PGA_B_CTRL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x8, [x21, #16]
	ldr	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_cs4245_write_cached
Lloh17:
	adrp	x8, _OXYGEN_GPIO_DATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OXYGEN_GPIO_DATA@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	x8, [x21]
Lloh20:
	adrp	x9, _GPIO_INPUT_ROUTE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _GPIO_INPUT_ROUTE@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x9]
	cmp	x8, #0
	csel	w2, w3, wzr, eq
	mov	x0, x19
	bl	_oxygen_write16_masked
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_5:
	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	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @input_sel_put.sel_values
_input_sel_put.sel_values:
	.long	128                             ; 0x80
	.long	131                             ; 0x83
	.long	130                             ; 0x82
	.long	129                             ; 0x81

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CS4245_ANALOG_IN,8,3           ; @CS4245_ANALOG_IN
	.comm	_CS4245_SEL_MASK,4,2            ; @CS4245_SEL_MASK
	.comm	_CS4245_PGA_A_CTRL,4,2          ; @CS4245_PGA_A_CTRL
	.comm	_CS4245_PGA_B_CTRL,4,2          ; @CS4245_PGA_B_CTRL
	.comm	_OXYGEN_GPIO_DATA,4,2           ; @OXYGEN_GPIO_DATA
	.comm	_GPIO_INPUT_ROUTE,4,2           ; @GPIO_INPUT_ROUTE
	.no_dead_strip	_input_sel_put
.subsections_via_symbols
