	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_dev_disable
_nvme_dev_disable:                      ## @nvme_dev_disable
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movl	56(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_pci_is_enabled
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_NVME_REG_CSTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	48(%r15), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	8(%r15), %rax
	movq	_NVME_CTRL_LIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_NVME_CTRL_RESETTING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	leaq	8(%r15), %r14
	sete	%bl
	orb	%cl, %bl
	cmpb	$1, %bl
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_nvme_start_freeze
LBB0_3:
	movq	_NVME_CSTS_CFS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
LBB0_5:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_nvme_stop_queues
LBB0_11:
	movq	%r15, %rdi
	callq	_nvme_suspend_io_queues
	movq	40(%r15), %rdi
	callq	_nvme_suspend_queue
	movq	%r15, %rdi
	callq	_nvme_pci_disable
	leaq	36(%r15), %r12
	movq	_nvme_cancel_request@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_blk_mq_tagset_busy_iter
	leaq	32(%r15), %rbx
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_blk_mq_tagset_busy_iter
	movq	%r12, %rdi
	callq	_blk_mq_tagset_wait_completed_request
	movq	%rbx, %rdi
	callq	_blk_mq_tagset_wait_completed_request
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_15
## %bb.12:
	movq	%r14, %rdi
	callq	_nvme_start_queues
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.13:
	callq	_blk_queue_dying
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	24(%r15), %rdi
	callq	_blk_mq_unquiesce_queue
LBB0_15:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_4:
	movq	_NVME_CSTS_RDY@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_5
## %bb.6:
	movq	(%r12), %rdx
	movq	_pci_channel_io_normal@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	cmpq	%r12, %rdx
	sete	%al
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	testl	%r13d, %r13d
	setne	%cl
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	andb	%cl, %al
	andb	%al, %bl
	cmpb	$1, %bl
	jne	LBB0_8
## %bb.7:
	movq	_NVME_IO_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_nvme_wait_freeze_timeout
	movq	%r14, %rdi
	callq	_nvme_stop_queues
	jmp	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	movq	%rdx, %rbx
	callq	_nvme_stop_queues
	cmpq	%r12, %rbx
	jne	LBB0_11
LBB0_9:
	cmpq	$0, 16(%r15)
	jle	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_nvme_disable_io_queues
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_nvme_disable_admin_queue
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_REG_CSTS,8,3              ## @NVME_REG_CSTS
	.comm	_NVME_CTRL_LIVE,8,3             ## @NVME_CTRL_LIVE
	.comm	_NVME_CTRL_RESETTING,8,3        ## @NVME_CTRL_RESETTING
	.comm	_NVME_CSTS_CFS,4,2              ## @NVME_CSTS_CFS
	.comm	_NVME_CSTS_RDY,4,2              ## @NVME_CSTS_RDY
	.comm	_pci_channel_io_normal,8,3      ## @pci_channel_io_normal
	.comm	_NVME_IO_TIMEOUT,4,2            ## @NVME_IO_TIMEOUT
	.comm	_nvme_cancel_request,4,2        ## @nvme_cancel_request
	.no_dead_strip	_nvme_dev_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_dev_disable
_nvme_dev_disable:                      ; @nvme_dev_disable
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #56]
	bl	_to_pci_dev
	mov	x22, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x22
	bl	_pci_is_enabled
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #48]
Lloh0:
	adrp	x9, _NVME_REG_CSTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVME_REG_CSTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x23, x0
	mov	x20, x19
	ldr	x8, [x20, #8]!
Lloh3:
	adrp	x9, _NVME_CTRL_LIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NVME_CTRL_LIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh6:
	adrp	x9, _NVME_CTRL_RESETTING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NVME_CTRL_RESETTING@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w24, eq
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_nvme_start_freeze
LBB0_3:
Lloh9:
	adrp	x8, _NVME_CSTS_CFS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVME_CSTS_CFS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_10
LBB0_4:
	cmp	w21, #0
	cset	w23, ne
	add	x20, x19, #8
	mov	x0, x20
	bl	_nvme_stop_queues
LBB0_5:
	mov	x0, x19
	bl	_nvme_suspend_io_queues
	ldr	x0, [x19, #40]
	bl	_nvme_suspend_queue
	mov	x0, x19
	bl	_nvme_pci_disable
	add	x21, x19, #36
Lloh12:
	adrp	x24, _nvme_cancel_request@GOTPAGE
Lloh13:
	ldr	x24, [x24, _nvme_cancel_request@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x20
	bl	_blk_mq_tagset_busy_iter
	add	x22, x19, #32
	ldr	w1, [x24]
	mov	x0, x22
	mov	x2, x20
	bl	_blk_mq_tagset_busy_iter
	mov	x0, x21
	bl	_blk_mq_tagset_wait_completed_request
	mov	x0, x22
	bl	_blk_mq_tagset_wait_completed_request
	cbz	w23, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_nvme_start_queues
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_9
; %bb.7:
	bl	_blk_queue_dying
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	x0, [x19, #24]
	bl	_blk_mq_unquiesce_queue
LBB0_9:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_10:
Lloh14:
	adrp	x8, _NVME_CSTS_RDY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NVME_CSTS_RDY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_4
; %bb.11:
	ldr	x22, [x22]
Lloh17:
	adrp	x8, _pci_channel_io_normal@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pci_channel_io_normal@GOTPAGEOFF]
Lloh19:
	ldr	x25, [x8]
	cmp	x22, x25
	cset	w8, eq
	cmp	w21, #0
	cset	w23, ne
	and	w8, w23, w8
	and	w8, w24, w8
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.12:
Lloh20:
	adrp	x8, _NVME_IO_TIMEOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NVME_IO_TIMEOUT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nvme_wait_freeze_timeout
	mov	x0, x20
	bl	_nvme_stop_queues
	b	LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_nvme_stop_queues
	cmp	x22, x25
	b.ne	LBB0_5
LBB0_14:
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.15:
	mov	x0, x19
	bl	_nvme_disable_io_queues
	mov	x0, x19
	mov	x1, x21
	bl	_nvme_disable_admin_queue
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_REG_CSTS,8,3              ; @NVME_REG_CSTS
	.comm	_NVME_CTRL_LIVE,8,3             ; @NVME_CTRL_LIVE
	.comm	_NVME_CTRL_RESETTING,8,3        ; @NVME_CTRL_RESETTING
	.comm	_NVME_CSTS_CFS,4,2              ; @NVME_CSTS_CFS
	.comm	_NVME_CSTS_RDY,4,2              ; @NVME_CSTS_RDY
	.comm	_pci_channel_io_normal,8,3      ; @pci_channel_io_normal
	.comm	_NVME_IO_TIMEOUT,4,2            ; @NVME_IO_TIMEOUT
	.comm	_nvme_cancel_request,4,2        ; @nvme_cancel_request
	.no_dead_strip	_nvme_dev_disable
.subsections_via_symbols
