	.file	"extr_sqlite3.c_findReusableFd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	findReusableFd, @function
findReusableFd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	unixEnterMutex@PLT
	cmp	QWORD PTR inodeList[rip], 0
	je	.L4
	mov	rsi, rsp
	mov	rdi, r12
	call	osStat@PLT
	test	rax, rax
	jne	.L4
	mov	rbx, QWORD PTR inodeList[rip]
	test	rbx, rbx
	je	.L4
	mov	rax, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 8[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rbx, QWORD PTR 16[rbx]
	test	rbx, rbx
	je	.L4
.L5:
	cmp	QWORD PTR 24[rbx], rax
	jne	.L6
	cmp	QWORD PTR 32[rbx], rdx
	jne	.L6
	mov	edi, DWORD PTR [rbx]
	call	sqlite3_mutex_notheld@PLT
	mov	edi, eax
	call	assert@PLT
	mov	edi, DWORD PTR [rbx]
	call	sqlite3_mutex_enter@PLT
	mov	r12, QWORD PTR 8[rbx]
	lea	rcx, 8[rbx]
	test	r12, r12
	jne	.L11
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rcx, 8[rax]
	test	r12, r12
	je	.L8
.L11:
	mov	edx, DWORD PTR [r12]
	mov	rax, r12
	mov	r12, QWORD PTR 8[r12]
	cmp	edx, ebp
	jne	.L9
	mov	QWORD PTR [rcx], r12
	mov	r12, rax
.L8:
	mov	edi, DWORD PTR [rbx]
	call	sqlite3_mutex_leave@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xor	r12d, r12d
.L3:
	xor	eax, eax
	call	unixLeaveMutex@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L28
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	findReusableFd, .-findReusableFd
	.comm	inodeList,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_sqlite3.c_findReusableFd.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	findReusableFd, %function
findReusableFd:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L29
	ldr	r5, .L29+4
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	mov	r6, r1
	bl	unixEnterMutex
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L4
	mov	r0, r4
	add	r1, sp, #4
	bl	osStat
	cmp	r0, #0
	bne	.L4
	ldr	r4, [r5]
	cmp	r4, #0
	beq	.L4
	ldr	r2, [sp, #4]
	ldr	r1, [sp, #8]
	b	.L5
.L6:
	ldr	r4, [r4, #8]
	cmp	r4, #0
	beq	.L4
.L5:
	ldr	r3, [r4, #12]
	cmp	r3, r2
	bne	.L6
	ldr	r3, [r4, #16]
	cmp	r3, r1
	bne	.L6
	mov	r7, r4
	ldr	r0, [r4]
	bl	sqlite3_mutex_notheld
	bl	assert
	ldr	r0, [r7], #4
	bl	sqlite3_mutex_enter
	ldr	r5, [r4, #4]
	cmp	r5, #0
	bne	.L11
	b	.L8
.L9:
	cmp	r5, #0
	add	r7, r3, #4
	beq	.L8
.L11:
	ldr	r2, [r5]
	mov	r3, r5
	cmp	r2, r6
	ldr	r5, [r5, #4]
	bne	.L9
	str	r5, [r7]
	mov	r5, r3
.L8:
	ldr	r0, [r4]
	bl	sqlite3_mutex_leave
	b	.L3
.L4:
	mov	r5, #0
.L3:
	bl	unixLeaveMutex
	ldr	r3, .L29
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L28:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	.LC0
	.word	inodeList
	.size	findReusableFd, .-findReusableFd
	.comm	inodeList,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
