	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvme_ns_remove
_nvme_ns_remove:                        ## @nvme_ns_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_NVME_NS_REMOVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	48(%rbx), %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	leaq	44(%rbx), %rdi
	callq	_nvme_fault_inject_fini
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	callq	_mutex_lock
	leaq	40(%rbx), %rdi
	callq	_list_del_rcu
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_synchronize_rcu
	movq	%rbx, %rdi
	callq	_nvme_mpath_clear_current_path
	movq	32(%rbx), %rdi
	callq	_synchronize_srcu
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.2:
	movq	_GENHD_FL_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_5
## %bb.3:
	callq	_del_gendisk
	movl	24(%rbx), %edi
	callq	_blk_cleanup_queue
	movq	16(%rbx), %rdi
	callq	_blk_get_integrity
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	16(%rbx), %rdi
	callq	_blk_integrity_unregister
LBB0_5:
	movq	(%rbx), %rdi
	callq	_down_write
	leaq	8(%rbx), %rdi
	callq	_list_del_init
	movq	(%rbx), %rdi
	callq	_up_write
	movq	%rbx, %rdi
	callq	_nvme_mpath_check_last_path
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_nvme_put_ns                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NVME_NS_REMOVING,4,2           ## @NVME_NS_REMOVING
	.comm	_GENHD_FL_UP,4,2                ## @GENHD_FL_UP
	.no_dead_strip	_nvme_ns_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvme_ns_remove
_nvme_ns_remove:                        ; @nvme_ns_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _NVME_NS_REMOVING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVME_NS_REMOVING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #48
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x0, x19, #44
	bl	_nvme_fault_inject_fini
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	bl	_mutex_lock
	add	x0, x19, #40
	bl	_list_del_rcu
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	bl	_mutex_unlock
	bl	_synchronize_rcu
	mov	x0, x19
	bl	_nvme_mpath_clear_current_path
	ldr	x0, [x19, #32]
	bl	_synchronize_srcu
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _GENHD_FL_UP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GENHD_FL_UP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	bl	_del_gendisk
	ldr	w0, [x19, #24]
	bl	_blk_cleanup_queue
	ldr	x0, [x19, #16]
	bl	_blk_get_integrity
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x19, #16]
	bl	_blk_integrity_unregister
LBB0_6:
	ldr	x0, [x19]
	bl	_down_write
	add	x0, x19, #8
	bl	_list_del_init
	ldr	x0, [x19]
	bl	_up_write
	mov	x0, x19
	bl	_nvme_mpath_check_last_path
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_nvme_put_ns
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NVME_NS_REMOVING,4,2           ; @NVME_NS_REMOVING
	.comm	_GENHD_FL_UP,4,2                ; @GENHD_FL_UP
	.no_dead_strip	_nvme_ns_remove
.subsections_via_symbols
