	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aer_get_device_error_info      ## -- Begin function aer_get_device_error_info
	.p2align	4, 0x90
_aer_get_device_error_info:             ## @aer_get_device_error_info
	.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	$0, (%rsi)
	movslq	(%rdi), %r15
	xorl	%r12d, %r12d
	testq	%r15, %r15
	je	LBB0_10
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	_AER_CORRECTABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_PCI_ERR_COR_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movq	_PCI_ERR_COR_MASK@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	leaq	16(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pci_read_config_dword
	movl	16(%rbx), %eax
	notl	%eax
	testl	%eax, (%rbx)
	jne	LBB0_9
	jmp	LBB0_10
LBB0_3:
	movq	%r14, %rdi
	callq	_pci_pcie_type
	movq	_PCI_EXP_TYPE_ROOT_PORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_pci_pcie_type
	movq	_PCI_EXP_TYPE_DOWNSTREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rax
	movq	_AER_NONFATAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_6:
	movq	_PCI_ERR_UNCOR_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movq	_PCI_ERR_UNCOR_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	leaq	16(%rbx), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movl	16(%rbx), %eax
	notl	%eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.7:
	movq	_PCI_ERR_CAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movl	-36(%rbp), %edi
	callq	_PCI_ERR_CAP_FEP
	movl	%eax, 36(%rbx)
	movq	_AER_LOG_TLP_MASKS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:
	movl	$1, 4(%rbx)
	movq	_PCI_ERR_HEADER_LOG@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r15, %rsi
	leaq	20(%rbx), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movq	(%r12), %rax
	leaq	(%r15,%rax), %rsi
	addq	$4, %rsi
	leaq	24(%rbx), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movq	(%r12), %rax
	leaq	(%r15,%rax), %rsi
	addq	$8, %rsi
	leaq	28(%rbx), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movq	(%r12), %rax
	leaq	(%r15,%rax), %rsi
	addq	$12, %rsi
	addq	$32, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
LBB0_9:
	movl	$1, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AER_CORRECTABLE,8,3            ## @AER_CORRECTABLE
	.comm	_PCI_ERR_COR_STATUS,8,3         ## @PCI_ERR_COR_STATUS
	.comm	_PCI_ERR_COR_MASK,8,3           ## @PCI_ERR_COR_MASK
	.comm	_PCI_EXP_TYPE_ROOT_PORT,8,3     ## @PCI_EXP_TYPE_ROOT_PORT
	.comm	_PCI_EXP_TYPE_DOWNSTREAM,8,3    ## @PCI_EXP_TYPE_DOWNSTREAM
	.comm	_AER_NONFATAL,8,3               ## @AER_NONFATAL
	.comm	_PCI_ERR_UNCOR_STATUS,8,3       ## @PCI_ERR_UNCOR_STATUS
	.comm	_PCI_ERR_UNCOR_MASK,8,3         ## @PCI_ERR_UNCOR_MASK
	.comm	_PCI_ERR_CAP,8,3                ## @PCI_ERR_CAP
	.comm	_AER_LOG_TLP_MASKS,4,2          ## @AER_LOG_TLP_MASKS
	.comm	_PCI_ERR_HEADER_LOG,8,3         ## @PCI_ERR_HEADER_LOG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aer_get_device_error_info      ; -- Begin function aer_get_device_error_info
	.p2align	2
_aer_get_device_error_info:             ; @aer_get_device_error_info
	.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
	str	xzr, [x1]
	ldrsw	x21, [x0]
	cbz	w21, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _AER_CORRECTABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AER_CORRECTABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _PCI_ERR_COR_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_ERR_COR_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	x0, x20
	mov	x2, x19
	bl	_pci_read_config_dword
Lloh6:
	adrp	x8, _PCI_ERR_COR_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_ERR_COR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, x21
	add	x2, x19, #16
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w8, [x19]
	ldr	w9, [x19, #16]
	bics	wzr, w8, w9
	b.ne	LBB0_9
	b	LBB0_10
LBB0_3:
	mov	x0, x20
	bl	_pci_pcie_type
Lloh9:
	adrp	x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_pci_pcie_type
Lloh12:
	adrp	x8, _PCI_EXP_TYPE_DOWNSTREAM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_EXP_TYPE_DOWNSTREAM@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _AER_NONFATAL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AER_NONFATAL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
LBB0_6:
Lloh18:
	adrp	x8, _PCI_ERR_UNCOR_STATUS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_ERR_UNCOR_STATUS@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	x0, x20
	mov	x2, x19
	bl	_pci_read_config_dword
Lloh21:
	adrp	x8, _PCI_ERR_UNCOR_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCI_ERR_UNCOR_MASK@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x1, x8, x21
	add	x2, x19, #16
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w8, [x19]
	ldr	w9, [x19, #16]
	bics	wzr, w8, w9
	b.eq	LBB0_10
; %bb.7:
Lloh24:
	adrp	x8, _PCI_ERR_CAP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCI_ERR_CAP@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	add	x1, x8, x21
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	bl	_PCI_ERR_CAP_FEP
	str	w0, [x19, #36]
	ldr	w8, [x19]
Lloh27:
	adrp	x9, _AER_LOG_TLP_MASKS@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AER_LOG_TLP_MASKS@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	w8, #1
	str	w8, [x19, #4]
Lloh30:
	adrp	x22, _PCI_ERR_HEADER_LOG@GOTPAGE
Lloh31:
	ldr	x22, [x22, _PCI_ERR_HEADER_LOG@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x1, x8, x21
	add	x2, x19, #20
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	x8, [x22]
	add	x8, x21, x8
	add	x1, x8, #4
	add	x2, x19, #24
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	x8, [x22]
	add	x8, x21, x8
	add	x1, x8, #8
	add	x2, x19, #28
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	x8, [x22]
	add	x8, x21, x8
	add	x1, x8, #12
	add	x2, x19, #32
	mov	x0, x20
	bl	_pci_read_config_dword
LBB0_9:
	mov	w0, #1
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_AER_CORRECTABLE,8,3            ; @AER_CORRECTABLE
	.comm	_PCI_ERR_COR_STATUS,8,3         ; @PCI_ERR_COR_STATUS
	.comm	_PCI_ERR_COR_MASK,8,3           ; @PCI_ERR_COR_MASK
	.comm	_PCI_EXP_TYPE_ROOT_PORT,8,3     ; @PCI_EXP_TYPE_ROOT_PORT
	.comm	_PCI_EXP_TYPE_DOWNSTREAM,8,3    ; @PCI_EXP_TYPE_DOWNSTREAM
	.comm	_AER_NONFATAL,8,3               ; @AER_NONFATAL
	.comm	_PCI_ERR_UNCOR_STATUS,8,3       ; @PCI_ERR_UNCOR_STATUS
	.comm	_PCI_ERR_UNCOR_MASK,8,3         ; @PCI_ERR_UNCOR_MASK
	.comm	_PCI_ERR_CAP,8,3                ; @PCI_ERR_CAP
	.comm	_AER_LOG_TLP_MASKS,4,2          ; @AER_LOG_TLP_MASKS
	.comm	_PCI_ERR_HEADER_LOG,8,3         ; @PCI_ERR_HEADER_LOG
.subsections_via_symbols
