	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_tmds_recalc_rate
_sun4i_tmds_recalc_rate:                ## @sun4i_tmds_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_hw_to_tmds
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	_SUN4I_HDMI_PAD_CTRL1_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	callq	_readl
	movq	_SUN4I_HDMI_PAD_CTRL1_HALVE_CLK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	setne	%cl
	shrq	%cl, %r14
	movq	8(%rbx), %rax
	movq	_SUN4I_HDMI_PLL_CTRL_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	callq	_readl
	shrl	$4, %eax
	andl	$15, %eax
	addl	(%rbx), %eax
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	movslq	%ecx, %rsi
	movq	%r14, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_3
LBB0_1:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_HDMI_PAD_CTRL1_REG,8,3   ## @SUN4I_HDMI_PAD_CTRL1_REG
	.comm	_SUN4I_HDMI_PAD_CTRL1_HALVE_CLK,4,2 ## @SUN4I_HDMI_PAD_CTRL1_HALVE_CLK
	.comm	_SUN4I_HDMI_PLL_CTRL_REG,8,3    ## @SUN4I_HDMI_PLL_CTRL_REG
	.no_dead_strip	_sun4i_tmds_recalc_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_tmds_recalc_rate
_sun4i_tmds_recalc_rate:                ; @sun4i_tmds_recalc_rate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_hw_to_tmds
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SUN4I_HDMI_PAD_CTRL1_REG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SUN4I_HDMI_PAD_CTRL1_REG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x8, _SUN4I_HDMI_PAD_CTRL1_HALVE_CLK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SUN4I_HDMI_PAD_CTRL1_HALVE_CLK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	lsr	x19, x19, x8
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _SUN4I_HDMI_PLL_CTRL_REG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SUN4I_HDMI_PLL_CTRL_REG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ubfx	w8, w0, #4, #4
	ldr	w9, [x20]
	adds	w8, w8, w9
	csinc	w8, w8, wzr, ne
	sxtw	x8, w8
	udiv	x0, x19, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_HDMI_PAD_CTRL1_REG,8,3   ; @SUN4I_HDMI_PAD_CTRL1_REG
	.comm	_SUN4I_HDMI_PAD_CTRL1_HALVE_CLK,4,2 ; @SUN4I_HDMI_PAD_CTRL1_HALVE_CLK
	.comm	_SUN4I_HDMI_PLL_CTRL_REG,8,3    ; @SUN4I_HDMI_PLL_CTRL_REG
	.no_dead_strip	_sun4i_tmds_recalc_rate
.subsections_via_symbols
