	.file	"extr_cx18-alsa-pcm.c_snd_cx18_pcm_capture_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_cx18_pcm_capture_open, @function
snd_cx18_pcm_capture_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	snd_pcm_substream_chip@PLT
	mov	r14, QWORD PTR [r12]
	mov	rdi, QWORD PTR 8[rax]
	mov	rbp, rax
	call	to_cx18@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	snd_cx18_lock@PLT
	mov	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR 16[rsp], rbx
	mov	rdi, rsp
	mov	rdx, QWORD PTR CX18_ENC_STREAM_TYPE_PCM[rip]
	lea	r13, [rax+rdx*8]
	movsx	rax, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR 4[r13]
	lea	edx, 1[rax]
	mov	DWORD PTR 4[rbx], edx
	mov	DWORD PTR [rsp], esi
	mov	QWORD PTR 8[rsp], rax
	call	cx18_claim_stream@PLT
	test	rax, rax
	jne	.L9
	mov	edi, DWORD PTR CX18_F_S_STREAMOFF[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L5
	mov	edi, DWORD PTR CX18_F_S_STREAMING[rip]
	mov	rsi, r13
	call	test_and_set_bit@PLT
	test	rax, rax
	jne	.L5
	mov	eax, DWORD PTR snd_cx18_hw_capture[rip]
	mov	esi, DWORD PTR SNDRV_PCM_HW_PARAM_PERIODS[rip]
	mov	rdi, r14
	mov	DWORD PTR 8[r14], eax
	call	snd_pcm_hw_constraint_integer@PLT
	mov	eax, DWORD PTR cx18_alsa_announce_pcm_data[rip]
	mov	QWORD PTR 0[rbp], r12
	mov	rsi, r13
	mov	QWORD PTR [r14], rbx
	mov	edi, DWORD PTR CX18_F_S_STREAMING[rip]
	mov	DWORD PTR [rbx], eax
	call	set_bit@PLT
	mov	rdi, r13
	call	cx18_start_v4l2_encode_stream@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	snd_cx18_unlock@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, rbp
	xor	r12d, r12d
	call	snd_cx18_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbp
	call	snd_cx18_unlock@PLT
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	snd_cx18_pcm_capture_open, .-snd_cx18_pcm_capture_open
	.comm	snd_cx18_hw_capture,4,4
	.comm	cx18_alsa_announce_pcm_data,4,4
	.comm	SNDRV_PCM_HW_PARAM_PERIODS,4,4
	.comm	EBUSY,4,4
	.comm	CX18_F_S_STREAMOFF,4,4
	.comm	CX18_F_S_STREAMING,4,4
	.comm	CX18_ENC_STREAM_TYPE_PCM,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cx18-alsa-pcm.c_snd_cx18_pcm_capture_open.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_cx18_pcm_capture_open, %function
snd_cx18_pcm_capture_open:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L12
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r8, r0
	bl	snd_pcm_substream_chip
	mov	r6, r0
	ldr	r0, [r0, #4]
	ldr	r9, [r8]
	bl	to_cx18
	mov	r4, r0
	mov	r0, r6
	bl	snd_cx18_lock
	ldr	r3, .L12+4
	ldr	r7, [r4, #8]
	ldr	r2, [r3]
	ldr	r3, [r4, #4]
	add	r7, r7, r2, lsl #3
	ldr	r1, [r7, #4]
	add	r2, r3, #1
	str	r4, [sp, #8]
	mov	r0, sp
	str	r2, [r4, #4]
	stm	sp, {r1, r3}
	bl	cx18_claim_stream
	subs	r5, r0, #0
	bne	.L10
	ldr	r3, .L12+8
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L8
	ldr	r10, .L12+12
	mov	r1, r7
	ldr	r0, [r10]
	bl	test_and_set_bit
	cmp	r0, #0
	bne	.L8
	ldr	r3, .L12+16
	ldr	r2, .L12+20
	ldr	r3, [r3]
	ldr	r1, [r2]
	str	r3, [r9, #4]
	mov	r0, r9
	bl	snd_pcm_hw_constraint_integer
	ldr	r3, .L12+24
	str	r8, [r6]
	ldr	r3, [r3]
	mov	r1, r7
	ldr	r0, [r10]
	str	r4, [r9]
	str	r3, [r4]
	bl	set_bit
	mov	r0, r7
	bl	cx18_start_v4l2_encode_stream
	mov	r5, r0
.L8:
	mov	r0, r6
	bl	snd_cx18_unlock
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r0, r6
	bl	snd_cx18_unlock
	ldr	r3, .L12+28
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	CX18_ENC_STREAM_TYPE_PCM
	.word	CX18_F_S_STREAMOFF
	.word	CX18_F_S_STREAMING
	.word	snd_cx18_hw_capture
	.word	SNDRV_PCM_HW_PARAM_PERIODS
	.word	cx18_alsa_announce_pcm_data
	.word	EBUSY
	.size	snd_cx18_pcm_capture_open, .-snd_cx18_pcm_capture_open
	.comm	snd_cx18_hw_capture,4,4
	.comm	cx18_alsa_announce_pcm_data,4,4
	.comm	SNDRV_PCM_HW_PARAM_PERIODS,4,4
	.comm	EBUSY,4,4
	.comm	CX18_F_S_STREAMOFF,4,4
	.comm	CX18_F_S_STREAMING,4,4
	.comm	CX18_ENC_STREAM_TYPE_PCM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
