	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_adc_input_select
_hw_adc_input_select:                   ## @hw_adc_input_select
	.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
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_GPIO_DATA@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_hw_read_20kx
	cmpl	$129, %ebx
	je	LBB0_3
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_5
## %bb.2:
	orl	$16384, %eax                    ## imm = 0x4000
	movl	$231, %r14d
	movl	$257, %r15d                     ## imm = 0x101
	jmp	LBB0_4
LBB0_3:
	andl	$-16385, %eax                   ## imm = 0xBFFF
	movl	$207, %r14d
	movl	$258, %r15d                     ## imm = 0x102
LBB0_4:
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_hw_write_20kx
	movq	_WM8775_ADCMC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_MAKE_WM8775_ADDR
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_MAKE_WM8775_DATA
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_hw20k2_i2c_write
	movq	_WM8775_AADCL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_MAKE_WM8775_ADDR
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_MAKE_WM8775_DATA
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_hw20k2_i2c_write
	movq	_WM8775_AADCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_MAKE_WM8775_ADDR
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_MAKE_WM8775_DATA
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_hw20k2_i2c_write
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPIO_DATA,4,2                  ## @GPIO_DATA
	.comm	_WM8775_ADCMC,4,2               ## @WM8775_ADCMC
	.comm	_WM8775_AADCL,4,2               ## @WM8775_AADCL
	.comm	_WM8775_AADCR,4,2               ## @WM8775_AADCR
	.no_dead_strip	_hw_adc_input_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_adc_input_select
_hw_adc_input_select:                   ; @hw_adc_input_select
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _GPIO_DATA@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GPIO_DATA@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_hw_read_20kx
	cmp	w20, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w20, #128
	b.ne	LBB0_5
; %bb.2:
	orr	w2, w0, #0x4000
	mov	w20, #231
	mov	w21, #257
	b	LBB0_4
LBB0_3:
	and	w2, w0, #0xffffbfff
	mov	w20, #207
	mov	w21, #258
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hw_write_20kx
Lloh2:
	adrp	x8, _WM8775_ADCMC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WM8775_ADCMC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_MAKE_WM8775_ADDR
	mov	x22, x0
	mov	x0, x21
	bl	_MAKE_WM8775_DATA
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_hw20k2_i2c_write
Lloh5:
	adrp	x8, _WM8775_AADCL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WM8775_AADCL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_MAKE_WM8775_ADDR
	mov	x21, x0
	mov	x0, x20
	bl	_MAKE_WM8775_DATA
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_hw20k2_i2c_write
Lloh8:
	adrp	x8, _WM8775_AADCR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WM8775_AADCR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_MAKE_WM8775_ADDR
	mov	x21, x0
	mov	x0, x20
	bl	_MAKE_WM8775_DATA
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_hw20k2_i2c_write
LBB0_5:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GPIO_DATA,4,2                  ; @GPIO_DATA
	.comm	_WM8775_ADCMC,4,2               ; @WM8775_ADCMC
	.comm	_WM8775_AADCL,4,2               ; @WM8775_AADCL
	.comm	_WM8775_AADCR,4,2               ; @WM8775_AADCR
	.no_dead_strip	_hw_adc_input_select
.subsections_via_symbols
