	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_cleanup_aer_error_status_regs ## -- Begin function pci_cleanup_aer_error_status_regs
	.p2align	4, 0x90
_pci_cleanup_aer_error_status_regs:     ## @pci_cleanup_aer_error_status_regs
	.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
	callq	_pci_is_pcie
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movslq	(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_pcie_aer_get_firmware_first
	testq	%rax, %rax
	je	LBB0_6
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_pci_pcie_type
	movq	_PCI_EXP_TYPE_ROOT_PORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	movq	_PCI_ERR_ROOT_STATUS@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	%r14, %rsi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_dword
	movq	(%r15), %rsi
	addq	%r14, %rsi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_dword
LBB0_8:
	movq	_PCI_ERR_COR_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_UNCOR_STATUS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	addq	(%r12), %r14
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pci_write_config_dword
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PCI_EXP_TYPE_ROOT_PORT,4,2     ## @PCI_EXP_TYPE_ROOT_PORT
	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_cleanup_aer_error_status_regs ; -- Begin function pci_cleanup_aer_error_status_regs
	.p2align	2
_pci_cleanup_aer_error_status_regs:     ; @pci_cleanup_aer_error_status_regs
	.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
	mov	x19, x0
	bl	_pci_is_pcie
	cbz	w0, LBB0_4
; %bb.1:
	ldrsw	x20, [x19]
	cbz	w20, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_pcie_aer_get_firmware_first
	cbz	x0, LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	x0, x19
	bl	_pci_pcie_type
Lloh4:
	adrp	x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:
Lloh7:
	adrp	x21, _PCI_ERR_ROOT_STATUS@GOTPAGE
Lloh8:
	ldr	x21, [x21, _PCI_ERR_ROOT_STATUS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x21]
	add	x1, x8, x20
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_pci_write_config_dword
LBB0_9:
Lloh9:
	adrp	x21, _PCI_ERR_COR_STATUS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _PCI_ERR_COR_STATUS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x21]
	add	x1, x8, x20
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_pci_write_config_dword
Lloh11:
	adrp	x21, _PCI_ERR_UNCOR_STATUS@GOTPAGE
Lloh12:
	ldr	x21, [x21, _PCI_ERR_UNCOR_STATUS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_dword
	ldr	x8, [x21]
	add	x1, x8, x20
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_pci_write_config_dword
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PCI_EXP_TYPE_ROOT_PORT,4,2     ; @PCI_EXP_TYPE_ROOT_PORT
	.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
.subsections_via_symbols
