	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unlockBtreeIfUnused
_unlockBtreeIfUnused:                   ## @unlockBtreeIfUnused
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	20(%rdi), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_countValidCursors
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_TRANS_NONE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setg	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_assert
	movq	(%rbx), %rax
	movq	_TRANS_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.6:
	movl	(%r14), %edi
	callq	_assert
	movl	16(%rbx), %edi
	callq	_sqlite3PagerRefcount
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_releasePageOne                 ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRANS_NONE,8,3                 ## @TRANS_NONE
	.no_dead_strip	_unlockBtreeIfUnused
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unlockBtreeIfUnused
_unlockBtreeIfUnused:                   ; @unlockBtreeIfUnused
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #20]
	bl	_sqlite3_mutex_held
	bl	_assert
	mov	x0, x19
	mov	w1, #0
	bl	_countValidCursors
Lloh0:
	adrp	x20, _TRANS_NONE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _TRANS_NONE@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	bl	_assert
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	bl	_assert
	ldr	w0, [x19, #16]
	bl	_sqlite3PagerRefcount
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
	str	xzr, [x19, #8]
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_releasePageOne
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TRANS_NONE,8,3                 ; @TRANS_NONE
	.no_dead_strip	_unlockBtreeIfUnused
.subsections_via_symbols
