	.file	"extr_extents.c_ext4_ext_find_goal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ext4_ext_find_goal, @function
ext4_ext_find_goal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	EXT4_I@PLT
	mov	edi, DWORD PTR [rbx]
	mov	r12, rax
	call	EXT4_SB@PLT
	mov	rdi, rax
	call	ext4_flex_bg_size@PLT
	test	rbp, rbp
	je	.L2
	movsx	rdx, DWORD PTR 0[rbp]
	lea	rdx, [rdx+rdx*2]
	lea	rdx, 0[rbp+rdx*8]
	mov	rbp, QWORD PTR 16[rdx]
	test	rbp, rbp
	jne	.L18
	mov	rdx, QWORD PTR 8[rdx]
	test	rdx, rdx
	je	.L2
	mov	r12, QWORD PTR [rdx]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rdi, rbp
	call	ext4_ext_pblock@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	r12, rax
	call	le32_to_cpu@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	sub	r13, rax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	add	r12, r13
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	DWORD PTR EXT4_FLEX_SIZE_DIR_ALLOC_SCHEME[rip], eax
	mov	ebp, DWORD PTR [r12]
	jle	.L19
.L5:
	mov	edi, DWORD PTR [rbx]
	call	EXT4_BLOCKS_PER_GROUP@PLT
	mov	edi, DWORD PTR [rbx]
	mov	r12d, eax
	call	EXT4_SB@PLT
	imul	r12d, ebp
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	movsx	r12, r12d
	call	le32_to_cpu@PLT
	mov	edi, DWORD PTR [rbx]
	add	r12, rax
	call	EXT4_SB@PLT
	mov	rdi, QWORD PTR [rax]
	call	ext4_blocks_count@PLT
	mov	esi, DWORD PTR DELALLOC[rip]
	mov	edi, DWORD PTR [rbx]
	mov	rbp, rax
	call	test_opt@PLT
	test	rax, rax
	jne	.L1
	mov	edi, DWORD PTR [rbx]
	sub	rbp, 1
	call	EXT4_BLOCKS_PER_GROUP@PLT
	movsx	rdx, eax
	mov	rax, QWORD PTR current[rip]
	add	rdx, r12
	mov	eax, DWORD PTR [rax]
	cmp	rdx, rbp
	jle	.L20
	cdq
	shr	edx, 28
	add	eax, edx
	and	eax, 15
	sub	eax, edx
	sub	rbp, r12
	lea	rdx, 15[rbp]
	cmovs	rbp, rdx
	sar	rbp, 4
	imul	eax, ebp
.L7:
	cdqe
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	add	r12, rax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	add	r12, r13
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	cdq
	mov	edi, DWORD PTR [rbx]
	shr	edx, 28
	add	eax, edx
	and	eax, 15
	sub	eax, edx
	mov	ebp, eax
	call	EXT4_BLOCKS_PER_GROUP@PLT
	mov	edx, eax
	lea	eax, 15[rax]
	test	edx, edx
	cmovns	eax, edx
	sar	eax, 4
	imul	eax, ebp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR 4[rbx]
	neg	eax
	and	ebp, eax
	call	S_ISREG@PLT
	cmp	rax, 1
	sbb	ebp, -1
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ext4_ext_find_goal, .-ext4_ext_find_goal
	.comm	current,8,8
	.comm	EXT4_FLEX_SIZE_DIR_ALLOC_SCHEME,4,4
	.comm	DELALLOC,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_extents.c_ext4_ext_find_goal.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ext4_ext_find_goal, %function
ext4_ext_find_goal:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r6, r2
	mov	r5, r0
	bl	EXT4_I
	mov	r7, r0
	ldr	r0, [r5]
	bl	EXT4_SB
	bl	ext4_flex_bg_size
	cmp	r4, #0
	beq	.L2
	ldr	r1, [r4]
	add	r1, r1, r1, lsl #1
	add	r4, r4, r1, lsl #2
	ldr	r8, [r4, #8]
	cmp	r8, #0
	bne	.L19
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L2
	ldr	r4, [r3]
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	mov	r0, r8
	bl	ext4_ext_pblock
	mov	r5, r0
	ldr	r0, [r8]
	bl	le32_to_cpu
	sub	r4, r6, r0
	add	r4, r4, r5
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L22
	ldr	r7, [r7]
	ldr	r3, [r3]
	cmp	r3, r0
	ble	.L20
.L5:
	ldr	r0, [r5]
	bl	EXT4_BLOCKS_PER_GROUP
	mov	r4, r0
	ldr	r0, [r5]
	bl	EXT4_SB
	ldr	r3, [r0]
	mul	r4, r7, r4
	ldr	r0, [r3]
	bl	le32_to_cpu
	mov	r2, r0
	ldr	r0, [r5]
	add	r4, r4, r2
	bl	EXT4_SB
	ldr	r0, [r0]
	bl	ext4_blocks_count
	ldr	r2, .L22+4
	mov	r7, r0
	ldr	r1, [r2]
	ldr	r0, [r5]
	bl	test_opt
	cmp	r0, #0
	bne	.L1
	ldr	r0, [r5]
	bl	EXT4_BLOCKS_PER_GROUP
	sub	r3, r7, #1
	add	r0, r0, r4
	cmp	r0, r3
	ble	.L21
	ldr	r2, .L22+8
	sub	r3, r3, r4
	ldr	r2, [r2]
	add	r7, r3, #15
	ldr	r2, [r2]
	rsbs	r1, r2, #0
	and	r1, r1, #15
	and	r2, r2, #15
	rsbpl	r2, r1, #0
	cmp	r3, #0
	movlt	r3, r7
	asr	r3, r3, #4
	mul	r3, r2, r3
.L7:
	add	r4, r3, r4
	add	r4, r4, r6
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	ldr	r3, .L22+8
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r3, [r3]
	rsbs	r2, r3, #0
	and	r2, r2, #15
	and	r5, r3, #15
	rsbpl	r5, r2, #0
	bl	EXT4_BLOCKS_PER_GROUP
	add	r3, r0, #15
	cmp	r0, #0
	movlt	r0, r3
	asr	r3, r0, #4
	mul	r3, r5, r3
	b	.L7
.L20:
	rsb	r3, r0, #0
	ldr	r0, [r5, #4]
	and	r7, r7, r3
	bl	S_ISREG
	cmp	r0, #0
	addne	r7, r7, #1
	b	.L5
.L23:
	.align	2
.L22:
	.word	EXT4_FLEX_SIZE_DIR_ALLOC_SCHEME
	.word	DELALLOC
	.word	current
	.size	ext4_ext_find_goal, .-ext4_ext_find_goal
	.comm	current,4,4
	.comm	EXT4_FLEX_SIZE_DIR_ALLOC_SCHEME,4,4
	.comm	DELALLOC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
