	.file	"extr_cx18-ioctl.c_cx18_s_fmt_vid_cap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cx18_s_fmt_vid_cap, @function
cx18_s_fmt_vid_cap:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	rdi, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	fh2id@PLT
	mov	edx, DWORD PTR V4L2_SUBDEV_FORMAT_ACTIVE[rip]
	mov	rsi, rbp
	mov	rdi, r13
	mov	r15, QWORD PTR 8[rax]
	mov	r14, QWORD PTR [rax]
	mov	DWORD PTR 24[rsp], 0
	mov	DWORD PTR 28[rsp], edx
	mov	rdx, r12
	mov	QWORD PTR 16[rsp], 0
	mov	rbx, QWORD PTR 16[r15]
	call	cx18_try_fmt_vid_cap@PLT
	test	eax, eax
	jne	.L1
	sal	r14, 4
	mov	edx, DWORD PTR [r12]
	add	rbx, r14
	mov	r14d, DWORD PTR 4[r12]
	cmp	DWORD PTR 4[r15], edx
	jne	.L3
	cmp	DWORD PTR 8[r15], r14d
	je	.L10
.L3:
	lea	rdi, 12[r15]
	mov	DWORD PTR 12[rsp], edx
	call	atomic_read@PLT
	mov	edx, DWORD PTR 12[rsp]
	test	rax, rax
	jg	.L11
	mov	rax, QWORD PTR 8[r12]
	cmp	rax, QWORD PTR V4L2_PIX_FMT_HM12[rip]
	mov	QWORD PTR [rbx], rax
	je	.L12
	imul	eax, r14d, 1440
	mov	DWORD PTR 12[rbx], 1440
	mov	DWORD PTR 8[rbx], eax
.L6:
	mov	DWORD PTR 4[r15], edx
	mov	edi, DWORD PTR [r15]
	lea	r8, 16[rsp]
	xor	ecx, ecx
	mov	eax, DWORD PTR MEDIA_BUS_FMT_FIXED[rip]
	mov	esi, DWORD PTR pad[rip]
	mov	DWORD PTR 8[r15], r14d
	mov	DWORD PTR 16[rsp], edx
	mov	edx, DWORD PTR set_fmt[rip]
	mov	DWORD PTR 20[rsp], r14d
	mov	DWORD PTR 24[rsp], eax
	call	v4l2_subdev_call@PLT
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r13
	call	cx18_g_fmt_vid_cap@PLT
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR EBUSY[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rcx, QWORD PTR 8[r12]
	cmp	QWORD PTR [rbx], rcx
	jne	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	imul	eax, r14d, 1080
	mov	DWORD PTR 12[rbx], 720
	mov	DWORD PTR 8[rbx], eax
	jmp	.L6
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cx18_s_fmt_vid_cap, .-cx18_s_fmt_vid_cap
	.comm	set_fmt,4,4
	.comm	pad,4,4
	.comm	V4L2_SUBDEV_FORMAT_ACTIVE,4,4
	.comm	V4L2_PIX_FMT_HM12,8,8
	.comm	MEDIA_BUS_FMT_FIXED,4,4
	.comm	EBUSY,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_cx18-ioctl.c_cx18_s_fmt_vid_cap.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cx18_s_fmt_vid_cap, %function
cx18_s_fmt_vid_cap:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L13
	sub	sp, sp, #44
	mov	r6, r0
	mov	r0, r1
	mov	r4, r2
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	fh2id
	mov	ip, #0
	mov	r3, r0
	ldr	r2, .L13+4
	ldr	r7, [r0, #4]
	ldr	lr, [r2]
	mov	r1, r5
	mov	r2, r4
	mov	r0, r6
	ldr	r9, [r3]
	ldr	r8, [r7, #16]
	str	lr, [sp, #32]
	str	ip, [sp, #20]
	str	ip, [sp, #24]
	str	ip, [sp, #28]
	bl	cx18_try_fmt_vid_cap
	cmp	r0, #0
	bne	.L1
	ldr	r2, [r7, #4]
	ldr	r10, [r4]
	add	r3, r9, r9, lsl #1
	cmp	r2, r10
	lsl	r2, r3, #2
	ldr	fp, [r4, #4]
	str	r2, [sp, #12]
	add	r9, r8, r3, lsl #2
	bne	.L3
	ldr	r2, [r7, #8]
	cmp	r2, fp
	beq	.L10
.L3:
	add	r0, r7, #12
	bl	atomic_read
	cmp	r0, #0
	bgt	.L11
	ldr	r1, .L13+8
	ldr	r2, [r4, #8]
	ldr	r1, [r1]
	ldr	r3, [sp, #12]
	cmp	r2, r1
	moveq	r1, #720
	movne	r1, #1440
	str	r2, [r8, r3]
	addeq	r2, fp, fp, lsl #3
	addne	r2, fp, fp, lsl #1
	ldr	r3, .L13+12
	rsbeq	r2, r2, r2, lsl #4
	rsbne	r2, r2, r2, lsl #4
	ldr	ip, [r3]
	lsleq	r2, r2, #3
	lslne	r2, r2, #5
	add	r3, sp, #20
	str	r2, [r9, #4]
	ldr	r0, [r7]
	str	r1, [r9, #8]
	ldr	r2, .L13+16
	stmib	r7, {r10, fp}
	str	r3, [sp]
	ldr	r3, .L13+20
	ldr	r2, [r2]
	ldr	r1, [r3]
	mov	r3, #0
	str	r10, [sp, #20]
	str	fp, [sp, #24]
	str	ip, [sp, #28]
	bl	v4l2_subdev_call
	mov	r2, r4
	mov	r1, r5
	mov	r0, r6
	bl	cx18_g_fmt_vid_cap
.L1:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, .L13+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L10:
	ldr	r3, [sp, #12]
	ldr	r2, [r4, #8]
	ldr	r1, [r8, r3]
	cmp	r1, r2
	bne	.L3
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	V4L2_SUBDEV_FORMAT_ACTIVE
	.word	V4L2_PIX_FMT_HM12
	.word	MEDIA_BUS_FMT_FIXED
	.word	set_fmt
	.word	pad
	.word	EBUSY
	.size	cx18_s_fmt_vid_cap, .-cx18_s_fmt_vid_cap
	.comm	set_fmt,4,4
	.comm	pad,4,4
	.comm	V4L2_SUBDEV_FORMAT_ACTIVE,4,4
	.comm	V4L2_PIX_FMT_HM12,4,4
	.comm	MEDIA_BUS_FMT_FIXED,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
