	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxt5066_olpc_automic
_cxt5066_olpc_automic:                  ## @cxt5066_olpc_automic
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdi, %rbx
	movq	_AC_VERB_GET_PIN_SENSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$26, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_snd_hda_codec_read
	movl	%eax, %r14d
	testl	%eax, %eax
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmovsq	%rax, %rdi
	callq	_snd_printdd
	movq	_AC_VERB_SET_CONNECT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %r8d
	notl	%r8d
	shrl	$31, %r8d
	movq	%rbx, %rdi
	movl	$23, %esi
	xorl	%edx, %edx
	callq	_snd_hda_codec_write
	shrl	$31, %r14d
	movl	%r14d, (%r15)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cxt5066_olpc_select_mic        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC_VERB_GET_PIN_SENSE,4,2      ## @AC_VERB_GET_PIN_SENSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CXT5066: external microphone detected\n"

L_.str.1:                               ## @.str.1
	.asciz	"CXT5066: external microphone absent\n"

	.comm	_AC_VERB_SET_CONNECT_SEL,4,2    ## @AC_VERB_SET_CONNECT_SEL
	.no_dead_strip	_cxt5066_olpc_automic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxt5066_olpc_automic
_cxt5066_olpc_automic:                  ; @cxt5066_olpc_automic
	.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	x21, [x0]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x8, _AC_VERB_GET_PIN_SENSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_VERB_GET_PIN_SENSE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w1, #26
	mov	w2, #0
	mov	w4, #0
	bl	_snd_hda_codec_read
	mov	x20, x0
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh5:
	adrp	x9, l_.str@PAGE
Lloh6:
	add	x9, x9, l_.str@PAGEOFF
	cmp	w0, #0
	csel	x0, x9, x8, lt
	bl	_snd_printdd
Lloh7:
	adrp	x8, _AC_VERB_SET_CONNECT_SEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AC_VERB_SET_CONNECT_SEL@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	mvn	w8, w20
	lsr	w4, w8, #31
	mov	x0, x19
	mov	w1, #23
	mov	w2, #0
	bl	_snd_hda_codec_write
	lsr	w8, w20, #31
	str	w8, [x21]
	mov	x0, x19
	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
	b	_cxt5066_olpc_select_mic
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AC_VERB_GET_PIN_SENSE,4,2      ; @AC_VERB_GET_PIN_SENSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CXT5066: external microphone detected\n"

l_.str.1:                               ; @.str.1
	.asciz	"CXT5066: external microphone absent\n"

	.comm	_AC_VERB_SET_CONNECT_SEL,4,2    ; @AC_VERB_SET_CONNECT_SEL
	.no_dead_strip	_cxt5066_olpc_automic
.subsections_via_symbols
