	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ymfpci_playback_spdif_open
_snd_ymfpci_playback_spdif_open:        ## @snd_ymfpci_playback_spdif_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, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	%rbx, %rdi
	callq	_snd_ymfpci_playback_open_1
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	movq	$0, 8(%rax)
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, (%rax)
	movq	%r15, %r14
	addq	$20, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	_YDSXGR_SPDIFOUTCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_snd_ymfpci_readw
	orl	$2, %eax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_snd_ymfpci_writew
	movq	%r15, %rdi
	callq	_ymfpci_open_extension
	movl	4(%r15), %edx
	movl	%edx, (%r15)
	movq	_YDSXGR_SPDIFOUTSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_snd_ymfpci_writew
	incl	24(%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movq	_SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%r15), %rdx
	movq	8(%rdx), %rcx
	andl	%eax, (%rcx)
	movl	16(%r15), %edi
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movq	_SNDRV_CTL_EVENT_MASK_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_snd_ctl_notify
	xorl	%eax, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_YDSXGR_SPDIFOUTCTRL,4,2        ## @YDSXGR_SPDIFOUTCTRL
	.comm	_YDSXGR_SPDIFOUTSTATUS,4,2      ## @YDSXGR_SPDIFOUTSTATUS
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ## @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ## @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_snd_ymfpci_playback_spdif_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ymfpci_playback_spdif_open
_snd_ymfpci_playback_spdif_open:        ; @snd_ymfpci_playback_spdif_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	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x21, [x20]
	mov	x0, x20
	bl	_snd_ymfpci_playback_open_1
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	str	xzr, [x8, #8]
	movi.2s	v0, #1
	str	d0, [x8]
	add	x20, x19, #20
	mov	x0, x20
	bl	_spin_lock_irq
Lloh0:
	adrp	x8, _YDSXGR_SPDIFOUTCTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _YDSXGR_SPDIFOUTCTRL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_snd_ymfpci_readw
	orr	w2, w0, #0x2
	mov	x0, x19
	mov	x1, x21
	bl	_snd_ymfpci_writew
	mov	x0, x19
	bl	_ymfpci_open_extension
	ldr	w2, [x19, #4]
	str	w2, [x19]
Lloh3:
	adrp	x8, _YDSXGR_SPDIFOUTSTATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _YDSXGR_SPDIFOUTSTATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_ymfpci_writew
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	mov	x0, x20
	bl	_spin_unlock_irq
Lloh6:
	adrp	x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x2, [x19, #8]
	ldr	x9, [x2, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
Lloh9:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
	ldr	w0, [x19, #16]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_snd_ctl_notify
	mov	w0, #0
LBB0_2:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_YDSXGR_SPDIFOUTCTRL,4,2        ; @YDSXGR_SPDIFOUTCTRL
	.comm	_YDSXGR_SPDIFOUTSTATUS,4,2      ; @YDSXGR_SPDIFOUTSTATUS
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ; @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.comm	_SNDRV_CTL_EVENT_MASK_INFO,4,2  ; @SNDRV_CTL_EVENT_MASK_INFO
	.no_dead_strip	_snd_ymfpci_playback_spdif_open
.subsections_via_symbols
