	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function freePage2
_freePage2:                             ## @freePage2
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	$0, -64(%rbp)
	movq	16(%rdi), %r15
	movl	8(%rdi), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$2, %r14d
	setge	%dil
	callq	_assert
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpl	%r14d, (%r13)
	sete	%dil
	callq	_assert
	movq	%r13, -56(%rbp)
	movl	24(%r13), %edi
	callq	_sqlite3PagerRef
	jmp	LBB0_3
LBB0_2:
	movl	$1, %edi
	callq	_assert
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_btreePageLookup
	movq	%rax, %r13
	movq	%rax, -56(%rbp)
LBB0_3:
	movl	24(%r15), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_4
LBB0_30:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_32
## %bb.31:
	movq	$0, 8(%rdi)
LBB0_32:
	callq	_releasePage
	movq	-64(%rbp), %rdi
	callq	_releasePage
	movl	-44(%rbp), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$144, %ebx
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_get4byte
                                        ## kill: def $eax killed $eax def $rax
	addq	16(%r15), %rbx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leal	1(%rax), %esi
	movq	%rbx, %rdi
	callq	_put4byte
	movq	_BTS_SECURE_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.5:
	testq	%r13, %r13
	je	LBB0_6
LBB0_8:
	movl	24(%r13), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_30
## %bb.9:
	movq	-56(%rbp), %rax
	movq	16(%rax), %rdi
	movq	32(%rax), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_10:
	movq	_ISAUTOVACUUM@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_PTRMAP_FREEPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_ptrmapPut
	cmpl	$0, -44(%rbp)
	jne	LBB0_30
LBB0_12:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.19:
	movq	16(%r15), %rdi
	subq	$-128, %rdi
	callq	_get4byte
	movl	%eax, %ebx
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btreeGetPage
	movl	%eax, -44(%rbp)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.20:
	movq	-64(%rbp), %rax
	movq	16(%rax), %rdi
	addq	$16, %rdi
	callq	_get4byte
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	$33, 4(%r12)
	setge	%dil
	callq	_assert
	movl	4(%r12), %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	leal	-2(%rax), %ecx
	cmpl	%ecx, %r13d
	jle	LBB0_22
## %bb.21:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_30
LBB0_6:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btreeGetPage
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_30
## %bb.7:
	movq	-56(%rbp), %r13
	jmp	LBB0_8
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btreeGetPage
	movl	%eax, -44(%rbp)
	cmpl	%eax, %r13d
	jne	LBB0_30
## %bb.16:
	movq	-56(%rbp), %rax
LBB0_17:
	movl	24(%rax), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.18:
	movq	-56(%rbp), %rax
	movq	16(%rax), %rdi
	movl	%ebx, %esi
	callq	_put4byte
	movq	-56(%rbp), %rax
	movq	16(%rax), %rdi
	addq	$16, %rdi
	xorl	%esi, %esi
	callq	_put4byte
	movq	16(%r15), %rdi
	subq	$-128, %rdi
	movl	%r14d, %esi
	callq	_put4byte
	movslq	%ebx, %rdi
	jmp	LBB0_29
LBB0_22:
	addl	$-8, %eax
	cmpl	%eax, %r13d
	jge	LBB0_14
## %bb.23:
	movq	-64(%rbp), %rax
	movl	24(%rax), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_28
## %bb.24:
	movq	-64(%rbp), %rax
	movq	16(%rax), %rdi
	addq	$16, %rdi
	leal	1(%r13), %esi
	callq	_put4byte
	movq	-64(%rbp), %rax
	movq	16(%rax), %rax
	shll	$2, %r13d
	movslq	%r13d, %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$32, %rdi
	movl	%r14d, %esi
	callq	_put4byte
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_27
## %bb.25:
	movq	_BTS_SECURE_DELETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r12)
	jne	LBB0_27
## %bb.26:
	movl	24(%rax), %edi
	callq	_sqlite3PagerDontWrite
LBB0_27:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_btreeSetHasContent
	movl	%eax, -44(%rbp)
LBB0_28:
	movq	-64(%rbp), %rax
	movslq	(%rax), %rdi
