	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_flr                       ## -- Begin function pcie_flr
	.p2align	4, 0x90
_pcie_flr:                              ## @pcie_flr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_pci_wait_for_pending_transaction
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_err
LBB0_2:
	movq	_PCI_EXP_DEVCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_EXP_DEVCTL_BCR_FLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pcie_capability_set_word
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movl	$100, %edi
	callq	_msleep
	movq	_PCIE_RESET_READY_POLL_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pci_dev_wait                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for pending transaction; performing function level reset anyway\n"

	.comm	_PCI_EXP_DEVCTL,4,2             ## @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_BCR_FLR,4,2     ## @PCI_EXP_DEVCTL_BCR_FLR
L_.str.1:                               ## @.str.1
	.asciz	"FLR"

	.comm	_PCIE_RESET_READY_POLL_MS,4,2   ## @PCIE_RESET_READY_POLL_MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_flr                       ; -- Begin function pcie_flr
	.p2align	2
_pcie_flr:                              ; @pcie_flr
	.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	x19, x0
	bl	_pci_wait_for_pending_transaction
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_err
LBB0_2:
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_BCR_FLR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_EXP_DEVCTL_BCR_FLR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pcie_capability_set_word
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	w0, #100
	bl	_msleep
Lloh8:
	adrp	x8, _PCIE_RESET_READY_POLL_MS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCIE_RESET_READY_POLL_MS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pci_dev_wait
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for pending transaction; performing function level reset anyway\n"

	.comm	_PCI_EXP_DEVCTL,4,2             ; @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_BCR_FLR,4,2     ; @PCI_EXP_DEVCTL_BCR_FLR
l_.str.1:                               ; @.str.1
	.asciz	"FLR"

	.comm	_PCIE_RESET_READY_POLL_MS,4,2   ; @PCIE_RESET_READY_POLL_MS
.subsections_via_symbols
