	.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, %rbx
	movq	%rdi, %r12
	movq	$0, -64(%rbp)
	movq	16(%rdi), %r15
	movl	12(%rdi), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	_CORRUPT_DB@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	setne	%al
	cmpl	$2, %r14d
	setge	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	cmpl	%r14d, (%rbx)
	sete	%al
	jmp	LBB0_3
LBB0_1:
	movb	$1, %al
LBB0_3:
	movzbl	%al, %edi
	callq	_assert
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	cmpl	$2, %r14d
	jl	LBB0_38
## %bb.4:
	cmpl	%r14d, (%r12)
	jl	LBB0_38
## %bb.5:
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:
	movq	%rbx, -56(%rbp)
	movl	24(%rbx), %edi
	callq	_sqlite3PagerRef
	jmp	LBB0_8
LBB0_7:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_btreePageLookup
	movq	%rax, %rbx
	movq	%rax, -56(%rbp)
LBB0_8:
	movl	24(%r15), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_9
LBB0_35:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_37
## %bb.36:
	movq	$0, 8(%rdi)
LBB0_37:
	callq	_releasePage
	movq	-64(%rbp), %rdi
	callq	_releasePage
	leaq	-44(%rbp), %rax
LBB0_38:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$144, %r13d
	movq	16(%r15), %rdi
	addq	%r13, %rdi
	callq	_get4byte
	addq	16(%r15), %r13
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leal	1(%rax), %esi
	movq	%r13, %rdi
	callq	_put4byte
	movq	_BTS_SECURE_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_15
## %bb.10:
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_13:
	movl	24(%rbx), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_35
## %bb.14:
	movq	-56(%rbp), %rax
	movq	16(%rax), %rdi
	movq	32(%rax), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_15:
	movq	_ISAUTOVACUUM@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.16:
	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_35
LBB0_17:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_18
## %bb.24:
	movq	16(%r15), %rdi
	subq	$-128, %rdi
	callq	_get4byte
	movq	%rax, %r13
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r13d, %esi
	xorl	%ecx, %ecx
	callq	_btreeGetPage
	movl	%eax, -44(%rbp)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_35
## %bb.25:
	movq	-64(%rbp), %rax
	movq	16(%rax), %rdi
	addq	$16, %rdi
	callq	_get4byte
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpl	$33, 8(%r12)
	setge	%dil
	callq	_assert
	movl	8(%r12), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	leaq	-2(%rax), %rcx
	cmpq	%rbx, %rcx
	jge	LBB0_27
## %bb.26:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_35
LBB0_11:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_btreeGetPage
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_35
## %bb.12:
	movq	-56(%rbp), %rbx
	jmp	LBB0_13
LBB0_18:
	xorl	%r13d, %r13d
LBB0_19:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	movq	%r13, %rbx
	jne	LBB0_22
## %bb.20:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_btreeGetPage
	movl	%eax, -44(%rbp)
	cmpl	%eax, %r13d
	jne	LBB0_35
## %bb.21:
	movq	-56(%rbp), %rax
LBB0_22:
	movl	24(%rax), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_35
## %bb.23:
	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_34
LBB0_27:
	addq	$-8, %rax
	cmpq	%rbx, %rax
	jle	LBB0_19
## %bb.28:
	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_33
## %bb.29:
	movq	-64(%rbp), %rax
	movq	16(%rax), %rdi
	addq	$16, %rdi
	leal	1(%rbx), %esi
	callq	_put4byte
	movq	-64(%rbp), %rax
	movq	16(%rax), %rax
	shlq	$4, %rbx
	leaq	(%rbx,%rax), %rdi
	addq	$32, %rdi
	movl	%r14d, %esi
	callq	_put4byte
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_32
## %bb.30:
	movq	_BTS_SECURE_DELETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%r12)
	jne	LBB0_32
## %bb.31:
	movl	24(%rax), %edi
	callq	_sqlite3PagerDontWrite
LBB0_32:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_btreeSetHasContent
	movl	%eax, -44(%rbp)
LBB0_33:
	movq	-64(%rbp), %rax
	movslq	(%rax), %rdi
LBB0_34:
	callq	_TRACE
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_CORRUPT_DB,8,3                 ## @CORRUPT_DB
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.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
	.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, #12]
	bl	_sqlite3_mutex_held
	bl	_assert
