	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_configure_ari              ## -- Begin function pci_configure_ari
	.p2align	4, 0x90
_pci_configure_ari:                     ## @pci_configure_ari
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_pcie_ari_disabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	callq	_pci_is_pcie
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	cmpq	$0, 16(%rbx)
	jne	LBB0_9
## %bb.3:
	movq	8(%rbx), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.4:
	movq	_PCI_EXP_DEVCAP2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcie_capability_read_dword
	movq	_PCI_EXP_DEVCAP2_ARI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -20(%rbp)
	je	LBB0_9
## %bb.5:
	movq	_PCI_EXT_CAP_ID_ARI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_find_ext_capability
	movq	_PCI_EXP_DEVCTL2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_PCI_EXP_DEVCTL2_ARI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	callq	_pcie_capability_set_word
	movl	$1, %eax
	jmp	LBB0_8
LBB0_7:
	callq	_pcie_capability_clear_word
	xorl	%eax, %eax
LBB0_8:
	movl	%eax, (%r14)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_pcie_ari_disabled,8,3          ## @pcie_ari_disabled
	.comm	_PCI_EXP_DEVCAP2,4,2            ## @PCI_EXP_DEVCAP2
	.comm	_PCI_EXP_DEVCAP2_ARI,4,2        ## @PCI_EXP_DEVCAP2_ARI
	.comm	_PCI_EXT_CAP_ID_ARI,4,2         ## @PCI_EXT_CAP_ID_ARI
	.comm	_PCI_EXP_DEVCTL2,4,2            ## @PCI_EXP_DEVCTL2
	.comm	_PCI_EXP_DEVCTL2_ARI,4,2        ## @PCI_EXP_DEVCTL2_ARI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_configure_ari              ; -- Begin function pci_configure_ari
	.p2align	2
_pci_configure_ari:                     ; @pci_configure_ari
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _pcie_ari_disabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pcie_ari_disabled@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	mov	x20, x0
	bl	_pci_is_pcie
	cbz	w0, LBB0_1
; %bb.3:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_1
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	x19, [x8]
	cbz	x19, LBB0_1
; %bb.5:
Lloh3:
	adrp	x8, _PCI_EXP_DEVCAP2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_EXP_DEVCAP2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_capability_read_dword
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _PCI_EXP_DEVCAP2_ARI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCI_EXP_DEVCAP2_ARI@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.6:
Lloh9:
	adrp	x8, _PCI_EXT_CAP_ID_ARI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_ARI@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_find_ext_capability
Lloh12:
	adrp	x8, _PCI_EXP_DEVCTL2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_EXP_DEVCTL2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _PCI_EXP_DEVCTL2_ARI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_EXP_DEVCTL2_ARI@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_pcie_capability_set_word
	mov	w8, #1
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_pcie_capability_clear_word
	mov	w8, #0
LBB0_9:
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_pcie_ari_disabled,8,3          ; @pcie_ari_disabled
	.comm	_PCI_EXP_DEVCAP2,4,2            ; @PCI_EXP_DEVCAP2
	.comm	_PCI_EXP_DEVCAP2_ARI,4,2        ; @PCI_EXP_DEVCAP2_ARI
	.comm	_PCI_EXT_CAP_ID_ARI,4,2         ; @PCI_EXT_CAP_ID_ARI
	.comm	_PCI_EXP_DEVCTL2,4,2            ; @PCI_EXP_DEVCTL2
	.comm	_PCI_EXP_DEVCTL2_ARI,4,2        ; @PCI_EXP_DEVCTL2_ARI
.subsections_via_symbols
