	.file	"extr_omap.c_mmc_omap_calc_divisor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mmc_omap_calc_divisor, @function
mmc_omap_calc_divisor:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	mmc_priv@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR 8[rax]
	mov	edi, DWORD PTR [rax]
	call	clk_get_rate@PLT
	mov	r8d, DWORD PTR [rbx]
	test	r8d, r8d
	je	.L1
	cdq
	mov	ecx, eax
	mov	edi, 1
	idiv	r8d
	test	eax, eax
	cmovg	edi, eax
	mov	eax, ecx
	cdq
	idiv	edi
	cmp	r8d, eax
	mov	r8d, 250
	setl	al
	movzx	eax, al
	add	edi, eax
	mov	eax, ecx
	cmp	edi, 250
	cmovle	r8d, edi
	cdq
	idiv	r8d
	mov	DWORD PTR 0[rbp], eax
	mov	rax, QWORD PTR MMC_BUS_WIDTH_4[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L9
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	or	r8d, 32768
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mmc_omap_calc_divisor, .-mmc_omap_calc_divisor
	.comm	MMC_BUS_WIDTH_4,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_omap.c_mmc_omap_calc_divisor.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmc_omap_calc_divisor, %function
mmc_omap_calc_divisor:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	bl	mmc_priv
	ldr	r3, [r0, #4]
	mov	r6, r0
	ldr	r0, [r3]
	bl	clk_get_rate
	ldr	r4, [r7]
	cmp	r4, #0
	beq	.L1
	mov	r1, r4
	mov	r8, r0
	bl	__aeabi_idiv
	cmp	r0, #1
	movlt	r5, #1
	movge	r5, r0
	mov	r0, r8
	mov	r1, r5
	bl	__aeabi_idiv
	cmp	r4, r0
	addlt	r5, r5, #1
	cmp	r5, #250
	movlt	r4, r5
	movge	r4, #250
	mov	r0, r8
	mov	r1, r4
	bl	__aeabi_idiv
	ldr	r3, .L9
	ldr	r2, [r7, #4]
	ldr	r3, [r3]
	str	r0, [r6]
	cmp	r2, r3
	orreq	r4, r4, #32768
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	MMC_BUS_WIDTH_4
	.size	mmc_omap_calc_divisor, .-mmc_omap_calc_divisor
	.comm	MMC_BUS_WIDTH_4,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
