	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_em28xx_pcm_close
_snd_em28xx_pcm_close:                  ## @snd_em28xx_pcm_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, %r14
	callq	_snd_pcm_substream_chip
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	movl	$1, (%rbx)
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	decl	20(%rbx)
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	12(%rbx), %rdi
	callq	_schedule_work
LBB0_2:
	movq	%rbx, %rdi
	callq	_em28xx_audio_analog_set
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
	movq	(%r14), %rax
	movq	(%rax), %rdi
	callq	_vfree
	movq	(%r14), %rax
	movq	$0, (%rax)
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_unlock
	addq	$4, %rbx
	movq	_em28xx_free_device@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_kref_put
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"closing device\n"

L_.str.1:                               ## @.str.1
	.asciz	"freeing\n"

	.comm	_em28xx_free_device,4,2         ## @em28xx_free_device
	.no_dead_strip	_snd_em28xx_pcm_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_em28xx_pcm_close
_snd_em28xx_pcm_close:                  ; @snd_em28xx_pcm_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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	w8, #1
	str	w8, [x19]
	add	x21, x19, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x19, #20]
	sub	w8, w8, #1
	str	w8, [x19, #20]
	add	x22, x19, #16
	mov	x0, x22
	bl	_atomic_read
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	w1, #0
	bl	_atomic_set
	add	x0, x19, #12
	bl	_schedule_work
LBB0_2:
	mov	x0, x19
	bl	_em28xx_audio_analog_set
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_vfree
	ldr	x8, [x20]
	str	xzr, [x8]
LBB0_4:
	mov	x0, x21
	bl	_mutex_unlock
	add	x0, x19, #4
Lloh4:
	adrp	x8, _em28xx_free_device@GOTPAGE
Lloh5:
	ldr	x8, [x8, _em28xx_free_device@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_kref_put
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"closing device\n"

l_.str.1:                               ; @.str.1
	.asciz	"freeing\n"

	.comm	_em28xx_free_device,4,2         ; @em28xx_free_device
	.no_dead_strip	_snd_em28xx_pcm_close
.subsections_via_symbols
