	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zpool_vdev_detach              ## -- Begin function zpool_vdev_detach
	.p2align	4, 0x90
_zpool_vdev_detach:                     ## @zpool_vdev_detach
	.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	%r12
	pushq	%rbx
	subq	$1072, %rsp                     ## imm = 0x430
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -1096(%rbp)
	movq	$0, -1104(%rbp)
	movq	8(%rdi), %r14
	movq	_TEXT_DOMAIN@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dgettext
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %rdx
	movq	%r15, %rcx
	callq	_snprintf
	movl	(%rbx), %esi
	xorl	%edi, %edi
	movl	$4, %edx
	callq	_strlcpy
	leaq	-1088(%rbp), %rdx
	leaq	-1080(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_zpool_find_vdev
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpq	$0, -1088(%rbp)
	je	LBB0_5
## %bb.4:
	movq	_EZFS_ISSPARE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EZFS_NODEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	cmpq	$0, -1080(%rbp)
	je	LBB0_7
## %bb.6:
	movq	_EZFS_ISL2CACHE@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	leaq	-1072(%rbp), %rdx
	movq	%r14, %rdi
	callq	_zfs_error
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	addq	$1072, %rsp                     ## imm = 0x430
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ZPOOL_CONFIG_GUID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-1104(%rbp), %rbx
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_nvlist_lookup_uint64
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_verify
	movq	_ZFS_IOC_VDEV_DETACH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_zfs_ioctl
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$129, %esi
	je	LBB0_12
## %bb.10:
	cmpl	$128, %esi
	jne	LBB0_14
## %bb.11:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dgettext
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_zfs_error_aux
	movq	_EZFS_BADTARGET@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_12:
	movq	_EZFS_NOREPLICAS@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	leaq	-1072(%rbp), %rdx
	movq	%r14, %rdi
	callq	_zfs_error
	jmp	LBB0_15
LBB0_14:
	leaq	-1072(%rbp), %rdx
	movq	%r14, %rdi
	callq	_zpool_standard_error
LBB0_15:
	movl	$-1, %eax
	jmp	LBB0_16
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TEXT_DOMAIN,4,2                ## @TEXT_DOMAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot detach %s"

	.comm	_EZFS_NODEVICE,4,2              ## @EZFS_NODEVICE
	.comm	_EZFS_ISSPARE,4,2               ## @EZFS_ISSPARE
	.comm	_EZFS_ISL2CACHE,4,2             ## @EZFS_ISL2CACHE
	.comm	_ZPOOL_CONFIG_GUID,4,2          ## @ZPOOL_CONFIG_GUID
	.comm	_ZFS_IOC_VDEV_DETACH,4,2        ## @ZFS_IOC_VDEV_DETACH
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"only applicable to mirror and replacing vdevs"

	.comm	_EZFS_BADTARGET,4,2             ## @EZFS_BADTARGET
	.comm	_EZFS_NOREPLICAS,4,2            ## @EZFS_NOREPLICAS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zpool_vdev_detach              ; -- Begin function zpool_vdev_detach
	.p2align	2
_zpool_vdev_detach:                     ; @zpool_vdev_detach
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1072
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	str	wzr, [sp, #32]
	str	xzr, [sp, #24]
	ldr	x19, [x0, #8]
Lloh3:
	adrp	x22, _TEXT_DOMAIN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TEXT_DOMAIN@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dgettext
	mov	x2, x0
	add	x0, sp, #40
	mov	w1, #1024
	mov	x3, x20
	bl	_snprintf
	ldr	w1, [x21]
	mov	w0, #0
	mov	w2, #4
	bl	_strlcpy
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x4, #0
	bl	_zpool_find_vdev
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_4
; %bb.2:
Lloh7:
	adrp	x8, _EZFS_ISSPARE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EZFS_ISSPARE@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh9:
	adrp	x8, _EZFS_NODEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EZFS_NODEVICE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
; %bb.5:
Lloh11:
	adrp	x8, _EZFS_ISL2CACHE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EZFS_ISL2CACHE@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	add	x2, sp, #40
	mov	x0, x19
	bl	_zfs_error
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.8:
	add	sp, sp, #1072
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh16:
	adrp	x8, _ZPOOL_CONFIG_GUID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ZPOOL_CONFIG_GUID@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_nvlist_lookup_uint64
	cmp	x0, #0
	cset	w0, eq
	bl	_verify
Lloh19:
	adrp	x8, _ZFS_IOC_VDEV_DETACH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ZFS_IOC_VDEV_DETACH@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x19
	bl	_zfs_ioctl
	cbz	x0, LBB0_7
; %bb.10:
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	cmp	w1, #129
	b.eq	LBB0_13
; %bb.11:
	cmp	w1, #128
	b.ne	LBB0_15
; %bb.12:
	ldr	w0, [x22]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dgettext
	mov	x1, x0
	mov	x0, x19
	bl	_zfs_error_aux
Lloh27:
	adrp	x8, _EZFS_BADTARGET@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EZFS_BADTARGET@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh29:
	adrp	x8, _EZFS_NOREPLICAS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EZFS_NOREPLICAS@GOTPAGEOFF]
LBB0_14:
	ldr	w1, [x8]
	add	x2, sp, #40
	mov	x0, x19
	bl	_zfs_error
	b	LBB0_16
LBB0_15:
	add	x2, sp, #40
	mov	x0, x19
	bl	_zpool_standard_error
LBB0_16:
	mov	w0, #-1
	b	LBB0_7
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_TEXT_DOMAIN,4,2                ; @TEXT_DOMAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot detach %s"

	.comm	_EZFS_NODEVICE,4,2              ; @EZFS_NODEVICE
	.comm	_EZFS_ISSPARE,4,2               ; @EZFS_ISSPARE
	.comm	_EZFS_ISL2CACHE,4,2             ; @EZFS_ISL2CACHE
	.comm	_ZPOOL_CONFIG_GUID,4,2          ; @ZPOOL_CONFIG_GUID
	.comm	_ZFS_IOC_VDEV_DETACH,4,2        ; @ZFS_IOC_VDEV_DETACH
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"only applicable to mirror and replacing vdevs"

	.comm	_EZFS_BADTARGET,4,2             ; @EZFS_BADTARGET
	.comm	_EZFS_NOREPLICAS,4,2            ; @EZFS_NOREPLICAS
.subsections_via_symbols
