	.file	"extr_malidp_planes.c_malidp_de_plane_check.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Invalid pitch %u for plane %d\n"
	.align 8
.LC1:
	.string	"Buffer width/height needs to be a multiple of tile sizes"
	.align 8
.LC2:
	.string	"Plane src_x/src_y needs to be a multiple of tile sizes"
	.align 8
.LC3:
	.string	"AFBC framebuffer not supported in SMART layer"
	.text
	.p2align 4
	.type	malidp_de_plane_check, @function
malidp_de_plane_check:
.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
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 16[rsp], rsi
	call	to_malidp_plane@PLT
	mov	rdi, rbx
	mov	r12, rax
	call	to_malidp_plane_state@PLT
	mov	r15d, DWORD PTR 56[rbx]
	mov	QWORD PTR [rsp], rax
	test	r15d, r15d
	je	.L1
	mov	r14, QWORD PTR 48[rbx]
	mov	rcx, rbx
	xor	r15d, r15d
	test	r14, r14
	je	.L1
	mov	rbp, rax
	mov	rax, QWORD PTR 8[rcx]
	mov	rsi, QWORD PTR [r12]
	xor	ecx, ecx
	mov	rdx, QWORD PTR 16[r14]
	cmp	QWORD PTR 24[r14], 0
	mov	rdi, QWORD PTR 16[rsi]
	setne	cl
	mov	r15d, DWORD PTR [rbx]
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR 8[r12]
	mov	rdx, QWORD PTR [rdx]
	add	rdi, 16
	mov	ebx, DWORD PTR MALIDP_ROTATED_MASK[rip]
	mov	rsi, QWORD PTR [rax]
	call	malidp_hw_get_format_id@PLT
	cmp	rax, QWORD PTR MALIDP_INVALID_FORMAT_ID[rip]
	mov	QWORD PTR 0[rbp], rax
	je	.L41
	mov	rdi, QWORD PTR 16[r14]
	mov	rdx, QWORD PTR [rsp]
	mov	eax, DWORD PTR 8[rdi]
	mov	DWORD PTR 8[rdx], eax
	test	eax, eax
	jle	.L4
	and	r15d, ebx
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR [r12]
	mov	esi, r15d
	call	malidp_hw_get_pitch_align@PLT
	mov	rdi, QWORD PTR 16[r14]
	mov	esi, r13d
	mov	ebx, eax
	lea	rax, 0[0+r13*4]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR [r14]
	sub	ebx, 1
	mov	ebp, DWORD PTR [rax+r13*4]
	call	drm_format_info_block_height@PLT
	imul	ebp, eax
	test	ebp, ebx
	je	.L5
	cmp	QWORD PTR 24[r14], 0
	je	.L43
.L5:
	mov	rax, QWORD PTR [rsp]
	add	r13, 1
	cmp	DWORD PTR 8[rax], r13d
	jg	.L6
	mov	rdi, QWORD PTR 16[r14]
.L4:
	xor	esi, esi
	call	drm_format_info_block_width@PLT
	mov	rdi, QWORD PTR 16[r14]
	xor	esi, esi
	mov	ebx, eax
	call	drm_format_info_block_height@PLT
	xor	edx, edx
	mov	ecx, eax
	mov	eax, DWORD PTR 8[r14]
	div	ebx
	test	edx, edx
	jne	.L7
	mov	eax, DWORD PTR 12[r14]
	xor	edx, edx
	div	ecx
	test	edx, edx
	jne	.L7
	mov	rsi, QWORD PTR 16[rsp]
	xor	edx, edx
	movsx	eax, WORD PTR 18[rsi]
	div	ebx
	test	edx, edx
	jne	.L9
	movsx	eax, WORD PTR 22[rsi]
	xor	edx, edx
	div	ecx
	test	edx, edx
	jne	.L9
	mov	rsi, QWORD PTR 16[rsp]
	mov	rcx, QWORD PTR [r12]
	mov	rax, QWORD PTR 24[rsi]
	mov	rdx, QWORD PTR [rcx]
	cmp	rax, rdx
	jg	.L41
	mov	rsi, QWORD PTR 32[rsi]
	cmp	rdx, rsi
	jl	.L41
	cmp	rax, rsi
	cmovg	rax, rsi
	cmp	QWORD PTR 8[rcx], rax
	jg	.L41
	mov	rax, QWORD PTR [rsp]
	cmp	DWORD PTR 8[rax], 3
	jne	.L13
	mov	rax, QWORD PTR 16[rcx]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR MALIDP_DEVICE_LV_HAS_3_STRIDES[rip], eax
	jne	.L13
	mov	rax, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 48[rax]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	cmp	DWORD PTR 4[rax], edx
	jne	.L41
