	.file	"extr_ipu-csi.c_fill_csi_bus_cfg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fill_csi_bus_cfg, @function
fill_csi_bus_cfg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdx
	mov	edx, 20
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	xor	esi, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	call	memset@PLT
	mov	esi, DWORD PTR 4[r12]
	mov	edx, DWORD PTR 0[rbp]
	mov	rdi, rbx
	call	mbus_code_to_bus_cfg@PLT
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR 0[rbp]
	cmp	edx, 129
	je	.L3
	cmp	edx, 130
	je	.L4
	xor	eax, eax
	cmp	edx, 128
	je	.L10
.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
.L10:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[rbp]
	xor	ecx, ecx
	test	DWORD PTR V4L2_MBUS_VSYNC_ACTIVE_LOW[rip], edx
	mov	DWORD PTR [rbx], 1
	setne	cl
	mov	DWORD PTR 4[rbx], ecx
	xor	ecx, ecx
	test	DWORD PTR V4L2_MBUS_HSYNC_ACTIVE_LOW[rip], edx
	setne	cl
	test	DWORD PTR V4L2_MBUS_PCLK_SAMPLE_FALLING[rip], edx
	setne	dl
	mov	DWORD PTR 8[rbx], ecx
	movzx	edx, dl
	mov	DWORD PTR 12[rbx], edx
	mov	edx, DWORD PTR IPU_CSI_CLK_MODE_GATED_CLK[rip]
	mov	DWORD PTR 16[rbx], edx
	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
.L4:
	.cfi_restore_state
	mov	DWORD PTR [rbx], 0
	mov	edi, DWORD PTR [r12]
	call	V4L2_FIELD_HAS_BOTH@PLT
	test	eax, eax
	jne	.L5
	mov	ecx, DWORD PTR V4L2_FIELD_ALTERNATE[rip]
	cmp	DWORD PTR [r12], ecx
	je	.L5
	mov	edx, DWORD PTR IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE[rip]
	mov	DWORD PTR 16[rbx], edx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR IPU_CSI_CLK_MODE_NONGATED_CLK[rip]
	mov	DWORD PTR 16[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	eax, DWORD PTR IPU_CSI_CLK_MODE_CCIR656_INTERLACED[rip]
	mov	DWORD PTR 16[rbx], eax
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	fill_csi_bus_cfg, .-fill_csi_bus_cfg
	.comm	V4L2_MBUS_VSYNC_ACTIVE_LOW,4,4
	.comm	V4L2_MBUS_PCLK_SAMPLE_FALLING,4,4
	.comm	V4L2_MBUS_HSYNC_ACTIVE_LOW,4,4
	.comm	V4L2_FIELD_ALTERNATE,4,4
	.comm	IPU_CSI_CLK_MODE_NONGATED_CLK,4,4
	.comm	IPU_CSI_CLK_MODE_GATED_CLK,4,4
	.comm	IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE,4,4
	.comm	IPU_CSI_CLK_MODE_CCIR656_INTERLACED,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_ipu-csi.c_fill_csi_bus_cfg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fill_csi_bus_cfg, %function
fill_csi_bus_cfg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r6, r2
	mov	r4, r0
	mov	r2, #20
	mov	r1, #0
	bl	memset
	mov	r0, r4
	ldr	r2, [r5]
	ldr	r1, [r6, #4]
	bl	mbus_code_to_bus_cfg
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r3, [r5]
	cmp	r3, #129
	beq	.L3
	cmp	r3, #130
	beq	.L4
	cmp	r3, #128
	beq	.L10
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L4:
	mov	r3, #0
	ldr	r0, [r6]
	str	r3, [r4]
	bl	V4L2_FIELD_HAS_BOTH
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L11
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L5
	ldr	r3, .L11+4
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r2, .L11+8
	ldr	r1, .L11+12
	ldr	r3, [r5, #4]
	ldr	r0, [r2]
	ldr	r2, .L11+16
	ldr	r1, [r1]
	tst	r3, r0
	ldr	r2, [r2]
	movne	ip, #1
	moveq	ip, #0
	tst	r3, r1
	movne	r0, #1
	moveq	r0, #0
	tst	r3, r2
	movne	r1, #1
	moveq	r1, #0
	mov	r3, #1
	ldr	r2, .L11+20
	str	r0, [r4, #8]
	ldr	r2, [r2]
	mov	r0, #0
	str	ip, [r4, #4]
	str	r1, [r4, #12]
	str	r2, [r4, #16]
	str	r3, [r4]
	pop	{r4, r5, r6, pc}
.L3:
	ldr	r3, .L11+24
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r3, .L11+28
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [r4, #16]
	pop	{r4, r5, r6, pc}
.L12:
	.align	2
.L11:
	.word	V4L2_FIELD_ALTERNATE
	.word	IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE
	.word	V4L2_MBUS_VSYNC_ACTIVE_LOW
	.word	V4L2_MBUS_HSYNC_ACTIVE_LOW
	.word	V4L2_MBUS_PCLK_SAMPLE_FALLING
	.word	IPU_CSI_CLK_MODE_GATED_CLK
	.word	IPU_CSI_CLK_MODE_NONGATED_CLK
	.word	IPU_CSI_CLK_MODE_CCIR656_INTERLACED
	.size	fill_csi_bus_cfg, .-fill_csi_bus_cfg
	.comm	V4L2_MBUS_VSYNC_ACTIVE_LOW,4,4
	.comm	V4L2_MBUS_PCLK_SAMPLE_FALLING,4,4
	.comm	V4L2_MBUS_HSYNC_ACTIVE_LOW,4,4
	.comm	V4L2_FIELD_ALTERNATE,4,4
	.comm	IPU_CSI_CLK_MODE_NONGATED_CLK,4,4
	.comm	IPU_CSI_CLK_MODE_GATED_CLK,4,4
	.comm	IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE,4,4
	.comm	IPU_CSI_CLK_MODE_CCIR656_INTERLACED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
