	.file	"extr_xfs_log.c_xlog_grant_add_space.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	xlog_grant_add_space, @function
xlog_grant_add_space:
.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
	mov	r13, rdi
	mov	rdi, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r15, 4[rsp]
	mov	r14, rsp
	call	atomic64_read@PLT
	mov	rbx, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	add	esi, ebp
	mov	edi, DWORD PTR [rsp]
	mov	DWORD PTR 4[rsp], esi
.L3:
	call	xlog_assign_grant_head_val@PLT
	mov	rsi, rbx
	mov	rdi, r12
	mov	rdx, rax
	call	atomic64_cmpxchg@PLT
	cmp	rbx, rax
	je	.L9
	mov	rbx, rax
.L4:
	mov	rsi, r14
	mov	rdx, r15
	mov	rdi, rbx
	call	xlog_crack_grant_head_val@PLT
	mov	esi, DWORD PTR 4[rsp]
	mov	eax, DWORD PTR 0[r13]
	sub	eax, esi
	cmp	eax, ebp
	jg	.L10
	mov	esi, ebp
	sub	esi, eax
	mov	eax, DWORD PTR [rsp]
	mov	DWORD PTR 4[rsp], esi
	lea	edi, 1[rax]
	mov	DWORD PTR [rsp], edi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	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
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	xlog_grant_add_space, .-xlog_grant_add_space
	.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_xfs_log.c_xlog_grant_add_space.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xlog_grant_add_space, %function
xlog_grant_add_space:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L10
	sub	sp, sp, #20
	mov	r7, r0
	mov	r0, r1
	mov	r6, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	atomic64_read
	mov	r4, r0
	b	.L4
.L6:
	mov	r4, r0
.L4:
	add	r2, sp, #8
	add	r1, sp, #4
	mov	r0, r4
	bl	xlog_crack_grant_head_val
	ldr	r3, [sp, #8]
	ldr	r1, [r7]
	sub	r1, r1, r3
	cmp	r1, r5
	ldrle	r0, [sp, #4]
	addgt	r1, r3, r5
	suble	r1, r5, r1
	addle	r0, r0, #1
	ldrgt	r0, [sp, #4]
	stmible	sp, {r0, r1}
	strgt	r1, [sp, #8]
	bl	xlog_assign_grant_head_val
	mov	r1, r4
	mov	r2, r0
	mov	r0, r6
	bl	atomic64_cmpxchg
	cmp	r4, r0
	bne	.L6
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.size	xlog_grant_add_space, .-xlog_grant_add_space
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
