	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_hdmi_phy_config
_sun8i_hdmi_phy_config:                 ## @sun8i_hdmi_phy_config
	.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, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	(%rdx), %ecx
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	je	LBB0_2
## %bb.1:
	movq	_SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movq	_DRM_MODE_FLAG_NVSYNC@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	je	LBB0_4
## %bb.3:
	movq	_SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	orl	%eax, %ecx
	movl	12(%rbx), %edi
	movq	_SUN8I_HDMI_PHY_DBG_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_update_bits
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.5:
	movl	8(%rbx), %edi
	imull	$1000, 4(%r14), %esi            ## imm = 0x3E8
	callq	_clk_set_rate
	movq	(%rbx), %rax
LBB0_6:
	movq	(%rax), %rax
	imull	$1000, 4(%r14), %edx            ## imm = 0x3E8
	movq	%r15, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC,4,2 ## @SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ## @DRM_MODE_FLAG_NVSYNC
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC,4,2 ## @SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_REG,4,2 ## @SUN8I_HDMI_PHY_DBG_CTRL_REG
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK,4,2 ## @SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK
	.no_dead_strip	_sun8i_hdmi_phy_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_hdmi_phy_config
_sun8i_hdmi_phy_config:                 ; @sun8i_hdmi_phy_config
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh6:
	adrp	x10, _DRM_MODE_FLAG_NVSYNC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_MODE_FLAG_NVSYNC@GOTPAGEOFF]
Lloh8:
	adrp	x11, _SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC@GOTPAGE
Lloh9:
	ldr	x11, [x11, _SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w3, w8, w9
	ldr	w0, [x1, #12]
Lloh12:
	adrp	x8, _SUN8I_HDMI_PHY_DBG_CTRL_REG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SUN8I_HDMI_PHY_DBG_CTRL_REG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_regmap_update_bits
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	ldr	w8, [x21, #4]
	mov	w9, #1000
	mul	w1, w8, w9
	bl	_clk_set_rate
	ldr	x8, [x19]
LBB0_2:
	ldr	x3, [x8]
	ldr	w8, [x21, #4]
	mov	w9, #1000
	mul	w2, w8, w9
	mov	x0, x20
	mov	x1, x19
	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
	br	x3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC,4,2 ; @SUN8I_HDMI_PHY_DBG_CTRL_POL_NHSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ; @DRM_MODE_FLAG_NVSYNC
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC,4,2 ; @SUN8I_HDMI_PHY_DBG_CTRL_POL_NVSYNC
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_REG,4,2 ; @SUN8I_HDMI_PHY_DBG_CTRL_REG
	.comm	_SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK,4,2 ; @SUN8I_HDMI_PHY_DBG_CTRL_POL_MASK
	.no_dead_strip	_sun8i_hdmi_phy_config
.subsections_via_symbols
