	.file	"extr_xattr.c_ocfs2_lock_reflink_xattr_rec_allocators.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ocfs2_lock_reflink_xattr_rec_allocators, @function
ocfs2_lock_reflink_xattr_rec_allocators:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR 128[rsp]
	mov	QWORD PTR 8[rsp], r9
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	rax, QWORD PTR 8[rax]
	mov	edi, DWORD PTR [rax]
	call	OCFS2_SB@PLT
	lea	r8, 32[rsp]
	mov	edx, 16
	xor	esi, esi
	mov	rdi, r8
	mov	QWORD PTR [rsp], r8
	mov	rbp, rax
	call	memset@PLT
	mov	rax, QWORD PTR [r15]
	mov	r8, QWORD PTR [rsp]
	mov	esi, r12d
	mov	ecx, DWORD PTR ocfs2_calc_value_tree_metas[rip]
	mov	edx, r13d
	mov	rdi, QWORD PTR 8[rax]
	call	ocfs2_iterate_xattr_buckets@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L25
	mov	eax, DWORD PTR 32[rsp]
	mov	ecx, DWORD PTR 36[rsp]
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR [r15]
	mov	edi, DWORD PTR 0[rbp]
	mov	DWORD PTR 20[rsp], ecx
	mov	rax, QWORD PTR [rax]
	mov	r15, QWORD PTR [rax]
	call	ocfs2_refcount_recs_per_rb@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	DWORD PTR [rsp], eax
	call	ocfs2_refcount_recs_per_rb@PLT
	mov	edx, DWORD PTR [rsp]
	mov	ecx, DWORD PTR 20[rsp]
	mov	r8d, eax
	lea	eax, -1[rcx+rdx]
	cdq
	idiv	r8d
	add	eax, eax
	movsx	rdx, eax
	add	QWORD PTR 40[rsp], rdx
	mov	edx, DWORD PTR OCFS2_EXPAND_REFCOUNT_TREE_CREDITS[rip]
	mov	DWORD PTR 36[rsp], eax
	imul	edx, eax
	add	eax, edx
	add	DWORD PTR [rbx], eax
	mov	edi, DWORD PTR 8[r15]
	call	le32_to_cpu@PLT
	test	DWORD PTR OCFS2_REFCOUNT_TREE_FL[rip], eax
	jne	.L26
	add	DWORD PTR [rbx], 1
.L5:
	mov	rdi, r14
	call	ocfs2_num_free_extents@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L27
	mov	esi, DWORD PTR [r14]
	cmp	r13d, eax
	jg	.L28
	mov	edi, DWORD PTR 0[rbp]
	call	ocfs2_calc_extend_credits@PLT
	mov	rsi, QWORD PTR 40[rsp]
	add	DWORD PTR [rbx], eax
	test	rsi, rsi
	jne	.L29
.L11:
	test	r13d, r13d
	jne	.L12
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L30
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L26:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[r15]
	call	le16_to_cpu@PLT
	mov	edi, DWORD PTR [r15]
	mov	DWORD PTR [rsp], eax
	call	le16_to_cpu@PLT
	imul	eax, DWORD PTR [rsp]
	add	eax, 1
	add	DWORD PTR [rbx], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, eax
	call	mlog_errno@PLT
.L3:
	mov	rax, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rax]
	test	rdi, rdi
	je	.L1
	call	ocfs2_free_alloc_context@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, esi
	call	ocfs2_extend_meta_needed@PLT
	mov	esi, DWORD PTR [r14]
	mov	edi, DWORD PTR 0[rbp]
	add	QWORD PTR 40[rsp], rax
	call	ocfs2_calc_extend_credits@PLT
	mov	rsi, QWORD PTR 40[rsp]
	add	DWORD PTR [rbx], eax
	test	rsi, rsi
	jne	.L8
.L12:
	mov	rdx, QWORD PTR 24[rsp]
	mov	esi, r13d
	mov	rdi, rbp
	call	ocfs2_reserve_clusters@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L1
.L9:
	mov	edi, ebx
	mov	r12d, ebx
	call	mlog_errno@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdx, QWORD PTR 8[rsp]
	mov	rdi, rbp
	call	ocfs2_reserve_new_metadata_blocks@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L11
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, eax
	mov	r12d, r15d
	call	mlog_errno@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, QWORD PTR 8[rsp]
	mov	rdi, rbp
	call	ocfs2_reserve_new_metadata_blocks@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L12
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ocfs2_lock_reflink_xattr_rec_allocators, .-ocfs2_lock_reflink_xattr_rec_allocators
	.comm	ocfs2_calc_value_tree_metas,4,4
	.comm	OCFS2_REFCOUNT_TREE_FL,4,4
	.comm	OCFS2_EXPAND_REFCOUNT_TREE_CREDITS,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_xattr.c_ocfs2_lock_reflink_xattr_rec_allocators.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ocfs2_lock_reflink_xattr_rec_allocators, %function
