	.file	"extr_free-space-cache.c_btrfs_find_space_for_alloc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	btrfs_find_space_for_alloc
	.type	btrfs_find_space_for_alloc, @function
btrfs_find_space_for_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	add	rcx, rdx
	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, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r15, QWORD PTR 8[rdi]
	mov	QWORD PTR 8[rsp], rsi
	mov	rdi, r15
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], rcx
	call	spin_lock@PLT
	mov	ecx, DWORD PTR 4[rbx]
	lea	rdx, 16[rsp]
	mov	r8, rbp
	lea	rsi, 8[rsp]
	mov	rdi, r15
	call	find_free_space@PLT
	test	rax, rax
	je	.L15
	cmp	QWORD PTR 16[rax], 0
	mov	r13, QWORD PTR 8[rsp]
	mov	rbp, rax
	jne	.L16
	mov	rsi, rax
	mov	rdi, r15
	call	unlink_free_space@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR 8[rbp]
	xor	edi, edi
	mov	r14, rax
	add	rax, r12
	mov	QWORD PTR [rsp], rsi
	sub	r14, rsi
	mov	QWORD PTR 8[rbp], rax
	add	r12, r14
	cmp	QWORD PTR 0[rbp], r12
	setl	dil
	call	WARN_ON@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, rbp
	sub	rax, r12
	mov	QWORD PTR 0[rbp], rax
	jne	.L6
	mov	edi, DWORD PTR btrfs_free_space_cachep[rip]
	call	kmem_cache_free@PLT
.L7:
	mov	rdi, r15
	call	spin_unlock@PLT
	test	r14, r14
	je	.L1
	mov	rdx, QWORD PTR [rsp]
	mov	edi, DWORD PTR [rbx]
	mov	rcx, r14
	mov	rsi, r15
	call	__btrfs_add_free_space@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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
.L16:
	.cfi_restore_state
	mov	rcx, r12
	mov	rdx, r13
	mov	rsi, rax
	mov	rdi, r15
	call	bitmap_clear_bits@PLT
	cmp	QWORD PTR 0[rbp], 0
	je	.L5
.L13:
	mov	rdi, r15
	call	spin_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r15
	call	link_free_space@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, r15
	xor	r13d, r13d
	call	spin_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, rbp
	mov	rdi, r15
	call	free_bitmap@PLT
	jmp	.L13
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	btrfs_find_space_for_alloc, .-btrfs_find_space_for_alloc
	.comm	btrfs_free_space_cachep,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_free-space-cache.c_btrfs_find_space_for_alloc.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	btrfs_find_space_for_alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	btrfs_find_space_for_alloc, %function
btrfs_find_space_for_alloc:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r0
	sub	sp, sp, #24
	add	r3, r2, r3
	ldr	r6, [r0, #8]
	ldr	r4, [sp, #56]
	str	r3, [sp, #16]
	ldr	r3, .L18
	str	r1, [sp, #12]
	mov	r0, r6
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	spin_lock
	str	r4, [sp]
	mov	r0, r6
	ldr	r3, [r7, #4]
	add	r2, sp, #16
	add	r1, sp, #12
	bl	find_free_space
	subs	r4, r0, #0
	beq	.L15
	ldr	r3, [r4, #8]
	ldr	r8, [sp, #12]
	cmp	r3, #0
	bne	.L16
	mov	r1, r4
	mov	r0, r6
	bl	unlink_free_space
	ldm	r4, {r0, r10}
	ldr	r3, [sp, #12]
	sub	r9, r3, r10
	add	r3, r3, r5
	add	r5, r5, r9
	cmp	r0, r5
	movge	r0, #0
	movlt	r0, #1
	str	r3, [r4, #4]
	bl	WARN_ON
	ldr	r2, [r4]
	sub	r5, r2, r5
	cmp	r5, #0
	str	r5, [r4]
	bne	.L6
	ldr	r3, .L18+4
	mov	r1, r4
	ldr	r0, [r3]
	bl	kmem_cache_free
.L7:
	mov	r0, r6
	bl	spin_unlock
	cmp	r9, #0
	beq	.L1
	mov	r3, r9
	mov	r2, r10
	mov	r1, r6
	ldr	r0, [r7]
	bl	__btrfs_add_free_space
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r8
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	mov	r3, r5
	mov	r2, r8
	mov	r1, r4
	mov	r0, r6
	bl	bitmap_clear_bits
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L5
.L13:
	mov	r0, r6
	bl	spin_unlock
	b	.L1
.L6:
	mov	r1, r4
	mov	r0, r6
	bl	link_free_space
	b	.L7
.L15:
	mov	r0, r6
	bl	spin_unlock
	mov	r8, r4
	b	.L1
.L5:
	mov	r1, r4
	mov	r0, r6
	bl	free_bitmap
	b	.L13
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	btrfs_free_space_cachep
	.size	btrfs_find_space_for_alloc, .-btrfs_find_space_for_alloc
	.comm	btrfs_free_space_cachep,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
