	.file	"103265297.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 2048
	mov	DWORD PTR -2036[rbp], edi
	mov	QWORD PTR -2048[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2024[rbp], 0
	jmp	.L2
.L6:
	cmp	DWORD PTR -2028[rbp], 999
	jne	.L2
	movzx	eax, BYTE PTR -1017[rbp]
	cmp	al, 10
	je	.L2
	jmp	.L3
.L5:
	add	DWORD PTR -2028[rbp], 1
.L3:
	call	getchar@PLT
	mov	DWORD PTR -2020[rbp], eax
	cmp	DWORD PTR -2020[rbp], -1
	je	.L4
	cmp	DWORD PTR -2020[rbp], 10
	jne	.L5
.L4:
	mov	eax, DWORD PTR -2028[rbp]
	cmp	eax, DWORD PTR -2024[rbp]
	jle	.L2
	mov	eax, DWORD PTR -2028[rbp]
	mov	DWORD PTR -2024[rbp], eax
	lea	rdx, -2016[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	copy
.L2:
	lea	rax, -2016[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	gtline
	mov	DWORD PTR -2028[rbp], eax
	cmp	DWORD PTR -2028[rbp], 0
	jg	.L6
	cmp	DWORD PTR -2024[rbp], 0
	jle	.L7
	lea	rax, -1008[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	gtline
	.type	gtline, @function
gtline:
.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 -4[rbp], 0
	jmp	.L11
.L13:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -4[rbp], 1
.L11:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cmp	DWORD PTR -4[rbp], eax
	jge	.L12
	call	getchar@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	je	.L12
	cmp	DWORD PTR -8[rbp], 10
	jne	.L13
.L12:
	cmp	DWORD PTR -8[rbp], 10
	jne	.L14
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -4[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
.L14:
	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
.LFE7:
	.size	gtline, .-gtline
	.globl	copy
	.type	copy, @function
copy:
.LFB8:
	.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	.L17
.L18:
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L18
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"103265297.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 = 2024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2016
	sub	sp, sp, #8
	str	r0, [fp, #-2024]
	str	r1, [fp, #-2028]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2016]
	b	.L2
.L6:
	ldr	r3, [fp, #-2020]
	ldr	r2, .L10+4
	cmp	r3, r2
	bne	.L2
	ldrb	r3, [fp, #-1009]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L2
	b	.L3
.L5:
	ldr	r3, [fp, #-2020]
	add	r3, r3, #1
	str	r3, [fp, #-2020]
.L3:
	bl	getchar
	str	r0, [fp, #-2012]
	ldr	r3, [fp, #-2012]
	cmn	r3, #1
	beq	.L4
	ldr	r3, [fp, #-2012]
	cmp	r3, #10
	bne	.L5
.L4:
	ldr	r2, [fp, #-2020]
	ldr	r3, [fp, #-2016]
	cmp	r2, r3
	ble	.L2
	ldr	r3, [fp, #-2020]
	str	r3, [fp, #-2016]
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #1008
	mov	r1, r3
	mov	r0, r2
	bl	copy
.L2:
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1000
	mov	r0, r3
	bl	gtline
	str	r0, [fp, #-2020]
	ldr	r3, [fp, #-2020]
	cmp	r3, #0
	bgt	.L6
	ldr	r3, [fp, #-2016]
	cmp	r3, #0
	ble	.L7
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, .L10+8
	bl	printf
.L7:
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	999
	.word	.LC0
	.size	main, .-main
	.align	2
	.global	gtline
	.syntax unified
	.arm
	.fpu softvfp
	.type	gtline, %function
gtline:
	@ 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, #-8]
	b	.L13
.L15:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L13:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L14
	bl	getchar
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L14
	ldr	r3, [fp, #-12]
	cmp	r3, #10
	bne	.L15
.L14:
	ldr	r3, [fp, #-12]
	cmp	r3, #10
	bne	.L16
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	and	r2, r2, #255
	strb	r2, [r3]
.L16:
	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}
	.size	gtline, .-gtline
	.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	.L19
.L20:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
	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