.L13:
	mov	rbx, QWORD PTR 16[rsp]
	mov	rdi, r12
	mov	rsi, rbx
	call	malidp_se_check_scaling@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L1
	mov	ecx, DWORD PTR [rbx]
	cmp	ecx, DWORD PTR DRM_MODE_ROTATE_0[rip]
	mov	rdx, QWORD PTR 8[r12]
	je	.L14
	mov	rax, QWORD PTR 8[rdx]
	cmp	rax, QWORD PTR ROTATE_NONE[rip]
	je	.L41
	cmp	rax, QWORD PTR ROTATE_COMPRESSED[rip]
	je	.L44
	mov	rax, QWORD PTR 16[r14]
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR DRM_FORMAT_RGB888[rip]
	je	.L19
.L25:
	cmp	QWORD PTR DRM_FORMAT_BGR888[rip], rax
	je	.L19
.L14:
	mov	rax, QWORD PTR DE_SMART[rip]
	cmp	QWORD PTR [rdx], rax
	je	.L45
.L21:
	mov	rbx, QWORD PTR [rsp]
	mov	DWORD PTR 12[rbx], 0
	test	DWORD PTR MALIDP_ROTATED_MASK[rip], ecx
	je	.L22
	mov	rax, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR [r12]
	cmp	QWORD PTR 24[r14], 0
	mov	rcx, QWORD PTR 16[r14]
	mov	rdx, QWORD PTR 32[rax]
	mov	rsi, QWORD PTR 24[rax]
	setne	r8b
	mov	rax, QWORD PTR 16[rdi]
	mov	rcx, QWORD PTR [rcx]
	movzx	r8d, r8b
	call	[QWORD PTR 8[rax]]
	test	eax, eax
	js	.L27
	mov	DWORD PTR 12[rbx], eax
.L22:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR DRM_BLEND_ALPHA_OPAQUE[rip]
	cmp	QWORD PTR 40[rax], rdx
	je	.L23
	mov	rax, QWORD PTR 24[rsp]
	cmp	QWORD PTR DRM_MODE_BLEND_PIXEL_NONE[rip], rax
	je	.L23
	mov	rax, QWORD PTR 16[r14]
	cmp	QWORD PTR 16[rax], 0
	jne	.L41
.L23:
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, r12
	call	malidp_de_prefetch_settings@PLT
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L43:
	.cfi_restore_state
	mov	rax, QWORD PTR [r14]
	lea	rdx, 0[0+r13*4]
	lea	rdi, .LC0[rip]
	mov	esi, DWORD PTR [rax+rdx]
	mov	edx, r13d
	xor	eax, eax
	call	DRM_DEBUG_KMS@PLT
.L41:
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DRM_DEBUG_KMS@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	DRM_DEBUG_KMS@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	jmp	.L1
.L19:
	cmp	QWORD PTR 24[r14], 0
	je	.L41
.L20:
	mov	rax, QWORD PTR DE_SMART[rip]
	cmp	QWORD PTR [rdx], rax
	jne	.L21
.L24:
	lea	rdi, .LC3[rip]
	call	DRM_ERROR@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
	jmp	.L1
.L44:
	cmp	QWORD PTR 24[r14], 0
	je	.L41
	mov	rax, QWORD PTR 16[r14]
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR DRM_FORMAT_RGB888[rip]
	jne	.L25
	jmp	.L20
.L45:
	cmp	QWORD PTR 24[r14], 0
	je	.L21
	jmp	.L24
.L27:
	mov	r15d, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	malidp_de_plane_check, .-malidp_de_plane_check
	.comm	ROTATE_NONE,8,8
	.comm	ROTATE_COMPRESSED,8,8
	.comm	MALIDP_ROTATED_MASK,4,4
	.comm	MALIDP_INVALID_FORMAT_ID,8,8
	.comm	MALIDP_DEVICE_LV_HAS_3_STRIDES,4,4
	.comm	EINVAL,4,4
	.comm	DRM_MODE_ROTATE_0,4,4
	.comm	DRM_MODE_BLEND_PIXEL_NONE,8,8
	.comm	DRM_FORMAT_RGB888,8,8
	.comm	DRM_FORMAT_BGR888,8,8
	.comm	DRM_BLEND_ALPHA_OPAQUE,8,8
	.comm	DE_SMART,8,8
	.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_malidp_planes.c_malidp_de_plane_check.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid pitch %u for plane %d\012\000"
	.global	__aeabi_uidivmod
	.align	2
