	.file	"extr_atmel-isc-base.c_isc_try_fmt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Sensor not supporting %.4s, using %.4s\n"
	.align 8
.LC1:
	.string	"Preferring to have sensor using format %.4s\n"
	.align 8
.LC2:
	.string	"Could not find any possible format for a working pipeline\n"
	.text
	.p2align 4
	.type	isc_try_fmt, @function
isc_try_fmt:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR [rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR V4L2_SUBDEV_FORMAT_TRY[rip]
	mov	DWORD PTR 32[rsp], 0
	mov	DWORD PTR 36[rsp], eax
	mov	rax, QWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
	cmp	QWORD PTR [rsi], rax
	jne	.L2
	mov	eax, DWORD PTR [rdi]
	mov	rbp, rdi
	mov	r12, rsi
	xor	ebx, ebx
	test	eax, eax
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, QWORD PTR 32[r12]
	mov	rdi, rbp
	call	find_format_by_fourcc@PLT
	test	rax, rax
	mov	r14, rax
	setne	al
	xor	ebx, ebx
.L21:
	test	al, al
	je	.L38
	mov	rax, r14
	mov	r15d, 1
.L11:
	lea	r13, 32[rbp]
	test	rax, rax
	jne	.L12
	movsx	rdx, DWORD PTR 0[rbp]
	mov	rax, QWORD PTR 48[rbp]
	lea	r8, 32[r12]
	lea	rcx, .LC0[rip]
	mov	esi, DWORD PTR debug[rip]
	mov	edi, 1
	mov	r14, QWORD PTR -8[rax+rdx*8]
	mov	rdx, r13
	xor	eax, eax
	mov	r9, r14
	call	v4l2_dbg@PLT
.L12:
	test	r14, r14
	jne	.L13
	mov	ebx, DWORD PTR EINVAL[rip]
	neg	ebx
.L14:
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	call	v4l2_err@PLT
.L20:
	lea	rdi, 8[rbp]
	mov	edx, 24
	xor	esi, esi
	call	memset@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L4
.L3:
	mov	rax, QWORD PTR 48[rbp]
	lea	r13, 0[0+rbx*8]
	mov	rax, QWORD PTR [rax+rbx*8]
	mov	edi, DWORD PTR 8[rax]
	call	ISC_IS_FORMAT_RAW@PLT
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR 48[rbp]
	mov	rsi, QWORD PTR 32[r12]
	mov	rdi, rbp
	mov	rbx, QWORD PTR [rax+r13]
	call	find_format_by_fourcc@PLT
	test	rax, rax
	mov	r14, rax
	setne	dl
	test	rbx, rbx
	je	.L9
	test	dl, dl
	je	.L9
	cmp	QWORD PTR sensor_preferred[rip], 0
	mov	r15d, 1
	je	.L39
.L10:
	lea	r13, 32[rbp]
.L13:
	mov	esi, DWORD PTR debug[rip]
	mov	r8, r14
	mov	rdx, r13
	xor	eax, eax
	lea	rcx, .LC1[rip]
	mov	edi, 1
	call	v4l2_dbg@PLT
	mov	QWORD PTR 24[rbp], r14
	mov	eax, DWORD PTR ISC_MAX_SUPPORT_WIDTH[rip]
	cmp	DWORD PTR 8[r12], eax
	jle	.L15
	mov	DWORD PTR 8[r12], eax
.L15:
	mov	eax, DWORD PTR ISC_MAX_SUPPORT_HEIGHT[rip]
	cmp	DWORD PTR 12[r12], eax
	jle	.L16
	mov	DWORD PTR 12[r12], eax
.L16:
	mov	eax, DWORD PTR 8[r14]
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], eax
	mov	rax, QWORD PTR 32[r12]
	mov	QWORD PTR 16[rbp], rax
	call	isc_try_validate_formats@PLT
	test	eax, eax
	je	.L19
	mov	rax, QWORD PTR [r14]
	mov	rdi, rbp
	mov	QWORD PTR 16[rbp], rax
	mov	QWORD PTR 32[r12], rax
	call	isc_try_validate_formats@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L14
