	.file	"extr_sqlite3.c_btreeCursor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	btreeCursor, @function
btreeCursor:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movsx	rbp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 8[rdi]
	call	sqlite3BtreeHoldsMutex@PLT
	mov	edi, eax
	call	assert@PLT
	xor	edx, edx
	test	r15, r15
	setne	dl
	test	r14d, r14d
	je	.L2
	mov	eax, DWORD PTR BTREE_WRCSR[rip]
	mov	edi, 1
	cmp	eax, r14d
	je	.L3
	or	eax, DWORD PTR BTREE_FORDELETE[rip]
	xor	edi, edi
	cmp	eax, r14d
	sete	dil
.L3:
	mov	DWORD PTR 12[rsp], edx
	call	assert@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	ecx, 2
	mov	esi, ebp
	mov	rdi, r12
	call	hasSharedCacheTableLock@PLT
	mov	edi, eax
	call	assert@PLT
	mov	esi, ebp
	mov	rdi, r12
	call	hasReadConflicts@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	assert@PLT
	mov	rax, QWORD PTR TRANS_NONE[rip]
	xor	edi, edi
	cmp	QWORD PTR [r12], rax
	setg	dil
	call	assert@PLT
	mov	rax, QWORD PTR TRANS_WRITE[rip]
	xor	edi, edi
	cmp	QWORD PTR [r12], rax
	sete	dil
	call	assert@PLT
	mov	rax, QWORD PTR 24[r13]
	test	rax, rax
	je	.L18
	xor	edi, edi
	cmp	QWORD PTR [rax], 0
	setne	dil
	call	assert@PLT
.L15:
	mov	eax, DWORD PTR 0[r13]
	xor	edi, edi
	test	DWORD PTR BTS_READ_ONLY[rip], eax
	sete	dil
	call	assert@PLT
	mov	rdi, r13
	call	allocateTempSpace@PLT
	cmp	QWORD PTR 8[r13], 0
	mov	eax, DWORD PTR SQLITE_NOMEM_BKPT[rip]
	je	.L1
	cmp	ebp, 1
	jne	.L7
.L28:
	mov	rdi, r13
	call	btreePagecount@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L26
	mov	ebp, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, 1
	mov	DWORD PTR 12[rsp], edx
	call	assert@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	ecx, 1
	mov	esi, ebp
	mov	rdi, r12
	call	hasSharedCacheTableLock@PLT
	mov	edi, eax
	call	assert@PLT
	mov	edi, 1
	call	assert@PLT
	mov	rax, QWORD PTR TRANS_NONE[rip]
	xor	edi, edi
	cmp	QWORD PTR [r12], rax
	setg	dil
	call	assert@PLT
	mov	edi, 1
	call	assert@PLT
	mov	rax, QWORD PTR 24[r13]
	test	rax, rax
	je	.L27
	xor	edi, edi
	cmp	QWORD PTR [rax], 0
	setne	dil
	call	assert@PLT
.L14:
	mov	edi, 1
	call	assert@PLT
	cmp	ebp, 1
	je	.L28
.L7:
	mov	QWORD PTR [rbx], rbp
	mov	DWORD PTR 8[rbx], -1
	mov	QWORD PTR 48[rbx], r15
	mov	QWORD PTR 40[rbx], r12
	mov	QWORD PTR 32[rbx], r13
	test	r14d, r14d
	je	.L8
	mov	eax, DWORD PTR BTCF_WriteFlag[rip]
	mov	DWORD PTR 24[rbx], eax
	xor	eax, eax
.L13:
	mov	rcx, QWORD PTR 16[r13]
	mov	edx, DWORD PTR BTCF_Multiple[rip]
	mov	DWORD PTR 28[rbx], eax
	mov	rax, rcx
	test	rcx, rcx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	QWORD PTR [rax], rbp
	jne	.L10
	or	DWORD PTR 24[rax], edx
	or	DWORD PTR 24[rbx], edx
.L10:
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L11
.L12:
	mov	eax, DWORD PTR CURSOR_INVALID[rip]
	mov	QWORD PTR 16[rbx], rcx
	mov	QWORD PTR 16[r13], rbx
	mov	DWORD PTR 12[rbx], eax
	mov	eax, DWORD PTR SQLITE_OK[rip]
.L1:
	add	rsp, 24
	.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
