	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function findReusableFd
_findReusableFd:                        ## @findReusableFd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_unixEnterMutex
	movq	_inodeList@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_3
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_osStat
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	xorl	%r15d, %r15d
LBB0_3:
	xorl	%eax, %eax
	callq	_unixLeaveMutex
	movq	%r15, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	(%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.5:
	movq	-48(%rbp), %rax
	movq	-40(%rbp), %rcx
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, 24(%rbx)
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rcx, 32(%rbx)
	jne	LBB0_6
## %bb.9:
	movl	(%rbx), %edi
	callq	_sqlite3_mutex_notheld
	movl	%eax, %edi
	callq	_assert
	movl	(%rbx), %edi
	callq	_sqlite3_mutex_enter
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_18
## %bb.10:
	movq	_SQLITE_OPEN_READONLY@GOTPCREL(%rip), %rax
	movq	_SQLITE_OPEN_READWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	andl	%r14d, %ecx
	cmpl	%ecx, (%r15)
	jne	LBB0_12
## %bb.11:
	leaq	8(%rbx), %rax
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rax
	movq	8(%r15), %r15
	testq	%r15, %r15
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	%ecx, (%r15)
	jne	LBB0_12
## %bb.14:
	addq	$8, %rax
LBB0_15:
	movq	8(%r15), %rcx
	movq	%rcx, (%rax)
	jmp	LBB0_19
LBB0_18:
	xorl	%r15d, %r15d
LBB0_19:
	movl	(%rbx), %edi
	callq	_sqlite3_mutex_leave
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_inodeList,8,3                  ## @inodeList
	.comm	_SQLITE_OPEN_READONLY,4,2       ## @SQLITE_OPEN_READONLY
	.comm	_SQLITE_OPEN_READWRITE,4,2      ## @SQLITE_OPEN_READWRITE
	.no_dead_strip	_findReusableFd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function findReusableFd
_findReusableFd:                        ; @findReusableFd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	bl	_unixEnterMutex
Lloh0:
	adrp	x21, _inodeList@GOTPAGE
Lloh1:
	ldr	x21, [x21, _inodeList@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x1, sp
	mov	x0, x19
	bl	_osStat
	cbz	x0, LBB0_4
LBB0_2:
	mov	x19, #0
LBB0_3:
	bl	_unixLeaveMutex
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	x21, [x21]
	cbz	x21, LBB0_2
; %bb.5:
	ldp	x8, x9, [sp]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x21, [x21, #16]
	cbz	x21, LBB0_2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21, #24]
	cmp	x10, x8
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x10, [x21, #32]
	cmp	x10, x9
	b.ne	LBB0_6
; %bb.9:
	ldr	w0, [x21]
	bl	_sqlite3_mutex_notheld
	bl	_assert
	ldr	w0, [x21]
	bl	_sqlite3_mutex_enter
	mov	x8, x21
	ldr	x19, [x8, #8]!
	cbz	x19, LBB0_15
; %bb.10:
Lloh2:
	adrp	x9, _SQLITE_OPEN_READONLY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SQLITE_OPEN_READONLY@GOTPAGEOFF]
Lloh4:
	adrp	x10, _SQLITE_OPEN_READWRITE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SQLITE_OPEN_READWRITE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w9, w9, w20
	ldr	w10, [x19]
	cmp	w10, w9
	b.eq	LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x8, x19
	ldr	x19, [x19, #8]
	cbz	x19, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w10, [x19]
	cmp	w10, w9
	b.ne	LBB0_11
; %bb.13:
	add	x8, x8, #8
LBB0_14:
	ldr	x9, [x19, #8]
	str	x9, [x8]
LBB0_15:
	ldr	w0, [x21]
	bl	_sqlite3_mutex_leave
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_inodeList,8,3                  ; @inodeList
	.comm	_SQLITE_OPEN_READONLY,4,2       ; @SQLITE_OPEN_READONLY
	.comm	_SQLITE_OPEN_READWRITE,4,2      ; @SQLITE_OPEN_READWRITE
	.no_dead_strip	_findReusableFd
.subsections_via_symbols