ocfs2_lock_reflink_xattr_rec_allocators:
	@ args = 12, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r0, [r0]
	mov	r8, r3
	ldr	r3, .L31
	sub	sp, sp, #36
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r3, [sp, #80]
	ldr	r0, [r0]
	mov	r7, r2
	mov	r9, r1
	str	r3, [sp, #12]
	ldr	r5, [sp, #72]
	ldr	r10, [sp, #76]
	bl	OCFS2_SB
	mov	r2, #0
	ldr	r1, [r4]
	ldr	ip, .L31+4
	str	r2, [sp, #16]
	str	r2, [sp, #20]
	str	r2, [sp, #24]
	add	r3, sp, #16
	mov	r6, r0
	mov	r2, r8
	ldr	r0, [r1, #4]
	mov	r1, r7
	str	r3, [sp]
	ldr	r3, [ip]
	bl	ocfs2_iterate_xattr_buckets
	subs	r7, r0, #0
	bne	.L26
	ldr	r3, [r4]
	ldr	r2, [sp, #16]
	ldr	r3, [r3]
	str	r2, [r5]
	ldr	r0, [r6]
	ldr	r4, [r3]
	ldr	fp, [sp, #20]
	bl	ocfs2_refcount_recs_per_rb
	mov	r2, r0
	ldr	r0, [r6]
	str	r2, [sp, #8]
	bl	ocfs2_refcount_recs_per_rb
	ldr	r2, [sp, #8]
	mov	r1, r0
	add	r0, fp, r2
	sub	r0, r0, #1
	bl	__aeabi_idiv
	ldr	r2, .L31+8
	lsl	r3, r0, #1
	ldr	r2, [r2]
	ldr	r1, [r5]
	mla	r2, r3, r2, r3
	add	r1, r1, r2
	ldr	r2, [sp, #24]
	str	r1, [r5]
	add	r2, r2, r3
	ldr	r0, [r4, #8]
	str	r3, [sp, #20]
	str	r2, [sp, #24]
	bl	le32_to_cpu
	ldr	r3, .L31+12
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L27
	ldr	r3, [r5]
	add	r3, r3, #1
	str	r3, [r5]
.L5:
	mov	r0, r9
	bl	ocfs2_num_free_extents
	subs	r4, r0, #0
	blt	.L24
	cmp	r8, r4
	ldr	r1, [r9]
	bgt	.L28
	ldr	r0, [r6]
	bl	ocfs2_calc_extend_credits
	ldr	r3, [r5]
	ldr	r1, [sp, #24]
	add	r3, r3, r0
	cmp	r1, #0
	str	r3, [r5]
	bne	.L29
.L11:
	cmp	r8, #0
	bne	.L12
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L30
	mov	r0, r7
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	ldr	r0, [r4, #4]
	bl	le16_to_cpu
	mov	r3, r0
	ldr	r0, [r4]
	mov	r4, r3
	bl	le16_to_cpu
	mul	r4, r0, r4
	ldr	r3, [r5]
	add	r4, r4, #1
	add	r4, r3, r4
	str	r4, [r5]
	b	.L5
.L26:
	bl	mlog_errno
.L3:
	ldr	r0, [r10]
	cmp	r0, #0
	beq	.L1
	bl	ocfs2_free_alloc_context
	mov	r3, #0
	str	r3, [r10]
	b	.L1
.L8:
	mov	r2, r10
	mov	r0, r6
	bl	ocfs2_reserve_new_metadata_blocks
	subs	r4, r0, #0
	beq	.L12
.L15:
	mov	r0, r4
.L24:
	bl	mlog_errno
	mov	r7, r4
	b	.L3
.L28:
	mov	r0, r1
	bl	ocfs2_extend_meta_needed
	ldr	r3, [sp, #24]
	ldr	r1, [r9]
	add	r3, r3, r0
	ldr	r0, [r6]
	str	r3, [sp, #24]
	bl	ocfs2_calc_extend_credits
	ldr	r3, [r5]
	ldr	r1, [sp, #24]
	add	r3, r3, r0
	cmp	r1, #0
	str	r3, [r5]
	bne	.L8
.L12:
	mov	r1, r8
	mov	r0, r6
	ldr	r2, [sp, #12]
	bl	ocfs2_reserve_clusters
	subs	r4, r0, #0
	beq	.L1
	b	.L24
.L29:
	mov	r2, r10
	mov	r0, r6
	bl	ocfs2_reserve_new_metadata_blocks
	subs	r4, r0, #0
	beq	.L11
	b	.L15
.L30:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC0
	.word	ocfs2_calc_value_tree_metas
	.word	OCFS2_EXPAND_REFCOUNT_TREE_CREDITS
	.word	OCFS2_REFCOUNT_TREE_FL
	.size	ocfs2_lock_reflink_xattr_rec_allocators, .-ocfs2_lock_reflink_xattr_rec_allocators
	.comm	ocfs2_calc_value_tree_metas,4,4
	.comm	OCFS2_REFCOUNT_TREE_FL,4,4
	.comm	OCFS2_EXPAND_REFCOUNT_TREE_CREDITS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