.L8:
	.cfi_restore_state
	mov	DWORD PTR 24[rbx], 0
	mov	eax, DWORD PTR PAGER_GET_READONLY[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L27:
	xor	edi, edi
	call	assert@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L18:
	xor	edi, edi
	call	assert@PLT
	jmp	.L15
.L26:
	xor	edi, edi
	test	r14d, r14d
	sete	dil
	call	assert@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	btreeCursor, .-btreeCursor
	.comm	TRANS_WRITE,8,8
	.comm	TRANS_NONE,8,8
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	PAGER_GET_READONLY,4,4
	.comm	CURSOR_INVALID,4,4
	.comm	BTS_READ_ONLY,4,4
	.comm	BTREE_WRCSR,4,4
	.comm	BTREE_FORDELETE,4,4
	.comm	BTCF_WriteFlag,4,4
	.comm	BTCF_Multiple,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_btreeCursor.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	btreeCursor, %function
btreeCursor:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r9, r3
	mov	r8, r2
	mov	r5, r1
	mov	r7, r0
	ldr	r6, [r0, #4]
	ldr	r4, [sp, #32]
	bl	sqlite3BtreeHoldsMutex
	subs	r10, r9, #0
	movne	r10, #1
	bl	assert
	cmp	r8, #0
	beq	.L2
	ldr	r3, .L46
	ldr	r3, [r3]
	cmp	r3, r8
	moveq	r0, #1
	beq	.L3
	ldr	r2, .L46+4
	ldr	r0, [r2]
	orr	r3, r3, r0
	sub	r0, r3, r8
	clz	r0, r0
	lsr	r0, r0, #5
.L3:
	bl	assert
	mov	r2, r10
	mov	r3, #2
	mov	r1, r5
	mov	r0, r7
	bl	hasSharedCacheTableLock
	bl	assert
	mov	r1, r5
	mov	r0, r7
	bl	hasReadConflicts
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L46+8
	ldr	r0, [r7]
	ldr	r3, [r3]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, .L46+12
	ldr	r0, [r7]
	ldr	r3, [r3]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r0, [r6, #12]
	cmp	r0, #0
	beq	.L40
	ldr	r0, [r0]
	subs	r0, r0, #0
	movne	r0, #1
.L40:
	bl	assert
	ldr	r3, .L46+16
	ldr	r2, [r6]
	ldr	r3, [r3]
	tst	r2, r3
	moveq	r0, #1
	movne	r0, #0
	bl	assert
	mov	r0, r6
	bl	allocateTempSpace
	ldr	r3, [r6, #4]
	cmp	r3, #0
	beq	.L42
	cmp	r5, #1
	beq	.L43
.L37:
	mvn	r3, #0
	str	r5, [r4]
	str	r9, [r4, #32]
	str	r7, [r4, #28]
	str	r6, [r4, #24]
	str	r3, [r4, #4]
.L19:
	ldr	r2, .L46+20
	mov	r3, #0
	ldr	r2, [r2]
	str	r2, [r4, #16]
	b	.L13
.L2:
	mov	r0, #1
	bl	assert
	mov	r2, r10
	mov	r1, r5
	mov	r3, #1
	mov	r0, r7
	bl	hasSharedCacheTableLock
	bl	assert
	mov	r0, #1
	bl	assert
	ldr	r3, .L46+8
	ldr	r0, [r7]
	ldr	r3, [r3]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	mov	r0, #1
	bl	assert
	ldr	r3, [r6, #12]
	cmp	r3, #0
	beq	.L44
	ldr	r0, [r3]
	subs	r0, r0, #0
	movne	r0, #1
	bl	assert
	mov	r0, #1
	bl	assert
	cmp	r5, #1
	beq	.L45
.L38:
	mvn	r3, #0
	str	r5, [r4]
	str	r9, [r4, #32]
	str	r7, [r4, #28]
	str	r6, [r4, #24]
	str	r3, [r4, #4]
.L8:
	mov	r2, #0
	ldr	r3, .L46+24
	str	r2, [r4, #16]
	ldr	r3, [r3]
.L13:
	ldr	r0, [r6, #8]
	str	r3, [r4, #20]
	cmp	r0, #0
	beq	.L12
	mov	r3, r0
	ldr	r2, .L46+28
	ldr	r1, [r2]
.L11:
	ldr	r2, [r3]
	cmp	r2, r5
	bne	.L10
	ldr	r2, [r3, #16]
	orr	r2, r2, r1
	str	r2, [r3, #16]
	ldr	r2, [r4, #16]
	orr	r2, r2, r1
	str	r2, [r4, #16]
.L10:
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L11
.L12:
	ldr	r3, .L46+32
	ldr	r2, .L46+36
	ldr	r3, [r3]
	str	r0, [r4, #12]
	str	r4, [r6, #8]
	ldr	r0, [r2]
	str	r3, [r4, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L42:
	ldr	r3, .L46+40
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L44:
	mov	r0, r8
	bl	assert
	mov	r0, #1
	bl	assert
	cmp	r5, #1
	bne	.L38
.L45:
	mov	r0, r6
	bl	btreePagecount
	cmp	r0, #0
	bne	.L38
.L22:
	clz	r0, r8
	mov	r5, #0
	lsr	r0, r0, #5
	bl	assert
	mvn	r3, #0
	cmp	r8, r5
	str	r9, [r4, #32]
	str	r7, [r4, #28]
	str	r6, [r4, #24]
	str	r5, [r4]
	str	r3, [r4, #4]
	bne	.L19
	mov	r5, r8
	b	.L8
.L43:
	mov	r0, r6
	bl	btreePagecount
	cmp	r0, #0
	bne	.L37
	b	.L22
.L47:
	.align	2
.L46:
	.word	BTREE_WRCSR
	.word	BTREE_FORDELETE
	.word	TRANS_NONE
	.word	TRANS_WRITE
	.word	BTS_READ_ONLY
	.word	BTCF_WriteFlag
	.word	PAGER_GET_READONLY
	.word	BTCF_Multiple
	.word	CURSOR_INVALID
	.word	SQLITE_OK
	.word	SQLITE_NOMEM_BKPT
	.size	btreeCursor, .-btreeCursor
	.comm	TRANS_WRITE,4,4
	.comm	TRANS_NONE,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	PAGER_GET_READONLY,4,4
	.comm	CURSOR_INVALID,4,4
	.comm	BTS_READ_ONLY,4,4
	.comm	BTREE_WRCSR,4,4
	.comm	BTREE_FORDELETE,4,4
	.comm	BTCF_WriteFlag,4,4
	.comm	BTCF_Multiple,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
