	.file	"extr_patch_sigmatel.c_stac_create_spdif_mux_ctls.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stac_create_spdif_mux_ctls, @function
stac_create_spdif_mux_ctls:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r14, QWORD PTR [rdi]
	mov	eax, DWORD PTR 8[r14]
	test	eax, eax
	jle	.L11
	mov	rax, QWORD PTR 16[r14]
	mov	rbp, QWORD PTR [r14]
	mov	esi, DWORD PTR [rax]
	call	snd_hda_get_num_conns@PLT
	cmp	eax, 1
	jle	.L11
	test	rbp, rbp
	lea	r13d, -1[rax]
	lea	r12, 24[r14]
	cmove	rbp, QWORD PTR stac_spdif_labels[rip]
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rbx, rax
.L7:
	xor	edi, edi
	cmp	QWORD PTR 0[rbp+rbx*8], 0
	sete	dil
	call	snd_BUG_ON@PLT
	test	rax, rax
	jne	.L13
	mov	rsi, QWORD PTR 0[rbp+rbx*8]
	xor	ecx, ecx
	mov	edx, ebx
	mov	rdi, r12
	call	snd_hda_add_imux_item@PLT
	lea	rax, 1[rbx]
	cmp	r13, rbx
	jne	.L9
	xor	esi, esi
	lea	rdi, 8[r14]
	lea	rdx, stac_smux_mixer[rip]
	call	snd_hda_gen_add_kctl@PLT
	test	rax, rax
	je	.L14
	mov	edx, DWORD PTR 8[r14]
	mov	DWORD PTR [rax], edx
.L11:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	stac_create_spdif_mux_ctls, .-stac_create_spdif_mux_ctls
	.comm	stac_spdif_labels,8,8
	.comm	stac_smux_mixer,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_patch_sigmatel.c_stac_create_spdif_mux_ctls.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stac_create_spdif_mux_ctls, %function
stac_create_spdif_mux_ctls:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0]
	ldr	r3, [r8, #4]
	cmp	r3, #0
	ble	.L4
	ldr	r3, [r8, #8]
	ldr	r6, [r8]
	ldr	r1, [r3]
	bl	snd_hda_get_num_conns
	cmp	r0, #1
	mov	r7, r0
	ble	.L4
	mov	r5, #0
	cmp	r6, #0
	ldreq	r3, .L13
	add	r9, r8, #12
	ldreq	r6, [r3]
	sub	r6, r6, #4
.L7:
	ldr	r0, [r6, #4]!
	clz	r0, r0
	lsr	r0, r0, #5
	bl	snd_BUG_ON
	subs	r4, r0, #0
	bne	.L12
	mov	r2, r5
	mov	r3, r4
	mov	r0, r9
	ldr	r1, [r6]
	add	r5, r5, #1
	bl	snd_hda_add_imux_item
	cmp	r7, r5
	bne	.L7
	mov	r1, r4
	ldr	r2, .L13+4
	add	r0, r8, #4
	bl	snd_hda_gen_add_kctl
	cmp	r0, #0
	ldreq	r3, .L13+8
	ldrne	r3, [r8, #4]
	ldreq	r0, [r3]
	strne	r3, [r0]
	rsbeq	r4, r0, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	ldr	r3, .L13+12
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	.align	2
.L13:
	.word	stac_spdif_labels
	.word	stac_smux_mixer
	.word	ENOMEM
	.word	EINVAL
	.size	stac_create_spdif_mux_ctls, .-stac_create_spdif_mux_ctls
	.comm	stac_spdif_labels,4,4
	.comm	stac_smux_mixer,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
