	.file	"extr_vpe.c___vpe_s_fmt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"queue busy\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Setting format for type %d, wxh: %dx%d, fmt: %d bpl_y %d"
	.section	.rodata.str1.1
.LC2:
	.string	" bpl_uv %d\n"
	.text
	.p2align 4
	.type	__vpe_s_fmt, @function
__vpe_s_fmt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 4[rdi]
	mov	esi, DWORD PTR [rsi]
	call	v4l2_m2m_get_vq@PLT
	test	rax, rax
	je	.L19
	mov	rdi, rax
	call	vb2_is_busy@PLT
	test	rax, rax
	jne	.L21
	mov	esi, DWORD PTR [rbx]
	mov	rdi, r12
	call	get_q_data@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L19
	mov	rdi, rbx
	call	find_format@PLT
	mov	edx, DWORD PTR 40[rbx]
	mov	ecx, DWORD PTR 44[rbx]
	mov	r8d, DWORD PTR 8[rbx]
	mov	r9, QWORD PTR 16[rbx]
	mov	QWORD PTR 32[rbp], rax
	mov	DWORD PTR 80[rbp], edx
	mov	edx, DWORD PTR 24[rbx]
	mov	DWORD PTR 40[rbp], ecx
	mov	DWORD PTR 0[rbp], r8d
	mov	QWORD PTR 8[rbp], r9
	mov	DWORD PTR 16[rbp], edx
	test	edx, edx
	jle	.L6
	mov	rcx, QWORD PTR 32[rbx]
	mov	rdi, QWORD PTR 24[rbp]
	xor	edx, edx
	mov	r8, QWORD PTR 72[rbp]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR 4[rcx+rdx*8]
	mov	DWORD PTR [rdi+rdx*4], esi
	mov	esi, DWORD PTR [rcx+rdx*8]
	mov	DWORD PTR [r8+rdx*4], esi
	add	rdx, 1
	cmp	DWORD PTR 24[rbx], edx
	jg	.L7
	mov	ecx, DWORD PTR 40[rbp]
	mov	r8d, DWORD PTR 0[rbp]
.L8:
	cmp	r9, QWORD PTR V4L2_FIELD_ALTERNATE[rip]
	mov	QWORD PTR 64[rbp], 0
	mov	esi, DWORD PTR 20[rbp]
	mov	edx, DWORD PTR Q_DATA_INTERLACED_SEQ_TB[rip]
	mov	DWORD PTR 52[rbp], ecx
	mov	QWORD PTR 56[rbp], 0
	mov	DWORD PTR 48[rbp], r8d
	je	.L22
	cmp	r9, QWORD PTR V4L2_FIELD_SEQ_TB[rip]
	je	.L23
	mov	r9d, DWORD PTR Q_IS_INTERLACED[rip]
	not	r9d
	and	esi, r9d
	mov	DWORD PTR 20[rbp], esi
	and	edx, esi
.L10:
	test	edx, edx
	je	.L12
	mov	edx, r8d
	shr	edx, 31
	add	edx, r8d
	sar	edx
	mov	DWORD PTR 48[rbp], edx
