	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ice1712_pro_route_spdif_put
_snd_ice1712_pro_route_spdif_put:       ## @snd_ice1712_pro_route_spdif_put
	.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	%rsi, %r13
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	leaq	8(%r13), %rsi
	movq	%rbx, %rdi
	callq	_snd_ctl_get_ioffidx
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	_ROUTE_SPDOUT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ICEMT
	movl	%eax, %edi
	callq	_inw
	movl	%eax, %r15d
	movq	(%r13), %rax
	movl	(%rax), %eax
	cmpl	$10, %eax
	jle	LBB0_2
## %bb.1:
	movl	$1, %r13d
	xorl	%edx, %edx
	jmp	LBB0_5
LBB0_2:
	cmpl	$8, %eax
	jle	LBB0_4
## %bb.3:
	movl	$3, %r13d
	movb	$1, %sil
	xorl	%edx, %edx
	jmp	LBB0_6
LBB0_4:
	xorl	%edx, %edx
	testl	%eax, %eax
	setg	%dl
	movl	%edx, %r13d
	addl	%edx, %r13d
LBB0_5:
	xorl	%esi, %esi
LBB0_6:
	leal	(%r12,%r12), %ecx
	movl	$3, %edi
	shll	%cl, %edi
	notl	%edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	andl	%r15d, %edi
	orl	%edi, %r13d
	leal	8(,%r12,4), %ecx
	testb	%dl, %dl
	je	LBB0_8
## %bb.7:
	movl	$7, %edx
	shll	%cl, %edx
	decl	%eax
	notl	%edx
	andl	%edx, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, %r13d
	jmp	LBB0_10
LBB0_8:
	testb	%sil, %sil
	je	LBB0_10
## %bb.9:
	movl	$8, %edx
	shll	%cl, %edx
	leal	-72(,%rax,8), %eax
	notl	%edx
	andl	%edx, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, %r13d
LBB0_10:
	cmpl	%r15d, %r13d
	je	LBB0_12
## %bb.11:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ICEMT
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_outw
LBB0_12:
	xorl	%ebx, %ebx
	cmpl	%r15d, %r13d
	setne	%bl
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ROUTE_SPDOUT,4,2               ## @ROUTE_SPDOUT
	.no_dead_strip	_snd_ice1712_pro_route_spdif_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ice1712_pro_route_spdif_put
_snd_ice1712_pro_route_spdif_put:       ; @snd_ice1712_pro_route_spdif_put
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_snd_kcontrol_chip
	mov	x19, x0
	add	x1, x21, #8
	mov	x0, x20
	bl	_snd_ctl_get_ioffidx
	mov	x22, x0
	mov	x0, x19
	bl	_spin_lock_irq
Lloh0:
	adrp	x23, _ROUTE_SPDOUT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ROUTE_SPDOUT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ICEMT
	bl	_inw
	mov	x20, x0
	ldr	x8, [x21]
	ldr	w8, [x8]
	mov	w9, #1
	mov	w10, #3
	mov	w11, #1
	cmp	w8, #0
	cset	w12, gt
	lsl	w13, w12, #1
	cmp	w8, #8
	csel	w12, wzr, w12, gt
	csel	w11, w11, wzr, gt
	csel	w13, w10, w13, gt
	cmp	w8, #10
	csel	w12, wzr, w12, gt
	csel	w11, wzr, w11, gt
	csel	w9, w9, w13, gt
	lsl	w13, w22, #1
	lsl	w10, w10, w13
	bic	w10, w0, w10
	lsl	w9, w9, w13
	orr	w9, w9, w10
	lsl	w10, w22, #2
	add	w10, w10, #8
	lsl	w13, w8, #3
	sub	w13, w13, #72
	mov	w14, #8
	lsl	w14, w14, w10
	bic	w14, w9, w14
	lsl	w13, w13, w10
	orr	w13, w14, w13
	cmp	w11, #0
	csel	w11, w9, w13, eq
	sub	w8, w8, #1
	mov	w13, #7
	lsl	w13, w13, w10
	bic	w9, w9, w13
	lsl	w8, w8, w10
	orr	w8, w9, w8
	cmp	w12, #0
	csel	w21, w11, w8, eq
	cmp	w21, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ICEMT
	mov	x1, x0
	mov	x0, x21
	bl	_outw
LBB0_2:
	cmp	w21, w20
	cset	w20, ne
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ROUTE_SPDOUT,4,2               ; @ROUTE_SPDOUT
	.no_dead_strip	_snd_ice1712_pro_route_spdif_put
.subsections_via_symbols