.L19:
	mov	esi, r15d
	mov	rdi, rbp
	call	isc_try_configure_rlp_dma@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L14
	mov	rdi, rbp
	call	isc_try_configure_pipeline@PLT
	mov	ebx, eax
	test	eax, eax
	jne	.L14
	mov	r14d, DWORD PTR 12[rsp]
	lea	r13, 32[rsp]
	lea	r15, 8[r12]
	mov	rsi, r15
	mov	rdi, r13
	mov	edx, r14d
	call	v4l2_fill_mbus_format@PLT
	mov	rax, QWORD PTR 40[rbp]
	mov	edx, DWORD PTR set_fmt[rip]
	mov	r8, r13
	mov	esi, DWORD PTR pad[rip]
	lea	rcx, 28[rsp]
	mov	edi, DWORD PTR [rax]
	call	v4l2_subdev_call@PLT
	test	eax, eax
	js	.L26
	mov	rsi, r13
	mov	rdi, r15
	call	v4l2_fill_pix_format@PLT
	mov	eax, DWORD PTR V4L2_FIELD_NONE[rip]
	mov	DWORD PTR 24[r12], eax
	mov	eax, DWORD PTR 8[r12]
	imul	eax, DWORD PTR 8[rbp]
	sar	eax, 3
	mov	DWORD PTR 16[r12], eax
	imul	eax, DWORD PTR 12[r12]
	mov	DWORD PTR 20[r12], eax
	mov	rax, QWORD PTR [rsp]
	test	rax, rax
	je	.L1
	mov	DWORD PTR [rax], r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	ebx, DWORD PTR EINVAL[rip]
	neg	ebx
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L40
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, ebx
	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
.L39:
	.cfi_restore_state
	xor	r15d, r15d
	cmp	rbx, rax
	mov	r14, rbx
	sete	r15b
	jmp	.L10
.L38:
	xor	r15d, r15d
	mov	rax, r14
	cmp	rbx, r14
	mov	r14, rbx
	sete	r15b
	or	rax, rbx
	jmp	.L11
.L26:
	mov	ebx, eax
	jmp	.L20
.L40:
	call	__stack_chk_fail@PLT
.L9:
	test	rbx, rbx
	sete	al
	and	eax, edx
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	isc_try_fmt, .-isc_try_fmt
	.comm	set_fmt,4,4
	.comm	sensor_preferred,8,8
	.comm	pad,4,4
	.comm	debug,4,4
	.comm	V4L2_SUBDEV_FORMAT_TRY,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,8,8
	.comm	ISC_MAX_SUPPORT_WIDTH,4,4
	.comm	ISC_MAX_SUPPORT_HEIGHT,4,4
	.comm	EINVAL,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_atmel-isc-base.c_isc_try_fmt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Sensor not supporting %.4s, using %.4s\012\000"
	.align	2
.LC1:
	.ascii	"Preferring to have sensor using format %.4s\012\000"
	.align	2
.LC2:
	.ascii	"Could not find any possible format for a working pi"
	.ascii	"peline\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isc_try_fmt, %function
