	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_iec958_pre_open         ## -- Begin function cs46xx_iec958_pre_open
	.p2align	4, 0x90
_cs46xx_iec958_pre_open:                ## @cs46xx_iec958_pre_open
	.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), %rbx
	movl	(%rbx), %eax
	movq	_DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_cs46xx_dsp_disable_spdif_out
	movl	(%rbx), %eax
	orl	(%r15), %eax
	movl	%eax, (%rbx)
LBB0_2:
	movq	_DSP_SPDIF_STATUS_HW_ENABLED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_cs46xx_dsp_enable_spdif_hw
LBB0_4:
	movq	_ASYNCTX_SCB_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SPDIFO_SCB_INST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SPDIFO_IP_OUTPUT_BUFFER1@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	8(%rbx), %r9d
	movq	_SCB_ON_PARENT_NEXT_SCB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_cs46xx_dsp_create_asynch_fg_tx_scb
	movl	%eax, 12(%rbx)
	movq	_SP_SPDOUT_CSUV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	callq	_cs46xx_poke_via_dsp
	movq	_DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSP_SPDIF_STATUS_OUTPUT_ENABLED,4,2 ## @DSP_SPDIF_STATUS_OUTPUT_ENABLED
	.comm	_DSP_SPDIF_STATUS_HW_ENABLED,4,2 ## @DSP_SPDIF_STATUS_HW_ENABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AsynchFGTxSCB"

	.comm	_ASYNCTX_SCB_ADDR,4,2           ## @ASYNCTX_SCB_ADDR
	.comm	_SPDIFO_SCB_INST,4,2            ## @SPDIFO_SCB_INST
	.comm	_SPDIFO_IP_OUTPUT_BUFFER1,4,2   ## @SPDIFO_IP_OUTPUT_BUFFER1
	.comm	_SCB_ON_PARENT_NEXT_SCB,4,2     ## @SCB_ON_PARENT_NEXT_SCB
	.comm	_SP_SPDOUT_CSUV,4,2             ## @SP_SPDOUT_CSUV
	.comm	_DSP_SPDIF_STATUS_PLAYBACK_OPEN,4,2 ## @DSP_SPDIF_STATUS_PLAYBACK_OPEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_iec958_pre_open         ; -- Begin function cs46xx_iec958_pre_open
	.p2align	2
_cs46xx_iec958_pre_open:                ; @cs46xx_iec958_pre_open
	.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
	mov	x19, x0
	ldr	x20, [x0]
	ldr	w8, [x20]
Lloh0:
	adrp	x21, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DSP_SPDIF_STATUS_OUTPUT_ENABLED@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_cs46xx_dsp_disable_spdif_out
	ldr	w8, [x21]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_2:
Lloh2:
	adrp	x9, _DSP_SPDIF_STATUS_HW_ENABLED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DSP_SPDIF_STATUS_HW_ENABLED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_cs46xx_dsp_enable_spdif_hw
LBB0_4:
Lloh5:
	adrp	x8, _ASYNCTX_SCB_ADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASYNCTX_SCB_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _SPDIFO_SCB_INST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPDIFO_SCB_INST@GOTPAGEOFF]
Lloh10:
	adrp	x9, _SPDIFO_IP_OUTPUT_BUFFER1@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SPDIFO_IP_OUTPUT_BUFFER1@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	ldr	w4, [x9]
	ldr	w5, [x20, #8]
Lloh14:
	adrp	x8, _SCB_ON_PARENT_NEXT_SCB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCB_ON_PARENT_NEXT_SCB@GOTPAGEOFF]
Lloh16:
	ldr	w6, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_cs46xx_dsp_create_asynch_fg_tx_scb
	str	w0, [x20, #12]
Lloh19:
	adrp	x8, _SP_SPDOUT_CSUV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SP_SPDOUT_CSUV@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_cs46xx_poke_via_dsp
Lloh22:
	adrp	x8, _DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DSP_SPDIF_STATUS_PLAYBACK_OPEN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DSP_SPDIF_STATUS_OUTPUT_ENABLED,4,2 ; @DSP_SPDIF_STATUS_OUTPUT_ENABLED
	.comm	_DSP_SPDIF_STATUS_HW_ENABLED,4,2 ; @DSP_SPDIF_STATUS_HW_ENABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AsynchFGTxSCB"

	.comm	_ASYNCTX_SCB_ADDR,4,2           ; @ASYNCTX_SCB_ADDR
	.comm	_SPDIFO_SCB_INST,4,2            ; @SPDIFO_SCB_INST
	.comm	_SPDIFO_IP_OUTPUT_BUFFER1,4,2   ; @SPDIFO_IP_OUTPUT_BUFFER1
	.comm	_SCB_ON_PARENT_NEXT_SCB,4,2     ; @SCB_ON_PARENT_NEXT_SCB
	.comm	_SP_SPDOUT_CSUV,4,2             ; @SP_SPDOUT_CSUV
	.comm	_DSP_SPDIF_STATUS_PLAYBACK_OPEN,4,2 ; @DSP_SPDIF_STATUS_PLAYBACK_OPEN
.subsections_via_symbols
