	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_iec958_post_close       ## -- Begin function cs46xx_iec958_post_close
	.p2align	4, 0x90
_cs46xx_iec958_post_close:              ## @cs46xx_iec958_post_close
	.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, %r14
	movq	(%rdi), %r15
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	_DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r15)
	movq	_SP_SPDOUT_CSUV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r15), %edx
	movq	%r14, %rdi
	callq	_cs46xx_poke_via_dsp
	movq	16(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_cs46xx_dsp_remove_scb
	movq	$0, 16(%r15)
LBB0_4:
	movq	8(%r15), %rsi
	movq	%r14, %rdi
	callq	_cs46xx_dsp_remove_scb
	movq	$0, 8(%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
	xorl	%ebx, %ebx
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_cs46xx_dsp_enable_spdif_out
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DSP_SPDIF_STATUS_PLAYBACK_OPEN,4,2 ## @DSP_SPDIF_STATUS_PLAYBACK_OPEN
	.comm	_SP_SPDOUT_CSUV,4,2             ## @SP_SPDOUT_CSUV
	.comm	_SPDIFO_IP_OUTPUT_BUFFER1,4,2   ## @SPDIFO_IP_OUTPUT_BUFFER1
	.comm	_DSP_SPDIF_STATUS_OUTPUT_ENABLED,4,2 ## @DSP_SPDIF_STATUS_OUTPUT_ENABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_iec958_post_close       ; -- Begin function cs46xx_iec958_post_close
	.p2align	2
_cs46xx_iec958_post_close:              ; @cs46xx_iec958_post_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
Lloh3:
	adrp	x8, _DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
Lloh6:
	adrp	x8, _SP_SPDOUT_CSUV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SP_SPDOUT_CSUV@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x20, #24]
	mov	x0, x19
	bl	_cs46xx_poke_via_dsp
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_cs46xx_dsp_remove_scb
	str	xzr, [x20, #16]
LBB0_4:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_cs46xx_dsp_remove_scb
	str	xzr, [x20, #8]
Lloh9:
	adrp	x8, _SPDIFO_IP_OUTPUT_BUFFER1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPDIFO_IP_OUTPUT_BUFFER1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #256
	bl	__dsp_clear_sample_buffer
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_cs46xx_dsp_enable_spdif_out
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DSP_SPDIF_STATUS_PLAYBACK_OPEN,4,2 ; @DSP_SPDIF_STATUS_PLAYBACK_OPEN
	.comm	_SP_SPDOUT_CSUV,4,2             ; @SP_SPDOUT_CSUV
	.comm	_SPDIFO_IP_OUTPUT_BUFFER1,4,2   ; @SPDIFO_IP_OUTPUT_BUFFER1
	.comm	_DSP_SPDIF_STATUS_OUTPUT_ENABLED,4,2 ; @DSP_SPDIF_STATUS_OUTPUT_ENABLED
.subsections_via_symbols
