	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iproc_pcie_perst_ctrl
_iproc_pcie_perst_ctrl:                 ## @iproc_pcie_perst_ctrl
	.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
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_IPROC_PCIE_CLK_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_iproc_pcie_read_reg
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.4:
	movq	_EP_PERST_SOURCE_SELECT@GOTPCREL(%rip), %rcx
	movq	_EP_MODE_SURVIVE_PERST@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_RC_PCIE_RST_OUTPUT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_iproc_pcie_write_reg
	movl	$250, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_udelay                         ## TAILCALL
LBB0_2:
	movq	_RC_PCIE_RST_OUTPUT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_iproc_pcie_write_reg
	movl	$100, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IPROC_PCIE_CLK_CTRL,4,2        ## @IPROC_PCIE_CLK_CTRL
	.comm	_EP_PERST_SOURCE_SELECT,4,2     ## @EP_PERST_SOURCE_SELECT
	.comm	_EP_MODE_SURVIVE_PERST,4,2      ## @EP_MODE_SURVIVE_PERST
	.comm	_RC_PCIE_RST_OUTPUT,4,2         ## @RC_PCIE_RST_OUTPUT
	.no_dead_strip	_iproc_pcie_perst_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iproc_pcie_perst_ctrl
_iproc_pcie_perst_ctrl:                 ; @iproc_pcie_perst_ctrl
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _IPROC_PCIE_CLK_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IPROC_PCIE_CLK_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_iproc_pcie_read_reg
	cbz	w20, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _EP_PERST_SOURCE_SELECT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EP_PERST_SOURCE_SELECT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _EP_MODE_SURVIVE_PERST@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EP_MODE_SURVIVE_PERST@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _RC_PCIE_RST_OUTPUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RC_PCIE_RST_OUTPUT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_iproc_pcie_write_reg
	mov	w0, #250
	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
	b	_udelay
LBB0_4:
Lloh11:
	adrp	x8, _RC_PCIE_RST_OUTPUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RC_PCIE_RST_OUTPUT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_iproc_pcie_write_reg
	mov	w0, #100
	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
	b	_msleep
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IPROC_PCIE_CLK_CTRL,4,2        ; @IPROC_PCIE_CLK_CTRL
	.comm	_EP_PERST_SOURCE_SELECT,4,2     ; @EP_PERST_SOURCE_SELECT
	.comm	_EP_MODE_SURVIVE_PERST,4,2      ; @EP_MODE_SURVIVE_PERST
	.comm	_RC_PCIE_RST_OUTPUT,4,2         ; @RC_PCIE_RST_OUTPUT
	.no_dead_strip	_iproc_pcie_perst_ctrl
.subsections_via_symbols
