	.file	"extr_sqlite3.c_clearCell.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clearCell, @function
clearCell:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rbp, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR 4[rbp]
	call	sqlite3_mutex_held@PLT
	mov	edi, eax
	call	assert@PLT
	mov	rdi, rbx
	lea	rdx, 28[rsp]
	mov	rsi, r12
	call	btreeParseCellPtr@PLT
	movsx	rdi, DWORD PTR 28[rsp]
	test	edi, edi
	je	.L6
	movsx	rax, DWORD PTR 8[rbx]
	lea	rdx, 3[r12+rdi]
	add	rax, QWORD PTR [rbx]
	cmp	rdx, rax
	jbe	.L4
.L9:
	mov	r12d, DWORD PTR SQLITE_CORRUPT_BKPT[rip]
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L33
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	add	rdi, r12
	call	get4byte@PLT
	xor	edi, edi
	cmp	DWORD PTR 0[rbp], 4
	setg	dil
	mov	r14d, eax
	call	assert@PLT
	mov	eax, DWORD PTR 0[rbp]
	lea	ecx, -4[rax]
	mov	eax, DWORD PTR 32[rsp]
	add	eax, ecx
	sub	eax, DWORD PTR 36[rsp]
	mov	r12d, eax
	sub	r12d, 1
	mov	eax, r12d
	cdq
	idiv	ecx
	test	r14d, r14d
	sete	dil
	test	eax, eax
	mov	r12d, eax
	setg	al
	lea	ebx, -1[r12]
	or	edi, eax
	movzx	edi, dil
	call	assert@PLT
	test	r12d, r12d
	je	.L6
	mov	DWORD PTR 12[rsp], 0
	lea	r13, 12[rsp]
	mov	QWORD PTR 16[rsp], 0
	cmp	r14d, 1
	jg	.L7
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rsi, QWORD PTR 16[rsp]
	test	rsi, rsi
	je	.L34
.L11:
	mov	edi, DWORD PTR 12[rsi]
	call	sqlite3PagerPageRefcount@PLT
	mov	r12d, DWORD PTR SQLITE_CORRUPT_BKPT[rip]
	cmp	eax, 1
	je	.L35
.L16:
	mov	rax, QWORD PTR 16[rsp]
	test	rax, rax
	je	.L17
	mov	edi, DWORD PTR 12[rax]
	call	sqlite3PagerUnref@PLT
.L17:
	test	r12d, r12d
	jne	.L1
	mov	r14d, DWORD PTR 12[rsp]
	test	ebx, ebx
	je	.L6
	mov	DWORD PTR 12[rsp], 0
	sub	ebx, 1
	mov	QWORD PTR 16[rsp], 0
	cmp	r14d, 1
	jle	.L9
.L7:
	mov	rdi, rbp
	call	btreePagecount@PLT
	cmp	eax, r14d
	jl	.L9
	test	ebx, ebx
	je	.L36
	lea	rdx, 16[rsp]
	mov	rcx, r13
	mov	esi, r14d
	mov	rdi, rbp
	call	getOverflowPage@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rsi, QWORD PTR 16[rsp]
	test	rsi, rsi
	jne	.L11
.L34:
	mov	esi, r14d
	mov	rdi, rbp
	call	btreePageLookup@PLT
	mov	QWORD PTR 16[rsp], rax
	mov	rsi, rax
	test	rax, rax
	jne	.L11
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rsi, QWORD PTR 16[rsp]
.L14:
	mov	edx, r14d
	mov	rdi, rbp
	call	freePage2@PLT
	mov	r12d, eax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r12d, DWORD PTR SQLITE_OK[rip]
	jmp	.L1
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	clearCell, .-clearCell
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_CORRUPT_BKPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sqlite3.c_clearCell.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clearCell, %function
clearCell:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r0
	ldr	r6, [r0, #12]
	ldr	r3, .L36
	sub	sp, sp, #24
	ldr	r0, [r6, #4]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	sqlite3_mutex_held
	bl	assert
	mov	r1, r5
	mov	r0, r4
	add	r2, sp, #8
	bl	btreeParseCellPtr
	ldr	r0, [sp, #8]
	cmp	r0, #0
	beq	.L6
	ldr	r2, [r4]
	ldr	r1, [r4, #4]
	add	r3, r0, #3
	add	r2, r2, r1
	add	r3, r5, r3
	cmp	r3, r2
	bls	.L4
.L9:
	ldr	r3, .L36+4
	ldr	r4, [r3]
.L1:
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L33
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	add	r0, r5, r0
	bl	get4byte
	ldr	r3, [r6]
	mov	r8, r0
	cmp	r3, #4
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, [sp, #16]
	ldr	r1, [r6]
	ldr	r0, [sp, #12]
	sub	r1, r1, #4
	sub	r0, r0, r3
	add	r0, r0, r1
	sub	r0, r0, #1
	bl	__aeabi_idiv
	cmp	r0, #0
	movle	r3, #0
	movgt	r3, #1
	mov	r5, r0
	cmp	r8, #0
	movne	r0, r3
	moveq	r0, #1
	bl	assert
	cmp	r5, #0
	sub	r5, r5, #1
	beq	.L6
	mov	r3, #0
	cmp	r8, #1
	ldrgt	r7, .L36+4
	str	r3, [sp]
	str	r3, [sp, #4]
	bgt	.L7
	b	.L9
.L35:
	ldr	r1, [sp, #4]
	cmp	r1, #0
	beq	.L34
.L11:
	ldr	r0, [r1, #8]
	bl	sqlite3PagerPageRefcount
	cmp	r0, #1
	ldreq	r1, [sp, #4]
	beq	.L14
	ldr	r4, [r7]
.L16:
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L17
	ldr	r0, [r3, #8]
	bl	sqlite3PagerUnref
.L17:
	cmp	r4, #0
	bne	.L1
	cmp	r5, #0
	ldr	r8, [sp]
	beq	.L6
	cmp	r8, #1
	str	r4, [sp]
	str	r4, [sp, #4]
	sub	r5, r5, #1
	ble	.L9
.L7:
	mov	r0, r6
	bl	btreePagecount
	cmp	r0, r8
	blt	.L9
	cmp	r5, #0
	beq	.L35
	mov	r3, sp
	mov	r1, r8
	mov	r0, r6
	add	r2, sp, #4
	bl	getOverflowPage
	subs	r4, r0, #0
	bne	.L1
	ldr	r1, [sp, #4]
	cmp	r1, #0
	bne	.L11
.L34:
	mov	r1, r8
	mov	r0, r6
	bl	btreePageLookup
	cmp	r0, #0
	mov	r1, r0
	str	r0, [sp, #4]
	bne	.L11
.L14:
	mov	r2, r8
	mov	r0, r6
	bl	freePage2
	mov	r4, r0
	b	.L16
.L6:
	ldr	r3, .L36+8
	ldr	r4, [r3]
	b	.L1
.L33:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LC0
	.word	SQLITE_CORRUPT_BKPT
	.word	SQLITE_OK
	.size	clearCell, .-clearCell
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_CORRUPT_BKPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
