	.file	"extr_line_reader.c_lafe_line_reader_next.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Line too long in %s"
.LC1:
	.string	"Can't read %s"
	.text
	.p2align 4
	.globl	lafe_line_reader_next
	.type	lafe_line_reader_next, @function
lafe_line_reader_next:
.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
	lea	rbp, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	add	rax, 1
	mov	rdi, rbx
	mov	QWORD PTR [rbx], rax
	mov	QWORD PTR 16[rbx], rax
	call	lafe_line_reader_find_eol@PLT
	cmp	QWORD PTR 56[rbx], 0
	jne	.L1
	cmp	BYTE PTR [r12], 0
	jne	.L1
.L2:
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 8[rbx]
	mov	r12, QWORD PTR 16[rbx]
	cmp	rax, rdx
	jb	.L4
	cmp	QWORD PTR 40[rbx], 0
	je	.L22
	mov	rdi, QWORD PTR 24[rbx]
	cmp	rdi, r12
	jb	.L23
	movsx	rax, DWORD PTR 32[rbx]
	lea	r13d, [rax+rax]
	movsx	r12, r13d
	cmp	rax, r12
	jnb	.L24
.L8:
	mov	DWORD PTR 32[rbx], r13d
	lea	rsi, 1[r12]
	call	realloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L25
.L9:
	mov	rax, QWORD PTR 24[rbx]
	mov	rsi, QWORD PTR [rbx]
	mov	QWORD PTR 24[rbx], r12
	mov	rdi, QWORD PTR 8[rbx]
	mov	QWORD PTR 16[rbx], r12
	sub	rsi, rax
	sub	rdi, rax
	mov	rax, rsi
	add	rdi, r12
	add	rax, r12
	mov	QWORD PTR 8[rbx], rdi
	mov	QWORD PTR [rbx], rax
.L7:
	movsx	rdx, DWORD PTR 32[rbx]
	mov	rcx, QWORD PTR 40[rbx]
	mov	esi, 1
	add	rdx, r12
	sub	rdx, rdi
	call	fread@PLT
	add	rax, QWORD PTR 8[rbx]
	mov	rdi, rbx
	mov	QWORD PTR 8[rbx], rax
	mov	BYTE PTR [rax], 0
	call	lafe_line_reader_find_eol@PLT
	mov	rdi, QWORD PTR 40[rbx]
	call	ferror@PLT
	test	rax, rax
	jne	.L26
.L10:
	mov	rdi, QWORD PTR 40[rbx]
	call	feof@PLT
	test	rax, rax
	je	.L2
	mov	rdi, QWORD PTR 40[rbx]
	cmp	rdi, QWORD PTR stdin[rip]
	je	.L12
	call	fclose@PLT
.L12:
	mov	QWORD PTR 40[rbx], 0
	jmp	.L2
.L22:
	cmp	rdx, r12
	je	.L14
	mov	QWORD PTR 16[rbx], rdx
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L23:
	.cfi_restore_state
	sub	rdx, r12
	mov	rsi, r12
	call	memmove@PLT
	mov	r12, QWORD PTR 24[rbx]
	mov	rdi, QWORD PTR 8[rbx]
	mov	rax, r12
	sub	rax, QWORD PTR 16[rbx]
	mov	QWORD PTR 16[rbx], r12
	add	rdi, rax
	add	QWORD PTR [rbx], rax
	mov	QWORD PTR 8[rbx], rdi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	mov	ecx, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR errno[rip]
	mov	edi, 1
	lea	rdx, .LC1[rip]
	call	lafe_errc@PLT
	jmp	.L10
.L24:
	mov	ecx, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR ENOMEM[rip]
	mov	edi, 1
	mov	rdx, rbp
	call	lafe_errc@PLT
	mov	rdi, QWORD PTR 24[rbx]
	jmp	.L8
.L14:
	xor	r12d, r12d
	jmp	.L1
