	.file	"extr_omapfb_main.c_omapfb_setup_mem.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	omapfb_setup_mem, @function
omapfb_setup_mem:
.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
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r15, QWORD PTR 32[rdi]
	mov	r14d, DWORD PTR ENODEV[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r13, QWORD PTR 16[r15]
	neg	r14d
	mov	rax, QWORD PTR 0[r13]
	cmp	QWORD PTR [rax], 0
	je	.L1
	mov	rax, QWORD PTR OMAPFB_MEMTYPE_SDRAM[rip]
	mov	rbx, rsi
	cmp	QWORD PTR [rsi], rax
	je	.L4
	mov	r14d, DWORD PTR EINVAL[rip]
	neg	r14d
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[r13]
	mov	rbp, rdi
	mov	edi, DWORD PTR 8[rsi]
	mov	r14, QWORD PTR [r15]
	mov	QWORD PTR [rsp], rax
	call	PAGE_ALIGN@PLT
	mov	rdi, r13
	mov	r12, rax
	call	omapfb_rqueue_lock@PLT
	cmp	QWORD PTR 8[r15], 0
	jne	.L23
	mov	rdx, QWORD PTR [rsp]
	lea	rax, [r14+r14*2]
	lea	r11, [rdx+rax*8]
	mov	rax, QWORD PTR 8[r11]
	mov	rcx, QWORD PTR [r11]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR [rsp], rcx
	cmp	rcx, r12
	je	.L24
	lea	rdx, 8[r13]
	mov	QWORD PTR [r11], r12
	mov	QWORD PTR 24[rsp], rdx
	mov	QWORD PTR 8[r11], rax
	test	r12, r12
	jne	.L25
.L14:
	mov	rax, QWORD PTR 0[r13]
	mov	rdx, QWORD PTR 8[rax]
	test	rdx, rdx
	je	.L10
	mov	QWORD PTR 8[rsp], r11
	xor	eax, eax
	call	rdx
	mov	rax, QWORD PTR 0[r13]
	mov	r11, QWORD PTR 8[rsp]
.L10:
	mov	QWORD PTR 8[rsp], r11
	mov	rdx, QWORD PTR [rbx]
	lea	rcx, 32[rsp]
	mov	rsi, r12
	mov	rdi, QWORD PTR [r15]
	call	[QWORD PTR [rax]]
	mov	r11, QWORD PTR 8[rsp]
	test	eax, eax
	mov	r14d, eax
	js	.L26
	mov	rax, QWORD PTR 32[rsp]
	mov	QWORD PTR 16[r11], rax
	cmp	QWORD PTR [rsp], r12
	je	.L6
	test	r12, r12
	je	.L13
	mov	rsi, QWORD PTR 24[rsp]
	lea	rdi, 24[rbp]
	mov	edx, 4
	call	memcpy@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	set_fb_fix@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	mov	r14d, DWORD PTR EBUSY[rip]
	neg	r14d
.L6:
	mov	rdi, r13
	call	omapfb_rqueue_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	xor	r14d, r14d
	cmp	rax, QWORD PTR 16[rsp]
	je	.L6
	lea	rdx, 8[r13]
	mov	QWORD PTR 8[r11], rax
	mov	QWORD PTR 24[rsp], rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	QWORD PTR 16[rbp], 0
	mov	rdi, rbp
	mov	QWORD PTR 8[rbp], 0
	call	mutex_unlock@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR [r11], rax
	mov	rax, QWORD PTR 16[rsp]
	mov	QWORD PTR 8[r11], rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r14, QWORD PTR 24[rsp]
	lea	rsi, 24[rbp]
	mov	edx, 4
	mov	QWORD PTR 8[rsp], r11
	mov	rdi, r14
	call	memcpy@PLT
	mov	rsi, r14
	mov	rdi, rbp
	call	set_fb_var@PLT
	mov	r11, QWORD PTR 8[rsp]
	test	eax, eax
	mov	r14d, eax
	jns	.L14
	jmp	.L6
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	omapfb_setup_mem, .-omapfb_setup_mem
	.comm	OMAPFB_MEMTYPE_SDRAM,8,8
	.comm	ENODEV,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_omapfb_main.c_omapfb_setup_mem.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	omapfb_setup_mem, %function
omapfb_setup_mem:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r10, [r0, #16]
	ldr	r3, .L28
	ldr	r6, [r10, #8]
	sub	sp, sp, #28
	ldr	r2, [r6]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r2, [r2]
	cmp	r2, #0
	beq	.L22
	ldr	r2, .L28+4
	mov	r4, r1
	ldr	r2, [r2]
	ldr	r1, [r1]
	cmp	r1, r2
	beq	.L4
	ldr	r3, .L28+8
	ldr	fp, [r3]
	rsb	fp, fp, #0
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, fp
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r5, r0
	ldr	r0, [r4, #4]
	ldr	r9, [r6, #8]
	ldr	r7, [r10]
	bl	PAGE_ALIGN
	mov	r8, r0
	mov	r0, r6
	bl	omapfb_rqueue_lock
	ldr	fp, [r10, #4]
	cmp	fp, #0
	bne	.L24
	add	r7, r7, r7, lsl #1
	lsl	r3, r7, #2
	str	r3, [sp]
	ldr	r3, [r9, r3]
	add	r7, r9, r7, lsl #2
	str	r3, [sp, #4]
	cmp	r3, r8
	ldr	r3, [r7, #4]
	ldr	r2, [r4]
	str	r3, [sp, #8]
	beq	.L25
	ldr	r3, [sp]
	cmp	r8, #0
	str	r8, [r9, r3]
	add	r3, r6, #4
	str	r2, [r7, #4]
	str	r3, [sp, #12]
	bne	.L26
.L14:
	ldr	r2, [r6]
	ldr	r1, [r2, #4]
	cmp	r1, #0
	beq	.L10
	blx	r1
	ldr	r2, [r6]
.L10:
	ldr	fp, [r2]
	mov	r1, r8
	ldr	r2, [r4]
	ldr	r0, [r10]
	add	r3, sp, #16
	blx	fp
	subs	fp, r0, #0
	blt	.L27
	ldr	r2, [sp, #4]
	ldr	r3, [sp, #16]
	cmp	r2, r8
	str	r3, [r7, #8]
	beq	.L6
	cmp	r8, #0
	beq	.L13
	ldr	r1, [sp, #12]
	mov	r2, #4
	add	r0, r5, #12
	bl	memcpy
	mov	r0, r5
	mov	r1, #0
	bl	set_fb_fix
	b	.L6
.L24:
	ldr	r3, .L28+12
	ldr	fp, [r3]
	rsb	fp, fp, #0
.L6:
	mov	r0, r6
	bl	omapfb_rqueue_unlock
	b	.L1
.L22:
	ldr	r3, .L28+16
	ldr	fp, [r3]
	rsb	fp, fp, #0
	b	.L1
.L25:
	cmp	r2, r3
	addne	r3, r6, #4
	strne	r2, [r7, #4]
	strne	r3, [sp, #12]
	bne	.L14
	b	.L6
.L13:
	mov	r0, r5
	bl	mutex_lock
	mov	r0, r5
	str	r8, [r5, #8]
	str	r8, [r5, #4]
	bl	mutex_unlock
	b	.L6
.L27:
	ldr	r3, [sp]
	ldr	r2, [sp, #4]
	str	r2, [r9, r3]
	ldr	r3, [sp, #8]
	str	r3, [r7, #4]
	b	.L6
.L26:
	ldr	fp, [sp, #12]
	mov	r2, #4
	mov	r0, fp
	add	r1, r5, #12
	bl	memcpy
	mov	r1, fp
	mov	r0, r5
	bl	set_fb_var
	subs	fp, r0, #0
	bge	.L14
	b	.L6
.L23:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC0
	.word	OMAPFB_MEMTYPE_SDRAM
	.word	EINVAL
	.word	EBUSY
	.word	ENODEV
	.size	omapfb_setup_mem, .-omapfb_setup_mem
	.comm	OMAPFB_MEMTYPE_SDRAM,4,4
	.comm	ENODEV,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
