	.file	"extr_dsl_dataset.c_dsl_dataset_snapshot_reserve_space.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dsl_dataset_snapshot_reserve_space, @function
dsl_dataset_snapshot_reserve_space:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, rsi
	call	dmu_tx_is_syncing@PLT
	test	eax, eax
	je	.L1
	cmp	QWORD PTR [rbx], 0
	mov	edi, 1
	jne	.L10
.L4:
	call	ASSERT@PLT
	mov	rdi, rbx
	mov	rbp, QWORD PTR [rbx]
	call	dsl_dataset_phys@PLT
	mov	edi, DWORD PTR [rax]
	mov	rsi, rbp
	call	MIN@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR TRUE[rip]
	xor	edx, edx
	xor	esi, esi
	mov	rbp, rax
	call	dsl_dir_space_available@PLT
	cmp	rax, rbp
	jl	.L11
	test	rbp, rbp
	jg	.L12
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbx]
	mov	rdx, r12
	mov	rsi, rbp
	call	dsl_dir_willuse_space@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbx
	call	DS_UNIQUE_IS_ACCURATE@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, DWORD PTR ENOSPC[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	SET_ERROR@PLT
	.cfi_endproc
.LFE0:
	.size	dsl_dataset_snapshot_reserve_space, .-dsl_dataset_snapshot_reserve_space
	.comm	TRUE,4,4
	.comm	ENOSPC,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_dataset.c_dsl_dataset_snapshot_reserve_space.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dsl_dataset_snapshot_reserve_space, %function
dsl_dataset_snapshot_reserve_space:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r0, r1
	mov	r6, r1
	bl	dmu_tx_is_syncing
	cmp	r0, #0
	beq	.L1
	ldr	r3, [r4]
	cmp	r3, #0
	moveq	r0, #1
	bne	.L10
.L4:
	bl	ASSERT
	mov	r0, r4
	bl	dsl_dataset_phys
	ldr	r1, [r4]
	ldr	r0, [r0]
	bl	MIN
	mov	r2, #0
	ldr	r3, .L13
	mov	r5, r0
	mov	r1, r2
	ldr	r3, [r3]
	ldr	r0, [r4, #4]
	bl	dsl_dir_space_available
	cmp	r0, r5
	blt	.L11
	cmp	r5, #0
	bgt	.L12
.L1:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L12:
	mov	r2, r6
	mov	r1, r5
	ldr	r0, [r4, #4]
	bl	dsl_dir_willuse_space
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L10:
	mov	r0, r4
	bl	DS_UNIQUE_IS_ACCURATE
	subs	r0, r0, #0
	movne	r0, #1
	b	.L4
.L11:
	ldr	r3, .L13+4
	pop	{r4, r5, r6, lr}
	ldr	r0, [r3]
	b	SET_ERROR
.L14:
	.align	2
.L13:
	.word	TRUE
	.word	ENOSPC
	.size	dsl_dataset_snapshot_reserve_space, .-dsl_dataset_snapshot_reserve_space
	.comm	TRUE,4,4
	.comm	ENOSPC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
