	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clearDatabasePage
_clearDatabasePage:                     ## @clearDatabasePage
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	%r12, %rdi
	callq	_btreePagecount
	cmpq	%rbx, %rax
	jge	LBB0_2
## %bb.1:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_2:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_getAndInitPage
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_19
## %bb.3:
	movq	-56(%rbp), %rdi
	cmpl	$0, (%rdi)
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %esi
	callq	_findCell
	movq	%rax, %r13
	movq	-56(%rbp), %rdi
	cmpl	$0, 24(%rdi)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	callq	_get4byte
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_clearDatabasePage
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rsi
	callq	_clearCell
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	movq	-56(%rbp), %rdi
	cmpl	(%rdi), %ebx
	jl	LBB0_6
LBB0_10:
	cmpl	$0, 24(%rdi)
	je	LBB0_11
## %bb.12:
	testq	%r15, %r15
	je	LBB0_14
## %bb.13:
	movl	20(%rdi), %edi
	callq	_assert
	movq	-56(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, (%r15)
	jmp	LBB0_14
LBB0_11:
	movq	8(%rdi), %rdi
	addq	$8, %rdi
	callq	_get4byte
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_clearDatabasePage
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_18
LBB0_14:
	movq	-56(%rbp), %rdi
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.15:
	leaq	-44(%rbp), %rsi
	callq	_freePage
	jmp	LBB0_18
LBB0_16:
	movl	16(%rdi), %edi
	callq	_sqlite3PagerWrite
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movq	-56(%rbp), %rdi
	movq	8(%rdi), %rax
	movzbl	(%rax), %esi
	movq	_PTF_LEAF@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_zeroPage
LBB0_18:
	movq	-56(%rbp), %rdi
	callq	_releasePage
	movl	-44(%rbp), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_PTF_LEAF,4,2                   ## @PTF_LEAF
	.no_dead_strip	_clearDatabasePage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clearDatabasePage
_clearDatabasePage:                     ; @clearDatabasePage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_sqlite3_mutex_held
	bl	_assert
	mov	x0, x21
	bl	_btreePagecount
	cmp	x0, x22
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_2:
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x22
	mov	w3, #0
	bl	_getAndInitPage
	str	w0, [sp, #4]
	cbnz	w0, LBB0_19
; %bb.3:
	ldr	x0, [sp, #8]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	mov	w22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x22
	bl	_findCell
	mov	x23, x0
	ldr	x0, [sp, #8]
	ldr	w8, [x0, #24]
	cbnz	w8, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_get4byte
	mov	x1, x0
	mov	x0, x21
	mov	w2, #1
	mov	x3, x20
	bl	_clearDatabasePage
	str	w0, [sp, #4]
	cbnz	w0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x23
	bl	_clearCell
	str	w0, [sp, #4]
	cbnz	w0, LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	ldr	x0, [sp, #8]
	ldr	w8, [x0]
	cmp	w22, w8
	b.lt	LBB0_5
LBB0_10:
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_13
; %bb.11:
	cbz	x20, LBB0_14
; %bb.12:
	ldr	w0, [x0, #20]
	bl	_assert
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	ldr	w9, [x20]
	add	w8, w9, w8
	str	w8, [x20]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x0, #8]
	add	x0, x8, #8
	bl	_get4byte
	mov	x1, x0
	mov	x0, x21
	mov	w2, #1
	mov	x3, x20
	bl	_clearDatabasePage
	str	w0, [sp, #4]
	cbnz	w0, LBB0_18
LBB0_14:
	ldr	x0, [sp, #8]
	cbz	w19, LBB0_16
; %bb.15:
	add	x1, sp, #4
	bl	_freePage
	b	LBB0_18
LBB0_16:
	ldr	w0, [x0, #16]
	bl	_sqlite3PagerWrite
	str	w0, [sp, #4]
	cbnz	w0, LBB0_18
; %bb.17:
	ldr	x0, [sp, #8]
	ldr	x8, [x0, #8]
	ldrb	w8, [x8]
Lloh3:
	adrp	x9, _PTF_LEAF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PTF_LEAF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_zeroPage
LBB0_18:
	ldr	x0, [sp, #8]
	bl	_releasePage
	ldr	w0, [sp, #4]
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_PTF_LEAF,4,2                   ; @PTF_LEAF
	.no_dead_strip	_clearDatabasePage
.subsections_via_symbols
