	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxygen_close
_oxygen_close:                          ## @oxygen_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
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_oxygen_substream_channel
	movl	%eax, %ebx
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	$-2, %eax
	movl	%ebx, %ecx
	roll	%cl, %eax
	andl	%eax, (%r14)
	movq	_PCM_SPDIF@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jne	LBB0_2
## %bb.1:
	movq	_SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%r14), %rcx
	movq	_CONTROL_SPDIF_PCM@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rdx
	movq	8(%rdx), %rcx
	orl	%eax, (%rcx)
	movl	32(%r14), %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
	movl	(%r12), %eax
LBB0_2:
	cmpl	%eax, %ebx
	je	LBB0_4
## %bb.3:
	movq	_PCM_MULTICH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_oxygen_update_spdif_source
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	8(%r14), %rax
	movl	%ebx, %ecx
	movq	$0, (%rax,%rcx,8)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCM_SPDIF,4,2                  ## @PCM_SPDIF
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ## @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_CONTROL_SPDIF_PCM,8,3          ## @CONTROL_SPDIF_PCM
	.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
	.comm	_PCM_MULTICH,4,2                ## @PCM_MULTICH
	.no_dead_strip	_oxygen_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxygen_close
_oxygen_close:                          ; @oxygen_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
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	mov	x0, x20
	bl	_oxygen_substream_channel
	mov	x20, x0
	add	x21, x19, #16
	mov	x0, x21
	bl	_mutex_lock
	mov	w8, #1
	lsl	w8, w8, w20
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh0:
	adrp	x22, _PCM_SPDIF@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCM_SPDIF@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w20, w8
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SNDRV_CTL_ELEM_ACCESS_INACTIVE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x19, #24]
Lloh5:
	adrp	x10, _CONTROL_SPDIF_PCM@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CONTROL_SPDIF_PCM@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	ldr	x2, [x9, x10, lsl #3]
	ldr	x9, [x2, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
Lloh8:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
	ldr	w0, [x19, #32]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SNDRV_CTL_EVENT_MASK_INFO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_snd_ctl_notify
	ldr	w8, [x22]
LBB0_2:
Lloh14:
	adrp	x9, _PCM_MULTICH@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCM_MULTICH@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w20, w8
	ccmp	w20, w9, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_oxygen_update_spdif_source
LBB0_4:
	mov	x0, x21
	bl	_mutex_unlock
	ldr	x8, [x19, #8]
	str	xzr, [x8, w20, uxtw #3]
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PCM_SPDIF,4,2                  ; @PCM_SPDIF
	.comm	_SNDRV_CTL_ELEM_ACCESS_INACTIVE,4,2 ; @SNDRV_CTL_ELEM_ACCESS_INACTIVE
	.comm	_CONTROL_SPDIF_PCM,8,3          ; @CONTROL_SPDIF_PCM
	.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
	.comm	_PCM_MULTICH,4,2                ; @PCM_MULTICH
	.no_dead_strip	_oxygen_close
.subsections_via_symbols
