	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcie_wait_cmd
_pcie_wait_cmd:                         ## @pcie_wait_cmd
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_pciehp_poll_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	$1000, %eax                     ## imm = 0x3E8
	movl	$2500, %edi                     ## imm = 0x9C4
	cmovel	%eax, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	(%r14), %rbx
	movq	%r14, %rdi
	callq	_NO_CMD_CMPL
	testq	%rax, %rax
	je	LBB0_1
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, 12(%r14)
	je	LBB0_7
## %bb.2:
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_time_before_eq
	subq	%r15, %rbx
	testq	%rax, %rax
	movl	$1, %edx
	cmoveq	%rbx, %rdx
	movl	8(%r14), %eax
	movq	_PCI_EXP_SLTCTL_HPIE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_PCI_EXP_SLTCTL_CCIE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movl	16(%r14), %edi
	xorl	%esi, %esi
	cmpl	$0, 12(%r14)
	sete	%sil
	callq	_wait_event_timeout
	testl	%eax, %eax
	jne	LBB0_7
	jmp	LBB0_8
LBB0_5:
	movq	%rdx, %rdi
	callq	_jiffies_to_msecs
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pcie_poll_cmd
	testl	%eax, %eax
	jne	LBB0_7
LBB0_8:
	movl	8(%r14), %ebx
	movq	(%r12), %rdi
	subq	(%r14), %rdi
	callq	_jiffies_to_msecs
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ctrl_info                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pciehp_poll_mode,8,3           ## @pciehp_poll_mode
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_PCI_EXP_SLTCTL_HPIE,4,2        ## @PCI_EXP_SLTCTL_HPIE
	.comm	_PCI_EXP_SLTCTL_CCIE,4,2        ## @PCI_EXP_SLTCTL_CCIE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout on hotplug command %#06x (issued %u msec ago)\n"

	.no_dead_strip	_pcie_wait_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcie_wait_cmd
_pcie_wait_cmd:                         ; @pcie_wait_cmd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _pciehp_poll_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pciehp_poll_mode@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #2500
	mov	w9, #1000
	csel	w0, w9, w8, eq
	bl	_msecs_to_jiffies
	mov	x20, x0
	ldr	x21, [x19]
	mov	x0, x19
	bl	_NO_CMD_CMPL
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_1
; %bb.3:
	add	x20, x21, x20
Lloh3:
	adrp	x22, _jiffies@GOTPAGE
Lloh4:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x21, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_time_before_eq
	sub	x8, x20, x21
	cmp	x0, #0
	csinc	x2, x8, xzr, eq
	ldr	w8, [x19, #8]
Lloh5:
	adrp	x9, _PCI_EXP_SLTCTL_HPIE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_EXP_SLTCTL_HPIE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
Lloh8:
	adrp	x9, _PCI_EXP_SLTCTL_CCIE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_EXP_SLTCTL_CCIE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldp	w8, w0, [x19, #12]
	cmp	w8, #0
	cset	w1, eq
	bl	_wait_event_timeout
	cbnz	w0, LBB0_1
	b	LBB0_7
LBB0_6:
	mov	x0, x2
	bl	_jiffies_to_msecs
	mov	x1, x0
	mov	x0, x19
	bl	_pcie_poll_cmd
	cbnz	w0, LBB0_1
LBB0_7:
	ldr	w20, [x19, #8]
	ldr	x8, [x22]
	ldr	x9, [x19]
	sub	x0, x8, x9
	bl	_jiffies_to_msecs
	mov	x3, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ctrl_info
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_pciehp_poll_mode,8,3           ; @pciehp_poll_mode
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_PCI_EXP_SLTCTL_HPIE,4,2        ; @PCI_EXP_SLTCTL_HPIE
	.comm	_PCI_EXP_SLTCTL_CCIE,4,2        ; @PCI_EXP_SLTCTL_CCIE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout on hotplug command %#06x (issued %u msec ago)\n"

	.no_dead_strip	_pcie_wait_cmd
.subsections_via_symbols
