	.file	"extr_sqlite3.c_unixShmUnmap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	unixShmUnmap, @function
unixShmUnmap:
.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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR [rdi]
	test	rbp, rbp
	je	.L14
	mov	rax, QWORD PTR 8[rdi]
	mov	r13, QWORD PTR 8[rbp]
	mov	r12, rdi
	xor	edi, edi
	mov	ebx, esi
	cmp	QWORD PTR [rax], r13
	sete	dil
	call	assert@PLT
	mov	rax, QWORD PTR 8[r12]
	xor	edi, edi
	cmp	QWORD PTR 32[r13], rax
	sete	dil
	call	assert@PLT
	mov	edi, DWORD PTR 20[r13]
	call	sqlite3_mutex_enter@PLT
	mov	rax, QWORD PTR 24[r13]
	cmp	rbp, rax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, rax
	mov	rax, QWORD PTR [rax]
	cmp	rbp, rax
	jne	.L5
.L6:
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	QWORD PTR [rdx], rax
	call	sqlite3_free@PLT
	mov	QWORD PTR [r12], 0
	mov	edi, DWORD PTR 20[r13]
	call	sqlite3_mutex_leave@PLT
	mov	rdi, r12
	call	unixFileMutexNotheld@PLT
	mov	edi, eax
	call	assert@PLT
	xor	eax, eax
	call	unixEnterMutex@PLT
	xor	edi, edi
	cmp	QWORD PTR 0[r13], 0
	setg	dil
	call	assert@PLT
	sub	QWORD PTR 0[r13], 1
	je	.L16
.L7:
	xor	eax, eax
	call	unixLeaveMutex@PLT
.L14:
	mov	eax, DWORD PTR SQLITE_OK[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	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
.L16:
	.cfi_restore_state
	test	ebx, ebx
	je	.L8
	cmp	QWORD PTR 8[r13], 0
	js	.L8
	mov	edi, DWORD PTR 16[r13]
	call	osUnlink@PLT
.L8:
	mov	rdi, r12
	call	unixShmPurge@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rdx, 24[r13]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	unixShmUnmap, .-unixShmUnmap
	.comm	SQLITE_OK,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_unixShmUnmap.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	unixShmUnmap, %function
unixShmUnmap:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	cmp	r4, #0
	beq	.L14
	ldr	r3, [r0, #4]
	ldr	r6, [r4, #4]
	mov	r5, r0
	ldr	r0, [r3]
	mov	r7, r1
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, [r5, #4]
	ldr	r0, [r6, #20]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r0, [r6, #12]
	bl	sqlite3_mutex_enter
	ldr	r3, [r6, #16]
	cmp	r4, r3
	beq	.L4
.L5:
	mov	r2, r3
	ldr	r3, [r3]
	cmp	r4, r3
	bne	.L5
.L6:
	ldr	r3, [r4]
	mov	r0, r4
	str	r3, [r2]
	bl	sqlite3_free
	mov	r3, #0
	ldr	r0, [r6, #12]
	str	r3, [r5]
	bl	sqlite3_mutex_leave
	mov	r0, r5
	bl	unixFileMutexNotheld
	bl	assert
	bl	unixEnterMutex
	ldr	r0, [r6]
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, [r6]
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [r6]
	beq	.L16
.L7:
	bl	unixLeaveMutex
.L14:
	ldr	r3, .L17
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	cmp	r7, #0
	beq	.L8
	ldr	r3, [r6, #4]
	cmp	r3, #0
	blt	.L8
	ldr	r0, [r6, #8]
	bl	osUnlink
.L8:
	mov	r0, r5
	bl	unixShmPurge
	b	.L7
.L4:
	add	r2, r6, #16
	b	.L6
.L18:
	.align	2
.L17:
	.word	SQLITE_OK
	.size	unixShmUnmap, .-unixShmUnmap
	.comm	SQLITE_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
