	.file	"extr_mtk_mdp_m2m.c_mtk_mdp_m2m_queue_setup.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"[%d] type:%d, planes:%d, buffers:%d, size:%u,%u"
	.text
	.p2align 4
	.type	mtk_mdp_m2m_queue_setup, @function
mtk_mdp_m2m_queue_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rcx
	call	vb2_get_drv_priv@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, rax
	mov	r12, rax
	call	mtk_mdp_ctx_get_frame@PLT
	mov	rcx, QWORD PTR 8[rax]
	mov	r8d, DWORD PTR [rcx]
	mov	DWORD PTR 0[r13], r8d
	mov	esi, DWORD PTR [rcx]
	test	esi, esi
	je	.L2
	mov	rdi, QWORD PTR [rax]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, DWORD PTR [rdi+rax*4]
	mov	DWORD PTR [rbx+rax*4], esi
	add	rax, 1
	cmp	DWORD PTR [rcx], eax
	ja	.L3
	mov	r8d, DWORD PTR 0[r13]
.L2:
	mov	eax, DWORD PTR 4[rbx]
	mov	r9d, DWORD PTR [r14]
	lea	rsi, .LC0[rip]
	mov	edi, 2
	mov	ecx, DWORD PTR 0[rbp]
	push	rax
	.cfi_def_cfa_offset 56
	mov	eax, DWORD PTR [rbx]
	push	rax
	.cfi_def_cfa_offset 64
	mov	edx, DWORD PTR [r12]
	call	mtk_mdp_dbg@PLT
	pop	rax
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rdx
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mtk_mdp_m2m_queue_setup, .-mtk_mdp_m2m_queue_setup
	.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_mtk_mdp_m2m.c_mtk_mdp_m2m_queue_setup.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[%d] type:%d, planes:%d, buffers:%d, size:%u,%u\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_mdp_m2m_queue_setup, %function
mtk_mdp_m2m_queue_setup:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	sub	sp, sp, #16
	mov	r8, r2
	mov	r6, r3
	mov	r9, r1
	bl	vb2_get_drv_priv
	ldr	r1, [r7]
	mov	r10, r0
	bl	mtk_mdp_ctx_get_frame
	ldr	r2, [r0, #4]
	ldr	r3, [r2]
	str	r3, [r8]
	ldr	r1, [r2]
	cmp	r1, #0
	beq	.L2
	mov	ip, #0
	ldr	lr, [r0]
	sub	r4, r6, #4
	sub	lr, lr, #4
.L3:
	ldr	r3, [lr, #4]!
	add	ip, ip, #1
	str	r3, [r4, #4]!
	ldr	r5, [r2]
	cmp	r5, ip
	bhi	.L3
	ldr	r3, [r8]
.L2:
	ldr	ip, [r9]
	ldr	r0, [r6, #4]
	ldr	r1, [r6]
	ldr	r2, [r10]
	stm	sp, {r3, ip}
	ldr	r3, [r7]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	mov	r0, #2
	ldr	r1, .L10
	bl	mtk_mdp_dbg
	mov	r0, #0
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.size	mtk_mdp_m2m_queue_setup, .-mtk_mdp_m2m_queue_setup
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
