	.file	"extr_dm-thin.c_alloc_data_block.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"dm_pool_get_free_block_count"
.LC1:
	.string	"dm_pool_alloc_data_block"
	.text
	.p2align 4
	.type	alloc_data_block, @function
alloc_data_block:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdi, rbp
	call	get_pool_mode@PLT
	xor	edi, edi
	cmp	QWORD PTR PM_WRITE[rip], rax
	setne	dil
	call	WARN_ON@PLT
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	lea	r14, 4[rsp]
	mov	rsi, r14
	call	dm_pool_get_free_block_count@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L12
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	call	check_low_water_mark@PLT
	mov	edx, DWORD PTR 4[rsp]
	test	edx, edx
	jne	.L5
	mov	rdi, rbp
	call	commit@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r14
	call	dm_pool_get_free_block_count@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L12
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	je	.L15
.L5:
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r13
	call	dm_pool_alloc_data_block@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edx, eax
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	metadata_operation_failed@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	metadata_operation_failed@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, DWORD PTR PM_OUT_OF_DATA_SPACE[rip]
	mov	rdi, rbp
	call	set_pool_mode@PLT
	mov	r12d, DWORD PTR ENOSPC[rip]
	neg	r12d
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	alloc_data_block, .-alloc_data_block
	.comm	PM_WRITE,8,8
	.comm	PM_OUT_OF_DATA_SPACE,4,4
	.comm	ENOSPC,4,4
	.comm	EINVAL,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_dm-thin.c_alloc_data_block.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"dm_pool_get_free_block_count\000"
	.align	2
.LC1:
	.ascii	"dm_pool_alloc_data_block\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alloc_data_block, %function
alloc_data_block:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, [r0]
	ldr	r3, .L16
	sub	sp, sp, #8
	mov	r0, r5
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	get_pool_mode
	ldr	r3, .L16+4
	ldr	r3, [r3]
	subs	r0, r3, r0
	movne	r0, #1
	bl	WARN_ON
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L16+8
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	mov	r1, sp
	ldr	r0, [r5]
	bl	dm_pool_get_free_block_count
	subs	r4, r0, #0
	bne	.L12
	mov	r0, r5
	ldr	r1, [sp]
	bl	check_low_water_mark
	ldr	r3, [sp]
	cmp	r3, #0
	bne	.L5
	mov	r0, r5
	bl	commit
	subs	r4, r0, #0
	bne	.L1
	mov	r1, sp
	ldr	r0, [r5]
	bl	dm_pool_get_free_block_count
	subs	r4, r0, #0
	bne	.L12
	ldr	r3, [sp]
	cmp	r3, #0
	beq	.L15
.L5:
	mov	r1, r6
	ldr	r0, [r5]
	bl	dm_pool_alloc_data_block
	subs	r4, r0, #0
	beq	.L1
	mov	r0, r5
	mov	r2, r4
	ldr	r1, .L16+12
	bl	metadata_operation_failed
	b	.L1
.L12:
	mov	r0, r5
	mov	r2, r4
	ldr	r1, .L16+16
	bl	metadata_operation_failed
	b	.L1
.L15:
	ldr	r3, .L16+20
	mov	r0, r5
	ldr	r1, [r3]
	bl	set_pool_mode
	ldr	r3, .L16+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC2
	.word	PM_WRITE
	.word	EINVAL
	.word	.LC1
	.word	.LC0
	.word	PM_OUT_OF_DATA_SPACE
	.word	ENOSPC
	.size	alloc_data_block, .-alloc_data_block
	.comm	PM_WRITE,4,4
	.comm	PM_OUT_OF_DATA_SPACE,4,4
	.comm	ENOSPC,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
