	.file	"7951174.c"
	.intel_syntax noprefix
	.text
	.globl	my_len
	.type	my_len, @function
my_len:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	my_len, .-my_len
	.globl	my_realloc
	.type	my_realloc, @function
my_realloc:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	my_len
	mov	edx, DWORD PTR -28[rbp]
	add	eax, edx
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L8
	mov	eax, 0
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -12[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -12[rbp], 1
.L8:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L9
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	my_realloc, .-my_realloc
	.globl	get_next_line
	.type	get_next_line, @function
get_next_line:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rdi, buf.4[rip]
	call	my_len
	mov	edx, DWORD PTR rd.3[rip]
	sub	eax, edx
	cdqe
	lea	rdx, buf.4[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	jne	.L11
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 5
	lea	rsi, buf.4[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR rd.3[rip], eax
	mov	eax, DWORD PTR rd.3[rip]
	test	eax, eax
	jg	.L12
	mov	eax, DWORD PTR last.2[rip]
	lea	edx, -1[rax]
	mov	DWORD PTR last.2[rip], edx
	test	eax, eax
	je	.L13
	lea	rdi, buf.4[rip]
	call	my_len
	mov	edx, DWORD PTR rd.3[rip]
	sub	eax, edx
	sub	eax, 1
	cdqe
	lea	rdx, buf.4[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 10
	je	.L13
	mov	rax, QWORD PTR res.1[rip]
	jmp	.L14
.L13:
	mov	eax, 0
.L14:
	mov	QWORD PTR res.1[rip], rax
	mov	rax, QWORD PTR res.1[rip]
	jmp	.L15
.L12:
	mov	eax, DWORD PTR rd.3[rip]
	cdqe
	lea	rdx, buf.4[rip]
	mov	BYTE PTR [rax+rdx], 0
.L11:
	mov	eax, DWORD PTR i.0[rip]
	test	eax, eax
	jne	.L16
	mov	edi, 6
	call	malloc@PLT
	jmp	.L17
.L16:
	mov	rax, QWORD PTR res.1[rip]
	mov	esi, 6
	mov	rdi, rax
	call	my_realloc
.L17:
	mov	QWORD PTR res.1[rip], rax
	mov	rax, QWORD PTR res.1[rip]
	test	rax, rax
	jne	.L19
	mov	eax, 0
	jmp	.L15
.L21:
	lea	rdi, buf.4[rip]
	call	my_len
	mov	edx, eax
	mov	eax, DWORD PTR rd.3[rip]
	lea	ecx, -1[rax]
	mov	DWORD PTR rd.3[rip], ecx
	mov	ecx, edx
	sub	ecx, eax
	mov	rsi, QWORD PTR res.1[rip]
	mov	eax, DWORD PTR i.0[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.0[rip], edx
	cdqe
	lea	rdx, [rsi+rax]
	movsx	rax, ecx
	lea	rcx, buf.4[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	mov	BYTE PTR [rdx], al
.L19:
	lea	rdi, buf.4[rip]
	call	my_len
	mov	edx, DWORD PTR rd.3[rip]
	sub	eax, edx
	cdqe
	lea	rdx, buf.4[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	test	al, al
	je	.L20
	lea	rdi, buf.4[rip]
	call	my_len
	mov	edx, DWORD PTR rd.3[rip]
	sub	eax, edx
	cdqe
	lea	rdx, buf.4[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 10
	jne	.L21
.L20:
	mov	rdx, QWORD PTR res.1[rip]
	mov	eax, DWORD PTR i.0[rip]
	cdqe
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rdi, buf.4[rip]
	call	my_len
	mov	edx, DWORD PTR rd.3[rip]
	sub	eax, edx
	cdqe
	lea	rdx, buf.4[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 10
	jne	.L22
	mov	DWORD PTR i.0[rip], 0
	mov	eax, DWORD PTR rd.3[rip]
	sub	eax, 1
	mov	DWORD PTR rd.3[rip], eax
	mov	rax, QWORD PTR res.1[rip]
	jmp	.L15
.L22:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	get_next_line
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_next_line, .-get_next_line
	.local	buf.4
	.comm	buf.4,5,1
	.local	rd.3
	.comm	rd.3,4,4
	.data
	.align 4
	.type	last.2, @object
	.size	last.2, 4
last.2:
	.long	1
	.local	res.1
	.comm	res.1,8,8
	.local	i.0
	.comm	i.0,4,4
	.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	"7951174.c"
	.text
	.align	2
	.global	my_len
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_len, %function
my_len:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	my_len, .-my_len
	.align	2
	.global	my_realloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_realloc, %function
my_realloc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	my_len
	mov	r2, r0
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	mov	r3, #0
	b	.L7
.L9:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L8:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r3, [fp, #-8]
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	my_realloc, .-my_realloc
	.align	2
	.global	get_next_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_next_line, %function
get_next_line:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, .L23
	bl	my_len
	mov	r2, r0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L23
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L11
	mov	r2, #5
	ldr	r1, .L23
	ldr	r0, [fp, #-8]
	bl	read
	mov	r3, r0
	ldr	r2, .L23+4
	str	r3, [r2]
	ldr	r3, .L23+4
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L12
	ldr	r3, .L23+8
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r1, .L23+8
	str	r2, [r1]
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L23
	bl	my_len
	mov	r2, r0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, .L23
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L13
	ldr	r3, .L23+12
	ldr	r3, [r3]
	b	.L14
.L13:
	mov	r3, #0
.L14:
	ldr	r2, .L23+12
	str	r3, [r2]
	ldr	r3, .L23+12
	ldr	r3, [r3]
	b	.L15
.L12:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, .L23
	mov	r1, #0
	strb	r1, [r2, r3]
.L11:
	ldr	r3, .L23+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L16
	mov	r0, #6
	bl	malloc
	mov	r3, r0
	b	.L17
.L16:
	ldr	r3, .L23+12
	ldr	r3, [r3]
	mov	r1, #6
	mov	r0, r3
	bl	my_realloc
	mov	r3, r0
.L17:
	ldr	r2, .L23+12
	str	r3, [r2]
	ldr	r3, .L23+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	mov	r3, #0
	b	.L15
.L21:
	ldr	r0, .L23
	bl	my_len
	mov	r1, r0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r0, .L23+4
	str	r2, [r0]
	sub	r2, r1, r3
	ldr	r3, .L23+12
	ldr	r1, [r3]
	ldr	r3, .L23+16
	ldr	r3, [r3]
	add	r0, r3, #1
	ldr	ip, .L23+16
	str	r0, [ip]
	add	r3, r1, r3
	ldr	r1, .L23
	ldrb	r2, [r1, r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L19:
	ldr	r0, .L23
	bl	my_len
	mov	r2, r0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L23
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L23
	bl	my_len
	mov	r2, r0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L23
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L21
.L20:
	ldr	r3, .L23+12
	ldr	r3, [r3]
	ldr	r2, .L23+16
	ldr	r2, [r2]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, .L23
	bl	my_len
	mov	r2, r0
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L23
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L22
	ldr	r3, .L23+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L23+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L23+4
	str	r3, [r2]
	ldr	r3, .L23+12
	ldr	r3, [r3]
	b	.L15
.L22:
	ldr	r0, [fp, #-8]
	bl	get_next_line
	mov	r3, r0
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	buf.5744
	.word	rd.5741
	.word	last.5740
	.word	res.5743
	.word	i.5742
	.size	get_next_line, .-get_next_line
	.local	buf.5744
	.comm	buf.5744,5,4
	.local	rd.5741
	.comm	rd.5741,4,4
	.data
	.align	2
	.type	last.5740, %object
	.size	last.5740, 4
last.5740:
	.word	1
	.local	res.5743
	.comm	res.5743,4,4
	.local	i.5742
	.comm	i.5742,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
