	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stac_parse_auto_config
_stac_parse_auto_config:                ## @stac_parse_auto_config
	.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	%rdi, %r14
	movq	8(%rdi), %r12
	xorl	%ecx, %ecx
	cmpq	$0, 96(%r12)
	je	LBB0_2
## %bb.1:
	movq	_HDA_PINCFG_HEADSET_MIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_2:
	leaq	48(%r12), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_snd_hda_parse_pin_defcfg
	testl	%eax, %eax
	js	LBB0_14
## %bb.3:
	movq	_stac_playback_pcm_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r12)
	movq	_stac_capture_pcm_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r12)
	movq	_stac_update_outputs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r12)
	movq	_stac_hp_automute@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r12)
	movq	_stac_line_automute@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r12)
	movq	_stac_mic_autoswitch@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_snd_hda_gen_parse_auto_config
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movq	_TLV_DB_SCALE_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	40(%r12), %rcx
	orl	%eax, 12(%rcx)
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	jle	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_stac_auto_create_beep_ctls
	testl	%eax, %eax
	js	LBB0_14
LBB0_6:
	cmpq	$0, 80(%r12)
	je	LBB0_8
## %bb.7:
	movq	_stac_vmaster_hook@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
LBB0_8:
	cmpq	$0, 16(%r12)
	je	LBB0_11
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_snd_hda_get_bool_hint
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	24(%r12), %rdi
	movq	16(%r12), %rdx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_snd_hda_gen_add_kctl
	testl	%eax, %eax
	je	LBB0_18
LBB0_11:
	cmpq	$0, 8(%r12)
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_stac_create_spdif_mux_ctls
	testl	%eax, %eax
	js	LBB0_14
LBB0_13:
	movq	%r14, %rdi
	callq	_stac_init_power_map
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_14:
	movl	%eax, %ebx
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_HDA_PINCFG_HEADSET_MIC,4,2     ## @HDA_PINCFG_HEADSET_MIC
	.comm	_stac_playback_pcm_hook,4,2     ## @stac_playback_pcm_hook
	.comm	_stac_capture_pcm_hook,4,2      ## @stac_capture_pcm_hook
	.comm	_stac_update_outputs,4,2        ## @stac_update_outputs
	.comm	_stac_hp_automute,4,2           ## @stac_hp_automute
	.comm	_stac_line_automute,4,2         ## @stac_line_automute
	.comm	_stac_mic_autoswitch,4,2        ## @stac_mic_autoswitch
	.comm	_TLV_DB_SCALE_MUTE,4,2          ## @TLV_DB_SCALE_MUTE
	.comm	_stac_vmaster_hook,4,2          ## @stac_vmaster_hook
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loopback"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AC_AMPCAP_MUTE,4,2             ## @AC_AMPCAP_MUTE
	.comm	_HDA_OUTPUT,4,2                 ## @HDA_OUTPUT
	.no_dead_strip	_stac_parse_auto_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stac_parse_auto_config
_stac_parse_auto_config:                ; @stac_parse_auto_config
	.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	x19, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x21, #96]
Lloh0:
	adrp	x9, _HDA_PINCFG_HEADSET_MIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HDA_PINCFG_HEADSET_MIC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w3, wzr, w9, eq
	add	x20, x21, #48
	mov	x1, x20
	mov	x2, #0
	bl	_snd_hda_parse_pin_defcfg
	tbnz	w0, #31, LBB0_12
; %bb.1:
Lloh3:
	adrp	x8, _stac_playback_pcm_hook@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stac_playback_pcm_hook@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _stac_capture_pcm_hook@GOTPAGE
Lloh7:
	ldr	x9, [x9, _stac_capture_pcm_hook@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #68]
Lloh9:
	adrp	x8, _stac_update_outputs@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stac_update_outputs@GOTPAGEOFF]
Lloh11:
	adrp	x9, _stac_hp_automute@GOTPAGE
Lloh12:
	ldr	x9, [x9, _stac_hp_automute@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #60]
Lloh15:
	adrp	x8, _stac_line_automute@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stac_line_automute@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _stac_mic_autoswitch@GOTPAGE
Lloh19:
	ldr	x9, [x9, _stac_mic_autoswitch@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #52]
	mov	x0, x19
	mov	x1, x20
	bl	_snd_hda_gen_parse_auto_config
	tbnz	w0, #31, LBB0_12
; %bb.2:
Lloh21:
	adrp	x8, _TLV_DB_SCALE_MUTE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TLV_DB_SCALE_MUTE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [x21, #40]
	ldr	w10, [x9, #12]
	orr	w8, w10, w8
	str	w8, [x9, #12]
	ldr	x1, [x21]
	cmp	x1, #1
	b.lt	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_stac_auto_create_beep_ctls
	tbnz	w0, #31, LBB0_12
LBB0_4:
	ldr	x8, [x21, #80]
	cbz	x8, LBB0_6
; %bb.5:
Lloh24:
	adrp	x8, _stac_vmaster_hook@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stac_vmaster_hook@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x21, #32]
LBB0_6:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_9
; %bb.7:
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_snd_hda_get_bool_hint
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.8:
	add	x0, x21, #24
	ldr	x2, [x21, #16]
	mov	x1, #0
	bl	_snd_hda_gen_add_kctl
	cbz	w0, LBB0_13
LBB0_9:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_stac_create_spdif_mux_ctls
	tbnz	w0, #31, LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_stac_init_power_map
	mov	w0, #0
LBB0_12:
	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_13:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_HDA_PINCFG_HEADSET_MIC,4,2     ; @HDA_PINCFG_HEADSET_MIC
	.comm	_stac_playback_pcm_hook,4,2     ; @stac_playback_pcm_hook
	.comm	_stac_capture_pcm_hook,4,2      ; @stac_capture_pcm_hook
	.comm	_stac_update_outputs,4,2        ; @stac_update_outputs
	.comm	_stac_hp_automute,4,2           ; @stac_hp_automute
	.comm	_stac_line_automute,4,2         ; @stac_line_automute
	.comm	_stac_mic_autoswitch,4,2        ; @stac_mic_autoswitch
	.comm	_TLV_DB_SCALE_MUTE,4,2          ; @TLV_DB_SCALE_MUTE
	.comm	_stac_vmaster_hook,4,2          ; @stac_vmaster_hook
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loopback"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AC_AMPCAP_MUTE,4,2             ; @AC_AMPCAP_MUTE
	.comm	_HDA_OUTPUT,4,2                 ; @HDA_OUTPUT
	.no_dead_strip	_stac_parse_auto_config
.subsections_via_symbols