.LC1:
	.ascii	"Buffer width/height needs to be a multiple of tile "
	.ascii	"sizes\000"
	.align	2
.LC2:
	.ascii	"Plane src_x/src_y needs to be a multiple of tile si"
	.ascii	"zes\000"
	.align	2
.LC3:
	.ascii	"AFBC framebuffer not supported in SMART layer\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	malidp_de_plane_check, %function
malidp_de_plane_check:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r7, r1
	bl	to_malidp_plane
	mov	r5, r0
	mov	r0, r7
	bl	to_malidp_plane_state
	ldr	r8, [r7, #32]
	cmp	r8, #0
	beq	.L1
	ldr	r4, [r7, #28]
	cmp	r4, #0
	moveq	r8, r4
	beq	.L1
	ldr	r2, [r5]
	ldr	r3, [r4, #16]
	mov	r6, r0
	ldr	r1, [r5, #4]
	ldr	r0, [r2, #8]
	ldr	r2, [r4, #12]
	subs	r3, r3, #0
	ldr	ip, .L57
	movne	r3, #1
	ldr	r2, [r2]
	ldr	r1, [r1]
	add	r0, r0, #8
	ldr	r8, [ip]
	ldm	r7, {r10, ip}
	str	ip, [sp, #12]
	bl	malidp_hw_get_format_id
	ldr	r3, .L57+4
	str	r0, [r6]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L52
	ldr	r0, [r4, #12]
	ldr	r3, [r0, #4]
	cmp	r3, #0
	str	r3, [r6, #4]
	ble	.L4
	mov	fp, #0
	and	r8, r8, r10
.L6:
	mov	r1, r8
	ldr	r0, [r5]
	bl	malidp_hw_get_pitch_align
	ldr	r3, [r4]
	mov	r10, r0
	mov	r1, fp
	ldr	r0, [r4, #12]
	ldr	r9, [r3, fp, lsl #2]
	bl	drm_format_info_block_height
	mul	r3, r0, r9
	sub	r10, r10, #1
	tst	r3, r10
	lsl	r3, fp, #2
	beq	.L5
	ldr	r1, [r4, #16]
	cmp	r1, #0
	beq	.L54
.L5:
	ldr	r3, [r6, #4]
	add	fp, fp, #1
	cmp	r3, fp
	bgt	.L6
	ldr	r0, [r4, #12]
.L4:
	mov	r1, #0
	bl	drm_format_info_block_width
	mov	r1, #0
	mov	r8, r0
	ldr	r0, [r4, #12]
	bl	drm_format_info_block_height
	mov	r1, r8
	mov	r10, r0
	ldr	r0, [r4, #4]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	bne	.L7
	mov	r1, r10
	ldr	r0, [r4, #8]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	bne	.L7
	mov	r1, r8
	ldrsh	r0, [r7, #10]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	bne	.L9
	mov	r1, r10
	ldrsh	r0, [r7, #14]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	bne	.L9
	ldr	r1, [r5]
	ldr	r3, [r7, #16]
	ldr	r2, [r1]
	cmp	r3, r2
	bgt	.L52
	ldr	r0, [r7, #20]
	cmp	r2, r0
	blt	.L52
	cmp	r3, r0
	movge	r3, r0
	ldr	r2, [r1, #4]
	cmp	r2, r3
	bgt	.L52
	ldr	r3, [r6, #4]
	cmp	r3, #3
	bne	.L13
	ldr	r2, [r1, #8]
	ldr	r3, .L57+8
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L13
	ldr	r3, [r7, #28]
	ldr	r3, [r3]
	ldmib	r3, {r2, r3}
	cmp	r2, r3
	bne	.L52
.L13:
	mov	r1, r7
	mov	r0, r5
	bl	malidp_se_check_scaling
	subs	r8, r0, #0
	bne	.L1
	ldr	r3, .L57+12
	ldr	r1, [r7]
	ldr	r3, [r3]
	ldr	r2, [r5, #4]
	cmp	r1, r3
	beq	.L14
	ldr	r0, .L57+16
	ldr	r3, [r2, #4]
	ldr	r0, [r0]
	cmp	r3, r0
	beq	.L52
	ldr	r0, .L57+20
	ldr	r0, [r0]
	cmp	r3, r0
	beq	.L55
	ldr	r3, [r4, #12]
	ldr	r0, .L57+24
	ldr	r3, [r3]
	ldr	r0, [r0]
	cmp	r3, r0
	beq	.L19
.L25:
	ldr	r0, .L57+28
	ldr	r0, [r0]
	cmp	r3, r0
	beq	.L19
.L14:
	ldr	r3, .L57+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L56
.L21:
	mov	r2, #0
	ldr	r3, .L57
	str	r2, [r6, #8]
	ldr	r3, [r3]
	tst	r1, r3
	beq	.L22
	ldr	r2, [r4, #16]
	ldr	r0, [r5]
	subs	r2, r2, #0
	movne	r2, #1
	ldr	r3, [r4, #12]
	ldr	r1, [r0, #8]
	ldr	r3, [r3]
	str	r2, [sp]
	ldr	r9, [r1, #4]
	ldr	r2, [r7, #20]
	ldr	r1, [r7, #16]
	blx	r9
	subs	r3, r0, #0
	movlt	r8, r3
	blt	.L1
	str	r3, [r6, #8]
.L22:
	ldr	r3, .L57+36
	ldr	r2, [r7, #24]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L23
	ldr	r3, .L57+40
	ldr	r2, [sp, #12]
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L23
	ldr	r3, [r4, #12]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L52
.L23:
	mov	r1, r6
	mov	r0, r5
	bl	malidp_de_prefetch_settings
.L1:
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L54:
	ldr	r1, [r4]
	mov	r2, fp
	ldr	r1, [r1, r3]
	ldr	r0, .L57+44
	bl	DRM_DEBUG_KMS
.L52:
	ldr	r3, .L57+48
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r0, .L57+52
	bl	DRM_DEBUG_KMS
	ldr	r3, .L57+48
	ldr	r8, [r3]
	rsb	r8, r8, #0
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	ldr	r0, .L57+56
	bl	DRM_DEBUG_KMS
	ldr	r3, .L57+48
	ldr	r8, [r3]
	rsb	r8, r8, #0
	b	.L1
.L19:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L52
.L20:
	ldr	r3, .L57+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L21
.L24:
	ldr	r0, .L57+60
	bl	DRM_ERROR
	ldr	r3, .L57+48
	ldr	r8, [r3]
	rsb	r8, r8, #0
	b	.L1
.L56:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L21
	b	.L24
.L55:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L52
	ldr	r3, [r4, #12]
	ldr	r0, .L57+24
	ldr	r3, [r3]
	ldr	r0, [r0]
	cmp	r3, r0
	bne	.L25
	b	.L20
.L58:
	.align	2
.L57:
	.word	MALIDP_ROTATED_MASK
	.word	MALIDP_INVALID_FORMAT_ID
	.word	MALIDP_DEVICE_LV_HAS_3_STRIDES
	.word	DRM_MODE_ROTATE_0
	.word	ROTATE_NONE
	.word	ROTATE_COMPRESSED
	.word	DRM_FORMAT_RGB888
	.word	DRM_FORMAT_BGR888
	.word	DE_SMART
	.word	DRM_BLEND_ALPHA_OPAQUE
	.word	DRM_MODE_BLEND_PIXEL_NONE
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	malidp_de_plane_check, .-malidp_de_plane_check
	.comm	ROTATE_NONE,4,4
	.comm	ROTATE_COMPRESSED,4,4
	.comm	MALIDP_ROTATED_MASK,4,4
	.comm	MALIDP_INVALID_FORMAT_ID,4,4
	.comm	MALIDP_DEVICE_LV_HAS_3_STRIDES,4,4
	.comm	EINVAL,4,4
	.comm	DRM_MODE_ROTATE_0,4,4
	.comm	DRM_MODE_BLEND_PIXEL_NONE,4,4
	.comm	DRM_FORMAT_RGB888,4,4
	.comm	DRM_FORMAT_BGR888,4,4
	.comm	DRM_BLEND_ALPHA_OPAQUE,4,4
	.comm	DE_SMART,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
