	.file	"extr_dsl_deleg.c_copy_create_perms.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	copy_create_perms, @function
copy_create_perms:
.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, rdi
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 104
	mov	QWORD PTR -128[rbp], rdx
	mov	QWORD PTR -120[rbp], rcx
	mov	r14, rsp
	mov	QWORD PTR -136[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	r12, QWORD PTR [rax]
	call	dsl_dir_phys@PLT
	mov	rcx, rsp
	mov	r13, QWORD PTR [rax]
	movsx	rax, DWORD PTR ZFS_MAX_DELEG_NAME[rip]
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L4:
	cmp	QWORD PTR -128[rbp], 0
	mov	esi, DWORD PTR ZFS_DELEG_CREATE_SETS[rip]
	mov	rdi, rsp
	mov	QWORD PTR -144[rbp], rsp
	cmove	esi, DWORD PTR ZFS_DELEG_CREATE[rip]
	mov	edx, DWORD PTR ZFS_DELEG_LOCAL[rip]
	xor	ecx, ecx
	call	zfs_deleg_whokey@PLT
	lea	r9, -88[rbp]
	mov	rdx, rsp
	mov	rdi, r12
	mov	rsi, QWORD PTR -136[rbp]
	mov	r8d, 1
	mov	ecx, 8
	call	zap_lookup@PLT
	test	rax, rax
	jne	.L22
	test	r13, r13
	je	.L26
.L9:
	mov	r15, QWORD PTR -144[rbp]
	cmp	QWORD PTR -128[rbp], 0
	lea	rcx, -120[rbp]
	mov	esi, DWORD PTR ZFS_DELEG_USER_SETS[rip]
	mov	edx, DWORD PTR ZFS_DELEG_LOCAL[rip]
	cmove	esi, DWORD PTR ZFS_DELEG_USER[rip]
	mov	rdi, r15
	call	zfs_deleg_whokey@PLT
	lea	r9, -96[rbp]
	mov	rdx, r15
	mov	rsi, r13
	mov	r8d, 1
	mov	ecx, 8
	mov	rdi, r12
	mov	QWORD PTR -128[rbp], r9
	call	zap_lookup@PLT
	cmp	rax, QWORD PTR ENOENT[rip]
	je	.L27
.L12:
	mov	rdx, QWORD PTR -88[rbp]
	lea	r13, -100[rbp]
	mov	rsi, r12
	lea	r15, -68[rbp]
	mov	rdi, r13
	call	zap_cursor_init@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	xor	edi, edi
	cmp	DWORD PTR -68[rbp], 8
	mov	QWORD PTR -80[rbp], 0
	jne	.L14
	xor	edi, edi
	cmp	DWORD PTR -64[rbp], 1
	sete	dil
.L14:
	call	ASSERT@PLT
	sub	rsp, 8
	mov	edx, DWORD PTR -60[rbp]
	mov	rsi, QWORD PTR -96[rbp]
	push	rbx
	lea	r9, -80[rbp]
	mov	r8d, 1
	mov	ecx, 8
	mov	rdi, r12
	call	zap_update@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	VERIFY@PLT
	mov	rdi, r13
	call	zap_cursor_advance@PLT
	pop	rax
	pop	rdx
.L13:
	mov	rsi, r15
	mov	rdi, r13
	call	zap_cursor_retrieve@PLT
	test	rax, rax
	je	.L15
	mov	rdi, r13
	call	zap_cursor_fini@PLT
.L22:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	mov	rsp, r14
	jne	.L28
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	edi, DWORD PTR [r15]
	mov	rsi, rbx
	call	dmu_buf_will_dirty@PLT
	mov	edx, DWORD PTR DMU_OT_NONE[rip]
	mov	r8, rbx
	xor	ecx, ecx
	mov	esi, DWORD PTR DMU_OT_DSL_PERMS[rip]
	mov	rdi, r12
	call	zap_create@PLT
	mov	rdi, r15
	mov	r13, rax
	call	dsl_dir_phys@PLT
	mov	QWORD PTR [rax], r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L25:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edx, DWORD PTR DMU_OT_NONE[rip]
	xor	ecx, ecx
	mov	r8, rbx
	mov	rdi, r12
	mov	esi, DWORD PTR DMU_OT_DSL_PERMS[rip]
	call	zap_create@PLT
	sub	rsp, 8
	mov	r9, QWORD PTR -128[rbp]
	mov	rsi, r13
	mov	QWORD PTR -96[rbp], rax
	mov	rdx, QWORD PTR -144[rbp]
	mov	ecx, 8
	mov	rdi, r12
	push	rbx
	mov	r8d, 1
	call	zap_add@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	VERIFY@PLT
	pop	rcx
	pop	rsi
	jmp	.L12
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	copy_create_perms, .-copy_create_perms
	.comm	ZFS_MAX_DELEG_NAME,4,4
	.comm	ZFS_DELEG_USER_SETS,4,4
	.comm	ZFS_DELEG_USER,4,4
	.comm	ZFS_DELEG_LOCAL,4,4
	.comm	ZFS_DELEG_CREATE_SETS,4,4
	.comm	ZFS_DELEG_CREATE,4,4
	.comm	ENOENT,8,8
	.comm	DMU_OT_NONE,4,4
	.comm	DMU_OT_DSL_PERMS,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_dsl_deleg.c_copy_create_perms.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy_create_perms, %function
copy_create_perms:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #60
	mov	r6, r2
	ldr	ip, [r0, #4]
	str	r3, [fp, #-72]
	ldr	r3, .L20
	str	r2, [fp, #-76]
	ldr	r4, [ip]
	mov	r8, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r7, r0
	ldr	r5, [fp, #4]
	bl	dsl_dir_phys
	ldr	r3, .L20+4
	cmp	r6, #0
	ldr	r3, [r3]
	mov	r10, sp
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldrne	r3, .L20+8
	ldreq	r3, .L20+12
	add	r6, sp, #16
	ldr	r1, [r3]
	ldr	r3, .L20+16
	ldr	r9, [r0]
	ldr	r2, [r3]
	mov	r0, r6
	mov	r3, #0
	bl	zfs_deleg_whokey
	mov	r2, #1
	sub	r3, fp, #64
	stm	sp, {r2, r3}
	mov	r1, r8
	mov	r3, #8
	mov	r2, r6
	mov	r0, r4
	bl	zap_lookup
	cmp	r0, #0
	bne	.L15
	cmp	r9, #0
	beq	.L17
.L6:
	mov	r7, #1
	ldr	r3, [fp, #-76]
	mov	r0, r6
	cmp	r3, #0
	ldrne	r3, .L20+20
	ldreq	r3, .L20+24
	ldr	r1, [r3]
	ldr	r3, .L20+16
	ldr	r2, [r3]
	sub	r3, fp, #72
	bl	zfs_deleg_whokey
	sub	r3, fp, #68
	str	r3, [sp, #4]
	mov	r2, r6
	mov	r3, #8
	mov	r1, r9
	mov	r0, r4
	str	r7, [sp]
	bl	zap_lookup
	ldr	r3, .L20+28
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L18
.L9:
	mov	r1, r4
	ldr	r2, [fp, #-64]
	sub	r0, fp, #60
	bl	zap_cursor_init
	mov	r6, #1
	sub	r7, fp, #56
	b	.L10
.L12:
	ldr	r3, [fp, #-52]
	str	r0, [fp, #-56]
	cmp	r3, #8
	ldreq	r0, [fp, #-48]
	subeq	r0, r0, #1
	clzeq	r0, r0
	lsreq	r0, r0, #5
	bl	ASSERT
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-68]
	mov	r3, #8
	mov	r0, r4
	stm	sp, {r6, r7}
	str	r5, [sp, #8]
	bl	zap_update
	clz	r0, r0
	lsr	r0, r0, #5
	bl	VERIFY
	sub	r0, fp, #60
	bl	zap_cursor_advance
.L10:
	sub	r1, fp, #52
	sub	r0, fp, #60
	bl	zap_cursor_retrieve
	cmp	r0, #0
	beq	.L12
	sub	r0, fp, #60
	bl	zap_cursor_fini
.L15:
	ldr	r3, .L20
	mov	sp, r10
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	mov	r1, r5
	ldr	r0, [r7]
	bl	dmu_buf_will_dirty
	ldr	r3, .L20+32
	ldr	r2, .L20+36
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, r9
	mov	r0, r4
	str	r5, [sp]
	bl	zap_create
	mov	r9, r0
	mov	r0, r7
	bl	dsl_dir_phys
	str	r9, [r0]
	b	.L6
.L18:
	ldr	r3, .L20+32
	ldr	r2, .L20+36
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #0
	mov	r0, r4
	str	r5, [sp]
	bl	zap_create
	sub	r3, fp, #68
	str	r0, [fp, #-68]
	mov	r2, r6
	str	r3, [sp, #4]
	mov	r1, r9
	mov	r3, #8
	mov	r0, r4
	str	r5, [sp, #8]
	str	r7, [sp]
	bl	zap_add
	clz	r0, r0
	lsr	r0, r0, #5
	bl	VERIFY
	b	.L9
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	ZFS_MAX_DELEG_NAME
	.word	ZFS_DELEG_CREATE_SETS
	.word	ZFS_DELEG_CREATE
	.word	ZFS_DELEG_LOCAL
	.word	ZFS_DELEG_USER_SETS
	.word	ZFS_DELEG_USER
	.word	ENOENT
	.word	DMU_OT_DSL_PERMS
	.word	DMU_OT_NONE
	.size	copy_create_perms, .-copy_create_perms
	.comm	ZFS_MAX_DELEG_NAME,4,4
	.comm	ZFS_DELEG_USER_SETS,4,4
	.comm	ZFS_DELEG_USER,4,4
	.comm	ZFS_DELEG_LOCAL,4,4
	.comm	ZFS_DELEG_CREATE_SETS,4,4
	.comm	ZFS_DELEG_CREATE,4,4
	.comm	ENOENT,4,4
	.comm	DMU_OT_NONE,4,4
	.comm	DMU_OT_DSL_PERMS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
