	.file	"extr_fapll.c_ti_fapll_synth_set_frac_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ti_fapll_synth_set_frac_rate, @function
ti_fapll_synth_set_frac_rate:
.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
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR SYNTH_PHASE_K[rip]
	imul	edi, edx
	call	DIV_ROUND_UP_ULL@PLT
	mov	rsi, QWORD PTR SYNTH_MAX_INT_DIV[rip]
	xor	edx, edx
	mov	rcx, rax
	div	rsi
	mov	r14, rax
	mov	rax, QWORD PTR SYNTH_MAX_DIV_M[rip]
	cmp	rax, r14
	jb	.L12
	cmp	rsi, rcx
	mov	edx, 1
	cmova	r14, rdx
	cmp	rax, r14
	jbe	.L9
	movabs	r12, -2972493582642298179
	mov	r15, rbx
	imul	r15, r14
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	r14, 1
	add	r15, rbx
	cmp	QWORD PTR SYNTH_MAX_DIV_M[rip], r14
	jbe	.L12
.L7:
	mov	edi, DWORD PTR SYNTH_PHASE_K[rip]
	mov	rsi, r15
	imul	edi, ebp
	imul	edi, edi, 10000000
	call	DIV_ROUND_UP_ULL@PLT
	mov	rcx, rax
	mul	r12
	shr	rdx, 23
	cmp	QWORD PTR SYNTH_MAX_INT_DIV[rip], rdx
	jb	.L6
	imul	rax, rdx, 10000000
	mov	rbx, rcx
	sub	rbx, rax
.L5:
	mov	edi, DWORD PTR 0[r13]
	mov	QWORD PTR 8[rsp], rdx
	call	readl_relaxed@PLT
	mov	rdx, QWORD PTR 8[rsp]
	or	rbx, QWORD PTR SYNTH_LDFREQ[rip]
	and	rdx, QWORD PTR SYNTH_MAX_INT_DIV[rip]
	mov	rcx, rbx
	and	rax, -536870912
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, rdx
	or	rcx, rax
	sal	rdi, 24
	or	rdi, rcx
	call	writel_relaxed@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r14, QWORD PTR EINVAL[rip]
	neg	r14
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L9:
	.cfi_restore_state
	xor	ebx, ebx
	xor	edx, edx
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ti_fapll_synth_set_frac_rate, .-ti_fapll_synth_set_frac_rate
	.comm	SYNTH_PHASE_K,4,4
	.comm	SYNTH_MAX_INT_DIV,8,8
	.comm	SYNTH_MAX_DIV_M,8,8
	.comm	SYNTH_LDFREQ,8,8
	.comm	EINVAL,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_fapll.c_ti_fapll_synth_set_frac_rate.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ti_fapll_synth_set_frac_rate, %function
ti_fapll_synth_set_frac_rate:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	fp, .L14
	sub	sp, sp, #12
	str	r0, [sp]
	ldr	r0, [fp]
	mov	r4, r2
	mul	r0, r2, r0
	mov	r5, r1
	bl	DIV_ROUND_UP_ULL
	ldr	r6, .L14+4
	mov	r8, r0
	ldr	r9, [r6]
	ldr	r7, .L14+8
	mov	r1, r9
	bl	__aeabi_uidiv
	ldr	r3, [r7]
	cmp	r3, r0
	bcc	.L12
	cmp	r9, r8
	mov	r10, r0
	movhi	r10, #1
	cmp	r3, r10
	bls	.L9
	mul	r9, r10, r5
	ldr	r8, .L14+12
	b	.L7
.L6:
	ldr	r3, [r7]
	add	r10, r10, #1
	cmp	r3, r10
	bls	.L12
.L7:
	ldr	r3, [fp]
	mov	r1, r9
	mul	r3, r4, r3
	rsb	r0, r3, r3, lsl #5
	rsb	r0, r0, r0, lsl #6
	add	r3, r3, r0, lsl #3
	add	r3, r3, r3, lsl #2
	lsl	r0, r3, #7
	bl	DIV_ROUND_UP_ULL
	umull	r2, r3, r8, r0
	ldr	r2, [r6]
	add	r9, r9, r5
	cmp	r2, r3, lsr #22
	lsr	r3, r3, #22
	bcc	.L6
	rsb	r4, r3, r3, lsl #5
	rsb	r4, r4, r4, lsl #6
	add	r4, r3, r4, lsl #3
	add	r4, r4, r4, lsl #2
	sub	r4, r0, r4, lsl #7
.L5:
	ldr	r5, [sp]
	str	r3, [sp, #4]
	ldr	r0, [r5]
	bl	readl_relaxed
	ldr	r1, .L14+16
	ldr	r2, [r6]
	ldr	r1, [r1]
	ldr	r3, [sp, #4]
	orr	r4, r4, r1
	and	r0, r0, #-536870912
	and	r3, r3, r2
	orr	r0, r4, r0
	ldr	r1, [r5]
	orr	r0, r0, r3, lsl #24
	bl	writel_relaxed
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	ldr	r3, .L14+20
	ldr	r10, [r3]
	rsb	r10, r10, #0
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r4, #0
	mov	r3, r4
	b	.L5
.L15:
	.align	2
.L14:
	.word	SYNTH_PHASE_K
	.word	SYNTH_MAX_INT_DIV
	.word	SYNTH_MAX_DIV_M
	.word	1801439851
	.word	SYNTH_LDFREQ
	.word	EINVAL
	.size	ti_fapll_synth_set_frac_rate, .-ti_fapll_synth_set_frac_rate
	.comm	SYNTH_PHASE_K,4,4
	.comm	SYNTH_MAX_INT_DIV,4,4
	.comm	SYNTH_MAX_DIV_M,4,4
	.comm	SYNTH_LDFREQ,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
