	.file	"160370.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s"
	.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
	sub	rsp, 3040
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -3036[rbp], 0
	mov	DWORD PTR -3032[rbp], 0
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	mygetline
	mov	DWORD PTR -3028[rbp], eax
	mov	eax, DWORD PTR -3028[rbp]
	mov	DWORD PTR -3036[rbp], eax
	lea	rdx, -3024[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	mygetline
	mov	DWORD PTR -3028[rbp], eax
	mov	eax, DWORD PTR -3028[rbp]
	cmp	eax, DWORD PTR -3036[rbp]
	jge	.L2
	lea	rdx, -2016[rbp]
	lea	rax, -3024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
	lea	rdx, -3024[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
	mov	eax, DWORD PTR -3036[rbp]
	mov	DWORD PTR -3032[rbp], eax
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	count
	mov	DWORD PTR -3036[rbp], eax
	jmp	.L4
.L2:
	lea	rdx, -2016[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
	mov	eax, DWORD PTR -3028[rbp]
	mov	DWORD PTR -3032[rbp], eax
	jmp	.L4
.L6:
	mov	eax, DWORD PTR -3028[rbp]
	cmp	eax, DWORD PTR -3036[rbp]
	jge	.L5
	mov	eax, DWORD PTR -3036[rbp]
	mov	DWORD PTR -3032[rbp], eax
	mov	eax, DWORD PTR -3028[rbp]
	mov	DWORD PTR -3036[rbp], eax
	lea	rdx, -2016[rbp]
	lea	rax, -3024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
	lea	rdx, -3024[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -3028[rbp]
	cmp	eax, DWORD PTR -3032[rbp]
	jge	.L4
	mov	eax, DWORD PTR -3028[rbp]
	mov	DWORD PTR -3032[rbp], eax
	lea	rdx, -2016[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
.L4:
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	mygetline
	mov	DWORD PTR -3028[rbp], eax
	cmp	DWORD PTR -3028[rbp], 0
	jg	.L6
	mov	edi, 10
	call	putchar@PLT
	lea	rax, -3024[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -2016[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	mygetline
	.type	mygetline, @function
mygetline:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -5[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L10:
	cmp	DWORD PTR -4[rbp], 998
	jg	.L11
	call	getchar@PLT
	mov	BYTE PTR -5[rbp], al
	cmp	BYTE PTR -5[rbp], -1
	je	.L11
	cmp	BYTE PTR -5[rbp], 10
	jne	.L12
.L11:
	cmp	BYTE PTR -5[rbp], 10
	jne	.L13
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -5[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L13:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	mygetline, .-mygetline
	.globl	count
	.type	count, @function
count:
.LFB2:
	.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	.L16
.L17:
	add	DWORD PTR -4[rbp], 1
.L16:
	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	.L17
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	count, .-count
	.globl	copy
	.type	copy, @function
copy:
.LFB3:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L20
.L21:
	add	DWORD PTR -4[rbp], 1
.L20:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L21
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	copy, .-copy
	.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	"160370.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 3016
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3008
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-3020]
	mov	r3, #0
	str	r3, [fp, #-3016]
	sub	r3, fp, #1008
	mov	r0, r3
	bl	mygetline
	str	r0, [fp, #-3012]
	ldr	r3, [fp, #-3012]
	str	r3, [fp, #-3020]
	sub	r3, fp, #2992
	sub	r3, r3, #4
	sub	r3, r3, #12
	sub	r2, fp, #1008
	mov	r1, r3
	mov	r0, r2
	bl	copy
	sub	r3, fp, #1008
	mov	r0, r3
	bl	mygetline
	str	r0, [fp, #-3012]
	ldr	r2, [fp, #-3012]
	ldr	r3, [fp, #-3020]
	cmp	r2, r3
	bge	.L2
	sub	r2, fp, #2000
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #2992
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	copy
	sub	r3, fp, #2992
	sub	r3, r3, #4
	sub	r3, r3, #12
	sub	r2, fp, #1008
	mov	r1, r3
	mov	r0, r2
	bl	copy
	ldr	r3, [fp, #-3020]
	str	r3, [fp, #-3016]
	sub	r3, fp, #1008
	mov	r0, r3
	bl	count
	str	r0, [fp, #-3020]
	b	.L4
.L2:
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #1008
	mov	r1, r3
	mov	r0, r2
	bl	copy
	ldr	r3, [fp, #-3012]
	str	r3, [fp, #-3016]
	b	.L4
.L6:
	ldr	r2, [fp, #-3012]
	ldr	r3, [fp, #-3020]
	cmp	r2, r3
	bge	.L5
	ldr	r3, [fp, #-3020]
	str	r3, [fp, #-3016]
	ldr	r3, [fp, #-3012]
	str	r3, [fp, #-3020]
	sub	r2, fp, #2000
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #2992
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	copy
	sub	r3, fp, #2992
	sub	r3, r3, #4
	sub	r3, r3, #12
	sub	r2, fp, #1008
	mov	r1, r3
	mov	r0, r2
	bl	copy
	b	.L4
.L5:
	ldr	r2, [fp, #-3012]
	ldr	r3, [fp, #-3016]
	cmp	r2, r3
	bge	.L4
	ldr	r3, [fp, #-3012]
	str	r3, [fp, #-3016]
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #1008
	mov	r1, r3
	mov	r0, r2
	bl	copy
.L4:
	sub	r3, fp, #1008
	mov	r0, r3
	bl	mygetline
	str	r0, [fp, #-3012]
	ldr	r3, [fp, #-3012]
	cmp	r3, #0
	bgt	.L6
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #2992
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, .L9+4
	bl	printf
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L9+4
	bl	printf
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	.LC0
	.size	main, .-main
	.align	2
	.global	mygetline
	.syntax unified
	.arm
	.fpu softvfp
	.type	mygetline, %function
mygetline:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L12
.L14:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [fp, #-9]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L12:
	ldr	r3, [fp, #-8]
	ldr	r2, .L17
	cmp	r3, r2
	bgt	.L13
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L14
.L13:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L15
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [fp, #-9]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	998
	.size	mygetline, .-mygetline
	.align	2
	.global	count
	.syntax unified
	.arm
	.fpu softvfp
	.type	count, %function
count:
	@ 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	.L20
.L21:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	count, .-count
	.align	2
	.global	copy
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy, %function
copy:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L24
.L25:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L24:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L25
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	copy, .-copy
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