isc_try_fmt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, #0
	ldr	r3, .L37
	ldr	ip, [r1]
	mov	r6, r1
	ldr	r1, [r3]
	ldr	r3, .L37+4
	mov	r7, r2
	ldr	r3, [r3]
	ldr	r2, .L37+8
	sub	sp, sp, #24
	cmp	ip, r1
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	str	r3, [sp, #16]
	str	r4, [sp, #12]
	bne	.L2
	ldr	r3, [r0]
	mov	r5, r0
	cmp	r3, r4
	bgt	.L3
.L4:
	mov	r0, r5
	ldr	r1, [r6, #24]
	bl	find_format_by_fourcc
	mov	r8, #0
	subs	r3, r0, r8
	mov	r4, r0
	movne	r3, #1
.L20:
	cmp	r3, #0
	subeq	r10, r8, r4
	clzeq	r10, r10
	movne	r3, r4
	orreq	r3, r8, r4
	movne	r10, #1
	moveq	r4, r8
	lsreq	r10, r10, #5
	cmp	r3, #0
	add	r8, r5, #16
	bne	.L11
	ldr	r3, [r5]
	ldr	r2, [r5, #24]
	sub	r3, r3, #-1073741823
	ldr	r4, [r2, r3, lsl #2]
	ldr	r2, .L37+12
	add	r3, r6, #24
	str	r4, [sp, #4]
	ldr	r1, [r2]
	mov	r0, #1
	str	r3, [sp]
	mov	r2, r8
	ldr	r3, .L37+16
	bl	v4l2_dbg
.L11:
	cmp	r4, #0
	bne	.L12
	ldr	r3, .L37+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L13:
	mov	r0, r8
	ldr	r1, .L37+24
	bl	v4l2_err
.L19:
	mov	r2, #12
	mov	r1, #0
	add	r0, r5, #4
	bl	memset
	b	.L1
.L6:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L4
.L3:
	ldr	r3, [r5, #24]
	lsl	r8, r4, #2
	ldr	r3, [r3, r4, lsl #2]
	ldr	r0, [r3, #4]
	bl	ISC_IS_FORMAT_RAW
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r5, #24]
	mov	r0, r5
	ldr	r1, [r6, #24]
	ldr	r8, [r3, r8]
	bl	find_format_by_fourcc
	subs	r3, r0, #0
	movne	r3, #1
	cmp	r8, #0
	cmpne	r0, #0
	mov	r4, r0
	beq	.L34
	ldr	r3, .L37+28
	ldr	r3, [r3]
	cmp	r3, #0
	movne	r10, #1
	beq	.L35
.L9:
	add	r8, r5, #16
.L12:
	ldr	r3, .L37+12
	str	r4, [sp]
	ldr	r1, [r3]
	mov	r2, r8
	ldr	r3, .L37+32
	mov	r0, #1
	bl	v4l2_dbg
	ldr	r3, .L37+36
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	str	r4, [r5, #12]
	cmp	r2, r3
	strgt	r3, [r6, #4]
	ldr	r3, .L37+40
	ldr	r2, [r6, #8]
	ldr	r3, [r3]
	ldr	r9, [r4, #4]
	cmp	r2, r3
	strgt	r3, [r6, #8]
	ldr	r3, [r6, #24]
	mov	r0, r5
	str	r3, [r5, #8]
	bl	isc_try_validate_formats
	cmp	r0, #0
	beq	.L18
	ldr	r3, [r4]
	mov	r0, r5
	str	r3, [r5, #8]
	str	r3, [r6, #24]
	bl	isc_try_validate_formats
	subs	r4, r0, #0
	bne	.L13
.L18:
	mov	r1, r10
	mov	r0, r5
	bl	isc_try_configure_rlp_dma
	subs	r4, r0, #0
	bne	.L13
	mov	r0, r5
	bl	isc_try_configure_pipeline
	subs	r4, r0, #0
	bne	.L13
	add	r8, sp, #12
	add	r10, r6, #4
	mov	r1, r10
	mov	r2, r9
	mov	r0, r8
	bl	v4l2_fill_mbus_format
	ldr	r3, [r5, #20]
	ldr	r2, .L37+44
	ldr	r0, [r3]
	ldr	r3, .L37+48
	str	r8, [sp]
	ldr	r1, [r3]
	ldr	r2, [r2]
	add	r3, sp, #8
	bl	v4l2_subdev_call
	cmp	r0, #0
	blt	.L25
	mov	r1, r8
	mov	r0, r10
	bl	v4l2_fill_pix_format
	ldr	r1, [r5, #4]
	ldr	r3, [r6, #4]
	ldr	r2, [r6, #8]
	mul	r3, r1, r3
	asr	r3, r3, #3
	mul	r2, r3, r2
	ldr	r1, .L37+52
	cmp	r7, #0
	ldr	r1, [r1]
	str	r3, [r6, #12]
	str	r2, [r6, #16]
	str	r1, [r6, #20]
	strne	r9, [r7]
	b	.L1
.L2:
	ldr	r3, .L37+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L37+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L35:
	sub	r10, r8, r0
	clz	r10, r10
	mov	r4, r8
	lsr	r10, r10, #5
	b	.L9
.L25:
	mov	r4, r0
	b	.L19
.L36:
	bl	__stack_chk_fail
.L34:
	cmp	r8, #0
	movne	r3, #0
	b	.L20
.L38:
	.align	2
.L37:
	.word	V4L2_BUF_TYPE_VIDEO_CAPTURE
	.word	V4L2_SUBDEV_FORMAT_TRY
	.word	.LC3
	.word	debug
	.word	.LC0
	.word	EINVAL
	.word	.LC2
	.word	sensor_preferred
	.word	.LC1
	.word	ISC_MAX_SUPPORT_WIDTH
	.word	ISC_MAX_SUPPORT_HEIGHT
	.word	set_fmt
	.word	pad
	.word	V4L2_FIELD_NONE
	.size	isc_try_fmt, .-isc_try_fmt
	.comm	set_fmt,4,4
	.comm	sensor_preferred,4,4
	.comm	pad,4,4
	.comm	debug,4,4
	.comm	V4L2_SUBDEV_FORMAT_TRY,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,4,4
	.comm	ISC_MAX_SUPPORT_WIDTH,4,4
	.comm	ISC_MAX_SUPPORT_HEIGHT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
