	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1c_reset_pcie
_atl1c_reset_pcie:                      ## @atl1c_reset_pcie
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_PCI_COMMAND@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rdx
	callq	_AT_READ_REG
	movq	_PCI_COMMAND_INTX_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-48(%rbp), %edx
	movq	_PCI_COMMAND_MEMORY@GOTPCREL(%rip), %rax
	movq	_PCI_COMMAND_MASTER@GOTPCREL(%rip), %rcx
	movq	_PCI_COMMAND_IO@GOTPCREL(%rip), %rsi
	orl	(%rax), %edx
	orl	(%rcx), %edx
	orl	(%rsi), %edx
	movl	%edx, -48(%rbp)
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_AT_WRITE_REG
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_pci_enable_wake
	movq	_PCI_D3cold@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_pci_enable_wake
	movq	_REG_WOL_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %r12
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_AT_READ_REG
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_AT_WRITE_REG
	movq	_PCI_EXT_CAP_ID_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_find_ext_capability
	movslq	%eax, %rbx
	movq	_PCI_ERR_UNCOR_SEVER@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	%rbx, %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_pci_read_config_dword
	movq	_PCI_ERR_UNC_DLP@GOTPCREL(%rip), %rax
	movq	_PCI_ERR_UNC_FCP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	addq	(%r14), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_pci_write_config_dword
	movq	_PCI_EXP_DEVSTA_NFED@GOTPCREL(%rip), %rax
	movq	_PCI_EXP_DEVSTA_FED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_PCI_EXP_DEVSTA@GOTPCREL(%rip), %rax
	movq	_PCI_EXP_DEVSTA_CED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_PCI_EXP_DEVSTA_URD@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_pcie_capability_write_word
	movq	_REG_LTSSM_ID_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_AT_READ_REG
	movq	_LTSSM_ID_EN_WRO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_AT_WRITE_REG
	movq	%r13, %rdi
	callq	_atl1c_pcie_patch
	movq	_ATL1C_PCIE_L0S_L1_DISABLE@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_atl1c_disable_l0s_l1
LBB0_2:
	movl	$5, %edi
	callq	_msleep
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_COMMAND,4,2                ## @PCI_COMMAND
	.comm	_PCI_COMMAND_INTX_DISABLE,4,2   ## @PCI_COMMAND_INTX_DISABLE
	.comm	_PCI_COMMAND_MEMORY,4,2         ## @PCI_COMMAND_MEMORY
	.comm	_PCI_COMMAND_MASTER,4,2         ## @PCI_COMMAND_MASTER
	.comm	_PCI_COMMAND_IO,4,2             ## @PCI_COMMAND_IO
	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
	.comm	_PCI_D3cold,4,2                 ## @PCI_D3cold
	.comm	_REG_WOL_CTRL,4,2               ## @REG_WOL_CTRL
	.comm	_PCI_EXT_CAP_ID_ERR,4,2         ## @PCI_EXT_CAP_ID_ERR
	.comm	_PCI_ERR_UNCOR_SEVER,8,3        ## @PCI_ERR_UNCOR_SEVER
	.comm	_PCI_ERR_UNC_DLP,4,2            ## @PCI_ERR_UNC_DLP
	.comm	_PCI_ERR_UNC_FCP,4,2            ## @PCI_ERR_UNC_FCP
	.comm	_PCI_EXP_DEVSTA,4,2             ## @PCI_EXP_DEVSTA
	.comm	_PCI_EXP_DEVSTA_NFED,4,2        ## @PCI_EXP_DEVSTA_NFED
	.comm	_PCI_EXP_DEVSTA_FED,4,2         ## @PCI_EXP_DEVSTA_FED
	.comm	_PCI_EXP_DEVSTA_CED,4,2         ## @PCI_EXP_DEVSTA_CED
	.comm	_PCI_EXP_DEVSTA_URD,4,2         ## @PCI_EXP_DEVSTA_URD
	.comm	_REG_LTSSM_ID_CTRL,4,2          ## @REG_LTSSM_ID_CTRL
	.comm	_LTSSM_ID_EN_WRO,4,2            ## @LTSSM_ID_EN_WRO
	.comm	_ATL1C_PCIE_L0S_L1_DISABLE,4,2  ## @ATL1C_PCIE_L0S_L1_DISABLE
	.no_dead_strip	_atl1c_reset_pcie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1c_reset_pcie
_atl1c_reset_pcie:                      ; @atl1c_reset_pcie
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
Lloh0:
	adrp	x22, _PCI_COMMAND@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCI_COMMAND@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	bl	_AT_READ_REG
Lloh2:
	adrp	x8, _PCI_COMMAND_INTX_DISABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_COMMAND_INTX_DISABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	bic	w8, w9, w8
Lloh5:
	adrp	x9, _PCI_COMMAND_MEMORY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_COMMAND_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _PCI_COMMAND_MASTER@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PCI_COMMAND_MASTER@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _PCI_COMMAND_IO@GOTPAGE
