	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_auto_mic_availability
_check_auto_mic_availability:           ## @check_auto_mic_availability
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rcx
	cmpq	$0, 40(%rcx)
	je	LBB0_1
LBB0_15:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, 48(%rcx)
	jle	LBB0_15
## %bb.2:
	xorl	%r12d, %r12d
	movl	$4, %edx
	xorl	%ebx, %ebx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	56(%rcx), %rax
	movl	4(%rax,%r12,8), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_snd_hda_codec_get_pincfg
	movl	%eax, %edi
	callq	_snd_hda_get_input_pin_attr
	movl	%eax, %r14d
	movl	$1, %r13d
	movl	%r14d, %ecx
	shll	%cl, %r13d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	btl	%eax, %ebx
	jb	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$129, %r14d
	je	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$128, %r14d
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	56(%rcx), %rax
	movl	(%rax,%r12,8), %eax
	movq	_AUTO_PIN_LINE_IN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jg	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 32(%rcx)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_AUTO_PIN_MIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_is_jack_detectable
	movl	%r15d, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	56(%rcx), %rax
	movl	(%rax,%r12,8), %eax
	movq	_AUTO_PIN_MIC@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_15
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAX_AUTO_MIC_PINS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	orl	%r13d, %ebx
	movq	16(%rcx), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%edx, (%rax,%rsi)
	movq	%rsi, %rdx
	movl	%r14d, -4(%rax,%rsi)
	incq	%r12
	movslq	48(%rcx), %rax
	addq	$12, %rdx
	cmpq	%rax, %r12
	jl	LBB0_3
## %bb.12:
	cmpl	$2, %r12d
	jb	LBB0_15
## %bb.13:
	movl	%r12d, (%rcx)
	movq	16(%rcx), %rdi
	movq	_compare_attr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %esi
	movl	$12, %edx
	xorl	%r8d, %r8d
	callq	_sort
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_auto_mic_check_imux
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 4(%rcx)
	movq	16(%rcx), %rax
	movq	24(%rcx), %rcx
	movl	8(%rax), %edx
	movl	%edx, (%rcx)
	movl	4(%rax), %esi
	movl	16(%rax), %edx
	movl	28(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	callq	_snd_printdd
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTO_PIN_MIC,4,2               ## @AUTO_PIN_MIC
	.comm	_AUTO_PIN_LINE_IN,4,2           ## @AUTO_PIN_LINE_IN
	.comm	_MAX_AUTO_MIC_PINS,4,2          ## @MAX_AUTO_MIC_PINS
	.comm	_compare_attr,4,2               ## @compare_attr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hda-codec: Enable auto-mic switch on NID 0x%x/0x%x/0x%x\n"

	.no_dead_strip	_check_auto_mic_availability
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_auto_mic_availability
_check_auto_mic_availability:           ; @check_auto_mic_availability
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x23, [x0]
	ldr	x8, [x23, #40]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w8, [x23, #48]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.3:
	mov	x19, x0
	mov	x24, #0
	mov	x25, #0
	mov	x20, #0
	mov	w26, #0
	mov	w27, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #56]
	add	x8, x8, x25
	ldr	w21, [x8, #4]
	mov	x0, x19
	mov	x1, x21
	bl	_snd_hda_codec_get_pincfg
	bl	_snd_hda_get_input_pin_attr
	lsl	w28, w27, w0
	tst	w28, w26
	b.ne	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	cmp	w0, #129
	b.eq	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w22, #128
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23, #56]
	ldr	w8, [x8, x25]
Lloh0:
	adrp	x9, _AUTO_PIN_LINE_IN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTO_PIN_LINE_IN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x23, #32]
	cbnz	w9, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh3:
	adrp	x9, _AUTO_PIN_MIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AUTO_PIN_MIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_1
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_is_jack_detectable
	cbnz	w0, LBB0_12
	b	LBB0_1
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23, #56]
	ldr	w8, [x8, x25]
Lloh6:
	adrp	x9, _AUTO_PIN_MIC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AUTO_PIN_MIC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_1
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh9:
	adrp	x8, _MAX_AUTO_MIC_PINS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_AUTO_MIC_PINS@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
	cmp	x20, x8
	b.ge	LBB0_1
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	orr	w26, w28, w26
	ldr	x8, [x23, #16]
	add	x8, x8, x24
	stp	w22, w21, [x8]
	add	x20, x20, #1
	ldrsw	x8, [x23, #48]
	add	x25, x25, #8
	add	x24, x24, #12
	cmp	x20, x8
	b.lt	LBB0_4
; %bb.14:
	cmp	w20, #2
	b.lo	LBB0_1
; %bb.15:
	str	w20, [x23]
	ldr	x0, [x23, #16]
Lloh12:
	adrp	x8, _compare_attr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _compare_attr@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x1, x20
	mov	w2, #12
	mov	x4, #0
	bl	_sort
	mov	x0, x19
	bl	_auto_mic_check_imux
	cbz	w0, LBB0_1
; %bb.16:
	movi.2s	v0, #1
	stur	d0, [x23, #4]
	ldp	x8, x9, [x23, #16]
	ldr	w10, [x8, #8]
	str	w10, [x9]
	ldr	w1, [x8, #4]
	ldr	w2, [x8, #16]
	ldr	w3, [x8, #28]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printdd
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTO_PIN_MIC,4,2               ; @AUTO_PIN_MIC
	.comm	_AUTO_PIN_LINE_IN,4,2           ; @AUTO_PIN_LINE_IN
	.comm	_MAX_AUTO_MIC_PINS,4,2          ; @MAX_AUTO_MIC_PINS
	.comm	_compare_attr,4,2               ; @compare_attr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hda-codec: Enable auto-mic switch on NID 0x%x/0x%x/0x%x\n"

	.no_dead_strip	_check_auto_mic_availability
.subsections_via_symbols
