	.file	"588549.c"
	.intel_syntax noprefix
	.text
	.globl	readline
	.type	readline, @function
readline:
.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 -32[rbp], 16
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	ecx, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L4
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, 1
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	shr	rax
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	esi, eax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rdi, rcx
	call	fgets@PLT
.L4:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -2[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L6
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	strlen@PLT
	add	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	readline, .-readline
	.globl	better_echo
	.type	better_echo, @function
better_echo:
.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, 16
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	readline
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L8
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	better_echo, .-better_echo
	.globl	good_echo
	.type	good_echo, @function
good_echo:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L10
.L12:
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	cmp	QWORD PTR -40[rbp], 16
	jne	.L14
.L10:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -32[rbp]
	mov	esi, 17
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L12
	jmp	.L11
.L14:
	nop
.L11:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	good_echo, .-good_echo
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	notbad_echo@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.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	"588549.c"
	.text
	.align	2
	.global	readline
	.syntax unified
	.arm
	.fpu softvfp
	.type	readline, %function
readline:
	@ 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]
	mov	r3, #16
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r1, #1
	ldr	r0, [fp, #-20]
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	fgets
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L4
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
	b	.L3
.L6:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsr	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	realloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L5
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
	b	.L3
.L5:
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r0, r2, r3
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	ldr	r2, [fp, #-24]
	mov	r1, r3
	bl	fgets
.L4:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	readline, .-readline
	.align	2
	.global	better_echo
	.syntax unified
	.arm
	.fpu softvfp
	.type	better_echo, %function
better_echo:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r3, [r3]
	mov	r0, r3
	bl	readline
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
.L8:
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	stdin
	.word	stdout
	.size	better_echo, .-better_echo
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	good_echo
	.syntax unified
	.arm
	.fpu softvfp
	.type	good_echo, %function
good_echo:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L12
.L14:
	sub	r3, fp, #28
	mov	r0, r3
	bl	strlen
	str	r0, [fp, #-32]
	ldr	r3, .L17+4
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r3, [fp, #-32]
	cmp	r3, #16
	bne	.L16
.L12:
	ldr	r3, .L17+8
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, #17
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	b	.L13
.L16:
	nop
.L13:
	nop
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	stdout
	.word	stdin
	.size	good_echo, .-good_echo
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	notbad_echo
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
