	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aer_root_reset
_aer_root_reset:                        ## @aer_root_reset
	.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, %rbx
	movslq	(%rdi), %r14
	movq	_PCI_ERR_ROOT_COMMAND@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	%r14, %rsi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	_ROOT_PORT_INTR_ON_MESG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movq	(%r13), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	callq	_pci_write_config_dword
	movq	%rbx, %rdi
	callq	_pci_bus_error_reset
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	movq	_PCI_ERR_ROOT_STATUS@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	(%r15), %rsi
	addq	%r14, %rsi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_dword
	movq	(%r13), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_dword
	movl	-44(%rbp), %edx
	movq	_ROOT_PORT_INTR_ON_MESG_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	addq	(%r13), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pci_write_config_dword
	testl	%r12d, %r12d
	jne	LBB0_1
## %bb.2:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PCI_ERS_RESULT_DISCONNECT@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Root Port link has been reset\n"

	.comm	_PCI_ERR_ROOT_STATUS,8,3        ## @PCI_ERR_ROOT_STATUS
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ## @PCI_ERS_RESULT_DISCONNECT
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ## @PCI_ERS_RESULT_RECOVERED
	.no_dead_strip	_aer_root_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aer_root_reset
_aer_root_reset:                        ; @aer_root_reset
	.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	x19, x0
	ldrsw	x21, [x0]
Lloh0:
	adrp	x22, _PCI_ERR_ROOT_COMMAND@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCI_ERR_ROOT_COMMAND@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x1, x8, x21
	add	x2, sp, #12
	bl	_pci_read_config_dword
Lloh2:
	adrp	x23, _ROOT_PORT_INTR_ON_MESG_MASK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ROOT_PORT_INTR_ON_MESG_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x22]
	add	x1, x8, x21
	mov	x0, x19
	bl	_pci_write_config_dword
	mov	x0, x19
	bl	_pci_bus_error_reset
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_info
Lloh6:
	adrp	x24, _PCI_ERR_ROOT_STATUS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _PCI_ERR_ROOT_STATUS@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x1, x8, x21
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x24]
	add	x1, x8, x21
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_pci_write_config_dword
	ldr	x8, [x22]
	add	x1, x8, x21
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	w8, [x23]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x22]
	add	x1, x8, x21
	mov	x0, x19
	bl	_pci_write_config_dword
Lloh8:
	adrp	x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
Lloh10:
	adrp	x9, _PCI_ERS_RESULT_RECOVERED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PCI_ERS_RESULT_RECOVERED@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Root Port link has been reset\n"

	.comm	_PCI_ERR_ROOT_STATUS,8,3        ; @PCI_ERR_ROOT_STATUS
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ; @PCI_ERS_RESULT_DISCONNECT
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ; @PCI_ERS_RESULT_RECOVERED
	.no_dead_strip	_aer_root_reset
.subsections_via_symbols
