	.file	"extr_sqlite3.c_seekAndRead.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	seekAndRead, @function
seekAndRead:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	and	r12d, 131071
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	and	ecx, -131072
	sete	dil
	xor	r14d, r14d
	call	assert@PLT
.L2:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, ebx
	call	lseek@PLT
	lea	r15d, -1[rax]
	mov	edi, eax
	call	SimulateIOError@PLT
	cmp	ebx, r15d
	jne	.L16
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r12d
	mov	rsi, r13
	call	osRead@PLT
	cmp	r12d, eax
	je	.L6
	test	eax, eax
	js	.L17
	je	.L9
	sub	r12d, eax
	add	ebx, eax
	add	r14d, eax
	cdqe
	add	r13, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, QWORD PTR errno[rip]
	cmp	rdx, QWORD PTR EINTR[rip]
	je	.L2
	mov	QWORD PTR 8[rbp], rdx
	mov	r14d, eax
.L9:
	movsx	rdi, DWORD PTR TIMER_ELAPSED[rip]
	call	OSTRACE@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L16:
	.cfi_restore_state
	cmp	r15d, -1
	je	.L18
	mov	QWORD PTR 8[rbp], 0
	mov	r14d, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	add	r14d, r12d
	jmp	.L9
.L18:
	mov	rax, QWORD PTR errno[rip]
	mov	r14d, -1
	mov	QWORD PTR 8[rbp], rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	seekAndRead, .-seekAndRead
	.comm	errno,8,8
	.comm	TIMER_START,4,4
	.comm	TIMER_END,4,4
	.comm	TIMER_ELAPSED,4,4
	.comm	SEEK_SET,4,4
	.comm	EINTR,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_sqlite3.c_seekAndRead.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	seekAndRead, %function
seekAndRead:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	bic	fp, r3, #-16777216
	bic	fp, fp, #16646144
	mov	r5, r0
	sub	r0, fp, r3
	clz	r0, r0
	lsr	r0, r0, #5
	mov	r4, r1
	mov	r6, r2
	mov	r7, #0
	bl	assert
	ldr	r8, .L15
	ldr	r9, .L15+4
.L2:
	mov	r1, r4
	ldr	r2, [r8]
	ldr	r0, [r5]
	bl	lseek
	sub	r10, r0, #1
	bl	SimulateIOError
	cmp	r4, r10
	bne	.L13
	mov	r2, fp
	mov	r1, r6
	ldr	r0, [r5]
	bl	osRead
	cmp	fp, r0
	beq	.L6
	cmp	r0, #0
	blt	.L14
	beq	.L9
	sub	fp, fp, r0
	add	r4, r4, r0
	add	r7, r7, r0
	add	r6, r6, r0
	b	.L2
.L14:
	ldr	r3, .L15+8
	ldr	r2, [r9]
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L2
	mov	r7, r0
	str	r3, [r5, #4]
.L9:
	ldr	r3, .L15+12
	ldr	r0, [r3]
	bl	OSTRACE
.L1:
	mov	r0, r7
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	cmn	r10, #1
	movne	r3, #0
	ldreq	r2, .L15+8
	moveq	r7, r10
	ldreq	r3, [r2]
	mvnne	r7, #0
	str	r3, [r5, #4]
	b	.L1
.L6:
	add	r7, r7, fp
	b	.L9
.L16:
	.align	2
.L15:
	.word	SEEK_SET
	.word	EINTR
	.word	errno
	.word	TIMER_ELAPSED
	.size	seekAndRead, .-seekAndRead
	.comm	errno,4,4
	.comm	TIMER_START,4,4
	.comm	TIMER_END,4,4
	.comm	TIMER_ELAPSED,4,4
	.comm	SEEK_SET,4,4
	.comm	EINTR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
