	.file	"982507.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Enter the filename to open without .txt "
.LC1:
	.string	"%s"
.LC2:
	.string	"r+"
.LC3:
	.string	"Cannot open infile "
.LC4:
	.string	"w+"
.LC5:
	.string	"Cannot open outfile "
.LC6:
	.string	"%d"
.LC7:
	.string	"%d\n"
.LC8:
	.string	"value of count =%d"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4260[rbp], 1
	mov	DWORD PTR -4248[rbp], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -224[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -224[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -224[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -224[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 1954051118
	mov	BYTE PTR 4[rax], 0
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -112[rbp]
	add	rax, rdx
	movabs	rcx, 8392585648542147679
	mov	QWORD PTR [rax], rcx
	mov	BYTE PTR 8[rax], 0
	lea	rax, -224[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4240[rbp], rax
	cmp	QWORD PTR -4240[rbp], 0
	jne	.L2
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	lea	rax, -112[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4232[rbp], rax
	cmp	QWORD PTR -4232[rbp], 0
	jne	.L4
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L13:
	mov	DWORD PTR -4256[rbp], 0
	jmp	.L5
.L8:
	lea	rdx, -4224[rbp]
	mov	eax, DWORD PTR -4256[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	rax, QWORD PTR -4240[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -4260[rbp], eax
	cmp	DWORD PTR -4260[rbp], 1
	jne	.L16
	add	DWORD PTR -4256[rbp], 1
.L5:
	cmp	DWORD PTR -4256[rbp], 999
	jle	.L8
	jmp	.L7
.L16:
	nop
.L7:
	mov	DWORD PTR -4252[rbp], 0
	jmp	.L9
.L12:
	mov	eax, DWORD PTR -4252[rbp]
	add	eax, eax
	cdqe
	mov	eax, DWORD PTR -4224[rbp+rax*4]
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR -4252[rbp]
	add	eax, eax
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR -4224[rbp+rax*4]
	cmp	eax, 1
	jne	.L10
	mov	DWORD PTR -4244[rbp], 0
	mov	edx, DWORD PTR -4244[rbp]
	mov	rax, QWORD PTR -4232[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4248[rbp], 1
.L10:
	mov	eax, DWORD PTR -4252[rbp]
	add	eax, eax
	cdqe
	mov	eax, DWORD PTR -4224[rbp+rax*4]
	cmp	eax, 1
	jne	.L11
	mov	eax, DWORD PTR -4252[rbp]
	add	eax, eax
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR -4224[rbp+rax*4]
	test	eax, eax
	jne	.L11
	mov	DWORD PTR -4244[rbp], 1
	mov	edx, DWORD PTR -4244[rbp]
	mov	rax, QWORD PTR -4232[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4248[rbp], 1
.L11:
	add	DWORD PTR -4252[rbp], 1
.L9:
	mov	eax, DWORD PTR -4256[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -4252[rbp], eax
	jl	.L12
.L4:
	cmp	DWORD PTR -4260[rbp], 1
	je	.L13
	mov	eax, DWORD PTR -4248[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -4240[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -4232[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"982507.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter the filename to open without .txt \000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	".txt\000"
	.align	2
.LC3:
	.ascii	"_dex.txt\000"
	.align	2
.LC4:
	.ascii	"r+\000"
	.align	2
.LC5:
	.ascii	"Cannot open infile \000"
	.align	2
.LC6:
	.ascii	"w+\000"
	.align	2
.LC7:
	.ascii	"Cannot open outfile \000"
	.align	2
.LC8:
	.ascii	"%d\000"
	.align	2
.LC9:
	.ascii	"%d\012\000"
	.align	2
.LC10:
	.ascii	"value of count =%d\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4224
	sub	sp, sp, #12
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-136]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-124]
	ldr	r0, .L17+4
	bl	puts
	sub	r3, fp, #216
	mov	r1, r3
	ldr	r0, .L17+8
	bl	__isoc99_scanf
	sub	r2, fp, #216
	sub	r3, fp, #116
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #216
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #216
	add	r3, r3, r2
	ldr	r2, .L17+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
	sub	r3, fp, #116
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #116
	add	r3, r3, r2
	ldr	r2, .L17+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #9
	mov	r2, r3
	bl	memcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #216
	ldr	r1, .L17+20
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-120]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-120]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L17+24
	bl	puts
	mov	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #116
	ldr	r1, .L17+28
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-116]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L17+32
	bl	puts
	mov	r0, #0
	bl	exit
.L13:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-132]
	b	.L5
.L8:
	sub	r3, fp, #4160
	sub	r3, r3, #12
	sub	r3, r3, #44
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-132]
	lsl	r2, r2, #2
	add	r3, r3, r2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, .L17+36
	ldr	r0, [r0, #-120]
	bl	__isoc99_fscanf
	str	r0, [r4, #-136]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-136]
	cmp	r3, #1
	bne	.L16
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-132]
	add	r3, r3, #1
	str	r3, [r2, #-132]
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-132]
	cmp	r3, #1000
	blt	.L8
	b	.L7
.L16:
	nop
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-128]
	b	.L9
.L12:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	lsl	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L10
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	lsl	r3, r3, #1
	add	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-108]
	cmp	r3, #1
	bne	.L10
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-112]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-112]
	ldr	r1, .L17+40
	ldr	r0, [r3, #-116]
	bl	fprintf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	add	r3, r3, #1
	str	r3, [r2, #-124]
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	lsl	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-108]
	cmp	r3, #1
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	lsl	r3, r3, #1
	add	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-112]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-112]
	ldr	r1, .L17+40
	ldr	r0, [r3, #-116]
	bl	fprintf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	add	r3, r3, #1
	str	r3, [r2, #-124]
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #1
	str	r3, [r2, #-128]
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-132]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	cmp	r3, r2
	blt	.L12
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-136]
	cmp	r3, #1
	beq	.L13
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-124]
	ldr	r0, .L17+44
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-120]
	bl	fclose
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-116]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
