	.file	"extr_daemon.c_cachefiles_has_space.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"statfs failed"
.LC1:
	.string	" = %d"
.LC2:
	.string	"cease culling"
.LC3:
	.string	"### CULL CACHE ###"
	.text
	.p2align 4
	.globl	cachefiles_has_space
	.type	cachefiles_has_space, @function
cachefiles_has_space:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 72
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 56[rdi]
	lea	r12, 24[rsp]
	mov	rdi, r12
	mov	edx, DWORD PTR [rax]
	mov	QWORD PTR 40[rsp], rax
	mov	DWORD PTR 32[rsp], edx
	mov	edx, 8
	call	memset@PLT
	lea	rdi, 32[rsp]
	mov	rsi, r12
	call	vfs_statfs@PLT
	test	eax, eax
	js	.L21
	mov	ecx, DWORD PTR 0[rbp]
	mov	eax, DWORD PTR 24[rsp]
	mov	edx, DWORD PTR 28[rsp]
	sar	eax, cl
	cmp	edx, r13d
	ja	.L22
	xor	ecx, ecx
	xor	edx, edx
.L5:
	mov	DWORD PTR 28[rsp], edx
	mov	edx, eax
	mov	edi, DWORD PTR CACHEFILES_CULLING[rip]
	lea	rsi, 52[rbp]
	sub	edx, ebx
	cmp	eax, ebx
	mov	eax, 0
	mov	r12d, DWORD PTR ENOBUFS[rip]
	cmova	eax, edx
	neg	r12d
	mov	DWORD PTR 24[rsp], eax
	cmp	rcx, QWORD PTR 8[rbp]
	jl	.L7
	cmp	eax, DWORD PTR 16[rbp]
	jb	.L7
	xor	r12d, r12d
	cmp	rcx, QWORD PTR 24[rbp]
	jl	.L7
	cmp	eax, DWORD PTR 32[rbp]
	jnb	.L23
	.p2align 4,,10
	.p2align 3
.L7:
	call	test_and_set_bit@PLT
	test	eax, eax
	je	.L24
.L10:
	mov	esi, r12d
	lea	rdi, .LC1[rip]
	call	_leave@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	sub	edx, r13d
	mov	ecx, edx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	mov	r12d, eax
	add	eax, DWORD PTR EIO[rip]
	jne	.L10
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	cachefiles_io_error@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, .LC3[rip]
	call	_debug@PLT
	mov	rdi, rbp
	call	cachefiles_state_changed@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L23:
	mov	QWORD PTR 8[rsp], rsi
	call	test_bit@PLT
	mov	rsi, QWORD PTR 8[rsp]
	test	rax, rax
	je	.L9
	mov	eax, DWORD PTR 28[rsp]
	cmp	rax, QWORD PTR 40[rbp]
	jl	.L9
	mov	eax, DWORD PTR 48[rbp]
	cmp	DWORD PTR 24[rsp], eax
	jb	.L9
	mov	edi, DWORD PTR CACHEFILES_CULLING[rip]
	call	test_and_clear_bit@PLT
	test	rax, rax
	je	.L9
	lea	rdi, .LC2[rip]
	call	_debug@PLT
	mov	rdi, rbp
	call	cachefiles_state_changed@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	xor	r12d, r12d
	jmp	.L1
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cachefiles_has_space, .-cachefiles_has_space
	.comm	ENOBUFS,4,4
	.comm	EIO,4,4
	.comm	CACHEFILES_CULLING,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_daemon.c_cachefiles_has_space.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"statfs failed\000"
	.align	2
.LC1:
	.ascii	" = %d\000"
	.align	2
.LC2:
	.ascii	"cease culling\000"
	.align	2
.LC3:
	.ascii	"### CULL CACHE ###\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cachefiles_has_space
	.syntax unified
	.arm
	.fpu softvfp
	.type	cachefiles_has_space, %function
cachefiles_has_space:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, #0
	mov	r5, r0
	ldr	r0, [r0, #32]
	ldr	r3, .L26
	sub	sp, sp, #32
	ldr	ip, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r8, r1
	str	r0, [sp, #24]
	add	r1, sp, #12
	add	r0, sp, #20
	mov	r7, r2
	str	ip, [sp, #20]
	str	r6, [sp, #12]
	str	r6, [sp, #16]
	bl	vfs_statfs
	subs	r4, r0, #0
	blt	.L22
	ldr	r3, [sp, #16]
	ldr	r2, [r5]
	ldr	ip, [sp, #12]
	cmp	r3, r8
	asr	ip, ip, r2
	movls	r3, r6
	subhi	r3, r3, r8
	cmp	ip, r7
	movls	r2, #0
	ldr	r0, .L26+4
	ldr	r1, [r5, #4]
	ldr	r4, [r0]
	ldr	r6, .L26+8
	subhi	r2, ip, r7
	cmp	r1, r3
	ldr	r0, [r6]
	str	r3, [sp, #16]
	str	r2, [sp, #12]
	rsb	r4, r4, #0
	add	r1, r5, #28
	bhi	.L7
	ldr	ip, [r5, #8]
	cmp	r2, ip
	bcc	.L7
	ldr	ip, [r5, #12]
	cmp	ip, r3
	bhi	.L15
	ldr	r3, [r5, #16]
	cmp	r2, r3
	bcs	.L23
.L15:
	mov	r4, #0
.L7:
	bl	test_and_set_bit
	cmp	r0, #0
	beq	.L24
.L10:
	mov	r1, r4
	ldr	r0, .L26+12
	bl	_leave
.L1:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, r4
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	ldr	r0, .L26+16
	bl	_debug
	mov	r0, r5
	bl	cachefiles_state_changed
	b	.L10
.L22:
	ldr	r3, .L26+20
	ldr	r3, [r3]
	cmn	r4, r3
	bne	.L10
	mov	r0, r5
	ldr	r1, .L26+24
	bl	cachefiles_io_error
	b	.L10
.L23:
	str	r1, [sp, #4]
	bl	test_bit
	cmp	r0, #0
	ldr	r1, [sp, #4]
	beq	.L20
	ldr	r2, [sp, #16]
	ldr	r3, [r5, #20]
	cmp	r2, r3
	bcc	.L20
	ldr	r2, [sp, #12]
	ldr	r3, [r5, #24]
	cmp	r2, r3
	bcc	.L20
	ldr	r0, [r6]
	bl	test_and_clear_bit
	cmp	r0, #0
	beq	.L20
	ldr	r0, .L26+28
	bl	_debug
	mov	r0, r5
	bl	cachefiles_state_changed
.L20:
	mov	r4, #0
	b	.L1
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC4
	.word	ENOBUFS
	.word	CACHEFILES_CULLING
	.word	.LC1
	.word	.LC3
	.word	EIO
	.word	.LC0
	.word	.LC2
	.size	cachefiles_has_space, .-cachefiles_has_space
	.comm	ENOBUFS,4,4
	.comm	EIO,4,4
	.comm	CACHEFILES_CULLING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
