	.file	"extr_btree.c_setSharedCacheTableLock.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	setSharedCacheTableLock, @function
setSharedCacheTableLock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r13, QWORD PTR 16[rdi]
	call	sqlite3BtreeHoldsMutex@PLT
	mov	edi, eax
	call	assert@PLT
	cmp	QWORD PTR READ_LOCK[rip], r12
	mov	edi, 1
	je	.L2
	xor	edi, edi
	cmp	QWORD PTR WRITE_LOCK[rip], r12
	sete	dil
.L2:
	call	assert@PLT
	xor	edi, edi
	cmp	QWORD PTR 8[r14], 0
	setne	dil
	call	assert@PLT
	mov	rax, QWORD PTR 8[r14]
	mov	edi, 1
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR SQLITE_ReadUncommit[rip], eax
	je	.L3
	xor	edi, edi
	cmp	QWORD PTR WRITE_LOCK[rip], r12
	sete	dil
.L3:
	call	assert@PLT
	mov	edi, DWORD PTR [r14]
	call	assert@PLT
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r14
	call	querySharedCacheTableLock@PLT
	xor	edi, edi
	cmp	QWORD PTR SQLITE_OK[rip], rax
	sete	dil
	call	assert@PLT
	mov	rbx, QWORD PTR 0[r13]
	test	rbx, rbx
	jne	.L7
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rbx, QWORD PTR 16[rbx]
	test	rbx, rbx
	je	.L4
.L7:
	cmp	QWORD PTR [rbx], rbp
	jne	.L5
	cmp	QWORD PTR 24[rbx], r14
	jne	.L5
.L6:
	xor	edi, edi
	mov	rax, QWORD PTR READ_LOCK[rip]
	cmp	QWORD PTR WRITE_LOCK[rip], rax
	setg	dil
	call	assert@PLT
	cmp	QWORD PTR 8[rbx], r12
	jl	.L24
.L9:
	mov	eax, DWORD PTR SQLITE_OK[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	QWORD PTR 8[rbx], r12
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 32
	call	sqlite3MallocZero@PLT
	mov	rbx, rax
	mov	eax, DWORD PTR SQLITE_NOMEM_BKPT[rip]
	test	rbx, rbx
	je	.L1
	mov	rax, QWORD PTR 0[r13]
	mov	QWORD PTR [rbx], rbp
	mov	QWORD PTR 24[rbx], r14
	mov	QWORD PTR 16[rbx], rax
	mov	QWORD PTR 0[r13], rbx
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	setSharedCacheTableLock, .-setSharedCacheTableLock
	.comm	WRITE_LOCK,8,8
	.comm	SQLITE_ReadUncommit,4,4
	.comm	SQLITE_OK,8,8
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	READ_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_btree.c_setSharedCacheTableLock.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	setSharedCacheTableLock, %function
setSharedCacheTableLock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r2
	mov	r10, r1
	mov	r9, r0
	ldr	r8, [r0, #8]
	bl	sqlite3BtreeHoldsMutex
	bl	assert
	ldr	r7, .L22
	ldr	r6, .L22+4
	ldr	r3, [r7]
	cmp	r3, r5
	ldrne	r3, .L22+8
	moveq	r0, #1
	ldrne	r0, [r3]
	subne	r0, r0, r5
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	assert
	ldr	r0, [r9, #4]
	subs	r0, r0, #0
	movne	r0, #1
	bl	assert
	ldr	r2, [r9, #4]
	ldr	r3, .L22+12
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r2, r3
	ldrne	r3, .L22+8
	moveq	r0, #1
	ldrne	r0, [r3]
	subne	r0, r0, r5
	clzne	r0, r0
	lsrne	r0, r0, #5
	bl	assert
	ldr	r0, [r9]
	bl	assert
	mov	r2, r5
	mov	r1, r10
	mov	r0, r9
	bl	querySharedCacheTableLock
	ldr	r3, [r6]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r4, [r8]
	cmp	r4, #0
	bne	.L7
	b	.L4
.L5:
	ldr	r4, [r4, #8]
	cmp	r4, #0
	beq	.L4
.L7:
	ldr	r3, [r4]
	cmp	r3, r10
	bne	.L5
	ldr	r3, [r4, #12]
	cmp	r3, r9
	bne	.L5
.L6:
	ldr	r2, .L22+8
	ldr	r3, [r7]
	ldr	r0, [r2]
	cmp	r0, r3
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, [r4, #4]
	ldr	r0, [r6]
	cmp	r3, r5
	strlt	r5, [r4, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r0, #16
	bl	sqlite3MallocZero
	subs	r4, r0, #0
	beq	.L21
	ldr	r3, [r8]
	str	r10, [r4]
	str	r9, [r4, #12]
	str	r3, [r4, #8]
	str	r4, [r8]
	b	.L6
.L21:
	ldr	r3, .L22+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	.align	2
.L22:
	.word	READ_LOCK
	.word	SQLITE_OK
	.word	WRITE_LOCK
	.word	SQLITE_ReadUncommit
	.word	SQLITE_NOMEM_BKPT
	.size	setSharedCacheTableLock, .-setSharedCacheTableLock
	.comm	WRITE_LOCK,4,4
	.comm	SQLITE_ReadUncommit,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	READ_LOCK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
