	.file	"extr_clk-sunxi.c_sun4i_get_pll1_factors.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sun4i_get_pll1_factors, @function
sun4i_get_pll1_factors:
.LFB0:
	.cfi_startproc
	endbr64
	movsx	rax, DWORD PTR [rdi]
	mov	QWORD PTR 16[rdi], 0
	mov	rsi, rax
	imul	rax, rax, 375299969
	mov	edx, esi
	sar	edx, 31
	sar	rax, 51
	sub	eax, edx
	imul	edx, eax, 6000000
	cmp	edx, 767999999
	mov	DWORD PTR [rdi], edx
	setg	cl
	cmp	edx, 42000000
	sete	r8b
	or	ecx, r8d
	cmp	edx, 54000000
	sete	dl
	or	ecx, edx
	movzx	ecx, cl
	mov	DWORD PTR 4[rdi], ecx
	cmp	esi, 59999999
	jg	.L2
	mov	DWORD PTR 8[rdi], 3
	sal	eax, 3
.L3:
	add	ecx, 1
	cdq
	idiv	ecx
	test	eax, eax
	lea	edx, 3[rax]
	cmovs	eax, edx
	sar	eax, 2
	mov	DWORD PTR 12[rdi], eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	cmp	esi, 119999999
	jg	.L15
.L4:
	mov	DWORD PTR 8[rdi], 2
	sal	eax, 2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	esi, 191999999
	jg	.L5
	test	al, 1
	jne	.L4
.L6:
	mov	DWORD PTR 8[rdi], 1
	add	eax, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	esi, 239999999
	jle	.L6
	cmp	esi, 383999999
	jg	.L7
	test	al, 2
	jne	.L6
.L7:
	mov	DWORD PTR 8[rdi], 0
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	sun4i_get_pll1_factors, .-sun4i_get_pll1_factors
	.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_clk-sunxi.c_sun4i_get_pll1_factors.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sun4i_get_pll1_factors, %function
sun4i_get_pll1_factors:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r0
	ldr	r0, .L17
	ldr	r2, [r4]
	ldr	r1, .L17+4
	smull	r3, r0, r2, r0
	asr	r3, r2, #31
	rsb	r0, r3, r0, asr #19
	mul	r3, r1, r0
	ldr	r1, .L17+8
	ldr	ip, .L17+12
	sub	r1, r3, r1
	clz	r1, r1
	lsr	r1, r1, #5
	cmp	r3, ip
	orrgt	r1, r1, #1
	ldr	ip, .L17+16
	mov	lr, #0
	cmp	r3, ip
	orreq	r1, r1, #1
	str	r3, [r4]
	ldr	r3, .L17+20
	str	lr, [r4, #16]
	cmp	r2, r3
	str	r1, [r4, #4]
	bge	.L2
	mov	r3, #3
	lsl	r0, r0, r3
	str	r3, [r4, #8]
.L3:
	add	r1, r1, #1
	bl	__aeabi_idiv
	cmp	r0, #0
	add	r3, r0, #3
	movge	r3, r0
	asr	r3, r3, #2
	str	r3, [r4, #12]
	pop	{r4, pc}
.L2:
	ldr	r3, .L17+24
	cmp	r2, r3
	bgt	.L16
.L4:
	mov	r3, #2
	lsl	r0, r0, r3
	str	r3, [r4, #8]
	b	.L3
.L16:
	ldr	r3, .L17+28
	cmp	r2, r3
	bge	.L5
	tst	r0, #1
	bne	.L4
.L6:
	mov	r3, #1
	lsl	r0, r0, r3
	str	r3, [r4, #8]
	b	.L3
.L5:
	ldr	r3, .L17+32
	cmp	r2, r3
	blt	.L6
	ldr	r3, .L17+36
	cmp	r2, r3
	bgt	.L7
	tst	r0, #2
	bne	.L6
.L7:
	mov	r3, #0
	str	r3, [r4, #8]
	b	.L3
.L18:
	.align	2
.L17:
	.word	375299969
	.word	6000000
	.word	42000000
	.word	767999999
	.word	54000000
	.word	60000000
	.word	119999999
	.word	192000000
	.word	240000000
	.word	383999999
	.size	sun4i_get_pll1_factors, .-sun4i_get_pll1_factors
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
