	.file	"extr_clk-spmi-pmic-div.c_clk_spmi_pmic_div_set_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clk_spmi_pmic_div_set_rate, @function
clk_spmi_pmic_div_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, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	to_clkdiv@PLT
	xor	edx, edx
	mov	rbp, rax
	mov	rax, rbx
	div	r12
	mov	rdi, rax
	call	div_to_div_factor@PLT
	xor	esi, esi
	mov	rdi, rbp
	mov	r13d, eax
	call	spin_lock_irqsave@PLT
	mov	rdi, rbp
	call	is_spmi_pmic_clkdiv_enabled@PLT
	test	eax, eax
	je	.L2
	xor	esi, esi
	mov	rdi, rbp
	call	spmi_pmic_clkdiv_set_enable_state@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	edi, DWORD PTR 16[rbp]
	mov	edx, DWORD PTR DIV_CTL1_DIV_FACTOR_MASK[rip]
	mov	ecx, r13d
	mov	rsi, QWORD PTR REG_DIV_CTL1[rip]
	add	rsi, QWORD PTR 8[rbp]
	call	regmap_update_bits@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	edx, r13d
	mov	esi, 1
	mov	rdi, rbp
	call	__spmi_pmic_clkdiv_set_enable_state@PLT
	mov	r12d, eax
.L3:
	mov	rdi, rbp
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbp]
	mov	edx, DWORD PTR DIV_CTL1_DIV_FACTOR_MASK[rip]
	mov	ecx, r13d
	mov	rsi, QWORD PTR REG_DIV_CTL1[rip]
	add	rsi, QWORD PTR 8[rbp]
	call	regmap_update_bits@PLT
	mov	r12d, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	clk_spmi_pmic_div_set_rate, .-clk_spmi_pmic_div_set_rate
	.comm	REG_DIV_CTL1,8,8
	.comm	DIV_CTL1_DIV_FACTOR_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-spmi-pmic-div.c_clk_spmi_pmic_div_set_rate.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clk_spmi_pmic_div_set_rate, %function
clk_spmi_pmic_div_set_rate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r2
	mov	r6, r1
	bl	to_clkdiv
	mov	r1, r6
	mov	r4, r0
	mov	r0, r5
	bl	__aeabi_uidiv
	bl	div_to_div_factor
	mov	r1, #0
	mov	r6, r0
	mov	r0, r4
	bl	spin_lock_irqsave
	mov	r0, r4
	bl	is_spmi_pmic_clkdiv_enabled
	cmp	r0, #0
	beq	.L2
	mov	r1, #0
	mov	r0, r4
	bl	spmi_pmic_clkdiv_set_enable_state
	subs	r5, r0, #0
	bne	.L3
	ldr	r3, .L11
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	ldr	r3, .L11+4
	add	r1, r1, r2
	ldr	r0, [r4, #8]
	ldr	r2, [r3]
	mov	r3, r6
	bl	regmap_update_bits
	subs	r5, r0, #0
	bne	.L3
	mov	r2, r6
	mov	r1, #1
	mov	r0, r4
	bl	__spmi_pmic_clkdiv_set_enable_state
	mov	r5, r0
.L3:
	mov	r0, r4
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L11
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	ldr	r2, .L11+4
	add	r1, r0, r1
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r0, [r4, #8]
	bl	regmap_update_bits
	mov	r5, r0
	b	.L3
.L12:
	.align	2
.L11:
	.word	REG_DIV_CTL1
	.word	DIV_CTL1_DIV_FACTOR_MASK
	.size	clk_spmi_pmic_div_set_rate, .-clk_spmi_pmic_div_set_rate
	.comm	REG_DIV_CTL1,4,4
	.comm	DIV_CTL1_DIV_FACTOR_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
