	.file	"extr_intel_display.c_intel_compute_aligned_offset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	intel_compute_aligned_offset, @function
intel_compute_aligned_offset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	movsx	rdx, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, -1
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rdi
	mov	ebx, DWORD PTR 104[rsp]
	mov	DWORD PTR 4[rsp], r9d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rcx]
	mov	rax, QWORD PTR [rax]
	mov	r14d, DWORD PTR [rax+rdx*4]
	test	ebx, ebx
	je	.L2
	mov	r13d, ebx
	sub	ebx, 1
	neg	r13d
.L2:
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, r8d
	mov	DWORD PTR [rsp], r8d
	call	is_surface_linear@PLT
	test	eax, eax
	je	.L13
	mov	eax, DWORD PTR [r15]
	mov	edx, DWORD PTR [r12]
	mov	esi, DWORD PTR 4[rsp]
	imul	edx, r14d
	imul	eax, esi
	add	eax, edx
	xor	edx, edx
	and	r13d, eax
	and	eax, ebx
	div	esi
	mov	DWORD PTR [r15], eax
	mov	eax, edx
	xor	edx, edx
	div	r14d
	mov	DWORD PTR [r12], eax
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L13:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rsp]
	call	intel_tile_size@PLT
	mov	r8d, DWORD PTR [rsp]
	mov	rdi, rbp
	lea	rcx, 20[rsp]
	lea	rdx, 16[rsp]
	mov	ebx, eax
	mov	esi, r8d
	call	intel_tile_dims@PLT
	mov	edi, DWORD PTR 96[rsp]
	call	drm_rotation_90_or_270@PLT
	test	rax, rax
	jne	.L15
	mov	r11d, DWORD PTR 16[rsp]
	mov	eax, DWORD PTR 4[rsp]
	xor	edx, edx
	imul	r14d, r11d
	div	r14d
	mov	r9d, eax
.L5:
	mov	r14d, DWORD PTR 20[rsp]
	mov	eax, DWORD PTR [r15]
	xor	edx, edx
	mov	r8d, ebx
	mov	rsi, r15
	mov	rdi, r12
	div	r14d
	mov	DWORD PTR [r15], edx
	mov	ecx, eax
	mov	eax, DWORD PTR [r12]
	xor	edx, edx
	imul	ecx, r9d
	div	r11d
	add	eax, ecx
	mov	DWORD PTR [r12], edx
	mov	ecx, r14d
	mov	edx, r11d
	imul	eax, ebx
	and	r13d, eax
	push	r13
	.cfi_def_cfa_offset 104
	push	rax
	.cfi_def_cfa_offset 112
	call	intel_adjust_tile_offset@PLT
	pop	rax
	.cfi_def_cfa_offset 104
	pop	rdx
	.cfi_def_cfa_offset 96
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, DWORD PTR 20[rsp]
	mov	eax, DWORD PTR 4[rsp]
	xor	edx, edx
	mov	edi, DWORD PTR 16[rsp]
	div	esi
	mov	DWORD PTR [rsp], eax
	call	swap@PLT
	mov	r11d, DWORD PTR 16[rsp]
	mov	r9d, DWORD PTR [rsp]
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	intel_compute_aligned_offset, .-intel_compute_aligned_offset
	.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_intel_display.c_intel_compute_aligned_offset.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_uidivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_compute_aligned_offset, %function
intel_compute_aligned_offset:
	@ args = 16, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	sub	sp, sp, #36
	ldr	r3, [r3, #4]
	ldr	fp, [sp, #84]
	ldr	r8, [sp, #72]
	ldr	r3, [r3]
	mov	r7, r2
	ldr	r2, .L14
	cmp	fp, #0
	mov	r4, r0
	mov	r6, r1
	ldr	r0, [r5]
	mov	r1, r8
	rsbne	r10, fp, #0
	mvneq	r10, #0
	subne	fp, fp, #1
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	ldr	r9, [r3, r8, lsl #2]
	bl	is_surface_linear
	cmp	r0, #0
	beq	.L11
	ldr	r3, [r6]
	ldr	r4, [r7]
	mul	r3, r9, r3
	ldr	r2, [sp, #76]
	ldr	r1, [sp, #76]
	mla	r2, r4, r2, r3
	and	r0, fp, r2
	and	r10, r10, r2
	bl	__aeabi_uidivmod
	str	r0, [r7]
	mov	r0, r1
	mov	r1, r9
	bl	__aeabi_uidiv
	str	r0, [r6]
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r10
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r0, r4
	bl	intel_tile_size
	mov	ip, r0
	mov	r1, r8
	mov	r0, r5
	add	r3, sp, #24
	add	r2, sp, #20
	mov	r5, ip
	bl	intel_tile_dims
	ldr	r0, [sp, #80]
	bl	drm_rotation_90_or_270
	cmp	r0, #0
	bne	.L13
	ldr	fp, [sp, #20]
	ldr	r0, [sp, #76]
	mul	r1, r9, fp
	bl	__aeabi_uidiv
	mov	r8, r0
.L5:
	ldr	r9, [sp, #24]
	ldr	r0, [r7]
	mov	r1, r9
	bl	__aeabi_uidivmod
	str	r1, [r7]
	mov	r4, r0
	mov	r1, fp
	ldr	r0, [r6]
	bl	__aeabi_uidivmod
	mla	ip, r8, r4, r0
	mul	ip, r5, ip
	and	r10, r10, ip
	str	r10, [sp, #12]
	str	ip, [sp, #8]
	mov	r3, r9
	str	r1, [r6]
	mov	r2, fp
	mov	r1, r7
	mov	r0, r6
	stm	sp, {r5, r8}
	bl	intel_adjust_tile_offset
	b	.L1
.L13:
	ldr	r4, [sp, #24]
	ldr	r0, [sp, #76]
	mov	r1, r4
	bl	__aeabi_uidiv
	mov	r1, r4
	mov	r8, r0
	ldr	r0, [sp, #20]
	bl	swap
	ldr	fp, [sp, #20]
	b	.L5
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.size	intel_compute_aligned_offset, .-intel_compute_aligned_offset
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
