	.file	"extr_cobalt-v4l2.c_cobalt_try_fmt_vid_cap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cobalt_try_fmt_vid_cap, @function
cobalt_try_fmt_vid_cap:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdx
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	video_drvdata@PLT
	mov	edx, DWORD PTR [rbx]
	cmp	edx, 175
	jle	.L2
	mov	ecx, DWORD PTR 4[rbx]
	cmp	ecx, 143
	jg	.L3
.L2:
	mov	DWORD PTR [rbx], 176
	mov	ecx, 144
	mov	edx, 176
.L4:
	and	edx, -4
	and	ecx, -2
	cmp	DWORD PTR [rax], 1
	mov	DWORD PTR [rbx], edx
	mov	DWORD PTR 4[rbx], ecx
	jne	.L6
.L18:
	movabs	rax, 4638564681600
	mov	edi, DWORD PTR 12[rbx]
	mov	esi, 1920
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR V4L2_COLORSPACE_SRGB[rip]
	and	edi, -4
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, 129
	je	.L8
.L19:
	cmp	eax, 130
	je	.L9
	imul	esi, DWORD PTR COBALT_BYTES_PER_PIXEL_YUYV[rip]
	call	max@PLT
	mov	DWORD PTR 8[rbx], 128
	mov	DWORD PTR 12[rbx], eax
.L10:
	imul	eax, DWORD PTR 4[rbx]
	mov	DWORD PTR 16[rbx], eax
	mov	eax, DWORD PTR V4L2_FIELD_NONE[rip]
	mov	DWORD PTR 20[rbx], eax
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	edx, 1920
	jle	.L17
.L13:
	mov	ecx, 1080
	mov	edx, 1920
	cmp	DWORD PTR [rax], 1
	mov	DWORD PTR [rbx], edx
	mov	DWORD PTR 4[rbx], ecx
	je	.L18
.L6:
	mov	edx, DWORD PTR 8[rax]
	mov	edi, DWORD PTR 4[rax]
	lea	rbp, 12[rsp]
	xor	ecx, ecx
	mov	esi, DWORD PTR pad[rip]
	mov	r8, rbp
	mov	DWORD PTR 20[rsp], edx
	mov	edx, DWORD PTR V4L2_SUBDEV_FORMAT_ACTIVE[rip]
	mov	DWORD PTR 16[rsp], edx
	mov	edx, DWORD PTR get_fmt[rip]
	call	v4l2_subdev_call@PLT
	mov	rsi, rbp
	mov	rdi, rbx
	call	v4l2_fill_pix_format@PLT
	mov	edi, DWORD PTR 12[rbx]
	mov	eax, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR [rbx]
	and	edi, -4
	cmp	eax, 129
	jne	.L19
.L8:
	imul	esi, DWORD PTR COBALT_BYTES_PER_PIXEL_RGB24[rip]
	call	max@PLT
	mov	DWORD PTR 12[rbx], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	imul	esi, DWORD PTR COBALT_BYTES_PER_PIXEL_RGB32[rip]
	call	max@PLT
	mov	DWORD PTR 12[rbx], eax
	jmp	.L10
.L16:
	call	__stack_chk_fail@PLT
.L17:
	cmp	ecx, 1080
	jg	.L13
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	cobalt_try_fmt_vid_cap, .-cobalt_try_fmt_vid_cap
	.comm	pad,4,4
	.comm	get_fmt,4,4
	.comm	V4L2_SUBDEV_FORMAT_ACTIVE,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_COLORSPACE_SRGB,4,4
	.comm	COBALT_BYTES_PER_PIXEL_YUYV,4,4
	.comm	COBALT_BYTES_PER_PIXEL_RGB32,4,4
	.comm	COBALT_BYTES_PER_PIXEL_RGB24,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_cobalt-v4l2.c_cobalt_try_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	cobalt_try_fmt_vid_cap, %function
cobalt_try_fmt_vid_cap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r2
	ldr	r3, .L17
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	video_drvdata
	ldr	r3, [r4]
	mov	r2, r0
	cmp	r3, #175
	ble	.L2
	ldr	r1, [r4, #4]
	cmp	r1, #143
	bgt	.L3
.L2:
	mov	r3, #176
	mov	r1, #144
	str	r3, [r4]
.L4:
	bic	r3, r3, #3
	bic	r1, r1, #1
.L5:
	ldr	r0, [r2]
	str	r3, [r4]
	cmp	r0, #1
	str	r1, [r4, #4]
	bne	.L6
	mov	r1, #1920
	ldr	r2, .L17+4
	ldr	r3, .L17+8
	ldr	r2, [r2]
	str	r3, [r4, #4]
	str	r1, [r4]
	str	r2, [r4, #24]
.L7:
	ldr	r3, [r4, #8]
	ldr	r0, [r4, #12]
	cmp	r3, #129
	bic	r0, r0, #3
	beq	.L8
	cmp	r3, #130
	beq	.L9
	ldr	r3, .L17+12
	ldr	r3, [r3]
	mul	r1, r3, r1
	bl	max
	mov	r3, #128
	str	r0, [r4, #12]
	str	r3, [r4, #8]
.L10:
	ldr	r3, [r4, #4]
	ldr	r2, .L17+16
	mul	r0, r3, r0
	ldr	r3, [r2]
	str	r0, [r4, #16]
	str	r3, [r4, #20]
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, pc}
.L3:
	cmp	r3, #1920
	movgt	r3, #1920
	ldrgt	r1, .L17+8
	bgt	.L5
	ldr	r0, .L17+8
	cmp	r1, r0
	movgt	r1, r0
	movgt	r3, #1920
	bgt	.L5
	b	.L4
.L6:
	ldr	r3, .L17+20
	ldr	lr, .L17+24
	ldr	r3, [r3]
	ldr	r1, .L17+28
	ldr	ip, [r2, #8]
	add	r5, sp, #8
	ldr	r0, [r2, #4]
	ldr	r1, [r1]
	ldr	r2, [lr]
	str	r3, [sp, #12]
	str	r5, [sp]
	mov	r3, #0
	str	ip, [sp, #16]
	bl	v4l2_subdev_call
	mov	r1, r5
	mov	r0, r4
	bl	v4l2_fill_pix_format
	ldr	r1, [r4]
	b	.L7
.L9:
	ldr	r3, .L17+32
	ldr	r3, [r3]
	mul	r1, r3, r1
	bl	max
	str	r0, [r4, #12]
	b	.L10
.L8:
	ldr	r3, .L17+36
	ldr	r3, [r3]
	mul	r1, r3, r1
	bl	max
	str	r0, [r4, #12]
	b	.L10
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	V4L2_COLORSPACE_SRGB
	.word	1080
	.word	COBALT_BYTES_PER_PIXEL_YUYV
	.word	V4L2_FIELD_NONE
	.word	V4L2_SUBDEV_FORMAT_ACTIVE
	.word	get_fmt
	.word	pad
	.word	COBALT_BYTES_PER_PIXEL_RGB32
	.word	COBALT_BYTES_PER_PIXEL_RGB24
	.size	cobalt_try_fmt_vid_cap, .-cobalt_try_fmt_vid_cap
	.comm	pad,4,4
	.comm	get_fmt,4,4
	.comm	V4L2_SUBDEV_FORMAT_ACTIVE,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_COLORSPACE_SRGB,4,4
	.comm	COBALT_BYTES_PER_PIXEL_YUYV,4,4
	.comm	COBALT_BYTES_PER_PIXEL_RGB32,4,4
	.comm	COBALT_BYTES_PER_PIXEL_RGB24,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
