	.file	"extr_clk-xgene.c_xgene_clk_pmd_recalc_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	xgene_clk_pmd_recalc_rate, @function
xgene_clk_pmd_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_xgene_clk_pmd@PLT
	mov	rdi, QWORD PTR 32[rax]
	mov	r12, rax
	test	rdi, rdi
	je	.L2
	xor	esi, esi
	call	spin_lock_irqsave@PLT
.L3:
	mov	edi, DWORD PTR 40[r12]
	call	readl@PLT
	mov	rdi, QWORD PTR 32[r12]
	mov	rbx, rax
	test	rdi, rdi
	je	.L4
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
.L5:
	mov	rax, QWORD PTR [r12]
	mov	rcx, QWORD PTR 8[r12]
	mov	rdi, rbp
	mov	rsi, QWORD PTR 24[r12]
	mov	edx, DWORD PTR 16[r12]
	and	rax, rbx
	shr	rax, cl
	mov	rbx, rsi
	sub	rbx, rax
	add	rax, 1
	test	DWORD PTR XGENE_CLK_PMD_SCALE_INVERTED[rip], edx
	cmove	rbx, rax
	call	do_div@PLT
	mov	rax, rbx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	imul	rax, rbp
	test	rax, rax
	cmove	rax, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xor	edi, edi
	call	__acquire@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xor	edi, edi
	call	__release@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	xgene_clk_pmd_recalc_rate, .-xgene_clk_pmd_recalc_rate
	.comm	XGENE_CLK_PMD_SCALE_INVERTED,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-xgene.c_xgene_clk_pmd_recalc_rate.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xgene_clk_pmd_recalc_rate, %function
xgene_clk_pmd_recalc_rate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	bl	to_xgene_clk_pmd
	mov	r6, r0
	ldr	r0, [r0, #16]
	cmp	r0, #0
	beq	.L2
	mov	r1, #0
	bl	spin_lock_irqsave
.L3:
	ldr	r0, [r6, #20]
	bl	readl
	mov	r5, r0
	ldr	r0, [r6, #16]
	cmp	r0, #0
	beq	.L4
	mov	r1, #0
	bl	spin_unlock_irqrestore
.L5:
	ldr	r3, .L11
	ldr	r4, [r6]
	ldr	r0, [r6, #4]
	ldr	r2, [r6, #8]
	ldr	r3, [r3]
	ldr	r1, [r6, #12]
	and	r4, r4, r5
	tst	r2, r3
	lsr	r4, r4, r0
	subne	r4, r1, r4
	addeq	r4, r4, #1
	mov	r0, r7
	bl	do_div
	muls	r0, r7, r4
	moveq	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	bl	__acquire
	b	.L3
.L4:
	bl	__release
	b	.L5
.L12:
	.align	2
.L11:
	.word	XGENE_CLK_PMD_SCALE_INVERTED
	.size	xgene_clk_pmd_recalc_rate, .-xgene_clk_pmd_recalc_rate
	.comm	XGENE_CLK_PMD_SCALE_INVERTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
