	.file	"816143.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Enter source file name: "
.LC1:
	.string	"%s"
.LC2:
	.string	"r"
.LC3:
	.string	"Can't open %s filename\n"
.LC4:
	.string	"Enter target file name: "
.LC5:
	.string	"w"
.LC6:
	.string	"Error in closing files.\n"
	.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, 576
	mov	DWORD PTR -564[rbp], edi
	mov	QWORD PTR -576[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -548[rbp], 0
	mov	DWORD PTR -552[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -528[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -528[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -544[rbp], rax
	cmp	QWORD PTR -544[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -528[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -272[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -536[rbp], rax
	cmp	QWORD PTR -536[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -272[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -552[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -552[rbp], edx
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	add	ecx, ecx
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	test	edx, edx
	jne	.L4
	mov	rdx, QWORD PTR -536[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	putc@PLT
.L4:
	mov	rax, QWORD PTR -544[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	DWORD PTR -548[rbp], eax
	cmp	DWORD PTR -548[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR -544[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR -536[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L7
.L6:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
.L7:
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, 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
	.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	"816143.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter source file name: \000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"Can't open %s filename\012\000"
	.align	2
.LC4:
	.ascii	"Enter target file name: \000"
	.align	2
.LC5:
	.ascii	"w\000"
	.align	2
.LC6:
	.ascii	"Error in closing files.\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 544
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #544
	str	r0, [fp, #-544]
	str	r1, [fp, #-548]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-532]
	mov	r3, #0
	str	r3, [fp, #-536]
	ldr	r0, .L10+4
	bl	printf
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L10+8
	bl	__isoc99_scanf
	sub	r3, fp, #520
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L10+16
	ldr	r3, [r3]
	sub	r2, fp, #520
	ldr	r1, .L10+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, .L10+24
	bl	printf
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L10+8
	bl	__isoc99_scanf
	sub	r3, fp, #264
	ldr	r1, .L10+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-524]
	ldr	r3, [fp, #-524]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L10+16
	ldr	r3, [r3]
	sub	r2, fp, #264
	ldr	r1, .L10+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r2, [fp, #-536]
	add	r3, r2, #1
	str	r3, [fp, #-536]
	ldr	r3, .L10+32
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r1, r2, r3
	cmp	r1, #0
	bne	.L4
	ldr	r1, [fp, #-524]
	ldr	r0, [fp, #-532]
	bl	putc
.L4:
	ldr	r0, [fp, #-528]
	bl	getc
	str	r0, [fp, #-532]
	ldr	r3, [fp, #-532]
	cmn	r3, #1
	bne	.L5
	ldr	r0, [fp, #-528]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r0, [fp, #-524]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
.L6:
	ldr	r3, .L10+16
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L10+36
	bl	fwrite
.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	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	1431655766
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
