	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uniphier_pciephy_init
_uniphier_pciephy_init:                 ## @uniphier_pciephy_init
	.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
	callq	_phy_get_drvdata
	movq	%rax, %r14
	movl	(%rax), %edi
	callq	_clk_prepare_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	4(%r14), %edi
	callq	_reset_control_deassert
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_4
LBB0_2:
	movq	_PCL_PHY_R00@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RX_EQ_ADJ_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ecx, %edx
	callq	_uniphier_pciephy_set_param
	movq	_PCL_PHY_R06@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_RX_EQ_ADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_RX_EQ_ADJ_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_FIELD_PREP
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_uniphier_pciephy_set_param
	movq	_PCL_PHY_R26@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_VCO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_VCO_CTRL_INIT_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_FIELD_PREP
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_uniphier_pciephy_set_param
	movl	$1, %edi
	movl	$10, %esi
	callq	_usleep_range
	movq	%r14, %rdi
	callq	_uniphier_pciephy_deassert
	movl	$1, %edi
	movl	$10, %esi
	callq	_usleep_range
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCL_PHY_R00,4,2                ## @PCL_PHY_R00
	.comm	_RX_EQ_ADJ_EN,4,2               ## @RX_EQ_ADJ_EN
	.comm	_PCL_PHY_R06,4,2                ## @PCL_PHY_R06
	.comm	_RX_EQ_ADJ,4,2                  ## @RX_EQ_ADJ
	.comm	_RX_EQ_ADJ_VAL,4,2              ## @RX_EQ_ADJ_VAL
	.comm	_PCL_PHY_R26,4,2                ## @PCL_PHY_R26
	.comm	_VCO_CTRL,4,2                   ## @VCO_CTRL
	.comm	_VCO_CTRL_INIT_VAL,4,2          ## @VCO_CTRL_INIT_VAL
	.no_dead_strip	_uniphier_pciephy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uniphier_pciephy_init
_uniphier_pciephy_init:                 ; @uniphier_pciephy_init
	.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
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	w0, [x0]
	bl	_clk_prepare_enable
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_reset_control_deassert
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
	b	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _PCL_PHY_R00@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCL_PHY_R00@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RX_EQ_ADJ_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RX_EQ_ADJ_EN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_uniphier_pciephy_set_param
Lloh6:
	adrp	x8, _PCL_PHY_R06@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCL_PHY_R06@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
Lloh9:
	adrp	x8, _RX_EQ_ADJ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RX_EQ_ADJ@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
Lloh12:
	adrp	x8, _RX_EQ_ADJ_VAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RX_EQ_ADJ_VAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_FIELD_PREP
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_uniphier_pciephy_set_param
Lloh15:
	adrp	x8, _PCL_PHY_R26@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCL_PHY_R26@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
Lloh18:
	adrp	x8, _VCO_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VCO_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
Lloh21:
	adrp	x8, _VCO_CTRL_INIT_VAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VCO_CTRL_INIT_VAL@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_FIELD_PREP
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_uniphier_pciephy_set_param
	mov	w0, #1
	mov	w1, #10
	bl	_usleep_range
	mov	x0, x19
	bl	_uniphier_pciephy_deassert
	mov	w0, #1
	mov	w1, #10
	bl	_usleep_range
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	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	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCL_PHY_R00,4,2                ; @PCL_PHY_R00
	.comm	_RX_EQ_ADJ_EN,4,2               ; @RX_EQ_ADJ_EN
	.comm	_PCL_PHY_R06,4,2                ; @PCL_PHY_R06
	.comm	_RX_EQ_ADJ,4,2                  ; @RX_EQ_ADJ
	.comm	_RX_EQ_ADJ_VAL,4,2              ; @RX_EQ_ADJ_VAL
	.comm	_PCL_PHY_R26,4,2                ; @PCL_PHY_R26
	.comm	_VCO_CTRL,4,2                   ; @VCO_CTRL
	.comm	_VCO_CTRL_INIT_VAL,4,2          ; @VCO_CTRL_INIT_VAL
	.no_dead_strip	_uniphier_pciephy_init
.subsections_via_symbols
