	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_trident_spdif_close
_snd_trident_spdif_close:               ## @snd_trident_spdif_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	leaq	28(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	(%r15), %rax
	movq	_TRIDENT_DEVICE_ID_SI7018@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movl	8(%r15), %ebx
	movq	_SI_SPDIF_CS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movq	_SI_SERIAL_INTF_CTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movl	%eax, %edi
	callq	_inl
	movq	_SPDIF_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %ecx
	orl	%eax, %ecx
	notl	%ebx
	andl	%eax, %ebx
	cmpq	$0, 32(%r15)
	cmovnel	%ecx, %ebx
	jmp	LBB0_3
LBB0_1:
	movq	32(%r15), %rbx
	movq	_NX_SPCTRL_SPCSO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$3, %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_outb
	movl	8(%r15), %ebx
	movq	_NX_SPCSTATUS@GOTPCREL(%rip), %r12
LBB0_3:
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_TRID_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outl
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movq	_SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r15), %rdx
	movq	8(%rdx), %rcx
	orl	%eax, (%rcx)
	movl	24(%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
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRIDENT_DEVICE_ID_SI7018,8,3   ## @TRIDENT_DEVICE_ID_SI7018
	.comm	_NX_SPCTRL_SPCSO,8,3            ## @NX_SPCTRL_SPCSO
	.comm	_NX_SPCSTATUS,8,3               ## @NX_SPCSTATUS
	.comm	_SI_SPDIF_CS,8,3                ## @SI_SPDIF_CS
	.comm	_SI_SERIAL_INTF_CTRL,8,3        ## @SI_SERIAL_INTF_CTRL
	.comm	_SPDIF_EN,4,2                   ## @SPDIF_EN
	.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_trident_spdif_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_trident_spdif_close
_snd_trident_spdif_close:               ; @snd_trident_spdif_close
	.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
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	add	x20, x0, #28
	mov	x0, x20
	bl	_spin_lock_irq
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TRIDENT_DEVICE_ID_SI7018@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TRIDENT_DEVICE_ID_SI7018@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w21, [x19, #8]
Lloh3:
	adrp	x8, _SI_SPDIF_CS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SI_SPDIF_CS@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_TRID_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
Lloh6:
	adrp	x22, _SI_SERIAL_INTF_CTRL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SI_SERIAL_INTF_CTRL@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_TRID_REG
	bl	_inl
Lloh8:
	adrp	x8, _SPDIF_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPDIF_EN@GOTPAGEOFF]
	ldr	x9, [x19, #32]
Lloh10:
	ldr	w8, [x8]
	orr	w10, w8, w0
	bic	w8, w0, w8
	cmp	x9, #0
	csel	w21, w8, w10, eq
	b	LBB0_3
LBB0_2:
	ldr	x21, [x19, #32]
Lloh11:
	adrp	x8, _NX_SPCTRL_SPCSO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NX_SPCTRL_SPCSO@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x1, x8, #3
	mov	x0, x19
	bl	_TRID_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outb
	ldr	w21, [x19, #8]
Lloh14:
	adrp	x22, _NX_SPCSTATUS@GOTPAGE
Lloh15:
	ldr	x22, [x22, _NX_SPCSTATUS@GOTPAGEOFF]
LBB0_3:
	ldr	x1, [x22]
	mov	x0, x19
	bl	_TRID_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
	mov	x0, x20
	bl	_spin_unlock_irq
Lloh16:
	adrp	x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	x2, [x19, #16]
	ldr	x9, [x2, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
Lloh19:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
	ldr	w0, [x19, #24]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_snd_ctl_notify
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_TRIDENT_DEVICE_ID_SI7018,8,3   ; @TRIDENT_DEVICE_ID_SI7018
	.comm	_NX_SPCTRL_SPCSO,8,3            ; @NX_SPCTRL_SPCSO
	.comm	_NX_SPCSTATUS,8,3               ; @NX_SPCSTATUS
	.comm	_SI_SPDIF_CS,8,3                ; @SI_SPDIF_CS
	.comm	_SI_SERIAL_INTF_CTRL,8,3        ; @SI_SERIAL_INTF_CTRL
	.comm	_SPDIF_EN,4,2                   ; @SPDIF_EN
	.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_trident_spdif_close
.subsections_via_symbols
