	.file	"extr_clk-gpt-synth.c_clk_gpt_recalc_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clk_gpt_recalc_rate, @function
clk_gpt_recalc_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	to_clk_gpt@PLT
	mov	rdi, QWORD PTR [rax]
	mov	r12, rax
	test	rdi, rdi
	jne	.L15
.L2:
	mov	edi, DWORD PTR 8[r12]
	call	readl_relaxed@PLT
	mov	rdi, QWORD PTR [r12]
	mov	ebx, eax
	test	rdi, rdi
	jne	.L16
.L3:
	mov	ecx, DWORD PTR GPT_NSCALE_SHIFT[rip]
	mov	edx, DWORD PTR GPT_MSCALE_MASK[rip]
	xor	eax, eax
	and	edx, ebx
	shr	ebx, cl
	and	ebx, DWORD PTR GPT_NSCALE_MASK[rip]
	add	edx, 1
	lea	ecx, 1[rbx]
	sal	edx, cl
	test	edx, edx
	je	.L1
	mov	ecx, edx
	mov	rax, rbp
	xor	edx, edx
	div	rcx
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	xor	esi, esi
	call	spin_lock_irqsave@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	clk_gpt_recalc_rate, .-clk_gpt_recalc_rate
	.comm	GPT_NSCALE_SHIFT,4,4
	.comm	GPT_NSCALE_MASK,4,4
	.comm	GPT_MSCALE_MASK,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_clk-gpt-synth.c_clk_gpt_recalc_rate.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clk_gpt_recalc_rate, %function
clk_gpt_recalc_rate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	bl	to_clk_gpt
	mov	r5, r0
	ldr	r0, [r0]
	cmp	r0, #0
	bne	.L16
.L2:
	ldr	r0, [r5, #4]
	bl	readl_relaxed
	mov	r3, r0
	ldr	r0, [r5]
	mov	r5, r3
	cmp	r0, #0
	bne	.L17
.L3:
	ldr	r1, .L18
	ldr	r2, .L18+4
	ldr	r3, .L18+8
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, [r2]
	and	r0, r0, r5
	and	r3, r3, r5, lsr r1
	add	r0, r0, #1
	add	r3, r3, #1
	lsls	r0, r0, r3
	popeq	{r4, r5, r6, pc}
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_uidiv
	pop	{r4, r5, r6, pc}
.L16:
	mov	r1, #0
	bl	spin_lock_irqsave
	b	.L2
.L17:
	mov	r1, #0
	bl	spin_unlock_irqrestore
	b	.L3
.L19:
	.align	2
.L18:
	.word	GPT_MSCALE_MASK
	.word	GPT_NSCALE_SHIFT
	.word	GPT_NSCALE_MASK
	.size	clk_gpt_recalc_rate, .-clk_gpt_recalc_rate
	.comm	GPT_NSCALE_SHIFT,4,4
	.comm	GPT_NSCALE_MASK,4,4
	.comm	GPT_MSCALE_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
