	.file	"246408.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"1----------------"
.LC1:
	.string	"2----------------"
.LC2:
	.string	"3----------------"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	call	fgets1
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 0
	call	fgets2
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	call	fgets3
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"Enter a string, please."
	.align 8
.LC4:
	.string	"Your string twice (puts(), then fputs()): "
.LC5:
	.string	"Ener another string, please."
.LC6:
	.string	"Done!"
	.text
	.globl	fgets1
	.type	fgets1, @function
fgets1:
.LFB1:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -22[rbp]
	mov	esi, 14
	mov	rdi, rax
	call	fgets@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -22[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -22[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -22[rbp]
	mov	esi, 14
	mov	rdi, rax
	call	fgets@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -22[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -22[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	fgets1, .-fgets1
	.section	.rodata
	.align 8
.LC7:
	.string	"Enter strings (empty lines to quit): "
	.text
	.globl	fgets2
	.type	fgets2, @function
fgets2:
.LFB2:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L6
.L8:
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -18[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L6:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -18[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L7
	movzx	eax, BYTE PTR -18[rbp]
	cmp	al, 10
	jne	.L8
.L7:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	fgets2, .-fgets2
	.globl	fgets3
	.type	fgets3, @function
fgets3:
.LFB3:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L11
.L20:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L12
.L14:
	add	DWORD PTR -24[rbp], 1
.L12:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR -18[rbp+rax]
	cmp	al, 10
	je	.L13
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR -18[rbp+rax]
	test	al, al
	jne	.L14
.L13:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR -18[rbp+rax]
	cmp	al, 10
	jne	.L17
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	mov	BYTE PTR -18[rbp+rax], 0
	jmp	.L16
.L18:
	nop
.L17:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L18
.L16:
	lea	rax, -18[rbp]
	mov	rdi, rax
	call	puts@PLT
.L11:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -18[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L19
	movzx	eax, BYTE PTR -18[rbp]
	cmp	al, 10
	jne	.L20
.L19:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	fgets3, .-fgets3
	.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	"246408.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"1----------------\000"
	.align	2
.LC1:
	.ascii	"2----------------\000"
	.align	2
.LC2:
	.ascii	"3----------------\000"
	.text
	.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
	ldr	r0, .L3
	bl	puts
	bl	fgets1
	ldr	r0, .L3+4
	bl	puts
	bl	fgets2
	ldr	r0, .L3+8
	bl	puts
	bl	fgets3
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Enter a string, please.\000"
	.align	2
.LC4:
	.ascii	"Your string twice (puts(), then fputs()): \000"
	.align	2
.LC5:
	.ascii	"Ener another string, please.\000"
	.align	2
.LC6:
	.ascii	"Done!\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fgets1
	.syntax unified
	.arm
	.fpu softvfp
	.type	fgets1, %function
fgets1:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L7+4
	bl	puts
	ldr	r3, .L7+8
	ldr	r2, [r3]
	sub	r3, fp, #24
	mov	r1, #14
	mov	r0, r3
	bl	fgets
	ldr	r0, .L7+12
	bl	puts
	sub	r3, fp, #24
	mov	r0, r3
	bl	puts
	ldr	r3, .L7+16
	ldr	r2, [r3]
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r0, .L7+20
	bl	puts
	ldr	r3, .L7+8
	ldr	r2, [r3]
	sub	r3, fp, #24
	mov	r1, #14
	mov	r0, r3
	bl	fgets
	ldr	r0, .L7+12
	bl	puts
	sub	r3, fp, #24
	mov	r0, r3
	bl	puts
	ldr	r3, .L7+16
	ldr	r2, [r3]
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	fputs
	ldr	r0, .L7+24
	bl	puts
	nop
	ldr	r3, .L7
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC7
	.word	.LC3
	.word	stdin
	.word	.LC4
	.word	stdout
	.word	.LC5
	.word	.LC6
	.size	fgets1, .-fgets1
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Enter strings (empty lines to quit): \000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fgets2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fgets2, %function
fgets2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L14+4
	bl	puts
	b	.L10
.L12:
	ldr	r3, .L14+8
	ldr	r2, [r3]
	sub	r3, fp, #20
	mov	r1, r2
	mov	r0, r3
	bl	fputs
.L10:
	ldr	r3, .L14+12
	ldr	r2, [r3]
	sub	r3, fp, #20
	mov	r1, #10
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L12
.L11:
	ldr	r0, .L14+16
	bl	puts
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC9
	.word	.LC8
	.word	stdout
	.word	stdin
	.word	.LC6
	.size	fgets2, .-fgets2
	.section	.rodata
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fgets3
	.syntax unified
	.arm
	.fpu softvfp
	.type	fgets3, %function
fgets3:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L28+4
	bl	puts
	b	.L17
.L26:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L18
.L20:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L18:
	sub	r2, fp, #20
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L19
	sub	r2, fp, #20
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
.L19:
	sub	r2, fp, #20
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L23
	sub	r2, fp, #20
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L22
.L24:
	nop
.L23:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L24
.L22:
	sub	r3, fp, #20
	mov	r0, r3
	bl	puts
.L17:
	ldr	r3, .L28+8
	ldr	r2, [r3]
	sub	r3, fp, #20
	mov	r1, #10
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L26
.L25:
	ldr	r0, .L28+12
	bl	puts
	nop
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC10
	.word	.LC8
	.word	stdin
	.word	.LC6
	.size	fgets3, .-fgets3
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
