	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_ao_cec_g12a_dualdiv_clk_recalc_rate
_meson_ao_cec_g12a_dualdiv_clk_recalc_rate: ## @meson_ao_cec_g12a_dualdiv_clk_recalc_rate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	callq	_hw_to_meson_ao_cec_g12a_dualdiv_clk
	movq	%rax, %rbx
	movl	(%rax), %edi
	movq	_CECB_CLK_CNTL_REG0@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	movl	(%rbx), %edi
	movl	(%r14), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movq	_CECB_CLK_CNTL_BYPASS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_5
## %bb.1:
	movl	-48(%rbp), %esi
	movq	_CECB_CLK_CNTL_DUAL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%esi, %ebx
	movq	_CECB_CLK_CNTL_N1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FIELD_GET
	incl	%eax
	movslq	%eax, %r14
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_CECB_CLK_CNTL_N2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %esi
	callq	_FIELD_GET
	incl	%eax
	cltq
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_CECB_CLK_CNTL_M1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi
	callq	_FIELD_GET
	movslq	%eax, %r13
	leaq	1(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi
	callq	_FIELD_GET
	movslq	%eax, %r15
	leaq	1(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, %r14
	imulq	$100000000, -64(%rbp), %rdi     ## 8-byte Folded Reload
                                        ## imm = 0x5F5E100
	addq	%r13, %r15
	addq	$2, %r15
	imulq	%r15, %rbx
	movq	%rbx, %rsi
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, %rbx
	imulq	$100000000, -56(%rbp), %rdi     ## 8-byte Folded Reload
                                        ## imm = 0x5F5E100
	imulq	%r15, %r14
	movq	%r14, %rsi
	callq	_DIV_ROUND_CLOSEST
	addq	%rax, %rbx
	movl	$100000000, %edi                ## imm = 0x5F5E100
	movq	%rbx, %rsi
	callq	_DIV_ROUND_UP
	jmp	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_DIV_ROUND_CLOSEST
LBB0_4:
	movq	%rax, %r12
LBB0_5:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CECB_CLK_CNTL_REG0,4,2         ## @CECB_CLK_CNTL_REG0
	.comm	_CECB_CLK_CNTL_BYPASS_EN,4,2    ## @CECB_CLK_CNTL_BYPASS_EN
	.comm	_CECB_CLK_CNTL_DUAL_EN,4,2      ## @CECB_CLK_CNTL_DUAL_EN
	.comm	_CECB_CLK_CNTL_N1,4,2           ## @CECB_CLK_CNTL_N1
	.comm	_CECB_CLK_CNTL_N2,4,2           ## @CECB_CLK_CNTL_N2
	.comm	_CECB_CLK_CNTL_M1,4,2           ## @CECB_CLK_CNTL_M1
	.no_dead_strip	_meson_ao_cec_g12a_dualdiv_clk_recalc_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_ao_cec_g12a_dualdiv_clk_recalc_rate
_meson_ao_cec_g12a_dualdiv_clk_recalc_rate: ; @meson_ao_cec_g12a_dualdiv_clk_recalc_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	bl	_hw_to_meson_ao_cec_g12a_dualdiv_clk
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _CECB_CLK_CNTL_REG0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CECB_CLK_CNTL_REG0@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w0, [x20]
	ldr	w1, [x21]
	add	x2, sp, #8
	bl	_regmap_read
	ldr	w8, [sp, #8]
Lloh2:
	adrp	x9, _CECB_CLK_CNTL_BYPASS_EN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CECB_CLK_CNTL_BYPASS_EN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.1:
Lloh5:
	adrp	x8, _CECB_CLK_CNTL_DUAL_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CECB_CLK_CNTL_DUAL_EN@GOTPAGEOFF]
	ldr	w1, [sp, #12]
Lloh7:
	ldr	w8, [x8]
	and	w21, w8, w1
Lloh8:
	adrp	x8, _CECB_CLK_CNTL_N1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CECB_CLK_CNTL_N1@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_FIELD_GET
	add	w8, w0, #1
	sxtw	x20, w8
	cbz	w21, LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _CECB_CLK_CNTL_N2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CECB_CLK_CNTL_N2@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_FIELD_GET
	add	w8, w0, #1
	sxtw	x21, w8
Lloh14:
	adrp	x22, _CECB_CLK_CNTL_M1@GOTPAGE
Lloh15:
	ldr	x22, [x22, _CECB_CLK_CNTL_M1@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [sp, #8]
	bl	_FIELD_GET
	add	w23, w0, #1
	sxtw	x24, w23
	ldr	w0, [x22]
	ldr	w1, [sp, #8]
	bl	_FIELD_GET
	add	w22, w0, #1
	sxtw	x25, w22
	mov	x0, x19
	mov	x1, x20
	bl	_DIV_ROUND_CLOSEST
	mov	x20, x0
	mov	x0, x19
	mov	x1, x21
	bl	_DIV_ROUND_CLOSEST
	mov	x19, x0
	mov	w21, #57600
	movk	w21, #1525, lsl #16
	smull	x0, w23, w21
	add	x23, x25, x24
	mul	x1, x23, x20
	bl	_DIV_ROUND_CLOSEST
	mov	x20, x0
	smull	x0, w22, w21
	mul	x1, x23, x19
	bl	_DIV_ROUND_CLOSEST
	add	x1, x0, x20
	mov	w0, #57600
	movk	w0, #1525, lsl #16
	bl	_DIV_ROUND_UP
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	_DIV_ROUND_CLOSEST
LBB0_4:
	mov	x19, x0
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CECB_CLK_CNTL_REG0,4,2         ; @CECB_CLK_CNTL_REG0
	.comm	_CECB_CLK_CNTL_BYPASS_EN,4,2    ; @CECB_CLK_CNTL_BYPASS_EN
	.comm	_CECB_CLK_CNTL_DUAL_EN,4,2      ; @CECB_CLK_CNTL_DUAL_EN
	.comm	_CECB_CLK_CNTL_N1,4,2           ; @CECB_CLK_CNTL_N1
	.comm	_CECB_CLK_CNTL_N2,4,2           ; @CECB_CLK_CNTL_N2
	.comm	_CECB_CLK_CNTL_M1,4,2           ; @CECB_CLK_CNTL_M1
	.no_dead_strip	_meson_ao_cec_g12a_dualdiv_clk_recalc_rate
.subsections_via_symbols