LBB0_29:
	callq	_TRACE
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_BTS_SECURE_DELETE,4,2          ## @BTS_SECURE_DELETE
	.comm	_ISAUTOVACUUM,8,3               ## @ISAUTOVACUUM
	.comm	_PTRMAP_FREEPAGE,4,2            ## @PTRMAP_FREEPAGE
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.no_dead_strip	_freePage2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function freePage2
_freePage2:                             ; @freePage2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	str	xzr, [sp, #24]
	ldr	x23, [x0, #16]
	ldr	w0, [x0, #8]
	bl	_sqlite3_mutex_held
	bl	_assert
	cmp	w19, #1
	cset	w0, gt
	bl	_assert
	cbz	x21, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w19
	cset	w0, eq
	bl	_assert
	str	x21, [sp, #16]
	ldr	w0, [x21, #24]
	bl	_sqlite3PagerRef
	b	LBB0_3
LBB0_2:
	mov	w0, #1
	bl	_assert
	mov	x0, x20
	mov	x1, x19
	bl	_btreePageLookup
	mov	x21, x0
	str	x0, [sp, #16]
LBB0_3:
	ldr	w0, [x23, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
	cbz	w0, LBB0_7
LBB0_4:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_6
; %bb.5:
	str	xzr, [x0, #8]
LBB0_6:
	bl	_releasePage
	ldr	x0, [sp, #24]
	bl	_releasePage
	ldr	w0, [sp, #12]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	ldr	x8, [x23, #16]
	add	x0, x8, #144
	bl	_get4byte
	mov	x22, x0
	ldr	x8, [x23, #16]
	add	x0, x8, #144
	add	w1, w22, #1
	bl	_put4byte
	ldr	w8, [x20]
Lloh0:
	adrp	x24, _BTS_SECURE_DELETE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BTS_SECURE_DELETE@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	cbz	x21, LBB0_17
LBB0_9:
	ldr	w0, [x21, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
	cbnz	w0, LBB0_4
; %bb.10:
	ldr	x8, [sp, #16]
	ldr	x0, [x8, #16]
	ldr	x8, [x8, #32]
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
LBB0_11:
Lloh2:
	adrp	x8, _ISAUTOVACUUM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISAUTOVACUUM@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
Lloh5:
	adrp	x8, _PTRMAP_FREEPAGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTRMAP_FREEPAGE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_ptrmapPut
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_4
LBB0_13:
	cbz	w22, LBB0_19
; %bb.14:
	ldr	x8, [x23, #16]
	add	x0, x8, #128
	bl	_get4byte
	mov	x21, x0
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #0
	bl	_btreeGetPage
	str	w0, [sp, #12]
Lloh8:
	adrp	x25, _SQLITE_OK@GOTPAGE
Lloh9:
	ldr	x25, [x25, _SQLITE_OK@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.15:
	ldr	x8, [sp, #24]
	ldr	x8, [x8, #16]
	add	x0, x8, #16
	bl	_get4byte
	mov	x22, x0
	ldr	w8, [x20, #4]
	cmp	w8, #32
	cset	w0, gt
	bl	_assert
	ldr	w8, [x20, #4]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	sub	w9, w8, #2
	cmp	w22, w9
	b.le	LBB0_25
; %bb.16:
Lloh10:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	b	LBB0_4
LBB0_17:
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	mov	w4, #0
	bl	_btreeGetPage
	str	w0, [sp, #12]
	cbnz	w0, LBB0_4
; %bb.18:
	ldr	x21, [sp, #16]
	b	LBB0_9
LBB0_19:
	mov	w21, #0
LBB0_20:
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_23
; %bb.21:
Lloh13:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	mov	w4, #0
	bl	_btreeGetPage
	str	w0, [sp, #12]
	cmp	w22, w0
	b.ne	LBB0_4
; %bb.22:
	ldr	x8, [sp, #16]
LBB0_23:
	ldr	w0, [x8, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
Lloh16:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.24:
	ldr	x8, [sp, #16]
	ldr	x0, [x8, #16]
	mov	x1, x21
	bl	_put4byte
	ldr	x8, [sp, #16]
	ldr	x8, [x8, #16]
	add	x0, x8, #16
	mov	w1, #0
	bl	_put4byte
	ldr	x8, [x23, #16]
	add	x0, x8, #128
	mov	x1, x19
	bl	_put4byte
	sxtw	x0, w21
	b	LBB0_32
LBB0_25:
	sub	w8, w8, #8
	cmp	w22, w8
	b.ge	LBB0_20
; %bb.26:
	ldr	x8, [sp, #24]
	ldr	w0, [x8, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_31
; %bb.27:
	ldr	x8, [sp, #24]
	ldr	x8, [x8, #16]
	add	x0, x8, #16
	add	w1, w22, #1
	bl	_put4byte
	ldr	x8, [sp, #24]
	ldr	x8, [x8, #16]
	lsl	w9, w22, #2
	add	w9, w9, #8
	add	x0, x8, w9, sxtw #2
	mov	x1, x19
	bl	_put4byte
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_30
; %bb.28:
	ldr	w9, [x20]
	ldr	w10, [x24]
	tst	w10, w9
	b.ne	LBB0_30
; %bb.29:
	ldr	w0, [x8, #24]
	bl	_sqlite3PagerDontWrite
LBB0_30:
	mov	x0, x20
	mov	x1, x19
	bl	_btreeSetHasContent
	str	w0, [sp, #12]
LBB0_31:
	ldr	x8, [sp, #24]
	ldrsw	x0, [x8]
LBB0_32:
	bl	_TRACE
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BTS_SECURE_DELETE,4,2          ; @BTS_SECURE_DELETE
	.comm	_ISAUTOVACUUM,8,3               ; @ISAUTOVACUUM
	.comm	_PTRMAP_FREEPAGE,4,2            ; @PTRMAP_FREEPAGE
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.no_dead_strip	_freePage2
.subsections_via_symbols
