	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvme_wait_reset                ## -- Begin function nvme_wait_reset
	.p2align	4, 0x90
_nvme_wait_reset:                       ## @nvme_wait_reset
	.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
	movl	8(%rdi), %r14d
	movq	_NVME_CTRL_RESETTING@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	callq	_nvme_change_ctrl_state
	movl	$1, %esi
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_nvme_state_terminal
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
LBB0_2:
	movl	%r14d, %edi
	callq	_wait_event
	movq	(%rbx), %rcx
	xorl	%eax, %eax
	cmpq	(%r15), %rcx
	sete	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_CTRL_RESETTING,8,3        ## @NVME_CTRL_RESETTING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvme_wait_reset                ; -- Begin function nvme_wait_reset
	.p2align	2
_nvme_wait_reset:                       ; @nvme_wait_reset
	.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
	ldr	w20, [x0, #8]
Lloh0:
	adrp	x21, _NVME_CTRL_RESETTING@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NVME_CTRL_RESETTING@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_nvme_change_ctrl_state
	cbz	x0, LBB0_2
; %bb.1:
	mov	w1, #1
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_nvme_state_terminal
	cmp	x0, #0
	cset	w1, ne
LBB0_3:
	mov	x0, x20
	bl	_wait_event
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w0, eq
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_CTRL_RESETTING,8,3        ; @NVME_CTRL_RESETTING
.subsections_via_symbols
