	.file	"extr_sqlite3.c_pager_playback.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"recovered %d pages from %s"
	.text
	.p2align 4
	.type	pager_playback, @function
pager_playback:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	r12, QWORD PTR 48[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	mov	edi, DWORD PTR 56[rdi]
	mov	DWORD PTR 36[rsp], 0
	mov	DWORD PTR 40[rsp], 1
	mov	DWORD PTR 44[rsp], eax
	call	isOpen@PLT
	mov	edi, eax
	call	assert@PLT
	mov	edi, DWORD PTR 56[r15]
	lea	rsi, 48[rsp]
	call	sqlite3OsFileSize@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	je	.L45
	mov	r14d, eax
	mov	eax, DWORD PTR 60[r15]
	mov	DWORD PTR 64[r15], eax
.L29:
	mov	rdi, r15
	call	setSectorSize@PLT
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L46
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L45:
	.cfi_restore_state
	mov	rax, QWORD PTR 48[r15]
	mov	r13, QWORD PTR 8[r15]
	mov	edi, DWORD PTR 56[r15]
	mov	rdx, QWORD PTR [rax]
	mov	rsi, r13
	add	rdx, 1
	call	readMasterJournal@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r14d, eax
	je	.L47
.L3:
	mov	eax, DWORD PTR 60[r15]
	mov	DWORD PTR 64[r15], eax
	jmp	.L29
.L47:
	cmp	BYTE PTR 0[r13], 0
	jne	.L4
.L8:
	mov	r12d, DWORD PTR 40[rsp]
	test	r12d, r12d
	je	.L48
	lea	rax, 36[rsp]
	test	ebp, ebp
	mov	rdx, QWORD PTR 48[rsp]
	mov	r13d, ebp
	mov	QWORD PTR 8[rsp], rax
	lea	rax, 32[rsp]
	lea	rbx, 16[r15]
	mov	QWORD PTR 16[r15], 0
	mov	QWORD PTR [rsp], rax
	setne	BYTE PTR 31[rsp]
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L22:
	mov	r8, QWORD PTR 8[rsp]
	mov	rcx, QWORD PTR [rsp]
	mov	esi, ebp
	mov	rdi, r15
	call	readJournalHdr@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r14d, eax
	jne	.L49
	mov	edx, DWORD PTR 32[rsp]
	cmp	edx, -1
	je	.L50
	or	edx, ebp
	je	.L12
.L43:
	mov	r14, QWORD PTR 16[r15]
.L13:
	mov	rdi, r15
	call	JOURNAL_HDR_SZ@PLT
	cmp	rax, r14
	je	.L51
.L14:
	mov	edx, DWORD PTR 32[rsp]
	test	edx, edx
	jle	.L16
	test	r13d, r13d
	je	.L17
	mov	rdi, r15
	call	pager_reset@PLT
.L17:
	xor	r13d, r13d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L53:
	add	r12d, 1
	add	r13d, 1
	cmp	DWORD PTR 32[rsp], r13d
	jle	.L52
.L19:
	xor	r8d, r8d
	xor	edx, edx
	mov	ecx, 1
	mov	rsi, rbx
	mov	rdi, r15
	call	pager_playback_one_page@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r14d, eax
	je	.L53
	cmp	DWORD PTR SQLITE_DONE[rip], eax
	jne	.L20
	mov	rdx, QWORD PTR 48[rsp]
	xor	r13d, r13d
	mov	QWORD PTR 16[r15], rdx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L52:
	xor	r13d, r13d
.L16:
	mov	rdx, QWORD PTR 48[rsp]
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L51:
	mov	esi, DWORD PTR 36[rsp]
	mov	rdi, r15
	call	pager_truncate@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r14d, eax
	jne	.L54
	mov	eax, DWORD PTR 36[rsp]
	mov	DWORD PTR 72[r15], eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L50:
	mov	r14, QWORD PTR 16[r15]
	mov	rdi, r15
	call	JOURNAL_HDR_SZ@PLT
	xor	edi, edi
	cmp	r14, rax
	sete	dil
	call	assert@PLT
	mov	r14, QWORD PTR 48[rsp]
	mov	rdi, r15
	call	JOURNAL_HDR_SZ@PLT
	mov	rdi, r15
	sub	r14, rax
	call	JOURNAL_PG_SZ@PLT
	mov	r8, rax
	mov	rax, r14
	cqo
	idiv	r8
	mov	edx, eax
	mov	DWORD PTR 32[rsp], eax
	or	edx, ebp
	jne	.L43
.L12:
	mov	rax, QWORD PTR 24[r15]
	mov	rdi, r15
	mov	QWORD PTR 16[rsp], rax
	call	JOURNAL_HDR_SZ@PLT
	mov	r14, QWORD PTR 16[r15]
	add	rax, QWORD PTR 16[rsp]
	cmp	rax, r14
	jne	.L13
	mov	rax, QWORD PTR 48[rsp]
	mov	rdi, r15
	sub	rax, r14
	mov	r14, rax
	call	JOURNAL_PG_SZ@PLT
	mov	r8, rax
	mov	rax, r14
	cqo
	idiv	r8
	mov	DWORD PTR 32[rsp], eax
	jmp	.L43
.L4:
	mov	edx, DWORD PTR SQLITE_ACCESS_EXISTS[rip]
	lea	rcx, 40[rsp]
	mov	rsi, r13
	mov	rdi, r12
	call	sqlite3OsAccess@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r14d, eax
	je	.L8
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L49:
	test	r12d, r12d
	setne	bl
	and	bl, BYTE PTR 31[rsp]
	cmp	DWORD PTR SQLITE_DONE[rip], eax
	je	.L5
.L10:
	mov	eax, DWORD PTR 60[r15]
	mov	DWORD PTR 64[r15], eax
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L48:
	xor	ebx, ebx
.L5:
	lea	rsi, 44[rsp]
	mov	edx, -1
	mov	rdi, r15
	call	sqlite3PagerSetPagesize@PLT
	mov	r14d, eax
	mov	eax, DWORD PTR 60[r15]
	cmp	r14d, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 64[r15], eax
	jne	.L26
	mov	rax, QWORD PTR 48[r15]
	mov	rbp, QWORD PTR 8[r15]
	mov	edi, DWORD PTR 56[r15]
	mov	rdx, QWORD PTR [rax]
	mov	rsi, rbp
	add	rdx, 1
	call	readMasterJournal@PLT
	xor	edi, edi
	cmp	DWORD PTR SQLITE_OK[rip], eax
	setne	dil
	mov	r14d, eax
	call	testcase@PLT
	cmp	DWORD PTR SQLITE_OK[rip], r14d
	jne	.L26
	mov	rax, QWORD PTR 32[r15]
	cmp	rax, QWORD PTR PAGER_WRITER_DBMOD[rip]
	jge	.L24
	cmp	rax, QWORD PTR PAGER_OPEN[rip]
	je	.L24
.L27:
	xor	esi, esi
	cmp	BYTE PTR 0[rbp], 0
	mov	rdi, r15
	setne	sil
	xor	edx, edx
	call	pager_end_transaction@PLT
	xor	edi, edi
	cmp	DWORD PTR SQLITE_OK[rip], eax
	setne	dil
	mov	r14d, eax
	call	testcase@PLT
	cmp	DWORD PTR SQLITE_OK[rip], r14d
	jne	.L26
	cmp	BYTE PTR 0[rbp], 0
	je	.L26
	mov	eax, DWORD PTR 40[rsp]
	test	eax, eax
	jne	.L55
.L26:
	test	bl, bl
	je	.L29
	mov	ecx, DWORD PTR 40[r15]
	mov	edi, DWORD PTR SQLITE_NOTICE_RECOVER_ROLLBACK[rip]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	sqlite3_log@PLT
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L24:
	xor	esi, esi
	mov	rdi, r15
	call	sqlite3PagerSync@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r14d, eax
	jne	.L26
	jmp	.L27
.L55:
	mov	rdi, r15
	mov	rsi, rbp
	call	pager_delmaster@PLT
	xor	edi, edi
	cmp	DWORD PTR SQLITE_OK[rip], eax
	setne	dil
	mov	r14d, eax
	call	testcase@PLT
	jmp	.L26
.L20:
	test	r12d, r12d
	setne	bl
	and	bl, BYTE PTR 31[rsp]
	cmp	DWORD PTR SQLITE_IOERR_SHORT_READ[rip], eax
	jne	.L10
	jmp	.L5
.L54:
	test	r12d, r12d
	setne	bl
	and	bl, BYTE PTR 31[rsp]
	jmp	.L10
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pager_playback, .-pager_playback
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOTICE_RECOVER_ROLLBACK,4,4
	.comm	SQLITE_IOERR_SHORT_READ,4,4
	.comm	SQLITE_FCNTL_DB_UNCHANGED,4,4
	.comm	SQLITE_DONE,4,4
	.comm	SQLITE_ACCESS_EXISTS,4,4
	.comm	PAGER_WRITER_DBMOD,8,8
	.comm	PAGER_OPEN,8,8
	.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_pager_playback.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"recovered %d pages from %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pager_playback, %function
pager_playback:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r3, #1
	mov	r2, #0
	mov	r6, r0
	ldr	ip, [r0]
	mov	fp, r1
	ldr	r1, .L63
	sub	sp, sp, #44
	ldr	r0, [r0, #28]
	ldr	r1, [r1]
	str	r1, [sp, #36]
	mov	r1,#0
	ldr	r5, [r6, #24]
	str	r3, [sp, #28]
	str	ip, [sp, #32]
	str	r2, [sp, #24]
	bl	isOpen
	bl	assert
	ldr	r0, [r6, #28]
	add	r1, sp, #16
	bl	sqlite3OsFileSize
	ldr	r8, .L63+4
	ldr	r3, [r8]
	cmp	r3, r0
	beq	.L52
	mov	r4, r0
	ldr	r3, [r6, #32]
	str	r3, [r6, #36]
.L29:
	mov	r0, r6
	bl	setSectorSize
	ldr	r3, .L63
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L53
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L52:
	ldr	r3, [r6, #24]
	ldr	r7, [r6, #4]
	ldr	r2, [r3]
	mov	r1, r7
	ldr	r0, [r6, #28]
	add	r2, r2, #1
	bl	readMasterJournal
	ldr	r3, [r8]
	mov	r4, r0
	cmp	r3, r0
	beq	.L54
.L3:
	ldr	r3, [r6, #32]
	str	r3, [r6, #36]
	b	.L29
.L54:
	ldrb	r3, [r7]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L4
.L8:
	ldr	r7, [sp, #28]
	cmp	r7, #0
	beq	.L55
	mov	r3, #0
	subs	r2, fp, r3
	movne	r2, #1
	mov	r10, r6
	mov	r7, r3
	mov	r5, fp
	str	r2, [sp, #12]
	ldr	r2, [sp, #16]
	str	r3, [r10, #8]!
.L21:
	mov	r9, #0
.L22:
	add	r3, sp, #24
	str	r3, [sp]
	mov	r1, fp
	add	r3, sp, #20
	mov	r0, r6
	bl	readJournalHdr
	ldr	r3, [r8]
	cmp	r3, r0
	bne	.L56
	ldr	r0, [sp, #20]
	cmn	r0, #1
	beq	.L57
	orrs	r3, r0, fp
	beq	.L12
.L62:
	ldr	r4, [r6, #8]
.L13:
	mov	r0, r6
	bl	JOURNAL_HDR_SZ
	cmp	r0, r4
	beq	.L58
.L14:
	ldr	r3, [sp, #20]
	cmp	r3, #0
	ble	.L16
	cmp	r5, #0
	beq	.L17
	mov	r0, r6
	bl	pager_reset
.L17:
	mov	r4, #0
	b	.L19
.L60:
	ldr	r3, [sp, #20]
	add	r4, r4, #1
	cmp	r3, r4
	add	r7, r7, #1
	ble	.L59
.L19:
	mov	r3, #1
	mov	r2, #0
	mov	r1, r10
	mov	r0, r6
	str	r9, [sp]
	bl	pager_playback_one_page
	ldr	r3, [r8]
	cmp	r3, r0
	beq	.L60
	ldr	r3, .L63+8
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L20
	ldr	r2, [sp, #16]
	mov	r5, #0
	str	r2, [r6, #8]
	b	.L21
.L59:
	mov	r5, #0
.L16:
	ldr	r2, [sp, #16]
	b	.L22
.L58:
	mov	r0, r6
	ldr	r1, [sp, #24]
	bl	pager_truncate
	ldr	r3, [r8]
	cmp	r3, r0
	bne	.L61
	ldr	r3, [sp, #24]
	str	r3, [r6, #44]
	b	.L14
.L57:
	mov	r0, r6
	ldr	r4, [r6, #8]
	bl	JOURNAL_HDR_SZ
	sub	r0, r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r0, r6
	ldr	r4, [sp, #16]
	bl	JOURNAL_HDR_SZ
	sub	r4, r4, r0
	mov	r0, r6
	bl	JOURNAL_PG_SZ
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_idiv
	orrs	r3, r0, fp
	str	r0, [sp, #20]
	bne	.L62
.L12:
	ldr	r3, [r6, #12]
	mov	r0, r6
	str	r3, [sp, #8]
	bl	JOURNAL_HDR_SZ
	ldr	r3, [sp, #8]
	ldr	r4, [r6, #8]
	add	r3, r3, r0
	cmp	r3, r4
	bne	.L13
	ldr	r3, [sp, #16]
	mov	r0, r6
	sub	r4, r3, r4
	bl	JOURNAL_PG_SZ
	mov	r1, r0
	mov	r0, r4
	bl	__aeabi_idiv
	ldr	r4, [r6, #8]
	str	r0, [sp, #20]
	b	.L13
.L4:
	ldr	r3, .L63+12
	mov	r1, r7
	ldr	r2, [r3]
	mov	r0, r5
	add	r3, sp, #28
	bl	sqlite3OsAccess
	ldr	r3, [r8]
	mov	r4, r0
	cmp	r3, r0
	beq	.L8
	b	.L3
.L56:
	mov	r4, r0
	ldr	r3, .L63+8
.L50:
	ldr	r3, [r3]
	cmp	r7, #0
	ldr	r9, [sp, #12]
	moveq	r9, #0
	cmp	r3, r4
	beq	.L5
.L10:
	ldr	r3, [r6, #32]
	str	r3, [r6, #36]
.L26:
	cmp	r9, #0
	beq	.L29
	ldr	r3, .L63+16
	mov	r2, r7
	ldr	r0, [r3]
	ldr	r1, .L63+20
	ldr	r3, [r6, #20]
	bl	sqlite3_log
	b	.L29
.L55:
	mov	r9, r7
.L5:
	mvn	r2, #0
	mov	r0, r6
	add	r1, sp, #32
	bl	sqlite3PagerSetPagesize
	ldr	r2, [r8]
	ldr	r3, [r6, #32]
	cmp	r0, r2
	mov	r4, r0
	str	r3, [r6, #36]
	bne	.L26
	ldr	r3, [r6, #24]
	ldr	r5, [r6, #4]
	ldr	r2, [r3]
	mov	r1, r5
	add	r2, r2, #1
	ldr	r0, [r6, #28]
	bl	readMasterJournal
	mov	r4, r0
	ldr	r0, [r8]
	subs	r0, r0, r4
	movne	r0, #1
	bl	testcase
	ldr	r3, [r8]
	cmp	r3, r4
	bne	.L26
	ldr	r2, .L63+24
	ldr	r3, [r6, #16]
	ldr	r2, [r2]
	cmp	r3, r2
	bge	.L24
	ldr	r2, .L63+28
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L24
.L27:
	mov	r2, #0
	ldrb	r1, [r5]	@ zero_extendqisi2
	mov	r0, r6
	subs	r1, r1, r2
	movne	r1, #1
	bl	pager_end_transaction
	mov	r4, r0
	ldr	r0, [r8]
	subs	r0, r0, r4
	movne	r0, #1
	bl	testcase
	ldr	r3, [r8]
	cmp	r3, r4
	bne	.L26
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L26
	ldr	r3, [sp, #28]
	cmp	r3, #0
	beq	.L26
	mov	r1, r5
	mov	r0, r6
	bl	pager_delmaster
	mov	r4, r0
	ldr	r0, [r8]
	subs	r0, r0, r4
	movne	r0, #1
	bl	testcase
	b	.L26
.L24:
	mov	r1, #0
	mov	r0, r6
	bl	sqlite3PagerSync
	ldr	r3, [r8]
	mov	r4, r0
	cmp	r3, r0
	bne	.L26
	b	.L27
.L20:
	mov	r4, r0
	ldr	r3, .L63+32
	b	.L50
.L61:
	cmp	r7, #0
	ldr	r9, [sp, #12]
	mov	r4, r0
	moveq	r9, #0
	b	.L10
.L53:
	bl	__stack_chk_fail
.L64:
	.align	2
.L63:
	.word	.LC1
	.word	SQLITE_OK
	.word	SQLITE_DONE
	.word	SQLITE_ACCESS_EXISTS
	.word	SQLITE_NOTICE_RECOVER_ROLLBACK
	.word	.LC0
	.word	PAGER_WRITER_DBMOD
	.word	PAGER_OPEN
	.word	SQLITE_IOERR_SHORT_READ
	.size	pager_playback, .-pager_playback
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOTICE_RECOVER_ROLLBACK,4,4
	.comm	SQLITE_IOERR_SHORT_READ,4,4
	.comm	SQLITE_FCNTL_DB_UNCHANGED,4,4
	.comm	SQLITE_DONE,4,4
	.comm	SQLITE_ACCESS_EXISTS,4,4
	.comm	PAGER_WRITER_DBMOD,4,4
	.comm	PAGER_OPEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
