	.file	"extr_be.c_be_rename.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	be_rename
	.type	be_rename, @function
be_rename:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rdx
	push	r14
	push	r13
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdi
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR BE_MAXPATHLEN[rip]
	mov	rdi, rsp
	add	rax, 15
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rdi, rcx
	mov	rcx, rdi
	cmp	rsp, rcx
	je	.L3
.L29:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L29
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L30
.L4:
	mov	rdx, rax
	mov	rsi, rsp
	and	rax, -4096
	mov	r14, rsp
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L6
.L31:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L31
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L32
.L7:
	mov	rsi, r15
	mov	rdi, r12
	call	be_validate_name@PLT
	mov	esi, eax
	test	eax, eax
	jne	.L26
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, r12
	call	be_root_concat@PLT
	test	eax, eax
	jne	.L27
	mov	rdx, rsp
	mov	rsi, r15
	mov	rdi, r12
	call	be_root_concat@PLT
	test	eax, eax
	jne	.L27
	mov	edx, DWORD PTR ZFS_TYPE_DATASET[rip]
	mov	edi, DWORD PTR [r12]
	mov	rsi, r14
	call	zfs_dataset_exists@PLT
	test	rax, rax
	je	.L33
	mov	edx, DWORD PTR ZFS_TYPE_DATASET[rip]
	mov	edi, DWORD PTR [r12]
	mov	rsi, rsp
	call	zfs_dataset_exists@PLT
	test	rax, rax
	jne	.L34
	mov	edx, DWORD PTR ZFS_TYPE_FILESYSTEM[rip]
	mov	edi, DWORD PTR [r12]
	mov	rsi, r14
	call	zfs_open@PLT
	mov	r14, rax
	test	rax, rax
	je	.L35
	xor	esi, esi
	mov	rdi, rax
	mov	ecx, 1
	mov	rdx, rsp
	call	zfs_rename@PLT
	mov	rdi, r14
	mov	r13d, eax
	call	zfs_close@PLT
	test	r13d, r13d
	jne	.L36
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L37
	lea	rsp, -32[rbp]
	mov	eax, r13d
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	esi, eax
	mov	rdi, r12
	call	set_error@PLT
	mov	r13d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	esi, DWORD PTR BE_ERR_UNKNOWN[rip]
.L26:
	mov	rdi, r12
	call	set_error@PLT
	mov	r13d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	mov	esi, DWORD PTR BE_ERR_NOENT[rip]
	mov	rdi, r12
	call	set_error@PLT
	mov	r13d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	esi, DWORD PTR BE_ERR_EXISTS[rip]
	mov	rdi, r12
	call	set_error@PLT
	mov	r13d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L35:
	mov	esi, DWORD PTR BE_ERR_ZFSOPEN[rip]
	mov	rdi, r12
	call	set_error@PLT
	mov	r13d, eax
	jmp	.L1
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	be_rename, .-be_rename
	.comm	ZFS_TYPE_FILESYSTEM,4,4
	.comm	ZFS_TYPE_DATASET,4,4
	.comm	BE_MAXPATHLEN,4,4
	.comm	BE_ERR_ZFSOPEN,4,4
	.comm	BE_ERR_UNKNOWN,4,4
	.comm	BE_ERR_NOENT,4,4
	.comm	BE_ERR_EXISTS,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_be.c_be_rename.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	be_rename
	.syntax unified
	.arm
	.fpu softvfp
	.type	be_rename, %function
be_rename:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #8
	mov	r5, r2
	ldr	r3, .L21
	ldr	r2, .L21+4
	ldr	r3, [r3]
	mov	r6, r1
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r1, r5
	mov	r7, sp
	sub	sp, sp, r3
	ldr	r2, [r2]
	str	r2, [fp, #-24]
	mov	r2,#0
	mov	r4, r0
	bl	be_validate_name
	subs	r1, r0, #0
	bne	.L15
	mov	r1, r6
	mov	r2, r7
	mov	r0, r4
	bl	be_root_concat
	subs	r1, r0, #0
	bne	.L15
	mov	r1, r5
	mov	r2, sp
	mov	r0, r4
	bl	be_root_concat
	subs	r1, r0, #0
	bne	.L15
	ldr	r5, .L21+8
	mov	r1, r7
	ldr	r2, [r5]
	ldr	r0, [r4]
	bl	zfs_dataset_exists
	cmp	r0, #0
	beq	.L17
	ldr	r2, [r5]
	mov	r1, sp
	ldr	r0, [r4]
	bl	zfs_dataset_exists
	subs	r5, r0, #0
	bne	.L18
	ldr	r3, .L21+12
	mov	r1, r7
	ldr	r2, [r3]
	ldr	r0, [r4]
	bl	zfs_open
	subs	r6, r0, #0
	beq	.L19
	mov	r1, r5
	mov	r3, #1
	mov	r2, sp
	bl	zfs_rename
	mov	r5, r0
	mov	r0, r6
	bl	zfs_close
	cmp	r5, #0
	beq	.L1
	ldr	r3, .L21+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	set_error
	mov	r5, r0
	b	.L1
.L15:
	mov	r0, r4
	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	.L20
	mov	r0, r5
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L17:
	ldr	r3, .L21+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	set_error
	mov	r5, r0
	b	.L1
.L18:
	ldr	r3, .L21+24
	mov	r0, r4
	ldr	r1, [r3]
	bl	set_error
	mov	r5, r0
	b	.L1
.L19:
	ldr	r3, .L21+28
	mov	r0, r4
	ldr	r1, [r3]
	bl	set_error
	mov	r5, r0
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	BE_MAXPATHLEN
	.word	.LC0
	.word	ZFS_TYPE_DATASET
	.word	ZFS_TYPE_FILESYSTEM
	.word	BE_ERR_UNKNOWN
	.word	BE_ERR_NOENT
	.word	BE_ERR_EXISTS
	.word	BE_ERR_ZFSOPEN
	.size	be_rename, .-be_rename
	.comm	ZFS_TYPE_FILESYSTEM,4,4
	.comm	ZFS_TYPE_DATASET,4,4
	.comm	BE_MAXPATHLEN,4,4
	.comm	BE_ERR_ZFSOPEN,4,4
	.comm	BE_ERR_UNKNOWN,4,4
	.comm	BE_ERR_NOENT,4,4
	.comm	BE_ERR_EXISTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
