	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quirk_disable_root_port_attributes
_quirk_disable_root_port_attributes:    ## @quirk_disable_root_port_attributes
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_pci_find_pcie_root_port
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_dev_name
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_pci_info
	movq	_PCI_EXP_DEVCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_EXP_DEVCTL_RELAX_EN@GOTPCREL(%rip), %rax
	movq	_PCI_EXP_DEVCTL_NOSNOOP_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pcie_capability_clear_and_set_word ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pci_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCIe Completion erratum may cause device errors\n"

L_.str.1:                               ## @.str.1
	.asciz	"Disabling No Snoop/Relaxed Ordering Attributes to avoid PCIe Completion erratum in %s\n"

	.comm	_PCI_EXP_DEVCTL,4,2             ## @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_RELAX_EN,4,2    ## @PCI_EXP_DEVCTL_RELAX_EN
	.comm	_PCI_EXP_DEVCTL_NOSNOOP_EN,4,2  ## @PCI_EXP_DEVCTL_NOSNOOP_EN
	.no_dead_strip	_quirk_disable_root_port_attributes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quirk_disable_root_port_attributes
_quirk_disable_root_port_attributes:    ; @quirk_disable_root_port_attributes
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_pci_find_pcie_root_port
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_dev_name
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_info
Lloh2:
	adrp	x8, _PCI_EXP_DEVCTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_EXP_DEVCTL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _PCI_EXP_DEVCTL_RELAX_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_EXP_DEVCTL_RELAX_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _PCI_EXP_DEVCTL_NOSNOOP_EN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_EXP_DEVCTL_NOSNOOP_EN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pcie_capability_clear_and_set_word
LBB0_2:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pci_warn
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCIe Completion erratum may cause device errors\n"

l_.str.1:                               ; @.str.1
	.asciz	"Disabling No Snoop/Relaxed Ordering Attributes to avoid PCIe Completion erratum in %s\n"

	.comm	_PCI_EXP_DEVCTL,4,2             ; @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_RELAX_EN,4,2    ; @PCI_EXP_DEVCTL_RELAX_EN
	.comm	_PCI_EXP_DEVCTL_NOSNOOP_EN,4,2  ; @PCI_EXP_DEVCTL_NOSNOOP_EN
	.no_dead_strip	_quirk_disable_root_port_attributes
.subsections_via_symbols
