	.file	"793783.c"
	.intel_syntax noprefix
	.text
	.globl	getchars
	.type	getchars, @function
getchars:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], -1
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	mov	BYTE PTR [rax], dl
.L2:
	sub	DWORD PTR -28[rbp], 1
	cmp	DWORD PTR -28[rbp], 0
	jle	.L3
	call	getchar@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L3
	cmp	DWORD PTR -4[rbp], 10
	jne	.L4
.L3:
	cmp	DWORD PTR -4[rbp], 10
	jne	.L5
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 10
.L5:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getchars, .-getchars
	.globl	strindex
	.type	strindex, @function
strindex:
.LFB1:
	.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 -12[rbp], 0
	jmp	.L8
.L14:
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L9
.L11:
	add	DWORD PTR -8[rbp], 1
	add	DWORD PTR -4[rbp], 1
.L9:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L10
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L11
.L10:
	cmp	DWORD PTR -4[rbp], 0
	jle	.L12
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L12
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L13
.L12:
	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	.L14
	mov	eax, -1
.L13:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	strindex, .-strindex
	.globl	countchars
	.type	countchars, @function
countchars:
.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 -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L16
.L18:
	add	DWORD PTR -4[rbp], 1
.L16:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jge	.L17
	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	.L18
.L17:
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	countchars, .-countchars
	.globl	strcopy
	.type	strcopy, @function
strcopy:
.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	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -32[rbp], ecx
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR -28[rbp]
	mov	edx, DWORD PTR -32[rbp]
	add	edx, ecx
	movsx	rcx, edx
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
.L21:
	sub	DWORD PTR -28[rbp], 1
	cmp	DWORD PTR -28[rbp], 0
	jns	.L22
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	strcopy, .-strcopy
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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 -2032[rbp], 0
	mov	DWORD PTR -2028[rbp], 0
	mov	DWORD PTR -2024[rbp], 1
	jmp	.L25
.L27:
	mov	eax, DWORD PTR -2024[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -2048[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 1000
	mov	rdi, rax
	call	countchars
	mov	DWORD PTR -2020[rbp], eax
	mov	eax, DWORD PTR -2024[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -2048[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	ecx, DWORD PTR -2028[rbp]
	lea	rdx, -1008[rbp]
	mov	esi, DWORD PTR -2020[rbp]
	mov	rdi, rax
	call	strcopy
	mov	DWORD PTR -2028[rbp], eax
	mov	eax, DWORD PTR -2024[rbp]
	add	eax, 1
	cmp	DWORD PTR -2036[rbp], eax
	jle	.L26
	mov	eax, DWORD PTR -2028[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -2028[rbp], edx
	cdqe
	mov	BYTE PTR -1008[rbp+rax], 32
.L26:
	add	DWORD PTR -2024[rbp], 1
.L25:
	mov	eax, DWORD PTR -2024[rbp]
	cmp	eax, DWORD PTR -2036[rbp]
	jl	.L27
	cmp	DWORD PTR -2028[rbp], 0
	jne	.L28
	mov	eax, DWORD PTR -2028[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -2028[rbp], edx
	cdqe
	mov	BYTE PTR -1008[rbp+rax], 59
.L28:
	mov	eax, DWORD PTR -2028[rbp]
	cdqe
	mov	BYTE PTR -1008[rbp+rax], 0
	jmp	.L29
.L30:
	lea	rdx, -1008[rbp]
	lea	rax, -2016[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strindex
	test	eax, eax
	js	.L29
	lea	rax, -2016[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -2032[rbp], 1
.L29:
	lea	rax, -2016[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	getchars
	test	eax, eax
	jg	.L30
	mov	eax, DWORD PTR -2032[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"793783.c"
	.text
	.align	2
	.global	getchars
	.syntax unified
	.arm
	.fpu softvfp
	.type	getchars, %function
getchars:
	@ 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]
	mvn	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L4:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	and	r2, r2, #255
	strb	r2, [r3]
.L2:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L3
	bl	getchar
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L3
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L4
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L5
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #10
	strb	r2, [r3]
.L5:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	getchars, .-getchars
	.align	2
	.global	strindex
	.syntax unified
	.arm
	.fpu softvfp
	.type	strindex, %function
strindex:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L8
.L14:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L11:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L11
.L10:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L12
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-16]
	b	.L13
.L12:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L8:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L14
	mvn	r3, #0
.L13:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	strindex, .-strindex
	.align	2
	.global	countchars
	.syntax unified
	.arm
	.fpu softvfp
	.type	countchars, %function
countchars:
	@ 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	.L16
.L18:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bge	.L17
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L18
.L17:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	countchars, .-countchars
	.align	2
	.global	strcopy
	.syntax unified
	.arm
	.fpu softvfp
	.type	strcopy, %function
strcopy:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L21
.L22:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r1, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	mov	r1, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L21:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L22
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	strcopy, .-strcopy
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2032
	str	r0, [fp, #-2032]
	str	r1, [fp, #-2036]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2024]
	mov	r3, #0
	str	r3, [fp, #-2020]
	mov	r3, #1
	str	r3, [fp, #-2016]
	b	.L25
.L27:
	ldr	r3, [fp, #-2016]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-2036]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #1000
	mov	r0, r3
	bl	countchars
	str	r0, [fp, #-2012]
	ldr	r3, [fp, #-2016]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-2036]
	add	r3, r2, r3
	ldr	r0, [r3]
	sub	r2, fp, #1008
	ldr	r3, [fp, #-2020]
	ldr	r1, [fp, #-2012]
	bl	strcopy
	str	r0, [fp, #-2020]
	ldr	r3, [fp, #-2016]
	add	r3, r3, #1
	ldr	r2, [fp, #-2032]
	cmp	r2, r3
	ble	.L26
	ldr	r3, [fp, #-2020]
	add	r2, r3, #1
	str	r2, [fp, #-2020]
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #32
	strb	r2, [r3, #-1004]
.L26:
	ldr	r3, [fp, #-2016]
	add	r3, r3, #1
	str	r3, [fp, #-2016]
.L25:
	ldr	r2, [fp, #-2016]
	ldr	r3, [fp, #-2032]
	cmp	r2, r3
	blt	.L27
	ldr	r3, [fp, #-2020]
	cmp	r3, #0
	bne	.L28
	ldr	r3, [fp, #-2020]
	add	r2, r3, #1
	str	r2, [fp, #-2020]
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #59
	strb	r2, [r3, #-1004]
.L28:
	sub	r2, fp, #1008
	ldr	r3, [fp, #-2020]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L29
.L30:
	sub	r2, fp, #1008
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strindex
	mov	r3, r0
	cmp	r3, #0
	blt	.L29
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	printf
	ldr	r3, [fp, #-2024]
	add	r3, r3, #1
	str	r3, [fp, #-2024]
.L29:
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1000
	mov	r0, r3
	bl	getchars
	mov	r3, r0
	cmp	r3, #0
	bgt	.L30
	ldr	r3, [fp, #-2024]
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
