	.file	"218894176.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: %s [source] [destination]\n"
.LC1:
	.string	"r"
	.align 8
.LC2:
	.string	"%s: %s: no such file or directory\n"
.LC3:
	.string	"%s/%s"
.LC4:
	.string	"w"
	.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
	push	rbx
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 232
	.cfi_offset 3, -24
	mov	DWORD PTR -4324[rbp], edi
	mov	QWORD PTR -4336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -4324[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -4336[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4288[rbp], rax
	cmp	QWORD PTR -4288[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -4336[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L11
.L4:
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, -4272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	eax, DWORD PTR -4248[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L5
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -4304[rbp], rax
	cmp	QWORD PTR -4304[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR -4336[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -4304[rbp], rax
.L6:
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -4304[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -4280[rbp], rax
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rcx, QWORD PTR -4304[rbp]
	mov	rax, QWORD PTR -4280[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -4280[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4312[rbp], rax
	mov	rax, QWORD PTR -4280[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L7
.L5:
	mov	rax, QWORD PTR -4336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4312[rbp], rax
.L7:
	mov	rax, QWORD PTR -4288[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -4288[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -4296[rbp], rax
	mov	rax, QWORD PTR -4288[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L8
.L9:
	mov	rdx, QWORD PTR -4288[rbp]
	lea	rax, -4128[rbp]
	mov	rcx, rdx
	mov	edx, 4096
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -4312[rbp]
	lea	rax, -4128[rbp]
	mov	rcx, rdx
	mov	edx, 4096
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	sub	QWORD PTR -4296[rbp], 4096
.L8:
	cmp	QWORD PTR -4296[rbp], 4096
	ja	.L9
	cmp	QWORD PTR -4296[rbp], 0
	je	.L10
	mov	rcx, QWORD PTR -4288[rbp]
	mov	rdx, QWORD PTR -4296[rbp]
	lea	rax, -4128[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rcx, QWORD PTR -4312[rbp]
	mov	rdx, QWORD PTR -4296[rbp]
	lea	rax, -4128[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L10:
	mov	rax, QWORD PTR -4288[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -4312[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L11:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	mov	rbx, QWORD PTR -8[rbp]
	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	"218894176.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s [source] [destination]\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"%s: %s: no such file or directory\012\000"
	.align	2
.LC3:
	.ascii	"%s/%s\000"
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4224
	sub	sp, sp, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-124]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-128]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, .L13+4
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+8
	bl	fprintf
	mov	r3, #1
	b	.L11
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L13+12
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-104]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L13+4
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L13+16
	bl	fprintf
	mov	r3, #1
	b	.L11
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #8
	ldr	r2, [r3]
	sub	r3, fp, #4160
	sub	r3, r3, #12
	sub	r3, r3, #32
	mov	r1, r3
	mov	r0, r2
	bl	stat
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-80]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L5
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #47
	mov	r0, r3
	bl	strrchr
	str	r0, [r4, #-112]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	bne	.L6
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r3, [r3, #4]
	str	r3, [r2, #-112]
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r4, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-112]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #-100]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #8
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	ldr	r3, [r3, #-112]
	ldr	r1, .L13+20
	ldr	r0, [r0, #-100]
	bl	sprintf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, .L13+24
	ldr	r0, [r3, #-100]
	bl	fopen
	str	r0, [r4, #-116]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-100]
	bl	free
	b	.L7
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	ldr	r1, .L13+24
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-116]
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [r3, #-104]
	bl	fseek
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-104]
	bl	ftell
	mov	r3, r0
	sub	r2, fp, #4096
	sub	r2, r2, #12
	str	r3, [r2, #-108]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [r3, #-104]
	bl	fseek
	b	.L8
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-104]
	mov	r2, #4096
	mov	r1, #1
	bl	fread
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-116]
	mov	r2, #4096
	mov	r1, #1
	bl	fwrite
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	sub	r3, r3, #4096
	str	r3, [r2, #-108]
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #4096
	bhi	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	beq	.L10
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r2, fp, #4096
	sub	r2, r2, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-104]
	ldr	r2, [r2, #-108]
	mov	r1, #1
	bl	fread
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r2, fp, #4096
	sub	r2, r2, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-116]
	ldr	r2, [r2, #-108]
	mov	r1, #1
	bl	fwrite
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-104]
	bl	fclose
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-116]
	bl	fclose
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
