	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aic3x_set_headset_detection    ## -- Begin function aic3x_set_headset_detection
	.p2align	4, 0x90
_aic3x_set_headset_detection:           ## @aic3x_set_headset_detection
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%ecx, %eax
	movq	_AIC3X_HEADSET_DETECT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	movq	_AIC3X_HEADSET_DETECT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%esi, %r8d
	shll	%cl, %r8d
	movq	_AIC3X_HEADSET_DEBOUNCE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	movq	_AIC3X_HEADSET_DEBOUNCE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_AIC3X_BUTTON_DEBOUNCE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_AIC3X_BUTTON_DEBOUNCE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%r8d, %edx
	orl	%edx, %eax
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_AIC3X_HEADSET_DETECT_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_2:
	orl	%esi, %eax
	movq	_AIC3X_HEADSET_DETECT_CTRL_A@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edx
	popq	%rbp
	jmp	_aic3x_write                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AIC3X_HEADSET_DETECT_MASK,4,2  ## @AIC3X_HEADSET_DETECT_MASK
	.comm	_AIC3X_HEADSET_DETECT_SHIFT,4,2 ## @AIC3X_HEADSET_DETECT_SHIFT
	.comm	_AIC3X_HEADSET_DEBOUNCE_MASK,4,2 ## @AIC3X_HEADSET_DEBOUNCE_MASK
	.comm	_AIC3X_HEADSET_DEBOUNCE_SHIFT,4,2 ## @AIC3X_HEADSET_DEBOUNCE_SHIFT
	.comm	_AIC3X_BUTTON_DEBOUNCE_MASK,4,2 ## @AIC3X_BUTTON_DEBOUNCE_MASK
	.comm	_AIC3X_BUTTON_DEBOUNCE_SHIFT,4,2 ## @AIC3X_BUTTON_DEBOUNCE_SHIFT
	.comm	_AIC3X_HEADSET_DETECT_ENABLED,4,2 ## @AIC3X_HEADSET_DETECT_ENABLED
	.comm	_AIC3X_HEADSET_DETECT_CTRL_A,4,2 ## @AIC3X_HEADSET_DETECT_CTRL_A
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aic3x_set_headset_detection    ; -- Begin function aic3x_set_headset_detection
	.p2align	2
_aic3x_set_headset_detection:           ; @aic3x_set_headset_detection
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _AIC3X_HEADSET_DETECT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AIC3X_HEADSET_DETECT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AIC3X_HEADSET_DETECT_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AIC3X_HEADSET_DETECT_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ands	w8, w8, w1
	lsl	w8, w8, w9
Lloh6:
	adrp	x9, _AIC3X_HEADSET_DEBOUNCE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AIC3X_HEADSET_DEBOUNCE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _AIC3X_HEADSET_DEBOUNCE_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AIC3X_HEADSET_DEBOUNCE_SHIFT@GOTPAGEOFF]
	and	w9, w9, w2
Lloh11:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _AIC3X_BUTTON_DEBOUNCE_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AIC3X_BUTTON_DEBOUNCE_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w3
Lloh15:
	adrp	x10, _AIC3X_BUTTON_DEBOUNCE_SHIFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AIC3X_BUTTON_DEBOUNCE_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _AIC3X_HEADSET_DETECT_ENABLED@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AIC3X_HEADSET_DETECT_ENABLED@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	csel	w9, wzr, w9, eq
	orr	w2, w8, w9
Lloh21:
	adrp	x8, _AIC3X_HEADSET_DETECT_CTRL_A@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AIC3X_HEADSET_DETECT_CTRL_A@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	b	_aic3x_write
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AIC3X_HEADSET_DETECT_MASK,4,2  ; @AIC3X_HEADSET_DETECT_MASK
	.comm	_AIC3X_HEADSET_DETECT_SHIFT,4,2 ; @AIC3X_HEADSET_DETECT_SHIFT
	.comm	_AIC3X_HEADSET_DEBOUNCE_MASK,4,2 ; @AIC3X_HEADSET_DEBOUNCE_MASK
	.comm	_AIC3X_HEADSET_DEBOUNCE_SHIFT,4,2 ; @AIC3X_HEADSET_DEBOUNCE_SHIFT
	.comm	_AIC3X_BUTTON_DEBOUNCE_MASK,4,2 ; @AIC3X_BUTTON_DEBOUNCE_MASK
	.comm	_AIC3X_BUTTON_DEBOUNCE_SHIFT,4,2 ; @AIC3X_BUTTON_DEBOUNCE_SHIFT
	.comm	_AIC3X_HEADSET_DETECT_ENABLED,4,2 ; @AIC3X_HEADSET_DETECT_ENABLED
	.comm	_AIC3X_HEADSET_DETECT_CTRL_A,4,2 ; @AIC3X_HEADSET_DETECT_CTRL_A
.subsections_via_symbols
