	.file	"extr_getlock.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cannot open %s\n"
.LC1:
	.string	"not an SQLite database: %s\n"
.LC2:
	.string	"SQLite format 3"
.LC3:
	.string	"EXCLUSIVE"
.LC4:
	.string	"PENDING"
.LC5:
	.string	"RESERVED"
.LC6:
	.string	"SHARED"
.LC7:
	.string	"file is not locked\n"
.LC8:
	.string	"out of memory\n"
.LC9:
	.string	"-shm"
.LC10:
	.string	"WAL-RECOVERY"
.LC11:
	.string	"WAL-CHECKPOINT"
.LC12:
	.string	"WAL-WRITE"
.LC13:
	.string	"WAL-READ"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.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
	mov	rbx, rsi
	sub	rsp, 120
	.cfi_def_cfa_offset 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	cmp	edi, 2
	je	.L2
	mov	rdi, QWORD PTR [rsi]
	call	usage@PLT
.L2:
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR O_RDONLY[rip]
	xor	edx, edx
	call	open@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L27
	mov	r12, rsp
	mov	edx, 100
	mov	edi, eax
	mov	rsi, r12
	call	read@PLT
	cmp	eax, 100
	je	.L5
.L7:
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, QWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	ecx, DWORD PTR SHARED_SIZE[rip]
	mov	rdx, QWORD PTR SHARED_FIRST[rip]
	lea	r8, .LC3[rip]
	mov	edi, ebp
	mov	esi, DWORD PTR F_RDLCK[rip]
	call	isLocked@PLT
	test	rax, rax
	jne	.L24
	cmp	BYTE PTR 18[rsp], 2
	je	.L9
	mov	rdx, QWORD PTR PENDING_BYTE[rip]
	mov	esi, DWORD PTR F_RDLCK[rip]
	lea	r8, .LC4[rip]
	mov	edi, ebp
	mov	ecx, 1
	call	isLocked@PLT
	test	rax, rax
	je	.L28