Lloh12:
	ldr	x11, [x11, _PCI_COMMAND_IO@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w2, w8, w11
	str	w2, [sp, #8]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_AT_WRITE_REG
Lloh14:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_pci_enable_wake
Lloh17:
	adrp	x8, _PCI_D3cold@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PCI_D3cold@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_pci_enable_wake
Lloh20:
	adrp	x22, _REG_WOL_CTRL@GOTPAGE
Lloh21:
	ldr	x22, [x22, _REG_WOL_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_AT_READ_REG
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_AT_WRITE_REG
Lloh22:
	adrp	x8, _PCI_EXT_CAP_ID_ERR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_ERR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_pci_find_ext_capability
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
Lloh25:
	adrp	x23, _PCI_ERR_UNCOR_SEVER@GOTPAGE
Lloh26:
	ldr	x23, [x23, _PCI_ERR_UNCOR_SEVER@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x1, x8, x22
	add	x2, sp, #12
	mov	x0, x21
	bl	_pci_read_config_dword
Lloh27:
	adrp	x8, _PCI_ERR_UNC_DLP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PCI_ERR_UNC_DLP@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _PCI_ERR_UNC_FCP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PCI_ERR_UNC_FCP@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	x0, x21
	bl	_pci_write_config_dword
Lloh33:
	adrp	x8, _PCI_EXP_DEVSTA@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PCI_EXP_DEVSTA@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _PCI_EXP_DEVSTA_NFED@GOTPAGE
Lloh37:
	ldr	x8, [x8, _PCI_EXP_DEVSTA_NFED@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _PCI_EXP_DEVSTA_FED@GOTPAGE
Lloh40:
	ldr	x9, [x9, _PCI_EXP_DEVSTA_FED@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh42:
	adrp	x9, _PCI_EXP_DEVSTA_CED@GOTPAGE
Lloh43:
	ldr	x9, [x9, _PCI_EXP_DEVSTA_CED@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh45:
	adrp	x9, _PCI_EXP_DEVSTA_URD@GOTPAGE
Lloh46:
	ldr	x9, [x9, _PCI_EXP_DEVSTA_URD@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x21
	bl	_pcie_capability_write_word
Lloh48:
	adrp	x21, _REG_LTSSM_ID_CTRL@GOTPAGE
Lloh49:
	ldr	x21, [x21, _REG_LTSSM_ID_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_AT_READ_REG
Lloh50:
	adrp	x8, _LTSSM_ID_EN_WRO@GOTPAGE
Lloh51:
	ldr	x8, [x8, _LTSSM_ID_EN_WRO@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_AT_WRITE_REG
	mov	x0, x19
	bl	_atl1c_pcie_patch
Lloh53:
	adrp	x8, _ATL1C_PCIE_L0S_L1_DISABLE@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ATL1C_PCIE_L0S_L1_DISABLE@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_atl1c_disable_l0s_l1
LBB0_2:
	mov	w0, #5
	bl	_msleep
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_COMMAND,4,2                ; @PCI_COMMAND
	.comm	_PCI_COMMAND_INTX_DISABLE,4,2   ; @PCI_COMMAND_INTX_DISABLE
	.comm	_PCI_COMMAND_MEMORY,4,2         ; @PCI_COMMAND_MEMORY
	.comm	_PCI_COMMAND_MASTER,4,2         ; @PCI_COMMAND_MASTER
	.comm	_PCI_COMMAND_IO,4,2             ; @PCI_COMMAND_IO
	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
	.comm	_PCI_D3cold,4,2                 ; @PCI_D3cold
	.comm	_REG_WOL_CTRL,4,2               ; @REG_WOL_CTRL
	.comm	_PCI_EXT_CAP_ID_ERR,4,2         ; @PCI_EXT_CAP_ID_ERR
	.comm	_PCI_ERR_UNCOR_SEVER,8,3        ; @PCI_ERR_UNCOR_SEVER
	.comm	_PCI_ERR_UNC_DLP,4,2            ; @PCI_ERR_UNC_DLP
	.comm	_PCI_ERR_UNC_FCP,4,2            ; @PCI_ERR_UNC_FCP
	.comm	_PCI_EXP_DEVSTA,4,2             ; @PCI_EXP_DEVSTA
	.comm	_PCI_EXP_DEVSTA_NFED,4,2        ; @PCI_EXP_DEVSTA_NFED
	.comm	_PCI_EXP_DEVSTA_FED,4,2         ; @PCI_EXP_DEVSTA_FED
	.comm	_PCI_EXP_DEVSTA_CED,4,2         ; @PCI_EXP_DEVSTA_CED
	.comm	_PCI_EXP_DEVSTA_URD,4,2         ; @PCI_EXP_DEVSTA_URD
	.comm	_REG_LTSSM_ID_CTRL,4,2          ; @REG_LTSSM_ID_CTRL
	.comm	_LTSSM_ID_EN_WRO,4,2            ; @LTSSM_ID_EN_WRO
	.comm	_ATL1C_PCIE_L0S_L1_DISABLE,4,2  ; @ATL1C_PCIE_L0S_L1_DISABLE
	.no_dead_strip	_atl1c_reset_pcie
.subsections_via_symbols
