	.file	"154916.c"
	.intel_syntax noprefix
	.text
	.globl	fgetln
	.type	fgetln, @function
fgetln:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR buf.1[rip]
	test	rax, rax
	jne	.L5
	mov	esi, 8192
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR buf.1[rip], rax
	mov	rax, QWORD PTR buf.1[rip]
	test	rax, rax
	jne	.L3
	mov	eax, 0
	jmp	.L4
.L3:
	mov	QWORD PTR bufsz.0[rip], 8192
	jmp	.L5
.L9:
	mov	rcx, QWORD PTR buf.1[rip]
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -16[rbp], rdx
	lea	rdx, [rcx+rax]
	movzx	eax, BYTE PTR -21[rbp]
	mov	BYTE PTR [rdx], al
	mov	rax, QWORD PTR bufsz.0[rip]
	cmp	QWORD PTR -16[rbp], rax
	jne	.L6
	mov	rdx, QWORD PTR bufsz.0[rip]
	mov	rax, QWORD PTR buf.1[rip]
	mov	esi, 2
	mov	rdi, rax
	call	reallocarray@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR buf.1[rip]
	mov	rdi, rax
	call	free@PLT
	call	__errno_location@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	QWORD PTR buf.1[rip], 0
	mov	QWORD PTR bufsz.0[rip], 0
	mov	eax, 0
	jmp	.L4
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR buf.1[rip], rax
	mov	rax, QWORD PTR bufsz.0[rip]
	add	rax, rax
	mov	QWORD PTR bufsz.0[rip], rax
.L6:
	cmp	BYTE PTR -21[rbp], 10
	je	.L12
.L5:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	BYTE PTR -21[rbp], al
	cmp	BYTE PTR -21[rbp], -1
	jne	.L9
	jmp	.L8
.L12:
	nop
.L8:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L10
	mov	rax, QWORD PTR buf.1[rip]
	jmp	.L4
.L10:
	mov	eax, 0
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fgetln, .-fgetln
	.local	buf.1
	.comm	buf.1,8,8
	.local	bufsz.0
	.comm	bufsz.0,8,8
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"154916.c"
	.text
	.align	2
	.global	fgetln
	.syntax unified
	.arm
	.fpu softvfp
	.type	fgetln, %function
fgetln:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L15
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L5
	mov	r1, #8192
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L15
	str	r2, [r3]
	ldr	r3, .L15
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	mov	r3, #0
	b	.L4
.L3:
	ldr	r3, .L15+4
	mov	r2, #8192
	str	r2, [r3]
	b	.L5
.L13:
	ldr	r3, .L15
	ldr	r3, [r3]
	ldr	r2, .L15+4
	ldr	r2, [r2]
	mov	r1, #2
	mov	r0, r3
	bl	reallocarray
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L15
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L15
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L15+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	b	.L4
.L7:
	ldr	r2, .L15
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	ldr	r3, .L15+4
	ldr	r3, [r3]
	lsl	r3, r3, #1
	ldr	r2, .L15+4
	str	r3, [r2]
.L6:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L14
.L5:
	ldr	r0, [fp, #-24]
	bl	getc
	mov	r3, r0
	strb	r3, [fp, #-17]
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r1, r3, #1
	str	r1, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L6
	b	.L13
.L14:
	nop
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L15
	ldr	r3, [r3]
	b	.L4
.L10:
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	buf.5125
	.word	bufsz.5126
	.size	fgetln, .-fgetln
	.local	buf.5125
	.comm	buf.5125,4,4
	.local	bufsz.5126
	.comm	bufsz.5126,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
