	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_cx231xx_pcm_close
_snd_cx231xx_pcm_close:                 ## @snd_cx231xx_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_snd_pcm_substream_chip
	movq	%rax, %rbx
	movq	%rax, %r14
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	leaq	32(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_Audio@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cx231xx_capture_start
	movq	_INDEX_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_cx231xx_set_alt_setting
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	decq	16(%r14)
	movq	(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_vfree
	movq	(%r12), %rax
	movq	$0, (%rax)
LBB0_4:
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%r15d, %r15d
	cmpq	$0, 16(%r14)
	jne	LBB0_8
## %bb.5:
	cmpl	$1, 24(%r14)
	jne	LBB0_8
## %bb.6:
	movl	8(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$0, 24(%r14)
	movl	8(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jle	LBB0_8
## %bb.7:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	%r14, %rdi
	callq	_schedule_work
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %r15d
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"closing device\n"

	.comm	_Audio,4,2                      ## @Audio
	.comm	_INDEX_AUDIO,4,2                ## @INDEX_AUDIO
L_.str.1:                               ## @.str.1
	.asciz	"failed to set alternate setting !\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"audio users: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"disabling audio stream!\n"

L_.str.5:                               ## @.str.5
	.asciz	"released lock\n"

	.no_dead_strip	_snd_cx231xx_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_cx231xx_pcm_close
_snd_cx231xx_pcm_close:                 ; @snd_cx231xx_pcm_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	add	x20, x19, #32
	mov	x0, x20
	bl	_mutex_lock
Lloh2:
	adrp	x8, _Audio@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Audio@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_cx231xx_capture_start
Lloh5:
	adrp	x8, _INDEX_AUDIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INDEX_AUDIO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_cx231xx_set_alt_setting
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	x8, [x19, #16]
	sub	x8, x8, #1
	str	x8, [x19, #16]
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x21]
	ldr	x0, [x8]
	bl	_vfree
	ldr	x8, [x21]
	str	xzr, [x8]
LBB0_3:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_7
; %bb.4:
	ldr	w8, [x19, #24]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.5:
	ldr	w0, [x19, #8]
	str	xzr, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	str	wzr, [x19, #24]
	ldr	w0, [x19, #8]
Lloh14:
	adrp	x1, l_.str.5@PAGE
Lloh15:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	add	x20, x19, #4
	mov	x0, x20
	bl	_atomic_read
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	w1, #0
	bl	_atomic_set
	mov	x0, x19
	bl	_schedule_work
LBB0_7:
	mov	w22, #0
	b	LBB0_9
LBB0_8:
	mov	x22, x0
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"closing device\n"

	.comm	_Audio,4,2                      ; @Audio
	.comm	_INDEX_AUDIO,4,2                ; @INDEX_AUDIO
l_.str.1:                               ; @.str.1
	.asciz	"failed to set alternate setting !\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"audio users: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"disabling audio stream!\n"

l_.str.5:                               ; @.str.5
	.asciz	"released lock\n"

	.no_dead_strip	_snd_cx231xx_pcm_close
.subsections_via_symbols
