	.file	"extr_pager.c_readDbPage.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	readDbPage, @function
readDbPage:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR 16[rdi]
	xor	edi, edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	mov	rax, QWORD PTR PAGER_READER[rip]
	cmp	QWORD PTR [r12], rax
	jl	.L2
	mov	eax, DWORD PTR MEMDB[rip]
	xor	edi, edi
	test	eax, eax
	sete	dil
.L2:
	call	assert@PLT
	mov	edi, DWORD PTR 24[r12]
	call	isOpen@PLT
	mov	edi, eax
	call	assert@PLT
	mov	rdi, r12
	call	pagerUseWal@PLT
	test	rax, rax
	jne	.L3
.L7:
	mov	rsi, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 16[r12]
	mov	r8, QWORD PTR 8[rbp]
	test	rsi, rsi
	je	.L17
	mov	edi, DWORD PTR 28[r12]
	mov	rcx, r8
	call	sqlite3WalReadFrame@PLT
.L8:
	mov	edx, DWORD PTR 0[rbp]
	cmp	edx, 1
	je	.L18
.L9:
	mov	r13d, DWORD PTR SQLITE_NOMEM_BKPT[rip]
	mov	rsi, QWORD PTR 8[rbp]
	mov	ecx, 3
	mov	rdi, r12
	mov	r8d, r13d
	call	CODEC1@PLT
	mov	edi, DWORD PTR sqlite3_pager_readdb_count[rip]
	call	PAGER_INCR@PLT
	mov	edi, DWORD PTR 8[r12]
	call	PAGER_INCR@PLT
	movsx	rdi, DWORD PTR 0[rbp]
	call	IOTRACE@PLT
	mov	rdi, r12
	call	PAGERID@PLT
	mov	rdi, rbp
	call	pager_pagehash@PLT
	movsx	rdi, eax
	call	PAGERTRACE@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	mov	edi, DWORD PTR 24[r12]
	mov	rsi, r8
	lea	ecx, -1[rax]
	imul	ecx, edx
	call	sqlite3OsRead@PLT
	cmp	DWORD PTR SQLITE_IOERR_SHORT_READ[rip], eax
	jne	.L8
	mov	edx, DWORD PTR 0[rbp]
	mov	eax, DWORD PTR SQLITE_OK[rip]
	cmp	edx, 1
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	test	eax, eax
	je	.L10
	mov	edi, DWORD PTR 12[r12]
	mov	edx, 4
	mov	esi, 255
	call	memset@PLT
	mov	edx, DWORD PTR 0[rbp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, DWORD PTR 28[r12]
	mov	esi, DWORD PTR 0[rbp]
	mov	rdx, rsp
	call	sqlite3WalFindFrame@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L7
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, 4
	lea	rdi, 12[r12]
	lea	rsi, 96[rax]
	call	memcpy@PLT
	mov	edx, DWORD PTR 0[rbp]
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	readDbPage, .-readDbPage
	.comm	sqlite3_pager_readdb_count,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	SQLITE_IOERR_SHORT_READ,4,4
	.comm	PAGER_READER,8,8
	.comm	MEMDB,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_pager.c_readDbPage.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	readDbPage, %function
readDbPage:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r0, #0
	ldr	r5, [r4, #8]
	ldr	r3, .L18
	ldr	r2, [r5]
	ldr	r3, [r3]
	ldr	r1, .L18+4
	cmp	r2, r3
	ldrge	r3, .L18+8
	sub	sp, sp, #16
	ldr	r1, [r1]
	str	r1, [sp, #12]
	mov	r1,#0
	str	r0, [sp, #8]
	ldrge	r0, [r3]
	clzge	r0, r0
	lsrge	r0, r0, #5
	bl	assert
	ldr	r0, [r5, #16]
	bl	isOpen
	bl	assert
	mov	r0, r5
	bl	pagerUseWal
	cmp	r0, #0
	bne	.L3
.L7:
	ldr	r1, [sp, #8]
	ldr	r2, [r5, #12]
	cmp	r1, #0
	ldr	r3, [r4, #4]
	bne	.L4
	ldr	r0, [r4]
	mov	r1, r3
	sub	r3, r0, #1
	mul	r3, r2, r3
	ldr	r0, [r5, #16]
	bl	sqlite3OsRead
	ldr	r3, .L18+12
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r3, r0
	ldreq	r3, .L18+16
	ldreq	r0, [r3]
	cmp	r2, #1
	beq	.L16
.L9:
	ldr	r3, .L18+20
	mov	r0, r5
	ldr	r6, [r3]
	mov	r3, #3
	str	r6, [sp]
	ldr	r1, [r4, #4]
	bl	CODEC1
	ldr	r3, .L18+24
	ldr	r0, [r3]
	bl	PAGER_INCR
	ldr	r0, [r5, #4]
	bl	PAGER_INCR
	ldr	r0, [r4]
	bl	IOTRACE
	mov	r0, r5
	bl	PAGERID
	mov	r0, r4
	bl	pager_pagehash
	bl	PAGERTRACE
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r6
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L4:
	ldr	r0, [r5, #20]
	bl	sqlite3WalReadFrame
	ldr	r2, [r4]
	cmp	r2, #1
	bne	.L9
.L16:
	cmp	r0, #0
	beq	.L10
	mov	r2, #4
	mov	r1, #255
	ldr	r0, [r5, #8]
	bl	memset
	ldr	r2, [r4]
	b	.L9
.L3:
	ldr	r1, [r4]
	ldr	r0, [r5, #20]
	add	r2, sp, #8
	bl	sqlite3WalFindFrame
	subs	r6, r0, #0
	beq	.L7
	b	.L1
.L10:
	ldr	r1, [r4, #4]
	mov	r2, #4
	add	r1, r1, #96
	add	r0, r5, #8
	bl	memcpy
	ldr	r2, [r4]
	b	.L9
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	PAGER_READER
	.word	.LC0
	.word	MEMDB
	.word	SQLITE_IOERR_SHORT_READ
	.word	SQLITE_OK
	.word	SQLITE_NOMEM_BKPT
	.word	sqlite3_pager_readdb_count
	.size	readDbPage, .-readDbPage
	.comm	sqlite3_pager_readdb_count,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	SQLITE_IOERR_SHORT_READ,4,4
	.comm	PAGER_READER,4,4
	.comm	MEMDB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
