	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clearCell
_clearCell:                             ## @clearCell
	.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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	4(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	*24(%rbx)
	movl	(%r12), %eax
	cmpl	4(%r12), %eax
	jne	LBB0_1
LBB0_20:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %r12d
LBB0_22:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movslq	8(%r12), %rax
	addq	%r14, %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_testcase
	movslq	8(%r12), %rax
	addq	%r14, %rax
	decq	%rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_testcase
	movslq	8(%r12), %rdi
	addq	%r14, %rdi
	cmpq	(%rbx), %rdi
	jbe	LBB0_2
## %bb.23:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SQLITE_CORRUPT_PAGE            ## TAILCALL
LBB0_2:
	addq	$-4, %rdi
	callq	_get4byte
	movl	%eax, %r15d
	movq	16(%rbx), %r14
	xorl	%edi, %edi
	cmpl	$5, (%r14)
	setge	%dil
	callq	_assert
	movl	(%r14), %ecx
	movl	(%r12), %eax
	movl	4(%r12), %esi
	leal	(%rsi,%rcx), %edx
	addl	$-4, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	addl	$-4, %ecx
	notl	%eax
	addl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movq	_CORRUPT_DB@GOTPCREL(%rip), %rax
	shrl	$31, %esi
	xorl	%ecx, %ecx
	cmpq	$0, (%rax)
	cmovnel	%esi, %ecx
	testl	%ebx, %ebx
	movl	$1, %edi
	cmovlel	%ecx, %edi
	callq	_assert
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.3:
	leaq	-52(%rbp), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -52(%rbp)
	movq	$0, -48(%rbp)
	cmpl	$2, %r15d
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	callq	_btreePagecount
	cmpl	%eax, %r15d
	jg	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$1, %ebx
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rcx
	callq	_getOverflowPage
	testl	%eax, %eax
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_btreePageLookup
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rax), %edi
	callq	_sqlite3PagerPageRefcount
	cmpl	$1, %eax
	jne	LBB0_24
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rsi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%esi, %esi
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_freePage2
	movl	%eax, %r12d
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rax), %edi
	callq	_sqlite3PagerUnref
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %r15d
	decl	%ebx
	jne	LBB0_4
	jmp	LBB0_20
LBB0_6:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_9:
	movl	%eax, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_CORRUPT_DB,8,3                 ## @CORRUPT_DB
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.no_dead_strip	_clearCell
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clearCell
_clearCell:                             ; @clearCell
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8, #4]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	x8, [x19, #24]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	blr	x8
	ldp	w8, w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
LBB0_2:
	mov	x0, x21
	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
LBB0_3:
	ldrsw	x8, [x21, #8]
	ldr	x9, [x19]
	add	x8, x20, x8
	cmp	x8, x9
	cset	w0, eq
	bl	_testcase
	ldrsw	x8, [x21, #8]
	add	x8, x8, x20
	sub	x8, x8, #1
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, eq
	bl	_testcase
	ldrsw	x8, [x21, #8]
	ldr	x9, [x19]
	add	x8, x20, x8
	cmp	x8, x9
	b.ls	LBB0_5
; %bb.4:
	mov	x0, x19
	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
	b	_SQLITE_CORRUPT_PAGE
LBB0_5:
	sub	x0, x8, #4
	bl	_get4byte
	mov	x20, x0
	ldr	x19, [x19, #16]
	ldr	w8, [x19]
	cmp	w8, #4
	cset	w0, gt
	bl	_assert
	ldr	w8, [x19]
	sub	w8, w8, #4
	ldp	w10, w9, [x21]
	mvn	w10, w10
	add	w11, w9, w8
	add	w10, w10, w11
	sdiv	w22, w10, w8
Lloh3:
	adrp	x8, _CORRUPT_DB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CORRUPT_DB@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	lsr	w9, w9, #31
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	cmp	w22, #1
	csinc	w0, w8, wzr, lt
	bl	_assert
	cbz	w22, LBB0_1
; %bb.6:
Lloh6:
	adrp	x23, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #12]
	str	xzr, [sp]
	cmp	w20, #2
	b.lt	LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_btreePagecount
	cmp	w20, w0
	b.gt	LBB0_21
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w22, #1
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, sp
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_getOverflowPage
	cbnz	w0, LBB0_22
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp]
	cbnz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_btreePageLookup
	str	x0, [sp]
	cbz	x0, LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x0, #8]
	bl	_sqlite3PagerPageRefcount
	cmp	w0, #1
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [sp]
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w21, [x23]
	ldr	x8, [sp]
	cbnz	x8, LBB0_18
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, #0
LBB0_17:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x2, x20
	bl	_freePage2
	mov	x21, x0
	ldr	x8, [sp]
	cbz	x8, LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x8, #8]
	bl	_sqlite3PagerUnref
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	cbnz	w21, LBB0_2
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w20, [sp, #12]
	sub	w22, w22, #1
	cbnz	w22, LBB0_7
	b	LBB0_1
LBB0_21:
	ldr	w21, [x23]
	b	LBB0_2
LBB0_22:
	mov	x21, x0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_CORRUPT_DB,8,3                 ; @CORRUPT_DB
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.no_dead_strip	_clearCell
.subsections_via_symbols
