	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function delete_volume
_delete_volume:                         ## @delete_volume
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	cmpl	$2, %edi
	jl	LBB0_11
## %bb.1:
	movq	%rsi, %r14
	movl	%edi, %ebx
	leaq	8(%rsi), %r15
	movq	8(%rsi), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	movq	%r14, %r15
	cmpl	$2, %ebx
	jne	LBB0_11
LBB0_4:
	movq	_mfi_unit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mfi_open
	testl	%eax, %eax
	js	LBB0_17
## %bb.5:
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_mfi_reconfig_supported
	testl	%eax, %eax
	je	LBB0_18
## %bb.6:
	movq	8(%r15), %rsi
	leaq	-52(%rbp), %rdx
	movl	%r14d, %edi
	callq	_mfi_lookup_volume
	testq	%rax, %rax
	js	LBB0_19
## %bb.7:
	movl	-52(%rbp), %esi
	leaq	-56(%rbp), %rdx
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	callq	_mfi_ld_get_info
	testq	%rax, %rax
	js	LBB0_20
## %bb.8:
	movl	-52(%rbp), %esi
	movl	%r14d, %edi
	callq	_mfi_volume_busy
	testq	%rax, %rax
	je	LBB0_21
## %bb.9:
	movl	-52(%rbp), %esi
	movl	%r14d, %edi
	callq	_mfi_volume_name
	leaq	L_.str.7(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
	movl	%r14d, %edi
	callq	_close
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	decl	%ebx
	cmpl	$2, %ebx
	je	LBB0_4
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_24
## %bb.14:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_24
## %bb.16:
	decl	%ebx
	movl	%ebx, %edi
	movq	%r15, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_remove_spare                   ## TAILCALL
LBB0_17:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_13
LBB0_18:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	movl	%r14d, %edi
	callq	_close
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_19:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	8(%r15), %rsi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_23
LBB0_20:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-52(%rbp), %esi
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_23
LBB0_21:
	leaq	-48(%rbp), %r15
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mbox_store_ldref
	movq	_MFI_DCMD_LD_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	$0, (%rsp)
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	movl	$16, %r9d
	callq	_mfi_dcmd_command
	testq	%rax, %rax
	jns	LBB0_23
## %bb.22:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_23:
	movl	%r14d, %edi
	callq	_close
	jmp	LBB0_13
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"volume"

L_.str.1:                               ## @.str.1
	.asciz	"spare"

L_.str.2:                               ## @.str.2
	.asciz	"delete volume: volume required"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mfi_unit,4,2                   ## @mfi_unit
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"mfi_open"

L_.str.4:                               ## @.str.4
	.asciz	"The current mfi(4) driver does not support configuration changes."

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.5:                               ## @.str.5
	.asciz	"Invalid volume %s"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to get info for volume %d"

L_.str.7:                               ## @.str.7
	.asciz	"Volume %s is busy and cannot be deleted"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MFI_DCMD_LD_DELETE,4,2         ## @MFI_DCMD_LD_DELETE
L_.str.8:                               ## @.str.8
	.asciz	"Failed to delete volume"

	.no_dead_strip	_delete_volume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function delete_volume
_delete_volume:                         ; @delete_volume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	cmp	w0, #2
	b.lt	LBB0_11
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	mov	x20, x1
	ldr	x0, [x20, #8]!
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.2:
	ldr	x0, [x20]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_15
; %bb.3:
	mov	x20, x21
	cmp	w19, #2
	b.ne	LBB0_11
LBB0_4:
Lloh7:
	adrp	x8, _mfi_unit@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mfi_unit@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_mfi_open
	tbnz	w0, #31, LBB0_17
; %bb.5:
	mov	x19, x0
	bl	_mfi_reconfig_supported
	cbz	w0, LBB0_18
; %bb.6:
	ldr	x1, [x20, #8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mfi_lookup_volume
	tbnz	x0, #63, LBB0_19
; %bb.7:
	ldr	w1, [sp, #12]
	add	x2, sp, #16
	mov	x0, x19
	mov	x3, #0
	bl	_mfi_ld_get_info
	tbnz	x0, #63, LBB0_20
; %bb.8:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_mfi_volume_busy
	cbz	x0, LBB0_22
; %bb.9:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_mfi_volume_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str.7@PAGE
Lloh14:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_warnx
	mov	x0, x19
	bl	_close
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	sub	w19, w19, #1
	cmp	w19, #2
	b.eq	LBB0_4
LBB0_11:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w21, [x8]
LBB0_13:
	ldr	x8, [sp, #40]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.14:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_15:
	ldr	x8, [sp, #40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.16:
	sub	w0, w19, #1
	mov	x1, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_remove_spare
LBB0_17:
Lloh27:
	adrp	x8, _errno@GOTPAGE
Lloh28:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh29:
	ldr	w21, [x8]
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warn
	b	LBB0_13
LBB0_18:
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warnx
	mov	x0, x19
	bl	_close
Lloh34:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_12
LBB0_19:
Lloh36:
	adrp	x8, _errno@GOTPAGE
Lloh37:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh38:
	ldr	w21, [x8]
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh39:
	adrp	x0, l_.str.5@PAGE
Lloh40:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_21
LBB0_20:
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	ldr	w21, [x8]
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh44:
	adrp	x0, l_.str.6@PAGE
Lloh45:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_21:
	bl	_warn
	mov	x0, x19
	bl	_close
	b	LBB0_13
LBB0_22:
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_mbox_store_ldref
Lloh46:
	adrp	x8, _MFI_DCMD_LD_DELETE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MFI_DCMD_LD_DELETE@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	add	x4, sp, #24
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w5, #16
	mov	x6, #0
	bl	_mfi_dcmd_command
	tbnz	x0, #63, LBB0_24
; %bb.23:
	mov	x0, x19
	bl	_close
	mov	w21, #0
	b	LBB0_13
LBB0_24:
Lloh49:
	adrp	x8, _errno@GOTPAGE
Lloh50:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh51:
	ldr	w21, [x8]
Lloh52:
	adrp	x0, l_.str.8@PAGE
Lloh53:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_21
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"volume"

l_.str.1:                               ; @.str.1
	.asciz	"spare"

l_.str.2:                               ; @.str.2
	.asciz	"delete volume: volume required"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mfi_unit,4,2                   ; @mfi_unit
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"mfi_open"

l_.str.4:                               ; @.str.4
	.asciz	"The current mfi(4) driver does not support configuration changes."

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.5:                               ; @.str.5
	.asciz	"Invalid volume %s"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to get info for volume %d"

l_.str.7:                               ; @.str.7
	.asciz	"Volume %s is busy and cannot be deleted"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MFI_DCMD_LD_DELETE,4,2         ; @MFI_DCMD_LD_DELETE
l_.str.8:                               ; @.str.8
	.asciz	"Failed to delete volume"

	.no_dead_strip	_delete_volume
.subsections_via_symbols
