	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_spdif_put
_snd_emu10k1_spdif_put:                 ## @snd_emu10k1_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, %r12
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	leaq	8(%r12), %rsi
	movq	%rbx, %rdi
	callq	_snd_ctl_get_ioffidx
	cmpl	$3, %eax
	jb	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_5
LBB0_2:
	movl	%eax, %r15d
	movq	(%r12), %rax
	movl	4(%rax), %ecx
	movl	8(%rax), %edx
	shll	$8, %ecx
	orl	(%rax), %ecx
	shll	$16, %edx
	movl	12(%rax), %ebx
	shll	$24, %ebx
	orl	%edx, %ebx
	orl	%ecx, %ebx
	movq	%r14, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	(%r14), %rax
	movl	%r15d, %r13d
	xorl	%r15d, %r15d
	cmpl	(%rax,%r13,4), %ebx
	setne	%al
	je	LBB0_4
## %bb.3:
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	_SPCS0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	callq	_snd_emu10k1_ptr_write
	movq	(%r14), %rax
	movl	%ebx, (%rax,%r13,4)
	movb	-41(%rbp), %al                  ## 1-byte Reload
LBB0_4:
	movb	%al, %r15b
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SPCS0,8,3                      ## @SPCS0
	.no_dead_strip	_snd_emu10k1_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_emu10k1_spdif_put
_snd_emu10k1_spdif_put:                 ; @snd_emu10k1_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	x20, x1
	mov	x21, x0
	bl	_snd_kcontrol_chip
	mov	x19, x0
	add	x1, x20, #8
	mov	x0, x21
	bl	_snd_ctl_get_ioffidx
	cmp	w0, #3
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_2:
	mov	x23, x0
	ldr	x8, [x20]
	ldp	w9, w10, [x8]
	orr	w9, w9, w10, lsl #8
	ldp	w10, w8, [x8, #8]
	orr	w9, w9, w10, lsl #16
	orr	w22, w9, w8, lsl #24
	add	x21, x19, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	ldr	w8, [x8, w23, uxtw #2]
	cmp	w22, w8
	cset	w20, ne
	b.eq	LBB0_4
; %bb.3:
	mov	w23, w23
Lloh3:
	adrp	x8, _SPCS0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPCS0@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x23
	mov	x0, x19
	mov	w2, #0
	mov	x3, x22
	bl	_snd_emu10k1_ptr_write
	ldr	x8, [x19]
	str	w22, [x8, x23, lsl #2]
LBB0_4:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SPCS0,8,3                      ; @SPCS0
	.no_dead_strip	_snd_emu10k1_spdif_put
.subsections_via_symbols
