	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aer_enable_rootport
_aer_enable_rootport:                   ## @aer_enable_rootport
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	_PCI_EXP_DEVSTA@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pcie_capability_read_word
	movl	(%r14), %esi
	movl	-40(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pcie_capability_write_word
	movq	_PCI_EXP_RTCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SYSTEM_ERROR_INTR_ON_MESG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pcie_capability_clear_word
	movslq	(%rbx), %r14
	movq	_PCI_ERR_ROOT_STATUS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r14, %rsi
	leaq	-36(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_dword
	movq	_PCI_ERR_COR_STATUS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_dword
	movq	_PCI_ERR_UNCOR_STATUS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_dword
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_downstream_devices_error_reporting
	movq	_PCI_ERR_ROOT_COMMAND@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movq	_ROOT_PORT_INTR_ON_MESG_MASK@GOTPCREL(%rip), %rax
	movl	-36(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	addq	(%r12), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pci_write_config_dword
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_DEVSTA,4,2             ## @PCI_EXP_DEVSTA
	.comm	_PCI_EXP_RTCTL,4,2              ## @PCI_EXP_RTCTL
	.comm	_SYSTEM_ERROR_INTR_ON_MESG_MASK,4,2 ## @SYSTEM_ERROR_INTR_ON_MESG_MASK
	.comm	_PCI_ERR_ROOT_STATUS,8,3        ## @PCI_ERR_ROOT_STATUS
	.comm	_PCI_ERR_COR_STATUS,8,3         ## @PCI_ERR_COR_STATUS
	.comm	_PCI_ERR_UNCOR_STATUS,8,3       ## @PCI_ERR_UNCOR_STATUS
	.comm	_PCI_ERR_ROOT_COMMAND,8,3       ## @PCI_ERR_ROOT_COMMAND
	.comm	_ROOT_PORT_INTR_ON_MESG_MASK,4,2 ## @ROOT_PORT_INTR_ON_MESG_MASK
	.no_dead_strip	_aer_enable_rootport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aer_enable_rootport
_aer_enable_rootport:                   ; @aer_enable_rootport
	.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	x19, [x0]
Lloh0:
	adrp	x20, _PCI_EXP_DEVSTA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PCI_EXP_DEVSTA@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_capability_read_word
	ldr	w1, [x20]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_pcie_capability_write_word
Lloh2:
	adrp	x8, _PCI_EXP_RTCTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_EXP_RTCTL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _SYSTEM_ERROR_INTR_ON_MESG_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYSTEM_ERROR_INTR_ON_MESG_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pcie_capability_clear_word
	ldrsw	x20, [x19]
Lloh8:
	adrp	x21, _PCI_ERR_ROOT_STATUS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _PCI_ERR_ROOT_STATUS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x21]
	add	x1, x8, x20
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_pci_write_config_dword
Lloh10:
	adrp	x21, _PCI_ERR_COR_STATUS@GOTPAGE
Lloh11:
	ldr	x21, [x21, _PCI_ERR_COR_STATUS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x21]
	add	x1, x8, x20
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_pci_write_config_dword
Lloh12:
	adrp	x21, _PCI_ERR_UNCOR_STATUS@GOTPAGE
Lloh13:
	ldr	x21, [x21, _PCI_ERR_UNCOR_STATUS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x21]
	add	x1, x8, x20
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_pci_write_config_dword
	mov	x0, x19
	mov	w1, #1
	bl	_set_downstream_devices_error_reporting
Lloh14:
	adrp	x21, _PCI_ERR_ROOT_COMMAND@GOTPAGE
Lloh15:
	ldr	x21, [x21, _PCI_ERR_ROOT_COMMAND@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_dword
Lloh16:
	adrp	x8, _ROOT_PORT_INTR_ON_MESG_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ROOT_PORT_INTR_ON_MESG_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	x8, [x21]
	add	x1, x8, x20
	mov	x0, x19
	bl	_pci_write_config_dword
	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	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_DEVSTA,4,2             ; @PCI_EXP_DEVSTA
	.comm	_PCI_EXP_RTCTL,4,2              ; @PCI_EXP_RTCTL
	.comm	_SYSTEM_ERROR_INTR_ON_MESG_MASK,4,2 ; @SYSTEM_ERROR_INTR_ON_MESG_MASK
	.comm	_PCI_ERR_ROOT_STATUS,8,3        ; @PCI_ERR_ROOT_STATUS
	.comm	_PCI_ERR_COR_STATUS,8,3         ; @PCI_ERR_COR_STATUS
	.comm	_PCI_ERR_UNCOR_STATUS,8,3       ; @PCI_ERR_UNCOR_STATUS
	.comm	_PCI_ERR_ROOT_COMMAND,8,3       ; @PCI_ERR_ROOT_COMMAND
	.comm	_ROOT_PORT_INTR_ON_MESG_MASK,4,2 ; @ROOT_PORT_INTR_ON_MESG_MASK
	.no_dead_strip	_aer_enable_rootport
.subsections_via_symbols
