	.file	"extr_v4l2_m2m.c_v4l2_prepare_contexts.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mplane"
.LC1:
	.string	"splane"
.LC2:
	.string	"unknown"
.LC3:
	.string	"capture"
.LC4:
	.string	"output"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC5:
	.string	"driver '%s' on card '%s' in %s mode\n"
	.text
	.p2align 4
	.type	v4l2_prepare_contexts, @function
v4l2_prepare_contexts:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	add	rdi, 56
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -40[rdi], 0
	mov	rbp, rsp
	mov	QWORD PTR -32[rdi], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -16[rdi], 0
	mov	QWORD PTR -56[rdi], rax
	call	atomic_init@PLT
	xor	edx, edx
	xor	esi, esi
	lea	rdi, 52[rbx]
	call	sem_init@PLT
	xor	esi, esi
	mov	edx, 8
	mov	rdi, rbp
	call	memset@PLT
	mov	edi, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR VIDIOC_QUERYCAP[rip]
	mov	rdx, rbp
	call	ioctl@PLT
	test	eax, eax
	js	.L1
	mov	rdi, rbp
	call	v4l2_mplane_video@PLT
	lea	r9, .LC0[rip]
	test	rax, rax
	je	.L13
.L3:
	test	r12d, r12d
	mov	esi, DWORD PTR AV_LOG_DEBUG[rip]
	mov	r8d, DWORD PTR [rsp]
	mov	rdi, r13
	cmove	esi, DWORD PTR AV_LOG_INFO[rip]
	mov	ecx, DWORD PTR 4[rsp]
	lea	rdx, .LC5[rip]
	call	av_log@PLT
	mov	rdi, rbp
	call	v4l2_mplane_video@PLT
	test	rax, rax
	je	.L6
	mov	eax, DWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE[rip]
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE[rip]
	mov	DWORD PTR 8[rbx], eax
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L14
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rdi, rbp
	call	v4l2_splane_video@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR V4L2_BUF_TYPE_VIDEO_OUTPUT[rip]
	mov	DWORD PTR 8[rbx], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, rbp
	call	v4l2_splane_video@PLT
	lea	r9, .LC1[rip]
	test	rax, rax
	lea	rax, .LC2[rip]
	cmove	r9, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR EINVAL[rip]
	call	AVERROR@PLT
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	v4l2_prepare_contexts, .-v4l2_prepare_contexts
	.comm	VIDIOC_QUERYCAP,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_OUTPUT,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,4,4
	.comm	EINVAL,4,4
	.comm	AV_LOG_INFO,4,4
	.comm	AV_LOG_DEBUG,4,4
	.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_v4l2_m2m.c_v4l2_prepare_contexts.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mplane\000"
	.align	2
.LC1:
	.ascii	"splane\000"
	.align	2
.LC2:
	.ascii	"unknown\000"
	.align	2
.LC3:
	.ascii	"capture\000"
	.align	2
.LC4:
	.ascii	"output\000"
	.align	2
.LC5:
	.ascii	"driver '%s' on card '%s' in %s mode\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	v4l2_prepare_contexts, %function
v4l2_prepare_contexts:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, #0
	mov	r4, r0
	ldr	r3, .L15
	ldr	r2, .L15+4
	mov	r6, r1
	ldr	r1, .L15+8
	sub	sp, sp, #24
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r7, [r0, #36]
	str	r1, [r0, #12]
	str	r5, [r0, #8]
	mov	r1, r5
	str	r5, [r0, #20]
	str	r2, [r0], #32
	bl	atomic_init
	mov	r2, r5
	mov	r1, r5
	add	r0, r4, #28
	bl	sem_init
	ldr	r3, .L15+12
	ldr	r0, [r4, #24]
	ldr	r1, [r3]
	add	r2, sp, #12
	str	r5, [sp, #12]
	str	r5, [sp, #16]
	bl	ioctl
	subs	r5, r0, #0
	blt	.L1
	cmp	r6, #0
	ldrne	r3, .L15+16
	ldreq	r3, .L15+20
	add	r0, sp, #12
	ldr	r5, [r3]
	ldr	r6, [sp, #16]
	ldr	r8, [sp, #12]
	bl	v4l2_mplane_video
	cmp	r0, #0
	ldrne	r0, .L15+24
	beq	.L13
.L5:
	mov	r1, r5
	mov	r3, r6
	ldr	r2, .L15+28
	str	r0, [sp, #4]
	str	r8, [sp]
	mov	r0, r7
	bl	av_log
	add	r0, sp, #12
	bl	v4l2_mplane_video
	subs	r5, r0, #0
	beq	.L6
	mov	r5, #0
	ldr	r2, .L15+32
	ldr	r3, .L15+36
	ldr	r2, [r2]
	ldr	r3, [r3]
	str	r2, [r4, #16]
	str	r3, [r4, #4]
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	add	r0, sp, #12
	bl	v4l2_splane_video
	cmp	r0, #0
	beq	.L7
	ldr	r2, .L15+40
	ldr	r3, .L15+44
	ldr	r2, [r2]
	ldr	r3, [r3]
	str	r2, [r4, #16]
	str	r3, [r4, #4]
	b	.L1
.L13:
	add	r0, sp, #12
	bl	v4l2_splane_video
	ldr	r2, .L15+48
	ldr	r3, .L15+52
	cmp	r0, #0
	movne	r0, r2
	moveq	r0, r3
	b	.L5
.L7:
	ldr	r3, .L15+56
	ldr	r0, [r3]
	bl	AVERROR
	mov	r5, r0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	.LC4
	.word	.LC3
	.word	VIDIOC_QUERYCAP
	.word	AV_LOG_DEBUG
	.word	AV_LOG_INFO
	.word	.LC0
	.word	.LC5
	.word	V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.word	V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.word	V4L2_BUF_TYPE_VIDEO_CAPTURE
	.word	V4L2_BUF_TYPE_VIDEO_OUTPUT
	.word	.LC1
	.word	.LC2
	.word	EINVAL
	.size	v4l2_prepare_contexts, .-v4l2_prepare_contexts
	.comm	VIDIOC_QUERYCAP,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_OUTPUT,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,4,4
	.comm	EINVAL,4,4
	.comm	AV_LOG_INFO,4,4
	.comm	AV_LOG_DEBUG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
