	.file	"extr_alloc.c_ext2fs_alloc_range.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ext2fs_alloc_range
	.type	ext2fs_alloc_range, @function
ext2fs_alloc_range:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR EXT2_ET_MAGIC_EXT2FS_FILSYS[rip]
	mov	r15d, DWORD PTR EXT2_NEWRANGE_MIN_LENGTH[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	EXT2_CHECK_MAGIC@PLT
	test	r12d, r12d
	je	.L2
	mov	eax, DWORD PTR EXT2_ALLOCRANGE_ALL_FLAGS[rip]
	not	eax
	test	eax, ebx
	jne	.L2
	test	DWORD PTR EXT2_ALLOCRANGE_FIXED_GOAL[rip], ebx
	je	.L5
	or	r15d, DWORD PTR EXT2_NEWRANGE_FIXED_GOAL[rip]
.L5:
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	edx, r14d
	mov	r9, r13
	xor	r8d, r8d
	lea	rax, 12[rsp]
	mov	ecx, r12d
	mov	esi, r15d
	mov	edi, ebp
	push	rax
	.cfi_def_cfa_offset 96
	call	ext2fs_new_range@PLT
	mov	r14, rax
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	test	r14, r14
	jne	.L1
	cmp	DWORD PTR 4[rsp], r12d
	jl	.L21
	mov	esi, DWORD PTR 0[r13]
	test	DWORD PTR EXT2_ALLOCRANGE_ZERO_BLOCKS[rip], ebx
	je	.L7
	xor	r8d, r8d
	xor	ecx, ecx
	mov	edx, r12d
	mov	edi, ebp
	call	ext2fs_zero_blocks2@PLT
	test	rax, rax
	jne	.L9
	mov	esi, DWORD PTR 0[r13]
.L7:
	mov	ecx, 1
	mov	edx, r12d
	mov	edi, ebp
	call	ext2fs_block_alloc_stats_range@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r14, QWORD PTR EXT2_ET_INVALID_ARGUMENT[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	r14, QWORD PTR EXT2_ET_BLOCK_ALLOC_FAIL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r14, rax
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ext2fs_alloc_range, .-ext2fs_alloc_range
	.comm	EXT2_NEWRANGE_MIN_LENGTH,4,4
	.comm	EXT2_NEWRANGE_FIXED_GOAL,4,4
	.comm	EXT2_ET_MAGIC_EXT2FS_FILSYS,4,4
	.comm	EXT2_ET_INVALID_ARGUMENT,8,8
	.comm	EXT2_ET_BLOCK_ALLOC_FAIL,8,8
	.comm	EXT2_ALLOCRANGE_ZERO_BLOCKS,4,4
	.comm	EXT2_ALLOCRANGE_FIXED_GOAL,4,4
	.comm	EXT2_ALLOCRANGE_ALL_FLAGS,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_alloc.c_ext2fs_alloc_range.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ext2fs_alloc_range
	.syntax unified
	.arm
	.fpu softvfp
	.type	ext2fs_alloc_range, %function
ext2fs_alloc_range:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r3
	mov	r5, r1
	ldr	r1, .L23
	ldr	r3, .L23+4
	mov	r6, r2
	ldr	r2, .L23+8
	sub	sp, sp, #28
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	mov	r7, r0
	ldr	r9, [r3]
	ldr	r8, [sp, #56]
	bl	EXT2_CHECK_MAGIC
	cmp	r4, #0
	beq	.L2
	ldr	r3, .L23+12
	ldr	r3, [r3]
	bics	r3, r5, r3
	bne	.L2
	mov	r0, #0
	ldr	r3, .L23+16
	mov	r2, r6
	ldr	r3, [r3]
	tst	r5, r3
	ldrne	r3, .L23+20
	ldrne	r3, [r3]
	str	r0, [sp]
	orrne	r9, r9, r3
	add	r3, sp, #16
	str	r3, [sp, #8]
	mov	r1, r9
	mov	r3, r4
	mov	r0, r7
	str	r8, [sp, #4]
	bl	ext2fs_new_range
	subs	r6, r0, #0
	bne	.L1
	ldr	r3, [sp, #16]
	cmp	r3, r4
	blt	.L21
	ldr	r3, .L23+24
	ldr	r1, [r8]
	ldr	r3, [r3]
	tst	r5, r3
	beq	.L7
	mov	r3, r6
	str	r6, [sp]
	mov	r2, r4
	mov	r0, r7
	bl	ext2fs_zero_blocks2
	cmp	r0, #0
	movne	r6, r0
	bne	.L1
	ldr	r1, [r8]
.L7:
	mov	r2, r4
	mov	r0, r7
	mov	r3, #1
	bl	ext2fs_block_alloc_stats_range
	b	.L1
.L2:
	ldr	r3, .L23+28
	ldr	r6, [r3]
.L1:
	ldr	r3, .L23+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L21:
	ldr	r3, .L23+32
	ldr	r6, [r3]
	b	.L1
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	EXT2_ET_MAGIC_EXT2FS_FILSYS
	.word	EXT2_NEWRANGE_MIN_LENGTH
	.word	.LC0
	.word	EXT2_ALLOCRANGE_ALL_FLAGS
	.word	EXT2_ALLOCRANGE_FIXED_GOAL
	.word	EXT2_NEWRANGE_FIXED_GOAL
	.word	EXT2_ALLOCRANGE_ZERO_BLOCKS
	.word	EXT2_ET_INVALID_ARGUMENT
	.word	EXT2_ET_BLOCK_ALLOC_FAIL
	.size	ext2fs_alloc_range, .-ext2fs_alloc_range
	.comm	EXT2_NEWRANGE_MIN_LENGTH,4,4
	.comm	EXT2_NEWRANGE_FIXED_GOAL,4,4
	.comm	EXT2_ET_MAGIC_EXT2FS_FILSYS,4,4
	.comm	EXT2_ET_INVALID_ARGUMENT,4,4
	.comm	EXT2_ET_BLOCK_ALLOC_FAIL,4,4
	.comm	EXT2_ALLOCRANGE_ZERO_BLOCKS,4,4
	.comm	EXT2_ALLOCRANGE_FIXED_GOAL,4,4
	.comm	EXT2_ALLOCRANGE_ALL_FLAGS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
