	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_dev_wait
_pci_dev_wait:                          ## @pci_dev_wait
	.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	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_PCI_COMMAND@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_dword
	xorl	%r14d, %r14d
	cmpl	$-1, -44(%rbp)
	jne	LBB0_9
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	leaq	-44(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_msleep
	addl	%ebx, %ebx
	movl	(%r15), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_pci_read_config_dword
	cmpl	$-1, -44(%rbp)
	jne	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r13d, %ebx
	jg	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1001, %ebx                     ## imm = 0x3E9
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rbx), %edx
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_pci_info
	jmp	LBB0_6
LBB0_7:
	cmpl	$1001, %ebx                     ## imm = 0x3E9
	movl	$0, %r14d
	jb	LBB0_9
## %bb.8:
	decl	%ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_pci_info
	jmp	LBB0_9
LBB0_3:
	decl	%ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_pci_warn
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_COMMAND,4,2                ## @PCI_COMMAND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not ready %dms after %s; giving up\n"

	.comm	_ENOTTY,4,2                     ## @ENOTTY
L_.str.1:                               ## @.str.1
	.asciz	"not ready %dms after %s; waiting\n"

L_.str.2:                               ## @.str.2
	.asciz	"ready %dms after %s\n"

	.no_dead_strip	_pci_dev_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_dev_wait
_pci_dev_wait:                          ; @pci_dev_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _PCI_COMMAND@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PCI_COMMAND@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	cmn	w8, #1
	b.eq	LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	mov	w22, #1
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_msleep
	lsl	w22, w22, #1
	ldr	w1, [x24]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	cmn	w8, #1
	b.ne	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, w21
	b.gt	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w22, #1001
	b.lo	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w2, w22, #1
	mov	x0, x20
	mov	x1, x23
	mov	x3, x19
	bl	_pci_info
	b	LBB0_4
LBB0_8:
	cmp	w22, #1001
	b.lo	LBB0_1
; %bb.9:
	sub	w2, w22, #1
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_pci_info
	b	LBB0_1
LBB0_10:
	sub	w2, w22, #1
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_pci_warn
Lloh8:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_COMMAND,4,2                ; @PCI_COMMAND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not ready %dms after %s; giving up\n"

	.comm	_ENOTTY,4,2                     ; @ENOTTY
l_.str.1:                               ; @.str.1
	.asciz	"not ready %dms after %s; waiting\n"

l_.str.2:                               ; @.str.2
	.asciz	"ready %dms after %s\n"

	.no_dead_strip	_pci_dev_wait
.subsections_via_symbols
