	.file	"extr_clk-fractional-divider.c_clk_fd_set_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clk_fd_set_rate, @function
clk_fd_set_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	to_clk_fd@PLT
	xor	esi, esi
	mov	rbx, rax
	mov	rax, QWORD PTR 48[rax]
	lea	rdi, -1[rax]
	call	GENMASK@PLT
	xor	esi, esi
	mov	r13d, eax
	mov	rax, QWORD PTR 56[rbx]
	lea	rdi, -1[rax]
	call	GENMASK@PLT
	lea	r9, 16[rsp]
	mov	ecx, r13d
	mov	rsi, r12
	mov	edx, eax
	lea	r8, 8[rsp]
	mov	rdi, rbp
	call	rational_best_approximation@PLT
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR CLK_FRAC_DIVIDER_ZERO_BASED[rip], eax
	je	.L2
	sub	QWORD PTR 8[rsp], 1
	sub	QWORD PTR 16[rsp], 1
.L2:
	mov	rdi, QWORD PTR 40[rbx]
	test	rdi, rdi
	je	.L3
	xor	esi, esi
	call	spin_lock_irqsave@PLT
.L4:
	mov	rdi, rbx
	call	clk_fd_readl@PLT
	mov	rcx, QWORD PTR 24[rbx]
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, rbx
	mov	rdx, QWORD PTR 8[rsp]
	or	rsi, QWORD PTR 16[rbx]
	not	rsi
	and	rsi, rax
	sal	rdx, cl
	mov	rax, QWORD PTR 16[rsp]
	mov	rcx, QWORD PTR 32[rbx]
	sal	rax, cl
	or	rdx, rax
	or	rsi, rdx
	call	clk_fd_writel@PLT
	mov	rdi, QWORD PTR 40[rbx]
	test	rdi, rdi
	je	.L5
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
.L6:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	edi, edi
	call	__acquire@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	xor	edi, edi
	call	__release@PLT
	jmp	.L6
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	clk_fd_set_rate, .-clk_fd_set_rate
	.comm	CLK_FRAC_DIVIDER_ZERO_BASED,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-fractional-divider.c_clk_fd_set_rate.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clk_fd_set_rate, %function
clk_fd_set_rate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L14
	sub	sp, sp, #28
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r5, r1
	bl	to_clk_fd
	mov	r4, r0
	ldr	r0, [r0, #28]
	mov	r1, #0
	sub	r0, r0, #1
	bl	GENMASK
	mov	r7, r0
	ldr	r0, [r4, #24]
	mov	r1, #0
	sub	r0, r0, #1
	bl	GENMASK
	add	lr, sp, #16
	add	ip, sp, #12
	mov	r3, r0
	mov	r2, r7
	mov	r1, r6
	mov	r0, r5
	stm	sp, {ip, lr}
	bl	rational_best_approximation
	ldr	r3, .L14+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L2
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #16]
	sub	r2, r2, #1
	sub	r3, r3, #1
	str	r2, [sp, #12]
	str	r3, [sp, #16]
.L2:
	ldr	r0, [r4, #20]
	cmp	r0, #0
	beq	.L3
	mov	r1, #0
	bl	spin_lock_irqsave
.L4:
	mov	r0, r4
	bl	clk_fd_readl
	ldmib	r4, {r1, ip}
	ldr	r2, [r4, #16]
	ldr	r3, [sp, #16]
	orr	r1, r1, ip
	lsl	r3, r3, r2
	ldr	ip, [sp, #12]
	ldr	r2, [r4, #12]
	bic	r1, r0, r1
	orr	r3, r3, ip, lsl r2
	mov	r0, r4
	orr	r1, r3, r1
	bl	clk_fd_writel
	ldr	r0, [r4, #20]
	cmp	r0, #0
	beq	.L5
	mov	r1, #0
	bl	spin_unlock_irqrestore
.L6:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	bl	__acquire
	b	.L4
.L5:
	bl	__release
	b	.L6
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	CLK_FRAC_DIVIDER_ZERO_BASED
	.size	clk_fd_set_rate, .-clk_fd_set_rate
	.comm	CLK_FRAC_DIVIDER_ZERO_BASED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