.L12:
	mov	rdx, QWORD PTR VPE_LUMA[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	lea	rsi, .LC1[rip]
	xor	r13d, r13d
	mov	edx, DWORD PTR [rdi+rdx*4]
	mov	edi, DWORD PTR [r12]
	push	rdx
	.cfi_def_cfa_offset 64
	mov	edx, DWORD PTR [rbx]
	mov	r9d, DWORD PTR [rax]
	xor	eax, eax
	call	vpe_dbg@PLT
	cmp	DWORD PTR 16[rbp], 2
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	jne	.L1
	mov	rax, QWORD PTR 24[rbp]
	mov	rdx, QWORD PTR VPE_CHROMA[rip]
	lea	rsi, .LC2[rip]
	mov	edi, DWORD PTR [r12]
	mov	edx, DWORD PTR [rax+rdx*4]
	xor	eax, eax
	call	vpe_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, DWORD PTR [r12]
	lea	rsi, .LC0[rip]
	call	vpe_err@PLT
	mov	r13d, DWORD PTR EBUSY[rip]
	neg	r13d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	r13d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r13d
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	or	esi, edx
	mov	DWORD PTR 20[rbp], esi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	or	esi, DWORD PTR Q_DATA_INTERLACED_ALTERNATE[rip]
	mov	DWORD PTR 20[rbp], esi
	and	edx, esi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR 24[rbp]
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	__vpe_s_fmt, .-__vpe_s_fmt
	.comm	VPE_LUMA,8,8
	.comm	VPE_CHROMA,8,8
	.comm	V4L2_FIELD_SEQ_TB,8,8
	.comm	V4L2_FIELD_ALTERNATE,8,8
	.comm	Q_IS_INTERLACED,4,4
	.comm	Q_DATA_INTERLACED_SEQ_TB,4,4
	.comm	Q_DATA_INTERLACED_ALTERNATE,4,4
	.comm	EINVAL,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_vpe.c___vpe_s_fmt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"queue busy\012\000"
	.align	2
.LC1:
	.ascii	"Setting format for type %d, wxh: %dx%d, fmt: %d bpl"
	.ascii	"_y %d\000"
	.align	2
.LC2:
	.ascii	" bpl_uv %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__vpe_s_fmt, %function
__vpe_s_fmt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	mov	r4, r1
	ldr	r0, [r0, #4]
	ldr	r1, [r1]
	sub	sp, sp, #16
	bl	v4l2_m2m_get_vq
	cmp	r0, #0
	beq	.L18
	bl	vb2_is_busy
	subs	r6, r0, #0
	bne	.L20
	mov	r0, r7
	ldr	r1, [r4]
	bl	get_q_data
	subs	r5, r0, #0
	beq	.L18
	mov	r0, r4
	bl	find_format
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #24]
	ldr	ip, [r4, #4]
	ldr	r1, [r4, #20]
	ldr	r10, [r4, #8]
	cmp	r2, #0
	str	r0, [r5, #20]
	str	r3, [r5, #24]
	str	ip, [r5]
	str	r1, [r5, #48]
	str	r2, [r5, #8]
	str	r10, [r5, #4]
	ble	.L6
	mov	r3, r6
	ldr	lr, [r4, #16]
	ldr	r8, [r5, #16]
	ldr	r2, [r5, #44]
	add	r9, lr, #4
	sub	r1, r8, #4
	sub	r2, r2, #4
.L7:
	ldr	ip, [r9, r3, lsl #3]
	str	ip, [r1, #4]!
	ldr	ip, [lr, r3, lsl #3]
	add	r3, r3, #1
	str	ip, [r2, #4]!
	ldr	ip, [r4, #12]
	cmp	ip, r3
	bgt	.L7
	ldr	r3, [r5, #24]
	ldr	ip, [r5]
.L8:
	mov	r2, #0
	ldr	r1, .L23
	str	r2, [r5, #40]
	ldr	lr, [r1]
	ldr	r1, .L23+4
	cmp	r10, lr
	str	r2, [r5, #36]
	str	r3, [r5, #32]
	ldr	r2, [r1]
	str	ip, [r5, #28]
	ldr	r1, [r5, #12]
	beq	.L21
	ldr	lr, .L23+8
	ldr	lr, [lr]
	cmp	r10, lr
	ldrne	lr, .L23+12
	orreq	r1, r1, r2
	ldrne	lr, [lr]
	streq	r1, [r5, #12]
	bicne	r1, r1, lr
	strne	r1, [r5, #12]
	andne	r2, r2, r1
.L10:
	cmp	r2, #0
	addne	r2, ip, ip, lsr #31
	asrne	r2, r2, #1
	strne	r2, [r5, #28]
	ldr	r2, .L23+16
	ldr	r1, [r2]
	ldr	r2, [r4]
	ldr	lr, [r8, r1, lsl #2]
	ldr	r1, .L23+20
	str	lr, [sp, #8]
	ldr	lr, [r0]
	ldr	r0, [r7]
	stm	sp, {ip, lr}
	bl	vpe_dbg
	ldr	r3, [r5, #8]
	cmp	r3, #2
	beq	.L22
.L1:
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	ldr	r0, [r7]
	ldr	r1, .L23+24
	bl	vpe_err
	ldr	r3, .L23+28
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	ldr	r3, .L23+32
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	lr, .L23+36
	ldr	lr, [lr]
	orr	r1, r1, lr
	str	r1, [r5, #12]
	and	r2, r2, r1
	b	.L10
.L22:
	ldr	r2, .L23+40
	ldr	r3, [r5, #16]
	ldr	r2, [r2]
	ldr	r0, [r7]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r1, .L23+44
	bl	vpe_dbg
	b	.L1
.L6:
	ldr	r8, [r5, #16]
	b	.L8
.L24:
	.align	2
.L23:
	.word	V4L2_FIELD_ALTERNATE
	.word	Q_DATA_INTERLACED_SEQ_TB
	.word	V4L2_FIELD_SEQ_TB
	.word	Q_IS_INTERLACED
	.word	VPE_LUMA
	.word	.LC1
	.word	.LC0
	.word	EBUSY
	.word	EINVAL
	.word	Q_DATA_INTERLACED_ALTERNATE
	.word	VPE_CHROMA
	.word	.LC2
	.size	__vpe_s_fmt, .-__vpe_s_fmt
	.comm	VPE_LUMA,4,4
	.comm	VPE_CHROMA,4,4
	.comm	V4L2_FIELD_SEQ_TB,4,4
	.comm	V4L2_FIELD_ALTERNATE,4,4
	.comm	Q_IS_INTERLACED,4,4
	.comm	Q_DATA_INTERLACED_SEQ_TB,4,4
	.comm	Q_DATA_INTERLACED_ALTERNATE,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
