	.file	"extr_pxa168fb.c_pxa168fb_init_mode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"pxa168fb: find best mode: res = %dx%d\n"
	.text
	.p2align 4
	.type	pxa168fb_init_mode, @function
pxa168fb_init_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r13, 4[rdi]
	lea	rsi, 52[rdi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR 56[rdi]
	mov	rdi, r13
	mov	ebp, DWORD PTR DEFAULT_REFRESH[rip]
	call	fb_find_best_mode@PLT
	test	rax, rax
	je	.L2
	mov	rsi, rax
	mov	rdi, r13
	call	fb_videomode_to_var@PLT
.L2:
	mov	ecx, DWORD PTR 16[rbx]
	mov	r8d, DWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	mov	eax, DWORD PTR [rbx]
	mov	edi, DWORD PTR [r12]
	sar	ecx, 3
	mov	DWORD PTR 4[rbx], r8d
	imul	ecx, r8d
	cdq
	idiv	ecx
	mov	ecx, DWORD PTR 20[rbx]
	mov	edx, r8d
	mov	DWORD PTR 12[rbx], eax
	call	dev_dbg@PLT
	mov	esi, DWORD PTR 24[rbx]
	mov	eax, DWORD PTR 36[rbx]
	movabs	rdi, 1000000000000
	add	esi, DWORD PTR 8[rbx]
	add	eax, DWORD PTR 20[rbx]
	add	esi, DWORD PTR 28[rbx]
	add	eax, DWORD PTR 40[rbx]
	add	esi, DWORD PTR 32[rbx]
	add	eax, DWORD PTR 44[rbx]
	imul	esi, eax
	imul	esi, ebp
	call	do_div@PLT
	mov	DWORD PTR 48[rbx], -727379968
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	.cfi_endproc
.LFE0:
	.size	pxa168fb_init_mode, .-pxa168fb_init_mode
	.comm	DEFAULT_REFRESH,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_pxa168fb.c_pxa168fb_init_mode.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pxa168fb: find best mode: res = %dx%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pxa168fb_init_mode, %function
pxa168fb_init_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, .L8+8
	add	r6, r0, #4
	add	r1, r4, #52
	mov	r0, r6
	ldr	r7, [r4, #56]
	ldr	r5, [r3]
	bl	fb_find_best_mode
	subs	r1, r0, #0
	beq	.L2
	mov	r0, r6
	bl	fb_videomode_to_var
.L2:
	ldr	r1, [r4, #16]
	ldr	r6, [r4, #8]
	asr	r1, r1, #3
	mul	r1, r6, r1
	ldr	r0, [r4]
	str	r6, [r4, #4]
	bl	__aeabi_idiv
	mov	r2, r6
	ldr	r3, [r4, #20]
	str	r0, [r4, #12]
	ldr	r1, .L8+12
	ldr	r0, [r7]
	bl	dev_dbg
	adr	r1, .L8
	ldmia	r1, {r0-r1}
	ldr	ip, [r4, #24]
	ldr	r2, [r4, #8]
	ldr	r3, [r4, #20]
	add	r2, r2, ip
	ldr	ip, [r4, #36]
	ldr	lr, [r4, #28]
	add	r3, r3, ip
	ldr	ip, [r4, #40]
	add	r2, r2, lr
	add	r3, r3, ip
	ldr	lr, [r4, #32]
	ldr	ip, [r4, #44]
	add	r2, r2, lr
	add	r3, r3, ip
	mul	r2, r3, r2
	mul	r2, r5, r2
	bl	do_div
	ldr	r3, .L8+16
	mov	r0, #0
	str	r3, [r4, #48]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	3
.L8:
	.word	-727379968
	.word	232
	.word	DEFAULT_REFRESH
	.word	.LC0
	.word	-727379968
	.size	pxa168fb_init_mode, .-pxa168fb_init_mode
	.comm	DEFAULT_REFRESH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
