	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_bus_wait_crs
_pci_bus_wait_crs:                      ## @pci_bus_wait_crs
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	(%rdx), %edi
	callq	_pci_bus_crs_vendor_id
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.2:
	movl	$1, %ebx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %edi
	callq	_msleep
	addl	%ebx, %ebx
	movq	_PCI_VENDOR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r13, %rcx
	callq	_pci_bus_read_config_dword
	testq	%rax, %rax
	jne	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_pci_bus_crs_vendor_id
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r14d, %ebx
	jg	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$1000, %ebx                     ## imm = 0x3E8
	jb	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_pci_domain_nr
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_PCI_SLOT
	movl	%r14d, %r13d
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_PCI_FUNC
	leal	-1(%rbx), %r9d
	leaq	L_.str.1(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	movl	%r13d, %r14d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, %r8d
	callq	_pr_info
	jmp	LBB0_3
LBB0_8:
	movl	$1, %eax
	cmpl	$1000, %ebx                     ## imm = 0x3E8
	jb	LBB0_14
## %bb.9:
	movq	%r15, %rdi
	callq	_pci_domain_nr
	movl	%eax, %r14d
	movl	(%r15), %r15d
	movl	%r12d, %edi
	callq	_PCI_SLOT
	movl	%r12d, %edi
	movl	%eax, %r12d
	callq	_PCI_FUNC
	decl	%ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	movl	%ebx, %r9d
	callq	_pr_info
LBB0_10:
	movl	$1, %eax
	jmp	LBB0_14
LBB0_12:
	movq	%r15, %rdi
	callq	_pci_domain_nr
	movl	%eax, %r14d
	movq	%r15, %rax
	movl	%r12d, %r15d
	movl	(%rax), %r12d
	movl	%r15d, %edi
	callq	_PCI_SLOT
	movl	%eax, %r13d
	movl	%r15d, %edi
	callq	_PCI_FUNC
	decl	%ebx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	movl	%ebx, %r9d
	callq	_pr_warn
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pci %04x:%02x:%02x.%d: not ready after %dms; giving up\n"

L_.str.1:                               ## @.str.1
	.asciz	"pci %04x:%02x:%02x.%d: not ready after %dms; waiting\n"

	.comm	_PCI_VENDOR_ID,4,2              ## @PCI_VENDOR_ID
L_.str.2:                               ## @.str.2
	.asciz	"pci %04x:%02x:%02x.%d: ready after %dms\n"

	.no_dead_strip	_pci_bus_wait_crs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_bus_wait_crs
_pci_bus_wait_crs:                      ; @pci_bus_wait_crs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x2]
	bl	_pci_bus_crs_vendor_id
	cbz	x0, LBB0_11
; %bb.1:
	cbz	w22, LBB0_8
; %bb.2:
	mov	w20, #1
Lloh0:
	adrp	x24, l_.str.1@PAGE
Lloh1:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh2:
	adrp	x28, _PCI_VENDOR_ID@GOTPAGE
Lloh3:
	ldr	x28, [x28, _PCI_VENDOR_ID@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_msleep
	lsl	w20, w20, #1
	ldr	w2, [x28]
	mov	x0, x21
	mov	x1, x19
	mov	x3, x23
	bl	_pci_bus_read_config_dword
	cbnz	x0, LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_pci_bus_crs_vendor_id
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w20, w22
	b.gt	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w20, #1000
	b.lo	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_pci_domain_nr
	mov	x25, x0
	ldr	w26, [x21]
	mov	x0, x19
	bl	_PCI_SLOT
	mov	x27, x0
	mov	x0, x19
	bl	_PCI_FUNC
	mov	x4, x0
	sub	w5, w20, #1
	mov	x0, x24
	mov	x1, x25
	mov	x2, x26
	mov	x3, x27
	bl	_pr_info
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	cmp	w20, #1000
	b.lo	LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_pci_domain_nr
	mov	x22, x0
	ldr	w21, [x21]
	mov	x0, x19
	bl	_PCI_SLOT
	mov	x23, x0
	mov	x0, x19
	bl	_PCI_FUNC
	mov	x4, x0
	sub	w5, w20, #1
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	bl	_pr_info
LBB0_11:
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x21
	bl	_pci_domain_nr
	mov	x22, x0
	ldr	w21, [x21]
	mov	x0, x19
	bl	_PCI_SLOT
	mov	x23, x0
	mov	x0, x19
	bl	_PCI_FUNC
	mov	x4, x0
	sub	w5, w20, #1
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	bl	_pr_warn
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pci %04x:%02x:%02x.%d: not ready after %dms; giving up\n"

l_.str.1:                               ; @.str.1
	.asciz	"pci %04x:%02x:%02x.%d: not ready after %dms; waiting\n"

	.comm	_PCI_VENDOR_ID,4,2              ; @PCI_VENDOR_ID
l_.str.2:                               ; @.str.2
	.asciz	"pci %04x:%02x:%02x.%d: ready after %dms\n"

	.no_dead_strip	_pci_bus_wait_crs
.subsections_via_symbols
