	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hot_remove_disk
_hot_remove_disk:                       ## @hot_remove_disk
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_BDEVNAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	cmpl	$0, 12(%r14)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_find_rdev
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	cmpq	$0, (%rax)
	js	LBB0_6
## %bb.5:
	movq	_Blocked@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$12, %rsi
	callq	_clear_bit
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_remove_and_add_spares
	cmpq	$0, (%rbx)
	js	LBB0_6
## %bb.12:
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	callq	_bdevname
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mdname
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pr_debug
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_6:
	movq	%r14, %rdi
	callq	_mddev_is_clustered
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_md_cluster_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	*(%rax)
LBB0_8:
	movq	%rbx, %rdi
	callq	_md_kick_rdev_from_array
	movq	_MD_SB_CHANGE_DEVS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_set_bit
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_md_wakeup_thread
	jmp	LBB0_11
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_10:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_md_update_sb
LBB0_11:
	movq	%r14, %rdi
	callq	_md_new_event
	xorl	%eax, %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BDEVNAME_SIZE,4,2              ## @BDEVNAME_SIZE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_Blocked,4,2                    ## @Blocked
	.comm	_md_cluster_ops,8,3             ## @md_cluster_ops
	.comm	_MD_SB_CHANGE_DEVS,4,2          ## @MD_SB_CHANGE_DEVS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"md: cannot remove active disk %s from %s ...\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_hot_remove_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hot_remove_disk
_hot_remove_disk:                       ; @hot_remove_disk
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _BDEVNAME_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BDEVNAME_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_find_rdev
	cbz	x0, LBB0_10
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0]
	tbnz	x8, #63, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _Blocked@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Blocked@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, x20, #12
	bl	_clear_bit
	mov	x0, x19
	mov	x1, x20
	bl	_remove_and_add_spares
	ldr	x8, [x20]
	tbnz	x8, #63, LBB0_6
; %bb.4:
	ldr	w0, [x20, #8]
	mov	x1, x21
	bl	_bdevname
	mov	x20, x0
	mov	x0, x19
	bl	_mdname
	mov	x2, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_mddev_is_clustered
	cbz	x0, LBB0_8
; %bb.7:
Lloh17:
	adrp	x8, _md_cluster_ops@GOTPAGE
Lloh18:
	ldr	x8, [x8, _md_cluster_ops@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_8:
	mov	x0, x20
	bl	_md_kick_rdev_from_array
Lloh20:
	adrp	x8, _MD_SB_CHANGE_DEVS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MD_SB_CHANGE_DEVS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	ldr	x0, [x19]
	cbz	x0, LBB0_12
; %bb.9:
	bl	_md_wakeup_thread
	b	LBB0_13
LBB0_10:
Lloh23:
	adrp	x8, _ENXIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	bl	_md_update_sb
LBB0_13:
	mov	x0, x19
	bl	_md_new_event
	mov	w0, #0
LBB0_14:
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #32
	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_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BDEVNAME_SIZE,4,2              ; @BDEVNAME_SIZE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_Blocked,4,2                    ; @Blocked
	.comm	_md_cluster_ops,8,3             ; @md_cluster_ops
	.comm	_MD_SB_CHANGE_DEVS,4,2          ; @MD_SB_CHANGE_DEVS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"md: cannot remove active disk %s from %s ...\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_hot_remove_disk
.subsections_via_symbols
