	.file	"extr_free-space-cache.c_do_trimming.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	do_trimming, @function
do_trimming:
.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
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rbp, QWORD PTR 32[rdi]
	mov	rbx, QWORD PTR 24[rdi]
	mov	rax, QWORD PTR 128[rsp]
	mov	r15, QWORD PTR 16[rdi]
	mov	QWORD PTR 32[rsp], rsi
	mov	QWORD PTR 8[rsp], rdx
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], r8
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 48[rsp], 0
	call	spin_lock@PLT
	mov	rdi, r14
	call	spin_lock@PLT
	cmp	QWORD PTR 8[r14], 0
	jne	.L2
	add	DWORD PTR 4[r14], r12d
	mov	rdi, r14
	add	DWORD PTR 4[rbp], r12d
	mov	DWORD PTR 44[rsp], r12d
	call	spin_unlock@PLT
	mov	rdi, rbp
	call	spin_unlock@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdx, r13
	mov	rdi, rbx
	lea	rcx, 48[rsp]
	call	btrfs_discard_extent@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L12
	mov	rbx, QWORD PTR 32[rsp]
	mov	rax, QWORD PTR 48[rsp]
	add	QWORD PTR [rbx], rax
.L12:
	mov	rdi, r15
	call	mutex_lock@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdx, r12
	mov	rdi, r14
	call	btrfs_add_free_space@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	list_del@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	rdi, rbp
	call	spin_lock@PLT
	mov	rdi, r14
	call	spin_lock@PLT
	cmp	QWORD PTR 8[r14], 0
	je	.L5
	mov	eax, DWORD PTR 44[rsp]
	add	DWORD PTR 8[rbp], eax
.L5:
	mov	eax, DWORD PTR 44[rsp]
	sub	DWORD PTR 4[r14], eax
	mov	rdi, r14
	sub	DWORD PTR 4[rbp], eax
	call	spin_unlock@PLT
	mov	rdi, rbp
	call	spin_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r14
	call	spin_unlock@PLT
	mov	rdi, rbp
	call	spin_unlock@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdx, r13
	mov	rdi, rbx
	lea	rcx, 48[rsp]
	call	btrfs_discard_extent@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L15
.L13:
	mov	rdi, r15
	call	mutex_lock@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdx, r12
	mov	rdi, r14
	call	btrfs_add_free_space@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	list_del@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L15:
	.cfi_restore_state
	mov	rbx, QWORD PTR 32[rsp]
	mov	rax, QWORD PTR 48[rsp]
	add	QWORD PTR [rbx], rax
	jmp	.L13
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	do_trimming, .-do_trimming
	.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_do_trimming.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_trimming, %function
do_trimming:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	ip, #0
	mov	r4, r0
	ldr	r5, [r0, #20]
	sub	sp, sp, #20
	mov	r7, r3
	ldr	r3, .L20
	str	r1, [sp, #4]
	mov	r0, r5
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r6, r2
	str	ip, [sp, #8]
	ldr	r10, [r4, #16]
	ldr	r9, [r4, #12]
	ldr	r8, [sp, #60]
	ldr	fp, [sp, #64]
	bl	spin_lock
	mov	r0, r4
	bl	spin_lock
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L2
	ldr	r2, [r4, #4]
	ldr	r3, [r5, #4]
	add	r2, r2, r8
	add	r3, r3, r8
	str	r2, [r4, #4]
	mov	r0, r4
	str	r3, [r5, #4]
	bl	spin_unlock
	mov	r0, r5
	bl	spin_unlock
	mov	r1, r6
	mov	r2, r7
	mov	r0, r10
	add	r3, sp, #8
	bl	btrfs_discard_extent
	subs	r6, r0, #0
	beq	.L3
	mov	r0, r9
.L15:
	bl	mutex_lock
	mov	r2, r8
	ldr	r1, [sp, #56]
	mov	r0, r4
	bl	btrfs_add_free_space
	mov	r0, fp
	bl	list_del
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r5
	bl	spin_lock
	mov	r0, r4
	bl	spin_lock
	ldr	r3, [r4, #8]
	ldr	r2, [r4, #4]
	cmp	r3, #0
	ldrne	r3, [r5, #8]
	sub	r2, r2, r8
	addne	r3, r3, r8
	strne	r3, [r5, #8]
	ldr	r3, [r5, #4]
	mov	r0, r4
	sub	r8, r3, r8
	str	r2, [r4, #4]
	str	r8, [r5, #4]
	bl	spin_unlock
	mov	r0, r5
	bl	spin_unlock
	b	.L1
.L2:
	mov	r0, r4
	bl	spin_unlock
	mov	r0, r5
	bl	spin_unlock
	mov	r1, r6
	mov	r2, r7
	mov	r0, r10
	add	r3, sp, #8
	bl	btrfs_discard_extent
	subs	r6, r0, #0
	movne	r0, r9
	beq	.L18
.L16:
	bl	mutex_lock
	mov	r2, r8
	ldr	r1, [sp, #56]
	mov	r0, r4
	bl	btrfs_add_free_space
	mov	r0, fp
	bl	list_del
	mov	r0, r9
	bl	mutex_unlock
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r1, [sp, #4]
	ldr	r2, [sp, #8]
	ldr	r3, [r1]
	mov	r0, r9
	add	r3, r3, r2
	str	r3, [r1]
	b	.L16
.L3:
	ldr	r1, [sp, #4]
	ldr	r2, [sp, #8]
	ldr	r3, [r1]
	mov	r0, r9
	add	r3, r3, r2
	str	r3, [r1]
	b	.L15
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.size	do_trimming, .-do_trimming
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
