	.file	"extr_imx-media-utils.c_imx_media_try_colorimetry.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	imx_media_try_colorimetry
	.type	imx_media_try_colorimetry, @function
imx_media_try_colorimetry:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edx, 1
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	mov	esi, DWORD PTR CS_SEL_ANY[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, DWORD PTR 24[rdi]
	call	imx_media_find_mbus_format@PLT
	test	rax, rax
	je	.L12
.L2:
	xor	r12d, r12d
	mov	rcx, QWORD PTR IPUV3_COLORSPACE_RGB[rip]
	cmp	QWORD PTR [rax], rcx
	sete	r12b
.L3:
	mov	eax, DWORD PTR [rbx]
	add	eax, -128
	cmp	eax, 7
	jbe	.L4
	mov	DWORD PTR [rbx], 128
.L4:
	mov	rax, QWORD PTR V4L2_XFER_FUNC_DEFAULT[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L13
.L5:
	mov	eax, DWORD PTR 16[rbx]
	test	ebp, ebp
	je	.L6
	mov	edx, DWORD PTR V4L2_YCBCR_ENC_601[rip]
	cmp	edx, eax
	je	.L7
	cmp	DWORD PTR V4L2_YCBCR_ENC_709[rip], eax
	je	.L7
	mov	DWORD PTR 16[rbx], edx
.L7:
	mov	eax, DWORD PTR V4L2_QUANTIZATION_DEFAULT[rip]
	cmp	DWORD PTR 20[rbx], eax
	je	.L14
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	cmp	DWORD PTR V4L2_YCBCR_ENC_DEFAULT[rip], eax
	jne	.L7
	mov	edi, DWORD PTR [rbx]
	call	V4L2_MAP_YCBCR_ENC_DEFAULT@PLT
	mov	DWORD PTR 16[rbx], eax
	mov	eax, DWORD PTR V4L2_QUANTIZATION_DEFAULT[rip]
	cmp	DWORD PTR 20[rbx], eax
	jne	.L1
.L14:
	mov	edx, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR [rbx]
	mov	edi, r12d
	call	V4L2_MAP_QUANTIZATION_DEFAULT@PLT
	mov	DWORD PTR 20[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, DWORD PTR CS_SEL_ANY[rip]
	call	imx_media_find_ipu_format@PLT
	test	rax, rax
	jne	.L2
	xor	r12d, r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR [rbx]
	call	V4L2_MAP_XFER_FUNC_DEFAULT@PLT
	mov	QWORD PTR 8[rbx], rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	imx_media_try_colorimetry, .-imx_media_try_colorimetry
	.comm	V4L2_YCBCR_ENC_DEFAULT,4,4
	.comm	V4L2_YCBCR_ENC_709,4,4
	.comm	V4L2_YCBCR_ENC_601,4,4
	.comm	V4L2_XFER_FUNC_DEFAULT,8,8
	.comm	V4L2_QUANTIZATION_DEFAULT,4,4
	.comm	IPUV3_COLORSPACE_RGB,8,8
	.comm	CS_SEL_ANY,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_imx-media-utils.c_imx_media_try_colorimetry.c"
	.text
	.align	2
	.global	imx_media_try_colorimetry
	.syntax unified
	.arm
	.fpu softvfp
	.type	imx_media_try_colorimetry, %function
imx_media_try_colorimetry:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, .L14
	mov	r4, r0
	mov	r6, r1
	mov	r2, #1
	ldr	r0, [r0, #16]
	ldr	r1, [r5]
	bl	imx_media_find_mbus_format
	cmp	r0, #0
	beq	.L12
.L2:
	ldr	r3, .L14+4
	ldr	r5, [r0]
	ldr	r0, [r3]
	sub	r5, r5, r0
	clz	r5, r5
	lsr	r5, r5, #5
.L3:
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	sub	r3, r3, #128
	cmp	r3, #7
	movhi	r3, #128
	strhi	r3, [r4]
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L13
.L5:
	cmp	r6, #0
	ldr	r3, [r4, #8]
	beq	.L6
	ldr	r2, .L14+12
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L7
	ldr	r1, .L14+16
	ldr	r1, [r1]
	cmp	r1, r3
	strne	r2, [r4, #8]
.L7:
	ldr	r3, .L14+20
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	popne	{r4, r5, r6, pc}
	mov	r0, r5
	ldr	r2, [r4, #8]
	ldr	r1, [r4]
	bl	V4L2_MAP_QUANTIZATION_DEFAULT
	str	r0, [r4, #12]
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r2, .L14+24
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L7
	ldr	r0, [r4]
	bl	V4L2_MAP_YCBCR_ENC_DEFAULT
	str	r0, [r4, #8]
	b	.L7
.L12:
	ldr	r1, [r5]
	ldr	r0, [r4, #16]
	bl	imx_media_find_ipu_format
	cmp	r0, #0
	moveq	r5, r0
	beq	.L3
	b	.L2
.L13:
	ldr	r0, [r4]
	bl	V4L2_MAP_XFER_FUNC_DEFAULT
	str	r0, [r4, #4]
	b	.L5
.L15:
	.align	2
.L14:
	.word	CS_SEL_ANY
	.word	IPUV3_COLORSPACE_RGB
	.word	V4L2_XFER_FUNC_DEFAULT
	.word	V4L2_YCBCR_ENC_601
	.word	V4L2_YCBCR_ENC_709
	.word	V4L2_QUANTIZATION_DEFAULT
	.word	V4L2_YCBCR_ENC_DEFAULT
	.size	imx_media_try_colorimetry, .-imx_media_try_colorimetry
	.comm	V4L2_YCBCR_ENC_DEFAULT,4,4
	.comm	V4L2_YCBCR_ENC_709,4,4
	.comm	V4L2_YCBCR_ENC_601,4,4
	.comm	V4L2_XFER_FUNC_DEFAULT,4,4
	.comm	V4L2_QUANTIZATION_DEFAULT,4,4
	.comm	IPUV3_COLORSPACE_RGB,4,4
	.comm	CS_SEL_ANY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
