	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_phy_clk_set_rate
_sun8i_phy_clk_set_rate:                ## @sun8i_phy_clk_set_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	callq	_hw_to_phy_clk
	movq	%rax, %r8
	xorl	%r9d, %r9d
	movl	$1, %esi
	xorl	%edi, %edi
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%esi, %edi
	movq	%rax, %r9
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rsi
	cmpq	$17, %rsi
	je	LBB0_9
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rsi
	cmpq	%r14, %rax
	ja	LBB0_8
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r14, %rax
	ja	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	testq	%r9, %r9
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdx
	subq	%rax, %rdx
	movq	%r14, %rcx
	subq	%r9, %rcx
	cmpq	%rcx, %rdx
	jb	LBB0_7
	jmp	LBB0_8
LBB0_9:
	movq	(%r8), %rax
	movl	(%rax), %r14d
	movq	_SUN8I_HDMI_PHY_PLL_CFG2_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_SUN8I_HDMI_PHY_PLL_CFG2_PREDIV
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN8I_HDMI_PHY_PLL_CFG2_REG,4,2 ## @SUN8I_HDMI_PHY_PLL_CFG2_REG
	.comm	_SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK,4,2 ## @SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK
	.no_dead_strip	_sun8i_phy_clk_set_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_phy_clk_set_rate
_sun8i_phy_clk_set_rate:                ; @sun8i_phy_clk_set_rate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	bl	_hw_to_phy_clk
	mov	x8, x0
	mov	x9, #0
	mov	w0, #0
	mov	w10, #1
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x10
	mov	x9, x11
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	cmp	x10, #17
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	udiv	x11, x19, x10
	cmp	x11, x20
	b.hi	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x9, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x12, x20, x11
	sub	x13, x20, x9
	cmp	x12, x13
	b.lo	LBB0_1
	b	LBB0_2
LBB0_6:
	ldr	x8, [x8]
	ldr	w19, [x8]
Lloh0:
	adrp	x8, _SUN8I_HDMI_PHY_PLL_CFG2_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUN8I_HDMI_PHY_PLL_CFG2_REG@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	bl	_SUN8I_HDMI_PHY_PLL_CFG2_PREDIV
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_regmap_update_bits
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN8I_HDMI_PHY_PLL_CFG2_REG,4,2 ; @SUN8I_HDMI_PHY_PLL_CFG2_REG
	.comm	_SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK,4,2 ; @SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK
	.no_dead_strip	_sun8i_phy_clk_set_rate
.subsections_via_symbols
