	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zfs_promote                    ## -- Begin function zfs_promote
	.p2align	4, 0x90
_zfs_promote:                           ## @zfs_promote
	.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
	subq	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %r14
	movq	_ZFS_MAX_DATASET_NAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_TEXT_DOMAIN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dgettext
	movl	8(%rbx), %ecx
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %rdx
	callq	_snprintf
	movl	12(%rbx), %edx
	movq	_ZFS_TYPE_SNAPSHOT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_3
## %bb.1:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	(%rbx), %rax
	cmpb	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movl	8(%rbx), %esi
	movq	_B_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_zfs_validate_name
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_lzc_promote
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	cmpl	$128, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dgettext
	movq	(%rbx), %rcx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_zfs_error_aux
	movq	_EZFS_EXISTS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	callq	_dgettext
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_zfs_error_aux
	movq	_EZFS_BADTYPE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	leaq	-1072(%rbp), %rdx
	movq	%r14, %rdi
	callq	_zfs_error
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EZFS_INVALIDNAME@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_11:
	leaq	-1072(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_zfs_standard_error
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ZFS_MAX_DATASET_NAME_LEN,4,2   ## @ZFS_MAX_DATASET_NAME_LEN
	.comm	_TEXT_DOMAIN,4,2                ## @TEXT_DOMAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot promote '%s'"

	.comm	_ZFS_TYPE_SNAPSHOT,4,2          ## @ZFS_TYPE_SNAPSHOT
L_.str.1:                               ## @.str.1
	.asciz	"snapshots can not be promoted"

	.comm	_EZFS_BADTYPE,4,2               ## @EZFS_BADTYPE
L_.str.2:                               ## @.str.2
	.asciz	"not a cloned filesystem"

	.comm	_B_TRUE,4,2                     ## @B_TRUE
	.comm	_EZFS_INVALIDNAME,4,2           ## @EZFS_INVALIDNAME
L_.str.3:                               ## @.str.3
	.asciz	"conflicting snapshot '%s' from parent '%s'"

	.comm	_EZFS_EXISTS,4,2                ## @EZFS_EXISTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zfs_promote                    ; -- Begin function zfs_promote
	.p2align	2
_zfs_promote:                           ; @zfs_promote
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1040
	mov	x19, sp
	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, #-72]
	ldr	x20, [x0, #16]
Lloh3:
	adrp	x8, _ZFS_MAX_DATASET_NAME_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ZFS_MAX_DATASET_NAME_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	x9, x23
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
Lloh8:
	adrp	x24, _TEXT_DOMAIN@GOTPAGE
Lloh9:
	ldr	x24, [x24, _TEXT_DOMAIN@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dgettext
	mov	x2, x0
	ldr	w3, [x21, #8]
	add	x0, x19, #8
	mov	w1, #1024
	bl	_snprintf
	ldr	w2, [x21, #12]
Lloh12:
	adrp	x8, _ZFS_TYPE_SNAPSHOT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ZFS_TYPE_SNAPSHOT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x24]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_2:
	ldr	x8, [x21]
	ldrb	w8, [x8]
	cbz	w8, LBB0_7
; %bb.3:
	ldr	w1, [x21, #8]
Lloh17:
	adrp	x8, _B_TRUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _B_TRUE@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_zfs_validate_name
	cbz	w0, LBB0_13
; %bb.4:
	ldr	w0, [x21, #8]
	mov	x1, x22
	mov	x2, x23
	bl	_lzc_promote
	mov	x1, x0
	cbz	w0, LBB0_11
; %bb.5:
	cmp	w1, #128
	b.ne	LBB0_14
; %bb.6:
	ldr	w0, [x24]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dgettext
	mov	x1, x0
	ldr	x8, [x21]
	stp	x22, x8, [sp, #-16]!
	mov	x0, x20
	bl	_zfs_error_aux
	add	sp, sp, #16
Lloh22:
	adrp	x8, _EZFS_EXISTS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EZFS_EXISTS@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x24]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	bl	_dgettext
	mov	x1, x0
	mov	x0, x20
	bl	_zfs_error_aux
Lloh26:
	adrp	x8, _EZFS_BADTYPE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EZFS_BADTYPE@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	add	x2, x19, #8
	mov	x0, x20
	bl	_zfs_error
LBB0_10:
	mov	x1, x0
LBB0_11:
	ldur	x8, [x29, #-72]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.12:
	mov	x0, x1
	sub	sp, x29, #64
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh31:
	adrp	x8, _EZFS_INVALIDNAME@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EZFS_INVALIDNAME@GOTPAGEOFF]
	b	LBB0_9
LBB0_14:
	add	x2, x19, #8
	mov	x0, x20
	bl	_zfs_standard_error
	b	LBB0_10
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ZFS_MAX_DATASET_NAME_LEN,4,2   ; @ZFS_MAX_DATASET_NAME_LEN
	.comm	_TEXT_DOMAIN,4,2                ; @TEXT_DOMAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot promote '%s'"

	.comm	_ZFS_TYPE_SNAPSHOT,4,2          ; @ZFS_TYPE_SNAPSHOT
l_.str.1:                               ; @.str.1
	.asciz	"snapshots can not be promoted"

	.comm	_EZFS_BADTYPE,4,2               ; @EZFS_BADTYPE
l_.str.2:                               ; @.str.2
	.asciz	"not a cloned filesystem"

	.comm	_B_TRUE,4,2                     ; @B_TRUE
	.comm	_EZFS_INVALIDNAME,4,2           ; @EZFS_INVALIDNAME
l_.str.3:                               ; @.str.3
	.asciz	"conflicting snapshot '%s' from parent '%s'"

	.comm	_EZFS_EXISTS,4,2                ; @EZFS_EXISTS
.subsections_via_symbols
