	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stac_create_spdif_mux_ctls
_stac_create_spdif_mux_ctls:            ## @stac_create_spdif_mux_ctls
	.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	(%rdi), %r12
	xorl	%r15d, %r15d
	cmpl	$0, 8(%r12)
	jle	LBB0_12
## %bb.1:
	movq	(%r12), %r13
	movq	16(%r12), %rax
	movl	(%rax), %esi
	callq	_snd_hda_get_num_conns
	cmpl	$2, %eax
	jl	LBB0_12
## %bb.2:
	testq	%r13, %r13
	jne	LBB0_4
## %bb.3:
	movq	_stac_spdif_labels@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
LBB0_4:
	leaq	8(%r12), %r14
	addq	$24, %r12
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	cmpq	$0, (%r13,%rbx,8)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13,%rbx,8), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_snd_hda_add_imux_item
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_5
## %bb.9:
	movq	_stac_smux_mixer@GOTPCREL(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_snd_hda_gen_add_kctl
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	(%r14), %ecx
	movl	%ecx, (%rax)
	jmp	LBB0_12
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stac_spdif_labels,8,3          ## @stac_spdif_labels
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_stac_smux_mixer,4,2            ## @stac_smux_mixer
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_stac_create_spdif_mux_ctls
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stac_create_spdif_mux_ctls
_stac_create_spdif_mux_ctls:            ; @stac_create_spdif_mux_ctls
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x21, [x0]
	mov	x19, x21
	ldr	w8, [x19, #8]!
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	x22, [x21]
	ldr	x8, [x21, #16]
	ldr	w1, [x8]
	bl	_snd_hda_get_num_conns
	cmp	w0, #2
	b.ge	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_11
LBB0_3:
	mov	x20, #0
Lloh0:
	adrp	x8, _stac_spdif_labels@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stac_spdif_labels@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x22, #0
	csel	x22, x8, x22, eq
	add	x21, x21, #24
	mov	w23, w0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, x20, lsl #3]
	cmp	x8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x22, x20, lsl #3]
	mov	x0, x21
	mov	x2, x20
	mov	x3, #0
	bl	_snd_hda_add_imux_item
	add	x20, x20, #1
	cmp	x23, x20
	b.ne	LBB0_4
; %bb.6:
Lloh3:
	adrp	x2, _stac_smux_mixer@GOTPAGE
Lloh4:
	ldr	x2, [x2, _stac_smux_mixer@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, #0
	bl	_snd_hda_gen_add_kctl
	cbz	x0, LBB0_9
; %bb.7:
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19]
	str	w9, [x8]
	b	LBB0_11
LBB0_8:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_stac_spdif_labels,8,3          ; @stac_spdif_labels
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_stac_smux_mixer,4,2            ; @stac_smux_mixer
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_stac_create_spdif_mux_ctls
.subsections_via_symbols
