	.file	"extr_rtc_clk.c_rtc_clk_cpu_freq_to_xtal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtc_clk_cpu_freq_to_xtal, @function
rtc_clk_cpu_freq_to_xtal:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	xor	eax, eax
	call	rtc_clk_xtal_freq_get@PLT
	mov	edi, eax
	mov	ebx, eax
	call	ets_update_cpu_frequency@PLT
	mov	edx, DWORD PTR DIG_DBIAS_XTAL[rip]
	mov	esi, DWORD PTR RTC_CNTL_DIG_DBIAS_WAK[rip]
	mov	edi, DWORD PTR RTC_CNTL_REG[rip]
	call	REG_SET_FIELD@PLT
	mov	esi, DWORD PTR SYSCON_PRE_DIV_CNT[rip]
	mov	edi, DWORD PTR SYSCON_SYSCLK_CONF_REG[rip]
	xor	edx, edx
	call	REG_SET_FIELD@PLT
	mov	edx, DWORD PTR SYSCON_SOC_CLK_SEL_XTL[rip]
	mov	esi, DWORD PTR SYSCON_SOC_CLK_SEL[rip]
	mov	edi, DWORD PTR SYSCON_SYSCLK_CONF_REG[rip]
	call	REG_SET_FIELD@PLT
	imul	ebx, DWORD PTR MHZ[rip]
	mov	edi, ebx
	call	rtc_clk_apb_freq_update@PLT
	mov	eax, DWORD PTR RTC_CPU_FREQ_XTAL[rip]
	pop	rbx
	.cfi_def_cfa_offset 8
	mov	DWORD PTR s_cur_freq[rip], eax
	mov	eax, DWORD PTR RTC_PLL_NONE[rip]
	mov	DWORD PTR s_cur_pll[rip], eax
	ret
	.cfi_endproc
.LFE0:
	.size	rtc_clk_cpu_freq_to_xtal, .-rtc_clk_cpu_freq_to_xtal
	.comm	s_cur_pll,4,4
	.comm	s_cur_freq,4,4
	.comm	SYSCON_SYSCLK_CONF_REG,4,4
	.comm	SYSCON_SOC_CLK_SEL_XTL,4,4
	.comm	SYSCON_SOC_CLK_SEL,4,4
	.comm	SYSCON_PRE_DIV_CNT,4,4
	.comm	RTC_PLL_NONE,4,4
	.comm	RTC_CPU_FREQ_XTAL,4,4
	.comm	RTC_CNTL_REG,4,4
	.comm	RTC_CNTL_DIG_DBIAS_WAK,4,4
	.comm	MHZ,4,4
	.comm	DIG_DBIAS_XTAL,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_rtc_clk.c_rtc_clk_cpu_freq_to_xtal.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtc_clk_cpu_freq_to_xtal, %function
rtc_clk_cpu_freq_to_xtal:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	bl	rtc_clk_xtal_freq_get
	mov	r4, r0
	bl	ets_update_cpu_frequency
	ldr	r3, .L4
	ldr	r2, .L4+4
	ldr	r1, .L4+8
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r3]
	bl	REG_SET_FIELD
	ldr	r5, .L4+12
	ldr	r3, .L4+16
	mov	r2, #0
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	REG_SET_FIELD
	ldr	r3, .L4+20
	ldr	r2, .L4+24
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, [r5]
	bl	REG_SET_FIELD
	ldr	r3, .L4+28
	ldr	r0, [r3]
	mul	r0, r4, r0
	bl	rtc_clk_apb_freq_update
	ldr	r2, .L4+32
	ldr	r3, .L4+36
	ldr	r0, [r2]
	ldr	r1, .L4+40
	ldr	r2, [r3]
	ldr	r3, .L4+44
	str	r0, [r1]
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L5:
	.align	2
.L4:
	.word	RTC_CNTL_REG
	.word	DIG_DBIAS_XTAL
	.word	RTC_CNTL_DIG_DBIAS_WAK
	.word	SYSCON_SYSCLK_CONF_REG
	.word	SYSCON_PRE_DIV_CNT
	.word	SYSCON_SOC_CLK_SEL
	.word	SYSCON_SOC_CLK_SEL_XTL
	.word	MHZ
	.word	RTC_CPU_FREQ_XTAL
	.word	RTC_PLL_NONE
	.word	s_cur_freq
	.word	s_cur_pll
	.size	rtc_clk_cpu_freq_to_xtal, .-rtc_clk_cpu_freq_to_xtal
	.comm	s_cur_pll,4,4
	.comm	s_cur_freq,4,4
	.comm	SYSCON_SYSCLK_CONF_REG,4,4
	.comm	SYSCON_SOC_CLK_SEL_XTL,4,4
	.comm	SYSCON_SOC_CLK_SEL,4,4
	.comm	SYSCON_PRE_DIV_CNT,4,4
	.comm	RTC_PLL_NONE,4,4
	.comm	RTC_CPU_FREQ_XTAL,4,4
	.comm	RTC_CNTL_REG,4,4
	.comm	RTC_CNTL_DIG_DBIAS_WAK,4,4
	.comm	MHZ,4,4
	.comm	DIG_DBIAS_XTAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
