	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_cx231xx_capture_open
_snd_cx231xx_capture_open:              ## @snd_cx231xx_capture_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	%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, %r14
	callq	_snd_pcm_substream_chip
	movq	%rax, %r13
	movq	%rax, %r12
	movq	(%r14), %r15
	movl	28(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_DEV_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.1:
	movl	28(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	addq	$24, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	xorl	%edx, %edx
	cmpq	$0, 32(%r12)
	setne	%dl
	movq	_INDEX_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_cx231xx_set_alt_setting
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.4:
	movq	_snd_cx231xx_hw_capture@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_Audio@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_cx231xx_capture_start
	incl	16(%r12)
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_SNDRV_PCM_HW_PARAM_PERIODS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_snd_pcm_hw_constraint_integer
	movq	%r14, 8(%r12)
	movq	%r12, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_3:
	movl	28(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movl	%ebx, %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	"opening device and trying to acquire exclusive lock\n"

	.comm	_DEV_DISCONNECTED,4,2           ## @DEV_DISCONNECTED
L_.str.1:                               ## @.str.1
	.asciz	"Can't open. the device was removed.\n"

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

	.comm	_snd_cx231xx_hw_capture,4,2     ## @snd_cx231xx_hw_capture
	.comm	_Audio,4,2                      ## @Audio
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ## @SNDRV_PCM_HW_PARAM_PERIODS
	.no_dead_strip	_snd_cx231xx_capture_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_cx231xx_capture_open
_snd_cx231xx_capture_open:              ; @snd_cx231xx_capture_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	ldr	x21, [x19]
	ldr	w0, [x0, #28]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _DEV_DISCONNECTED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DEV_DISCONNECTED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x20, #28]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
LBB0_2:
	add	x22, x20, #24
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x20, #32]
	cmp	x8, #0
	cset	w2, ne
Lloh10:
	adrp	x8, _INDEX_AUDIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INDEX_AUDIO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_cx231xx_set_alt_setting
	mov	x23, x0
	mov	x0, x22
	bl	_mutex_unlock
	tbnz	w23, #31, LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _snd_cx231xx_hw_capture@GOTPAGE
Lloh14:
	ldr	x8, [x8, _snd_cx231xx_hw_capture@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	mov	x0, x22
	bl	_mutex_lock
Lloh16:
	adrp	x8, _Audio@GOTPAGE
Lloh17:
	ldr	x8, [x8, _Audio@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #1
	bl	_cx231xx_capture_start
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
	mov	x0, x22
	bl	_mutex_unlock
Lloh19:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_snd_pcm_hw_constraint_integer
	mov	w23, #0
	str	x19, [x20, #8]
	str	x20, [x21]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #28]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"opening device and trying to acquire exclusive lock\n"

	.comm	_DEV_DISCONNECTED,4,2           ; @DEV_DISCONNECTED
l_.str.1:                               ; @.str.1
	.asciz	"Can't open. the device was removed.\n"

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

	.comm	_snd_cx231xx_hw_capture,4,2     ; @snd_cx231xx_hw_capture
	.comm	_Audio,4,2                      ; @Audio
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ; @SNDRV_PCM_HW_PARAM_PERIODS
	.no_dead_strip	_snd_cx231xx_capture_open
.subsections_via_symbols
