	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_disable_spdif_out   ## -- Begin function cs46xx_dsp_disable_spdif_out
	.p2align	4, 0x90
_cs46xx_dsp_disable_spdif_out:          ## @cs46xx_dsp_disable_spdif_out
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movl	(%rbx), %eax
	movq	_DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	8(%rbx), %rax
	setne	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.7:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	24(%rbx), %rax
	setne	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_8
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	8(%rbx), %r15
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	callq	_cs46xx_dsp_remove_scb
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	callq	_cs46xx_dsp_remove_scb
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
	movq	_SPDIFO_IP_OUTPUT_BUFFER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	__dsp_clear_sample_buffer
	movq	_DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_DSP_SPDIF_STATUS_PLAYBACK_OPEN,4,2 ## @DSP_SPDIF_STATUS_PLAYBACK_OPEN
	.comm	_DSP_SPDIF_STATUS_OUTPUT_ENABLED,4,2 ## @DSP_SPDIF_STATUS_OUTPUT_ENABLED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SPDIFO_IP_OUTPUT_BUFFER1,4,2   ## @SPDIFO_IP_OUTPUT_BUFFER1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_disable_spdif_out   ; -- Begin function cs46xx_dsp_disable_spdif_out
	.p2align	2
_cs46xx_dsp_disable_spdif_out:          ; @cs46xx_dsp_disable_spdif_out
	.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]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x20]
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x19, x0
	mov	x21, x20
	ldr	x8, [x21, #8]!
	cmp	x8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	cset	w0, ne
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x9, [x20, #24]
	cmp	x8, x9
	cset	w0, ne
	bl	_snd_BUG_ON
	cbz	x0, LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	ldr	x1, [x20, #16]
	mov	x0, x19
	bl	_cs46xx_dsp_remove_scb
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_cs46xx_dsp_remove_scb
	stp	xzr, xzr, [x21]
Lloh10:
	adrp	x8, _SPDIFO_IP_OUTPUT_BUFFER1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPDIFO_IP_OUTPUT_BUFFER1@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #256
	bl	__dsp_clear_sample_buffer
	mov	w0, #0
Lloh13:
	adrp	x8, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DSP_SPDIF_STATUS_PLAYBACK_OPEN,4,2 ; @DSP_SPDIF_STATUS_PLAYBACK_OPEN
	.comm	_DSP_SPDIF_STATUS_OUTPUT_ENABLED,4,2 ; @DSP_SPDIF_STATUS_OUTPUT_ENABLED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SPDIFO_IP_OUTPUT_BUFFER1,4,2   ; @SPDIFO_IP_OUTPUT_BUFFER1
.subsections_via_symbols