.L25:
	mov	ecx, DWORD PTR 48[rbx]
	mov	esi, DWORD PTR ENOMEM[rip]
	mov	rdx, rbp
	mov	edi, 1
	call	lafe_errc@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	lafe_line_reader_next, .-lafe_line_reader_next
	.comm	stdin,8,8
	.comm	errno,4,4
	.comm	ENOMEM,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_line_reader.c_lafe_line_reader_next.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Line too long in %s\000"
	.align	2
.LC1:
	.ascii	"Can't read %s\000"
	.text
	.align	2
	.global	lafe_line_reader_next
	.syntax unified
	.arm
	.fpu softvfp
	.type	lafe_line_reader_next, %function
lafe_line_reader_next:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r8, .L27
	ldr	r6, .L27+4
	ldr	r5, .L27+8
	ldr	r7, .L27+12
	ldr	r9, .L27+16
	b	.L2
.L4:
	add	r3, r3, #1
	str	r3, [r4]
	str	r3, [r4, #8]
	mov	r0, r4
	bl	lafe_line_reader_find_eol
	ldr	r3, [r4, #28]
	cmp	r3, #0
	bne	.L1
	ldrb	r3, [r10]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L1
.L2:
	ldmib	r4, {r2, r10}
	ldr	r3, [r4]
	cmp	r3, r2
	bcc	.L4
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L22
	ldr	r0, [r4, #12]
	cmp	r0, r10
	bcc	.L23
	ldr	r3, [r4, #16]
	cmp	r3, r3, lsl #1
	lsl	r10, r3, #1
	bcs	.L24
.L8:
	str	r10, [r4, #16]
	add	r1, r10, #1
	bl	realloc
	subs	r10, r0, #0
	beq	.L25
.L9:
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #4]
	ldr	r3, [r4]
	sub	r0, r0, r2
	sub	r3, r3, r2
	add	r0, r10, r0
	add	r3, r10, r3
	str	r10, [r4, #8]
	str	r10, [r4, #12]
	str	r0, [r4, #4]
	str	r3, [r4]
.L7:
	ldr	r2, [r4, #16]
	mov	r1, #1
	add	r2, r10, r2
	ldr	r3, [r4, #20]
	sub	r2, r2, r0
	bl	fread
	mov	r3, r0
	mov	r1, #0
	ldr	r2, [r4, #4]
	mov	r0, r4
	add	ip, r2, r3
	str	ip, [r4, #4]
	strb	r1, [r2, r3]
	bl	lafe_line_reader_find_eol
	ldr	r0, [r4, #20]
	bl	ferror
	cmp	r0, #0
	bne	.L26
.L10:
	ldr	r0, [r4, #20]
	bl	feof
	cmp	r0, #0
	beq	.L2
	ldr	r0, [r4, #20]
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L12
	bl	fclose
.L12:
	mov	r3, #0
	str	r3, [r4, #20]
	b	.L2
.L22:
	cmp	r2, r10
	strne	r2, [r4, #8]
	moveq	r10, r3
.L1:
	mov	r0, r10
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	sub	r2, r2, r10
	mov	r1, r10
	bl	memmove
	ldmib	r4, {r0, r3, r10}
	ldr	r2, [r4]
	sub	r3, r10, r3
	add	r0, r0, r3
	add	r3, r2, r3
	stmib	r4, {r0, r10}
	str	r3, [r4]
	b	.L7
.L26:
	mov	r2, r5
	ldr	r3, [r4, #24]
	ldr	r1, [r6]
	mov	r0, #1
	bl	lafe_errc
	b	.L10
.L24:
	mov	r2, r7
	mov	r0, #1
	ldr	r3, [r4, #24]
	ldr	r1, [r8]
	bl	lafe_errc
	ldr	r0, [r4, #12]
	b	.L8
.L25:
	mov	r2, r7
	ldr	r3, [r4, #24]
	ldr	r1, [r8]
	mov	r0, #1
	bl	lafe_errc
	b	.L9
.L28:
	.align	2
.L27:
	.word	ENOMEM
	.word	errno
	.word	.LC1
	.word	.LC0
	.word	stdin
	.size	lafe_line_reader_next, .-lafe_line_reader_next
	.comm	stdin,4,4
	.comm	errno,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
