	.file	"extr_file.c_calc_max_reserv.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	calc_max_reserv, @function
calc_max_reserv:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15d, DWORD PTR [rsi]
	mov	QWORD PTR [rsp], rdx
	mov	QWORD PTR 8[rsp], rcx
	call	GFS2_SB@PLT
	mov	edi, ebx
	mov	r13, rax
	mov	eax, DWORD PTR [rax]
	lea	eax, -3[rax+rax*2]
	sub	edi, eax
	mov	r14d, edi
	cmp	edi, DWORD PTR 4[r13]
	jbe	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, DWORD PTR 12[r13]
	call	DIV_ROUND_UP@PLT
	mov	edi, eax
	sub	r14d, eax
	cmp	DWORD PTR 4[r13], eax
	jb	.L3
.L2:
	mov	rax, QWORD PTR [rsp]
	sub	ebx, r14d
	lea	edx, -3[r14]
	mov	DWORD PTR [rax], r14d
	mov	rax, QWORD PTR 8[rsp]
	mov	DWORD PTR [rax], ebx
	mov	ecx, DWORD PTR 8[r13]
	sal	edx, cl
	cmp	edx, r15d
	jg	.L4
	mov	DWORD PTR 0[rbp], edx
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L4:
	.cfi_restore_state
	mov	DWORD PTR 0[rbp], r15d
	mov	rcx, QWORD PTR 8[rsp]
	mov	esi, r15d
	mov	rdi, r12
	mov	rdx, QWORD PTR [rsp]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	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
	jmp	gfs2_write_calc_reserv@PLT
	.cfi_endproc
.LFE0:
	.size	calc_max_reserv, .-calc_max_reserv
	.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_file.c_calc_max_reserv.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_max_reserv, %function
calc_max_reserv:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #4
	mov	r6, r2
	mov	r7, r3
	ldr	r4, [sp, #40]
	mov	r5, r1
	mov	r8, r0
	ldr	r9, [r1]
	bl	GFS2_SB
	ldr	r3, [r0]
	ldr	r2, [r0, #4]
	sub	r3, r3, #1
	mov	r10, r0
	add	r0, r3, r3, lsl #1
	sub	r0, r4, r0
	cmp	r0, r2
	mov	fp, r0
	bls	.L2
.L3:
	ldr	r1, [r10, #12]
	bl	DIV_ROUND_UP
	ldr	r3, [r10, #4]
	sub	fp, fp, r0
	cmp	r3, r0
	bcc	.L3
.L2:
	sub	r4, r4, fp
	str	fp, [r6]
	str	r4, [r7]
	ldr	r3, [r10, #8]
	sub	fp, fp, #3
	cmp	r9, fp, lsl r3
	lsl	fp, fp, r3
	blt	.L4
	str	fp, [r5]
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r3, r7
	mov	r2, r6
	mov	r1, r9
	mov	r0, r8
	str	r9, [r5]
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	gfs2_write_calc_reserv
	.size	calc_max_reserv, .-calc_max_reserv
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
