	.file	"extr_block-group.c_cache_save_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cache_save_setup, @function
cache_save_setup:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 40[rdi]
	mov	DWORD PTR 44[rsp], 0
	mov	QWORD PTR 48[rsp], 0
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rsp], rax
	imul	eax, DWORD PTR SZ_1M[rip], 100
	cmp	DWORD PTR 28[rdi], eax
	jl	.L41
	xor	r15d, r15d
	cmp	QWORD PTR 16[rsi], 0
	mov	r13, rsi
	jne	.L1
	mov	eax, DWORD PTR BTRFS_DC_ERROR[rip]
	mov	r12, rdx
	xor	ebp, ebp
	mov	DWORD PTR 12[rsp], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L45:
	mov	edi, ebp
	add	ebp, 1
	call	BUG_ON@PLT
	cmp	QWORD PTR 32[rbx], 0
	jne	.L42
	mov	rdx, r12
	mov	rsi, rbx
	mov	rdi, r13
	call	create_free_space_inode@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L43
.L4:
	mov	rdi, rbx
	mov	rsi, r12
	call	lookup_free_space_inode@PLT
	mov	rdi, rax
	mov	r14, rax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L5
	mov	rdi, r14
	call	PTR_ERR@PLT
	add	eax, DWORD PTR ENOENT[rip]
	jne	.L44
.L5:
	mov	rdi, r14
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L45
	mov	rdi, r14
	lea	rbp, 24[rbx]
	call	BTRFS_I@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdx, r14
	mov	rdi, r13
	mov	QWORD PTR [rax], 0
	call	btrfs_update_inode@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L46
	xor	edi, edi
	call	WARN_ON@PLT
	mov	rax, QWORD PTR 0[r13]
	cmp	QWORD PTR 8[rbx], rax
	je	.L47
.L13:
	mov	rdi, r14
	call	i_size_read@PLT
	test	rax, rax
	jle	.L17
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, rsi
	call	btrfs_check_trunc_cache_free_space@PLT
	mov	r15d, eax
	test	eax, eax
	je	.L48
.L12:
	mov	rdi, r14
	call	iput@PLT
.L10:
	mov	rdi, r12
	call	btrfs_release_path@PLT
.L6:
	mov	rdi, rbp
	call	spin_lock@PLT
	test	r15d, r15d
	je	.L9
.L21:
	mov	eax, DWORD PTR 12[rsp]
	mov	rdi, rbp
	mov	DWORD PTR [rbx], eax
	call	spin_unlock@PLT
	mov	rdi, QWORD PTR 48[rsp]
	call	extent_changeset_free@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L49
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L41:
	.cfi_restore_state
	lea	rbp, 24[rdi]
	xor	r15d, r15d
	mov	rdi, rbp
	call	spin_lock@PLT
	mov	rax, QWORD PTR BTRFS_DC_WRITTEN[rip]
	mov	rdi, rbp
	mov	DWORD PTR [rbx], eax
	call	spin_unlock@PLT
	jmp	.L1
.L48:
	mov	rdx, r14
	xor	esi, esi
	mov	rdi, r13
	call	btrfs_truncate_free_space_cache@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L12
.L17:
	mov	rdi, rbp
	call	spin_lock@PLT
	mov	rax, QWORD PTR BTRFS_CACHE_FINISHED[rip]
	cmp	QWORD PTR 16[rbx], rax
	je	.L50
.L15:
	mov	eax, DWORD PTR BTRFS_DC_WRITTEN[rip]
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], eax
	call	spin_unlock@PLT
.L38:
	mov	rdi, r14
	call	iput@PLT
	mov	rdi, r12
	call	btrfs_release_path@PLT
	mov	rdi, rbp
	call	spin_lock@PLT
