	.file	"extr_sqlite3.c_btreeDropTable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	btreeDropTable, @function
btreeDropTable:
.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
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	r12, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 8[rsp], 0
	call	sqlite3BtreeHoldsMutex@PLT
	mov	edi, eax
	call	assert@PLT
	mov	rax, QWORD PTR TRANS_WRITE[rip]
	xor	edi, edi
	cmp	QWORD PTR 0[rbp], rax
	sete	dil
	call	assert@PLT
	xor	edi, edi
	cmp	ebx, 1
	setg	dil
	call	assert@PLT
	mov	rdi, r12
	call	btreePagecount@PLT
	cmp	eax, ebx
	jge	.L2
	mov	eax, DWORD PTR SQLITE_CORRUPT_BKPT[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L20
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L2:
	.cfi_restore_state
	lea	rdx, 8[rsp]
	xor	ecx, ecx
	mov	esi, ebx
	mov	rdi, r12
	call	btreeGetPage@PLT
	mov	DWORD PTR [rsp], eax
	test	eax, eax
	jne	.L1
	xor	edx, edx
	mov	esi, ebx
	mov	rdi, rbp
	call	sqlite3BtreeClearTable@PLT
	mov	DWORD PTR [rsp], eax
	test	eax, eax
	jne	.L18
	cmp	QWORD PTR [r12], 0
	mov	DWORD PTR 0[r13], 0
	je	.L5
	mov	esi, DWORD PTR BTREE_LARGEST_ROOT_PAGE[rip]
	lea	rdx, 4[rsp]
	mov	rdi, rbp
	call	sqlite3BtreeGetMeta@PLT
	cmp	DWORD PTR 4[rsp], ebx
	je	.L21
	mov	rdi, QWORD PTR 8[rsp]
	lea	r14, 16[rsp]
	call	releasePage@PLT
	mov	esi, DWORD PTR 4[rsp]
	xor	ecx, ecx
	mov	rdx, r14
	mov	rdi, r12
	call	btreeGetPage@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR [rsp], eax
	jne	.L1
	mov	edx, DWORD PTR PTRMAP_ROOTPAGE[rip]
	mov	rsi, QWORD PTR 16[rsp]
	xor	r9d, r9d
	xor	ecx, ecx
	mov	r8d, ebx
	mov	rdi, r12
	call	relocatePage@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	DWORD PTR [rsp], eax
	call	releasePage@PLT
	mov	eax, DWORD PTR [rsp]
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
	mov	esi, DWORD PTR 4[rsp]
	xor	ecx, ecx
	mov	rdx, r14
	mov	rdi, r12
	mov	QWORD PTR 16[rsp], 0
	call	btreeGetPage@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, rsp
	mov	DWORD PTR [rsp], eax
	call	freePage@PLT
	mov	rdi, QWORD PTR 16[rsp]
	call	releasePage@PLT
	mov	eax, DWORD PTR [rsp]
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
	mov	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR 0[r13], eax
	.p2align 4,,10
	.p2align 3
.L10:
	sub	eax, 1
	mov	DWORD PTR 4[rsp], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	mov	esi, DWORD PTR 4[rsp]
.L12:
	sub	esi, 1
	mov	DWORD PTR 4[rsp], esi
.L11:
	mov	rdi, r12
	call	PENDING_BYTE_PAGE@PLT
	mov	esi, DWORD PTR 4[rsp]
	cmp	eax, esi
	je	.L12
	mov	rdi, r12
	call	PTRMAP_ISPAGE@PLT
	test	rax, rax
	jne	.L22
	mov	rdi, r12
	call	PENDING_BYTE_PAGE@PLT
	xor	edi, edi
	cmp	DWORD PTR 4[rsp], eax
	setne	dil
	call	assert@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, 4
	mov	rdi, rbp
	call	sqlite3BtreeUpdateMeta@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR 8[rsp]
	mov	rsi, rsp
	call	freePage@PLT
.L18:
	mov	rdi, QWORD PTR 8[rsp]
	call	releasePage@PLT
	mov	eax, DWORD PTR [rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, QWORD PTR 8[rsp]
	mov	rsi, rsp
	call	freePage@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	releasePage@PLT
	mov	eax, DWORD PTR [rsp]
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
	mov	eax, DWORD PTR 4[rsp]
	jmp	.L10
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	btreeDropTable, .-btreeDropTable
	.comm	TRANS_WRITE,8,8
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_CORRUPT_BKPT,4,4
	.comm	PTRMAP_ROOTPAGE,4,4
	.comm	BTREE_LARGEST_ROOT_PAGE,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_btreeDropTable.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	btreeDropTable, %function
btreeDropTable:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r8, #0
	mov	r5, r0
	ldr	r3, .L23
	sub	sp, sp, #36
	mov	r4, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r6, [r0, #4]
	str	r8, [sp, #16]
	bl	sqlite3BtreeHoldsMutex
	bl	assert
	ldr	r3, .L23+4
	ldr	r0, [r5]
	ldr	r3, [r3]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	cmp	r4, #1
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	mov	r0, r6
	bl	btreePagecount
	cmp	r0, r4
	bge	.L2
	ldr	r3, .L23+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	mov	r3, r8
	mov	r1, r4
	mov	r0, r6
	add	r2, sp, #16
	bl	btreeGetPage
	cmp	r0, #0
	str	r0, [sp, #12]
	bne	.L1
	mov	r2, r0
	mov	r1, r4
	mov	r0, r5
	bl	sqlite3BtreeClearTable
	cmp	r0, #0
	mov	r8, r0
	str	r0, [sp, #12]
	bne	.L18
	ldr	r3, [r6]
	str	r0, [r7]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L23+12
	mov	r0, r5
	ldr	r1, [r3]
	add	r2, sp, #20
	bl	sqlite3BtreeGetMeta
	ldr	r3, [sp, #20]
	cmp	r3, r4
	beq	.L21
	ldr	r0, [sp, #16]
	bl	releasePage
	mov	r3, r8
	mov	r0, r6
	ldr	r1, [sp, #20]
	add	r2, sp, #24
	bl	btreeGetPage
	ldr	r9, .L23+16
	str	r0, [sp, #12]
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L1
	stm	sp, {r4, r8}
	ldr	r3, .L23+20
	ldr	r1, [sp, #24]
	ldr	r2, [r3]
	mov	r0, r6
	mov	r3, r8
	bl	relocatePage
	mov	r3, r0
	ldr	r0, [sp, #24]
	str	r3, [sp, #12]
	bl	releasePage
	ldr	r0, [sp, #12]
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L1
	add	r2, sp, #24
	mov	r3, r8
	ldr	r1, [sp, #20]
	mov	r0, r6
	str	r8, [sp, #24]
	bl	btreeGetPage
	mov	r3, r0
	add	r1, sp, #12
	ldr	r0, [sp, #24]
	str	r3, [sp, #12]
	bl	freePage
	ldr	r0, [sp, #24]
	bl	releasePage
	ldr	r3, [r9]
	ldr	r0, [sp, #12]
	cmp	r0, r3
	bne	.L1
	ldr	r3, [sp, #20]
	str	r3, [r7]
.L10:
	sub	r3, r3, #1
	str	r3, [sp, #20]
	b	.L11
.L22:
	ldr	r1, [sp, #20]
.L12:
	sub	r1, r1, #1
	str	r1, [sp, #20]
.L11:
	mov	r0, r6
	bl	PENDING_BYTE_PAGE
	ldr	r1, [sp, #20]
	cmp	r0, r1
	beq	.L12
	mov	r0, r6
	bl	PTRMAP_ISPAGE
	cmp	r0, #0
	bne	.L22
	mov	r0, r6
	bl	PENDING_BYTE_PAGE
	ldr	r3, [sp, #20]
	subs	r0, r3, r0
	movne	r0, #1
	bl	assert
	mov	r0, r5
	mov	r1, #4
	ldr	r2, [sp, #20]
	bl	sqlite3BtreeUpdateMeta
	b	.L1
.L5:
	ldr	r0, [sp, #16]
	add	r1, sp, #12
	bl	freePage
.L18:
	ldr	r0, [sp, #16]
	bl	releasePage
	ldr	r0, [sp, #12]
	b	.L1
.L21:
	add	r1, sp, #12
	ldr	r0, [sp, #16]
	bl	freePage
	ldr	r0, [sp, #16]
	bl	releasePage
	ldr	r3, .L23+16
	ldr	r0, [sp, #12]
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L1
	ldr	r3, [sp, #20]
	b	.L10
.L20:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC0
	.word	TRANS_WRITE
	.word	SQLITE_CORRUPT_BKPT
	.word	BTREE_LARGEST_ROOT_PAGE
	.word	SQLITE_OK
	.word	PTRMAP_ROOTPAGE
	.size	btreeDropTable, .-btreeDropTable
	.comm	TRANS_WRITE,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_CORRUPT_BKPT,4,4
	.comm	PTRMAP_ROOTPAGE,4,4
	.comm	BTREE_LARGEST_ROOT_PAGE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
