	.file	"extr_filesys-data.c_readin.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"error reading file: %m\n"
	.text
	.p2align 4
	.type	readin, @function
readin:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	mov	edi, 1
	call	assert@PLT
	mov	rsi, QWORD PTR rptr[rip]
	mov	rdx, QWORD PTR wptr[rip]
	lea	rax, [rsi+rbx]
	cmp	rax, rdx
	jbe	.L9
	mov	rdi, QWORD PTR Buff[rip]
	mov	rax, QWORD PTR BUFFSIZE[rip]
	add	rax, rdi
	cmp	rdx, rax
	jl	.L7
	sub	rdx, rsi
	call	memcpy@PLT
	mov	rdx, QWORD PTR Buff[rip]
	mov	rsi, QWORD PTR wptr[rip]
	mov	edi, DWORD PTR idx_fd[rip]
	add	rsi, rdx
	sub	rsi, QWORD PTR rptr[rip]
	mov	QWORD PTR rptr[rip], rdx
	add	rdx, QWORD PTR BUFFSIZE[rip]
	mov	QWORD PTR wptr[rip], rsi
	sub	rdx, rsi
	call	read@PLT
	test	eax, eax
	js	.L11
	cdqe
	add	rax, QWORD PTR wptr[rip]
	mov	QWORD PTR wptr[rip], rax
.L6:
	mov	rsi, QWORD PTR rptr[rip]
	add	rbx, rsi
	cmp	rbx, rax
	ja	.L7
.L9:
	mov	rax, rsi
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	mov	rax, QWORD PTR wptr[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	readin, .-readin
	.comm	wptr,8,8
	.comm	stderr,4,4
	.comm	rptr,8,8
	.comm	idx_fd,4,4
	.comm	Buff,8,8
	.comm	BUFFSIZE,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_filesys-data.c_readin.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"error reading file: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	readin, %function
readin:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r6, .L12
	mov	r0, #1
	ldr	r5, .L12+4
	bl	assert
	ldr	r1, [r6]
	ldr	r2, [r5]
	add	r3, r1, r4
	cmp	r3, r2
	bls	.L9
	ldr	r8, .L12+8
	ldr	r7, .L12+12
	ldr	r0, [r8]
	ldr	r3, [r7]
	add	r3, r0, r3
	cmp	r2, r3
	blt	.L7
	sub	r2, r2, r1
	bl	memcpy
	ldr	r3, [r8]
	ldr	r0, [r6]
	ldr	r1, [r5]
	ldr	r2, [r7]
	sub	r0, r0, r3
	ldr	ip, .L12+16
	sub	r1, r1, r0
	add	r2, r3, r2
	ldr	r0, [ip]
	sub	r2, r2, r1
	str	r3, [r6]
	str	r1, [r5]
	bl	read
	cmp	r0, #0
	blt	.L11
	ldr	r3, [r5]
	add	r3, r0, r3
	str	r3, [r5]
.L6:
	ldr	r1, [r6]
	add	r4, r1, r4
	cmp	r4, r3
	bhi	.L7
.L9:
	mov	r0, r1
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L12+20
	ldr	r1, .L12+24
	ldr	r0, [r3]
	bl	fprintf
	ldr	r3, [r5]
	b	.L6
.L13:
	.align	2
.L12:
	.word	rptr
	.word	wptr
	.word	Buff
	.word	BUFFSIZE
	.word	idx_fd
	.word	stderr
	.word	.LC0
	.size	readin, .-readin
	.comm	wptr,4,4
	.comm	stderr,4,4
	.comm	rptr,4,4
	.comm	idx_fd,4,4
	.comm	Buff,4,4
	.comm	BUFFSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
