	.file	"extr_sqlite3.c_pagerOpenWal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pagerOpenWal, @function
pagerOpenWal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	xor	edi, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	QWORD PTR 0[rbp], 0
	mov	r12d, DWORD PTR SQLITE_OK[rip]
	jne	.L2
	xor	edi, edi
	cmp	QWORD PTR 8[rbp], 0
	sete	dil
.L2:
	call	assert@PLT
	mov	rax, QWORD PTR 16[rbp]
	cmp	rax, QWORD PTR SHARED_LOCK[rip]
	mov	edi, 1
	je	.L3
	xor	edi, edi
	cmp	QWORD PTR EXCLUSIVE_LOCK[rip], rax
	sete	dil
.L3:
	call	assert@PLT
	cmp	QWORD PTR 32[rbp], 0
	jne	.L11
	cmp	DWORD PTR SQLITE_OK[rip], r12d
	je	.L12
.L5:
	mov	rdi, rbp
	call	pagerFixMaplimit@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	pagerExclusiveLock@PLT
	mov	r12d, eax
	cmp	DWORD PTR SQLITE_OK[rip], r12d
	jne	.L5
.L12:
	mov	rcx, QWORD PTR 32[rbp]
	mov	edx, DWORD PTR 40[rbp]
	mov	r9, rbp
	mov	esi, DWORD PTR 44[rbp]
	mov	edi, DWORD PTR 48[rbp]
	mov	r8d, DWORD PTR 24[rbp]
	call	sqlite3WalOpen@PLT
	mov	r12d, eax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	pagerOpenWal, .-pagerOpenWal
	.comm	SQLITE_OK,4,4
	.comm	SHARED_LOCK,8,8
	.comm	EXCLUSIVE_LOCK,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_pagerOpenWal.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pagerOpenWal, %function
pagerOpenWal:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r4, r0
	ldreq	r0, [r0, #4]
	ldr	r6, .L15
	clzeq	r0, r0
	movne	r0, #0
	sub	sp, sp, #8
	lsreq	r0, r0, #5
	ldr	r5, [r6]
	bl	assert
	ldr	r2, .L15+4
	ldr	r3, [r4, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	ldrne	r2, .L15+8
	moveq	r0, #1
	ldrne	r0, [r2]
	subne	r0, r0, r3
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	assert
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L13
	ldr	r3, [r6]
	cmp	r3, r5
	beq	.L14
.L5:
	mov	r0, r4
	bl	pagerFixMaplimit
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, r4
	bl	pagerExclusiveLock
	mov	r5, r0
	ldr	r3, [r6]
	cmp	r3, r5
	bne	.L5
.L14:
	ldr	r3, [r4, #12]
	stm	sp, {r3, r4}
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #20]
	ldr	r1, [r4, #24]
	ldr	r0, [r4, #28]
	bl	sqlite3WalOpen
	mov	r5, r0
	b	.L5
.L16:
	.align	2
.L15:
	.word	SQLITE_OK
	.word	SHARED_LOCK
	.word	EXCLUSIVE_LOCK
	.size	pagerOpenWal, .-pagerOpenWal
	.comm	SQLITE_OK,4,4
	.comm	SHARED_LOCK,4,4
	.comm	EXCLUSIVE_LOCK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
