	.file	"extr_sqliterk_os.c_sqliterkOSReadOnlyOpen.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Not enough memory, required %zu bytes."
	.align 8
.LC1:
	.string	"Cannot open '%s' for reading: %s"
	.text
	.p2align 4
	.globl	sqliterkOSReadOnlyOpen
	.type	sqliterkOSReadOnlyOpen, @function
sqliterkOSReadOnlyOpen:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	test	rdi, rdi
	je	.L2
	cmp	BYTE PTR [rdi], 0
	mov	rbp, rdi
	je	.L2
	mov	rbx, rsi
	test	rsi, rsi
	je	.L2
	mov	edi, 16
	call	sqliterkOSMalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L16
	mov	rdi, rbp
	call	strlen@PLT
	lea	r14d, 1[rax]
	movsx	r13, r14d
	mov	rdi, r13
	call	sqliterkOSMalloc@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rdi, rax
	test	rax, rax
	je	.L17
	mov	rdx, r13
	mov	rsi, rbp
	call	strncpy@PLT
	mov	rdi, QWORD PTR 8[r12]
	mov	esi, DWORD PTR O_RDONLY[rip]
	call	open@PLT
	mov	QWORD PTR [r12], rax
	test	rax, rax
	js	.L18
	mov	r13d, DWORD PTR SQLITERK_OK[rip]
	mov	QWORD PTR [rbx], r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	mov	r13d, DWORD PTR SQLITERK_MISUSE[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	r13d, DWORD PTR SQLITERK_NOMEM[rip]
	mov	edx, 16
	lea	rsi, .LC0[rip]
	xor	eax, eax
	mov	edi, r13d
	call	sqliterkOSError@PLT
.L7:
	mov	QWORD PTR [rbx], 0
	mov	eax, r13d
	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
.L17:
	.cfi_restore_state
	mov	r13d, DWORD PTR SQLITERK_NOMEM[rip]
	mov	edx, r14d
	lea	rsi, .LC0[rip]
	xor	eax, eax
	mov	edi, r13d
	call	sqliterkOSError@PLT
.L9:
	mov	rdi, r12
	call	sqliterkOSClose@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR errno[rip]
	mov	r13d, DWORD PTR SQLITERK_CANTOPEN[rip]
	call	strerror@PLT
	mov	edx, DWORD PTR 8[r12]
	lea	rsi, .LC1[rip]
	mov	edi, r13d
	mov	ecx, eax
	xor	eax, eax
	call	sqliterkOSError@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	sqliterkOSReadOnlyOpen, .-sqliterkOSReadOnlyOpen
	.comm	errno,4,4
	.comm	SQLITERK_OK,4,4
	.comm	SQLITERK_NOMEM,4,4
	.comm	SQLITERK_MISUSE,4,4
	.comm	SQLITERK_CANTOPEN,4,4
	.comm	O_RDONLY,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_sqliterk_os.c_sqliterkOSReadOnlyOpen.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Not enough memory, required %zu bytes.\000"
	.align	2
.LC1:
	.ascii	"Cannot open '%s' for reading: %s\000"
	.text
	.align	2
	.global	sqliterkOSReadOnlyOpen
	.syntax unified
	.arm
	.fpu softvfp
	.type	sqliterkOSReadOnlyOpen, %function
sqliterkOSReadOnlyOpen:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r0, #0
	beq	.L2
	ldrb	r3, [r4]	@ zero_extendqisi2
	mov	r5, r1
	cmp	r1, #0
	cmpne	r3, #0
	bne	.L3
.L2:
	ldr	r3, .L18
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	mov	r0, #8
	bl	sqliterkOSMalloc
	subs	r6, r0, #0
	beq	.L15
	mov	r0, r4
	bl	strlen
	add	r7, r0, #1
	mov	r0, r7
	bl	sqliterkOSMalloc
	cmp	r0, #0
	str	r0, [r6, #4]
	beq	.L16
	mov	r2, r7
	mov	r1, r4
	bl	strncpy
	ldr	r3, .L18+4
	ldr	r0, [r6, #4]
	ldr	r1, [r3]
	bl	open
	cmp	r0, #0
	str	r0, [r6]
	blt	.L17
	ldr	r3, .L18+8
	str	r6, [r5]
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r3, .L18+12
	mov	r2, #8
	ldr	r4, [r3]
	ldr	r1, .L18+16
	mov	r0, r4
	bl	sqliterkOSError
.L6:
	mov	r3, #0
	mov	r0, r4
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r3, .L18+12
	mov	r2, r7
	ldr	r4, [r3]
	ldr	r1, .L18+16
	mov	r0, r4
	bl	sqliterkOSError
.L8:
	mov	r0, r6
	bl	sqliterkOSClose
	b	.L6
.L17:
	ldr	r3, .L18+20
	ldr	r2, .L18+24
	ldr	r0, [r3]
	ldr	r4, [r2]
	ldr	r7, [r6, #4]
	bl	strerror
	mov	r2, r7
	mov	r3, r0
	ldr	r1, .L18+28
	mov	r0, r4
	bl	sqliterkOSError
	b	.L8
.L19:
	.align	2
.L18:
	.word	SQLITERK_MISUSE
	.word	O_RDONLY
	.word	SQLITERK_OK
	.word	SQLITERK_NOMEM
	.word	.LC0
	.word	errno
	.word	SQLITERK_CANTOPEN
	.word	.LC1
	.size	sqliterkOSReadOnlyOpen, .-sqliterkOSReadOnlyOpen
	.comm	errno,4,4
	.comm	SQLITERK_OK,4,4
	.comm	SQLITERK_NOMEM,4,4
	.comm	SQLITERK_MISUSE,4,4
	.comm	SQLITERK_CANTOPEN,4,4
	.comm	O_RDONLY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