.L9:
	mov	eax, DWORD PTR 12[rsp]
	xor	r15d, r15d
	cmp	DWORD PTR BTRFS_DC_SETUP[rip], eax
	jne	.L21
	mov	rax, QWORD PTR 0[r13]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rdi, r12
	lea	rbp, 24[rbx]
	call	btrfs_release_path@PLT
	mov	rdi, rbp
	call	spin_lock@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	lea	rbp, 24[rbx]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L44:
	mov	rdi, r14
	lea	rbp, 24[rbx]
	call	PTR_ERR@PLT
	mov	rdi, r12
	mov	r15d, eax
	call	btrfs_release_path@PLT
	jmp	.L6
.L46:
	mov	esi, eax
	mov	rdi, r13
	call	btrfs_abort_transaction@PLT
	jmp	.L12
.L50:
	mov	esi, DWORD PTR SPACE_CACHE[rip]
	mov	rdi, QWORD PTR 24[rsp]
	call	btrfs_test_opt@PLT
	test	eax, eax
	je	.L15
	mov	rdi, rbp
	call	spin_unlock@PLT
	mov	rsi, QWORD PTR 8[r13]
	mov	edi, DWORD PTR BTRFS_TRANS_CACHE_ENOSPC[rip]
	call	test_bit@PLT
	test	rax, rax
	je	.L18
	mov	r15d, DWORD PTR ENOSPC[rip]
	neg	r15d
	jmp	.L12
.L47:
	mov	rdi, r14
	call	i_size_read@PLT
	test	rax, rax
	je	.L13
.L39:
	mov	eax, DWORD PTR BTRFS_DC_SETUP[rip]
	mov	DWORD PTR 12[rsp], eax
	jmp	.L38
.L18:
	mov	edi, DWORD PTR 28[rbx]
	mov	esi, DWORD PTR SZ_256M[rip]
	call	div_u64@PLT
	mov	edx, 1
	lea	rsi, 48[rsp]
	mov	rdi, r14
	test	eax, eax
	cmove	eax, edx
	imul	eax, DWORD PTR PAGE_SIZE[rip]
	xor	edx, edx
	sal	eax, 4
	mov	ecx, eax
	mov	DWORD PTR 16[rsp], eax
	call	btrfs_check_data_free_space@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L12
	lea	rax, 44[rsp]
	xor	edx, edx
	xor	ecx, ecx
	mov	rsi, r13
	push	rax
	.cfi_def_cfa_offset 136
	mov	r8d, DWORD PTR 24[rsp]
	mov	rdi, r14
	push	r8
	.cfi_def_cfa_offset 144
	mov	r9d, r8d
	call	btrfs_prealloc_file_range_trans@PLT
	mov	r15d, eax
	pop	rax
	.cfi_def_cfa_offset 136
	pop	rdx
	.cfi_def_cfa_offset 128
	test	r15d, r15d
	je	.L39
	mov	eax, r15d
	add	eax, DWORD PTR ENOSPC[rip]
	jne	.L12
	mov	rsi, QWORD PTR 8[r13]
	mov	edi, DWORD PTR BTRFS_TRANS_CACHE_ENOSPC[rip]
	call	set_bit@PLT
	jmp	.L12
.L49:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cache_save_setup, .-cache_save_setup
	.comm	SZ_256M,4,4
	.comm	SZ_1M,4,4
	.comm	SPACE_CACHE,4,4
	.comm	PAGE_SIZE,4,4
	.comm	ENOSPC,4,4
	.comm	ENOENT,4,4
	.comm	BTRFS_TRANS_CACHE_ENOSPC,4,4
	.comm	BTRFS_DC_WRITTEN,8,8
	.comm	BTRFS_DC_SETUP,4,4
	.comm	BTRFS_DC_ERROR,4,4
	.comm	BTRFS_CACHE_FINISHED,8,8
	.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_block-group.c_cache_save_setup.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cache_save_setup, %function
