	.file	"extr_sqlite3.c_relocatePage.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	relocatePage, @function
relocatePage:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, r9d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r15, QWORD PTR 8[rdi]
	mov	edi, 1
	mov	QWORD PTR [rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rsi]
	cmp	DWORD PTR PTRMAP_OVERFLOW2[rip], edx
	mov	QWORD PTR 8[rsp], rax
	je	.L2
	cmp	DWORD PTR PTRMAP_OVERFLOW1[rip], edx
	je	.L2
	cmp	DWORD PTR PTRMAP_BTREE[rip], edx
	je	.L2
	xor	edi, edi
	cmp	DWORD PTR PTRMAP_ROOTPAGE[rip], edx
	sete	dil
.L2:
	call	assert@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	sqlite3_mutex_held@PLT
	mov	edi, eax
	call	assert@PLT
	xor	edi, edi
	cmp	QWORD PTR 16[rbx], rbp
	sete	dil
	call	assert@PLT
	movsx	rdi, r12d
	call	TRACE@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	ecx, r14d
	mov	rdx, r13
	mov	rdi, r15
	call	sqlite3PagerMovepage@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 28[rsp], eax
	jne	.L1
	cmp	DWORD PTR PTRMAP_BTREE[rip], r12d
	mov	QWORD PTR [rbx], r13
	je	.L4
	cmp	DWORD PTR PTRMAP_ROOTPAGE[rip], r12d
	jne	.L5
.L4:
	mov	rdi, rbx
	call	setChildPtrmaps@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 28[rsp], eax
	je	.L8
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbx]
	call	get4byte@PLT
	test	rax, rax
	je	.L8
	mov	edx, DWORD PTR PTRMAP_OVERFLOW2[rip]
	mov	rcx, r13
	mov	rsi, rax
	mov	rdi, rbp
	lea	r8, 28[rsp]
	call	ptrmapPut@PLT
	mov	eax, DWORD PTR 28[rsp]
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	cmp	DWORD PTR PTRMAP_ROOTPAGE[rip], r12d
	jne	.L23
.L20:
	mov	eax, DWORD PTR 28[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rsi, QWORD PTR [rsp]
	xor	r8d, r8d
	xor	ecx, ecx
	lea	rdx, 32[rsp]
	mov	rdi, rbp
	call	btreeGetPage@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 28[rsp], eax
	jne	.L1
	mov	rax, QWORD PTR 32[rsp]
	mov	edi, DWORD PTR 8[rax]
	call	sqlite3PagerWrite@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 28[rsp], eax
	jne	.L24
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 32[rsp]
	mov	ecx, r12d
	mov	rdx, r13
	call	modifyPagePointer@PLT
	mov	rdi, QWORD PTR 32[rsp]
	mov	DWORD PTR 28[rsp], eax
	call	releasePage@PLT
	mov	eax, DWORD PTR 28[rsp]
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
	mov	rcx, QWORD PTR [rsp]
	lea	r8, 28[rsp]
	mov	edx, r12d
	mov	rsi, r13
	mov	rdi, rbp
	call	ptrmapPut@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, QWORD PTR 32[rsp]
	call	releasePage@PLT
	mov	eax, DWORD PTR 28[rsp]
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	relocatePage, .-relocatePage
	.comm	SQLITE_OK,4,4
	.comm	PTRMAP_ROOTPAGE,4,4
	.comm	PTRMAP_OVERFLOW2,4,4
	.comm	PTRMAP_OVERFLOW1,4,4
	.comm	PTRMAP_BTREE,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_relocatePage.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	relocatePage, %function
relocatePage:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r10, .L24
	sub	sp, sp, #36
	str	r3, [sp, #8]
	ldr	r3, [r10]
	mov	r4, r2
	cmp	r3, r2
	ldr	r3, .L24+4
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r3, [r1]
	mov	r5, r1
	ldr	r7, [r0, #4]
	ldr	r9, [sp, #72]
	str	r3, [sp, #12]
	beq	.L14
	ldr	r3, .L24+8
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L14
	ldr	r3, .L24+12
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L14
	ldr	fp, .L24+16
	ldr	r0, [fp]
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	b	.L2
.L14:
	mov	r0, #1
.L2:
	bl	assert
	ldr	r0, [r6]
	bl	sqlite3_mutex_held
	bl	assert
	ldr	r0, [r5, #12]
	ldr	r8, .L24+20
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r0, r4
	bl	TRACE
	ldr	r3, [sp, #76]
	mov	r2, r9
	mov	r0, r7
	ldr	r1, [r5, #4]
	bl	sqlite3PagerMovepage
	ldr	r3, [r8]
	str	r0, [sp, #24]
	cmp	r0, r3
	bne	.L1
	ldr	r3, .L24+12
	str	r9, [r5]
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L4
	ldr	fp, .L24+16
	ldr	r3, [fp]
	cmp	r3, r4
	bne	.L5
.L4:
	mov	r0, r5
	bl	setChildPtrmaps
	ldr	r3, [r8]
	str	r0, [sp, #24]
	cmp	r0, r3
	bne	.L1
	ldr	fp, .L24+16
.L8:
	ldr	r3, [fp]
	cmp	r3, r4
	beq	.L20
	mov	r3, #0
	mov	r0, r6
	str	r3, [sp]
	ldr	r1, [sp, #8]
	add	r2, sp, #20
	bl	btreeGetPage
	ldr	r3, [r8]
	str	r0, [sp, #24]
	cmp	r0, r3
	bne	.L1
	ldr	r3, [sp, #20]
	ldr	r0, [r3, #4]
	bl	sqlite3PagerWrite
	ldr	r3, [r8]
	str	r0, [sp, #24]
	cmp	r0, r3
	bne	.L22
	mov	r3, r4
	mov	r2, r9
	ldr	r1, [sp, #12]
	ldr	r0, [sp, #20]
	bl	modifyPagePointer
	mov	r3, r0
	ldr	r0, [sp, #20]
	str	r3, [sp, #24]
	bl	releasePage
	ldr	r3, [r8]
	ldr	r0, [sp, #24]
	cmp	r0, r3
	bne	.L1
	add	ip, sp, #24
	mov	r2, r4
	mov	r1, r9
	mov	r0, r6
	ldr	r3, [sp, #8]
	str	ip, [sp]
	bl	ptrmapPut
.L20:
	ldr	r0, [sp, #24]
.L1:
	ldr	r3, .L24+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r0, [r5, #8]
	bl	get4byte
	subs	r1, r0, #0
	beq	.L8
	add	r3, sp, #24
	str	r3, [sp]
	mov	r0, r6
	mov	r3, r9
	ldr	r2, [r10]
	bl	ptrmapPut
	ldr	r0, [sp, #24]
	ldr	r3, [r8]
	cmp	r0, r3
	bne	.L1
	b	.L8
.L22:
	ldr	r0, [sp, #20]
	bl	releasePage
	ldr	r0, [sp, #24]
	b	.L1
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	PTRMAP_OVERFLOW2
	.word	.LC0
	.word	PTRMAP_OVERFLOW1
	.word	PTRMAP_BTREE
	.word	PTRMAP_ROOTPAGE
	.word	SQLITE_OK
	.size	relocatePage, .-relocatePage
	.comm	SQLITE_OK,4,4
	.comm	PTRMAP_ROOTPAGE,4,4
	.comm	PTRMAP_OVERFLOW2,4,4
	.comm	PTRMAP_OVERFLOW1,4,4
	.comm	PTRMAP_BTREE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