Lloh0:
	adrp	x8, _CORRUPT_DB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CORRUPT_DB@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	w19, #1
	ccmp	x8, #0, #0, le
	cset	w0, ne
	bl	_assert
	cbz	x21, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w19
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	bl	_assert
	cmp	w19, #2
	b.ge	LBB0_5
; %bb.4:
Lloh3:
	adrp	x24, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
	ldr	w8, [x20]
Lloh5:
	adrp	x24, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
	cmp	w8, w19
	b.lt	LBB0_13
; %bb.6:
	cbz	x21, LBB0_8
; %bb.7:
	str	x21, [sp, #16]
	ldr	w0, [x21, #24]
	bl	_sqlite3PagerRef
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_btreePageLookup
	mov	x21, x0
	str	x0, [sp, #16]
LBB0_9:
	ldr	w0, [x23, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
	cbz	w0, LBB0_14
LBB0_10:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_12
; %bb.11:
	str	xzr, [x0, #8]
LBB0_12:
	bl	_releasePage
	ldr	x0, [sp, #24]
	bl	_releasePage
	add	x24, sp, #12
LBB0_13:
	ldr	w0, [x24]
	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_14:
	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, #4]
Lloh7:
	adrp	x25, _BTS_SECURE_DELETE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _BTS_SECURE_DELETE@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.15:
	cbz	x21, LBB0_24
LBB0_16:
	ldr	w0, [x21, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
	cbnz	w0, LBB0_10
; %bb.17:
	ldr	x8, [sp, #16]
	ldr	x0, [x8, #16]
	ldr	x8, [x8, #32]
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
LBB0_18:
Lloh9:
	adrp	x8, _ISAUTOVACUUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISAUTOVACUUM@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
Lloh12:
	adrp	x8, _PTRMAP_FREEPAGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PTRMAP_FREEPAGE@GOTPAGEOFF]
Lloh14:
	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_10
LBB0_20:
	cbz	x22, LBB0_26
; %bb.21:
	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
	bl	_btreeGetPage
	str	w0, [sp, #12]
Lloh15:
	adrp	x26, _SQLITE_OK@GOTPAGE
Lloh16:
	ldr	x26, [x26, _SQLITE_OK@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.22:
	ldr	x8, [sp, #24]
	ldr	x8, [x8, #16]
	add	x0, x8, #16
	bl	_get4byte
	mov	x22, x0
	ldr	w8, [x20, #8]
	cmp	w8, #32
	cset	w0, gt
	bl	_assert
	ldr	w8, [x20, #8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x8, x8, #2, #30
	sub	x9, x8, #2
	cmp	x9, x22
	b.ge	LBB0_32
; %bb.23:
	ldr	w8, [x24]
	str	w8, [sp, #12]
	b	LBB0_10
LBB0_24:
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_btreeGetPage
	str	w0, [sp, #12]
	cbnz	w0, LBB0_10
; %bb.25:
	ldr	x21, [sp, #16]
	b	LBB0_16
LBB0_26:
	mov	w21, #0
LBB0_27:
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_30
; %bb.28:
Lloh17:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_btreeGetPage
	str	w0, [sp, #12]
	cmp	w22, w0
	b.ne	LBB0_10
; %bb.29:
	ldr	x8, [sp, #16]
LBB0_30:
	ldr	w0, [x8, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
Lloh20:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.31:
	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
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	sxtw	x0, w21
	b	LBB0_39
LBB0_32:
	sub	x8, x8, #8
	cmp	x8, x22
	b.le	LBB0_27
; %bb.33:
	ldr	x8, [sp, #24]
	ldr	w0, [x8, #24]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #12]
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_38
; %bb.34:
	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]
	add	x8, x8, x22, lsl #4
	add	x0, x8, #32
	mov	x1, x19
	bl	_put4byte
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_37
; %bb.35:
	ldr	w9, [x20, #4]
	ldr	w10, [x25]
	tst	w10, w9
	b.ne	LBB0_37
; %bb.36:
	ldr	w0, [x8, #24]
	bl	_sqlite3PagerDontWrite
LBB0_37:
	mov	x0, x20
	mov	x1, x19
	bl	_btreeSetHasContent
	str	w0, [sp, #12]
LBB0_38:
	ldr	x8, [sp, #24]
	ldrsw	x0, [x8]
LBB0_39:
	bl	_TRACE
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_CORRUPT_DB,8,3                 ; @CORRUPT_DB
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.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
	.no_dead_strip	_freePage2
.subsections_via_symbols
