	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_cx18_pcm_capture_open
_snd_cx18_pcm_capture_open:             ## @snd_cx18_pcm_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
	subq	$40, %rsp
	.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, %r12
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rdi
	callq	_to_cx18
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_snd_cx18_lock
	movq	8(%rbx), %r13
	movq	_CX18_ENC_STREAM_TYPE_PCM@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%rbx, -56(%rbp)
	movl	4(%r13,%r15,8), %esi
	movl	%esi, -72(%rbp)
	movslq	4(%rbx), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 4(%rbx)
	movq	%rax, -64(%rbp)
	leaq	-72(%rbp), %rdi
	callq	_cx18_claim_stream
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_snd_cx18_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	leaq	(%r13,%r15,8), %r13
	movq	_CX18_F_S_STREAMOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_CX18_F_S_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	%r12, %rdi
	callq	_snd_cx18_unlock
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_snd_cx18_hw_capture@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, 8(%r15)
	movq	_SNDRV_PCM_HW_PARAM_PERIODS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_snd_pcm_hw_constraint_integer
	movq	%r14, (%r12)
	movq	%rbx, (%r15)
	movq	_cx18_alsa_announce_pcm_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_CX18_F_S_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_set_bit
	movq	%r13, %rdi
	callq	_cx18_start_v4l2_encode_stream
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_snd_cx18_unlock
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_CX18_ENC_STREAM_TYPE_PCM,8,3   ## @CX18_ENC_STREAM_TYPE_PCM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CX18_F_S_STREAMOFF,4,2         ## @CX18_F_S_STREAMOFF
	.comm	_CX18_F_S_STREAMING,4,2         ## @CX18_F_S_STREAMING
	.comm	_snd_cx18_hw_capture,4,2        ## @snd_cx18_hw_capture
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ## @SNDRV_PCM_HW_PARAM_PERIODS
	.comm	_cx18_alsa_announce_pcm_data,4,2 ## @cx18_alsa_announce_pcm_data
	.no_dead_strip	_snd_cx18_pcm_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_cx18_pcm_capture_open
_snd_cx18_pcm_capture_open:             ; @snd_cx18_pcm_capture_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x21, [x20]
	ldr	x0, [x0, #8]
	bl	_to_cx18
	mov	x23, x0
	mov	x0, x19
	bl	_snd_cx18_lock
	ldr	x8, [x23, #8]
Lloh0:
	adrp	x9, _CX18_ENC_STREAM_TYPE_PCM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_PCM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x22, x8, x9, lsl #3
	str	x23, [sp, #24]
	ldr	w1, [x22, #4]
	str	w1, [sp, #8]
	ldrsw	x8, [x23, #4]
	add	w9, w8, #1
	str	w9, [x23, #4]
	str	x8, [sp, #16]
	add	x0, sp, #8
	bl	_cx18_claim_stream
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_snd_cx18_unlock
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_2:
Lloh6:
	adrp	x8, _CX18_F_S_STREAMOFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CX18_F_S_STREAMOFF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x24, _CX18_F_S_STREAMING@GOTPAGE
Lloh10:
	ldr	x24, [x24, _CX18_F_S_STREAMING@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x22
	bl	_test_and_set_bit
	cbz	x0, LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_snd_cx18_unlock
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
Lloh11:
	adrp	x8, _snd_cx18_hw_capture@GOTPAGE
Lloh12:
	ldr	x8, [x8, _snd_cx18_hw_capture@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x21, #8]
Lloh14:
	adrp	x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_PERIODS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_snd_pcm_hw_constraint_integer
	str	x20, [x19]
	str	x23, [x21]
Lloh17:
	adrp	x8, _cx18_alsa_announce_pcm_data@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cx18_alsa_announce_pcm_data@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x23]
	ldr	w0, [x24]
	mov	x1, x22
	bl	_set_bit
	mov	x0, x22
	bl	_cx18_start_v4l2_encode_stream
	mov	x20, x0
	mov	x0, x19
	bl	_snd_cx18_unlock
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CX18_ENC_STREAM_TYPE_PCM,8,3   ; @CX18_ENC_STREAM_TYPE_PCM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CX18_F_S_STREAMOFF,4,2         ; @CX18_F_S_STREAMOFF
	.comm	_CX18_F_S_STREAMING,4,2         ; @CX18_F_S_STREAMING
	.comm	_snd_cx18_hw_capture,4,2        ; @snd_cx18_hw_capture
	.comm	_SNDRV_PCM_HW_PARAM_PERIODS,4,2 ; @SNDRV_PCM_HW_PARAM_PERIODS
	.comm	_cx18_alsa_announce_pcm_data,4,2 ; @cx18_alsa_announce_pcm_data
	.no_dead_strip	_snd_cx18_pcm_capture_open
.subsections_via_symbols