.L24:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 104[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L29
	add	rsp, 120
	.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
.L5:
	.cfi_restore_state
	mov	edx, 16
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	call	memcmp@PLT
	test	rax, rax
	jne	.L7
	jmp	.L6
.L27:
	mov	rdx, QWORD PTR 8[rbx]
.L25:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L1
.L28:
	mov	rdx, QWORD PTR RESERVED_BYTE[rip]
	mov	esi, DWORD PTR F_RDLCK[rip]
	lea	r8, .LC5[rip]
	mov	edi, ebp
	mov	ecx, 1
	call	isLocked@PLT
	test	rax, rax
	jne	.L24
	mov	ecx, DWORD PTR SHARED_SIZE[rip]
	mov	rdx, QWORD PTR SHARED_FIRST[rip]
	lea	r8, .LC6[rip]
	mov	edi, ebp
	mov	esi, DWORD PTR F_WRLCK[rip]
	call	isLocked@PLT
	test	rax, rax
	jne	.L24
.L15:
	lea	rdi, .LC7[rip]
	call	printf@PLT
	jmp	.L24
.L9:
	mov	rdi, QWORD PTR 8[rbx]
	xor	eax, eax
	or	rcx, -1
	repnz scasb
	not	rcx
	lea	edi, 99[rcx]
	lea	rbp, -1[rcx]
	call	malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L30
.L11:
	mov	rsi, QWORD PTR 8[rbx]
	mov	edx, ebp
	mov	rdi, r12
	call	memcpy@PLT
	movsx	rdi, ebp
	mov	edx, 5
	lea	rsi, .LC9[rip]
	add	rdi, r12
	call	memcpy@PLT
	mov	esi, DWORD PTR O_RDONLY[rip]
	xor	edx, edx
	mov	rdi, r12
	call	open@PLT
	mov	ebx, eax
	test	eax, eax
	js	.L31
	mov	rdx, QWORD PTR SHM_RECOVER[rip]
	mov	esi, DWORD PTR F_RDLCK[rip]
	lea	r8, .LC10[rip]
	mov	edi, eax
	mov	ecx, 1
	call	isLocked@PLT
	test	rax, rax
	jne	.L24
	mov	rdx, QWORD PTR SHM_CHECKPOINT[rip]
	mov	ecx, 1
	mov	edi, ebx
	xor	ebp, ebp
	mov	esi, DWORD PTR F_RDLCK[rip]
	lea	r8, .LC11[rip]
	lea	r13, .LC13[rip]
	call	isLocked@PLT
	mov	rdx, QWORD PTR SHM_WRITE[rip]
	mov	esi, DWORD PTR F_RDLCK[rip]
	mov	edi, ebx
	lea	r8, .LC12[rip]
	mov	ecx, 1
	mov	r12, rax
	call	isLocked@PLT
	add	r12d, eax
	jmp	.L13
.L14:
	mov	esi, DWORD PTR F_WRLCK[rip]
	mov	r8, r13
	mov	ecx, 1
	mov	edi, ebx
	mov	rdx, QWORD PTR SHM_READ_FIRST[rip]
	add	rdx, rbp
	add	rbp, 1
	call	isLocked@PLT
	add	r12d, eax
.L13:
	cmp	DWORD PTR SHM_READ_SIZE[rip], ebp
	jg	.L14
	test	r12d, r12d
	je	.L15
	jmp	.L24
.L31:
	mov	rdx, r12
	jmp	.L25
.L30:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	stderr,4,4
	.comm	SHM_WRITE,8,8
	.comm	SHM_RECOVER,8,8
	.comm	SHM_READ_SIZE,4,4
	.comm	SHM_READ_FIRST,8,8
	.comm	SHM_CHECKPOINT,8,8
	.comm	SHARED_SIZE,4,4
	.comm	SHARED_FIRST,8,8
	.comm	RESERVED_BYTE,8,8
	.comm	PENDING_BYTE,8,8
	.comm	O_RDONLY,4,4
	.comm	F_WRLCK,4,4
	.comm	F_RDLCK,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_getlock.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cannot open %s\012\000"
	.align	2
.LC1:
	.ascii	"SQLite format 3\000"
	.align	2
.LC2:
	.ascii	"not an SQLite database: %s\012\000"
	.align	2
.LC3:
	.ascii	"EXCLUSIVE\000"
	.align	2
.LC4:
	.ascii	"PENDING\000"
	.align	2
.LC5:
	.ascii	"RESERVED\000"
	.align	2
.LC6:
	.ascii	"SHARED\000"
	.align	2
.LC7:
	.ascii	"file is not locked\012\000"
	.align	2
.LC8:
	.ascii	"out of memory\012\000"
	.align	2
.LC9:
	.ascii	"-shm\000"
	.align	2
.LC10:
	.ascii	"WAL-RECOVERY\000"
	.align	2
.LC11:
	.ascii	"WAL-CHECKPOINT\000"
	.align	2
.LC12:
	.ascii	"WAL-WRITE\000"
	.align	2
.LC13:
	.ascii	"WAL-READ\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC14:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L32
	sub	sp, sp, #116
	cmp	r0, #2
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #108]
	mov	r3,#0
	beq	.L2
	ldr	r0, [r1]
	bl	usage
.L2:
	ldr	r8, .L32+4
	mov	r2, #0
	ldr	r1, [r8]
	ldr	r0, [r4, #4]
	bl	open
	subs	r6, r0, #0
	blt	.L27
	mov	r2, #100
	add	r1, sp, #8
	bl	read
	cmp	r0, #100
	bne	.L5
	mov	r2, #16
	ldr	r1, .L32+8
	add	r0, sp, #8
	bl	memcmp
	cmp	r0, #0
	beq	.L6
.L5:
	ldr	r3, .L32+12
	ldr	r2, [r4, #4]
	ldr	r0, [r3]
	ldr	r1, .L32+16
	bl	fprintf
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, .L32+20
	ldr	r10, .L32+24
	ldr	r9, .L32+28
	ldr	r7, .L32+32
	ldr	r3, [r10]
	ldr	r2, [r9]
	ldr	r1, [r7]
	str	r0, [sp]
	mov	r0, r6
	bl	isLocked
	subs	r5, r0, #0
	bne	.L9
	ldrb	r3, [sp, #26]	@ zero_extendqisi2
	cmp	r3, #2
	beq	.L8
	ldr	r3, .L32+36
	ldr	r2, .L32+40
	mov	r0, r6
	ldr	r2, [r2]
	str	r3, [sp]
	ldr	r1, [r7]
	mov	r3, #1
	bl	isLocked
	cmp	r0, #0
	beq	.L28
.L9:
	mov	r5, #0
.L1:
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [sp, #108]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	mov	r0, r5
	add	sp, sp, #116
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	ldr	r3, .L32+12
	ldr	r2, [r4, #4]
	ldr	r0, [r3]
	ldr	r1, .L32+44
	bl	fprintf
	mov	r5, #1
	b	.L1
.L28:
	ldr	r3, .L32+48
	ldr	r2, .L32+52
	ldr	r1, [r7]
	ldr	r2, [r2]
	mov	r0, r6
	str	r3, [sp]
	mov	r3, #1
	bl	isLocked
	cmp	r0, #0
	bne	.L9
	ldr	ip, .L32+56
	ldr	r1, .L32+60
	ldr	r3, [r10]
	ldr	r2, [r9]
	ldr	r1, [r1]
	mov	r0, r6
	str	ip, [sp]
	bl	isLocked
	cmp	r0, #0
	bne	.L9
.L14:
	ldr	r0, .L32+64
	bl	printf
	b	.L1
.L8:
	ldr	r0, [r4, #4]
	bl	strlen
	mov	r9, r0
	add	r0, r0, #100
	bl	malloc
	subs	r6, r0, #0
	beq	.L30
.L10:
	mov	r2, r9
	ldr	r1, [r4, #4]
	mov	r0, r6
	bl	memcpy
	mov	r2, #5
	ldr	r1, .L32+68
	add	r0, r6, r9
	bl	memcpy
	ldr	r1, [r8]
	mov	r2, #0
	mov	r0, r6
	bl	open
	subs	r8, r0, #0
	blt	.L31
	ldr	r3, .L32+72
	ldr	r2, .L32+76
	ldr	r2, [r2]
	str	r3, [sp]
	ldr	r1, [r7]
	mov	r3, #1
	bl	isLocked
	subs	r4, r0, #0
	bne	.L9
	ldr	r3, .L32+80
	ldr	r2, .L32+84
	mov	r0, r8
	ldr	r2, [r2]
	str	r3, [sp]
	ldr	r1, [r7]
	mov	r3, #1
	bl	isLocked
	ldr	r3, .L32+88
	ldr	r2, .L32+92
	ldr	r1, [r7]
	mov	r6, r0
	ldr	r2, [r2]
	mov	r0, r8
	str	r3, [sp]
	mov	r3, #1
	bl	isLocked
	ldr	r7, .L32+96
	ldr	fp, .L32+100
	ldr	r10, .L32+60
	ldr	r9, .L32+104
	add	r6, r6, r0
	b	.L12
.L13:
	ldr	r2, [fp]
	str	r9, [sp]
	add	r2, r4, r2
	mov	r3, #1
	mov	r0, r8
	ldr	r1, [r10]
	bl	isLocked
	add	r4, r4, #1
	add	r6, r6, r0
.L12:
	ldr	r3, [r7]
	cmp	r3, r4
	bgt	.L13
	cmp	r6, #0
	beq	.L14
	b	.L9
.L31:
	ldr	r3, .L32+12
	mov	r2, r6
	ldr	r0, [r3]
	ldr	r1, .L32+44
	bl	fprintf
	mov	r5, #1
	b	.L1
.L29:
	bl	__stack_chk_fail
.L30:
	ldr	r3, .L32+12
	ldr	r1, .L32+108
	ldr	r0, [r3]
	bl	fprintf
	mov	r0, #1
	bl	exit
	b	.L10
.L33:
	.align	2
.L32:
	.word	.LC14
	.word	O_RDONLY
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	SHARED_SIZE
	.word	SHARED_FIRST
	.word	F_RDLCK
	.word	.LC4
	.word	PENDING_BYTE
	.word	.LC0
	.word	.LC5
	.word	RESERVED_BYTE
	.word	.LC6
	.word	F_WRLCK
	.word	.LC7
	.word	.LC9
	.word	.LC10
	.word	SHM_RECOVER
	.word	.LC11
	.word	SHM_CHECKPOINT
	.word	.LC12
	.word	SHM_WRITE
	.word	SHM_READ_SIZE
	.word	SHM_READ_FIRST
	.word	.LC13
	.word	.LC8
	.size	main, .-main
	.comm	stderr,4,4
	.comm	SHM_WRITE,4,4
	.comm	SHM_RECOVER,4,4
	.comm	SHM_READ_SIZE,4,4
	.comm	SHM_READ_FIRST,4,4
	.comm	SHM_CHECKPOINT,4,4
	.comm	SHARED_SIZE,4,4
	.comm	SHARED_FIRST,4,4
	.comm	RESERVED_BYTE,4,4
	.comm	PENDING_BYTE,4,4
	.comm	O_RDONLY,4,4
	.comm	F_WRLCK,4,4
	.comm	F_RDLCK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