cache_save_setup:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	mov	fp, #0
	ldr	r3, .L50
	ldr	r0, [r0, #16]
	ldr	r3, [r3]
	ldr	r10, [r5, #24]
	add	r3, r3, r3, lsl #2
	add	r3, r3, r3, lsl #2
	cmp	r0, r3, lsl #2
	ldr	r3, .L50+4
	sub	sp, sp, #44
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r3, [r10, #4]
	str	fp, [sp, #28]
	str	r3, [sp, #20]
	str	fp, [sp, #32]
	blt	.L40
	ldr	r6, [r1, #8]
	mov	r8, r1
	cmp	r6, #0
	bne	.L1
	ldr	r3, .L50+8
	mov	r7, r2
	ldr	r3, [r3]
	ldr	r9, .L50+12
	str	r3, [sp, #16]
	b	.L4
.L44:
	mov	r0, r6
	bl	BUG_ON
	ldr	r3, [r5, #20]
	add	r6, r6, #1
	cmp	r3, #0
	bne	.L41
	mov	r2, r7
	mov	r1, r5
	mov	r0, r8
	bl	create_free_space_inode
	subs	fp, r0, #0
	bne	.L42
.L4:
	mov	r1, r7
	mov	r0, r5
	bl	lookup_free_space_inode
	mov	r4, r0
	bl	IS_ERR
	cmp	r0, #0
	beq	.L5
	mov	r0, r4
	bl	PTR_ERR
	ldr	r3, [r9]
	cmn	r0, r3
	bne	.L43
.L5:
	mov	r0, r4
	bl	IS_ERR
	subs	fp, r0, #0
	bne	.L44
	mov	r0, r4
	bl	BTRFS_I
	mov	r2, r4
	str	fp, [r0]
	ldr	r1, [sp, #20]
	mov	r0, r8
	bl	btrfs_update_inode
	subs	fp, r0, #0
	add	r6, r5, #12
	bne	.L45
	bl	WARN_ON
	ldr	r2, [r5, #4]
	ldr	r3, [r8]
	cmp	r2, r3
	beq	.L46
.L13:
	mov	r0, r4
	bl	i_size_read
	cmp	r0, #0
	ble	.L17
	mov	r1, r10
	mov	r0, r10
	bl	btrfs_check_trunc_cache_free_space
	subs	fp, r0, #0
	beq	.L47
.L12:
	mov	r0, r4
	bl	iput
.L10:
	mov	r0, r7
	bl	btrfs_release_path
.L6:
	mov	r0, r6
	bl	spin_lock
	cmp	fp, #0
	beq	.L48
.L21:
	ldr	r3, [sp, #16]
	mov	r0, r6
	str	r3, [r5]
	bl	spin_unlock
	ldr	r0, [sp, #28]
	bl	extent_changeset_free
.L1:
	ldr	r3, .L50+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L49
	mov	r0, fp
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L40:
	add	r6, r5, #12
	mov	r0, r6
	bl	spin_lock
	ldr	r3, .L50+16
	mov	r0, r6
	ldr	r2, [r3]
	str	r2, [r5]
	bl	spin_unlock
	b	.L1
.L41:
	mov	r0, r7
	add	r6, r5, #12
	bl	btrfs_release_path
	mov	r0, r6
	bl	spin_lock
	ldr	r9, .L50+20
.L9:
	ldr	r2, [sp, #16]
	ldr	r3, [r9]
	cmp	r3, r2
	ldreq	r2, [r8]
	moveq	fp, #0
	movne	fp, #0
	streq	r2, [r5, #4]
	b	.L21
.L42:
	add	r6, r5, #12
	b	.L10
.L43:
	mov	r0, r4
	bl	PTR_ERR
	mov	fp, r0
	mov	r0, r7
	bl	btrfs_release_path
	add	r6, r5, #12
	b	.L6
.L47:
	mov	r1, fp
	mov	r2, r4
	mov	r0, r8
	bl	btrfs_truncate_free_space_cache
	subs	fp, r0, #0
	bne	.L12
.L17:
	mov	r0, r6
	bl	spin_lock
	ldr	r3, .L50+24
	ldr	r2, [r5, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L15
	ldr	r3, .L50+28
	mov	r0, r10
	ldr	r1, [r3]
	bl	btrfs_test_opt
	cmp	r0, #0
	beq	.L15
	ldr	r9, .L50+32
	mov	r0, r6
	bl	spin_unlock
	ldr	r0, [r9]
	ldr	r1, [r8, #4]
	bl	test_bit
	subs	r10, r0, #0
	beq	.L18
	ldr	r3, .L50+36
	ldr	r3, [r3]
	rsb	fp, r3, #0
	b	.L12
.L48:
	ldr	r9, .L50+20
	b	.L9
.L45:
	mov	r1, fp
	mov	r0, r8
	bl	btrfs_abort_transaction
	b	.L12
.L15:
	ldr	r3, .L50+16
	mov	r0, r6
	ldr	r3, [r3]
	ldr	r9, .L50+20
	str	r3, [sp, #16]
	bl	spin_unlock
	mov	r0, r4
	bl	iput
	mov	r0, r7
	bl	btrfs_release_path
	mov	r0, r6
	bl	spin_lock
	b	.L9
.L46:
	mov	r0, r4
	bl	i_size_read
	cmp	r0, #0
	beq	.L13
.L38:
	ldr	r9, .L50+20
	mov	r0, r4
	ldr	r3, [r9]
	str	r3, [sp, #16]
	bl	iput
	mov	r0, r7
	bl	btrfs_release_path
	mov	r0, r6
	bl	spin_lock
	b	.L9
.L18:
	ldr	r3, .L50+40
	ldr	r0, [r5, #16]
	ldr	r1, [r3]
	bl	div_u64
	subs	r3, r0, #0
	moveq	r3, #1
	ldr	r1, .L50+44
	mov	r2, r10
	ldr	r10, [r1]
	mov	r0, r4
	mul	r3, r10, r3
	lsl	r10, r3, #4
	mov	r3, r10
	add	r1, sp, #28
	bl	btrfs_check_data_free_space
	subs	fp, r0, #0
	bne	.L12
	add	r2, sp, #32
	mov	r3, fp
	str	r2, [sp, #12]
	mov	r1, r8
	mov	r2, fp
	mov	r0, r4
	str	r10, [sp, #8]
	str	r10, [sp, #4]
	str	r10, [sp]
	bl	btrfs_prealloc_file_range_trans
	subs	fp, r0, #0
	beq	.L38
	ldr	r2, .L50+36
	ldr	r2, [r2]
	cmn	fp, r2
	bne	.L12
	ldr	r0, [r9]
	ldr	r1, [r8, #4]
	bl	set_bit
	b	.L12
.L49:
	bl	__stack_chk_fail
.L51:
	.align	2
.L50:
	.word	SZ_1M
	.word	.LC0
	.word	BTRFS_DC_ERROR
	.word	ENOENT
	.word	BTRFS_DC_WRITTEN
	.word	BTRFS_DC_SETUP
	.word	BTRFS_CACHE_FINISHED
	.word	SPACE_CACHE
	.word	BTRFS_TRANS_CACHE_ENOSPC
	.word	ENOSPC
	.word	SZ_256M
	.word	PAGE_SIZE
	.size	cache_save_setup, .-cache_save_setup
	.comm	SZ_256M,4,4
	.comm	SZ_1M,4,4
	.comm	SPACE_CACHE,4,4
	.comm	PAGE_SIZE,4,4
	.comm	ENOSPC,4,4
	.comm	ENOENT,4,4
	.comm	BTRFS_TRANS_CACHE_ENOSPC,4,4
	.comm	BTRFS_DC_WRITTEN,4,4
	.comm	BTRFS_DC_SETUP,4,4
	.comm	BTRFS_DC_ERROR,4,4
	.comm	BTRFS_CACHE_FINISHED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
