	.file	"extr_zfs_ioctl.c_zfs_ioc_promote.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	zfs_ioc_promote, @function
zfs_ioc_promote:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR ZFS_MAX_DATASET_NAME_LEN[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L23:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L23
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L24
.L4:
	mov	rax, QWORD PTR [rbx]
	xor	edx, edx
	xor	esi, esi
	mov	r13, rsp
	mov	BYTE PTR 7[rax], 0
	mov	rdi, QWORD PTR [rbx]
	call	dataset_namecheck@PLT
	test	rax, rax
	jne	.L20
	mov	rdi, QWORD PTR [rbx]
	mov	esi, 37
	call	strchr@PLT
	test	rax, rax
	je	.L25
.L20:
	mov	edi, DWORD PTR EINVAL[rip]
	call	SET_ERROR@PLT
	mov	r12d, eax
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	lea	rsp, -24[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR [rbx]
	lea	rdx, -64[rbp]
	call	dsl_pool_hold@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR FTAG[rip]
	mov	rsi, QWORD PTR [rbx]
	lea	rcx, -56[rbp]
	mov	rdi, QWORD PTR -64[rbp]
	call	dsl_dataset_hold@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L21
	mov	rax, QWORD PTR -56[rbp]
	mov	edi, DWORD PTR [rax]
	call	dsl_dir_is_clone@PLT
	test	eax, eax
	je	.L27
	mov	rax, QWORD PTR -56[rbp]
	mov	r12d, DWORD PTR FTAG[rip]
	mov	edi, DWORD PTR [rax]
	call	dsl_dir_phys@PLT
	mov	rdi, QWORD PTR -64[rbp]
	mov	edx, r12d
	lea	rcx, -48[rbp]
	mov	esi, DWORD PTR [rax]
	call	dsl_dataset_hold_obj@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L28
	mov	rdi, QWORD PTR -48[rbp]
	mov	rsi, rsp
	call	dsl_dataset_name@PLT
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR -48[rbp]
	call	dsl_dataset_rele@PLT
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR -56[rbp]
	call	dsl_dataset_rele@PLT
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR -64[rbp]
	call	dsl_pool_rele@PLT
	mov	esi, 64
	mov	rdi, rsp
	call	strchr@PLT
	test	rax, rax
	je	.L11
	mov	BYTE PTR [rax], 0
.L11:
	mov	ecx, DWORD PTR DS_FIND_SNAPSHOTS[rip]
	mov	esi, DWORD PTR zfs_unmount_snap_cb[rip]
	xor	edx, edx
	mov	rdi, r13
	call	dmu_objset_find@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, QWORD PTR [rbx]
	call	dsl_dataset_promote@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdi, QWORD PTR -56[rbp]
	mov	esi, DWORD PTR FTAG[rip]
	call	dsl_dataset_rele@PLT
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR -64[rbp]
	call	dsl_pool_rele@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L28:
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR -56[rbp]
	call	dsl_dataset_rele@PLT
.L21:
	mov	esi, DWORD PTR FTAG[rip]
	mov	rdi, QWORD PTR -64[rbp]
	call	dsl_pool_rele@PLT
	jmp	.L1
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	zfs_ioc_promote, .-zfs_ioc_promote
	.comm	zfs_unmount_snap_cb,4,4
	.comm	ZFS_MAX_DATASET_NAME_LEN,4,4
	.comm	FTAG,4,4
	.comm	EINVAL,4,4
	.comm	DS_FIND_SNAPSHOTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_zfs_ioctl.c_zfs_ioc_promote.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	zfs_ioc_promote, %function
zfs_ioc_promote:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	mov	r2, #0
	mov	r4, r0
	ldr	r3, .L21
	ldr	r1, [r0]
	ldr	r3, [r3]
	ldr	r0, .L21+4
	add	r3, r3, #7
	ldr	r0, [r0]
	str	r0, [fp, #-24]
	mov	r0,#0
	bic	r3, r3, #7
	strb	r2, [r1, #3]
	ldr	r0, [r4]
	mov	r1, r2
	sub	sp, sp, r3
	bl	dataset_namecheck
	cmp	r0, #0
	bne	.L14
	mov	r1, #37
	ldr	r0, [r4]
	bl	strchr
	cmp	r0, #0
	beq	.L17
.L14:
	ldr	r3, .L21+8
	ldr	r0, [r3]
	bl	SET_ERROR
	mov	r5, r0
.L1:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r5
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L17:
	ldr	r7, .L21+12
	ldr	r0, [r4]
	ldr	r1, [r7]
	sub	r2, fp, #36
	bl	dsl_pool_hold
	subs	r5, r0, #0
	bne	.L1
	ldr	r2, [r7]
	ldr	r1, [r4]
	ldr	r0, [fp, #-36]
	sub	r3, fp, #32
	bl	dsl_dataset_hold
	subs	r5, r0, #0
	bne	.L15
	ldr	r3, [fp, #-32]
	ldr	r0, [r3]
	bl	dsl_dir_is_clone
	cmp	r0, #0
	beq	.L19
	ldr	r3, [fp, #-32]
	ldr	r5, [fp, #-36]
	ldr	r0, [r3]
	bl	dsl_dir_phys
	ldr	r2, [r7]
	ldr	r1, [r0]
	sub	r3, fp, #28
	mov	r0, r5
	bl	dsl_dataset_hold_obj
	subs	r5, r0, #0
	bne	.L20
	mov	r1, sp
	ldr	r0, [fp, #-28]
	bl	dsl_dataset_name
	ldr	r1, [r7]
	ldr	r0, [fp, #-28]
	bl	dsl_dataset_rele
	ldr	r1, [r7]
	ldr	r0, [fp, #-32]
	bl	dsl_dataset_rele
	ldr	r1, [r7]
	ldr	r0, [fp, #-36]
	bl	dsl_pool_rele
	mov	r1, #64
	mov	r0, sp
	bl	strchr
	mov	r6, sp
	cmp	r0, #0
	ldr	r2, .L21+16
	ldr	r3, .L21+20
	strbne	r5, [r0]
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r2, #0
	mov	r0, r6
	bl	dmu_objset_find
	ldm	r4, {r0, r1}
	bl	dsl_dataset_promote
	mov	r5, r0
	b	.L1
.L19:
	ldr	r1, [r7]
	ldr	r0, [fp, #-32]
	bl	dsl_dataset_rele
	ldr	r1, [r7]
	ldr	r0, [fp, #-36]
	bl	dsl_pool_rele
	b	.L14
.L20:
	ldr	r1, [r7]
	ldr	r0, [fp, #-32]
	bl	dsl_dataset_rele
.L15:
	ldr	r1, [r7]
	ldr	r0, [fp, #-36]
	bl	dsl_pool_rele
	b	.L1
.L18:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	ZFS_MAX_DATASET_NAME_LEN
	.word	.LC0
	.word	EINVAL
	.word	FTAG
	.word	zfs_unmount_snap_cb
	.word	DS_FIND_SNAPSHOTS
	.size	zfs_ioc_promote, .-zfs_ioc_promote
	.comm	zfs_unmount_snap_cb,4,4
	.comm	ZFS_MAX_DATASET_NAME_LEN,4,4
	.comm	FTAG,4,4
	.comm	EINVAL,4,4
	.comm	DS_FIND_SNAPSHOTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
