	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_configure_extended_tags    ## -- Begin function pci_configure_extended_tags
	.p2align	4, 0x90
_pci_configure_extended_tags:           ## @pci_configure_extended_tags
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_pci_is_pcie
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	_PCI_EXP_DEVCAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pcie_capability_read_dword
	testl	%eax, %eax
	je	LBB0_2
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_PCI_EXP_DEVCAP_EXT_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	je	LBB0_10
## %bb.3:
	movq	_PCI_EXP_DEVCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pcie_capability_read_word
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movl	(%rbx), %edi
	callq	_pci_find_host_bridge
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	_PCI_EXP_DEVCTL_EXT_TAG@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	andl	-28(%rbp), %ecx
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_pcie_capability_clear_word
	jmp	LBB0_10
LBB0_8:
	testl	%ecx, %ecx
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_pcie_capability_set_word
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_DEVCAP,4,2             ## @PCI_EXP_DEVCAP
	.comm	_PCI_EXP_DEVCAP_EXT_TAG,4,2     ## @PCI_EXP_DEVCAP_EXT_TAG
	.comm	_PCI_EXP_DEVCTL,4,2             ## @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_EXT_TAG,4,2     ## @PCI_EXP_DEVCTL_EXT_TAG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disabling Extended Tags\n"

L_.str.1:                               ## @.str.1
	.asciz	"enabling Extended Tags\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_configure_extended_tags    ; -- Begin function pci_configure_extended_tags
	.p2align	2
_pci_configure_extended_tags:           ; @pci_configure_extended_tags
	.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_2
; %bb.1:
Lloh0:
	adrp	x8, _PCI_EXP_DEVCAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXP_DEVCAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_capability_read_dword
	cbz	w0, LBB0_3
LBB0_2:
	mov	w0, #0
	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_3:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _PCI_EXP_DEVCAP_EXT_TAG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_EXP_DEVCAP_EXT_TAG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.4:
Lloh6:
	adrp	x20, _PCI_EXP_DEVCTL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PCI_EXP_DEVCTL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pcie_capability_read_word
	cbnz	w0, LBB0_2
; %bb.5:
	ldr	w0, [x19]
	bl	_pci_find_host_bridge
	cbz	x0, LBB0_2
; %bb.6:
	ldr	x9, [x0]
	ldr	w8, [sp, #8]
Lloh8:
	adrp	x21, _PCI_EXP_DEVCTL_EXT_TAG@GOTPAGE
Lloh9:
	ldr	x21, [x21, _PCI_EXP_DEVCTL_EXT_TAG@GOTPAGEOFF]
	ldr	w10, [x21]
	and	w8, w10, w8
	cbz	x9, LBB0_9
; %bb.7:
	cbz	w8, LBB0_2
; %bb.8:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_pcie_capability_clear_word
	b	LBB0_2
LBB0_9:
	cbnz	w8, LBB0_2
; %bb.10:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_pcie_capability_set_word
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_DEVCAP,4,2             ; @PCI_EXP_DEVCAP
	.comm	_PCI_EXP_DEVCAP_EXT_TAG,4,2     ; @PCI_EXP_DEVCAP_EXT_TAG
	.comm	_PCI_EXP_DEVCTL,4,2             ; @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_EXT_TAG,4,2     ; @PCI_EXP_DEVCTL_EXT_TAG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disabling Extended Tags\n"

l_.str.1:                               ; @.str.1
	.asciz	"enabling Extended Tags\n"

.subsections_via_symbols
