	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1988_add_spdif_mux_ctl
_ad1988_add_spdif_mux_ctl:              ## @ad1988_add_spdif_mux_ctl
	.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
	movq	8(%rdi), %r13
	xorl	%r15d, %r15d
	cmpl	$0, 4(%r13)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movl	$29, %esi
	callq	_get_wcaps
	movl	%eax, %edi
	callq	_get_wcaps_type
	movq	_AC_WID_AUD_MIX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.2:
	movq	%r14, %rdi
	movl	$11, %esi
	callq	_snd_hda_get_num_conns
	movl	%eax, %r12d
	leal	-4(%r12), %eax
	cmpl	$-2, %eax
	jb	LBB0_11
## %bb.3:
	incl	%r12d
	leaq	_ad1988_add_spdif_mux_ctl.fake_paths(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_snd_hda_get_path_idx
	movq	8(%r13), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	addq	$20, %r15
	cmpq	%rbx, %r12
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_snd_array_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%r15), %ecx
	movl	%ecx, 16(%rax)
	movups	(%r15), %xmm0
	movups	%xmm0, (%rax)
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, 4(%rax)
	jmp	LBB0_8
LBB0_9:
	movq	_ad1988_auto_smux_mixer@GOTPCREL(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_snd_hda_gen_add_kctl
	testl	%eax, %eax
	je	LBB0_5
## %bb.10:
	movq	_ad1988_auto_init@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_11
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @ad1988_add_spdif_mux_ctl.fake_paths
_ad1988_add_spdif_mux_ctl.fake_paths:
	.long	3                               ## 0x3
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.long	4                               ## 0x4
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	8                               ## 0x8
	.long	4                               ## 0x4
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	9                               ## 0x9
	.long	4                               ## 0x4
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	15                              ## 0xf

	.comm	_AC_WID_AUD_MIX,8,3             ## @AC_WID_AUD_MIX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ad1988_auto_smux_mixer,4,2     ## @ad1988_auto_smux_mixer
	.comm	_ad1988_auto_init,4,2           ## @ad1988_auto_init
	.no_dead_strip	_ad1988_add_spdif_mux_ctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1988_add_spdif_mux_ctl
_ad1988_add_spdif_mux_ctl:              ; @ad1988_add_spdif_mux_ctl
	.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	x20, [x0, #8]
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w1, #29
	bl	_get_wcaps
	bl	_get_wcaps_type
Lloh0:
	adrp	x8, _AC_WID_AUD_MIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC_WID_AUD_MIX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #11
	bl	_snd_hda_get_num_conns
	sub	w8, w0, #4
	cmn	w8, #2
	b.hs	LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	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_5:
	mov	x21, x0
	mov	x0, x20
	bl	_snd_array_new
	cbz	x0, LBB0_15
; %bb.6:
	mov	x1, x0
Lloh3:
	adrp	x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGE
Lloh4:
	add	x8, x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGEOFF
	ldr	w9, [x8, #16]
	ldr	q0, [x8]
	str	q0, [x0]
	str	w9, [x0, #16]
	mov	w8, #1
	str	w8, [x0, #4]
	mov	x0, x19
	bl	_snd_hda_get_path_idx
	ldr	x8, [x20, #8]
	str	w0, [x8]
	cbz	w21, LBB0_13
; %bb.7:
	mov	x0, x20
	bl	_snd_array_new
	cbz	x0, LBB0_15
; %bb.8:
	mov	x1, x0
	add	w21, w21, #1
Lloh5:
	adrp	x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGE+20
Lloh6:
	add	x8, x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGEOFF+20
	ldr	q0, [x8]
	ldr	w8, [x8, #16]
	str	w8, [x0, #16]
	str	q0, [x0]
	mov	x0, x19
	bl	_snd_hda_get_path_idx
	ldr	x8, [x20, #8]
	str	w0, [x8, #4]
	cmp	w21, #2
	b.eq	LBB0_13
; %bb.9:
	mov	x0, x20
	bl	_snd_array_new
	cbz	x0, LBB0_15
; %bb.10:
	mov	x1, x0
Lloh7:
	adrp	x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGE+40
Lloh8:
	add	x8, x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGEOFF+40
	ldr	q0, [x8]
	ldr	w8, [x8, #16]
	str	w8, [x0, #16]
	str	q0, [x0]
	mov	x0, x19
	bl	_snd_hda_get_path_idx
	ldr	x8, [x20, #8]
	str	w0, [x8, #8]
	cmp	w21, #3
	b.eq	LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_snd_array_new
	cbz	x0, LBB0_15
; %bb.12:
	mov	x1, x0
Lloh9:
	adrp	x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGE+60
Lloh10:
	add	x8, x8, _ad1988_add_spdif_mux_ctl.fake_paths@PAGEOFF+60
	ldr	q0, [x8]
	ldr	w8, [x8, #16]
	str	w8, [x0, #16]
	str	q0, [x0]
	mov	x0, x19
	bl	_snd_hda_get_path_idx
	ldr	x8, [x20, #8]
	str	w0, [x8, #12]
LBB0_13:
Lloh11:
	adrp	x2, _ad1988_auto_smux_mixer@GOTPAGE
Lloh12:
	ldr	x2, [x2, _ad1988_auto_smux_mixer@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, #0
	bl	_snd_hda_gen_add_kctl
	cbz	w0, LBB0_15
; %bb.14:
	mov	w0, #0
Lloh13:
	adrp	x8, _ad1988_auto_init@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ad1988_auto_init@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_4
LBB0_15:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @ad1988_add_spdif_mux_ctl.fake_paths
_ad1988_add_spdif_mux_ctl.fake_paths:
	.long	3                               ; 0x3
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	8                               ; 0x8
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	9                               ; 0x9
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	15                              ; 0xf

	.comm	_AC_WID_AUD_MIX,8,3             ; @AC_WID_AUD_MIX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ad1988_auto_smux_mixer,4,2     ; @ad1988_auto_smux_mixer
	.comm	_ad1988_auto_init,4,2           ; @ad1988_auto_init
	.no_dead_strip	_ad1988_add_spdif_mux_ctl
.subsections_via_symbols
