	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx6_pcie_reset_phy
_imx6_pcie_reset_phy:                   ## @imx6_pcie_reset_phy
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_IMX6_PCIE_FLAG_IMX6_PHY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_PHY_RX_OVRD_IN_LO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %r14
	movq	%r14, %rdx
	callq	_pcie_phy_read
	movq	_PHY_RX_OVRD_IN_LO_RX_DATA_EN@GOTPCREL(%rip), %r12
	movq	_PHY_RX_OVRD_IN_LO_RX_PLL_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	orl	(%r12), %edx
	orl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_pcie_phy_write
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_pcie_phy_read
	movl	(%r13), %edx
	orl	(%r12), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_pcie_phy_write
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMX6_PCIE_FLAG_IMX6_PHY,4,2    ## @IMX6_PCIE_FLAG_IMX6_PHY
	.comm	_PHY_RX_OVRD_IN_LO,4,2          ## @PHY_RX_OVRD_IN_LO
	.comm	_PHY_RX_OVRD_IN_LO_RX_DATA_EN,4,2 ## @PHY_RX_OVRD_IN_LO_RX_DATA_EN
	.comm	_PHY_RX_OVRD_IN_LO_RX_PLL_EN,4,2 ## @PHY_RX_OVRD_IN_LO_RX_PLL_EN
	.no_dead_strip	_imx6_pcie_reset_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx6_pcie_reset_phy
_imx6_pcie_reset_phy:                   ; @imx6_pcie_reset_phy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _IMX6_PCIE_FLAG_IMX6_PHY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IMX6_PCIE_FLAG_IMX6_PHY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x20, _PHY_RX_OVRD_IN_LO@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PHY_RX_OVRD_IN_LO@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_pcie_phy_read
Lloh5:
	adrp	x21, _PHY_RX_OVRD_IN_LO_RX_DATA_EN@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PHY_RX_OVRD_IN_LO_RX_DATA_EN@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh7:
	adrp	x22, _PHY_RX_OVRD_IN_LO_RX_PLL_EN@GOTPAGE
Lloh8:
	ldr	x22, [x22, _PHY_RX_OVRD_IN_LO_RX_PLL_EN@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_pcie_phy_write
	mov	w0, #2000
	mov	w1, #3000
	bl	_usleep_range
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_phy_read
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_pcie_phy_write
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IMX6_PCIE_FLAG_IMX6_PHY,4,2    ; @IMX6_PCIE_FLAG_IMX6_PHY
	.comm	_PHY_RX_OVRD_IN_LO,4,2          ; @PHY_RX_OVRD_IN_LO
	.comm	_PHY_RX_OVRD_IN_LO_RX_DATA_EN,4,2 ; @PHY_RX_OVRD_IN_LO_RX_DATA_EN
	.comm	_PHY_RX_OVRD_IN_LO_RX_PLL_EN,4,2 ; @PHY_RX_OVRD_IN_LO_RX_PLL_EN
	.no_dead_strip	_imx6_pcie_reset_phy
.subsections_via_symbols
